Que1. Assuming bgp is running on a network device, will the route advertisement and FIB programming(basically populating entries in hardware) occur in parallel? Or does it occur sequentially, meaning, first the FIB is programmed and then the routes are advertised?

Que2. Ideally if a network device advertise the routes before FIB programming, this will lead to traffic blackholing/traffic getting dropped. Is that correct understanding?

Que3. How about withdraw routes ?

  • 2
    BGP only advertises prefixes that are already in the routing table, it does not advertise any to which it does not already have a route. – Ron Maupin Nov 3 '19 at 4:07
  • @RonMaupin, if a route exists in routing table, is it confirmed for sure that the FIB has already been programmed ? – fsociety Nov 3 '19 at 4:10
  • I'm not sure I follow you. You seem to think there is a difference. The FIB is the routing table that a router uses to route packets. – Ron Maupin Nov 3 '19 at 5:15
  • 1
    Search for BGP state machines. Logically I think the route should be already in FIB before it is advertised to other neighbors, to prevent a black hole. – manish ma Nov 3 '19 at 8:06
  • 1
    A reminder that BGP is optimized to handle hundreds of thousands of routes rather than rapid convergence. This is different than IGPs (ex. OSPF) which converge quickly but cannot handle as many routes. You seem very concerned about BGP packet loss due to an update being propagated to another router (and route/fib processing there) before FIB installation on the local router. I’d be more concerned with why there was an update in the first place. It will take several minutes for the update to get through the Internet, and if you issue too many updates for the same route you will get dampened. – Darrell Root Nov 4 '19 at 4:51

To a certain point, the answer is "that depends on the implementation". However, it's very likely that the forwarding table is updated as soon as possible, while BGP updates have a slightly lower priority and are processed afterwards. As you've described, it doesn't make sense to advertise a route that's not working yet.

Removing routes follows the same logic - an obsolete route is removed from the FIB before a BGP update can be sent out and processed by the other peers. In extreme, that could lead to a temporary routing loop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.