Keepalive messages are used by BGP to maintain peer relationships.
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 the 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.
Changing timer values using the timer command or the peer timer command interrupts BGP peer relationships between switches.
Setting the Keepalive time to 20s is recommended. If the Keepalive time is less than 20s, sessions between peers may be closed.