Virtual Router Redundancy Protocol (VRRP)
- RFC 2338
- IPv4 only, IP 112
- TTL = 255, if other value received – discard
- IP src: IP address of Master interface
- MAC src: 0000.5e00.01××, ×× – group number
- IP dst: 224.0.0.18
- MAC dst: 0100.5e00.0012
- election
- preempt enabled by default
- higher IP does not cause preemption: RFC
- higher IP causes preemption: Cisco
- default priority = 100
- priority = 0 ≡ Master resigns
- priority = 255: vIP = physical interface IP, not configurable
- preempt enabled by default
- authentication:
- supported by IOS
- no support in RFC
- ICMP Redirect to physical MAC and IP of nexthop
- BFD support
; if addr = interface IP → priority = 255
(config-if)# vrrp <GROUP> ip <ADDR>
(config-if)# vrrp <GROUP> priority <LEVEL>
; delay = 0 by default
(config-if)# vrrp <GROUP> preempt [delay <sec>]
(config-if)# vrrp <GROUP> authentication ...
(config-if)# vrrp <GROUP> track <OBJ>
# show vrrp brief
Roles
- Master: single
- sends Hello
- Backup: multiple
- do not send Hello
- does not forward packets, received for vMAC (RFC)
- Cisco forwards packets, received for vMAC
Timers
- must match for neighbourship to be established
- msec timers are not defined by RFC – cannot be announced in Hello
- timers:
- hello: 1s default
- hold: 3 x hello + skew
- skew: (256 – priority) / 256
; timers must match
(config-if)# vrrp <GROUP> timers advertise [msec] <INTERVAL>
; learn timers from Master, disabled by default
; msec timers cannot be learned, 1s is announced instead
(config-if)# vrrp <GROUP> timers learn
VRRPv2 format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Type | Virtual RID | Priority | Count IP Addr |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Auth Type | Adv Interval | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP Address 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP Address N |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication Data |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Version: 0x02
Virtual RID: group number
Advertisement interval: seconds
Type:
- 0x1: Advertisement
AuthType:
- 0x00: no authC
- 0x01: cleartext
- 0x02: MD5
VRRPv3
- IPv6 support
- msec timers
- preempt is triggered only by priority (Cisco)
(config)# fhrp version vrrp v3
(config-if)# vrrp <GROUP> address-family ipv4|ipv6
; compatibility with VRRPv2
(config-if-vrrp)# vrrpv2
VRRPv3 format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Type | Virtual RID | Priority | Count IP Addr |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Rsvd | Max Advert Interval | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \
/ IPvX Address 1 /
\ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \
/ IPvX Address N /
\ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Version: 0x03
Max Advertisement Interval: units – centiseconds
Design
- preempt delay = 1.5 × boot time
- do not use with VSS