Manufacturer: Cisco

Model(s): Nexus 9000 Series Switches

Version(s): NX-OS 10.x

URL: https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-installation-and-configuration-guides-list.html

Notes:

  • Most Nexus switches only support one sFlow collector.
  • sFlow is not supported on SVIs and subinterfaces.
  • Some models also support Flexible NetFlow. See separate article on guidance for Plixer recommendations on configuring NetFlow on Cisco Nexus 9000 Series Switches.

Configuration steps for Layer 3 sFlow

  1. Enable sFlow Feature
configure terminal
feature sflow
  1. Configure sFlow
configure terminal
sflow sampling-rate 5000
sflow max-sampled-size 200
sflow counter-poll-interval 60
sflow max-datagram-size 2000
sflow collector-ip <IP of Plixer collector> vrf management
sflow collector-port 6343
sflow agent-ip <IP>
sflow data-source interface ethernet 1/5

CLI command

Description

sflow sampling-rate <integer>

Configures the sFlow sampling rate for packets. The sampling-rate can be an integer between 4096 and 1000000000.

sflow max-sampled-size <integer>

Configures the sFlow maximum sampling size. The range for the sampling-size is from 64 to 256 bytes.

sflow counter-poll-interval <integer>

Configures the sFlow poll interval for an interface. The range for the poll-interval is from 0 to 2147483647 seconds. Plixer recommends 60 seconds

sflow max-datagram-size <integer>

Configures the sFlow maximum datagram size. The range for the datagram-size is from 200 to 9000 bytes.

sflow collector-ip <IP of Plixer collector> vrf management

Configures the IPv4 address for the sFlow collector. Set this to the Plixer collector.

sflow collector-port 6343

Configures the UDP port of the sFlow collector.

sflow agent-ip <IP>

Configures the IPv4 address of the sFlow agent. The default IP address is 0.0.0.0, which means that all samples will be dropped. You must specify a valid IP address to enable sFlow functionality.

sflow data-source interface <interface>

Configures the sFlow sampling data source. For an Ethernet data source, slot is the slot number, and port can be either a single port number or a range of ports designated as port-port.