HSRP stands for Hot Standby Router Protocol, its a first-hop redundancy protocol that allows a transparent failover of the first-hop IP router. HSRP provides first-hop routing redundancy for IP hosts on Ethernet networks configured with a default router IP address. HSRP is used in a group of routers for selecting an active router and a standby router.

When using HSRP, routers can either be primary or standby. If the primary router doesn’t send out the HELLO packet to the standby router for a period of time, the standby router assumes the primary router is down and thus takes over. The standby router then assumes responsibility for the virtual IP address and begins responding to the virtual Ethernet MAC address to which the virtual IP address is pointing.

Considering an example of Cisco 2921 routers, following configurations can be done to enable HSRP between two routers.

hsrp cisco

Configuration

We will accomplish almost all HSRP configurations in the router’s Interface Configuration Mode using the standby command.

For Router 1:

  1. Configure the IP address on the Ethernet interface.
  2. Configure the standby IP address.
  3. Configure standby preempt. (With preempt, Router 1 will always be the primary router as long as it’s available.)

For Router 2:

  1. Configure the IP address on the Ethernet interface.
  2. Configure the standby IP address.
  3. Configure standby priority to be less than 100. (In this case, it’s 99.)

During normal operation, the two routers share the IP traffic load. When either router becomes unavailable, the other router becomes active and assumes the packet-transfer functions of the router that is unavailable. The standby preempt interface configuration command is necessary so that if a router goes down and then comes back up, preemption occurs and restores load sharing.

Router 1

  • Router1(config)interface VLAN X
  • Router1(config-if)ip address {ip address} (Subnet Mask}
  • Router1(config-if)no ip redirects
  • Router1(config-if)standby 1 ip {ip address virtual 1}
  • Router1(config-if)standby 1 priority 110
  • Router1(config-if)standby 1 preempt
  • Router1(config-if) standby 2 ip {ip address virtual 2}
  • Router1(config-if)standby 2 preempt

Router 2  

  • Router2(config)interface VLAN X
  • Router2(config-if)ip address {ip address} (Subnet Mask}
  • Router2(config-if)no ip redirects
  • Router2(config-if)standby 1 ip {ip address virtual 1}
  • Router2(config-if)standby 1 preempt
  • Router1(config-if) standby 2 ip {ip address virtual 2}
  • Router1(config-if)standby 2 priority 110
  • Router1(config-if)standby 2 preempt

Note: The ‘preempt’ delay value would be configured based on actual time the router takes to complete the POST and brings the associated interfaces in UP state.

 

1 COMMENT

LEAVE A REPLY