Surfing some networking papers led my eyes to be dropped on a question about HSRP, and how does it work, so I made a small brief about the HSRP with very simple example.
Hot Standby Router Protocol (HSRP) is a redundancy protocol for establishing fault-tolerant default-gateway(s) and it is developed by Cisco.
HSRP ensures that only a single router (called the active router) is forwarding packets on behalf of the virtual router at any given time.
A standby router is chosen to be ready to become the active router; in the event that the current active router fails. HSRP defines a mechanism used to determine active and standby routers by referring to their IP addresses. Once these are determined, the failure of an active router will not cause any significant interruption of connectivity.
On any given LAN, there may be multiple, possibly overlapping, hot standby groups, each with a single Media Access Control (MAC) address and IP address; the IP address should belong to the primary subnet, but must be different from any actual or virtual addresses allocated to any routers or hosts on the network.
Note: HSRP is not a routing protocol; it doesn’t advertise IPs or affect the routing table anyway.
Example:
Â
HSRP1 |
! interface Ethernet1/0 ip address 192.168.1.3 255.255.255.0 standby track Ethernet1/1 standby 1 ip 192.168.1.1 standby 1 priority 110 standby 1 preempt ! |
HSRP2 |
! interface Ethernet1/0 ip address 192.168.1.2 255.255.255.0 standby 1 ip 192.168.1.1 standby 1 priority 105 standby 1 track Ethernet1/1 ! |
– From the above configuration, it shows that we configured both routers to be in the same HSRP group (1), with the same virtual IP (192.168.1.1), also we configured HSRP1 to be the main by forcing the priority to be 110 which is greater than 105 in HSRP2 (default priority is 100).
– If the HSRP1 router goes down or unreachable for any reason, the HSRP2 will be the default gateway and will change its mode from Standby to Active.
*** Someone would ask, what will happen if HSRP1 became up or reachable again?***
– We configured the HSRP to take the lead whenever it becomes up by using the word (preempt).
***What is the tracking command used for?***
– We could configure the routers to track any local interface, if the interface goes down so the priority of the router will decrease by default (10).
HSRP1#show standby Ethernet1/0 – Group 1 State is Active 1 state change, last state change 00:21:49 Virtual IP address is 192.168.1.1 Active virtual MAC address is 0000.0c07.ac01 Local virtual MAC address is 0000.0c07.ac01 (v1 default) Hello time 3 sec, hold time 10 sec Next hello sent in 1.784 secs Preemption enabled Active router is local Standby router is 192.168.1.2, priority 105 (expires in 9.908 sec) Priority 110 (configured 110) IP redundancy name is “hsrp-Et1/0-1” (default) |
Â
HSRP2#show standby Ethernet1/0 – Group 1 State is Standby 4 state changes, last state change 00:14:07 Virtual IP address is 192.168.1.1 Active virtual MAC address is 0000.0c07.ac01 Local virtual MAC address is 0000.0c07.ac01 (v1 default) Hello time 3 sec, hold time 10 sec Next hello sent in 1.276 secs Preemption disabled Active router is 192.168.1.3, priority 110 (expires in 7.156 sec) Standby router is local Priority 105 (configured 105) Track interface Ethernet1/1 state Up decrement 10 IP redundancy name is “hsrp-Et1/0-1” (default) |
Â
Hope You Find This Useful !!