A virtual IP address (VIP) is a shared logical address used by a first-hop redundancy protocol (FHRP) as the default gateway for hosts in a LAN. Hosts keep using the VIP even when the router currently forwarding their traffic fails, so recovery requires no manual gateway reconfiguration. section 19.1.1 section 19.4
R1 fails, but hosts keep the same gateway
Suppose R1 and R2 share VIP 10.0.0.1. R1 normally answers ARP requests for the VIP and forwards traffic. If R1 fails, R2 becomes active, answers for the same VIP and virtual MAC address, and sends gratuitous ARP messages so switches relearn the virtual MAC’s location. Hosts remain unaware of the change. section 19.1.3
A VIP operates through several related mechanisms:
- An FHRP group elects an active router to forward traffic and a standby router ready to take over. section 19.1.2
- The active router replies to ARP for the VIP with a virtual MAC address, which hosts place in their ARP tables. section 19.1.2
- HSRP uses one active router; GLBP can keep one VIP while distributing hosts across multiple active virtual forwarders. section 19.4 section 19.2.3
Basic HSRP configuration
On Cisco routers, configure matching HSRP versions, group numbers, and VIPs. For example, R1 can use 10.0.0.2 with priority 105 and preemption, while R2 uses 10.0.0.3 and the same VIP 10.0.0.1. Use show standby brief to confirm the active, standby, priority, and virtual IP roles.

