Skip to content

Virtual Router Redundancy Protocol

June 2, 2011

Well I’ve just got a basic understanding of the VRRP protocol and thought I’d write about it. So here goes!


Virtual Router Redundancy Protocol or VRRP is network layer protocol designed to increase the availability of default gateway in a subnet. This is achieved by advertising the default gateway as a virtual router. VRRP is restricted to one network-it can’t advertise IP routes beyond the subnet or affect routing in anyway.

Why is VRRP needed?

There are several ways in which an end host can determine the first hop router to a particular destination. Few of them are

  1. Running a dynamic routing protocol such as RIP or OSPF
  2. Using an ICMP based discovery protocol
  3. Statically configuring the route

The former two methods have several disadvantages associated with them such as

  1. Processing overhead
  2. Lack of protocol implementation
  3. Neighbour/router discovery would require all hosts to participate leading to longer delays.
  4. If a neighbour dies, it’d lead to very long “black hole” periods.

Statically configuring the route eliminates all of the above disadvantages(except maybe 4) but introduces a major disadvantage in the process-single point of failure. This can be a major catastrophe which end up isolating hosts in a network.

To overcome these difficulties, VRRP was introduced by the IETF. An insight into the working of VRRP would make it clear how it does so.


A few terms that need to be explained before proceeding.

  1. VRRP Router: A physical router participating in VRRP. It may be part of one or more virtual routers.
  2. Virtual Router: An abstract object managed by VRRP, which acts as the default router for hosts in a LAN. It consists of a Virtual Router ID and a set of associated IP address.
  3. IP Address Owner: The physical router that has the virtual IP(associated with a virtual router) as it’s interface address.
  4. Virtual Router Master: The physical router that is responsible for forwarding the packets send to the virtual router’s IP address. If the IP address owner is active, it becomes the master automatically.
  5. Virtual Router Backup: The set of backup routers, one of which will take over if the master fails.

Note: A virtual router must use 00-00-5E-00-01-XX as its (MAC) address. The last byte of the address (XX) is the Virtual Router IDentifier (VRID), which is different for each virtual router in the network. This address is used by only one physical router at a time, and it will reply with this MAC address when an ARP request is sent for the virtual router’s IP address. Physical routers within the virtual router must communicate within themselves using packets with multi-cast IP address and IP protocol number 112.

Election Protocol

The Master router sends out VRRP messages(physical routers communicate over multi-cast packets only) once every advertisement interval. When a multi-cast packet is not received for a period greater than thrice the advertisement interval, the Master is deemed to have gone down. When the master goes down/when the owner of the virtual IP returns, the Master router changes and a new master is decided(in the former case only).

VRRP provides an election protocol, using which the Master is decided. All routers have a configured priority and the router with highest priority is the one that becomes the Master. This priority is configured manually and can be done by taking various into account such as link usage, router performance etc.

Only during the election process do the backup routers transmit packets. Of course, when a backup router finds that it has higher priority than the master router/the virtual IP owner returns, it initiates the process to become the Master router.


Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: