Troubleshooting Tip: Analyze netflow packets with Wireshark
Description | This article describes how to capture NetFlow packets and decode them with Wireshark to perform further analysis of traffic statistics sent to a NetFlow collector. |
Scope | FortiGate, FortiOS. |
Solution | When Netflow statistics received in a NetFlow collector need to be investigated further from the FortiGate side, such as when verifying the number of bytes and packets sent for each session monitored, it is possible to capture this traffic in raw format and decode sFlow packets in Wireshark using the port configured for the NetFlow collector. Â On the FortiGate side, the netflow configuration is shown as below: Â
 diagnose sniffer packet port40 'udp port <netflow_collector_port>' 6 0 a  Note: Replace the UDP port with the right value in the user FortiGate configuration.  Refer to the following articles to convert traffic capture from plaintext into a Wireshark .pcap format: Technical Tip: How to import 'diagnose sniffer packet' data to WireShark Technical Tip: How to import 'diagnose sniffer packet' data to WireShark - Ethereal application  Open the .pcap file from netflow packet capture with Wireshark and go to Analyze -> Decode as:  ![]()
 Apply the filter. Wireshark will decode NetFlow packets for further troubleshooting.  ![]()  To check if the netflow-enabled interface is sending traffic to the collector, filter based on the SNMP-index of the interface. Note: Review the different NetFlow templates' details to understand properly the information of these NetFlow packets. See this document for more information: Netflow Templates 7.6.3. |


