When 2 routers are linked directly together with eBGP between them, how is a link failure detected ? With the BGP timers ? Or faster with some sort of L1 tool?

For instance, assume we have the following architecture: enter image description here

BGP 1 has a lighter weight than BGP 2 (it's active/passive mode). So BGP 1 is the active route, all the traffic takes this path. BFD is not considered here.

It's running and suddenly Router 21 breaks down hence is not able to respond to Router 11 anymore. How does the router 11 detect it?

Thank you in advance, Kind regards,

  • It depends. What type of failure? – Ron Maupin Dec 7 '20 at 19:58
  • Why does it depend? The other router turns off for instance or the cable is cut. – huseyin39 Dec 7 '20 at 20:03
  • 1
    Those are two very different things. If you break the cable to your router, the interface fails. If the other router goes down, it depends on how. If it is shut down, it will close the TCP connection. If it is remote, and the power goes out at the remote site, you will need to wait for a timeout. There are many different failure scenarios, and there is no one-size-fits-all answer. – Ron Maupin Dec 7 '20 at 20:09
  • @RonMaupin If I cut the cable, how does the router detect it? Then, in the worst case (when router 2 breaks down?), with only UDP sessions, how long would it take to Router 1 to detect that Router 2 is unreachable ? The 3 keepalive BGP timers? – huseyin39 Dec 7 '20 at 20:19
  • There is no UDP in the scenario. BGP uses TCP. Edit your question to include the failure scenarios you want. The is explicitly not a discussion forum. We will give specific answers to specific questions. If you want a discuassion, we have Network Engineering Chat for that. – Ron Maupin Dec 7 '20 at 20:26

There are two primary ways routing protocols can detect partner failures.

  • messaging timeouts -- i.e. heartbeat, keepalive, etc.
  • interface link state

With the prevalence of ethernet links, it is increasingly difficult for peers to actually sense end-to-end link failures. In the simplest case, if we are each connected to a switch (same or different, doesn't matter), I won't know when your link drops, and v.v. -- without something extra -- BFD, udld, vendor specific link state mirroring, etc. It's not like my interface is directly cabled to yours.

  • In this case the router's 1 interface is directly cabled to router's 2 interface. I'm wondering how long would it take in the worst case to detect the link failure. 3 x keepalive ? – huseyin39 Dec 8 '20 at 9:02
  • If its watching link state, fraction of a second. – Ricky Dec 8 '20 at 18:14
  • What if the Router 2 can't route packet: CPU down, out of memory... ? – huseyin39 Dec 8 '20 at 21:10

So BGP has keepalives and hold timers; keepalives are sent every 30s, and hold down is 3 x keepalive.

BGP will countdown from 90s every time it receives a keepalive. If it gets to 0, it will bring the session down.

Also, if it detects an interface-down on which the session is established, it will bring down the session immediately, without waiting for the hold time.


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.