BGP session keepalive and hold times

At the beginning of the BGP peering establishment, the BGP neighbors agree on the hold time value (included in OPEN message): the time a peering would be maintained without the reception of a KEEPALIVE or UPDATE…

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,

The keepalive time is the time interval between the sending of KEEPALIVE messages. Hold time, the time a BGP peering is maintained w/o any KEEPALIVE or UPDATE reception from the peer. Minimum acceptable hold time, the minimum accepted hold time of a specific neighbor. The default values are 60, 180 and 180 seconds, respectively…

A minimum acceptable hold time,

Why should the minimum acceptable hold time be less than or equal to the configured hold time? 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 (cause the peering session to not establish) …

In case 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 to generate keepalive messages or updates in a timely manner…

This parameter may help get around bad network condition, that may impact the peering signalling operation, too…

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 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…

atlink'admin

Learn More →

Leave a Reply

Translate »