- First determine which source and destination hosts are to be used for the analysis.
- Perform the following steps in both the Source and destination of the VMware ESXi host.
- On an ESXi host NOT prepared for NSX, to see both the switchport (<switchport-id>) and uplink( <vmnic_number>), run following command on ESXCLI:
netdbg vswitch instance list - On an ESXi host prepared for NSX, to see both the switchport and uplink, run following command on ESXCLI:
nsxdp-cli vswitch instance list

- The command is most often used with the following options, which captures at Vnic switchport of the VM.
pktcap-uw --switchport <switchport_id>--capture VnicTx,VnicRx --ng --snapLen 150 -o <filename.pcapng>
- This will capture packets at the closest point to the virtual machine. This is the expected method of virtual machine packet capture file creation. The --snaplen 150 gathers the first 150 bytes of the packet. The TCP headers are all in the first 150 bytes of the packet. The data payload of the packet is not needed for support to analyze. Not capturing the payload data allows the capture to consume space with only the data needed for analysis.
- The --ng option is the format of the capture. This is the newest version of the file format which gathers considerably more information than the standard pcap format. This format will be required by support. The extension of the file will be .pcapng. The naming convention will contain information of the capture point such that it is easily discernible where the location is.
- Switchport Naming:
VM_Name.swprt#-X.pcapng, The VM name may be abbreviated if needed. This abbreviation must be noted where support can match the abbreviation to the true virtual machine name. The -X starts at 1 and increments for each new iteration if a series of captures is to be done.
pktcap-uw --uplink vmnicX --capture UplinkSndKernel,UplinkRcvKernel --ng --snapLen 150 -o <filename.pcapng>
- This command captures packets at the last point before the ESXi host places the packet on the physical wire. This is how local VM to remote destination, or remote destination to local VM traffic is proven to exist.
- Uplink filename format:
vmnicX.host.-X.pcapng, where vmnicX is the name of the uplink. Example vmnic1. Host is the name of the ESX host or Edge node. The -X starts at 1 and increments for each new iteration if a series of captures is to be done. - The remote destination is any physical or virtual host that must traverse the edge device to enter the virtual environment.

- Careful consideration should be given to the location of where the capture files will be placed. For the ESX host creating a capture file on a shared datastore should be used. The datastore will be located in the /vmfs/volumes directory. Change directories to this location and then decide which datastore to create a directory called "captures". From this location the capture commands will be executed. The files will be created here as below.
cd /vmfs/volumes
cd <datastore>
mkdir captures
- Network Latency
At this point the capture commands should be ready to execute on both the local and remote nodes(Hosts).
Start the Captures and Perform the task that will generate the traffic to be analyzed. - Download the capture file from both source and destination. Open them up in Wireshark to compare the times that the packet left the source and arrived at the destination to when the packet arrived at the destination. Then compare the elapsed time to the elapsed time that the response from the destination is sent back to the source.
- No network latency
Source ⇒Destination 3mSec 13:00:01.12134
Destination ⇒ Source 4mSec 13:05:4.123
The time on the wire was similar and measured in mSec for both directions. This would not be network latency.
The time the response was sent was 4 minutes. This would be the definition of application latency. The packet for the response was not generated quickly, but once it was generated the packet time on the wire was fast. - Network latency
Source ⇒Destination 3mSec 13:00:01.12134
Destination ⇒ Source 50mSec 13:00:03.123
The source made its request and the destination responded in 2 mSec. However, it took the response 50 mSec to be received at the source. In one direction the travel time was shorter than the return. The generation of the response packet was 2 mSec. This is the definition of network latency. In this example the latency was seen in one direction. Network latency can manifest in either direction or both directions at the same time.
- Connectivity Testing
The same setup done for latency testing is also used for connectivity verification. In this case the goal is to determine if a packet sent arrives at the destination, and then verify that the response packet arrives at the source. The timing of the packets is not the focus. The focus of this task is to prove that packet 0x23a1 arrived at the destination. The destination sends a response packet 0xaa35 and does it arrive at the source.
