FHRP Protocols

VRRP - Virtual Router Redundancy Protocol

VRRP topology

VRRP — Virtual Router Redundancy Protocol


  • Open standard
  • Supports only IPv4
  • Layer 3 protocol
  • Uses IP protocol number 112
  • Uses multicast address 224.0.0.18
  • Uses virtual MAC address 0000:5e00:01**
  • By default, preemption is enabled
  • Group number: 0–255
  • Authentication is available only in clear-text form
  • Tracking can be used for uplink failures

Version

  • Version 2 (default for IPv4)
  • Version 3 (default for IPv6)

Timers

  • Advertisement interval: 1 second
  • Hold time: 3 seconds

Router Roles

  • Master
  • Backup

Priority

  • Default priority is 100
  • Priority range: 0–255
  • Priority will be 255 if the virtual IP and physical IP are the same
  • VRRP allows a router to use its own physical IP address as the virtual IP
Note: HSRP and GLBP do not allow a router to use its own physical IP address as the virtual IP.

VRRP Concept

  • By using preemption, a router with the highest priority can take over the role of the Master router.
  • By default, preemption is enabled in VRRP.
  • Users can track uplink failures and decrease the router's priority so that forwarding can be handled by another router.
  • When the Master router sends a Hello message, it uses the Virtual MAC address as the source MAC address.
  • If the Master router does not send a Hello message, the Backup router waits for 3 seconds and then takes over the Master role.
  • When a Backup router becomes the Master, it generates a Gratuitous ARP. It uses the Virtual IP as the source and destination IP, and the Virtual MAC as the source MAC, with the broadcast MAC as the destination MAC.

This allows the switch ports to learn the Virtual MAC on the new port, and all forwarding will be done through the new port (facing the new active gateway).

  • If more than two routers participate in a single VRRP group, one will become the Master, and the rest will remain in the Backup state.
  • Only the Master router sends VRRP advertisements every 1 second. The Backup router waits for the Master hold timer to expire.
  • If the Master router goes down intentionally (by shutting down the interface or removing the VRRP configuration), it sends a final VRRP packet with priority 0. Within a second, the Backup router takes over the role of the Master router.
VRRP topology

Enable VRRP for IPv4

IPv4 IOS IPv4 IOS-XR
interface FastEthernet0/0
 ip address 10.0.0.1 255.0.0.0
 vrrp 10 ip 10.0.0.100
 vrrp 10 priority 120
router vrrp
 interface g0/0/0/0
  address-family ipv4
   vrrp 10
    address 10.0.0.100
    priority 110
VRRP topology

Enable VRRP for IPv6 (IOS-XR)

IPv6 IOS-XR
router vrrp
 interface g0/0/0/0
  address-family ipv6
   vrrp 10
    address global 1::100
    address linklocal autoconfig
    preempt delay 10
    priority 110
VRRP topology

Enable Authentication (clear text)

IPv4 IOS-XR
router vrrp
 interface g0/0/0/0
  address-family ipv4
   vrrp 10 version 2
    address 10.0.0.100
    text-authentication CNC
VRRP topology

Enable Track with IP-SLA

IPv4 IOS
ip sla 1
 icmp-echo 8.8.8.8 source-interface f1/0
 frequency 5
 exit
ip sla schedule 1 start-time now life forever
track 1 ip sla 1 reachability
 exit
interface FastEthernet0/0
 ip address 10.0.0.1 255.0.0.0
 vrrp 10 ip 10.0.0.100
 vrrp 10 priority 120
 vrrp 10 track 1 decrement 30
 exit

Enable Track with Uplink

IPv4 IOS-XR
router vrrp
 interface g0/0/0/0
  address-family ipv4
   vrrp 10 version 2
    address 10.0.0.100
    track interface g0/0/0/1 10

Preempt Delay

Preempt delay is used to instruct the device to take over the Master role after a fixed period of time.

IPv4 IOS-XR
router vrrp
 interface g0/0/0/0
  address-family ipv4
   vrrp 10 version 2
    address 10.0.0.100
    preempt delay 10

If the Master router goes down intentionally (by shutting down the interface or removing the VRRP configuration), it sends a final VRRP packet with priority 0. Within a second, the Backup router takes over the role of the Master router.

VRRP topology
image
image
image
image