Experiment 1 combining HSRP with STP
Lab 1 HSRPAnd STPIntegration
Topology:
650) This. width = 650; "width =" 554 "Height =" 448 "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/>
Configuration Information
650) This. width = 650; "width =" 118 "Height =" 56 "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/themes/default/images/word.gif") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/>
1. Change the Spanning Tree priority by dividing VLANs
S1 (config) # spanning-tree VLAN 1
S1 (config) # spanning-tree VLAN 1 Root primary
S1 (config) # spanning-tree VLAN 2 root secondary
2. Set link Truck
S1 (config) # interface range F0/4-6
S1 (config-if-range) # switchport trunk encapsulationdot1q
S1 (config-if-range) # switchport mode trunk
3. Change the Spanning Tree priority based on Vlan Division
S2 (config) # spanning-tree VLAN 1 root secondary
S2 (config) # spanning-tree VLAN 2 Root primary
4. Set the link Truck
S2 (config) # In range F0/4-6
S2 (config-if-range) # switchport trunk encapsulationdot1q
S2 (config-if-range) # switchport mode trunk
5. VLAN configuration for L2 Switch trunk
Switch (config) # VLAN 2
Switch (config) # interface range fastethernet 0/4-5
Switch (config-if-range) # switchport mode trunk
6. Set the S1 VLAN address
S1 (config) # interface VLAN 1
S1 (config-If) # IP address 192.168.1.100 255.255.255.0
S1 (config-If) # No Shutdown
S1 (config-If) # exit
S1 (config) # in VLAN 2
S1 (config-If) # IP address 192.168.2.100 255.255.255.0
S1 (config-If) # No Shutdown
7. Set Hot Backup vlan1
S1 (config) # interface VLAN 1
S1 (config-If) # standby 1 ip address 192.168.1.254
S1 (config-If) # standby 1 Priority 200
S1 (config-If) # standby 1 preempt
8. Set Hot Backup vlan2
S1 (config) # interface VLAN 2
S1 (config-If) # standby 2 IP 192.168.2.254
S1 (config-If) # standby 2 priority 195
S1 (config-If) # standby 2 preempt
9. Set S2 VLAN address
S2 (config) # in VLAN 1
S2 (config-If) # IP address 192.168.1.200 255.255.255.0
S2 (config-If) # No Shutdown
S2 (config) # In VL 2
S2 (config-If) # IP address 192.168.2.200 255.255.255.0
S2 (config-If) # No Shutdown
10. Set S2 vlan1 Hot Backup
S2 (config) # interface VLAN 1
S2 (config-If) # standby 1 ip address 192.168.1.254
S2 (config-If) # standby 1 Priority 195
S2 (config-If) # standby 1 preempt
11. Set S2 vlan2 Hot Backup
S2 (config) # interface VLAN 2
S2 (config-If) # standby 2 IP 192.168.2.254
S2 (config-If) # standby 2 priority 200
S2 (config-If) # standby 2 preempt
12. Verification:
650) This. width = 650; "width =" 554 "Height =" 238 "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/>
650) This. width = 650; "width =" 553 "Height =" 276 "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/>
650) This. width = 650; "width =" 554 "Height =" 267 "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/>
650) This. width = 650; "width =" 554 "Height =" 259 "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/>
Experiment 2 HSRP implementation
Topology
650) This. width = 650; "width =" 554 "Height =" 506 "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/>
Configuration Information
650) This. width = 650; "width =" 67 "Height =" 56 "src ="/e/u261/themes/default/images/spacer.gif "style =" Background: URL ("/e/u261/themes/default/images/word.gif") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "/>
1. R1 configuration information
Router> enable
Router # configureterminal
Router (config) # interfacefastethernet 0/0
Router (config-If) # IPaddress 192.168.2.2 255.255.255.0
Router (config-If) # noshutdown
Router (config-If) # exit
Router (config) # interfacefastethernet 0/1
Router (config-If) # IPaddress 192.168.3.254 255.255.255.0
Router (config-If) # noshutdown
Router (config-If) # exit
Router (config) # routerrip
Router (config-router) # version2
Router (config-router) # noauto-Summary
Router (config-router) # version2
Router (config-router) # network192.168.3.0
Router (config-router) # network192.168.2.0
2. R2 configuration information
Router> enable
Router # configureterminal
Router (config) # interfacefastethernet 0/1
Router (config-If) # IPaddress 192.168.1.254 255.255.255.0
Router (config-If) # noshutdown
Router (config-If) # exit
Router (config) # interfacefastethernet 0/0
Router (config-If) # IPaddress 192.168.2.1 255.255.255.0
Router (config-If) # noshutdown
Router (config) # routerrip
Router (config-router) # version2
Router (config-router) # noauto-Summary
Router (config-router) # network192.168.1.0
Router (config-router) # network192.168.2.0
3. Complete R1 Configuration
Router (config) # interface fastethernet 1/0
Router (config-If) # IP address 192.168.4.2 255.255.255.0
Router (config-If) # No Shutdown
Router (config) # router rip
Router (config-router) # Version 2
Router (config-router) # No auto-Summary
Router (config-router) # network 192.168.4.0
Router (config-router) # End
Router # W
4. R4 configuration information
Router (config) # interface fastethernet 0/0
Router (config-If) # IP address 192.168.1.253 255.255.255.0
Router (config-If) # No Shutdown
Router (config) # interface fastethernet 0/1
Router (config-If) # IP address 192.168.4.1 255.255.255.0
Router (config-If) # No Shutdown
Router (config) # router rip
Router (config-router) # Version 2
Router (config-router) # No auto-Summary
Router (config-router) # network 192.168.1.0
Router (config-router) # network 192.168.4.0
Router (config) # router rip
Router (config-router) # Version 2
Router (config-router) # network 192.168.1.0
Router (config-router) # network 192.168.4.0
Router (config-router) # End
Router # W
5. Hot Backup route settings
R4
Router (config) # interface fastethaernet 0/0
Router (config-If) # standby 2 IP address 192.168.1.252
Router (config-If) # standby priority 195
Router (config-If) # exit
Router (config) # End
Router # Show standby brief
R2
Router (config) # In fastethernet 0/1
Router (config-If) # standby 2 IP address 192.168.1.252
Router (config-If) # standby 2 priority 200
Router (config-If) # End
Router # Show standby brief
6. Set port tracking
R2 (config) # interface F0/1
R2 (config-If) # standby 2 track F 0/1 20 Auto Drop 20
7. Set Preemption
R4 (config-If) # standby 2 preempt
Experiment 1 combining HSRP with STP