How to configure NetFlow on the Switch
The following steps are for a Nexus 9000 switch. The configurations may slightly differ for other Cisco platforms. In any case, refer to the official Cisco configuration guide for the Cisco platform you're configuring.
Procedure
1 |
Enter global configuration mode.
|
2 |
Enable NetFlow feature.
|
3 |
Configure a flow record. The following example configuration shows how to generate five tuple information of a flow in a NetFlow record.
|
4 |
Configure a flow exporter. The following example configuration specifies the NetFlow protocol version, NetFlow template exchange interval, and NetFlow collector endpoint details. Specify the IP and port on which you enable the NetFlow connector on a Secure Workload Ingest appliance.
|
5 |
Configure a flow monitor. Create a flow monitor and associate it with a flow record and flow exporter.
|
6 |
Apply the flow monitor to an interface.
The above steps configure NetFlow on the Nexus 9000 to export NetFlow v9 protocol packets for ingress traffic going through interface 1/1. It sends the flow records to 172.26.230.173:4729 over a UDP protocol. Each flow record includes five tuple information of the traffic and the byte/packet count of the flow. ![]() |