TOP 6 BGP Neighbor States

Posted By: 2019-03-11

The neighbor state machine can be used to describe the establishment and maintenance of the BGP connection. It will have the following 6 states:

1, ldle (idle) state

BGP always starts with the ldle state, which rejects all inbound connections. Only after BGP is started, the BGP process will initialize all BGP resources, initialize the TCP connection to the neighbor, listen to the TCP initialization message from the neighbor, and change to the connection state. The startup event is generally configured with a BGP process.

2, Connect status

After entering the Connect state, the BGP process will wait for the completion of the TCP connection (three-way handshake). When the TCP connection is established successfully, BGP will send an Open message to the neighbor and enter the OpenSent state. If the TCP session is not established, BGP will continue to listen for the connection initiated by the neighbor, open the connection retry timer, and migrate to the Active state. Connect→→OpenSent (TCP connection establishment); Connect→→Active (TCP connection is not established yet).

3.Active state

In this state, the BGP process continues to try to establish a TCP connection with the neighbor. If the TCP connection is established successfully, the BGP process clears the connection retry timer, completes the initialization process, and sends an Open packet to the neighbor and migrates to the OpenSent state.

If the BGP process is still active after the connection retry timer expires, the process will return to the connection state and listen for the TCP session initiated by the neighbor. This process will loop repeatedly until it hears the TCP session initiated by the neighbor.

4.OpenSent (open send) status

After entering this state, an Open message has been sent, and BGP will always wait for Open messages from neighbors. Once the Open message is received, each field of the message will be checked. If there is an error, the Notification message will be sent to the Idle state.

If the received Open message is correct, it will send a Keepalive message and discuss the time of the Keepalive timer and Keepalive. And migrate to the OpenConfirm state.

5.OpenConfirm status

After entering this state, the BGP process will wait for the Keepalive or Notification message confirmed by the neighbor. If the Keepalive message is received, it will be migrated to the Established state. If it is a Notification message, it will be migrated to the Idle state.

6.Established state

Entering this state indicates that the BGP peering connection is formally established. The peers exchange Update, Keepalive, and Notification messages. If an Update or Keepalive message is received, the hold timer is restarted. If a Notification is received. The message will be migrated to the Idle state.

Note:

1Q: Staying in Active or ldle for a long time, what is the possible reason?

A: a) The router does not have a route to the source IP address in the BGP Open packet (debug ip bgp output: no route)

b) The wrong IP address is configured in the neighbor command (debug ip bgp output: no route)

c) The update source address is not configured in the neighbor command (debug ip bgp output: Connection refused by remote host)

d) The TTL value problem is not considered in the neighbor command to establish an eBGP neighbor.

e) no neighbor command configured

f) AS number configuration error (debug ip bgp output: Connection refused by remote host)

2 When we operate BGP on the actual network, in order to avoid route turbulence, you can use the router(config-router)# neighbor A.B.C.D shutdown command to temporarily disable the BGP neighbor. The neighbor configuration is not deleted but the route is lost.

3 View the command show ip bgp summary # Observe that the last column is displayed as blank or numeric, indicating that the neighbor is established normally.

Run the show ip bgp neighbors command. # BGP State is displayed as Established to indicate that the neighbor is established normally.

SPOTO focus on IT certification training for 16 years. You can go SPOTO to get more details and latest news of CCIE certification.

FAQ

Dumps