Skip to content

Netflow

Netflow configuration manages flow-based traffic monitoring on NX-OS devices. Settings include exporters (collector destinations), records (flow matching and collection parameters), monitors (binding records to exporters), hardware profiles (export tuning), and class maps (ACL-based flow classification).

Diagram
NameTypeConstraintMandatoryDefault Value
netflowClass[netflow]No

NameTypeConstraintMandatoryDefault Value
exportersList[exporters]No
recordsList[records]No
monitorsList[monitors]No
hardware_profilesList[hardware_profiles]No
class_mapsList[class_maps]No

exporters (nxos.devices.configuration.netflow)

Section titled “exporters (nxos.devices.configuration.netflow)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringNo
destinationIPNo
dscpIntegermin: 0, max: 63No
source_interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniNo
source_interface_idAnyString or Integer[min: 0]No
transport_udpIntegermin: 1, max: 65535No
versionChoicev5, v9No
vrfStringNo

records (nxos.devices.configuration.netflow)

Section titled “records (nxos.devices.configuration.netflow)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringNo
collect_counter_bytesBooleantrue, falseNo
collect_counter_packetsBooleantrue, falseNo
collect_timestamp_sys_uptime_firstBooleantrue, falseNo
collect_timestamp_sys_uptime_lastBooleantrue, falseNo
match_datalink_ethertypeBooleantrue, falseNo
match_datalink_mac_destination_addressBooleantrue, falseNo
match_datalink_mac_source_addressBooleantrue, falseNo
match_datalink_vlanBooleantrue, falseNo
match_ip_protocolBooleantrue, falseNo
match_ip_tosBooleantrue, falseNo
match_ipv4_source_addressBooleantrue, falseNo
match_ipv4_destination_addressBooleantrue, falseNo
match_ipv6_source_addressBooleantrue, falseNo
match_ipv6_destination_addressBooleantrue, falseNo
match_transport_source_portBooleantrue, falseNo
match_transport_destination_portBooleantrue, falseNo

monitors (nxos.devices.configuration.netflow)

Section titled “monitors (nxos.devices.configuration.netflow)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
descriptionStringNo
recordStringNo
exporter_1StringNo
exporter_2StringNo

hardware_profiles (nxos.devices.configuration.netflow)

Section titled “hardware_profiles (nxos.devices.configuration.netflow)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
burst_interval_shiftIntegermin: 0, max: 255No
export_intervalIntegermin: 0, max: 4294967295No
ip_packet_id_shiftIntegermin: 0, max: 255No
mtuIntegermin: 576, max: 9216No
source_portIntegermin: 1, max: 65535No

class_maps (nxos.devices.configuration.netflow)

Section titled “class_maps (nxos.devices.configuration.netflow)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
match_aclsListStringNo

Example 1: Basic netflow with exporter, record, and monitor

nxos:
devices:
- name: LEAF1
configuration:
feature:
netflow: true
netflow:
exporters:
- name: EXPORTER1
description: Primary collector
destination: 10.92.198.100
transport_udp: 2055
source_interface_type: loopback
source_interface_id: '0'
version: v9
vrf: management
records:
- name: RECORD1
match_ipv4_source_address: true
match_ipv4_destination_address: true
collect_counter_bytes: true
collect_counter_packets: true
monitors:
- name: MONITOR1
record: RECORD1
exporter_1: EXPORTER1

Example 2: Netflow with dual exporters, hardware profile, and class map

nxos:
devices:
- name: SPINE1
configuration:
feature:
netflow: true
netflow:
exporters:
- name: COLLECTOR1
destination: 10.10.10.1
transport_udp: 9995
dscp: 46
version: v9
- name: COLLECTOR2
destination: 10.10.10.2
transport_udp: 9995
version: v9
records:
- name: CUSTOM_RECORD
match_ipv4_destination_address: true
collect_counter_packets: true
monitors:
- name: FLOW_MON1
description: Primary flow monitor
record: CUSTOM_RECORD
exporter_1: COLLECTOR1
exporter_2: COLLECTOR2
hardware_profiles:
- name: PROFILE1
export_interval: 60
mtu: 1500
source_port: 9999
class_maps:
- name: CLASSIFY1
match_acls:
- ACL_NETFLOW