Configure sFlow for Single Collector

Overview

This chapter provides the steps for configuring Sampled Flow (sFlowClosed Sampled Flow data sFlow (sFlow) is the standard for monitoring high-speed switched and routed networks. The sFlow monitoring system consists of an sFlow Agent which is embedded in a switch or router and an sFlow Collector.).

sFlow is the standard for monitoring high-speed switched and routed networks. The sFlow monitoring system consists of an sFlow Agent which is embedded in a switch or router and an sFlow Collector.

The sFlow agent samples packets as well as polling traffic statistics for the device it is monitoring. The packet sampling is performed by the switching/routing device at wire speed. The sFlow agent forwards the sampled traffic statistics in sFlow PDUs as well as sampled packets to an sFlow collector for analysis.

sFlow egress sampling for multicast, broadcast, or unknown unicast packets is not supported.

The sFlow agent uses the following forms of sampling:

  • Sampling packets: samples one packet out of a defined sampling rate. This sampling is done by hardware at wire speed.
  • Sampling counters: polls interface statistics such as generic and Ethernet counters at a defined interval.

You must enable the sFlow feature and collector before enabling sFlow sampling on an interface.

You cannot globally enable sFlow sampling monitoring on all interfaces with a single command. Instead you must enable sFlow sampling on the required interfaces individually.

sFlow feature is supported on physical interface as well as LAGClosed Link Aggregation Group interface. Configuring sampling on a LAG interface will enable the same on all member ports part of that LAG interface.

  • When sflow sampling is in-progress on high rate, CPU usage spike messages from Chassis monitoring module (cmmd) is expected.
  • The Qumran 1 platform is equipped to handle a total of 9 unique sampling rates. Ingress and egress sampling rate is counted separately.
  • The Qumran 2 platform is equipped to handle a total of 15 unique sampling rates.
    • For egress, maximum 7 unique sampling rates can be created.
    • If egress sampling is not used, a total of 15 unique ingress sampling rates can be configured.
    • Total ingress sampling = 15 - number of egress sampling rates.

Topology

Figure 55. Basic sFlow topology

Configuration

sFlow Agent

#configure terminal

Enter configure mode.

(config)#feature sflow

Enable the sFlow feature.

(config)#sflow collector 2.2.2.2 port 6343 receiver-time-out 0 max-datagram-size 200

Configure the sFlow collector.The IP address must be reachable via the management VRFClosed Virtual Routing and Forwarding.

(config)#interface xe1

Enter interface mode

(config-if)#sflow poll-interval 5

Set the counter poll Interval on the interface.

(config-if)#sflow sampling-rate 1024 direction ingress max-header-size 200

Set the sFlow sampling interval on the interface in ingress directions.

(config-if)#sflow sampling-rate 1024 direction egress max-header-size 120

Set the sFlow sampling interval on the interface in egress directions.

(config-if)#sflow enable

Start packet sampling on the interface

(config-if)#commit

Commit the candidate configuration to the running configuration

(config-if)#end

Exit interface and configure mode.

Validation

Copy
#show sflow detail
sFlow Feature: Enabled
sFlow Version: 5
sFlow Global Information :
Agent     IP: 10.10.26.132
Collector IP: 2.2.2.2    Port:  6343
Maximum Datagram Size(bytes): 200
Receiver timeout(sec)        : 0
 
sFlow Port Detailed Information:
Interface  Packet-Sampling           Packet-Sampling            Counter-Polling         Maximum Header
                  Rate                    Count               Interval       Count        Size(bytes)
           Ingress      Egress       Ingress      Egress       (sec)                    Ingress     Egress
---------  -----------------------   -----------------------  -----------------------   --------------------
xe1/1            1024         1024       464564         414532           5          131     120          20