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.
BGP uses Keepalive messages 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 interrupted.
Changing timer values using the timer command or the peer timer command interrupts BGP peer relationships between routers. Therefore, exercise caution before running either of 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.