Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

BGP messages and BGP neighbor status

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

There are five kinds of message in BGP

1. Open (code 1): used to establish a connection, including the version number (such as BGP3/BGP4) Hold Time=90s (specified by RFC1771). Is a negotiation process, subject to the smaller Hold Time), Router-ID (OSPF and BGP can be manually configured), AS number (range from 1mm 65535, in which the AS number range of 6451265535 is kept private)

2. KeepAlives (code 4): periodic transmission is used to maintain the connection check path (this packet is unreliable). T=Hold Time/3, Hold Time=0 = > No KeepAlive.,keepalive is a 19-byte BGP message header with no data field.

3. Update (code 2): the message consists of three components: the network layer reachability message (NLRI), the path attribute, and the revoked route. Including the path and attributes to the destination network, to update routing information, there is only one path at a time, but there can be multiple networks. Update can delete (declare unreachable) and add (declare reachable) routes. Its content is the length of the prefix

4. Notification (code 3): when an error occurs in the network (Error), disconnect the connection and send a notification to the other party when it is detected.

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.

There are 5 states in which BGP neighbors establish a session:

1. Idle: looks up the routing table, the process BGP initializes its resources, resets a connection retry timer, initiates a TCP connection, and starts listening to connections initiated by the remote peer.

2. Connect: after finding the routing table, perform the TCP three-way handshake. If the TCP connection is successful, you will go to OpenSent status. If the TCP connection fails, you will go to active status and try to connect again.

3. Open Sent: send an Open message message after shaking hands and wait for its peer to send an open message. If there is an error, send an error message and return to the idle state. If there is no error, start sending Keepalive and reset the keepalive timer.

4. Open Confirm: if you receive an Open message from the other party, if you receive a keepalive message, the BGP will enter the established state, and the neighbor relationship negotiation will be completed; if the system receives an update or keepalive message, it will restart the hold timer; if it receives the Notification message, BGP will return to the idle state.

5. Established: the session is established and the final state of the neighbor relationship negotiation process is established; at this point, the BGP will start exchanging routing update packets with its peers.

PS: Active status: when a router sends an OPEN packet to a neighbor waiting for a response, it times out if it has not received a response for a long time. After the timeout, does the status change to Idle or connect? An attempt was made to initiate a TCP connection to obtain a peer and successfully transferred to the Open Sent state. The connection retry timer timed out and returned to the connection state. This is due to a problem on the TCP link.??

The main causes of the problems are:

1. The ip-address configuration after the Neighbor command is incorrect.

two。 No Neighbor command (both sides)

3. Update source error or update source is unreachable.

Answer:

1. When BGP speaker is in the active state, BGP attempts to form a peer by initializing a transport protocol connection. If a transport connection is established, the OpenSent state is entered. (send OPEN information at the same time). If the ConnectRetry timer expires, BGP restarts the ConnectRetry timer and returns to the Connect state. Return to the Idle state only when the system is aborted, or when the TCP is artificially aborted.

two。 Q: in the IBGP relationship, the ip address of the next-hop you saw when you were in sh ip b. The next-hop address is the update source of the IBGP that advertises the route. It's still Router-id???.

The IP address of answer:next-hop is the update source address. Router-ID is actually just an identity of a router and doesn't make much sense. It can be virtual. For example, it is usually the loopback address. TCP is not required to be reachable. However, the update source must be TCP reachable. Otherwise, how to ensure that the routing information update must convey the destination? Right.

There is another solution, the key is to look at the tcp session in sh ip bgp nei, but there is still no one. If not, check the routing and acl.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report