BGP – Messages and Adjacency States

BGP Messages

Within BGP (as per RFC 1771) there are four BGP message types. They are,

  • OPEN – Used to open a BGP communication session between peers. This is the first message sent by each side once the 3WHS is complete, and can be thought of as a HELLO. Only once each side has confirmed the OPEN message, the other message types can be exchanged. [1]
  • UPDATE – Used to exchange routing information, such as announce new routes or withdraw previously announced routes.
  • KEEPALIVE – Notifies BGP peers that a device is active. Used to keep sessions (i.e long periods with no updates) from expiring.
  • NOTIFICATION – This message is a result of an error condition occurring. These message types are used to close an active session, and also inform the peer to the reason why.

BGP Neighbor Adjacency States

Just like OSPF or EIGRP, BGP establishes a neighbor adjacency with other routers before any routing information is exchanged. However BGP does not use broadcast or multicast for BGP neighbor discovery, instead, neighbors are configured manually, using TCP/179 for communication.

In order for two BGP systems to become neighbors, they will go through a series of BGP Neighbor Adjacency States. They are:

  1. Idle – BGP resources are initialized by the router. BGP inbound connection attempts are refused. BGP initiates a TCP connection to the peer.
  2. Connect – BGP waits for the 3WHS to complete. If successful, the OPEN message is sent to the peer and BGP moves to the OpenSent state. If unsuccessful we continue to the Active state. However, if the ConnectRetry expires, BGP will remain in this state, with the timer being reset and a new 3WHS being initiated.
  3. Active – The ConnectRetry timer is reset, and BGP returns to the Connect state.
  4. OpenSent – BGP waits for an OPEN message from its peer. Once received, BGP moves to the OpenConfirm state.
  5. OpenConfirm – BGP waits for a keepalive message from its peer. If received before the timeout expires, BGP moves to the Established state. Otherwise, BGP transitions to Idle.
  6. Established – Both peers exchange UPDATE messages. If there is an error within any of the UPDATE messages, the BGP peer will send a NOTIFICATION message and enter the Idle state.

Figure 1 – BGP States.  [2]


[1] “BGP – Cisco.” 8 Dec. 1999, . Accessed 3 Nov. 2017.
[2] “BGP Neighbor Adjacency States |” 2 Apr. 2015, . Accessed 18 Feb. 2018.

Rick Donato

Want to become a networking expert?

Here is our hand-picked selection of the best courses you can find online:
Cisco CCNA 200-301 Certification Gold Bootcamp
Complete Cyber Security Course – Network Security
Internet Security Deep Dive course
Python Pro Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial