The values of BGP Keepalive and hold timers determine the speed at which BGP detects network faults. You can adjust the values of these timers to improve network performance.
Keepalive messages are used by BGP to maintain peer relationships. After establishing a BGP connection, two peers periodically send Keepalive messages to each other to detect BGP peer relationship status. If a device receives no Keepalive message from its peer after the hold timer expires, the device considers the BGP connection to be closed.
If the values of the timers change after the timer command or the peer timer command is run, the BGP connection set up among routers is interrupted. So, confirm the action before you use the command.
Keepalive and hold timers can be configured either for all peers or peer groups, or for a specific peer or peer group. Keepalive and hold timers configured for a specific peer take precedence over those configured for the peer group of this peer. In addition, Keepalive and hold timers configured for a specific peer or peer group take precedence over those configured for all peers or peer groups.