3.7.a Describe implement and troubleshoot peer relationships

  • 3.7.a [iii] States, timers

● Idle State:

● Refuse all incoming BGP connections

● Start the initialization of event triggers.

● Initiates a TCP connection with its configured BGP peer.

● Listens for a TCP connection from its peer.

● Changes its state to Connect.

● If an error occurs at any state of the FSM process, the BGP session is terminated immediately and returned to the Idle state. Some of the reasons why a router does not progress from the Idle state are:

● TCP port 179 is not open

● A random TCP port over 1023 is not open

● Peer address configured incorrectly on either router

● AS number configured incorrectly on either router

● Connect State:

● Waits for successful TCP negotiation with peer.

● BGP does not spend much time in this state if the TCP session has been successfully established.

● Sends Open message to peer and changes state to OpenSent.

● If an error occurs , BGP moves to the Active state. Some reasons for the error are:

● TCP port 179 is not open.

● A random TCP port over 1023 is not open.

● Peer address configured incorrectly on either router.

● AS number configured incorrectly on either router.

● Active State:

● If the router was unable to establish a successful TCP session, then it ends up in the Active state.

● BGP FSM tries to restart another TCP session with the peer and, if successful, then it sends an Open message to the peer.

● If it is unsuccessful again, the FSM is reset to the Idle state.

● Repeated failures may result in a router cycling between the Idle and Active states. Some of the reasons for this include:

● TCP port 179 is not open.

● A random TCP port over 1023 is not open.

● BGP configuration error.

● Network congestion.

● Flapping network interface.

● OpenSent State:

● BGP FSM listens for an Open message from its peer.

● Once the message has been received, the router checks the validity of the Open message.

● If there is an error it is because one of the fields in the Open message does not match between the peers, e.g., BGP version mismatch, MD5 password mismatch, the peering router expects a different My AS, etc. The router then sends a Notification message to the peer indicating why the error occurred.

● If there is no error, a Keepalive message is sent, various timers are set and the state is changed to OpenConfirm.

● OpenConfirm State:

● The peer is listening for a Keepalive message from its peer.

● If a Keepalive message is received and no timer has expired before reception of the Keepalive, BGP transitions to the Established state.

● If a timer expires before a Keepalive message is received, or if an error condition occurs, the router transitions back to the Idle state.

● Established State:

● In this state, the peers send Update messages to exchange information about each route being advertised to the BGP peer.

● If there is any error in the Update message then a Notification message is sent to the peer, and BGP transitions back to the Idle state.

● If a timer expires before a Keepalive message is received, or if an error condition occurs, the router transitions back to the Idle state.

BGP keepalive timer is 60 seconds and the hold-timer is 180 seconds. When a BGP connection negotiate the hold-timer between two BGP peers started, the smaller of the two hold-timers will be chosen. Internet is not a stable network, setting the hold-timer too low will be bad to router CPU as the route will keep on withdrawing and adding. We usually keep the BGP hold-timer as it is. However, if you use BGP in a stable WAN environment , you may choose to reduce the hold-timer for fast convergence.

Adam, Paul (2014-07-12). All-in-One CCIE V5 Written Exam Guide (Kindle Locations 3847-3850).  . Kindle Edition.

http://networkgeekstuff.com/networking/cisco-bgp-timers-re-explained/