Troubleshooting NSX TEP/BFD Tunnels between ESXi hosts and Edges
book
Article ID: 379112
calendar_today
Updated On:
Products
VMware NSXVMware vSphere ESXi
Issue/Introduction
When troubleshooting BFD tunnels between NSX components (hosts and Edges) a specific set of data must be gathered at the time of the event. This article details what documentation is required and how to gather it prior to opening a support request with Broadcom.
NSX uses the TEP Tunnels for several very important reasons:
East/West communication between VMs on overlay networks and different hosts
Access to Edges (VM and Bare Metal) for North/South services via Service Routers
List all TEP tunnels from the TEPS of this host to all other hosts and edges. ESXi hosts with no NSX workload using the overlay will not have active tunnels. Flaps are indications of network instability or example of when a TEP loses connectivity for legitimate reasons (power up/down, maintenance mode, etc.). Flaps column will have at least a 1 in a solid environment with all endpoints up.
-s 1572 = set the payload packet size to 1572 bytes (maximum allowed on a 1600 MTU network)
esxcli network firewall set -e 0
Temporarily disable ESXi host's internal firewall to ensure there are no rules that may drop BFD traffic. Observe state of the tunnels on the host. Once ESXi firewall has been ruled out, re-enable and validate status of the firewall: esxcli network firewall set -e 1 esxcli network firewall get
NSX Edges
get bfd-sessions
Same as nsxdp-cli bfd sessions list on hosts
get bfd-sessions stats
Statistics regarding packets dropped and their reasons for each TEP tunnel. If the counters 'Rx_packets' or Tx_packets have a value of 0, then consider checking if gateway firewall rules are being applied on the uplink interfaces, which maybe blocking traffic to the BFD ports 3784, 9785 and 4784.
get firewall <uplink interface uuid> ruleset type firewall rules
Outputs a list of the Gateway Firewall rules applied on an interface. Can be piped to 'more' and the content searched for references to any rules allowing the BFD ports. If there is a default deny rule applied, but no allow rules for the BFD ports, then the BFD packets will be dropped.
ping <destination TEP IP> source <Source TEP IP> vrfid <VRF ID of tunnel> size <mtu> dfbit enable
Test network connectivity between TEP endpoints from Edge to Edge/Host
Requires to login to Edge with admin mode
To get the VRI ID, run the command get logical-routers and note down the VRF ID from the output for the type TUNNEL
Known configuration issues that can affect TEP tunnels
142585:2024-##-##T##:##:##.###Z <Edge-VM-Name01> NSX 1 FABRIC [nsx@6876 comp="nsx-edge" subcomp="nsxa" s2comp="ha-cluster" level="INFO"] HA tunnel 192.###.###.35:192.###.###.39 state changed from Up to Unreachable
The remote endpoint is not sending BFD information to the local endpoint due to
Firewall in physical environment is blocking communication between TEPs
Router in physical environment is unable to send packets to TEP endpoints
The environment is busy and BFD packets are getting delayed or dropped between TEP endpoints
These tunnel endpoints have experienced a BFD connectivity timeout. The tunnel has gone down because (non-exhaustive list of examples):
142622:2024-##-##T##:##:##.###Z <Edge-VM-Name01> NSX 1 FABRIC [nsx@6876 comp="nsx-edge" subcomp="nsxa" s2comp="ha-cluster" level="INFO"] HA tunnel 192.###.###.35:192.###.###.39 state changed from Unreachable to Up
These tunnel endpoints have begun receiving BFD information again. The tunnel is returning to functional status.
NOTE: Seeing these two log lines in close proximity frequently between the same two endpoints is an indication of network flapping or high latency at one endpoint or a point in between.
ESXi host /var/log/vmkernel*
2024-##-##T##:##:##.###Z cpu59:2098707)BFD_HandleStatusChange:709:[nsx@6876 comp="nsx-esx" subcomp="bfd"]local: 192.###.###.34, remote: 192.###.###.23, oldState: up, newState: down, diag: Control Detection Time Expired, type: overlay
Log line detailing a tunnel is down between the two IP addresses listed
2024-##-##T##:##:##.###Z cpu36:2098706)BFD_HandleStatusChange:709:[nsx@6876 comp="nsx-esx" subcomp="bfd"]local: 192.###.###.34, remote: 192.###.###.23, oldState: down, newState: init, diag: Control Detection Time Expired, type: overlay
Log line detailing a tunnel is coming up/connectivity has been restored between the two IP addresses listed