You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Static route on a VPC VR should win over a BGP route for the same prefix #14941
When a VPC router already has a BGP route for a prefix, a static route for the same prefix isn't programmed, because CsStaticRoutes.py only adds a route when ip route show | grep '^' finds nothing for that prefix.
If the static is there first, it stays and BGP never replaces it. So whichever route arrives first wins, and after a router restart the result can flip.
I'd like the static to always win on the same prefix - this is the way most routing platforms operate.
Operator BGP peers only accept a default route, so this comes up with tenant BGP on private gateways (#14687). There, keeping the static routes in place while BGP comes up is the planned migration path.
The change is one line: the check ignores routes with proto bgp, so the static is added at metric 0. zebra treats it as a kernel route (distance 0) and withdraws its own route.
I tested this with FRR 8.4.4. The static held through session resets, peer withdraw and re-advertise, and a zebra restart. Removing the static brought the BGP route back straight away.
Activity