Commands For Sflow

12.3 Commands for sFlow

12.3.1 sflow agent-address

Command: sflow agent-address <agent-address>
no sflow agent-address
Function: Configure the sFlow sample proxy address. The no command deletes the proxy address.
Parameter:

  • <agent-address>: sample proxy IP address which is shown in dotted decimal notation.

Command mode: Global Mode
Default: None.
Usage guide: The proxy address is used to mark the sample proxy, which is similar to OSPF or the Router ID in the BGP. However, it is not necessary to make the sFlow sample proxy work properly.
Example: Configure the sFlow address in Global Mode.

active500EM(config)#sflow agent-address 192.168.1.200

 

12.3.2 sflow analyzer

Command: sflow analyzer sflowtrend
no sflow analyzer sflowtrend
Function: Configure the analyzer used by sFlow. The no command deletes the analyzer.
Parameter:

  • sflowtrend: Inmon analyzer.

Command mode: Global Mode
Default: Not configured.
Usage guide: Configure this command when using sFlowTrend.
Example: Configure the analyzer used by sFlow.

active500EM(config)#sflow analyzer sflowtrend

 

12.3.3 sflow counter-interval

Command: sflow counter-interval <interval-value>
no sflow counter-interval
Function: Configure the max interval of the sFlow statistic sampling. The no command deletes the statistic sampling interval value.
Parameter:

  • <interval-value>: interval value. The valid range is from 20 to 120 seconds.

Command mode: Port Mode
Default: None.
Usage guide: If no statistic sampling interval is configured, there will not be any statistic sampling on the interface.
Example: Set the statistic sampling interval on the interface Ethernet1/0/1 to 20 seconds.

active500EM(config-if-ethernet1/0/1)#sflow counter-interval 20

 

12.3.4 sflow data-len

Command: sflow data-len <length-value>
no sflow data-len
Function: Configure the max length of the sFlow packet data. The no command restores to default.
Parameters:

  • <length-value>: value of the length. The valid range is from 500 to 1470.

Command mode: Port Mode
Default: 1400.
Usage guide: When combining several samples to a sFlow group to be sent, the length of the group excluding the MAC head and IP head parts should not exceed the configured value.
Example: Configure the max length of the sFlow packet data to 1000.

active500EM(config-if-ethernet1/0/2)#sflow data-len 1000

 

12.3.5 sflow destination

Command: sflow destination <collector-address> [<collector-port>] no sflow destination
Function: Configure the IP address and port number of the host on which the sFlow analysis software is installed. If the port has been configured with an IP address, the port configuration will be applied. If not, the global configuration will be applied. The no command restores the port to default and deletes the IP address.
Parameters:

  • <collector-address>: IP address of the analyzer shown in dotted decimal notation.
  • <collector-port>: destination port of the sent sFlow packets.

Command mode: Global Mode and Port Mode
Default: The destination port of the sFlow packet is defaulted to 6343. The analyzer has no default address.
Usage guide: If the analyzer address is configured in Port Mode, this IP address and port configured in Port Mode will be applied when sending the sample packet. Otherwise, the address and port configured in global mode will be applied. The analyzer address should be configured to?allow the sFlow sample proxy to work properly.
Example: Configure the analyzer address and port in Global Mode.

active500EM(config)#sflow destination 192.168.1.200 1025

 

12.3.6 sflow header-len

Command: sflow header-len <length-value>
no sflow header-len
Function: Configure the length of the head data packet copied in the sFlow data sampling. The no command restores to default.
Parameters:

  • <length-value>: value of the length. The valid range is from 32 to 256.

Command mode: Port Mode
Default: 128.
Usage guide: If the packet sample cannot be identified as IPv4 or IPv6 when sent to the CPU, a certain length of the head of the group has to be copied to the sFlow packet and sent out. The length of the copied content is configured by this command.
Example: Configure the length of the packet data head copied in the sFlow data sampling to 50.

active500EM(config-if-ethernet1/0/2)#sflow header-len 50

 

12.3.7 sflow priority

Command: sflow priority <priority-value>
no sflow priority
Function: Configure the priority when sFlow receives a packet from the hardware. The no command restores to default.
Parameters:

  • <priority-value>: priority value. The valid range is from 0 to 3.

Command mode: Global Mode
Default: 0.
Usage guide: When a sample packet is sent to the CPU, it is not recommended to assign a high priority for the packet in order to avoid interference with regular receiving and sending of other protocol packets. The higher the priority value set, the higher its priority will be.
Example: Configure the priority when sFlow receives packets from the hardware in Global Mode.

active500EM(config)#sflow priority 1

 

12.3.8 sflow rate

Command: sflow rate { input <input-rate> | output <output-rate >}
no sflow rate [input | output]
Function: Configure the sample rate of the sFlow hardware sampling. The no command deletes the sampling rate value.
Parameters:

  • <input-rate>: ingress group sampling rate. The valid range is from 1000 to 16383500.
  • <output-rate>: egress group sampling rate. The valid range is from 1000 to 16383500.

Command mode: Port Mode
Default: None.
Usage guide: The traffic sampling will not be performed if the sampling rate is not configured on the port. If the ingress group sampling rate is set to 10000, this indicates one group will be sampled every 10000 ingress groups.
Example: Configure the ingress sample rate on port Ethernet1/0/1 to 10000 and the egress sample rate to 20000.

active500EM(config-if-ethernet1/0/1)#sflow rate input 10000
active500EM(config-if-ethernet1/0/1)#sflow rate output 20000

 

12.3.9 show sflow

Command: show sflow
Function: Display the sFlow configuration state.
Parameters: None.
Command mode: All Modes
Default: None.
Usage guide: This command is used to display the sFlow configuration state.
Example: Display the sFlow configuration state.

active500EM#show sflow
Sflow version 1.2
Agent address is 172.16.1.100
Collector address have not configured
Collector port is 6343
Sampler priority is 2
Sflow DataSource: type 2, index 194(Ethernet1/0/2)
  Collector address is 192.168.1.200
  Collector port is 6343
  Counter interval is 0
  Sample rate is input 0, output 0
  Sample packet max len is 1400
  Sample header max len is 50
  Sample version is 4
Displayed Information Explanation
Sflow version 1.2 Indicates that the sFlow version is 1.2
Agent address is 172.16.1.100 Address of the sFlow sample proxy is 172.16.1.100
Collector address have not configured The sFlow global analyzer address is not configured
Collector port is 6343 The sFlow global destination port is defaulted to 6343
Sampler priority is 2 The priority of sFlow when receiving packets from the hardware is 2
Sflow DataSource: type 2, index 194(Ethernet1/0/1) One sample proxy data source of the sFlow is the interface Ehternet1/0/1 and its type is 2 (Ethernet), the interface index is 194
Collector address is 192.168.1.200 The analyzer address of the sampling address of the Ethernet1/0/1 interface is 192.168.1.200
Collector port is 6343 Default value of the port on the Ethernet1/0/1 interface sampling proxy is 6343
Counter interval is 20 The statistic sampling interval on Ethernet1/0/1 interface is 20 seconds
Sample rate is input 10000, output 0 The ingress traffic rate of Ethernet1/0/1 interface sampling proxy is 10000 and no egress traffic sampling will be performed
Sample packet max len is 1400 The length of the sFlow group data sent by the Ethernet1/0/1 interface should not exceed 1400 bytes.
Sample header max len is 50 The length of the packet data head copied in the data sampling of the Ethernet1/0/1 interface sampling proxy is 50
Sample version is 4 The datagram version of the sFlow group sent by the Ethernet1/0/1 interface sampling proxy is 4

 


Return to Controller Wired CLI Table of Contents