Technology: Routing
Area: NHRP
Vendor: Cisco
Software: 10.0, 10.2-3, 11.0-3, 12.0, 12.0T, 12.1, 12.1T
Platform: Catalyst platforms, Routing platforms
The Hot Standby Routing Protocol is a proprietary protocol from Cisco. It is a routing protocol that provides backup to a router in the event of link or hardware failure. Using HSRP, several routers are connected to the same segment of an Ethernet, FDDI or token-ring network and work together to present the appearance of a single virtual router on the LAN. The routers share the same IP and MAC addresses, therefore in the event of failure of one router, the hosts on the LAN are able to continue forwarding packets to a consistent IP and MAC address. The process of transferring the routing responsibilities from one device to another is transparent to the user. This technology is very useful in High-Availability network infrastructures.
Before router will become an active it has to go through several HSRP states:
To configure router 1 as active HSRP router follow commands bellow:
R1(config)# interface GigabitEthernet 0/1
R1(config-if)# ip address 10.1.1.2 255.255.255.0
R1(config-if)# standby 1 ip 10.1.1.100
R1(config-if)# standby 1 priority 105
R1(config-if)# standby 1 preempt delay minimum 10
To configure also router 2 as a standby HSRP router:
R2(config)# interface GigabitEthernet 0/1
R2(config-if)# ip address 10.1.1.3 255.255.255.0
R2(config-if)# standby 1 ip 10.1.1.100
R2(config-if)# standby 1 priority 120
R2(config-if)# standby 1 preempt delay minimum 10
Router with the the highest priority become the Active Router immediately. Priority is determined first by the value that is configured at the interface, and then by highest interface IP address. Default priority is set to 100. Changing standby priority will not take any results as long as preempt is not enabled.
To allow router advertise its routing table in the network, the preempt delay function comes in handy. Preempt delay feature delays preemption for a configurable period of time. This feature is disabled by default.
Version 1 provides:
Version 2 provides:
Other features for v1 and v2:
One HSRP instance can only have 1 active and 1 standby routers. Every next configured router in this group will be participating in election but officially will never be a standby router. It will hang around and listen HSRP messages as long as it will not be needed. Change of router state from listen to standby will be preformed only if previous standby router will change its own status, e.g. from standby to active or its link goes down.
To configure router 3 as a “backup standby” HSRP router:
R3(config)# interface GigabitEthernet 0/1
R3(config-if)# ip address 10.1.1.4 255.255.255.0
R3(config-if)# standby 1 ip 10.1.1.100
R3(config-if)# standby 1 priority 101
R3(config-if)# standby 1 preempt delay minimum 10
Notice that R3’s HSRP priority is set lower than R1’s and R2’s. Otherwise, when preempt is enabled, it could make change in standby/active routers what is not desired in production network.
Check also how to configure GLBP on Cisco IOS.
Check also how to configure VRRP on Cisco IOS.