In this article we will be looking at how to configure NetFlow and how the traffic is send from the ESXi hosts to the NetFlow collector.
First lets understand the configuration files and how the traffic is send from the ESXi host. When NetFlow is configured on the vDS the file /etc/vmware/dvsdata.db is updated op each host that belongs to the vDS switch with the relevant NetFlow configuration. In addition the vDS port data is also updated that is located on the datastore of the VM’s vmx location under a folder .dvsData. Each ESXi host will send the NetFlow data to the NetFlow collector, thus the vCenter does not send any data to the collector.
When data is send/received thru the vPort a new NetFlow record is created. This record has a lifespan based on the “active flow export timeout” and “Idle flow timeout”. This works as follow:
- New record is created and data is collected actively for 60sec. After 60sec the record is exported (Based on “Active flow export timeout).
- New record is created and after 20sec no more data is recorded. At 35sec (20sec + 15sec(Idle flow export timeout)) the record is exported.
- New record is created and for 15sec no data is record and thus the record will be exported .
- A new record will only be created once there is data flow again.
When setting the sample rate to 2, the record is only updated every 2 sec with data at that 2sec interval (not data collected over that 2 sec).
Next is to understand what the settings is that enabled NetFlow on the vDS.

Collector IP Address : This is the NetFlow Collector IP address that each ESXi host will send the NetFlow data to.
Collector Port : This is the Port address the that the NetFlow collector listens on for traffic for the ESXi hosts.
vDS IP address : If you don’t enter an IP address in here you will see each ESXi host as a device in the NetFlow collector. If you do enter an IP address then the NetFlow Data send form each ESXi host will have the same originate addresses and you will only see one device n your NetFlow Collector with this IP address.
Process internal flows only : If this option is selected then only data between VM’s on the same host will be exported to the collector.
Once you have configured the above you need to enable NetFlow on the Port Groups that NetFlow traffic is needed. Do this on the Port Group settings on Monitor and then Enable the NetFlow Status (Disabled by default).

Once you have done this you should see data in your NetFlow Application immediately.
I want to thank Hua from our Networking R&D team for his help on this article.