Troubleshooting guide for BGP Neighbors establishment issues

Troubleshooting
Updated 08-20-2024 01:57:10 AM FAQ view icon2344
This Article Applies to: 

Contents

Objective

Requirements

Introduction

Troubleshooting steps

Case 1. Unable to Establish Non-Directly-Connected IBGP Neighbor Relationship

Case 2. Unable to Establish Directly-Connected EBGP Neighbor Relationship

Conclusion

Objective

This article introduces troubleshooting guidance for two typical scenarios that fail to create BGP neighbors.

Requirements

Omada Pro L3 Managed Switch

Introduction

The Border Gateway Protocol (BGP) is a distance vector routing protocol that enables routing reachability between Autonomous Systems (AS) and selects the best route.

BGP establishes a unique unicast-based connection for each BGP neighbor. To enhance the reliability of peer connections, BGP uses TCP (port 179) as the underlying transmission mechanism. Since tasks like acknowledgment, retransmission, and sequencing are handled by the TCP layer, the session maintenance and update mechanisms of BGP are greatly simplified. As BGP operates over TCP, a separate point-to-point session needs to be established for each peer.

Each BGP node passes routes from the routing table via downstream neighbors. BGP nodes perform route calculations based on the routes they advertise and pass the calculated results to upstream neighbors, so it’s the primary task for routing BGP routes to successfully establish BGP neighbors.

If a BGP session is established between neighbors in the same AS, the session is an Internal BGP (IBGP) session, such as Switch-1 and Switch-2 in Case 1. If a BGP session is established between neighbors in different ASs, the session is an External BGP (EBGP) session, such as Switch-2 and Switch-3 in Case 2.

Troubleshooting steps

Case 1. Unable to Establish Non-Directly-Connected IBGP Neighbor Relationship

The following figure illustrates a common IBGP neighbor relationship: Switch-1 and Switch-2 are both working in AS 100, connected directly with interface addresses 192.168.12.1 and 192.168.12.2 respectively. Follow the steps below to establish an IBGP neighbor relationship using their loopback 1 interface addresses.

Step 1. Check if BGP processing is enabled on Switch-1 and Switch-2:

Enable the BGP processing in the config view using the following command:

router bgp <AS-Number>

Here, AS-Number represents the AS domain in which the local BGP processing is running. AS refers to an IP network under a single administrative entity with the same routing policy. Each AS in a BGP network is assigned with a unique AS number for differentiation. AS numbers are divided into 2-byte AS numbers (ranging from 1 to 65535) and 4-byte AS numbers (ranging from 1 to 4294967295).

Step 2. Check if BGP neignbor is enabled on Switch-1 and Switch-2:

Enable the BGP neighbor in the BGP view using the following command:

neighbor <neighbor-address> remote-as <neighbor-as-number>

Here, neighbor-as-number represents the AS domain in which the neighbor BGP processing is running. When configuring BGP neighbors, if the neighbor’s AS number is the same as the local AS number, it will be an IBGP neighbor; otherwise, it will be an EBGP neighbor. To enhance the stability of the BGP connection, it is recommended to use the reachable loopback interface address to establish IBGP connections, and the Router ID can be manually configured as the loopback interface address.

Step 3. Check if the specified update-source interface is enabled on Switch-1 and Switch-2:

Enable the update-source interface for the neighbor in the BGP view using the following command:

neighbor <neighbor-address> update-source <IPv4-address>

When establishing a BGP connection using the IP address of the loopback interface, it is recommended to apply the neighbor <neighbor-address> update-source <IPv4-address> command on both ends on of the peer to ensure the correctness of the interfaces and addresses of the TCP connections on both ends. If this command is only applied on one end, it may lead to a failure in establishing the BGP connection.

In this example, the interface should display as below after correct configuration:

Then, use the show ip bgp summary command to check the status of the BGP neighbors. The figures below show the BGP neighbor status of Switch-1 and Switch-2: The State/PfxRcd column displays the status of the corresponding BGP neighbor or the number of received BGP route entries. If the BGP neighbor is successfully established, the number displayed in this column indicates the BGP route entries received from that neighbor.

If the BGP neighbor establishment fails, the State/PfxRcd column shows as "Active", indicating the BGP is attempting to establish a TCP connection, which is an intermediate state of BGP, as shown in the following figure.

Step 4. Check the unicast route reachability for the corresponding neighbor addresses on Switch-1 and Switch-2:

If the BGP neighbors still cannot be successfully established after performing steps 1 - 3, it is recommended to check the unicast route entries on Switch-1 and Switch-2. In this example, two loopback interface addresses 10.10.10.10 and 20.20.20.20 (ensure their unicast reachability) are used as IBGP neighbor addresses. First, try using the Ping tool to check the route reachability. As shown in the figure below, Switch-1 fails to ping the neighbor address 20.20.20.20, indicating that this address is unreachable.

Check the IPv4 unicast route entries. As shown in the figure below, Switch-1 does not have a route to the 20.20.20.20/32 network segment. This can be addressed by sending the local loopback interface address to the neighbor through configuring static routes, RIP, OSPF, IS-IS, and other methods.

To enhance the dynamic stability of the network, we use OSPF as an example here. Configure the OSPF process of Switch-1 and Switch-2, as shown below.

Then recheck the neighbor address routes and reachability on Switch-1 and Switch-2, as shown below. Once the reachability of the neighbor addresses is ensured, the IBGP neighbors can be successfully established.

Step 5. Check for any other configurations that may affect the establishment of BGP neighbors:

no bgp default ipv4-unicast command: By default, the bgp default ipv4-unicast feature is enabled. If no bgp default ipv4-unicast is manually configured, the neighbor <IPv4-address> activate command is required to enable newly created BGP neighbors.

Without the neighbor <IPv4-address> activate command, the neighbor will remain unactivated.

neighbor <IPv4-address> shutdown command: Use this command to manually shut down a neighbor and switch the neighbor’s state to the “Idle” state, as shown in the following figure. To restore the neighbor’s state and attempt to reestablish the connection, perform the no neighbor <IPv4-address> shutdown command in the BGP view.

Case 2. Unable to Establish Directly-Connected EBGP Neighbor Relationship

The following topology shows a typical eBGP neighbor relationship: Switch-2 and Switch-3 operate in AS 100 and AS 200, and are connected directly with interface addresses 192.168.23.2 and 192.168.23.3 respectively. Follow the steps below to establish an EBGP neighbor relationship using the two addresses.

Step 1. Check if BGP processing is enabled on Switch-2 and Switch-3:

Enable the BGP processing in config view with the command:

router bgp <AS-Number>

Step 2. Check whether BGP neighbors are enabled on Switch-2 and Switch-3:

Enable BGP neighbors in BGP view with the command:

neighbor <neighbor-address> remote-as <neighbor-as-number>

As in case 1, for enhanced BGP connection stability, it's recommended to manually configure the Router ID as the loopback interface address.

Taking this case as an example, the interface after completing the above steps shall show as below:

Then, use the show ip bgp summary command to check the status of the BGP neighbors. The State/PfxRcd column displays the status of the corresponding BGP neighbor or the number of received BGP route entries. If the BGP neighbor is successfully established, the number displayed in this column indicates the BGP route entries received from that neighbor.

If the BGP neighbor establishment fails, the State/PfxRcd column displays as "Active", as shown below.

Step 3. Check the interface status of Switch-2 and Switch-3 and the reachability of the corresponding neighbor addresses:

If the BGP neighbors still cannot be successfully established after performing steps 1 - 2, try using the Ping tool to check the reachability of the neighbor addresses, as shown in the flowing figure. Switch-2 fails to ping the neighbor address 192.168.23.3, indicating that this address is unreachable. For such a scenario, it is recommended to check the port link status, L3 interface configuration, etc. Once the neighbor address is reachable, the EBGP neighbor can be successfully established.

Step 4. Check for any other configurations that may affect the establishment of BGP neighbors:

Some manual configurations could also affect the establishment of neighbors. For this case, you can follow the troubleshooting guidance introduced in Step 5 of Case 1.

Conclusion

In conclusion, this article briefly introduced the BGP protocol and two typical BGP neighbors: IBGP and EBGP. Follow the troubleshooting guidance above when BGP neighbor establishment fails. If your problem is still not solved, please contact the TP-Link Support for technical assistance.

Get to know more details of each function and configuration please go to Download Center to download the manual of your product.

Is this faq useful?

Your feedback helps improve this site.

From United States?

Get products, events and services for your region.