In summary, once you configured the neighbor IP address, router will try to reach that neighbor IP address on destination TCP port 179 using his routing table.
When TCP 3-way handshake completes, router will send an BGP Open message. (This message is similar to to the hello packet that EIGRP & OSPF use)
When the Open message has been sent and received and all other parameters match (like authentication) then the neighbors will reach the established state..
All the states are described in detail in the following..
Idle
The this state is the initial BGP state. In Idle state, the router refuses all connection requests from neighbors.
The router statrs a TCP connection with its BGP peer and goes to Connect State only after receiving a Start event from the system.
The Start event occurs when an operator configures a BGP process or resets an existing BGP process or when the router software resets a BGP process.
Connect
In this state, router starts the ConnectRetry timer and waits to establish a TCP connection.
If the TCP connection is established, the router sends an Open message to the peer and goes to the OpenSent state.
If the TCP connection fails to be established, the router moves to the Active state.
Active
In this state, the router keeps trying to establish a TCP connection with the peer.
If the TCP connection is established, the router sends an Open message to the peer, closes the ConnectRetry timer, and changes to the OpenSent state.
If the TCP connection fails to be established, the router stays in the Active state.
If the router does not receive a response from the peer before the ConnectRetry timer expires, the BGP device returns to the Connect state.
OpenSent
In this state, the router waits an Open message from the peer and then checks the validity of the received Open message, including the AS number, version, and authentication password.
If the received Open message is valid, the router sends a Keepalive message and changes to the OpenConfirm state.
If the received Open message is invalid, the router sends a Notification message to the peer and returns to the Idle state.
OpenConfirm
In this state, the router waits for a Keepalive message or Notification message from the peer.
If the router receives a Keepalive message, it goes to the Established state. If it receives a Notification message, it returns to the Idle state.
Established
In this state, the router exchanges Update, Keepalive, Route-refresh, and Notification messages with the peer.
If the router receives a valid Update or Keepalive message, it considers that the peer is working properly and maintains the BGP connection with the peer.
If the router receives an ivalid Update or Keepalive message, it sends a Notification message to the peer and returns to the Idle state.
If the router receives a Route-refresh message, it does not change its status.
If the router receives a Notification message, it returns to the Idle state.
Also If the router receives a TCP connection termination notification, it terminates the TCP connection with the peer and returns to the Idle state.
No comments:
Post a Comment