A first hop redundancy protocol (FHRP) lets multiple routers provide one resilient default gateway for hosts in a LAN. The shared virtual IP address (VIP) hides router failures from end hosts and minimizes downtime. section 19.0 section 19.1
Hosts use the VIP as their default gateway and learn its virtual MAC address through ARP. Routers exchange multicast hello messages to establish neighbor relationships, elect forwarding roles, and detect failures. section 19.1.1 section 19.1.2
The common FHRP behaviors are:
- The active router forwards traffic for the LAN, while the standby router waits to take over. section 19.1.2
- After failover, the new active router keeps the VIP and virtual MAC, then sends gratuitous ARP messages to update switch tables. section 19.4
- HSRP and VRRP balance by subnet; GLBP can balance hosts within one subnet by assigning different virtual MAC addresses. section 19.2 section 19.2.3
Basic HSRPv2 configuration
R1(config-if)# standby version 2 R1(config-if)# standby 1 ip 10.0.0.1 R1(config-if)# standby 1 priority 105 R1(config-if)# standby 1 preempt R2(config-if)# standby version 2 R2(config-if)# standby 1 ip 10.0.0.1 Both routers have unique physical addresses but share VIP 10.0.0.1. R1 becomes active because its priority is higher; R2 remains standby and can take over if R1 fails. The show standby brief command verifies the roles. section 19.3
Figure 19.3 R1 and R2 communicate with multicast hello messages to establish and maintain their FHRP neighbor relationship. R1 becomes the active router, and R2, the standby. When a host sends an ARP request to the VIP, R1 will reply with the virtual MAC address, allowing the host to create an appropriate ARP table entry. Switches will also learn the virtual MAC address on the appropriate port.
Visualizes multicast hello messages, active and standby election, ARP resolution to the virtual MAC, and switch MAC learning. section 19.1.2
