Traffic Capture
VMware ESXi and vSphere capture
Deliver the core switch mirror into a HOSSIDARK virtual machine through a dedicated capture port group.
On this page
Overview
The physical switch sends its SPAN copy to a free physical NIC of the ESXi host. That NIC carries a capture-only virtual switch, and the HOSSIDARK VM receives everything through its second virtual NIC.
Core switch --SPAN--> ESXi vmnic3 -> vSwitch-Capture -> port group "HD-Capture"
-> HOSSIDARK NIC 2 (no IP)
Management LAN ------> ESXi vmnic0 -> vSwitch0 -> "VM Network" -> HOSSIDARK NIC 1
Steps
- Give the VM two VMXNET3 NICs: NIC 1 on the management network, NIC 2 for capture.
- Create a standard vSwitch
vSwitch-Capturewith the SPAN-connected physical NIC as its only uplink. - Create port group
HD-Captureon it with:- VLAN ID 4095 (all VLANs, tags preserved)
- Security: Promiscuous mode Accept, MAC address changes Accept, Forged transmits Accept
- Attach NIC 2 to
HD-Capture. Do not give it an IP address; the installer prepares the capture port automatically. - Reserve CPU and memory for the VM so capture is not starved.
Traffic between VMs on the same host
Traffic that never leaves the host is not seen by the physical switch. Use a vSphere Distributed Switch port mirroring session (Distributed Port Mirroring) with the server VM ports as sources and the HOSSIDARK capture port as destination, or install the HOSSIDARK probe on a server.
Before you start
| Requirement | Detail |
|---|---|
| vSphere | ESXi 7.0 or later; vCenter is required only for Distributed Switch mirroring. |
| Host NIC | One free physical port connected to the switch SPAN destination (1 or 10 GbE matching the mirrored volume). |
| VM | 2 VMXNET3 NICs, CPU and memory reservation as in the sizing guide. |
| Rights | Host > Configuration > Network, and dvPort group modification on the vDS. |
Distributed Switch port mirroring step by step
Use this when the servers to watch are virtual machines on the same cluster.
- vSphere Client > Networking > select the Distributed Switch > Configure > Port mirroring > New.
- Session type Distributed Port Mirroring (same host) or Remote Mirroring Destination / Encapsulated Remote Mirroring (L3) Source across hosts.
- Properties: name
HOSSIDARK, status Enabled, Normal I/O on destination ports Disallowed, mirrored packet length empty (full packets). - Sources: add the ports of the VMs to watch, direction Ingress/Egress.
- Destination: the dvPort of the HOSSIDARK capture NIC (local session) or the HOSSIDARK capture IP (ERSPAN L3 session).
- Finish and check that the session shows Enabled.
With Encapsulated Remote Mirroring (L3), ESXi sends the copy in GRE/ERSPAN to the HOSSIDARK capture IP. The sensor removes GRE and ERSPAN type II/III headers automatically; give the capture card an address only in this mode and allow IP protocol 47 (GRE) to it.
How to confirm it works
- On the host:
esxcli network vswitch standard portgroup policy security get -p HD-Captureshows promiscuoustrue. - In the console, Network Settings > Sensing shows the card as Receiving and VLAN tags appear in Assets & Topology.
- Ping between two watched VMs; the flow appears within a minute.
Common problems
| Symptom | Cause | Fix |
|---|---|---|
| Only the appliance's own traffic | Promiscuous mode rejected | Set Promiscuous, MAC changes and Forged transmits to Accept on the port group. |
| No VLAN tags, some VLANs missing | Port group VLAN not 4095 | Set VLAN ID 4095 (standard) or VLAN trunking 0-4094 (vDS). |
| Drops at peak hours | VM starved of CPU | Reserve CPU/memory; use VMXNET3; check host NIC speed. |
| ERSPAN session sends nothing | Wrong destination IP or GRE blocked | Use the capture IP; allow protocol 47 on firewalls in the path. |
| Duplicate packets | Same traffic mirrored twice (switch SPAN + vDS) | Mirror each path only once. |