HSPR (Hot STANDBY ROUTING PROTOCOL)-Dual-machine thermal standby protocol. He is a proprietary technology of the Cisco platform and is the private protocol of Cisco.
In layman's terms, a local area network has two routing devices connected to the extranet, one as a host and a backup. Normally the primary (active) router works. When the primary router fails, the backup (standby) router boots according to the HSPR protocol, ensuring network connectivity. When the primary router resumes functioning, the primary router starts to work, and the backup router still acts as a backup.
Principle; Running the protocol between multiple gateways in a network segment can form a virtual gateway. At the end of the network segment, the gateway IP address is set to the IP address of the virtual gateway when the network card is configured. Multiple real gateways serve as virtual gateways, which enables redundancy and network stability of the gateway. At the same time, data load balancing can also be achieved.
The following is a small experiment to see how to configure the command:
650) this.width=650; "Src=" Https://s5.51cto.com/oss/201711/15/7eeb601e1264e24fa3d6868ef3220d0f.png-wh_500x0-wm_3 -wmp_4-s_3420100882.png "title=" 2017-11-15 20-33-51 screen. png "alt=" 7eeb601e1264e24fa3d6868ef3220d0f.png-wh_ "/>
Experimental Purpose:
When a SW1 or SW2 fault occurs, ensure that 4 VLANs can still be connected to the extranet. The terminal belongs to different Valn, and the virtual gateway is set to 192.168.x.250.
Experimental ideas:
SW1 as the primary router for VLAN10 VLAN20, SW2 as a backup. SW2 as the primary router for VLAN30 VLAN40, SW1 as a standby
Report
Experimental steps;
1 Configure the terminal card IP address, the virtual gateway is:
PC4:192.168.10.1/24 GATE way:192.168.10.250
PC5:192.168.20.1/24 GATE way:192.168.20.250
PC6:192.168.30.1/24 GATE way:192.168.30.250
PC7:192.168.40.1/24 GATE way:192.168.40.250
2-to-two-layer switch configuration, which writes the port into the corresponding VLAN, respectively
SW (config) #interface F0/1//Enter Port F0/1
SW (CONFIG-IF) #no shut//Open port
SW (CONFIG-IF) #switchport access VLAN 10//Add port to VLAN 10
Use the same command to add F0/2 F0/3 F0/4 to VLAN20 VLAN30 VLAN40
3 Configuring the SW1
Establishment of VLAN10 VLAN20 VLAN30 VLAN40
SW1 (config) #interface vlan 10//Enter VLAN 10
SW1 (config-if) #ino shut//Open port
SW1 (config-if) #ip address 192.168.10.254 255.255.255.0//Configure VLAN10 Real Gateway in SW1
SW1 (config-if) #standby 2 IP 192.168.10.250//configure VALN10 Virtual gateways
SW1 (CONFIG-IF) #standby 2 priority 105//Set VALN10 to 105
SW1 (config-if) #standby 2 preempt//Turn on VLAN10 preemption
SW1 (config) #interface vlan 20//into VLAN 20
SW1 (config-if) #ino shut//Open port
SW1 (config-if) #ip address 192.168.20.254 255.255.255.0//Configure VLAN20 Real Gateway in SW1
SW1 (config-if) #standby 2 IP 192.168.20.250//configure VALN10 Virtual gateways
SW1 (CONFIG-IF) #standby 2 priority 105//Set VALN10 to 105
SW1 (config-if) #standby 2 preempt//Turn on VLAN20 preemption
SW1 (config) #interface VLAN 30//Enter VLAN 30
SW1 (config-if) #ino shut//Open port
SW1 (config-if) #ip address 192.168.30.254 255.255.255.0//config VLAN30 real web in SW1
SW1 (config-if) #standby 2 IP 192.168.30.250//configure VALN30 Virtual gateways
SW1 (config) #interface VLAN 40//Enter VLAN 40
SW1 (config-if) #ino shut//Open port
SW1 (config-if) #ip address 192.168.40.254 255.255.255.0//config VLAN40 real web in SW1
SW1 (config-if) #standby 2 IP 192.168.40.250//configure VALN40 Virtual gateways
4 corresponding configuration in SW2
Establishment of VLAN10 VLAN20 VLAN30 VLAN40
-------> enter VLAN10 to configure the real gateway, virtual Gateway, do not configure VLAN10 priority, do not turn on preemption function (command as above)
-------> enter VLAN20 to configure the real gateway, virtual Gateway, do not configure VLAN20 priority, do not turn on preemption function (command as above)
--------> enter VLAN30 to configure the real gateway, virtual Gateway, configure VLAN30 priority, turn on preemption function (command as above)
--------> enter VLAN40 to configure the real gateway, virtual Gateway, configure VLAN40 priority, turn on preemption function (command as above)
To complete this configuration, compare it with a table:
|
SW1 Priority level
|
SW2 Priority level
|
SW1 preemption function
|
SW1 preemption function |
VALN10
|
105
|
100 (default value)
|
Open
|
Not open.
|
VLAN20
|
105
|
100 (default value) |
Open |
Not open. |
VLAN30
|
100 (default value) |
105
|
Not open. |
Open |
VLAN40
|
100 (default value) |
105
|
Not open. |
Open |
★ Summary:
Through the above experiment we can see:
1 when SW1 and SW2 are running normally, the VALN10 VLAN20 data is sw1,vlan30 VLAN40 data is SW2, implemented by priority settings, and load balancing is achieved.
2 when SW1 fails, all VLANs are implemented through SW2 because two of the real gateways are service to the virtual gateway.
When SW1 is restored, the VLAN10 VLAN20 data is re-SW1, which is achieved by setting the preemption function.
3 when SW2 fails, all VLANs are implemented through SW1 because two of the real gateways are service to the virtual gateway.
When the SW2 is restored, the VALN30VLAN40 data is re-SW2, which is achieved by setting the preemption function.
Verification command: sw1# show standby or S w2# show standby
With this command we can see whether each VLAN state is active or Standy.
This article from "13440962" blog, declined reprint!
CISCO HSRP protocol + related experiments