I denna laboration ska du bygga och undersöka ett nätverk med redundanta förbindelser och standard-gateways. Syftet är att förstå hur flera tekniker samverkar för att upprätthålla kommunikationen när en länk eller en nätverksenhet slutar fungera.
Nätverket består av två access-switchar, S1 och S2, två multilayerswitchar i distributionslagret, DS1 och DS2, samt tre routrar, R1, R2 och R3. Klienterna tillhör VLAN 10 respektive VLAN 20. Via distributionsswitcharna och routrarna når de ett fjärrnät bakom R2.

Rapid PVST+ skapar en loopfri topologi för varje VLAN. Mellan DS1 och DS2 används EtherChannel med LACP för att samla två fysiska länkar till en logisk förbindelse. HSRP ger klienterna en gemensam virtuell standard-gateway i respektive VLAN, medan OSPF förmedlar information om IP-näten mellan distributionsswitcharna och routrarna.
Arbetsfördelningen samordnas mellan STP och HSRP. DS1 är normalt root bridge och aktiv gateway för VLAN 10, medan DS2 har motsvarande roller för VLAN 20. På så sätt används båda distributionsswitcharna, samtidigt som de kan ersätta varandra som gateway.
Du ska även använda HSRP interface tracking för att låta statusen på distributionsswitchens routade upplänk påverka valet av aktiv gateway.
När en övervakad upplänk går ned minskar HSRP-prioriteten med 25. Den normalt aktiva switchens prioritet blir då 110 − 25 = 85, vilket är lägre än motpartens 90. Med preempt kan motparten ta över. Spårningen gäller den lokala upplänken; den upptäcker inte automatiskt ett avbrott längre bort i nätverket
Konfigurationer
- ! Steg 1 - Grundkonfiguration
- S1>enable
- S1#configure terminal
- S1(config)#hostname S1
- S1(config)#no ip domain-lookup
- S1(config)#line console 0
- S1(config-line)#logging synchronous
- S1(config-line)#exit
- ! Steg 2 - VLAN och Accessport-konfiguration
- S1(config)#vlan 10
- S1(config-vlan)#name DATA10
- S1(config-vlan)#exit
- S1(config)#vlan 20
- S1(config-vlan)#name DATA20
- S1(config-vlan)#exit
- S1(config)#interface fastEthernet 0/1
- 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)#exit
- ! Steg 3 - Trunk-konfiguration
- S1(config)# spanning-tree mode rapid-pvst
- S1(config)# interface range gigabitEthernet 0/1-2
- S1(config-if-range)# description Trunk to DS1 and DS2
- S1(config-if-range)# switchport mode trunk
- S1(config-if-range)# switchport trunk allowed vlan 10,20
- S1(config-if-range)# no shutdown
- S1(config-if-range)# exit
- S1(config)#end
- S1#write memory
- ! Steg 1 - Grundkonfiguration
- S2>enable
- S2#configure terminal
- S2(config)#hostname S2
- S2(config)#no ip domain-lookup
- S2(config)#line console 0
- S2(config-line)#logging synchronous
- S2(config-line)#exit
- ! Steg 2 - VLAN och Accessport-konfiguration
- S2(config)#vlan 10
- S2(config-vlan)#name DATA10
- S2(config-vlan)#exit
- S2(config)#vlan 20
- S2(config-vlan)#name DATA20
- S2(config-vlan)#exit
- S2(config)#interface fastEthernet 0/1
- 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)#exit
- ! Steg 3 - Trunk-konfiguration
- S2(config)# spanning-tree mode rapid-pvst
- S2(config)# interface range gigabitEthernet 0/1-2
- S2(config-if-range)# description Trunk to DS1 and DS2
- S2(config-if-range)# switchport mode trunk
- S2(config-if-range)# switchport trunk allowed vlan 10,20
- S2(config-if-range)# no shutdown
- S2(config-if-range)# exit
- S2(config)#end
- S2#write memory
- ! Steg 1 - Grundkonfiguration
- DS1>enable
- DS1#configure terminal
- DS1(config)#hostname DS1
- DS1(config)#no ip domain-lookup
- DS1(config)#line console 0
- DS1(config-line)#logging synchronous
- DS1(config-line)#exit
- ! Steg 2 - VLAN-konfiguration
- DS1(config)#ip routing
- DS1(config)#vlan 10
- DS1(config-vlan)#name DATA10
- DS1(config-vlan)#exit
- DS1(config)#vlan 20
- DS1(config-vlan)#name DATA20
- DS1(config-vlan)#exit
- DS1(config)#spanning-tree mode rapid-pvst
- DS1(config)#spanning-tree vlan 10 root primary
- DS1(config)#spanning-tree vlan 20 root secondary
- ! Steg 3 - EtherChannel till DS2
- DS1(config)#interface range gigabitEthernet 1/0/3-4
- DS1(config-if-range)#description Trunk-link to DS2 LACP
- DS1(config-if-range)#switchport mode trunk
- DS1(config-if-range)#switchport trunk allowed vlan 10,20
- DS1(config-if-range)#channel-group 1 mode active
- DS1(config-if-range)#no shutdown
- DS1(config-if-range)#exit
- DS1(config)#interface port-channel 1
- DS1(config)#description etherChannel till DS2
- DS1(config-if)#switchport mode trunk
- DS1(config-if)#switchport trunk allowed vlan 10,20
- DS1(config-if)#no shutdown
- DS1(config-if)#exit
- ! Steg 4 - Trunk-länkar till Access-switchar
- DS1(config)#interface gigabitEthernet 1/0/1
- DS1(config-if)#description Trunk-link to S1
- DS1(config-if)#switchport mode trunk
- DS1(config-if)#switchport trunk allowed vlan 10,20
- DS1(config-if)#no shutdown
- DS1(config-if)#exit
- DS1(config)#interface gigabitEthernet 1/0/2
- DS1(config-if)#description Trunk-link to S2
- DS1(config-if)#switchport mode trunk
- DS1(config-if)#switchport trunk allowed vlan 10,20
- DS1(config-if)#no shutdown
- DS1(config-if)#exit
- ! Steg 5 - HSRP Gateway redundans
- DS1(config)#interface Vlan 10
- DS1(config-if)#ip address 172.8.10.2 255.255.255.0
- DS1(config-if)#standby 10 ip 172.8.10.1
- DS1(config-if)#standby 10 priority 110
- DS1(config-if)#standby 10 preempt
- DS1(config-if)#no shutdown
- DS1(config-if)#exit
- DS1(config)#interface Vlan 20
- DS1(config-if)# ip address 172.9.20.2 255.255.255.0
- DS1(config-if)#standby 20 ip 172.9.20.1
- DS1(config-if)#standby 20 priority 90
- DS1(config-if)#standby 20 preempt
- DS1(config-if)#no shutdown
- DS1(config-if)#exit
- ! Steg 6 - Länk till R1
- DS1(config)#interface gigabitEthernet 1/0/5
- DS1(config-if)#description Routad uplink till R1
- DS1(config-if)#no switchport
- DS1(config-if)#ip address 152.8.26.1 255.255.255.252
- DS1(config-if)#no shutdown
- DS1(config-if)#exit
- ! Steg 7 - Routing med OSPF
- DS1(config)#router ospf 1
- DS1(config-router)#router-id 1.1.1.1
- DS1(config-router)#passive-interface vlan 10
- DS1(config-router)#passive-interface vlan 20
- DS1(config-router)#network 152.8.26.0 0.0.0.3 area 0
- DS1(config-router)#network 172.8.10.0 0.0.0.255 area 0
- DS1(config-router)#network 172.9.20.0 0.0.0.255 area 0
- DS1(config-router)#exit
- DS1(config)#end
- DS1#write memory
- DS1# configure terminal
- ! Steg 8 - HSRP Tracking
- DS1(config)# interface vlan 10
- DS1(config-if)# standby 10 track gigabitEthernet 1/0/5
- DS1(config-if)# exit
- DS1(config)# interface vlan 20
- DS1(config-if)# standby 20 track gigabitEthernet 1/0/5 25
- DS1(config-if)# exit
- DS1(config)#end
- ! Steg 1 - Grundkonfiguration
- DS2(config)#no ip domain-lookup
- DS2(config)#line console 0
- DS2(config-line)#logging synchronous
- DS2(config-line)#exit
- ! Steg 2 - VLAN-konfiguration
- DS2(config)#ip routing
- DS2(config)#vlan 10
- DS2(config-vlan)#name DATA10
- DS2(config-vlan)#exit
- DS2(config)#vlan 20
- DS2(config-vlan)#name DATA20
- DS2(config-vlan)#exit
- DS2(config)#spanning-tree mode rapid-pvst
- DS2(config)#spanning-tree vlan 10 root primary
- DS2(config)#spanning-tree vlan 20 root secondary
- ! Steg 3 - EtherChannel till DS1
- DS2(config)#interface range gigabitEthernet 1/0/3-4
- DS2(config-if-range)#description Trunk-link to DS1 LACP
- DS2(config-if-range)#switchport mode trunk
- DS2(config-if-range)#switchport trunk allowed vlan 10,20
- DS2(config-if-range)#channel-group 1 mode active
- DS2(config-if-range)#no shutdown
- DS2(config-if-range)#exit
- DS2(config)#interface port-channel 1
- DS2(config)#description etherChannel till DS1
- DS2(config-if)#switchport mode trunk
- DS2(config-if)#switchport trunk allowed vlan 10,20
- DS2(config-if)#no shutdown
- DS2(config-if)#exit
- ! Steg 4 - Trunk-länkar till Access-switchar
- DS2(config)#interface gigabitEthernet 1/0/1
- DS2(config-if)#description Trunk-link to S2
- DS2(config-if)#switchport mode trunk
- DS2(config-if)#switchport trunk allowed vlan 10,20
- DS2(config-if)#no shutdown
- DS2(config-if)#exit
- DS2(config)#interface gigabitEthernet 1/0/2
- DS2(config-if)#description Trunk-link to S1
- DS2(config-if)#switchport mode trunk
- DS2(config-if)#switchport trunk allowed vlan 10,20
- DS2(config-if)#no shutdown
- DS2(config-if)#exit
- ! Steg 5 - HSRP Gateway redundans
- DS2(config)#interface Vlan 10
- DS2(config-if)#ip address 172.8.10.3 255.255.255.0
- DS2(config-if)#standby 10 ip 172.8.10.1
- DS2(config-if)#standby 10 priority 90
- DS(config-if)#standby 10 preempt
- DS2(config-if)#no shutdown
- DS2(config-if)#exit
- DS2(config)#interface Vlan 20
- DS2(config-if)# ip address 172.9.20.3 255.255.255.0
- DS2(config-if)#standby 20 ip 172.9.20.1
- DS2(config-if)#standby 20 priority 110
- DS2(config-if)#standby 20 preempt
- DS2(config-if)#no shutdown
- DS2(config-if)#exit
- ! Steg 6 - Länk till R3
- DS2(config)#interface gigabitEthernet 1/0/5
- DS2(config-if)#description Routad uplink till R3
- DS2(config-if)#no switchport
- DS2(config-if)#ip address 152.9.26.1 255.255.255.252
- DS2(config-if)#no shutdown
- DS2(config-if)#exit
- ! Steg 7 - Routing med OSPF
- DS2(config)#router ospf 1
- DS2(config-router)#router-id 2.2.2.2
- DS2(config-router)#passive-interface vlan 10
- DS2(config-router)#passive-interface vlan 20
- DS2(config-router)#network 152.9.26.0 0.0.0.3 area 0
- DS2(config-router)#network 172.8.10.0 0.0.0.255 area 0
- DS2(config-router)#network 172.9.20.0 0.0.0.255 area 0
- DS2(config-router)#exit
- DS2(config)#end
- DS2#write memory
- DS2# configure terminal
- ! Steg 8 - HSRP Tracking
- DS2(config)# interface vlan 10
- DS2(config-if)# standby 10 track gigabitEthernet 1/0/5
- DS2(config-if)# exit
- DS2(config)# interface vlan 20
- DS2(config-if)# standby 20 track gigabitEthernet 1/0/5
- DS2(config-if)# exit
- DS2(config)#end
- Router> enable
- Router# configure terminal
- Router(config)# hostname R1
- R1(config)# no ip domain-lookup
- R1(config)# line console 0
- R1(config-line)# logging synchronous
- R1(config-line)# exit
- R1(config)# interface gigabitEthernet 0/0
- R1(config-if)# description Länk till DS1
- R1(config-if)# ip address 152.8.26.2 255.255.255.252
- R1(config-if)# no shutdown
- R1(config-if)# exit
- R1(config)# interface gigabitEthernet 0/1
- R1(config-if)# description WAN-länk till R2
- R1(config-if)# ip address 10.10.0.1 255.255.255.252
- R1(config-if)# no shutdown
- R1(config-if)# exit
- R1(config)# router ospf 1
- R1(config-router)# router-id 11.11.11.11
- R1(config-router)# network 152.8.26.0 0.0.0.3 area 0
- R1(config-router)# network 10.10.0.0 0.0.0.3 area 0
- R1(config-router)# exit
- R1(config-router)# end
- Router> enable
- Router# configure terminal
- Router(config)# hostname R2
- R2(config)# no ip domain-lookup
- R2(config)# line console 0
- R2(config-line)# logging synchronous
- R2(config-line)# exit
- R2(config)# interface gigabitEthernet 0/0
- R2(config-if)# description WAN-länk till R1
- R2(config-if)# ip address 10.10.0.2 255.255.255.252
- R2(config-if)# no shutdown
- R2(config-if)# exit
- R2(config)# interface gigabitEthernet 0/1
- R2(config-if)# description WAN-länk till R3
- R2(config-if)# ip address 10.20.0.1 255.255.255.252
- R2(config-if)# no shutdown
- R2(config-if)# exit
- R2(config)# interface gigabitEthernet 0/2
- R2(config-if)# description Link to LAN 8
- R2(config-if)# ip address 8.8.8.1 255.255.255.240
- R2(config-if)# no shutdown
- R2(config-if)# exit
- R2(config)# router ospf 1
- R2(config-router)# router-id 22.22.22.22
- R2(config-router)# network 10.10.0.0 0.0.0.3 area 0
- R2(config-router)# network 10.20.0.0 0.0.0.3 area 0
- R2(config-router)# network 8.8.8.0 0.0.0.15 area 0
- R2(config-router)# exit
- R2(config# end
- Router> enable
- Router# configure terminal
- Router(config)# hostname R3
- R3(config)# no ip domain-lookup
- R3(config)# line console 0
- R3(config-line)# logging synchronous
- R3(config-line)# exit
- R3(config)# interface gigabitEthernet 0/0
- R3(config-if)# description Länk till DS2
- R3(config-if)# ip address 152.9.26.2 255.255.255.252
- R3(config-if)# no shutdown
- R3(config-if)# exit
- R3(config)# interface gigabitEthernet 0/1
- R3(config-if)# description WAN-länk till R2
- R3(config-if)# ip address 10.20.0.2 255.255.255.252
- R3(config-if)# no shutdown
- R3(config-if)# exit
- R3(config)# router ospf 1
- R3(config-router)# router-id 33.33.33.33
- R3(config-router)# network 152.9.26.0 0.0.0.3 area 0
- R3(config-router)# network 10.20.0.0 0.0.0.3 area 0
- R3(config-router)# exit
- R3(config)# end