Virtual Router Redundancy Protocol
Virtual Router Redundancy Protocol (VRRP) allows for a transparent failover at the first-hop IP router by configuring a group of routers (a VRRP group) to share a single virtual IP address. VRRP selects an allowed router in that group to handle all packets for the virtual IP address. The remaining routers are in standby mode and take over if the allowed router fails. In a VRRP setup, the LAN clients are configured with the virtual IP address as their default gateway.
Figure 3-7 shows a basic VLAN topology. In this example, Routers A, B, and C form a VRRP group. The IP address of the group is the same address that was configured for the Ethernet interface of Router A (10.0.0.1).
Figure 3-7 Basic VRRP Topology
Because the virtual IP address uses the IP address of the physical Ethernet interface of Router A, Router A is the primary router (also known as the IP address owner). As the primary, Router A owns the virtual IP address of the VRRP group and forwards packets sent to this IP address. Clients 1 through 3 are configured with the default gateway IP address of 10.0.0.1. Routers B and C function as backups. If the primary fails, the backup router with the highest priority becomes the primary and takes over the virtual IP address to provide uninterrupted service for the LAN hosts. When Router A recovers, it becomes the primary again.
The VRRP primary sends VRRP advertisements to other VRRP routers in the same group. The advertisements communicate the priority and state of the primary. Cisco NX-OS encapsulates the VRRP advertisements in IP packets and sends them to the IP multicast address 224.0.0.18, assigned to the VRRP group. Cisco NX-OS sends the advertisements once every second, by default, but you can configure a different advertisement interval.
VRRP Tracking
VRRP supports the following options for tracking:
- Native interface tracking: Tracks the state of an interface and uses that state to determine the priority of the VRRP router in a VRRP group. The tracked state is down if the interface is down or if the interface does not have a primary IP address.
- Object tracking: Tracks the state of a configured object and uses that state to determine the priority of the VRRP router in a VRRP group. The tracked object can be an interface IP routing state or IP route reachability.
If the tracked state (interface or object) goes down, VRRP updates the priority based on what you have configured the new priority to be for the tracked state. When the tracked state comes up, VRRP restores the original priority for the virtual router group. For example, you might want to lower the priority of a VRRP group member if its uplink to the network goes down so that another group member can take over as primary for the VRRP group.