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:
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:
For NSX 4.2.0, 9.0 and above BGP/BFD Diagnostics are enabled by default and are reboot and service restart persistent.
VMware NSX
Edge> get logical-routersEdge> vrf <vrf_id of SERVICE_ROUTER_TIER0>Edge(tier0_sr)> set debugEdge(tier0_sr)> set routing debug session-diagnostics neighbor <neighbor-ip>Edge(tier0_sr)> exitEdge(tier0_sr)> set debugEdge(tier0_sr)> del routing debug session-diagnostics neighbor <neighbor-ip>Edge(tier0_sr)> exit
Edge(tier0_sr)> get bgp neighbor <neighbor-ip> session-diagnosticsEdge(tier0_sr)> get bgp neighbor session-diagnostics.Edge> get log-file routing