Skip to main content

Cisco 3750x Configuration(NetFlow)

This documentation outlines the steps for configuring NetFlow for Cisco 3750x switches.

Enter global configuration mode:

config t

Create a new flow record named MFErecord:

flow record MFErecord

Match the IPv4 Type of Service (ToS) value:

match ipv4 tos

Match the IPv4 protocol (TCP/UDP/ICMP):

match ipv4 protocol

Match the IPv4 source IP address:

match ipv4 source address

Match the IPv4 destination IP address:

match ipv4 destination address

Match the transport-layer source port:

match transport source-port

Match the transport-layer destination port:

match transport destination-port

Collect the input interface using SNMP interface index:

collect interface input snmp

Collect the output interface using SNMP interface index:

collect interface output snmp

Collect the total bytes transferred for the flow:

collect counter bytes

Collect the total packets transferred for the flow:

collect counter packets

Collect the sys-uptime timestamp when the flow was first seen:

collect timestamp sys-uptime first

Collect the sys-uptime timestamp when the flow was last seen:

collect timestamp sys-uptime last

Create a new flow exporter named MFEexporter:

flow exporter MFEexporter

Set the NetFlow collector destination IP:

destination {MOTADATA_NETFLOW_SERVER_IP}

Set the source interface used for exporting flow packets:

source {LOOPBACK_INTERFACE_NAME}

Set the template data refresh timeout (in seconds):

template data timeout 60

Configure the exporter to use UDP transport and set the listener port:

transport udp {MOTADATA_NETFLOW_SERVER_LISTENER_PORT}

Create a new flow monitor named MFEmonitor:

flow monitor MFEmonitor

Associate the flow record with the monitor:

record MFErecord

Associate the flow exporter with the monitor:

exporter MFEexporter

Set the active cache timeout (in seconds) for exporting long-lived flows:

cache timeout active 60

Set the inactive cache timeout (in seconds) for exporting idle flows:

cache timeout inactive 15

Enter the interface configuration mode:

interface {INTERFACE_NAME}

Enable flow monitoring on inbound traffic for the interface:

ip flow monitor MFEmonitor input

Exit the interface configuration:

exit
note

Flexible MOTADATA_NETFLOW is supported only on the Catalyst 3750-X and 3560-X switch running the IP base or IP services feature set and equipped with the network services module. It is not supported on switches running the NPE or the LAN base image.

After completing the configuration, navigate to Menu > Flow Explorer and select Explorer to view the active flow data.