Hot Standby Router Protocol – HSRP
Hot Standy Router Protocol or HSRP is similar to Virtual Router Redundancy Protocol (VRRP) or Gateway Load Balancing Protocol (GLBP) and is used to build a virtual gateway for LAN hosts for redundancy purpose. Before discussing How HSRP works and what are its features, it is important to understand the need of gateway redundancy. R1#sh run int f0/0 interface FastEthernet0/0 ip address 10.10.123.11 255.255.255.0 standby 20 ip 10.10.123.1 >> Group number 20, Virtual IP 10.10.123.1 standby 20 timers 1 3 >> Hello/Holdown timers changed to speed convergence standby 20 priority 120 >>> Router with Highest Priority becomes “Active” standby 20 preempt delay minimum 50 >> Delays preemption by 50 seconds standby 20 authentication md5 key-string cisco >>Only authorized routers involve in HSRP election standby 20 track 10 decrement 30 >> To track WAN interface and decrement priority if down. end
‘Preempt’ command is configured to enable a router to take over if the active router has lower priority, as shown in the following commands. This helps lead to a predictable data path through the network.
WAN Interface Tracking can be done in 2 ways:
1.) Directly tracking WAN interface (Serial/ATM/POS):
R2(config-if)# standby 20 track Serial0/0 30 >> Decrements the current priority with value of 30
2.) Tracking using IP SLA (Useful for Ethernet Interfaces) :
Below is Output from Gateway Router R1. Interface F0/1 is tracked using an IP SLA and Track commands.
ip sla 1 icmp-echo 10.10.17.7 source-ip 10.10.17.1 frequency 5 ip sla schedule 1 life forever start-time now
track 10 rtr 1 reachability
R1#show standby FastEthernet0/0 – Group 20
State is Active
2 state changes, last state change 01:18:29 Virtual IP address is 10.10.123.1 Active virtual MAC address is 0000.0c07.ac14 Local virtual MAC address is 0000.0c07.ac14 (v1 default) Hello time 1 sec, hold time 3 sec Next hello sent in 0.456 secs Authentication MD5, key-string “cisco” Preemption enabled, delay min 50 secs Active router is local Standby router is 10.10.123.12, priority 110 (expires in 2.852 sec) Priority 120 (configured 120) Track object 10 state Up decrement 30
Group name is “hsrp-Fa0/0-20” (default)
R2#show standby FastEthernet0/0 – Group 20
State is Standby
6 state changes, last state change 01:10:05 Virtual IP address is 10.10.123.1 Active virtual MAC address is 0000.0c07.ac14 Local virtual MAC address is 0000.0c07.ac14 (v1 default) Hello time 1 sec, hold time 3 sec Next hello sent in 0.480 secs Authentication MD5, key-string “cisco” Preemption enabled, delay min 50 secs Active router is 10.10.123.11, priority 120 (expires in 2.160 sec) Standby router is local Priority 110 (configured 110) Track interface Serial0/0 state Up decrement 30
Group name is “hsrp-Fa0/0-20” (default)
R3#show standby FastEthernet0/0 – Group 20
State is Listen
2 state changes, last state change 01:10:25 Virtual IP address is 10.10.123.1 Active virtual MAC address is 0000.0c07.ac14 Local virtual MAC address is 0000.0c07.ac14 (v1 default) Hello time 1 sec, hold time 3 sec Authentication MD5, key-string “cisco” Preemption enabled, delay min 50 secs Active router is 10.10.123.11, priority 120 (expires in 2.404 sec) Standby router is 10.10.123.12, priority 110 (expires in 2.800 sec) Priority 100 (default 100) Track interface Serial0/0 state Up decrement 30
Group name is “hsrp-Fa0/0-20” (default)
R3#show standby brief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Fa0/0 20 100 P Listen 10.10.123.11 10.10.123.12 10.10.123.1
Output from Switch:
Switch#show mac vlan 1 | i 0000.0c07.ac14 >> HSRP Virtual MAC
0000.0c07.ac14 Dynamic 1 FastEthernet1/2 >> Only R1 (active) replies to ARP Queries.
Output from Host4. See the HSRP MAC address learned for the Virtual IP 10.10.123.1.
Host4#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet 10.10.123.1 0 0000.0c07.ac14 ARPA FastEthernet0/0 Internet 10.10.123.4 – ca04.16b0.0000 ARPA FastEthernet0/0
If you understood the concept and liked this article, kindly share it with your friends.
