Knowledge Base
The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides

|
Troubleshooting network issues by capturing and sniffing network traffic via tcpdump
Symptoms
The following ESX network issues can be resolved by sniffing TCP/IP messages:
- VMware VMotion fails at 10%
- Connection fails to certain host and networks
- Sessions to network services fail
- Analyzing bandwidth and network services communication
Purpose
The following describes the basic concepts of monitoring network traffic:
- To troubleshoot many network related issue, the tcpdump can be utilized to capture TCP/IP traffic.
- Analyzing network traffic requires advance understanding of TCP/IP stack protocol to make sense of hidden TCP/IP messages captured.
This article emphasizes capturing and sniffing TCP/IP network traffic on ESX host.
The ESX 3.x Service Console is equipped with the utilities esxnet-support and tcpdump for network troubleshooting.
To capture TCP/IP packets in and out of an ESX host:
- esxnet-support: This ESX script utilizes the tcpdump utility to create sniffer interface and capture ESX network traffic and generate tcpdump.gz file, to be analyzed for later.
- tcpdump: This utility is shipped with ESX and runs at the Service Console (SC) TCP/IP stack. tcpdump is a command line tool used at root access level of ESX console connection for real time capturing to be displayed on the console screen.
Resolution
Note: esxnet-support creates a dedicated portgroup and interface, but due to script errors, it may fail. If it fails, you must manually create a port group with proper security settings to accommodate esxnet-support script execution. For more information, see Capturing virtual switch traffic with tcpdump and other utilities (1000880).
The following describes command line utilization of esxnet-support:
- Run the following command:
esxnet-support trace –z –p [port_name]
Note: VMware recommends setting up a sniffer port on the vSwitch.
- Create a Service console port and name it cos_tcpdump.
- Run the following command as root on the ESX console:
esxnet-support trace –z –p cos_tcpdump
Press Ctrl+C to stop sniffer script.
Note: This generates a dump file in the directory it was executed.
- The script esxnet-support generates the *.tcpdump.gz file. Utilize gunzip to extract the *.tcpdump.gz file.
- Use Network Protocol Analyzer utilities (such as Wireshark) to open and view the tcpdump file.
Note: VMware does not endorse or recommend any particular third party software utility, nor is the list above meant to be exhaustive.
- Run the following command to view tcpdump from the console command line:
tcpdump –i [interface name]
Additional Information
For related information, see Verifying gateway IP connection using the tcpdump command (1008017).
Tags
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.
Actions
- KB Article:
- Updated:
- Categories:
- Product Family:
- Products:
- Product Versions:

