sFlow scenario

In this scenario, two hosts send sFlow traffic through a switch to an sFlow collector.The physical topology of the network looks like this:

Procedure

  1. Enable sFlow globally.
  2. switch#configswitch(config)#sflow

  3. Set the sFlow agent IP address to10.10.12.1.
  4. switch(config)#sflow agent-ip 10.10.12.1

  5. Set the sFlow collector IP address to10.10.12.2.
  6. switch(config)#sflow collector 18.2.2.2

  7. Configure sFLow sampling rate and polling interval.
  8. switch(config)#sflow sampling 5000switch(config)#sflow polling 20

  9. Configure interface1/1/1with IP address10.10.10.1/24.
  10. switch(config)#interface 1/1/1switch(config-if)#no shutdownswitch(config-if)#ip address 10.10.10.1/24switch(config)#quit

  11. Configure interface1/1/2with IP address10.10.11.1/24.
  12. switch(config)#interface 1/1/2switch(config-if)#no shutdownswitch(config-if)#ip address 10.10.11.1/24switch(config)#quit

  13. Configure interface1/1/3with IP address10.10.12.1/24.
  14. switch(config)#interface 1/1/3switch(config-if)#no shutdownswitch(config-if)#ip address 10.10.12.1/24switch(config)#quit

  15. Verify sFlow configuration

The following example is only applicable for the 8360 series switch

switch#show sflow

sFlow Global Configuration

-----------------------------------------

sFlow enabled

收集器的IP /Port/Vrf 10.10.10.2/6343/default

Agent Address 10.0.0.1

Sampling Rate 1024

Polling Interval 30

Header Size 128

最大数据报尺寸1400

Sampling Mode both

sFlow Status

-----------------------------------------

运行——是的

sFlow enabled on Interfaces:

-----------------------------------------

lag100

sFlow Statistics

-----------------------------------------

Number of Ingress Samples 200

Number of Egress Samples 0