On some platform including including the 5300XL, there are no CLI commands to control sFlow and they support only one sFlow collector.
On these platforms, the idea is that a NMS (Network Monitoring Software) that is capable of sFlow, will discover the switch in the network and register itself on the switch as a collector via SNMP.
The switch will subsequently send the sFlow samples and counters to that collector.
However, not all collectors are capable of this self-registration.
In this case, we have to configure the switch via SNMP manually to set the sFlow collector’s data. This is done by SNMP, using the sFlow-MIB.
In the solution you will find the commands for the same.
Configuration:
Configured sFlow with the below commands
- a) Configure the sFlow Collector IP address
setmib sFlowRcvrAddress.1 -o 1414140a
- b) Configure the name of sFlow Collector and the time-out value
setmib sFlowRcvrOwner.1 -D sFlowtool sFlowRcvrTimeout.1 -i 100000000
- c) In the below the last second digit from the right is the port number (A15)
setmib sFlowFsReceiver.11.1.3.6.1.2.1.2.2.1.1.15.1 -i 1
setmib sFlowFsPacketSamplingRate.11.1.3.6.1.2.1.2.2.1.1.15.1 -i 512
setmib sFlowFsMaximumHeaderSize.11.1.3.6.1.2.1.2.2.1.1.15.1 -i 128
- d) Set the port number
setmib sFlowRcvrPort.1 -i 5111
- e) Enable the Sflow on the interface
setmib 1.3.6.1.4.1.14706.1.1.5.1.3.11.1.3.6.1.2.1.2.2.1.1.15.1 -i 1
Configuring Syslog server
- a) logging <ip address>
- b) logging facility local7
- c) Set the events that has to be sent to the syslog server
debug destination logging
- d) Now enable debug for all the deamons (by default only log that are classified as events are sent)
debug all
Verification: The above has been tested by viewing packets on the server with tcpdump.