First-hop redundancy addresses a fundamental vulnerability in local networks: clients are typically configured with a single default gateway IP address. If that physical router fails, all clients on that subnet lose connectivity outside their VLAN.
The Gateway Redundancy Concept
To solve this, multiple physical routers collaborate to share a Virtual Gateway IP address and a virtual MAC address. The clients are configured to use this Virtual IP as their gateway.
- Active / Master Router: Actively responds to traffic sent to the virtual IP.
- Standby / Backup Router: Listens for keepalives from the Master. If the Master fails, the Backup assumes the virtual IP and takes over routing seamlessly.
Generic Example
- Client VLAN: 192.168.10.0/24
- Router A (Physical IP): 192.168.10.2
- Router B (Physical IP): 192.168.10.3
- Virtual Gateway IP (Client Config): 192.168.10.1
VRRP vs. HSRP
There are two primary protocols used for this:
- VRRP (Virtual Router Redundancy Protocol): An open, standards-based protocol supported by nearly all enterprise networking vendors.
- HSRP (Hot Standby Router Protocol): A historically proprietary protocol developed by Cisco, though deeply entrenched in Cisco environments.
Advanced Mechanics
Behavior is managed through a priority value; the router with the highest priority becomes active. A feature called preemption dictates whether a higher-priority router automatically takes back control if it recovers from a failure. Finally, tracking allows a router to decrement its priority if its upstream WAN link fails, forcing a failover even if the local LAN interface remains online.