Unlike other Cisco IOS devices, the Cisco Nexus 3000 series supports sFlow as of the NX-OS 5.0(3)U4(1) release. This blog will cover how to configure sFlow on Nexus 3000 series switches.
The configuration is as follows:
switchNexus3000# configure terminal // Switches to configuration mode
switchNexus3000(config)# feature sflow // Enables sFlow configuration
switchNexus3000(config)# sflow sampling-rate 4096 // Enables sampling
switchNexus3000(config)# sflow max-sampled-size 200 // Specifies the size of the sampled packet
switchNexus3000(config)# sflow collector-port 9996 // Indicates which port the packets should be sent to
switchNexus3000(config)# sflow data-source interface port-channel 100 // Specifies the source interface
switchNexus3000(config)# sflow agent-ip x.x.x.x // Specifies the sFlow agent IP
switchNexus3000(config)# sflow counter-poll-interval 20 // Species the polling interval
switchNexus3000(config)# sflow max-datagram-size 2000 // Species the sFlow maximum datagram size
switchNexus3000(config)# sflow collector-ip 192.1681.1 vrf default // Specifies the virtual routing and forwarding (VRF) configuration
You can use any of the following VRF configurations:
• User-defined VRF: Used to specify a maximum of 32 alphanumeric characters
• Management VRF: Used if the sFlow data collector is on the network and connected to the management port
• Default VRF: Used if the sFlow data collector is on the network and connected to the front panel ports
switchNexus3000(config)# copy running-config startup-config // Saves the change persistently and restarts by copying the running configuration to the startup configuration
To display the sFlow configuration and statistics, use the commands given below:
show sflow
show sflow statistics
Example configuration:
switchNexus3000(config)# feature sflow
switchNexus3000(config)# sflow sampling-rate 4096
switchNexus3000(config)# sflow max-sampled-size 200
switchNexus3000(config)# sflow counter-poll-interval 100
switchNexus3000(config)# sflow max-datagram-size 2000
switchNexus3000(config)# sflow collector-ip 192.1681.1 vrf default
switchNexus3000(config)# sflow collector-port 9996
switchNexus3000(config)# sflow agent-ip 10.10.2.1
switchNexus3000(config)# sflow data-source interface Port-channel 100
With this, you can configure Cisco Nexus 3000 series switches and start monitoring them with ManageEngine NetFlow Analyzer. You can download a free, 30-day trial here.
Hi where will the sflow agent ip is really configured. I’d that the same ip as the sflow collector ?
switchNexus3000(config)# sflow agent-ip x.x.x.x // specifies the sflow agent IP