H3C Low-End and Mid-Range Ethernet Switches Configuration Examples(V1.01)

HomeSupportSwitchesH3C S5500 Switch SeriesConfigure & DeployConfiguration ExamplesH3C Low-End and Mid-Range Ethernet Switches Configuration Examples(V1.01)
Table of Contents
Related Documents
48-sFlow Configuration Guide
Title Size Download
48-sFlow Configuration Guide 44.86 KB

Configuring sFlow

Sampled Flow (sFlow) is a traffic monitoring technology mainly used to collect and analyze traffic statistics.

The sFlow system involves an sFlow agent embedded in a device and a remote sFlow collector. The sFlow agent collects traffic statistics and packets from the sFlow enabled ports on the device, encapsulates the information into sFlow packets, and sends the packets to the sFlow collector. The sFlow collector analyzes the sFlow packets and displays the results.

sFlow has the following two sampling mechanisms:

l          Packet-based sampling: An sFlow enabled port samples one packet out of a configurable number of packets passing through it.

l          Time-based sampling: The sFlow agent samples the statistics of all sFlow enabled ports at a configurable interval.

As a traffic monitoring technology, sFlow has the following advantages:

l          Supporting traffic monitoring on Gigabit and higher-speed networks.

l          Providing scalability to allow one sFlow collector to monitor multiple or more sFlow agents.

l          Implementing the low-cost sFlow agent.

Network Diagram

Figure 1-1 Network diagram for sFlow configuration

 

Networking and Configuration Requirements

l          Host A and Server are connected to Switch through GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 respectively.

l          Host B works as an sFlow collector with IP address 3.3.3.2 and port number 6343, and is connected to Switch through GigabitEthernet 1/0/3.

l          GigabitEthernet 1/0/3 belongs to VLAN 1, having an IP address of 3.3.3.1.

l          Run sFlow agent on Switch, and enable sFlow on GigabitEthernet 1/0/1 to monitor traffic on this interface. Switch sends sFlow packets through GigabitEthernet 1/0/3 to Host B, which then analyzes the sFlow packets and displays the results.

Applicable Product Matrix

Product series

Software version

Hardware version

S5500-EI Series Ethernet Switches

Release 2102

All versions

S7500E Series Ethernet Switches

Release 6300

All versions

 

Configuration Procedure

# Configure an IP address for the sFlow agent.

<Switch> system-view

[Switch] sflow agent ip 3.3.3.1

# Specify the IP address and port number of the sFlow collector. The default port number of the sFlow collector is 6343.

[Switch] sflow collector ip 3.3.3.2

# Set the sFlow interval to 30 seconds.

[Switch] sflow interval 30

# Enable sFlow in the inbound direction on GigabitEthernet 1/0/1.

[Switch] interface GigabitEthernet 1/0/1

[Switch-GigabitEthernet1/0/1] sflow enable inbound

# Specify the traffic sampling rate as 100000, that is, configure the port to sample one out of 100000 packets passing through it.

[Switch-GigabitEthernet1/0/1] sflow sampling-rate 100000

# Display the sFlow configuration information.

[Switch-GigabitEthernet1/0/1] display sflow

 sFlow Global Information:

    Agent           IP:3.3.3.1

    Collector       IP:3.3.3.2          Port: 6343

    Interval(s): 30

 sFlow Port Information:

    Interface       Direction           Rate      Mode           Status

    GE1/0/1         Inbound             100000    Random         Active

Complete Configuration

#

 sflow agent ip 3.3.3.1

 sflow collector ip 3.3.3.2

 sflow interval 30

#

interface GigabitEthernet1/0/1

 sflow enable inbound

 sflow sampling-rate 100000

#

Configuration Guidelines

l          S5500-EI series Ethernet switches do not support the sflow sampling-mode determine command. That is, the sFlow sampling mode cannot be specified as determine.

l          Currently, only the sFlow agent function is supported on S5500-EI series Ethernet switches, and only one IP address can be specified for the sFlow agent.

l          Currently, you can specify two sFlow collectors (one for backup) with different IP addresses for an S5500-EI series Ethernet switch. The switch will send sFlow packets to the two sFlow collectors at the same time.

l          The sFlow agent and sFlow collector must not have the same IP address.

l          You can specify the IP address of the loopback interface on the device as the sFlow agent’s interface.

l          If you want to enable sFlow on an aggregation group, you need to enable sFlow on each member port.

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网