02-IP Services Volume

HomeSupportSwitchesH3C S7500E Switch SeriesReference GuidesCommand ReferencesH3C S7500E Series Ethernet Switches Command Manual(Release 6300 series V1.03)02-IP Services Volume
10-sFlow Commands
Title Size Download
10-sFlow Commands 39.76 KB

sFlow Configuration Commands

sFlow Configuration Commands

display sflow

Syntax

display sflow [ slot slot-number ]

View

Any view

Default Level

1: Monitor level

Parameters

slot slot-number: Displays the sFlow configuration information on a slot.

Description

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

Examples

# Display the sFlow configuration information of Slot 2.

<Sysname> display sflow slot 2

 sFlow Version: 5

 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

    GE2/0/1         In/Out               200000    Random         Active

    GE2/0/20        In                    200000    Random         Active

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

Field

Description

sFlow Version: 5

The sFlow version is 5

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      In/Out: Samples both inbound and outbound packets.

l      In: Samples inbound packets.

l      Out: 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.

 

sflow agent ip

Syntax

sflow agent ip ip-address

undo sflow agent ip

View

System view

Default Level

2: System level

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

sflow collector ip

Syntax

sflow collector ip ip-address [ port portnum ]

undo sflow collector ip ip-address

View

System view

Default Level

2: System level

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

sflow enable

Syntax

sflow enable { inbound | outbound }

undo sflow enable { inbound | outbound }

View

Interface view

Default Level

2: System level

Parameters

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 2/0/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/0/1

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

sflow interval

Syntax

sflow interval interval-time

undo sflow interval

View

System view

Default Level

2: System level

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

sflow sampling-mode

Syntax

sflow sampling-mode { determine | random }

undo sflow sampling-mode

View

Interface view

Default Level

2: System level

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.

 

Currently, the determine mode is not supported on S7500E series Ethernet switches.

 

Examples

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

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/0/1

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

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

sflow sampling-rate

Syntax

sflow sampling-rate rate

undo sflow sampling-rate

View

Interface view

Default Level

2: System level

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, that is, one out of every 200000 packets is sampled.

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 2/0/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/0/1

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

[Sysname-GigabitEthernet2/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
新华三官网