Configuring a BGP keepalive interval and holdtime

After establishing a BGP connection, two routers send keepalive messages periodically to each other to keep the connection. If a router receives no keepalive or update message from the peer within the holdtime, it breaks the connection.

If two parties have the same timer assigned with different values, the smaller one is used.

Follow these steps to configure BGP keepalive interval and holdtime.

To do...

Use the command...


Enter global configuration context


Enter BGP context

bgp as-number  

Configure the global keepalive interval and holdtime

timers {keepalive-time} {hold-time}  

Configure the keepalive interval and holdtime for a peer

neighbor {ip-address} timers {keepalive-time} {hold-time}

Optional. By default, the keepalive interval is 60 seconds, and holdtime is 180 seconds.

  • The maximum keepalive interval should be one third of the holdtime and no less than 1 second. The holdtime is no less than 3 seconds unless it is set to 0.

  • Intervals set with the neighbor timers command are preferred to those set with the timers command.

  • If the router has established a neighbor relationship with a peer, you need to reset the BGP connection to validate the new set timers.