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

HomeSupportSwitchesH3C S5500 Switch SeriesReference GuidesCommand ReferencesH3C S5500-EI Series Switches Command Manual-Release 2102(V1.01)
38-sFlow Commands
Title Size Download
38-sFlow Commands 35 KB

Chapter 1  sFlow Configuration Commands

1.1  sFlow Configuration Commands

1.1.1  display sflow

Syntax

display sflow

View

Any view

Parameters

None

Description

Use the display sflow command to display the sFlow configuration information.

Examples

# Display the sFlow configuration information.

<Sysname> display sflow

 sFlow Global Information:

    Agent            IP:1.1.1.1

    Collector       IP:2.2.2.2          Port:6343

                      IP:3.3.3.3          Port:6343

    Interval(s): 20

 sFlow Port Information:

    Interface       Direction           Rate      Mode           Status

    GE1/0/1         Both                 200000    Random         Active

    GE1/0/20        Inbound             200000    Random         Active

Table 1-1 Description on the fields of the display sflow command

Field

Description

sFlow Global Information

sFlow global information

Agent

IP address of the sFlow agent

Collector

IP address and port number of the sFlow collector

Interval(s)

Counter sampling interval

sFlow Port Information

Information of the ports enabled with sFlow

Interface

sFlow enabled interface

Direction

Packet sampling direction:

l      Both: Samples both inbound and outbound packets.

l      Inbound: Samples inbound packets.

l      Outbound: Samples outbound packets.

Rate

Packet sampling rate

Mode

Packet sampling mode. Random indicates sampling a random number of packets.

Status

Status of the sFlow enabled port:

l      Suspend: Indicates the port is suspended, and it stops sampling.

l      Active: Indicates the port is active and performs sampling.

 

1.1.2  sflow agent ip

Syntax

sflow agent ip ip-address

undo sflow agent ip

View

System view

Parameters

ip-address: IP address of the sFlow agent.

Description

Use the sflow agent ip command to configure the IP address of the sFlow agent.

Use the undo sflow agent ip command to remove the configured IP address.

By default, no IP address is configured for the sFlow agent.

Note that:

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

l           Currently, a device supports only one sFlow agent.

l           sFlow does not work if the sFlow agent has no IP address configured, or when you execute the undo sflow agent ip command.

Examples

# Configure the IP address of the sFlow agent.

<Sysname> system-view

[Sysname] sflow agent ip 10.10.10.1

1.1.3  sflow collector ip

Syntax

sflow collector ip ip-address [ port portnum ]

undo sflow collector ip ip-address

View

System view

Parameters

ip-address: IP address of the sFlow collector.

port portnum: Port number of the sFlow Collector, which is in the range 1 to 65535 and defaults to 6343.

Description

Use the sflow collector ip command to specify the IP address and port number of an sFlow collector.

Use the undo sflow collector ip command to remove the specified IP address.

By default, no sFlow collector IP address is specified.

Note that:

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

l           Currently, you can specify at most two sFlow collectors, with one as the backup sFlow collector.

l           sFlow does not work if no sFlow collector IP address is specified.

l           If only one sFlow collector IP address is specified, sFlow does not work after you execute the undo sflow collector ip command.

Examples

# Specify the IP address and port number of an sFlow collector.

<Sysname> system-view

[Sysname] sflow collector ip 10.10.10.2 port 6343

1.1.4  sflow enable

Syntax

sflow enable { both | inbound | outbound }

undo sflow enable { both | inbound | outbound }

View

Interface view

Parameters

both: Samples both inbound and outbound packets.

inbound: Samples inbound packets.

outbound: Samples outbound packets.

Description

Use the sflow enable command to enable sFlow in the inbound or outbound direction on the port.

Use the undo sflow enable command to disable sFlow in the inbound or outbound direction on the port.

sFlow is disabled by default.

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

Examples

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

<Sysname> system-view

[Sysname] interface GigabitEthernet 1/0/1

[Sysname-GigabitEthernet1/0/1] sflow enable outbound

1.1.5  sflow interval

Syntax

sflow interval interval-time

undo sflow interval

View

System view

Parameters

interval-time: Counter sampling interval in seconds, in the range 2 to 200.

Description

Use the sflow interval command to configure the counter sampling interval.

Use the undo sflow interval command to restore the default interval.

By default, the sampling interval is 20 seconds.

Examples

# Configure the counter sampling interval as 50 seconds.

<Sysname> system-view

[Sysname] sflow interval 50

1.1.6  sflow sampling-mode

Syntax

sflow sampling-mode { determine | random }

undo sflow sampling-mode

View

Interface view

Parameters

determine: Indicates to sample a fixed number of packets.

random: Indicates to sample packets randomly.

Description

Use the sflow sampling-mode command to specify the packet sampling mode.

Use the undo sflow sampling-mode command to restore the default.

By default, the packet sampling mode is random.

Note that this command should be used after sFlow is enabled on the current port.

 

&  Note:

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

 

Examples

# Specify the sFlow sampling mode as random on GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 1/0/1

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

[Sysname-GigabitEthernet1/0/1] sflow sampling-mode random

1.1.7  sflow sampling-rate

Syntax

sflow sampling-rate rate

undo sflow sampling-rate

View

Interface view

Parameters

rate: Packet sampling rate, in the range of 1000 to 500000.

Description

Use the sflow sampling-rate command to configure the packet sampling rate.

Use the undo sflow sampling-rate command to restore the default.

By default, the packet sampling rate is 200000.

Note that this command should be used after sFlow is enabled on the current port.

Examples

# Configure the packet sampling rate as 100000 on GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 1/0/1

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

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

 

  • 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
新华三官网