[BGP number of topics through interviews of private kitchens] Phase II: BGP state machine Detailed

There are six state machine interaction BGP peer of: idle (Idle), connected (Connect), active (Active), Open message is sent (OpenSent), Open packet Confirmed (the OpenConfirm) and the connection is established (Established).

During established BGP peer usually visible three states are: Idle, Active and Established.

[BGP number of topics through interviews of private kitchens] Phase II: BGP state machine Detailed

Idle state:

BGP Idle state is the initial state. In the Idle state, BGP rejects the connection request sent by a neighbor. Only after receiving this equipment Start event, it began to try to BGP TCP connections and other BGP peers, and go to the Connect state.

Connect state

In the Connect state, BGP starts a retransmission timer (Connect Retry), wait for the TCP connection is completed.

• If the TCP connection is successful, then the BGP Open packet is sent to the peer, and go OpenSent state.
• If the TCP connection fails, BGP go to Active state.
• If you connect retransmission timer expires, no response is received BGP BGP peer, the BGP continues to try and other BGP peer TCP connection stays in the Connect state.

Active state

In the Active state, BGP always trying to establish a TCP connection.

• If the TCP connection is successful, then the BGP Open packet is sent to the peer connection is closed retransmission timer, and go OpenSent state.
• If the TCP connection fails, BGP stay in the Active state.
• If you connect retransmission timer expires, no response is received BGP BGP peer, then go to Connect BGP state.

OpenSent state

In OpenSent state, BGP waits peer Open packet body, and AS number Open messages received, the version number, authorization code, etc. to be checked.

• If the Open the received message is correct, then send BGP Keepalive message, and go OpenConfirm state.
• If you find that the Open packets received an error, then send BGP Notification message to a peer, and go to the Idle state.

OpenConfirm state

In OpenConfirm state, BGP waits Keepalive or Notification messages. If you receive Keepalive message, go Established state, if the received Notification message, go to the Idle state.

Established state

In the Established state, BGP peers can exchange Update, Keepalive, Route-refresh message and Notification messages.

• If you receive the correct Update or Keepalive message, then BGP considers that the peer is running properly, it will remain BGP connection.
• If you receive an error message Keepalive or Update, then send BGP Notification message to inform the peer, and go to the Idle state.
• Route-refresh message does not change the BGP state.
• If you receive a Notification message, the BGP go to the Idle state.
• If you receive TCP chain demolition notice, then BGP disconnect, go to the Idle state

Guess you like

Origin blog.51cto.com/14417173/2482800
BGP