vrrpVirtual Router Redundancy Protocol v2 & v3Virtual Gateway Heartbeats (rtr1 -> vrrp_mcast vrrp Proto 112)
What It Does on the Wire
When two routers both claim Priority 255 because a trunk VLAN blocked IP Protocol 112, chaos ensues. vrrp emits ttl 255 advertisements for both VRRPv2 and VRRPv3 (00:00:5e:00:01:<vrid>).
Virtual Router Redundancy Protocol (vrrp) provides standards-based First-Hop Redundancy (FHRP) over IP Protocol 112 with mandatory TTL / Hop Limit 255 (routers discard any VRRP packet arriving with TTL != 255).
FrameAssembly defaults to VRRPv2 (version 2, RFC 3768, advint in whole seconds, ones-complement checksum) over IPv4 endpoints and automatically upgrades to VRRPv3 (version 3, RFC 5798, 12-bit Max Advver Int in centiseconds, pseudo-header checksum) over IPv6 endpoints—or when version 3 is explicitly requested on IPv4.
Active / Backup Preemption & Master Release (priority 0) Labs
Model a primary gateway advertising priority 150, releasing mastership gracefully (priority 0), and a backup gateway (priority 120) taking over with arp gratuitous.
Rogue VRRP Master (priority 255) Detection Signatures
Generate unauthorized priority 255 advertisements inside access/distribution VLANs to validate Suricata FHRP spoofing alerts and switch ACLs.
VRRPv2 vs VRRPv3 Interoperability & Checksum Validation
Test dual-stack VRRPv3 (ff02::12, centisecond timers, IPv6 pseudo-header checksum) against router control-plane filters.
Minimal Quickstart (vrrp_quickstart.frasm)
Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.
host gw_master { ip 10.10.1.2 mac 00:00:5e:00:01:0a }host vrrp_all { ip 224.0.0.18 }compile { gw_master -> vrrp_all vrrp vrid 10 priority 150 advint 1 vip 10.10.1.1}What the Compiler Calculates So You Don't Have To
- Sets IPv4 Protocol / IPv6 Next Header to
112and defaultsttl/ Hop Limit to255per RFC 3768 / RFC 5798. - Selects VRRPv2 (
version 2) over IPv4 and VRRPv3 (version 3, 12-bit centisecondMax Adver Int+ pseudo-header checksum) over IPv6 automatically. - Derives multicast Ethernet MAC
01:00:5e:00:00:12(224.0.0.18) or33:33:00:00:00:12(ff02::12) automatically.
Graceful VRRP Master Shutdown (Priority 0), Backup Takeover & VRRPv3 IPv6
Traces VRID 10 on VLAN 10 where the primary router sends a priority 0 release, the backup router assumes mastership + sends GARP, alongside an IPv6 VRRPv3 advertisement.
host rtr_pri { ip 10.10.10.2 mac 00:00:5e:00:01:0a }host rtr_bkp { ip 10.10.10.3 mac 00:00:5e:00:01:0a }host vrrp_v4 { ip 224.0.0.18 }host rtr6_pri { ip fe80::10:2 mac 00:00:5e:00:02:0a }host vrrp_v6 { ip ff02::12 }compile { // 1. Primary router steady-state VRRPv2 heartbeat (VRID 10, Priority 150) rtr_pri -> vrrp_v4 vrrp vrid 10 priority 150 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 5ms // 2. Primary router initiates graceful shutdown (Priority 0 triggers immediate takeover) rtr_pri -> vrrp_v4 vrrp vrid 10 priority 0 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 2ms // 3. Backup router promotes to Master (Priority 120) and broadcasts GARP for VIP rtr_bkp -> vrrp_v4 vrrp vrid 10 priority 120 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 1ms rtr_bkp -> vrrp_v4 arp gratuitous sendermac 00:00:5e:00:01:0a senderip 10.10.10.1 vlan 10 wait 3ms // 4. Dual-stack VRRPv3 over IPv6 (advint 100 = 100 centiseconds = 1.00s) rtr6_pri -> vrrp_v6 vrrp version 3 vrid 10 priority 150 advint 100 vip fe80::10:1 vlan 10}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show vrrp_failover_v2_v3.frasm
# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly vrrp_failover_v2_v3.frasm vrrp_failover_v2_v3.pcap
frameassembly vrrp_failover_v2_v3.frasm vrrp_failover_v2_v3.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse vrrp_failover_v2_v3.pcap vrrp_failover_v2_v3_edited.frasmAll vrrp Keywords & Header Options
Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after vrrp:
src_host -> dst_host vrrp [vrid <1..255>] [priority <0..255>] [advint <0..65535>] [vip <ip>] [version <2|3>]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| vrid <1..255> | 8-bit Virtual Router Identifier (1..255) | 1 | Sets the VRID (matches standard virtual MAC 00:00:5e:00:01:<vrid_hex> on v4 or 00:00:5e:00:02:<vrid_hex> on v6). |
| priority <0..255> | 8-bit election priority (0..255) | 100 | Sets router election priority (255 = IP address owner, 100 = default backup, 0 = current Master releasing virtual router). |
| advint <0..65535> | u8 seconds (v2) or 12-bit centiseconds (v3) | 1 (v2) / 100 (v3) | Sets Advertisement Interval (1 second in VRRPv2; 100 centiseconds = 1.00s in VRRPv3). |
| vip <ip> | IPv4 or IPv6 Virtual IP address | Source host IP | Populates the Virtual Router IPv4/IPv6 Address field (Count IPvX Addr = 1). |
| version <2|3> | 2 or 3 | 2 (IPv4) / 3 (IPv6) | Selects RFC 3768 VRRPv2 or RFC 5798 VRRPv3 header & pseudo-header checksum rules. |
Cross-Layer Wrappers Valid with vrrp
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
9 options
Cross-Layer Wrappers Valid with vrrp
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
| Option | Range / Format | Default | Effect on Packet |
|---|---|---|---|
| wait <number><ns|us|ms|s|m> | Time gap (ns, us, ms, s, m) | 10ms | Advances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back). |
| payload "<text>" | hexpayload "<hex>" | Quoted text or hex bytes (choose one) | Omitted | Appends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums. |
| srcmac <mac> | dstmac <mac> | Colon, hyphen, or Cisco dot MAC | Host MAC / RFC multicast MAC | Overrides the 14-byte Ethernet II source or destination MAC address for this single packet. |
| vlan <0..4095> [pcp <0..7>] [dei <0|1>] | VLAN ID 0..4095, PCP 0..7, DEI 0..1 | Untagged | Wraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority. |
| qinq <0..4095> [innervlan <0..4095>] | Outer S-VLAN 0..4095, Inner C-VLAN 0..4095 | Untagged (innervlan 1 when qinq is set) | Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100). |
| mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>] | Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255 | Unlabeled (at most 1 mpls tag per packet) | Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header. |
| ttl <0..255> [dscp <0..63>] [ecn <0..3>] | TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3 | ttl 255, dscp 0, ecn 0 | Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings. |
| ipid <0..65535> [df] [mf] [fragoffset <0..8191>] | IPv4 ID, DF/MF flags, fragment offset 0..8191 | ipid 1, flags 0, fragoffset 0 | Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6). |
| flowlabel <0..1048575> | 20-bit IPv6 Flow Label (0..1048575) | 0 | Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts). |
Gotchas & Quick Fixes
vrid Starts at 1 (1..255)
r1 -> vrrp_v4 vrrp vrid 0r1 -> vrrp_v4 vrrp vrid 1 priority 120Per RFC 3768 / RFC 5798, valid Virtual Router Identifiers are 1..=255 (0 is invalid). Note that priority 0 *is* valid and signals Master release.
VRRPv3 Uses Centiseconds (100 = 1s) Instead of Whole Seconds
r6 -> vrrp_v6 vrrp version 3 vrid 10 advint 100In VRRPv2 advint 1 is 1 second, whereas in VRRPv3 advint is encoded in centiseconds (100 = 1.00 second, enabling sub-second advint 10 = 100ms failovers).