BGP neighbor negotiation process

Source: Internet
Author: User

Today, the BGP neighbor negotiation process found such a problem during the sorting process.

BGP has 5 types of messages

1. open (code 1): used to establish a connection, including the version number (such as BGP3/BGP4) Hold Time = 180 s (it is a negotiation process, subject to a small Hold Time ), router-ID (OSPF and BGP can be manually configured), AS number (range: 1 ~ 65535, of which 64512 ~ 65535 );

2. keepAlives (code 4): periodical transmission is used to maintain the Connection check path (this package is unreliable), T = Hold Time/3, Hold Time = 0 => No KeepAlive ., keepalive is a BGP message header that is sent in a 19-byte cycle and has no data domain.

3. Update (code 2): A Message consists of three components: Network-layer accessibility message (NLRI), path attribute, and revoked route. Including the path and attributes to the target network, and used to update route information. One update only has one path, but multiple networks are allowed. Update can be used to delete (declared inaccessible) and add (declared reachable) routes. Its content is the length of the prefix.

4. Notification (code 3): an Error occurs in the network. After detection, the connection is disconnected and a Notification is sent to the other party.

5. Route-Reflesh message: an optional message (negotiated during capability advertisement) that is sent to request dynamic BGP route updates from the Adj-RIB-Out table of a remote BGP speaker

The negotiation process is basically: Idel, connect, open sent, open confirm, establish.

Five statuses of BGP peer-established sessions:
1. Idle: Find the route table. In this process, BGP initializes its resources, resets a connection retry timer, initiates a TCP connection, and begins to listen to the connection initiated by the remote peer.
2. Connect: after finding the route table, perform TCP three-way handshake. If the TCP connection is successful, it is switched to the OpenSent State. If the TCP connection fails, it is switched to the active state and the attempt is made to Connect again.
3. open Sent: sends an Open message after it is ready to use, and waits for its peer to send an Open message. If an error occurs, it sends an error message and returns it to the idle state. If no error occurs, then start sending Keepalive and reset the keepalive timer.
4. open Confirm: receives an Open message from the other party. If the keepalive message is received, BGP enters the established State, and the neighbor relationship negotiation is completed. If the system receives an update or keepalive message, it restarts the persistence timer. If a Notification message is received, BGP returns to the idle state.
5. Established: the session is Established and the final state of the neighbor relationship negotiation process. At this time, BGP will begin to exchange route update data packets with its peer.
PS: Active status: When the router sends an OPEN packet to the neighbor for response, if the response is not received for a long time, the timeout occurs. After the timeout, the status changes to Idle or connect status? An attempt to initiate a TCP connection to obtain the peer body successfully switches to the Open Sent status. The connection retry timer times out and returns to the connection status. This is due to a problem on the TCP link .??
The main causes of the problem are:
1. The ip address Configuration after the Neighbor command is incorrect;
2. No Neighbor command (both sides are required)

3. The update source is incorrect, or the update source is inaccessible.

Answer:

1. When the BGP speaker is active, BGP tries to form a peer by initializing the transmission protocol connection. If the transmission connection is established, it enters the OpenSent state. (Send OPEN information at the same time ). If the ConnectRetry timer times out, BGP restarts the ConnectRetry timer and returns to the Connect status. It is returned to the Idle State only when the system is suspended or TCP is manually aborted.

2. Q: In the IBGP relationship, the next-hop ip address displayed when sh ip address B is displayed. The next hop address is the update source of the IBGP that advertises the route .??? Or Router-id ???

Answer: The IP address of next-hop is the update source address. The Router-ID is actually only an identifier of the vro. It doesn't make much sense. It can be virtual. For example, it is usually the loopback address. TCP accessibility is not required. However, the update source must be up to TCP. Otherwise, how can we ensure that the route information is updated to a certain destination? Right.

There is also a solution that focuses on the tcp session in the sh ip bgp nei, but it still does not exist. If no, check the route and acl.

Article entry: csh responsible editor: csh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.