
Configure Hot Standby Switch Convention, HSRP, could be a Cisco restrictive convention to create numerous switches or switches show up as one door. The gateway is where the repetition is given. For each repetitive door, there’s a common HSRP gather. One router/switch gets to be the essential HSRP switch and another is selected as the standby HSRP switch. Any other gadgets portion of the gather are within the tune in HSRP state. At a 3 moment interim, switches send HSRP hi messages to ended up mindful in the event that the other is up or down (between Dynamic and Standby). The hold time esteem is 10 seconds or three times the hi clock. These hi messages are sent to the multicast address 224.0.0.2 utilizing UDP harbour 1985.
There can be up to 255 HSRP groups and they are only locally significant.
Decision of an active and standby HSRP switch is based on a need esteem of through 255. By default, the need is 100 but the most elevated need esteem gets to be the dynamic switch for the HSRP bunch. On the off chance that there’s a tie, the switch with the most noteworthy IP address gets to be the dynamic switch.
Configuration
We will utilize R1 and R2 as the two switches to supply a excess portal for 192.168.1.1. Starting at R1, we’ll arrange the HSRP group of 1 to utilize the door address, 192.168.1.1. As you’ll be able see, from the have we cannot ping that address at the minute.
HostA#ping 192.168.1.1 R1(config-if)#standby 1 ip 192.168.1.1
Once this command is designed, the HSRP prepare is begun. The switch will start an race prepare to ended up the dynamic switch for HSRP gather 1.
If we needed this specific switch to continuously take over as an Dynamic switch we got to tell it to preempt. In case this switch was the Standby and the Dynamic fizzled, the Standby switch would take over as the Dynamic. On the off chance that this switch was once the Dynamic switch and it came back online, it would preempt the current Dynamic switch. This would as it were happen in case the needs were set up correctly.
The preempt command with the reload delay 120 tells the switch to delay it from preempting the Active switch until 120 seconds has passed. This is often supportive to permit the steering handle to meet.
Underneath could be a debug of the HSRP prepare. You’ll be able see the switch start by sending out Hi messages for the IP address 192.168.1.1. When no other switch reacts back, the switch at that point moves into Standby and from Standby into Active. Now we design R2 to be portion of the same bunch but we are going take off it with its default need of 100. Since of this default need, R1 will continuously gotten to be the Dynamic switch.
R2(config-if)#int g2/0
Authentication
Authentication can be configured on the HSRP group to prevent any unauthorized routers from becoming Active. While it is possible to configure a plaintext password, the example below uses MD5 authentication.
R1(config-if)#standby 1 authentication md5 key-string Cisco
Configure the same command on all routers participating in the same group.
Track Interfaces
What were to happen on the lose chance that R1 were to lose network to its upstream portal? By default, the HSRP gather would still be up in this way replying as the portal for it’s has. Typically not perfect. In this case, we need the switch to concede on the off chance that it misplaced network upstream. We will lower the need of the Dynamic switch to a esteem underneath the Standby’s. When the Standby sees it’s need is presently the most noteworthy and it has preempt empowered, it’ll ended up the Dynamic switch for the HSRP group.
We perform this with Interface Tracking. When following an interface, it’ll decrement the HSRP need of the router by 10. Usually the default decrement esteem. Inside the HSRP group, we tell it which interface to track and on the off chance that you want to decrement a esteem diverse from the default, fair include it to the conclusion. In this illustration, I made a loopback interface on R1 for HSRP bunch 1 to track. In the event that the loopback interface is inaccessible or the status goes down, at that point I will decrement R1’s need from 115 to 95 (20 decrement values):