NSX-T Packet Capture: East - West Traffic on Overlay Segment

In this article, we are going to perform packet captures at different capture points between 2 VMs running on 2 Overlay segments attached to a T1 Router.

Topology

The Tier-1 Gateway does not provide stateful services so it's not connected to an Edge Cluster. It worth mentioning it because the data path will only go from ESXi host to ESXi host without the need of traversing the physical network.

Topology

Let's to a Traceflow and see what the data path looks like:

Data path

The traffic goes from the VM vnic down to the vdr port

We need to get the PortIDs for:

  • T1-Web-01
  • T1-DB-01
  • vdr port on the source host (Where the routing decisions take place)

We can use many different methods to find this information, but i thhink the most efficient is nsxdb-cli

  1. Get an SSH session to the host where the source VM (T1-Web-01) is running and do: nsxdp-cli vswitch instance list
    vswitch instance list on ESXi4
  2. Now do the same on the second host:
    vswitch instance list on ESXi5

We are interested in:

ClientPortIDMACUplink
T1-Web-01.eth010066332200:50:56:92:49:09vmnic2
vdr-vdrPort (on source host)10066331802:50:56:56:44:52vmnic2
T1-DB-01.eth013421780100:50:56:92:98:b6vmnic2

Ok, now let's start a continuous ping from T1-Web-01 to T1-DB-01:

Continuous ping

And start the capture at the switchport level:

1# pktcap-uw --switchport 100663322 --dir 2 -o - | tcpdump-uw -ner -

Capture point 1

The packet is sent from the VM vnic 00:50:56:92:49:09 to the vdrport 02:50:56:56:44:52. ICMP replies comes from the same MAC.

On the other side T1-DB-01 the very same thing is happening. ICMP packets coming from 02:50:56:56:44:52 are delivered to 00:50:56:92:98:b6 which replies to the same:

Capture at the destination

Now let's dig a little bit deeper and follow the data path and capture at different capture points:

Capture Points

Capturing traffic using nsxcli

From NSX-T Command-Line Interface Reference

Sintax: start capture interface <interface-name> [direction <direction>] [file <filename>] [count <packet-count>] [expression <expression>]

PointDescriptionCapture with nsxcli
1VM vnic switchportnsxcli -c start capture interface 100663322 direction dual expression ipproto 0x01
2Before the DFWnsxcli -c start capture dvfilter nic-534759-eth0-vmware-sfw.2 stage pre expression ipproto 0x01
3After the DFWnsxcli -c start capture dvfilter nic-534759-eth0-vmware-sfw.2 stage post expression ipproto 0x01
4At the vdr Portnsxcli -c start capture interface vdrPort expression ipproto 0x01
Source host (requests only):
Destination host (replies only):
5N-DVS Uplinknsxcli -c start capture interface c9b5052b-9e46-4c9e-9b2a-8b1b46e26796 direction dual expression ipproto 0x01
To get the DVPortID:
6Physical Uplinknsxcli -c start capture interface vmnic2 direction dual
Here the traffic is encapsulated into GENEVE protocol
7Before the DFWTo get the dvfilter name:

nsxcli -c start capture dvfilter nic-534759-eth0-vmware-sfw.2 stage pre expression ipproto 0x01
8After the DFWnsxcli -c start capture dvfilter nic-7925274-eth0-vmware-sfw.2 stage post expression ipproto 0x01
9VM vnic switchportnsxcli -c start capture interface 134217801 direction dual expression ipproto 0x01

Capturing traffic using pktcap-uw

PointDescriptionCapture with pktcap-uw
1VM vnic switchport`pktcap-uw --switchport 100663322 --dir 2 --dstip 172.16.102.11 -o -
2Before the DFW`pktcap-uw --switchport 100663322 --dir 2 --stage 0 --dstip 172.16.102.11 -o -
3After the DFW`pktcap-uw --switchport 100663322 --dir 2 --stage 1 --dstip 172.16.102.11 -o -
4At the vdr Port`pktcap-uw --switchport 100663318 --dir 2 --dstip 172.16.102.11 -o -
5N-DVS Uplink`pktcap-uw --switchport 2248146957 --dir 2 --ip 172.16.103.11 -o -
6Physical UplinkFitering the destination VTEP IP and IP
`pktcap-uw --uplink vmnic2 --capture UplinkSndKernel --dstip 192.168.11.151 -o -
7Before the DFW`pktcap-uw --switchport 134217801 --dir 2 --stage 0 --srcip 172.16.103.11 -o -
8After the DFW`pktcap-uw --switchport 134217801 --dir 2 --stage 1 --srcip 172.16.103.11 -o -
9VM vnic switchport`pktcap-uw --switchport 134217801 --dir 2 --srcip 172.16.103.11 -o -

See Also