Configuring sFlow globally

Execute the following steps to configure sFlow globally.

  1. Enter the configure terminal command to change to global configuration mode.
    device# configure terminal
  2. Enable the sFlow protocol globally.
    device (config)# sflow enable
  3. Configure sFlow collectors and optionally associated UDP ports.
    device(config)# sflow collector 172.22.12.83 6343 use-vrf mgmt-vrf
    device(config)# sflow collector fdd1:a123:b123:c123:34:1:1:2 4713 use-vrf vrf2
    device(config)# sflow collector fdd1:a123:b123:c123:112:1:1:2 5566 use-vrf default-vrf
  4. Set the sFlow polling interval (in seconds).
    device(config)# sflow polling-interval 35
  5. Set the sFlow sample-rate.
    device(config)# sflow sample-rate 4096
  6. Return to privileged EXEC mode.
    device(config)# end
  7. Confirm the sFlow configuration status by using the show sflow or show sflow all commands.
    device# show sflow
  8. Clear any existing sFlow statistics to ensure accurate readings.
    device# clear sflow statistics
    Note

    Note

    No specific configuration is required for MPLS other than enabling sflow on physical interfaces.