Home / Network / BGP session keepalive and hold times

BGP session keepalive and hold times

In this post we’ll deep into the operation of BGP that is a Border Gateway protocol aimed at connecting (routing information exchange) autonomous system in contrast with IGP (Interior Gateway Protocols) that run into each autonomous system. Thus, we do not need to have detailed information about IGPs to exchange routing information… before this routing information is exchanged, it is necessary to build neighborship between BGP routers.

At the beginning of the BGP peering establishment, the BGP neighbors agree on the hold time value (included in OPEN message, look at the upcoming figure showing a paquet capture for this information): the time a peering would be maintained without the reception of a KEEPALIVE or UPDATE… Keepalive messages help refresh BGP session information but if the timer reaches the hold time value, this informatoin is just sweept away.

Lab setup

In Cisco IOS version: Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.3(3)XB12, RELEASE SOFTWARE (fc2), It is possible to configure these times globally, per peer group or per neighbor.

Keepalive, hold and minimum acceptable hold times,

Essentially 2 timers are put into play : keepalive, and hold. The default values are 60, 180 and 180 seconds, respectively…

The keepalive time is the time interval between different keepalive message sendings.

On the other hand, the hold time is the time during which a BGP peering session is maintained before any KEEPALIVE or UPDATE reception from the peer.

The Minimum acceptable hold time is the minimum accepted hold time of a specific neighbor.

In the upcoming paragraphs, will explore in detail the operation of all these timers during the establishement of the BGP peering sessions and their maintenance…

A minimum acceptable hold time,

The Minimum acceptable hold time is the minimum accepted hold time of a specific neighbor and should be less than or equal to the configured hold time. Why?

Let’s suppose that this time is strictly greater than the configured hold time, then all the hold time values, received from the peer, that are between the local BGP router configured hold time and the minimum acceptable hold time, are not accepted which causes the peering session simply to not establish…

In the case where the BGP neighbor is not of equivalent class (very performant), this check on the received hold time guarantees that the local router would have the necessary resources (CPU, RAM, I/O, etc.) to generate keepalive messages or updates in a timely manner… it’s a way for it to pace the frequency of status update of the session.

In addition, this parameter may help get around bad network condition, that may impact the peering signalling operation, too… the more the condition is bad (flapping, unstable) the more big is the value of the holdown to allow the establishement of the session. This is a way to get rid of the bad condition of the network but does not mean that it’s safe to act like this for the simple reason that the information get obsolete and thus, may induce more network poor performance. Using Holddown timer in response to bad network condition need to be studied carefully…

Keepalive is local, hold is global…

If set to the default, the keepalive time calculation is based on the agreed upon session hold time. This is to ensure a correlated hold and keepalive time processing, and a more stable system…

But the administrator still has the control over the keepalive values to choose whatever value less than or equal to the third of the local router session hold time…

A step-by-step,

First and locally to each neighbor, the configured keepalive value is compared to the third of the configured hold time (hold time/3).

The minimum value of both is retained as the actual router keepalive.

At the reception of an OPEN message, each BGP router compares the BGP neighbor hold time to its corresponding local minimum acceptable hold time.

If the received hold time is less than the minimum acceptable hold time, a BGP NOTIFICATION message is sent to the neighbor and the neighborship session is reset.

Otherwise, the BGP router compares its configured hold time to the received hold time in the BGP neighbor OPEN message.

The minimum hold time is the new session hold time.

Locally to each BGP peer, the session keepalive time interval is deduced by comparing the configured keepalive to the third of the session hold time….

Conclusion,

BGP peers agree on the minimum hold time during session establishment and keepalive times, that are locally calculated, maybe different among peers.

If set to the default, the keepalive time calculation is based on the agreed upon session hold time. This is to ensure a correlated hold and keepalive time processing, and a more stable system…

But the administrator still has the control (directly per neighbor) over the keepalive values to choose whatever value less than or equal to the third of the local router session hold time…

The minimum acceptable hold time is to ensure that the BGP router and network have the necessary resources to support the peering signalling operation…

Leave a Reply

  • Transmit Power Control in IEEE 802.11 Cisco WLAN networks
    TPC stands for Transmit Power Control. It’s a one of Cisco RRM, Radio Resources Management, techniques that are aimed at tackling interference, cross and co-channel, in Wlan networks. RRM: TPC, CHD and DCA It works tightly with CHD, Covergate Hole Detection, to optimize transmit power. TPC tends to minimize the transmit power and CHD to eliminate
  • 10 security measures against 10 attacks in a LAN network – Part I
    An Ethernet switch is the central element of a LAN network and operates at data link OSI layer. Every switch port defines a collision domain and can extend a broadcast or broadcast frame domain that is stopped by a router routed interface that operates at network OSI layer. By default switches support one broadcast domain
  • Understand how Aruba ARMizes your WLAN for sure!
    Presenting ARM In this post, that is a part of a serie of post that discuss how Wlan to radio ressources management, we talk of Aruba way of doing it. The figure shows a simple wlan network of 6 AP or access points. This is heatmap showing that radio signal is very strong (in red)
  • Understand RIP Routing Timers All in One Shot!
    This post is part of a series of posts about dynamic routing protocols and especially RIP. We’ll try to get a deep understanding of its operation and function as an introductory to dynamic routing logic in general. You’ll see that what we think easy may hide an incrementing complexity… a little introduction Berfore we start
  • DUAL route FSM Processing of EIGRP Queries
    This blog is a part of series of posts about EIGRP routing protocol. Let’s recall that EIGRP is one of the so called IGP routing protocols. IGP stands for interior routing protocols as opposed to EGP or exterior routing protocols. In addition EIGRP is a hybrid as it borrows some similiarities to distance-vector and link-state
June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
Table of Contents