Configure VRRP in Cisco IOS Router

VRRP or Virtual Router Redundancy Protocol is the open standard version of Cisco’s HSRP. It is also used to provide redundancy of a gateway by using multiple routers, but since it’s an open standard then it can be implemented using routers from vendors other than Cisco. Most of VRRP logic are very similar to HSRP, and the way to Configure VRRP in Cisco IOS Router itself is almost the same.

Configure VRRP in Cisco IOS Router

In VRRP, the active router is called the master, and the standby router is called backup. This example will show how the VRRP configuration in Cisco CLI looks like, using the topology as specified below:

Configure VRRP in Cisco IOS Router

Configuration on R1 (master)

R1(config)#interface f0/0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#vrrp 123 ip 10.1.1.100
R1(config-if)#vrrp 123 preempt

Configuration on R2 (backup)

R2(config)#interface f0/0
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#vrrp 123 ip 10.1.1.100
R2(config-if)#vrpp 123 priority 90

Similar to HSRP example in the previous article, we’re using VRRP group number 123 and virtual IP is 10.1.1.100. And just like before, R2 has given lower priority (default VRRP priority is 100) so it becomes the backup, and will be the master if failure happens on R1. We also enable preemption on R1 so it will reclaim its role as the master when it is restored from a failure.

To verify VRRP status on each router we can use command show vrrp brief. The output is very straightforward, if you can understand how to read HSRP status, then you should have no problem understanding VRRP status. Everything is pretty much the same.

VRRP status on R1

R1#show vrrp brief
Interface          Grp Pri Time  Own Pre State   Master addr     Group addr
Fa0/0              123 100 3609      Y   Master  10.1.1.1        10.1.1.100

VRRP status on R2

R2#show vrrp brief
Interface          Grp Pri Time  Own Pre State   Master addr     Group addr
Fa0/0              123 90  3648      Y   Backup  10.1.1.1        10.1.1.100

Working in Mixed-Vendor Environment

VRRP is very useful in a mixed-vendor environment. We can configure VRRP in Cisco router to work with routers from other vendor in providing gateway redundancy. When we do, it is important to use the same timer values in all VRRP routers. Otherwise, they will not talk to each other and set themselves as the master, causing conflict in the network.

The timer that we refer here is the advertisement packet interval. By default, VRRP master sends a packet advertisement to its backup, indicating that it is still alive. Default interval on Cisco router is 1 second.

When using Cisco router as the master, we can modify the interval by adding command vrrp <group_number> timers advertise <interval> to specify interval in seconds, or use command vrrp <group_number> timers advertise msec <interval> to specify interval in milliseconds. For example:

Specifying interval to 2 seconds

R1(config-if)#vrrp 123 timers advertise 2

Specifying interval to 2000 milliseconds (equivalent to 2 seconds)

R1(config-if)#vrrp 123 timers advertise msec 2000

Both configurations above gives the same result on master router. However, if the Cisco router is a backup, we can simply add the configuration as shown below:

R2(config-if)#vrrp 123 timers learn

This will make the backup router to adapt with master’s advertisement interval. And that is how we configure VRRP in Cisco IOS Router.

The following two tabs change content below.
Arranda Saputra

Arranda Saputra

CCNA, CCDA, VCP6-DCV, MCSA Administering Windows Server 2012
An IT infrastructure practitioner with main specialization in network engineering. Cisco is his first love, but he also enjoyed working on virtualization with VMware and system administration with Windows Server.