BGP keepalive timer

Unanswered Question
Mar 5th, 2008


When a link (leased link) between a BGP peer goes down (for example, between a customer site and ISP), does ISP BGP router immediately inform other BGP peers or does it wait for the BGP timer to expire to send out route withdrawal?

What is the impact of using low keepalive timer? what is the norm in the internet links with full BGP route.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.9 (7 ratings)
devang_etcom Wed, 03/05/2008 - 07:01

Keepalive has the same fundamental of detecting the connecting neighbor failure... by default bgp has keep alive of 60 second and hold time of 180 second so if you reduce the Keepalive timer then it will reduce the hold timer to so it will detect the neighbor more quicker then the default value.

Danilo Dy Wed, 03/05/2008 - 07:09


BGP keepalive timer is 60 seconds and the holdtimer is 180 seconds. When a BGP connection negotiate the holdtimer between two BGP peers started, the smaller of the two holdtimers will be choosen. Internet is not a stable network, setting the holdtimer too low will be bad to router CPU as the route will keep on widthrawing and adding. We usually keep the BGP holdtimer as it is. However, if you use BGP in a stable WAN environment, you may choose to reduce the holdtimer for fast convergence.



rana_beech Wed, 03/05/2008 - 15:00

Devang and Danny,

Thanks. What about my first question: when a leased line goes down between the two peer the does (customer and ISP), does the ISP BGP peer immediately notify other peers that the route is unavailable or does it wait for the holdtimer to expire?



devang_etcom Wed, 03/05/2008 - 15:34

Yes it will has to wait till the holdtimer expire as BGP peer by default not sending the notification of tearing down a BGP session... but you can configure to detect the fast tearing dwon of session...

mheusing Wed, 03/05/2008 - 17:33


actually there are several mechanisms and timers involved.

If the link doen event can not be detected, the BGP holdtime determines when the neighbor is missing.

Otherwise the link down event will immediately lead to a neighbor down event.

There is another timer involved, before sending the update. When an internal neighbor was sent an update, for the next 5 seconds no other update will be sent. As this usually is a route reflector, it might take another 5 seconds to reach all other BGP speakers in the ISP AS.

For external BGP the update timer is 30 sec by default, so it might take a couple of minutes to be propagated through the internet.

Hope this helps!

Regards, Martin

rana_beech Wed, 03/05/2008 - 20:21

Hi Martin,

Let me try to see if I got the correct understanding.

- If the link down event can be detected (which is my situation) it will immediate see this as neighbour down and will immediately send out an update to its RR. This means that they do not wait for the holdtime to expire.

- The RR will then take anohter 5 sec to send out updates to their clients.

- Then the ABR does not send the update immediately to another AS when if receives the route withdraw information for the RR. It actually waits for 30sec update interval to send the updates.

So if the ABR's update timer is due at 20s (say default is 30s and 10s has already passed)to another AS. The total time will be 5s+20s = 25s to the next AS. So the propogation to the rest of the rest of the internet will be few minutes.



mheusing Thu, 03/06/2008 - 05:50

Hi Arana,

You got it right, except for the fact, that usually there are two internal BGP sessions involved, one to the RR and one from the RR to the ABR, which could prolong the update propagation further.

Besides, an exact upper limit could only be given, if the timer values in the ISP network would be known. Those timers are all configurable and might have been adjusted to smaller values for faster convergence or larger values to lower CPU load.

Another point to consider: the behaviour after link down detection is also configurable (fast-external-fallover). If it is turned off, to avoid a loss of the BGP session in case there is only a short line flap the holdtime has to expire.

One last aspect for now: in case you have provider assigned IP addresses your network is likely part of an aggregate route announced to the internet by the ISP. Then there would be no external update through ABRs required.

You can check the exitence of your network in the internet by telneting to a Route server and use "show ip bgp ".

Route servers can be found f.e. at following the link "Route Servers".

Hope this helps!

Regards, Martin

Mohamed Sobair Thu, 03/06/2008 - 06:50

Hi Arana,

It's not a good idea to change the hello and holddwon timers for bgp that carries full routing table.

BGP keep alive and hold down which is (3 times keep alive) is designed alittle high because that bgp requires lots of memory and it consumes CPU of your router because of BGP normal operation , updates , .. etc.

The Keep alive could be changed in arouter that carries small bgp routes not a router carries full internet routes.



rana_beech Thu, 03/06/2008 - 08:03

Hi Martin,

Thank you for the verificatin and additional insight. As always very greatful to have you in these discussions.

Today this set up is using dual link to a single service provider using a private AS/Public IP given by the ISP. So I probably will not able to see the changes on the route servers, but certainly this is a great tool when it gets its own AS.

Hi Mohamed,

Thanks. Today I am only taking default route for this set up on both links so the timer is 15/45. When we start taking full routes we will use the default.




This Discussion