BGP session diagnostics for troubleshooting BGP session flaps on NSX Edge node
search cancel

BGP session diagnostics for troubleshooting BGP session flaps on NSX Edge node

book

Article ID: 322408

calendar_today

Updated On:

Products

VMware NSX VMware NSX-T Data Center

Issue/Introduction

This article explains the procedure to enable BGP session diagnostics for a BGP neighbor on a NSX Edge node. The BGP session diagnostic information is useful to troubleshoot issues like BGP session flaps on edge node and cases where BGP peering does not go into Established state (or "does not come up").

BGP session diagnostics information for a BGP neighbor includes below details which will be helpful for troubleshooting BGP session flaps:

  1. Current state of the peer connection.
  2. BGP session last reset reason.
  3. Timestamps of the last 5 keep-alives received on the peer connection.
  4. Timestamps of the last 5 keep-alives sent on the peer connection.
  5. Details of the last 8 events that was observed on the peer connection.
  6. Details of the last 4 session flaps seen on the peer connection.


BGP Diagnostics were introduced on version 4.1.2 but were disabled by default, from 4.2.0 onwards they were enabled by default.

For NSX 4.1.2.x only:

  • By default BGP session diagnostics collection is disabled on all the configured BGP neighbors and must be enabled/disabled via CLI or API.
  • Session diagnostics should be enabled on the BGP neighbor where the BGP session flaps are observed.
  • Edge node reboot or FRR service restart will disable session diagnostics.

For NSX 4.2.0, 9.0 and above BGP/BFD Diagnostics are enabled by default and are reboot and service restart persistent.

Environment

VMware NSX

Resolution


The BGP session diagnostics can be enabled/disabled from the respective Tier0 Service router in the edge node CLI.

As admin user:

Determine the VRF of the T0 SR:

Edge> get logical-routers
Edge> vrf <vrf_id of SERVICE_ROUTER_TIER0>

To enable BGP session diagnostics for a BGP neighbor on the edge node:

Edge(tier0_sr)> set debug
Edge(tier0_sr)> set routing debug session-diagnostics neighbor <neighbor-ip>
Edge(tier0_sr)> exit

To disable BGP session diagnostics for a BGP neighbor on the edge node:

Edge(tier0_sr)> set debug
Edge(tier0_sr)> del routing debug session-diagnostics neighbor <neighbor-ip>
Edge(tier0_sr)> exit

To get the BGP session diagnostics information for a specific BGP neighbor on the edge node:

Edge(tier0_sr)> get bgp neighbor <neighbor-ip> session-diagnostics

To get the BGP session diagnostics information for all the neighbors on the Tier0 Service router:

Edge(tier0_sr)> get bgp neighbor session-diagnostics.
 

To get the BGP logs to examine the establishment of BGP peering relationships:

Edge> get log-file routing

Additional Information

Related Issues: