Page MenuHomeVyOS Platform

BGP routes missing from the kernel after a short link flap (FRR 10.7 zebra skip)
Open, Urgent!PublicBUG

Description

After a 3 ms carrier drop on the link toward a BGP next-hop, most BGP routes never get back into the kernel. zebra still lists them, so show ip route looks fine, but traffic to those prefixes is dropped:

ip route get 20.0.0.1        ->  RTNETLINK answers: Network is unreachable
ping from a downstream host  ->  From 10.0.2.1 Destination Net Unreachable

iBGP (the session stays up through the flap), routes missing from the kernel 300 s later; 1.5.1 got every route back in every run:

routes   lost on rolling
300      all
10k      all
50k      all
100k     ~92k
200k     ~190k

Same on two test hosts. It does not heal: the gap is unchanged at +10 and +30 min. A hard clear of the peer (clear ip bgp <peer>, back in 5-6 s) or an FRR restart (10 s) fixes it; clear ip bgp <peer> soft in and a route-map change do not.

eBGP is hit only sometimes and it depends on the host: 200k routes lost in ~50% of flaps on one host, 0-1 of 8-10 on the other.

Cause
FRR "Kernel skip some route updates" (https://github.com/FRRouting/frr/pull/20666, 4842861082, first in 10.7.0). When the re-add of a prefix arrives while its delete is still queued, zebra merges them, sees the same nexthop group, skips the update and marks the route installed, though the kernel route was already deleted. zebra's "Route updates skipped" counter equals the number of lost routes in every run. Upstream issue: https://github.com/FRRouting/frr/issues/23277 (open).

Workaround
None for iBGP: timers delayopen (3, 6, 10) changed nothing, since the session never resets. For eBGP (the session does reset there), timers delayopen 6 on both ends (vtysh only, no VyOS CLI) avoided it in 24/24 runs vs 9/22 lost without; delayopen 3 6/6. It delays the re-established session by that many seconds. After a flap, a hard clear of the peer or an FRR restart brings the routes back.

Suggested fix
Revert or patch PR #20666 in the VyOS FRR build until #23277 is fixed upstream.

Details

Version
rolling, 1.5
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)