Having just completed a NSX 6.2 ICM course I wanted to share with you some commonly used troubleshooting commands which Simon Reynolds shared with us.
ESXi Host CLI Commands
Here are some useful CLI examples to run in ESXi shell for logical switch info:
# esxcli network vswitch dvs vmware vxlan network ….
# esxcli network vswitch dvs vmware vxlan network arp list
–vds-name=Compute_VDS –vxlan-id=5001
# /bin/net-vdl2 -M arp -s Compute_VDS -n 5001
# esxcli network vswitch dvs vmware vxlan network mac list
–vds-name=Compute_VDS –vxlan-id=5001
# /bin/net-vdl2 -M mac -s Compute_VDS -n 5001
# esxcli network vswitch dvs vmware vxlan network vtep list
–vds-name=Compute_VDS –vxlan-id=5001
# /bin/net-vdl2 -M vtep -s Compute_VDS -n 5001
vDS Info:
net-vds -l
b) Show the separate ip stack for vxlan
esxcli network ip netstack list
c) Raise the netcpa logging level to verbose (logs ESXi to controller messages in more detail)
# /etc/init.d/netcpad stop
# chmod +wt /etc/vmware/netcpa/netcpa.xml
# vi /etc/vmware/netcpa/netcpa.xml
and change info to verbose between the <level> tags, then save the file and then restart the netcpa daemon:
# /etc/init.d/netcpad start
d) Packet capture commands
# pktcap-uw –-uplink vmnic2 –o unencap.pcap –dir=1 –-stage=0
# tcpdump-uw –enr unencap.pcap
or
# pktcap-uw –-uplink vmnic2 –-dir=1 –-stage=0 -o – | tcpdump-uw –enr –
(–dir=1 implies “outbound”, –dir=0 implies “inbound”, –stage=0
implies “before the capture point”, –stage=1 implies “after the capture
point”)
Show vxlan encapsulated frames:
# pktcap-uw –uplink vmnic2 –-dir=1 –-stage=1 -o -| tcpdump-uw –enr –
Show frames at a vm switchport connection:
# pktcap-uw –o – –switchport –dir 1 | tcpdump-uw –enr –
(get vm port id from esxtop network view)
Test VXLAN connectivity between hosts:
ping ++netstack=vxlan -d -s 1572 -I vmk3 xxx.xxx.xxx.xxx
NSX Controller Commands:
# show control-cluster status
# show control-cluster logical-switches vni 5000
# show control-cluster logical-switches connection-table 5000
Need to be on the controller that manages the vni for the next commands:
# show control-cluster logical-switches vtep-table 5001
# show control-cluster logical-switches mac-table 5001
# show control-cluster logical-switches arp-table 5001