The Virtual Router Redundancy Protocol (VRRP) is a network protocol that provides automatic assignment of available Internet Protocol (IP) routers to participating hosts. This protocol increases the availability of routing paths via automatic assignment to available routers, enhancing network reliability and redundancy. VRRP is standardized by the Internet Engineering Task Force (IETF) in RFC 5798.

Overview of Virtual Router Redundancy Protocol
VRRP enables multiple routers (physical or virtual) to participate in a virtual router configuration that acts as a backup group. The protocol facilitates the creation of a virtual router, which is an abstract representation rather than a physical device. This virtual router has a virtual IP address that is shared among the routers in the group. One of these routers is elected as the Master, and the others serve as Backups.
Key Features and Operation
- Master and Backup Routers:
- Master Router: The router that currently forwards packets sent to the virtual router’s IP address. It is responsible for responding to ARP requests for the virtual IP address. The Master is selected based on a priority setting in each router; the router with the highest priority becomes the Master. If priorities are equal, the router with the highest IP address is chosen.
- Backup Routers: These routers remain idle for the virtual IP address unless the Master becomes unavailable. They monitor the status of the Master through VRRP advertisements.
- VRRP Advertisements:
- VRRP routers send advertisements at regular intervals to a multicast address. These advertisements are used by the Backup routers to monitor the status of the Master.
- Virtual IP Address:
- One or more virtual IP addresses are associated with a virtual router. Hosts on the LAN configure this virtual IP as their default gateway.
- Priority and Preemption:
- Each router in the VRRP group has a priority (1 to 255, where 255 is the highest). The Master can be preempted if another router with a higher priority becomes available. Preemption can be disabled to allow the current Master to continue unless it fails.
- Timers and Intervals:
- The protocol defines timers that control the advertisement interval (default is 1 second) and the master down interval, which is the time Backup routers wait after not hearing from the Master before one of them takes over.
Example Scenario Using VRRP
Consider a network with three routers, Router A, Router B, and Router C, connected to the same LAN segment. These routers are configured to participate in a VRRP setup with the virtual IP address 192.168.1.1.
- Configuration:
- Router A is set with priority 100.
- Router B is set with priority 120.
- Router C is set with priority 110.
- VRRP is configured with preemption enabled.
- Operation:
- Router B, having the highest priority, becomes the Master router.
- Routers A and C act as Backups and regularly listen for VRRP advertisements from Router B.
- Failover Process:
- If Router B fails (goes offline), Router C, with the next highest priority, will detect the absence of advertisements from Router B and will take over as the Master.
- Router C will then begin to forward packets destined for the virtual router’s IP address and respond to ARP requests for it.
This configuration ensures that if the Master router fails, another router immediately takes over, providing seamless network service without manual intervention. VRRP is commonly used in environments where network availability is crucial and downtime needs to be minimized, such as in enterprise networks and data centres.
Summary
Virtual Router Redundancy Protocol (VRRP) is a network protocol used to increase the availability of routers on a local network by automatically assigning routers to act as backups to each other. It allows several routers to form a single virtual router, ensuring that if the primary router fails, the backup router seamlessly takes over the IP responsibilities with minimal service interruption.
VRRP works by electing a master router based on priority (or IP address if priorities are equal) to handle all traffic for a virtual IP address. Backup routers monitor the master through regular advertisement messages and are ready to assume the role of master if the current master fails. This protocol enhances the reliability and redundancy of network gateways, making it essential for environments where network uptime is critical.
Useful Links
https://sanchitgurukul.com/tutorials-cat
