Networking

Configure VRRP on Cisco IOS: Master, Backup and Failover

VRRP gives a LAN one default gateway address that two or more routers share, so a host keeps working when the router behind that address dies. It does the same job as Cisco’s HSRP, but it is an open standard, it preempts by default, and a router that owns the virtual address jumps straight to priority 255. Those three differences are what most VRRP configuration mistakes come from, and every one of them shows up in show vrrp if you know where to look.

Original content from computingforgeeks.com - post 200338

This guide configures VRRP on two Cisco routers, reads every field of show vrrp and show vrrp brief, then fails the master, brings it back and hands the virtual address to its owner, with the log line for each change. The lab ran in November 2026 (Cisco 7200 routers on IOS 15.2(4)S3 in GNS3), and the timings below are the real ones from those routers.

The VRRP lab

R1 and R2 share the 192.168.10.0/24 user LAN and run VRRP group 10 with the virtual address 192.168.10.1, which PC1 uses as its default gateway. Both routers reach an upstream router, CORE, over OSPF, so PC1 has something beyond the gateway to ping. R1 gets priority 120 and R2 keeps the default of 100. The OSPF uplinks follow the usual single-area setup, and the host side is a router with routing turned off, pointed at the virtual gateway:

hostname PC1
no ip routing
ip default-gateway 192.168.10.1
interface GigabitEthernet0/0
 ip address 192.168.10.100 255.255.255.0
 no shutdown

CORE carries a loopback, 203.0.113.1/32, advertised into OSPF, which is the address PC1 pings through the gateway.

VRRP lab topology: R1 priority 120 and R2 priority 100 share virtual gateway 192.168.10.1 for PC1, with OSPF uplinks to CORE

In GNS3 the host is a third 7200 with routing turned off, which is how we usually get a host with a real CLI in a router lab.

GNS3 canvas of the VRRP lab with R1, R2, CORE, SW1 and PC1

Configure VRRP on R1 and R2

VRRP lives on the LAN interface. Each router keeps its own address, and the vrrp 10 ip line adds the shared one. We configured R1 first.

interface GigabitEthernet0/0
 ip address 192.168.10.2 255.255.255.0
 vrrp 10 ip 192.168.10.1
 vrrp 10 priority 120
 vrrp 10 description USERS-GW
 no shutdown

R2 gets the same lines with its own address, 192.168.10.3, and no priority line, so it stays at 100. The group number has to match on both routers, and so does the virtual address. If you’re coming from HSRP, the shape is familiar: vrrp 10 ip replaces standby 10 ip, and there is no preempt line because VRRP already preempts.

Read show vrrp

The full command on R1 explains the whole group in eleven lines.

show vrrp

R1 is master, as its higher priority says it should be.

GigabitEthernet0/0 - Group 10
USERS-GW
  State is Master
  Virtual IP address is 192.168.10.1
  Virtual MAC address is 0000.5e00.010a
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 120
  Master Router is 192.168.10.2 (local), priority is 120
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.531 sec

Most lines read as they say, but four of them carry the details people get wrong:

  • Virtual MAC 0000.5e00.010a: the last byte is the group number in hex (10 is 0a)
  • Advertisement interval 1 second: only the master sends them
  • Preemption enabled: on by default, with no command typed
  • Master Down interval 3.531 seconds: how long a backup waits before taking over

The master down interval isn’t a fixed timer. It is three advertisement intervals plus a skew time that depends on the router’s own priority, (256 minus priority) divided by 256 seconds. For R1 at 120 that is 3 + 136/256 = 3.531, and R2 at priority 100 shows 3.609, so the higher-priority backup always gives up waiting first. You’ll see the skew time again in the failover.

The brief form fits a whole router on one screen, and it is the one we run first.

show vrrp brief

On R2 the same group reads as backup, with R1’s address in the Master addr column.

Interface          Grp Pri Time  Own Pre State   Master addr     Group addr
Gi0/0              10  100 3609       Y  Backup  192.168.10.2    192.168.10.1

Time is the master down interval in milliseconds, Own is blank because R2 does not own 192.168.10.1, and Pre shows preemption on. Those two columns, Own and Pre, are where VRRP and HSRP differ most, so read them every time.

Check what the host sees

PC1 only knows the virtual address. After a ping to the gateway, its ARP entry shows the virtual MAC, not R1’s real one.

show ip arp 192.168.10.1

That MAC belongs to the group, so whichever router is master answers to it.

Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  192.168.10.1            0   0000.5e00.010a  ARPA   GigabitEthernet0/0

This is why a failover needs nothing from the host. Its gateway address and the MAC behind it never change.

Fail the master

We shut R1’s LAN interface, and R2’s log shows the takeover.

show logging | include VRRP

Compare the timestamp with R1’s own log line for the shutdown, Master to Init at 13:39:58.691.

*Nov 30 13:39:59.303: %VRRP-6-STATECHANGE: Gi0/0 Grp 10 state Backup -> Master

R2 became master 0.612 seconds after R1 left, much faster than its 3.609-second master down interval. When a master shuts its interface gracefully, it sends a last advertisement with priority 0, and a backup that hears priority 0 waits only the skew time, (256 minus 100) divided by 256, which is 0.609 seconds for R2. A master that dies without warning (power loss, a cut cable) sends nothing, so the backup waits the full interval and the LAN has no gateway for up to about 3.6 seconds. Once R2 had taken over, PC1 still reached 203.0.113.1, and its ARP entry for 192.168.10.1 still pointed at 0000.5e00.010a. The routers run no NTP and each set its clock from the GNS3 host at boot, so gaps measured across two routers are approximate, but the 0.612-second gap lining up with R2’s 0.609-second skew time shows these two clocks were close.

R2 show vrrp brief as VRRP master after R1 fails, and the log lines for the failover and R1 preempting back

The second log line in that capture is R2 handing the role back, which is the next thing to explain.

Why R1 takes the master role back

When R1’s interface came back up, R1 took the master role back with nobody typing a preempt command.

*Nov 30 13:39:58.691: %VRRP-6-STATECHANGE: Gi0/0 Grp 10 state Master -> Init
*Nov 30 13:40:18.127: %VRRP-6-STATECHANGE: Gi0/0 Grp 10 state Init -> Backup
*Nov 30 13:40:21.659: %VRRP-6-STATECHANGE: Gi0/0 Grp 10 state Backup -> Master

R1 spent 3.532 seconds as backup before taking over, within a millisecond of its master down interval. With preemption on, a backup that hears a master with lower priority than its own ignores those advertisements, lets its timer expire, and takes over. R2 logged Master to Backup at 13:40:21.687, 28 milliseconds later. HSRP would have left R2 as active here, because HSRP preemption is off until you configure it. If you don’t want a recovered router to grab the role straight back, for example while its routing table is still converging, turn it off on that router with no vrrp 10 preempt, or delay it with vrrp 10 preempt delay minimum 60.

The address owner always wins

VRRP lets the virtual address be a real interface address on one of the routers. That router is the owner, and it does not use its configured priority at all. To see it, both routers were moved to virtual address 192.168.10.3, which is R2’s own interface address. That cuts PC1 off, since its gateway is still 192.168.10.1, so treat this as a demonstration: changing the virtual address on a live LAN breaks every host that uses the old one.

interface GigabitEthernet0/0
 no vrrp 10 ip 192.168.10.1
 vrrp 10 ip 192.168.10.3

R2 jumped to priority 255 and master, and the Own column filled in.

Interface          Grp Pri Time  Own Pre State   Master addr     Group addr
Gi0/0              10  255 3003   Y   Y  Master  192.168.10.3    192.168.10.3

R1, still configured with priority 120, went to backup and shows Master Router is 192.168.10.3, priority is 255. Priority 255 is reserved for the owner and can’t be configured, so no other router can ever outrank it while it is up. That’s convenient when one router should always be the gateway, and a trap when someone sets the virtual address to an interface address by accident and wonders why the priorities do nothing.

VRRPv3 on classic IOS and IOS XE

Everything above is VRRP version 2, which carries IPv4 only. VRRPv3 (RFC 5798) adds IPv6 and sub-second timers, and on releases that support it, such as IOS XE, you turn it on globally before configuring groups under an address family. Classic IOS 15.2 on the 7200 does not have it:

R1(config)# fhrp version vrrp v3
            ^
% Invalid input detected at '^' marker.

Cisco’s IOS XE configuration guide builds the same group like this, with the group set up per address family under the interface (we didn’t run this block, since the lab routers lack VRRPv3):

fhrp version vrrp v3
interface GigabitEthernet0/0
 vrrp 10 address-family ipv4
  address 192.168.10.1 primary
  priority 120

The status output changes format under VRRPv3, but the ideas you’ve just read (master and backup, priority, preemption on by default, the owner at 255) carry over unchanged. Keep both routers in a group on the same version, because mixing them relies on platform-specific compatibility options.

Practice HSRP and VRRP

These questions come from our first hop redundancy bank, which covers reading HSRP and VRRP status side by side.

Free practice

CCNA practice: Domain 3: IP Routing

10 questions drawn fresh from 129 in the bank, with the answer and explanation after each one.

Start 10 questions

For the protocol background and GLBP, read first hop redundancy explained: HSRP, VRRP and GLBP, and for the Cisco-only alternative built the same way, the HSRP configuration lab. The OSPF uplinks in this lab follow the single-area OSPF guide. Reading HSRP and VRRP status is part of IP routing in the CCNA 200-301 v2.0 topics, and the Domain 3 practice test drills it with the rest of that domain.

HSRP and VRRP side by side

The two protocols solve the same problem, so the differences are what you need to keep straight.

ItemHSRPVRRP
StandardCisco proprietaryOpen standard (RFC 3768 for v2, RFC 5798 for v3)
Router rolesActive and standbyMaster and backup
Preemption by defaultOffOn
Default priority100100 (255 for the address owner)
Virtual IP can be an interface addressNoYes, that router becomes the owner
Default timersHello 3 s, hold 10 sAdvertisement 1 s, master down about 3.6 s
Virtual MAC (group 10)0000.0c07.ac0a (version 1)0000.5e00.010a
Status commandshow standby briefshow vrrp brief

In a Cisco-only network either works, and HSRP is what most existing configs use. When the other gateway is a firewall or a router from another vendor, VRRP is the one both sides speak.

Keep reading

Free CCNA Practice Test: 600+ Questions for 200-301 v2.0 Networking Free CCNA Practice Test: 600+ Questions for 200-301 v2.0 Install Samba on Debian 13 / 12 and Create a File Share Debian Install Samba on Debian 13 / 12 and Create a File Share Configure Samba File Sharing on Linux Mint 22 Networking Configure Samba File Sharing on Linux Mint 22 Agentic AI in Network Operations: Tested on Cisco IOS Networking Agentic AI in Network Operations: Tested on Cisco IOS Cisco Switch Port Configuration for Phones, APs and Servers Networking Cisco Switch Port Configuration for Phones, APs and Servers Installing Open vSwitch on Rocky 8 / AlmaLinux 8 AlmaLinux Installing Open vSwitch on Rocky 8 / AlmaLinux 8

Leave a Comment

Press ESC to close