H3C S5500-EI Series Switches Operation Manual-Release 2102(V1.01)

HomeSupportSwitchesH3C S5500 Switch SeriesConfigure & DeployConfiguration GuidesH3C S5500-EI Series Switches Operation Manual-Release 2102(V1.01)
38-sFlow Configuration
Title Size Download
38-sFlow Configuration 60 KB

Chapter 1  sFlow Configuration

When configuring sFlow, go to these sections for information you are interested in:

l           sFlow Overview

l           Configuring sFlow

l           Displaying sFlow

l           sFlow Configuration Example

l           Troubleshooting sFlow Configuration

1.1  sFlow Overview

1.1.1  Introduction to sFlow

Based on packet sampling, Sampled Flow (sFlow) is a traffic monitoring technology mainly used to collect and analyze traffic statistics.

sFlow has the following two sampling mechanisms:

l           Packet-based sampling: Samples one packet out of a specified number of packets from an sFlow enabled port.

l           Time-based sampling: Samples interface statistics at a specified interval from an sFlow enabled port.

The sFlow system involves an sFlow agent embedded in a device and a remote sFlow collector. The sFlow agent collects traffic from the sFlow enabled ports, 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.

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

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

l           Provides scalability with one sFlow collector monitoring multiple or more sFlow agents.

l           Implements the low-cost sFlow agent.

 

&  Note:

Currently, only the sFlow agent function is supported on S5500-EI Series Ethernet Switches.

 

1.1.2  Operation of sFlow

sFlow operates as follows:

1)         With sFlow enabled, a physical port encapsulates received data into packets and sends them to the sFlow agent.

2)         The sFlow agent periodically collects interface statistics on all sFlow enabled ports.

3)         When the sFlow packet buffer overflows or the one-second timer expires, the sFlow agent sends the sFlow packets to the specified sFlow collector.

1.2  Configuring sFlow

Follow these steps to configure sFlow:

To do…

Use the command…

Remarks

Enter system view

system-view

Configure an IP address for the sFlow agent

sflow agent ip ip-address

Required

Not configured by default.

Specify the IP address and port number of the sFlow collector

sflow collector ip ip-address [ port port-num ]

Required

Not specified by default.

Set the sFlow interval

sflow interval interval-time

Optional

20 seconds by default.

Enter interface view

interface interface-type interface-number

Enable sFlow in the inbound or outbound direction

sflow enable { both | inbound | outbound }

Required

Not enabled by default.

Specify the sFlow sampling mode

sflow sampling-mode { determine | random }

Optional

random by default.

Currently, the determine mode is not supported on S5500-EI series Ethernet switches.

Specify the sFlow sampling rate

sflow sampling-rate rate

Optional

200000 by default.

 

  Caution:

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

l      Currently, you can specify at most two sFlow collectors on S5500-EI Series Ethernet Switches.

 

1.3  Displaying sFlow

To do…

Use the command…

Remarks

Display sFlow configuration information

display sflow

Available in any view

 

1.4  sFlow Configuration Example

I. Network 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.

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.

II. Network diagram

Figure 1-1 Network diagram for sFlow configuration

III. 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.

[Switch] sflow collector ip 3.3.3.2

# Set the sFlow interval to 30 seconds.

[Switch] sflow interval 30

# Enable sFlow in both the inbound and outbound directions on GigabitEthernet 1/0/1.

[Switch] interface GigabitEthernet 1/0/1

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

# Specify the traffic sampling rate.

[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         Both                100000    Random         Active

1.5  Troubleshooting sFlow Configuration

1.5.1  The Remote sFlow Collector Cannot Receive sFlow Packets

I. Symptom

The remote sFlow collector cannot receive sFlow packets.

II. Analysis

l           sFlow is not enabled globally because the sFlow agent or/and the sFlow collector are not specified.

l           No port is enabled with sFlow to sample data.

l           The IP address of the sFlow collector specified on the sFlow agent is different from that of the remote sFlow collector.

l           No IP address is configured for the Layer 3 interface on the device, or the IP address is configured, but the UDP packets with the IP address being the source cannot reach the sFlow collector.

l           The physical link between the device and the sFlow collector fails.

III. Solution

1)         Check whether sFlow is correctly configured by displaying sFlow configuration with the display sflow command.

2)         Check whether the correct IP address is configured for the device to communicate with the sFlow collector.

3)         Check whether the physical link between the device and the sFlow collector is normal.

 

  • 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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网