How to configure sFlow on S series switches

30

For S series switches (except S1700), two sampling modes are provided, including flow sampling and counter sampling.
1. Flow sampling is based on data packets. An sFlow agent samples and analyzes packets in a direction on a specified interface based on the sampling ratio. Then the sFlow agent encapsulates the original packets and parsing result into sFlow packets, and sends the sFlow packets to an sFlow collector.
2. Counter sampling is based on time. An sFlow agent periodically collects traffic statistics, processor statistics, and memory usage on an interface, encapsulates collected information in sFlow packets, and sends the sFlow packets to an sFlow collector.
Flow sampling and counter sampling are independent of each other. Flow sampling obtains information about flows of a specified service, whereas counter sampling obtains traffic statistics on an interface. Counter sampling is applicable for entire network status monitoring. It is recommended that you configure both the sampling modes.

The following is a configuration example:
1. Configure sFlow agent and sFlow collector information.
[HUAWEI] sflow agent ip 10.1.10.1 //Configure an IP address for the sFlow agent.
[HUAWEI] sflow collector 2 ip 10.1.10.2 description netserver //Configure sFlow collector information: ID 2, IP address 10.1.10.2, and description netserver for the sFlow collector.
2. Configure flow sampling.
[HUAWEI] interface gigabitethernet 1/0/2
[HUAWEI-GigabitEthernet1/0/2] sflow flow-sampling rate 4000 //Set the flow sampling ratio.
[HUAWEI-GigabitEthernet1/0/2] sflow flow-sampling collector 2 //Specify sFlow collector 2 as the target collector to receive sFlow packets sent by the sFlow agent.
3. Configure counter sampling.
[HUAWEI-GigabitEthernet1/0/2] sflow counter-sampling interval 120 //Set the counter sampling interval to 120s.
[HUAWEI-GigabitEthernet1/0/2] sflow counter-sampling collector 2 //Specify sFlow collector 2 as the target collector to receive sFlow packets sent by the sFlow agent.
[HUAWEI-GigabitEthernet1/0/2] quit
[HUAWEI] quit

Other related questions:
How to configure sFlow agent and sFlow collector on a CE series switch
The Sampled Flow (sFlow) system involves an sFlow agent embedded in a Huawei switch and a remote sFlow collector. The sFlow agent obtains traffic statistics from an interface using sampling and encapsulates them into sFlow packets. The collector analyzes the sFlow packets received from the agent and displays traffic statistics in a report. # Set the IP addresses of an sFlow agent and collector to 10.1.1.1 and 10.1.2.1 respectively, and set the sFlow packet sending mode to enhanced. Retain the default packet length 1400. system-view [~HUAWEI] sflow agent ip 10.1.1.1 [*HUAWEI] sflow collector 1 ip 10.1.2.1 enhanced [*HUAWEI] commit Note: 1. The enhanced mode is supported by only CE12800 series switches. In V100R500C10 and V100R500C00, the enhanced mode is recommended when the collector is located on the network connected to a service port. In the enhanced mode, the switch sends sFlow packets to the collector through service cards. In V100R006C00 and later versions, you do not need to configure the enhanced mode. The switch will determine to send sFlow packets through the management port or service cards based on the routing information on the collector. 2. In the enhanced mode, the switch cannot send sFlow packets through the management port.

How to configure sFlow sampling on a CE series switch
An sFlow agent provides two sampling modes: flow sampling and counter sampling. 1. Flow sampling: An sFlow agent samples and analyzes packets in a direction on a specified interface based on a sampling rate, encapsulates the analysis result into sFlow packets, and then sends the sFlow packets to an sFlow collector. 2. Counter sampling: An sFlow agent periodically collects traffic statistics on interfaces, processor, and memory, encapsulates collected information into sFlow packets, and sends the sFlow packets to an sFlow collector. Flow sampling and counter sampling are independent of each other. Flow sampling obtains information about flows of a specified service, whereas counter sampling obtains traffic statistics on an interface. # Set the flow sampling rate on 10GE1/0/1 to 32768. system-view [~HUAWEI] interface 10ge/0/1 [~HUAWEI-10GE1/0/1] sflow sampling collector 1 rate 32768 inbound outbound [*HUAWEI-10GE1/0/1] commit # Set the counter sampling interval on 10GE1/0/1 to 20s. system-view [~HUAWEI] interface 10ge/0/1 [~HUAWEI-10GE1/0/1] sflow counter collector 1 [*HUAWEI-10GE1/0/1] commit

Whether S series switches support sFlow
Sampled Flow (sFlow) is a traffic monitoring technology that collects and analyzes traffic statistics. The sFlow system involves an sFlow agent embedded in a device and a remote sFlow collector. The sFlow agent obtains traffic statistics from an sFlow-enabled interface and encapsulates them into sFlow packets. When an sFlow packet buffer overflows or an sFlow packet expires (exceeding 1s), the sFlow agent sends the sFlow packets to the sFlow collector. The sFlow collector analyzes the sFlow packets and displays the traffic statistics in a report. - S series modular switches support sFlow. However, X1E series cards, and XGE interfaces connected to the ACU2, ET1D2IPS0S00, ET1D2FW00S00, ET1D2FW00S01, and ET1D2FW00S02 cards do not support sFlow. Flow sampling and counter sampling can only be used on Layer 2 physical interfaces, including member interfaces of an Eth-Trunk, but cannot be used on Eth-Trunk interfaces and Layer 3 interfaces. - The following S series fixed switches support sFlow: S1720GW-E and S1720GWR-E in V200R010 and later versions S2720EI in V200R006 and later versions (The S2720EI is unavailable in V200R007 and later versions.) S2750EI in V200R003 and later versions S5700LI and S5700S-LI in V200R003 and later versions S5710-X-LI in V200R008 and later versions S5700EI in V100R005 and later versions (The S5700EI is unavailable in V200R006 and later versions.) S5710EI in V200R001 and later versions (The S5710EI is unavailable in V200R006 and later versions.) S5720EI in V200R007 and later versions S5720LI and S5720S-LI in V200R010 and later versions S5720SI and S5720S-SI in V200R008 and later versions S5700HI in V100R006 and later versions (The S5700HI is unavailable in V200R006 and later versions.) S5710HI in V200R003 and later versions (The S5710HI is unavailable in V200R006 and later versions.) S6700EI in V100R006 and later versions (The S6700EI is unavailable in V200R006 and later versions.) S6720EI in V200R008 and later versions S6720S-EI in V200R009 and later versions S600-E in V200R010 and later versions Flow sampling and counter sampling can only be used on Layer 2 physical interfaces, including member interfaces of an Eth-Trunk, but cannot be used on Eth-Trunk interfaces and Layer 3 interfaces. - E series switches support sFlow. Flow sampling and counter sampling can only be used on Layer 2 physical interfaces, including member interfaces of an Eth-Trunk, but cannot be used on Eth-Trunk interfaces and Layer 3 interfaces.

VPN instance configuration on S series switch
For the configuration of BGP/MPLS IP VPN: On the S12700, see Example for Configuring BGP/MPLS IP VPN in the S12700 Typical Configuration Examples. On the S1720&S2700&S3700&S5700&S6700&S7700&S9700, see Example for Configuring BGP/MPLS IP VPN in the S1720&S2700&S3700&S5700&S6700&S7700&S9700 Typical Configuration Examples. On the S9300, see Example for Configuring BGP/MPLS IP VPN in the Sx300 Series Switches Typical Configuration Examples.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top