- Table of Contents
-
- H3C WX6103 Access Controller Switch Interface Board Command Reference-6W102
- 00-Preface
- 01-Login Commands
- 02-VLAN Commands
- 03-IP Addressing and IP Performance Commands
- 04-QinQ-BPDU Tunneling Commands
- 05-Port Correlation Commands
- 06-Link Aggregation Commands
- 07-MAC Address Table Management Commands
- 08-Port Security Commands
- 09-MSTP Commands
- 10-IP Routing-GR Overview Commands
- 11-IPv4 Routing Commands
- 12-IP Source Guard Commands
- 13-DLDP Commands
- 14-Multicast Commands
- 15-LLDP Commands
- 16-sFlow Commands
- 17-ARP Commands
- 18-DHCP Commands
- 19-ACL Commands
- 20-QoS Commands
- 21-Port Mirroring Commands
- 22-UDP Helper Commands
- 23-SNMP-RMON Commands
- 24-NTP Commands
- 25-DNS Commands
- 26-File System Management Commands
- 27-Information Center Commands
- 28-System Maintaining and Debugging Commands
- 29-NQA Commands
- 30-SSH Commands
- 31-SSL-HTTPS Commands
- 32-PKI Commands
- 33-Track Commands
- 34-Index
- Related Documents
-
Title | Size | Download |
---|---|---|
16-sFlow Commands | 41.2 KB |
The term switch in this document refers to a switch in a generic sense or an access controller configured with the switching function unless otherwise specified.
sFlow Configuration Commands
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
GE0/0/1 Both 200000 Random Active
GE0/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. |
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
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
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 0/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] sflow enable outbound
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
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.
Currently, the determine mode is not supported on the WX6103 access controller switch interface board.
Examples
# Specify the sFlow sampling mode as random on GigabitEthernet 0/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] sflow enable inbound
[Sysname-GigabitEthernet0/0/1] sflow sampling-mode random
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 0/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] sflow enable inbound
[Sysname-GigabitEthernet0/0/1] sflow sampling-rate 100000