esxcli network esxcli network nic esxcli network ip connection list -For information corresponding to the Linux netstat command, use the following ESXCLI command esxcli network vswitch standard list esxcli network vswitch standard esxcli network vswitch standard policy failover get -v vSwitch0
esxcli network ip interface list -list the VMkernel ports esxcli network ip interface ipv4 get -display the interface name, MAC address, and which vSwitch and Portgroup it belongs to. To list the IP address configuration for the VMkernel ports:
Test VMKernel Interfaces Connectivity
esxcli network diag ping -H 192.168.0.160
esxcli network ip neighbor list -list established connections esxcli network ip route ipv4 list -list the host’s routing table
Troubleshooting Using Netcat
nc -h -help nc -z 192.168.0.102 80 -to test connectivity on to port 80 nc -w 1 -z 192.168.0.102 80-85 -use netcat to test a range of ports on a remote host:
Troubleshooting with ping and vmkping
vmkping 192.168.0.102 vmkping -D -If you use vmkping with the ‘-D’ switch, you can test the host’s IP stack
Troubleshooting SSL with openssl
openssl s_client -connect 192.168.0.101:443 -You can use the open ssl client present on an ESXi host to test connectivity to an ssl port – for example to vCenter or to another host.
Capturing Traffic with tcpdump-uw
tcpdump-uw -i vmk0 -To display packets on the vmkernel interface vmk0, use the tcpdump-uw command with the -i tcpdump-uw -i vmk0 -s 1514 -vvv -To display all of the packets on vmk0 with verbose detail, use the tcpdump-uw command with the -vvv option tcpdump-uw -i vmk0 -s 1514 tcp -display only the TCP packets on vmk0, use the tcp option with the tcpdump-uw command tcpdump-uw -i vmk0 -s 1514 port not 22 and port not 53 -To avoid seeing unwanted traffic types in the tcpdump-uw output, use the not option. For example, to filter out DNS and SSH traffic, use the following command tcpdump-uw -i vmk0 -s 1514 -C 100M -w /var/tmp/test.pcap -If the trace is running for long time, you can split the trace pcap file to chunks of desired size using the-C option.
7,520 total views, 1 views today