Overview
NetFlow Version 9 Short Desc
NetFlow Version 9 is a template-based approach that provides flexibility in the record format. It enables enhancements to NetFlow services without concurrently altering the basic flow-record format.
Cisco Configuration Guide,Cisco SD-WAN Controllers Release 20.8.x Release 4.2
NetFlow Version 9 Short Desc
NetFlow Version 9 is a template-based approach that provides flexibility in the record format. It enables enhancements to NetFlow services without concurrently altering the basic flow-record format.
The NetFlow Options Template serves as a distinctive template record designed to communicate the format of data associated with the NetFlow operation. Instead of sharing details about IP flows, these options serve the purpose of providing metadata pertaining to the NetFlow process itself. There are distinct options templates: the sampler options template and the interface options template. The NetFlow process exports these two tables. Furthermore, the NetFlow process also exports the VRF (Virtual Routing and Forwarding) table.
The Sampler Table and Interface Option Templates play a significant role in organizing information.
The Sampler Options Template consists of a sampler table, while the Interface Option Templates consists of an interface table. Enabling these options for the sampler and interface tables simplifies the process for the collector to determine data flow information.
The sampler table offers insights into active samplers. Its primary purpose is to aid the collector in estimating the sampling rate for individual data flows. The sampler table provides the following information for each sampler:
| Element ID | Field Name | Value |
|---|---|---|
| 48 |
SamplerID |
This ID is assigned to the sampler. It is used by the collector to retrieve information about the sampler for a data flow record. |
| 49 |
SamplerMode |
This field indicates the mode in which the sampling has been performed. |
| 50 |
SamplerRandomInterval |
This field indicates the rate at which the sampling is performed. |
| 84 |
SamplerName |
This field indicates the name of the sampler. |
The interface table, contains data about interfaces that are monitored for data flow. With this data, the collector derives the interface names linked to the data flow. The interface table contains the following information:
| Field Name | Value |
|---|---|
| ingressInterface |
This field indicates the SNMP index assigned to the interface. By matching this value to the Ingress interface in the data flow record, the collector is able to retrieve the name of the interface. |
| interfaceDescription |
This field indicates the name of the interface. |
The VRF table Another chapter wrapper consists mapping of VRF IDs to the VRF names. Using this information, the collectorAnother chapter nested topic determines the name of the Same chapter parent topic required VRF.
The VRF table is Another chapter parent topic exported at intervals specified by the optional timeout keyword that can be Another chapter wrapper configured manually. The default value is Same chapter nested topic 1800 seconds.
The VRF table consists of the following information:
| Field Name | Value |
|---|---|
| ingressVRFID |
The identifier of the VRF with the name in the VRF-Name field. |
| VRF-Name |
The VRF name has the VRFID value ingressVRFID. The value "default" indicates that the interface is not assigned explicitly to a VRF. |
The data records contain ingressVRFID as an extra field in each record. The values of these fields are used to lookup the VRF Table to find the VRF names. A value of 0 in these fields indicates that the VRF is unknown.
Let's consider the following topology to configure NetFlow.
To monitor traffic, you must configure one or more and associate it to a Flow Monitor and enable NetFlow on the interface either in egress or ingress direction. Optionally, you can configure a to set the sampling rate for flow samples.
| 1. | First, let's gather the required details to enable NetFlow on a router:
|
|
| 2. | Configure a Flow Exporter using the command to specify where and how the packets should be exported.
Verify the Flow Exporter configuration using the command.
|
|
| 3. | Create a Flow Monitor using the command to define the type of traffic to be monitored. You can include one or more exporter maps in the monitor map. A single flow monitor map can support up to eight exporters. The record type specifies the type of packets that are sampled as the packets pass through the router. MPLS, IPv4, and IPv6 packet sampling is supported.
Verify the Flow Monitor configuration using the command.
Here are additional examples to record MPLS packets, BGP packets. In this example, you create a flow monitor map to record the MPLS packets.
In this example, you create a flow monitor map to record the BGP packets with the permanent cache.
|
|
| 4. | Configure a Flow Sampler using the command to define the rate at which the packet sampling should be performed at the interface where NetFlow is enabled. Use the same sampler map configuration on the sub-interfaces and physical interfaces under a port.
Verify the sampler map configuration using the command.
|
|
| 5. | Apply a Flow Monitor Map and a Flow Sampler to a physical interface using the command to enable NetFlow on the router. You can choose to enable IPv4, IPv6, MPLS-aware NetFlow on the interface. Enable NetFlow in the ingress direction to monitor the incoming packets and enable NetFlow in the egress direction to monitor egress traffic.
|
|
| 6. | View the running configuration to verify the configuration that you have configured.
|
|
| 7. | Verify the flows captured using the command. In the following example, you can verify the amount of flows added and exported.
This verifies that the data is successfully exported to the collector. |
Let's consider this topology where the PE1 router is configured with MPLS NetFlow, while the traffic flow is from Traffic Generator 2 to Traffic Generator 1.
| 1. | Create a Flow Monitor using the command to define the type of traffic to be monitored.
Verify the Flow Monitor configuration using the command.
|
|
| 2. | Configure a Flow Sampler using the command to define the rate at which the packet sampling should be performed at the interface where NetFlow is enabled. Use the same sampler map configuration on the sub-interfaces and physical interfaces under a port.
Verify the sampler map configuration using the command.
|
|
| 3. | Apply a Flow Monitor Map and a Flow Sampler to a physical interface using the command to enable NetFlow on the router.
|
|
| 4. | Verify the OutputInterface value is 0 in last two rows for captured ingress netflow records on PW-tail end node; the command is executed on the PE1 router:
This verifies that the data is successfully exported to the collector. |
You can modify only the following flow attributes that is already applied to an interface for a monitor map, exporter map, or a sampler map.
Note that when you modify the flow attributes, the cache counters are cleared and results in resetting of the counters. As a result there could be flow accounting mismatch.
| Flow Entity |
Flow Attribute |
Command |
|---|---|---|
| Monitor map |
cache timeout
|
|
| exporter |
||
| cache entries |
||
| cache permanent |
||
| options outphysint | bgstrings |
||
| Exporter Map |
source <source interface> |
|
| destination <destinaiton address> |
||
| dscp <dscp_value> |
||
| version v9 | ipfix |
||
| Sampler Map |
sampling interval |