Labb 5b: Redundant nätverk


I denna laboration ska ett redundant nätverk byggas med två multilayerswitchar, tre access-switchar och en ISP-switch. PC1 och PC2 placeras i olika VLAN och använder HSRP för att få var sin redundant virtuell gateway.

EtherChannel används för att kombinera flera fysiska länkar mellan switcharna, medan STP förhindrar loopar och styr de normala trafikvägarna. Statisk routing konfigureras så att klienterna kan kommunicera med den externa servern 8.8.8.8.

Topologi

Konfigurationer

  1. Grundkonfigurera MLS1, MLS2, S1, S2, S3 och ISP
    1. Skapa VLAN
      1. VLAN 10, 20 och 999 på MLS1 och MLS2
      2. VLAN 10 och 999 på S1
      3. VLAN 20 och 999 på S2
      4. VLAN 80 på S3
    2. Aktivera rapid-pvst
    3. Konfigurera accessportarna
      1. PC1 i VLAN 10
      2. PC2 i VLAN 20
      3. S3:s portar mot ISP och servern i VLAN 80
  2. Konfigurera interna trunklänkar
      1. MLS1–S1 och MLS1–S2
      2. MLS2–S1 och MLS2–S2
  3. Konfigurera LACP Po1 mellan MLS1 och MLS2
    1. Konfigurera medlemsportarna på båda switcharna
    2. Konfigurera Po1 som Layer 2-trunk
  4. Konfigurera STP-lastbalansering
    1. MLS1 som Root Bridge för VLAN 10
    2. MLS2 som Root Bridge för VLAN 20
  5. Aktivera routing och konfigurera SVI
    1. Aktivera ip routing på MLS1 och MLS2
    2. Skapa SVI för VLAN 10 och 20
  6. Konfigurera HSRP och klienterna
    1. MLS1 aktiv för VLAN 10
    2. MLS2 aktiv för VLAN 20
    3. Konfigurera PC1 och PC2
  7. Konfigurera Layer 3 LACP
    1. Po2 mellan MLS1 och ISP
      1. Konfigurera medlemsportarna på MLS1 och ISP
      2. Adressera Po2 med nätet 203.0.113.0/30
    2. Po3 mellan MLS2 och ISP
      1. Konfigurera medlemsportarna på MLS2 och ISP
      2. Adressera Po3 med nätet 203.0.113.4/30
    3. Konfigurera ISP
      1. Konfigurera det externa servernätet
      2. Konfigurera ISP G1/0/5 mot S3
      3. Konfigurera servern som 8.8.8.8
      4. Ange 8.8.8.1 som serverns gateway
  8. Konfigurera statisk routing
    1. Default route på MLS1
    2. Default route på MLS2
    3. Primära och alternativa returvägar på ISP
  9. Konfigurera HSRP tracking och testa redundansen
    1. MLS1 följer Po2
    2. MLS2 följer Po3
    3. Kontrollera normal trafik
    4. Stäng ner medlemslänkar, Port-Channel och switchar

1. Grundkonfigurera MLS1 och MLS2 inkludera VLAN

  • Grundkonfigurera MLS1
  • MLS1(config)# no ip domain-lookup
  • MLS1(config)# vlan 10
  • MLS1(config-vlan)# name CLIENT_A
  • MLS1(config-vlan)# exit
  • MLS1(config)# vlan 20
  • MLS1(config-vlan)# name CLIENT_B
  • MLS1(config-vlan)# exit
  • MLS1(config)# vlan 999
  • MLS1(config-vlan)# name NATIVE
  • MLS1(config-vlan)# exit
  • MLS1(config)# spanning-tree mode rapid-pvst
  • Grundkonfigurera MLS2
  • MLS2(config)# no ip domain-lookup
  • MLS2(config)# vlan 10
  • MLS2(config-vlan)# name CLIENT_A
  • MLS2(config-vlan)# exit
  • MLS2(config)# vlan 20
  • MLS2(config-vlan)# name CLIENT_B
  • MLS2(config-vlan)# exit
  • MLS2(config)# vlan 999
  • MLS2(config-vlan)# name NATIVE
  • MLS2(config-vlan)# exit
  • MLS2(config)# spanning-tree mode rapid-pvst

Grundkonfigurera S1, S2 och S3

  • Grundkonfigurera S1
  • S1(config)# no ip domain-lookup
  • S1(config)# vlan 10
  • S1(config-vlan)# name CLIENT_A
  • S1(config-vlan)# exit
  • S1(config)# vlan 999
  • S1(config-vlan)# name NATIVE
  • S1(config-vlan)# exit
  • S1(config)# spanning-tree mode rapid-pvst
  • S1(config)# interface fa0/1
  • S1(config-if)# description PC1_VLAN10
  • S1(config-if)# switchport mode access
  • S1(config-if)# switchport access vlan 10
  • S1(config-if)# spanning-tree portfast
  • S1(config-if)# spanning-tree bpduguard enable
  • S1(config-if)# no shutdown
  • S1(config-if)# exit
  • S1(config)#
  • Grundkonfigurera S2
  • S2(config)# no ip domain-lookup
  • S2(config)# vlan 20
  • S2(config-vlan)# name CLIENT_B
  • S2(config-vlan)# exit
  • S2(config)# vlan 999
  • S2(config-vlan)# name NATIVE
  • S2(config-vlan)# exit
  • S2(config)# spanning-tree mode rapid-pvst
  • S2(config)# interface fa0/1
  • S2(config-if)# description PC2_VLAN20
  • S2(config-if)# switchport mode access
  • S2(config-if)# switchport access vlan 20
  • S2(config-if)# spanning-tree portfast
  • S2(config-if)# spanning-tree bpduguard enable
  • S2(config-if)# no shutdown
  • S2(config-if)# exit
  • S2(config)#
  • Grundkonfigurera S3
  • S3(config)# no ip domain-lookup
  • S3(config)# vlan 80
  • S3(config-vlan)# name EXTERNAL
  • S3(config-vlan)# exit
  • S3(config)# spanning-tree mode rapid-pvst
  • S3(config)# interface g0/1
  • S3(config-if)# description ACCESS_TO_ISP
  • S3(config-if)# switchport mode access
  • S3(config-if)# switchport access vlan 80
  • S3(config-if)# no shutdown
  • S3(config-if)# exit
  • S3(config)# interface fa0/1
  • S3(config-if)# description EXTERNAL_SERVER_8.8.8.8
  • S3(config-if)# switchport mode access
  • S3(config-if)# switchport access vlan 80
  • S3(config-if)# spanning-tree portfast
  • S3(config-if)# spanning-tree bpduguard enable
  • S3(config-if)# no shutdown
  • S3(config-if)# exit
  • S3(config)#
  •  

2. Konfigurera interna trunklänkar

  • Trunk mellan MLS1 och S1
  • MLS1(config)# interface g1/0/1
  • MLS1(config-if)# description TRUNK_TO_S1_G0/1
  • MLS1(config-if)# switchport mode trunk
  • MLS1(config-if)# switchport trunk native vlan 999
  • MLS1(config-if)# switchport trunk allowed vlan 10,999
  • MLS1(config-if)# switchport nonegotiate
  • MLS1(config-if)# no shutdown
  • MLS1(config-if)# exit
  • Trunk mellan MLS1 och S2
  • MLS1(config)# interface g1/0/2
  • MLS1(config-if)# description TRUNK_TO_S2_G0/1
  • MLS1(config-if)# switchport mode trunk
  • MLS1(config-if)# switchport trunk native vlan 999
  • MLS1(config-if)# switchport trunk allowed vlan 20,999
  • MLS1(config-if)# switchport nonegotiate
  • MLS1(config-if)# no shutdown
  • MLS1(config-if)# exit
  • MLS1(config)#
  • Trunk mellan S1 och MLS1
  • S1(config)# interface g0/1
  • S1(config-if)# description TRUNK_TO_MLS1_G1/0/1
  • S1(config-if)# switchport mode trunk
  • S1(config-if)# switchport trunk native vlan 999
  • S1(config-if)# switchport trunk allowed vlan 10,999
  • S1(config-if)# switchport nonegotiate
  • S1(config-if)# no shutdown
  • S1(config-if)# exit
  • Trunk mellan S2 och MLS1
  • S2(config)# interface g0/1
  • S2(config-if)# description TRUNK_TO_MLS1_G1/0/2
  • S2(config-if)# switchport mode trunk
  • S2(config-if)# switchport trunk native vlan 999
  • S2(config-if)# switchport trunk allowed vlan 20,999
  • S2(config-if)# switchport nonegotiate
  • S2(config-if)# no shutdown
  • S2(config-if)# exit
  • Trunk mellan MLS2 och S1
  • MLS2(config)# interface g1/0/1
  • MLS2(config-if)# description TRUNK_TO_S1_G0/2
  • MLS2(config-if)# switchport mode trunk
  • MLS2(config-if)# switchport trunk native vlan 999
  • MLS2(config-if)# switchport trunk allowed vlan 10,999
  • MLS2(config-if)# switchport nonegotiate
  • MLS2(config-if)# no shutdown
  • MLS2(config-if)# exit
  • Trunk mellan MLS2 och S2
  • MLS2(config)# interface g1/0/2
  • MLS2(config-if)# description TRUNK_TO_S2_G0/2
  • MLS2(config-if)# switchport mode trunk
  • MLS2(config-if)# switchport trunk native vlan 999
  • MLS2(config-if)# switchport trunk allowed vlan 20,999
  • MLS2(config-if)# switchport nonegotiate
  • MLS2(config-if)# no shutdown
  • MLS2(config-if)# exit
  • Trunk mellan S1 och MLS2
  • S1(config)# interface g0/2
  • S1(config-if)# description TRUNK_TO_MLS2_G1/0/1
  • S1(config-if)# switchport mode trunk
  • S1(config-if)# switchport trunk native vlan 999
  • S1(config-if)# switchport trunk allowed vlan 10,999
  • S1(config-if)# switchport nonegotiate
  • S1(config-if)# no shutdown
  • S1(config-if)# exit
  • Trunk mellan S2 och MLS2
  • S2(config)# interface g0/2
  • S2(config-if)# description TRUNK_TO_MLS2_G1/0/2
  • S2(config-if)# switchport mode trunk
  • S2(config-if)# switchport trunk native vlan 999
  • S2(config-if)# switchport trunk allowed vlan 20,999
  • S2(config-if)# switchport nonegotiate
  • S2(config-if)# no shutdown
  • S2(config-if)# exit

3. Konfigurera EtherChannel på MLS1 och MLS2

  • Konfigurera Po1 på MLS1
  • MLS1(config)# interface range g1/0/3-4
  • MLS1(config-if-range)# description LACP_MEMBERS_TO_MLS2
  • MLS1(config-if-range)# switchport mode trunk
  • MLS1(config-if-range)# switchport trunk native vlan 999
  • MLS1(config-if-range)# switchport trunk allowed vlan 10,20,999
  • MLS1(config-if-range)# switchport nonegotiate
  • MLS1(config-if-range)# channel-group 1 mode active
  • MLS1(config-if-range)# no shutdown
  • MLS1(config-if-range)# exit
  • MLS1(config)# interface port-channel 1
  • MLS1(config-if)# description L2_ETHERCHANNEL_TO_MLS2
  • MLS1(config-if)# switchport mode trunk
  • MLS1(config-if)# switchport trunk native vlan 999
  • MLS1(config-if)# switchport trunk allowed vlan 10,20,999
  • MLS1(config-if)# switchport nonegotiate
  • MLS1(config-if)# no shutdown
  • MLS1(config-if)# exit
  • MLS1(config)#
  • Konfigurera Po1 på MLS2
  • MLS2(config)# interface range g1/0/3-4
  • MLS2(config-if-range)# description LACP_MEMBERS_TO_MLS1
  • MLS2(config-if-range)# switchport mode trunk
  • MLS2(config-if-range)# switchport trunk native vlan 999
  • MLS2(config-if-range)# switchport trunk allowed vlan 10,20,999
  • MLS2(config-if-range)# switchport nonegotiate
  • MLS2(config-if-range)# channel-group 1 mode active
  • MLS2(config-if-range)# no shutdown
  • MLS2(config-if-range)# exit
  • MLS2(config)# interface port-channel 1
  • MLS2(config-if)# description L2_ETHERCHANNEL_TO_MLS1
  • MLS2(config-if)# switchport mode trunk
  • MLS2(config-if)# switchport trunk native vlan 999
  • MLS2(config-if)# switchport trunk allowed vlan 10,20,999
  • MLS2(config-if)# switchport nonegotiate
  • MLS2(config-if)# no shutdown
  • MLS2(config-if)# exit
  • MLS2(config)#

4. Konfigurera STP-lastbalansering på MLS1 och MLS2

  • STP-lastbalansering på MLS1
  • MLS1(config)# spanning-tree vlan 10 root primary
  • MLS1(config)# spanning-tree vlan 20 root secondary
  • MLS1(config)# spanning-tree vlan 999 root primary
  • STP-lastbalansering på MLS2
  • MLS2(config)# spanning-tree vlan 20 root primary
  • MLS2(config)# spanning-tree vlan 10 root secondary
  • MLS2(config)# spanning-tree vlan 999 root secondary

5. Konfigurera routing och SVI

  • Aktivera routing på MLS1
  • MLS1# configure terminal
  • MLS1(config)# ip routing
  • Konfigurera SVI på MLS1
  • MLS1(config)# interface vlan 10
  • MLS1(config-if)# description GATEWAY_VLAN10
  • MLS1(config-if)# ip address 10.10.10.2 255.255.255.0
  • MLS1(config-if)# no shutdown
  • MLS1(config-if)# exit
  • MLS1(config)# interface vlan 20
  • MLS1(config-if)# description GATEWAY_VLAN20
  • MLS1(config-if)# ip address 10.20.20.2 255.255.255.0
  • MLS1(config-if)# no shutdown
  • MLS1(config-if)# exit
  • MLS1(config)#
  • Konfigurera SVI på MLS2
  • MLS2# configure terminal
  • MLS2(config)# ip routing
  • MLS2(config)# interface vlan 10
  • MLS2(config-if)# description GATEWAY_VLAN10
  • MLS2(config-if)# ip address 10.10.10.3 255.255.255.0
  • MLS2(config-if)# no shutdown
  • MLS2(config-if)# exit
  • MLS2(config)# interface vlan 20
  • MLS2(config-if)# description GATEWAY_VLAN20
  • MLS2(config-if)# ip address 10.20.20.3 255.255.255.0
  • MLS2(config-if)# no shutdown
  • MLS2(config-if)# exit
  • MLS2(config)#

6. Konfigurera HSRP

  • VLAN 10 virtuella gateway 10.10.10.1
  • MLS1 - Active
  • MLS1(config)# interface vlan 10
  • MLS1(config-if)# standby version 2
  • MLS1(config-if)# standby 10 ip 10.10.10.1
  • MLS1(config-if)# standby 10 priority 110
  • MLS1(config-if)# standby 10 preempt
  • MLS1(config-if)# exit
  • MLS1(config)#
  • MLS2 - Standby
  • MLS2(config)# interface vlan 10
  • MLS2(config-if)# standby version 2
  • MLS2(config-if)# standby 10 ip 10.10.10.1
  • MLS2(config-if)# standby 10 priority 100
  • MLS2(config-if)# standby 10 preempt
  • MLS2(config-if)# exit
  • MLS2(config)#
  • VLAN 20 virtuella gateway 10.20.20.1
  • MLS1 - Standby
  • MLS1(config)# interface vlan 20
  • MLS1(config-if)# standby version 2
  • MLS1(config-if)# standby 20 ip 10.20.20.1
  • MLS1(config-if)# standby 20 priority 100
  • MLS1(config-if)# standby 20 preempt
  • MLS1(config-if)# exit
  • MLS1(config)#
  • MLS2 - Active
  • MLS2(config)# interface vlan 20
  • MLS2(config-if)# standby version 2
  • MLS2(config-if)# standby 20 ip 10.20.20.1
  • MLS2(config-if)# standby 20 priority 110
  • MLS2(config-if)# standby 20 preempt
  • MLS2(config-if)# exit

7. Konfigurera Layer 3 LACP Po2 mellan MLS1 och ISP

  • Konfigurera Po2 på MLS1
  • MLS1(config)# interface range g1/0/5-6
  • MLS1(config-if-range)# description LACP_MEMBERS_TO_ISP
  • MLS1(config-if-range)# no switchport
  • MLS1(config-if-range)# channel-group 2 mode active
  • MLS1(config-if-range)# no shutdown
  • MLS1(config-if-range)# exit
  • MLS1(config)# interface port-channel 2
  • MLS1(config-if)# description L3_ETHERCHANNEL_TO_ISP
  • MLS1(config-if)# no switchport
  • MLS1(config-if)# ip address 203.0.113.2 255.255.255.252
  • MLS1(config-if)# no shutdown
  • MLS1(config-if)# exit
  • Konfigurera Po2 på ISP
  • ISP(config)# no ip domain-lookup
  • ISP(config)# ip routing
  • ISP(config)# interface range g1/0/1-2
  • ISP(config-if-range)# description LACP_MEMBERS_TO_MLS1
  • ISP(config-if-range)# no switchport
  • ISP(config-if-range)# channel-group 2 mode active
  • ISP(config-if-range)# no shutdown
  • ISP(config-if-range)# exit
  • ISP(config)# interface port-channel 2
  • ISP(config-if)# description L3_ETHERCHANNEL_TO_MLS1
  • ISP(config-if)# no switchport
  • ISP(config-if)# ip address 203.0.113.1 255.255.255.252
  • ISP(config-if)# no shutdown
  • ISP(config-if)# exit
  • Konfigurera Po3 på MLS2
  • MLS2(config)# interface range g1/0/5-6
  • MLS2(config-if-range)# description LACP_MEMBERS_TO_ISP
  • MLS2(config-if-range)# no switchport
  • MLS2(config-if-range)# channel-group 3 mode active
  • MLS2(config-if-range)# no shutdown
  • MLS2(config-if-range)# exit
  • MLS2(config)# interface port-channel 3
  • MLS2(config-if)# description L3_ETHERCHANNEL_TO_ISP
  • MLS2(config-if)# no switchport
  • MLS2(config-if)# ip address 203.0.113.6 255.255.255.252
  • MLS2(config-if)# no shutdown
  • MLS2(config-if)# exit
  • Konfigurera Po3 på ISP
  • ISP(config)# no ip domain-lookup
  • ISP(config)# ip routing
  • ISP(config)# interface range g1/0/3-4
  • ISP(config-if-range)# description LACP_MEMBERS_TO_MLS2
  • ISP(config-if-range)# no switchport
  • ISP(config-if-range)# channel-group 3 mode active
  • ISP(config-if-range)# no shutdown
  • ISP(config-if-range)# exit
  • ISP(config)# interface port-channel 3
  • ISP(config-if)# description L3_ETHERCHANNEL_TO_MLS2
  • ISP(config-if)# no switchport
  • ISP(config-if)# ip address 203.0.113.5 255.255.255.252
  • ISP(config-if)# no shutdown
  • ISP(config-if)# exit
  • Konfigurera ISP:s externa interface
  • ISP# configure terminal
  • ISP(config)# interface g1/0/5
  • ISP(config-if)# description EXTERNAL_NETWORK_TO_S3
  • ISP(config-if)# no switchport
  • ISP(config-if)# ip address 8.8.8.1 255.255.255.240
  • ISP(config-if)# no shutdown
  • ISP(config-if)# exit
  • ISP(config)#

8. Konfigurera routing

  • Default route på MLS1
  • MLS1(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1
  • Default route på MLS2
  • MLS2(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.5
  • Primära returvägar på ISP - VLAN 10 använder normalt MLS1:
  • ISP(config)# ip route 10.10.10.0 255.255.255.0 203.0.113.2
  • VLAN 20 använder normalt MLS2:
  • ISP(config)# ip route 10.20.20.0 255.255.255.0 203.0.113.6
  • Alternativa returvägar på ISP
  • ISP(config)# ip route 10.10.10.0 255.255.255.0 203.0.113.6 10
  • ISP(config)# ip route 10.20.20.0 255.255.255.0 203.0.113.2 10

9. Konfigurera HSRP tracking

  • Skapa tracking-objekt på MLS1
  • MLS1(config)# track 1 interface port-channel 2 line-protocol
  • Koppla objektet till HSRP-grupp 10:
  • MLS1(config)# interface vlan 10
  • MLS1(config-if)# standby 10 track 1 decrement 20
  • MLS1(config-if)# exit
  • MLS1(config)#
  • Skapa tracking-objekt på MLS2
  • MLS2(config)# track 2 interface port-channel 3 line-protocol
  • Koppla objektet till HSRP-grupp 20:
  • MLS2(config)# interface vlan 20
  • MLS2(config-if)# standby 20 track 2 decrement 20
  • MLS2(config-if)# exit
  • MLS2(config)#