First-hop redundancy
Explain how IPv6 hosts choose and abandon default routers using Router Advertisements and Neighbor Unreachability Detection. Use Default Router Preference (RFC 4191) to make one router primary without VRRP. Configure VRRPv3 for IPv6 (RFC 9568) and compute its failover timers. Measure and compare RA-only and VRRPv3 failover times.
Take the quiz · pass mark 70% · 9 questions
Explanation
In IPv4, a LAN with two routers needs a first-hop redundancy protocol (VRRP, HSRP, CARP), because hosts have one static default gateway. IPv6 hosts already learn every router that sends Router Advertisements, so redundancy is built in. The question is how fast it works and whether it is fast enough.
RA-only redundancy
With two routers sending RAs, each host has two entries in its default router list (L3.02). The host uses one and changes only when it decides the router is gone:
- Clean shutdown: a router going down in an orderly way sends a final RA with Router Lifetime 0, and hosts drop it at once.
- Hard failure (power, crash, cable): the host notices only through Neighbor Unreachability Detection (RFC 4861, L3.01). The entry for the router stays REACHABLE for ReachableTime (15–45 s with defaults), then the next packet moves it to STALE → DELAY (5 s) → PROBE (3 probes, 1 s apart). Only then is the router considered unreachable and the host moves to the other one. Worst case with default timers: 1.5 × 30 + 5 + 3 = 53 seconds, typically around 20–40 s. Upper-layer confirmations (TCP acknowledgements) do not help, because a dead router sends none; they only keep the entry REACHABLE while the router is alive.
- Router Lifetime expiry (up to 9000 s, normally 1800 s) is far too slow to matter.
You can shorten this by advertising a smaller Reachable Time (L3.02), at the cost of more NUD traffic.
Default Router Preference (RFC 4191) adds a 2-bit preference (high, medium, low) to the RA. Hosts that support it use the high-preference router while it is reachable, which makes one router primary and keeps the other as backup, instead of the host choosing arbitrarily. Linux, Windows, macOS, iOS and Android support it.
VRRPv3 (RFC 9568)
VRRPv3 (RFC 9568, which obsoletes the earlier VRRPv3 specification) makes two or more routers share a virtual router: one Active router (older documents and many implementations say "Master") answers for the virtual addresses, and the Backup routers take over if its advertisements stop.
- Advertisements go to
ff02::12, IPv6 next header 112, Hop Limit 255, every Advertisement_Interval (default 100 centiseconds = 1 s, configurable in centiseconds). - The virtual MAC address is
00:00:5e:00:02:{VRID}for IPv6 (00:00:5e:00:01:{VRID}for IPv4). - For IPv6, the first virtual address must be a link-local address. That link-local address is the source of the RAs the Active router sends for the virtual router, so hosts see one default router whose address and MAC address do not change on failover. Only the Active router sends RAs for the virtual router; the physical interfaces must not send their own RAs, or hosts learn them as extra default routers.
- Priority 1–254 (255 is the address owner). Higher priority wins; preemption is on by default.
A Backup declares the Active router down after the Active_Down_Interval:
- Skew_Time = ((256 − Priority) × Active_Adver_Interval) ÷ 256
- Active_Down_Interval = 3 × Active_Adver_Interval + Skew_Time
With the defaults (interval 100 cs) and priority 100, Skew_Time = 156 × 100 ÷ 256 = 60.9 cs and Active_Down_Interval ≈ 361 cs, about 3.6 s. The skew lets the highest-priority Backup take over first. With an interval of 10 cs (100 ms) failover drops below half a second, at the cost of more advertisements and more risk of false failover on a busy CPU.
Configuration
FRR (vrrpd, Linux 5.1 or newer). FRR uses macvlan devices in bridge mode for the virtual MAC, created outside FRR:
ip link add vrrp6-eth1-10 link eth1 addrgenmode random type macvlan mode bridge
ip link set dev vrrp6-eth1-10 address 00:00:5e:00:02:0a
ip addr add 2001:db8:3001:1::1/64 dev vrrp6-eth1-10
ip link set dev vrrp6-eth1-10 up
interface eth1
ipv6 nd suppress-ra
vrrp 10 version 3
vrrp 10 priority 200
vrrp 10 advertisement-interval 100
vrrp 10 ipv6 2001:db8:3001:1::1
FRR's advertisement-interval is in milliseconds (multiples of 10), unlike the centiseconds in the RFC. FRR asks zebra to send RAs on behalf of the Active router; the Backup's macvlan is set to protodown. FRR does not create a shared virtual link-local address by default: RAs come from the macvlan's own (random) link-local, so after failover hosts see a different router address. Whether you can add a shared address such as fe80::1 to both macvlans and the VRRP instance depends on the FRR version; test it in the lab. keepalived (with virtual_ipaddress listing a link-local first) and MikroTik RouterOS (/interface vrrp add interface=ether2 vrid=10 version=3 v3-protocol=ipv6 priority=200, then addresses on the VRRP interface; check your version's manual) are alternatives.
Which to choose
| RA-only (with RFC 4191) | VRRPv3 | |
|---|---|---|
| Configuration | Nothing extra | Protocol, timers, virtual MAC |
| Hard-failure failover | NUD: tens of seconds | Active_Down_Interval: about 3.6 s by default, under 1 s if tuned |
| Host support needed | ND (always) and RFC 4191 | None beyond ND |
| Typical use | Office and home LANs | Server, hosting and data-centre segments |
The two can also combine: VRRP for the default router, with routing-protocol tracking so the Active router gives up when its uplink fails.
ictNetworks scenario
ictNetworks' hosting PoP gives each customer VLAN a VRRPv3 virtual router across the two PoP routers (pop1 priority 200, pop2 default 100) with a 100 ms advertisement interval, because a 30-second outage is not acceptable for VPS customers. Business customers with two CPEs on the same LAN use RA-only redundancy with Default Router Preference high on the primary CPE.
Drawing diagram…
Worked examples
Example 1: The VRRP timers
Advertisement interval 100 cs, Backup priority 128: Skew_Time = (128 × 100) ÷ 256 = 50 cs, Active_Down_Interval = 300 + 50 = 350 cs = 3.5 s.
Advertisement interval 10 cs (FRR advertisement-interval 100 ms), Backup priority 192: Skew_Time = (64 × 10) ÷ 256 = 2.5 cs, Active_Down_Interval = 30 + 2.5 = 32.5 cs = 325 ms.
Example 2: The virtual MAC
VRID 10 is 0x0a, so the IPv6 virtual MAC is 00:00:5e:00:02:0a.
Example 3: RA-only worst case
BaseReachableTime 30 s: the largest ReachableTime is 45 s. If the router fails just after a reachability confirmation, the host notices after 45 + 5 + 3 = 53 s. With a Reachable Time of 10 s advertised in the RA, the worst case drops to 15 + 5 + 3 = 23 s.
Lab
Goal: Measure RA-only failover and VRRPv3 failover on the same LAN.
You need: containerlab (or Proxmox VMs) with two FRR routers pop1 and pop2 on a shared LAN 2001:db8:3001:1::/64 (a Linux bridge), a Linux host on the LAN, and a far-end host reachable through both routers (via OSPFv3 or static routes).
- RA-only: enable RAs on both routers, with
ipv6 nd router-preference highonpop1. On the host show both default routers (ip -6 route show default) with their preferences. - Start
ping -D -i 0.2from the host to the far end, and hard-failpop1(docker pauseor disconnect its LAN interface without sending an RA). Measure the outage from the timestamps, and watch the neighbour entry (ip -6 neigh show dev eth1) go through STALE, DELAY and PROBE. Repeat with a clean shutdown (RA lifetime 0 first) and compare. - VRRPv3: suppress RAs on the physical interfaces, create the macvlans and configure VRID 10 with priorities 200 and 100 and a 1-second interval. Show
show vrrpon both routers and the host's default router and neighbour entry with MAC00:00:5e:00:02:0a. Capture an advertisement toff02::12and identify the version, VRID, priority and interval. - Repeat the hard failure and measure the outage. Compute the expected Active_Down_Interval first. Then set the interval to 100 ms on both routers and measure again.
- Bring
pop1back and show preemption. Note which link-local address the RAs come from before and after failover on your FRR version, and whether a shared link-local VIP works.
What to submit: configurations, show vrrp output, the capture, the timer calculations and a table of measured outages for each test with your explanation.
Summary
- IPv6 hosts learn all routers from RAs; a hard router failure is detected by NUD, which takes tens of seconds (worst case 53 s with defaults).
- Default Router Preference (RFC 4191) makes one router primary without any extra protocol.
- VRRPv3 (RFC 9568) uses ff02::12, protocol 112, virtual MAC 00:00:5e:00:02:VRID, and a link-local first virtual address.
- Active_Down_Interval = 3 × interval + (256 − priority) × interval ÷ 256: about 3.6 s by default.
- Suppress RAs on the physical interfaces when using VRRP; FRR needs macvlans and counts the interval in milliseconds.
- Next lesson (L4.08): Path MTU and fragmentation in routed networks.
Quiz imported · 9 questions · pass mark 70%. Lab questions are not auto-marked.