HSRP vs VRRP: Failover and Preemption, Packet by Packet

This walkthrough uses captures from the late Nick Russo's free packet-capture library. They are in the FHRP archive, fhrp_pcap.zip, under fhrp_pcap/ipv4/: hsrp_v2_init.pcapng, hsrp_v2_fail_and_preempt.pcapng, vrrp_v3_init.pcapng, and vrrp_v3_fail_and_preempt.pcapng. The archive is preserved by the Internet Archive, with the rest of the library listed on his job aid page. We decoded the captures with VisualEther, which turns a Wireshark PCAP into a sequence diagram with a plain-English caption on every message.

A host has one default gateway address. If the router that owns it dies, the host is cut off, even when a second router sits on the same LAN. A first-hop redundancy protocol (FHRP) fixes that: two or more routers share a virtual IP address and a virtual MAC address, one of them answers for both, and another takes over when it can't. HSRP (Hot Standby Router Protocol) is Cisco's; VRRP (Virtual Router Redundancy Protocol) is the IETF standard.

These four captures run both protocols between the same two Cisco routers, with the same priorities and the same event. Router R1's priority drops from 105 to 95, below R2's 100, and later comes back. Under HSRP, R2 took over 2 milliseconds after R1 announced the lower priority. Under VRRP, R2 took over 36 seconds after R1's last high-priority message. Both takeovers follow their specifications, and the difference is the most useful thing to understand about the two protocols.

All four captures are drawn as annotated sequence diagrams:

  1. HSRPv2 bring-up (31 frames, 99 s): Listen, Speak, Standby, Active, then a host's ARP and ping through the virtual IP.
  2. VRRPv3 bring-up (13 frames, 35 s): R1 preempts R2, then the same host traffic.
  3. HSRPv2 failover and preemption (29 frames, 42 s): two Coups, one each way.
  4. VRRPv3 failover and preemption (24 frames, 138 s): two takeovers, each after a timer runs out.

Each router gets a lane, and each message is an arrow, numbered as in Wireshark and captioned with what it does. Every diagram comes in three forms: an interactive viewer, an HTML page, and a printable PDF. In the viewer and the HTML page, clicking any message opens its full Wireshark field tree.

💡 Read the walkthrough and a diagram side by side: open the interactive diagram in a split-screen window, or open the HTML version in a new tab and snap the two windows side by side. Each capture section below links its own diagram.

What is the difference between HSRP and VRRP?

HSRP is Cisco-proprietary and VRRP an open standard, but the difference that shows up on the wire is how a better router takes over. HSRP has a Coup message for it and acts the moment it hears a weaker active router. VRRP has no such message: a better Backup ignores the weaker Master and waits for a timer to run out. Most of the other differences are in the numbers:

HSRP version 2VRRP version 3
Defined byCisco (configuration guide); version 1 is the informational RFC 2281RFC 9568 (2024), which replaced RFC 5798
RolesActive, Standby, and others in ListenMaster and Backups (RFC 9568 renamed Master to Active)
StatesInitial, Learn, Listen, Speak, Standby, ActiveInitialize, Backup, Master
MessagesHello, Coup, Resign, plus an Interface State TLVAdvertisement only
TransportUDP port 1985 to 224.0.0.102, TTL 1IP protocol 112 to 224.0.0.18, TTL 255
Virtual MAC0000.0c9f.fXXX (group 0 to 4095); here 00:00:0c:9f:f0:14 for group 200000.5e00.01XX (VRID 1 to 255); here 00:00:5e:00:01:1e for VRID 30
Who sends from the virtual MACThe Active router's HellosEvery advertisement from the Master
Default timersHello 3 s, hold 10 sAdvertisement 1 s; Backup waits about 3.6 s
Timers in these capturesHello 10 s, hold 20 sAdvertisement 10 s; Backup waits 36.1 s
Preemption defaultOff (standby preempt to enable)On
How a better router takes overSends a Coup at onceWaits out Active_Down_Interval
Measured takeover, priority drop2 ms (Coup), 3 ms to the first Active Hello36.1 s after R1's last priority-105 advertisement
Measured takeover, priority back1 ms after the next Hello from R236.3 s after the last advertisement R1 accepted
AuthenticationMD5 TLV in these capturesNone: the VRRPv3 RFCs define none (Cisco offers MD5 only for VRRPv2)
Load sharingOne Active per group; use several groupsOne Master per VRID; use several VRIDs

The rest of this page shows where each row comes from in the captures.

The lab

The topology is the same in all four captures:

DeviceHSRP captures (VLAN 20)VRRP captures (VLAN 30)Role
R1192.168.20.1, priority 105192.168.30.1, priority 105The preferred gateway
R2192.168.20.2, priority 100192.168.30.2, priority 100The backup gateway
Virtual gateway192.168.20.254, group 20192.168.30.254, VRID 30The address hosts use
R4192.168.20.4192.168.30.4A host using the virtual gateway
R310.0.0.3 (loopback)10.0.0.3 (loopback)A destination beyond the gateway

Three things about these captures matter before reading them:

The lanes run in the order traffic flows: host R4, the broadcast address, the virtual MAC, R1, the protocol's multicast group, R2, and R3 behind the gateways.

How do HSRP and VRRP elect the active router?

Both elect the router with the highest priority (0 to 255, default 100; VRRP reserves 0 and 255) and break a tie on the highest IP address. They differ in how long they wait before deciding.

stateDiagram-v2 accTitle: HSRP state machine in the captures accDescr: A router starts in Initial, moves to Listen once it knows the virtual IP, and to Speak after a hold time with no Active router, or no Standby router, heard. From Speak it becomes Standby, and from Standby Active when the Active timer expires. A Standby router with preemption that hears a lower-priority Active router sends a Coup and becomes Active. An Active router that receives a Coup from a higher-priority router drops to Speak. [*] --> Initial Initial --> Listen: virtual IP known Listen --> Speak: hold time, no Active or no Standby heard Speak --> Standby: hold time, highest priority speaker Standby --> Active: Active timer expires Standby --> Active: Coup, preempting a weaker Active Active --> Speak: Coup received from higher priority
HSRP states as these captures show them. R1 in the bring-up capture went Listen, Speak, Standby, Active. In the failover capture each Coup sends the old Active router to Speak.

RFC 9568 renamed VRRP's Master to Active, and its timers to Active_Down_Interval and Active_Down_Timer (RFC 5798's Master_Down_Interval and Master_Down_Timer). Cisco IOS and Wireshark still say Master, and so does this page; the timer names follow RFC 9568.

stateDiagram-v2 accTitle: VRRP state machine accDescr: A router starts in Initialize. The address owner with priority 255 becomes Master at once. Any other router becomes Backup and starts its down timer. A Backup becomes Master when the timer expires. A Master that hears a higher-priority advertisement, or an equal-priority one from a higher IP address, becomes Backup. [*] --> Initialize Initialize --> Master: priority 255, address owner Initialize --> Backup: any other priority Backup --> Master: Active_Down_Timer expires Master --> Backup: higher priority, or equal priority and higher IP, heard
VRRP states. A non-owner always starts as Backup, and becomes Master only when its Active_Down_Timer expires.

HSRP bring-up: about 24 seconds in Speak and Standby

R1 and R2 start HSRP 1.24 s apart; each announces itself with an Interface State TLV (frames 1 and 2). From there it takes R1 45.5 s to become Active:

FramesTimeR1, priority 105R2, priority 100
1, 20 s, 1.2 sListen, no HellosListen, no Hellos
320.6 sListenSpeak
422.4 sSpeakBack to Listen on hearing R1
942.5 sSpeakSpeak once more
1044.0 sStandbyBack to Listen on hearing R1
12 to 1446.7 sActive, gratuitous ARPsListen
1864.7 sActiveSpeak, the Standby role now empty
2586.6 sActiveStandby

RFC 2281 explains every step (states in section 5.3, timers in section 5.4, the state table in section 5.7):

The slow start is deliberate: every step waits a full hold time to make sure no other router already holds the role, so a router joining a working group never disturbs it unless it is configured to preempt. With the default 10 s hold time, the same path takes about half as long.

R2's path shows the table's other side. A speaker that hears a higher-priority speaker or a Standby router goes back to Listen. So R2 speaks once at 20.6 s, falls silent when R1 speaks, speaks again when its Standby timer runs out at 42.5 s, and falls silent again when R1 becomes Standby. Only once R1 is Active and the Standby role is empty does R2 stay in Speak (from 64.7 s), and one hold time later it becomes Standby. That is 42.5 s after R1's last Standby Hello: one hold time in Listen and one in Speak, plus Cisco's timer jitter.

VRRP has no Speak phase. A starting router goes straight to Backup and becomes Master only if its timer runs out, as the next capture shows.

VRRP bring-up: the Master changes in one message

When the capture starts, R2 is Master: its advertisement (priority 100) is frame 1. In frame 2, 0.41 s later, R1 advertises at priority 105 and sends a gratuitous ARP. R2 hears the higher priority and becomes Backup without a word; VRRP has no message for stepping down.

The 0.41 s is measured from the first captured frame, not from when R1 started. RFC 9568 section 6.4.1 sends every router that doesn't own the address (priority below 255) to Backup at startup, with its Active_Down_Timer set to a full Active_Down_Interval: 35.9 s for R1 with these timers. While R1 waits, it discards R2's lower-priority advertisements (section 6.4.2), so they don't restart its timer. The capture most likely began near the end of that wait.

The capture ends with host R4 using the gateway. R4 broadcasts an ARP request for 192.168.30.254, and R1 answers with the virtual MAC, not its own. R4 then pings R3's loopback, addressing the frame to the virtual MAC. The echo reply comes back from R1's own MAC, aa:bb:cc:00:01:20: the virtual MAC is only a destination for hosts, and a router forwards packets with its interface's own MAC. The HSRP capture ends the same way.

What does preemption do, and why is it off by default in HSRP?

Preemption lets a higher-priority router take the role from a lower-priority one that is working. Without it, the router that became active stays active until it fails, whatever the priorities.

HSRP leaves it off by default (Cisco), so a router coming back from a reboot or a flapping link doesn't take the role and push traffic around a second time. VRRP turns it on by default (RFC 9568 section 6.1, Preempt_Mode). In these captures, preemption is on in both: HSRP's Coups would not happen otherwise. Many designs add a preemption delay, so a recovering router waits for its routing protocols to converge before it takes over.

Preemption is also what makes object tracking useful. Tracking lowers a router's priority when its uplink fails; preemption is what lets the other router act on the new priorities. Both "fail" captures show exactly this pair.

HSRP failover: a Coup in 2 milliseconds

sequenceDiagram accTitle: HSRP failover and preemption accDescr: R1, Active, sends a Hello with priority 95. Two milliseconds later R2 sends a Coup with priority 100, then a Hello as Active and gratuitous ARPs for the virtual IP. R1 drops to Speak. At 38.9 seconds, after R2's next Hello, R1 at priority 105 sends a Coup, becomes Active, and R2 drops to Speak. participant R1 participant G as 224.0.0.102 participant R2 R1->>G: [2] Hello, Active, priority 95 R2->>G: [4] Coup, priority 100 R2->>G: [6] Hello, Active, priority 100 Note over R2: [7] [8] gratuitous ARPs from the virtual MAC R1->>G: [10] Hello, Speak, priority 95 R2->>G: [20] Hello, Active, priority 100 R1->>G: [22] Coup, priority 105 R1->>G: [24] Hello, Active, priority 105 R2->>G: [28] Hello, Speak, priority 100
The HSRP takeover at 2.04 s and the return at 38.90 s. Frame numbers are in brackets. Interface State TLVs are left out.

When the capture starts, R1 is Active and R2 Standby. At 2.038 s (frame 2), R1's Hello says it is still Active, now at priority 95. R2, Standby at priority 100 with preemption on, answers 1.99 ms later with a Coup (frame 4), and 1 ms after that sends its first Hello as Active (frame 6), followed by gratuitous ARPs. RFC 2281's state table (section 5.7) describes exactly this: a router configured to preempt that hears a Hello from a lower-priority Active router sends a Coup, a Hello, and a gratuitous ARP, and becomes Active.

👑 [00004] Frame 4 HSRPv2 Coup 2020-05-12T16:45:21.400775Z 🎯 R2 → 📡 HSRPv2 multicast
frame : Frame 4: Packet, 118 bytes on wire (944 bits), 118 bytes captured (944 bits) on interface -, id 0
Section number : 1
Interface id : 0 (-)
Interface name : -
Encapsulation type : Ethernet (1)
Arrival Time : May 12, 2020 22:15:21.400775000 India Standard Time
UTC Arrival Time : May 12, 2020 16:45:21.400775000 UTC
Epoch Arrival Time : 1589301921.400775000
Time shift for this packet : 0.000000000 seconds
Time delta from previous captured frame : 0.000000000 seconds
Time delta from previous displayed frame : 0.000000000 seconds
Time since reference or first frame : 2.040005000 seconds
Frame Number : 4
Frame Length : 118 bytes (944 bits)
Capture Length : 118 bytes (944 bits)
Frame is marked : False
Frame is ignored : False
Protocols in frame : eth:ethertype:vlan:ethertype:ip:udp:hsrp
Character encoding : ASCII (0)
eth : Ethernet II, Src: aa:bb:cc:00:02:20, Dst: 01:00:5e:00:00:66
Destination : 01:00:5e:00:00:66
Destination (resolved) : 01:00:5e:00:00:66
Destination OUI : 01:00:5e (ICANN, IANA Department)
Destination OUI (resolved) : ICANN, IANA Department
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...1 .... .... .... .... = IG bit : Group address (multicast/broadcast)
Address : 01:00:5e:00:00:66
Address (resolved) : 01:00:5e:00:00:66
Address OUI : 01:00:5e (ICANN, IANA Department)
Address OUI (resolved) : ICANN, IANA Department
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...1 .... .... .... .... = IG bit : Group address (multicast/broadcast)
Source : aa:bb:cc:00:02:20
Source (resolved) : aa:bb:cc:00:02:20
Source OUI : aa:bb:cc
.... ..1. .... .... .... .... = LG bit : Locally administered address (this is NOT the factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : aa:bb:cc:00:02:20
Address (resolved) : aa:bb:cc:00:02:20
Address OUI : aa:bb:cc
.... ..1. .... .... .... .... = LG bit : Locally administered address (this is NOT the factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Type : 802.1Q Virtual LAN (0x8100)
Stream index : 0
vlan : 802.1Q Virtual LAN, PRI: 0, DEI: 0, ID: 20
000. .... .... .... = Priority : Best Effort (default) (0)
...0 .... .... .... = DEI : Ineligible
.... 0000 0001 0100 = ID : 20
Type : IPv4 (0x0800)
ip : Internet Protocol Version 4, Src: 192.168.20.2, Dst: 224.0.0.102
0100 .... = Version : 4
.... 0101 = Header Length : 20 bytes (5)
Differentiated Services Field : 0xc0 (DSCP: CS6, ECN: Not-ECT)
1100 00.. = Differentiated Services Codepoint : Class Selector 6 (48)
.... ..00 = Explicit Congestion Notification : Not ECN-Capable Transport (0)
Total Length : 100
Identification : 0x0000 (0)
000. .... = Flags : 0x0
0... .... = Reserved bit : Not set
.0.. .... = Don't fragment : Not set
..0. .... = More fragments : Not set
...0 0000 0000 0000 = Fragment Offset : 0
Time to Live : 1
Expert Info (Note/Sequence) : "Time To Live" != 255 for a packet sent to the Local Network Control Block (see RFC 3171)
"Time To Live" != 255 for a packet sent to the Local Network Control Block (see RFC 3171)
Message : "Time To Live" != 255 for a packet sent to the Local Network Control Block (see RFC 3171)
Severity level : Note
Group : Sequence
Protocol : UDP (17)
Header Checksum : 0x03b9 [validation disabled]
Header checksum status : Unverified
Source Address : 192.168.20.2
Source or Destination Address : 192.168.20.2
Source Host : 192.168.20.2
Source or Destination Host : 192.168.20.2
Destination Address : 224.0.0.102
Source or Destination Address : 224.0.0.102
Destination Host : 224.0.0.102
Source or Destination Host : 224.0.0.102
Stream index : 0
udp : User Datagram Protocol, Src Port: 1985, Dst Port: 1985
Source Port : 1985
Destination Port : 1985
Source or Destination Port : 1985
Source or Destination Port : 1985
Length : 80
Checksum : 0xaea9 [unverified]
Checksum Status : Unverified
Stream index : 0
Stream Packet Number : 3
Timestamps
Time since first frame : 2.040005000 seconds
Time since previous frame : 0.000000000 seconds
UDP payload (72 bytes)
hsrp : Cisco Hot Standby Router Protocol
Group State TLV : Type=1 Len=40
Version : 2
Op Code : Coup (1)
State : Standby (5)
IP Ver. : IPv4 (4)
Group : 20
Identifier : aa:bb:cc:00:02:20
Priority : 100
Hellotime : Non-Default (10000)
Holdtime : Non-Default (20000)
Virtual IP Address : 192.168.20.254
MD5 Authentication TLV : Type=4 Len=28
MD5 Algorithm : MD5 (1)
Padding : 0x00
MD5 Flags : 0
Sender's IP Address : 192.168.20.2
MD5 Key ID : 0
MD5 Authentication Data : 22d97c5e5bf267ed0094f06b325a94de
Rendered from a Wireshark PCAP by VisualEther.

Failover capture, frame 4, R2's Coup. Under Cisco Hot Standby Router Protocol: the Group State TLV with Version 2, Op Code Coup, State Standby, Group 20, Identifier (R2's MAC), Priority 100, Hellotime and Holdtime 10000 and 20000 ms, and Virtual IP Address 192.168.20.254, then the MD5 Authentication TLV.

Four details in the Coup and around it:

R1 then works its way back up: Speak until a hold time passes, then Standby at 23.1 s (frame 16), 21.0 s after it entered Speak. Its Hello at 33.0 s (frame 19) still carries priority 95.

The return is the same move in reverse. At 38.900 s R2 sends its routine Active Hello (frame 20), and 1.04 ms later R1 sends a Coup at priority 105 (frame 22), then its own Active Hello and gratuitous ARPs. R1's priority came back between 33.0 s and 38.9 s; the Coup most likely waited for the next Hello from the weaker Active router.

What is the HSRPv2 Interface State TLV?

It is a Cisco packet that counts the sender's HSRP groups on the interface: how many are Active, and how many are in other states. Wireshark decodes it as HSRPv2 TLV type 2. Type 1 is the Group State TLV that carries Hello, Coup, and Resign, and type 4 is MD5 authentication.

Cisco doesn't document this TLV. Its configuration guide does describe passive HSRP advertisements, part of HSRP's support for ICMP redirects: routers send them periodically and when they enter or leave the passive state, so every HSRP router can see the others' group states. Wireshark decodes the HSRP version 1 form of these, opcode 3, with the same active and passive group counts. So the TLV is most likely the version 2 encoding of the same advertisement.

The captures fit that reading. The TLVs appear when a router starts HSRP, every 26 to 30 s while it has no Active group, whenever its counts change, and when it learns of a new Active router. R2 sends Active Groups: 1, Passive Groups: 1 just before its Coup and 1, 0 right after, and the router losing the role sends 0, 1. While R2 is Active, it sends none. They take no part in the election, so the summary diagrams on this page leave them out; the annotated diagrams keep them.

Why did VRRP wait 36 seconds when HSRP took over in 2 ms?

A VRRP Backup with preemption ignores a weaker Master instead of challenging it. RFC 9568 section 6.4.2 tells a Backup what to do with each advertisement:

Discarding doesn't restart the timer. So R2 can't take over until Active_Down_Timer runs out, counted from the last advertisement it accepted. RFC 9568 section 6.1 defines the interval:

The skew makes the highest-priority Backup's timer expire first, so the best Backup wins without a contest.

sequenceDiagram accTitle: VRRP failover after a priority drop accDescr: R1, Master, advertises priority 105 at 9.7 seconds, then priority 95 four times. R2 discards the lower-priority advertisements and keeps its timer running. At 45.8 seconds, 36.1 seconds after the last priority 105 advertisement, R2's timer expires, and R2 advertises as Master with priority 100 and sends gratuitous ARPs. participant R1 participant G as 224.0.0.18 participant R2 R1->>G: [2] 9.67 s, priority 105 Note over R2: timer restarted, 36.09 s R1->>G: [3] to [6] 17.9 to 44.7 s, priority 95 Note over R2: discarded, timer keeps running R2->>G: [7] 45.77 s, priority 100, now Master Note over R2: [8] to [10] gratuitous ARPs
The VRRP takeover. Frame numbers are in brackets, with time from frame 1.

The numbers fit to the millisecond. R2 has priority 100 and the advertisement interval is 1000 centiseconds (10 s):

StepValue
Skew_Time for R2(256 − 100) × 10 / 256 = 6.094 s
Active_Down_Interval for R23 × 10 + 6.094 = 36.094 s
R1's last priority-105 advertisement (frame 2)9.665 s
Predicted takeover9.665 + 36.094 = 45.759 s
R2's first advertisement as Master (frame 7)45.770 s, 11 ms after the prediction

R1 had been advertising priority 95 since 17.9 s, so R2 took over 27.9 s after the first sign that it outranked R1.

📡 [00007] Frame 7 VRRPv3 Advertisement 2020-05-12T18:58:08.177737Z 🎯 R2 → 📡 VRRP multicast
frame : Frame 7: Packet, 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface -, id 0
Section number : 1
Interface id : 0 (-)
Interface name : -
Encapsulation type : Ethernet (1)
Arrival Time : May 13, 2020 00:28:08.177737000 India Standard Time
UTC Arrival Time : May 12, 2020 18:58:08.177737000 UTC
Epoch Arrival Time : 1589309888.177737000
Time shift for this packet : 0.000000000 seconds
Time delta from previous captured frame : 1.090283000 seconds
Time delta from previous displayed frame : 1.090283000 seconds
Time since reference or first frame : 45.769820000 seconds
Frame Number : 7
Frame Length : 64 bytes (512 bits)
Capture Length : 64 bytes (512 bits)
Frame is marked : False
Frame is ignored : False
Protocols in frame : eth:ethertype:vlan:ethertype:ip:vrrp
Character encoding : ASCII (0)
eth : Ethernet II, Src: 00:00:5e:00:01:1e, Dst: 01:00:5e:00:00:12
Destination : 01:00:5e:00:00:12
Destination (resolved) : 01:00:5e:00:00:12
Destination OUI : 01:00:5e (ICANN, IANA Department)
Destination OUI (resolved) : ICANN, IANA Department
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...1 .... .... .... .... = IG bit : Group address (multicast/broadcast)
Address : 01:00:5e:00:00:12
Address (resolved) : 01:00:5e:00:00:12
Address OUI : 01:00:5e (ICANN, IANA Department)
Address OUI (resolved) : ICANN, IANA Department
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...1 .... .... .... .... = IG bit : Group address (multicast/broadcast)
Source : 00:00:5e:00:01:1e
Source (resolved) : 00:00:5e:00:01:1e
Source OUI : 00:00:5e (ICANN, IANA Department)
Source OUI (resolved) : ICANN, IANA Department
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:00:5e:00:01:1e
Address (resolved) : 00:00:5e:00:01:1e
Address OUI : 00:00:5e (ICANN, IANA Department)
Address OUI (resolved) : ICANN, IANA Department
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Type : 802.1Q Virtual LAN (0x8100)
Stream index : 0
vlan : 802.1Q Virtual LAN, PRI: 0, DEI: 0, ID: 30
000. .... .... .... = Priority : Best Effort (default) (0)
...0 .... .... .... = DEI : Ineligible
.... 0000 0001 1110 = ID : 30
Type : IPv4 (0x0800)
ip : Internet Protocol Version 4, Src: 192.168.30.2, Dst: 224.0.0.18
0100 .... = Version : 4
.... 0101 = Header Length : 20 bytes (5)
Differentiated Services Field : 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint : Default (0)
.... ..00 = Explicit Congestion Notification : Not ECN-Capable Transport (0)
Total Length : 32
Identification : 0x0a05 (2565)
000. .... = Flags : 0x0
0... .... = Reserved bit : Not set
.0.. .... = Don't fragment : Not set
..0. .... = More fragments : Not set
...0 0000 0000 0000 = Fragment Offset : 0
Time to Live : 255
Protocol : VRRP (112)
Header Checksum : 0xf2ab [validation disabled]
Header checksum status : Unverified
Source Address : 192.168.30.2
Source or Destination Address : 192.168.30.2
Source Host : 192.168.30.2
Source or Destination Host : 192.168.30.2
Destination Address : 224.0.0.18
Source or Destination Address : 224.0.0.18
Destination Host : 224.0.0.18
Source or Destination Host : 224.0.0.18
Stream index : 1
vrrp : Virtual Router Redundancy Protocol
Version 3, Packet type 1 (Advertisement)
0011 .... = VRRP protocol version : 3
.... 0001 = VRRP packet type : Advertisement (1)
Virtual Rtr ID : 30
Priority : 100 (Default priority for a backup VRRP router)
Addr Count : 1
0000 .... = Reserved : 0
.... 0011 1110 1000 = Adver Int : 1000
Checksum : 0x8751 [correct]
Checksum Status : Good
IP Address : 192.168.30.254
Rendered from a Wireshark PCAP by VisualEther.

Failover capture, frame 7, R2's first advertisement as Master. Under Virtual Router Redundancy Protocol: Version 3, Type Advertisement, Virtual Rtr ID 30, Priority 100, Addr Count 1, Adver Int 1000 (centiseconds), and IP Address 192.168.30.254. The Ethernet source is the virtual MAC 00:00:5e:00:01:1e, the same as R1's advertisements.

The advertisement carries no takeover flag and no sender ID: it looks like R1's, except for the IP source and the priority. R2 sends three gratuitous ARPs over the next 2.4 s.

When did R1's priority come back?

The capture can't show it, because a VRRP Backup sends nothing when its priority changes. The same rule dates it anyway. After frame 7, R1 (priority 95) was a Backup, and each of R2's priority-100 advertisements restarted R1's timer. Once R1 was back at 105, it discarded them, and its timer ran out 36.29 s after the last one it accepted. That interval uses priority 95, R1's priority when the timer was last set: 3 × 10 + (256 − 95) × 10 / 256.

R1 took over at 129.240 s (frame 20). R2's advertisement in frame 15, at 92.948 s, plus 36.289 s gives 129.237 s, 3 ms off. No other advertisement fits:

So R1's priority most likely returned between 92.9 s and 102.6 s, and R1 waited about 27 to 36 s before using it. HSRP's R1 needed 1 ms.

What does a gratuitous ARP do after a failover?

It moves the virtual MAC to the new router's switch port. A gratuitous ARP is an ARP reply that nobody asked for, announcing the sender's own mapping: here, the virtual IP at the virtual MAC.

The mapping doesn't change in a failover, so hosts' ARP caches are already right and have nothing to learn. The switches are the audience. Until they see a frame from the virtual MAC on the new router's port, they keep forwarding gateway traffic to the old one. A gratuitous ARP is broadcast, so every switch in the VLAN sees it and updates its MAC address table at once.

HSRPVRRP
Gratuitous ARPs at takeover2, at the same instant: to broadcast and to 01:00:0c:cd:cd:cd1, to broadcast
Repeats1 more, about 3 s later2 more, about 1.2 s apart
FromThe virtual MACThe virtual MAC

01:00:0c:cd:cd:cd is a Cisco reserved multicast address, which Wireshark labels STP-UplinkFast. Cisco's STP UplinkFast feature sends dummy multicast frames to it, each sourced from a MAC address that switches should relearn, and switches update their tables when they see one. Cisco doesn't document why HSRP also sends its gratuitous ARP there; the effect is the same.

RFC 9568 section 6.4.2 asks a new VRRP Master for one gratuitous ARP per virtual address; this Cisco router sends three.

How fast would HSRP and VRRP fail over if a router died?

These captures don't show it, so this section is derived from the timers, not observed.

A dead router sends nothing: no lower priority, no Coup trigger, no Resign. The backup notices only when its timer expires. HSRP's Standby router waits for the hold time without a Hello from the Active router; VRRP's Backup waits for Active_Down_Interval without an advertisement. The last message came up to one interval before the failure, so the outage is a range. Cisco also adds up to 20% jitter to HSRP's hold timer, which can stretch its worst case to 24 s here and 12 s with defaults:

Detection after the failureWith these captures' timersWith default timers
HSRPHold time − hello interval to hold time10 to 20 s7 to 10 s
VRRP (R2, priority 100)Active_Down_Interval − interval to Active_Down_Interval26.1 to 36.1 s2.6 to 3.6 s

With the defaults, VRRP detects a dead router about three times faster than HSRP. With these captures' timers, HSRP is faster, because its hold time is 2 hello intervals and VRRP's wait is more than 3.

Both can go much faster. HSRP accepts millisecond timers, and VRRPv3 accepts advertisement intervals in centiseconds. A clean shutdown is faster than a crash in both: an HSRP Active router sends a Resign (RFC 2281 section 5.7), and a VRRP Master sends an advertisement with priority 0, which cuts the Backup's wait to Skew_Time (RFC 9568 sections 6.4.3 and 6.4.2).

How to debug HSRP and VRRP from a capture

  1. Find who is active. For VRRP, read the IP source of the advertisements; the Ethernet source is always the virtual MAC. For HSRP, read the State field, or the Identifier field when the source is the virtual MAC.
  2. Check the priorities in every message. A drop of exactly the tracking decrement (10 here) points to object tracking, not to a failure on the LAN.
  3. Two routers both active? Neither hears the other. Look for one-way multicast loss, a mismatched group number or VRID, or an authentication mismatch: HSRP drops a Hello that fails the MD5 check.
  4. A takeover that took far too long? Read the timers in the packets: HSRP's Hellotime and Holdtime, VRRP's Adver Int. Then check whether preemption is on: without it, a recovered router never takes back the role.
  5. Traffic still going to the old router? Look for the gratuitous ARP after the takeover, on the switch port toward the hosts.

FAQ

Is HSRP or VRRP better? On Cisco-only networks either works. VRRP is an open standard that other vendors support, preempts by default, and has faster default timers. HSRP has the Coup, so a preempting router takes over at once, and offers MD5 authentication, which VRRPv3 lacks.

What are the HSRP states? Initial, Learn, Listen, Speak, Standby, and Active (RFC 2281 section 5.3). Only the Active and Standby routers send Hellos once the election settles; others stay in Listen.

What are the VRRP states? Initialize, Backup, and Master (RFC 9568 section 6.4, which renamed Master to Active).

What multicast addresses do HSRP and VRRP use? HSRP version 1 uses 224.0.0.2 and version 2 uses 224.0.0.102, both on UDP port 1985. VRRP uses 224.0.0.18 with IP protocol 112.

What is the VRRP virtual MAC address? 00-00-5E-00-01-XX for IPv4, where XX is the virtual router ID in hex. VRID 30 gives 00:00:5e:00:01:1e. HSRP version 2 uses 0000.0c9f.f000 to 0000.0c9f.ffff, and version 1 uses 0000.0c07.acXX.

Is preemption enabled by default in VRRP? Yes. In HSRP it is off until you configure standby preempt.

Why didn't the VRRP backup take over when the master's priority dropped? A Backup with preemption discards advertisements from a lower-priority Master, without restarting its timer, and takes over only when Active_Down_Timer expires.

What is a Coup in HSRP? The message a router sends when it takes the Active role from a lower-priority Active router, which requires preemption. The old Active router drops to Speak.

Takeaways

  1. Both protocols elect by priority. The highest wins, and a tie goes to the highest IP address.
  2. HSRP preempts with a message; VRRP with a timer. R2's HSRP Coup came 2 ms after R1 announced the lower priority; its VRRP takeover came 36.1 s after R1's last higher-priority advertisement.
  3. The VRRP wait is predictable. Active_Down_Interval = 3 × interval + Skew_Time, counted from the last advertisement the Backup accepted. These captures match it within 11 ms.
  4. Preemption is off by default in HSRP and on in VRRP. It is what lets object tracking move the gateway.
  5. The virtual MAC never changes. Hosts keep their ARP entry; the gratuitous ARP is for the switches.
  6. Check the timers before quoting a failover time. These captures' timers run ten times slower than the defaults.