- Table of Contents
-
- 11 Network Management and Monitoring Command Reference
- 00-Preface
- 01-System maintenance and debugging commands
- 02-NTP commands
- 03-Information center commands
- 04-SNMP commands
- 05-RMON commands
- 06-NQA commands
- 07-Mirroring commands
- 08-sFlow commands
- 09-Process monitoring and maintenance commands
- 10-EAA commands
- 11-NETCONF commands
- 12-Packet capture commands
- Related Documents
-
Title | Size | Download |
---|---|---|
08-sFlow commands | 85.18 KB |
display sflow
Use display sflow to display sFlow configuration and operation information.
Syntax
display sflow
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display sFlow configuration and operation information.
<Sysname> display sflow
sFlow datagram version: 5
Global information:
Agent IP: 10.10.10.1(CLI)
Source address: 10.0.0.1 2001::1
Collector information:
ID IP Port Aging Size VPN-instance Description
1 22:2:20::10 6535 N/A 1400 vpn1 netserver
2 192.168.3.5 6543 500 1400 Office
Port information:
Interface CID Interval(s) FID MaxHLen Rate Mode Status
FGE1/1/1 1 100 1 128 1000 Random Active
FGE1/1/2 2 100 2 128 1000 Random Active
Table 1 Command output
Field |
Description |
sFlow datagram version |
sFlow version, which can only take the value of 5. |
Global information |
Global sFlow information. |
Agent IP |
IP address of the sFlow agent: · CLI—Manually configured IP address. · Auto—Automatically configured IP address. |
Source address |
Source IP address of sFlow packets. |
Collector information |
sFlow collector information. |
ID |
sFlow collector ID. |
IP |
sFlow collector IP address. |
Port |
sFlow collector port. |
Aging |
Remaining lifetime of the sFlow collector. If this field displays N/A, the sFlow collector never ages out. |
Size |
Maximum length of the sFlow data portion in an sFlow packet. |
VPN-instance |
Name of the VPN bound with the sFlow collector. |
Description |
Description of the sFlow collector. |
Port information |
Information about interfaces configured with sFlow. |
Interface |
Interface configured with sFlow. |
CID |
ID of the sFlow collector, for receiving counter sampled packets. If no sFlow collector ID is specified, this field displays 0. |
Interval(s) |
Counter sampling interval, in seconds. |
FID |
ID of the sFlow collector for receiving flow sampled packets. If no sFlow collector ID is specified, this field displays 0. |
MaxHLen |
Maximum number of bytes that can be copied in a sampled packet (starting from the packet header). |
Rate |
Number of packets out of which the interface samples a packet by using flow sampling. |
Mode |
Flow sampling mode. The value is Random that samples a random number of packets. |
Status |
sFlow status of the port: · Suspended—The sFlow feature is suspended because the port is down. · Active—The sFlow feature is active because the port is up. |
sflow agent
Use sflow agent to configure an IP address for the sFlow agent.
Use undo sflow agent to restore the default.
Syntax
sflow agent { ip ip-address | ipv6 ipv6-address }
undo sflow agent { ip | ipv6 }
Default
No IP address is configured for the sFlow agent. The device periodically checks whether the sFlow agent has an IP address. If it does not, the device automatically selects an IPv4 address for the sFlow agent. It does not save the IPv4 address in the configuration file.
Views
System view
Predefined user roles
network-admin
Parameters
ip ip-address: Specifies an IPv4 address for the sFlow agent.
ipv6 ipv6-address: Specifies an IPv6 address for the sFlow agent.
Usage guidelines
H3C recommends that you manually configure an IP address for the sFlow agent.
Only one IP address can be specified for the sFlow agent on the device. A newly configured IP address overwrites the existing one.
Examples
# Specify IP address 10.10.10.1 for the sFlow agent.
<Sysname> system-view
[Sysname] sflow agent ip 10.10.10.1
sflow collector
Use sflow collector to configure parameters for an sFlow collector.
Use undo sflow collector to remove an sFlow collector.
Syntax
sflow collector collector-id [ vpn-instance vpn-instance-name ] { ip ip-address | ipv6 ipv6-address } [ port port-number ] [ datagram-size size ] [ time-out seconds ] [ description text ]
undo sflow collector collector-id
Default
No sFlow collector information is configured.
Views
System view
Predefined user roles
network-admin
Parameters
collector-id: Specifies an sFlow collector by its ID in the range of 1 to 10.
vpn-instance vpn-instance-name: Specifies the VPN instance of the sFlow collector by name, a case-sensitive string of 1 to 31 characters that cannot contain spaces. By default, the sFlow collector belongs to the public network.
ip ip-address: Specifies the IPv4 address of the sFlow collector.
ipv6 ipv6-address: Specifies the IPv6 address of the sFlow collector.
description text: Configures a description for the sFlow collector. The default description is "CLI Collector."
datagram-size size: Specifies the maximum length of the sFlow data portion in an sFlow packet. The value range for the size argument is 200 to 3000 bytes and the default is 1400 bytes.
port port-number: Specifies the port number of the sFlow collector, in the range of 1 to 65535. The default is 6343.
time-out seconds: Specifies the aging timer of the sFlow collector, in the range of 1 to 2147483647 seconds. When the aging timer expires, the sFlow collector is deleted. The sFlow collector does not age out by default.
Examples
# Configure the following parameters for sFlow collector 2:
· VPN name—vpn1.
· IP address—3.3.3.1.
· Port number—Default.
· Aging timer—1200 seconds.
· Maximum length of the sFlow data portion in the sFlow packet—1000 bytes.
<Sysname> system-view
[Sysname] sflow collector 2 vpn-instance vpn1 ip 3.3.3.1 description netserver time-out 1200 datagram-size 1000
sflow counter interval
Use sflow counter interval to enable counter sampling and set a counter sampling interval.
Use undo sflow counter interval to restore the default.
Syntax
sflow counter interval interval-time
undo sflow counter interval
Default
Counter sampling is disabled.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Predefined user roles
network-admin
Parameters
interval-time: Specifies the counter sampling interval in the range of 2 to 86400 seconds.
Examples
# Enable counter sampling and set the counter sampling interval to 120 seconds on FortyGigE 1/1/1.
<Sysname> system-view
[Sysname] interface fortygige 1/1/1
[Sysname-FortyGigE1/1/1] sflow counter interval 120
sflow counter collector
Use sflow counter collector to specify an sFlow collector for counter sampling.
Use undo sflow counter collector to restore the default.
Syntax
sflow counter collector collector-id
undo sflow counter collector
Default
No sFlow collector is specified for counter sampling.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Predefined user roles
network-admin
Parameters
collector-id: Specifies an sFlow collector by its ID in the range of 1 to 10.
Examples
# Specify sFlow collector 2 on FortyGigE 1/1/1 for counter sampling.
<Sysname> system-view
[Sysname] interface fortygige 1/1/1
[Sysname-FortyGigE1/1/1] sflow counter collector 2
sflow flow collector
Use sflow flow collector to specify an sFlow collector for flow sampling.
Use undo sflow flow collector to restore the default.
Syntax
sflow flow collector collector-id
undo sflow flow collector
Default
No sFlow collector is specified for flow sampling.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Predefined user roles
network-admin
Parameters
collector-id: Specifies an sFlow collector by its ID in the range of 1 to 10.
Examples
# Specify sFlow collector 2 on FortyGigE 1/1/1 for flow sampling.
<Sysname> system-view
[Sysname] interface fortygige 1/1/1
[Sysname-FortyGigE1/1/1] sflow flow collector 2
sflow flow max-header
Use sflow flow max-header to set the maximum number of bytes of a packet (starting from the packet header) that flow sampling can copy.
Use undo sflow flow max-header to restore the default.
Syntax
sflow flow max-header length
undo sflow flow max-header
Default
Flow sampling can copy up to 128 bytes of a packet.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Predefined user roles
network-admin
Parameters
length: Specifies the maximum number of bytes that can be copied, in the range of 18 to 512. H3C recommends that you use the default.
Examples
# Set the maximum number of bytes that can be copied to 60 on FortyGigE 1/1/1.
<Sysname> system-view
[Sysname] interface fortygige 1/1/1
[Sysname-FortyGigE1/1/1] sflow flow max-header 60
sflow sampling-mode
Use sflow sampling-mode to specify a flow sampling mode.
Use undo sflow sampling-mode to restore the default.
Syntax
sflow sampling-mode { determine | random }
undo sflow sampling-mode
Default
The flow sampling mode is random.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Predefined user roles
network-admin
Parameters
determine: Specifies the fixed sampling mode. This mode is not supported in the current software version. It is reserved for future support. For example, if the flow sampling interval is set to 4000 (by using the sflow sampling-rate command), the device samples packets as follows:
· The device randomly samples a packet, like the tenth packet, from the first 4000 packets.
· The next time the device samples the 4010th packet, and so on.
random: Specifies the random sampling mode. For example, if the packet sampling interval is set to 4000, the device samples packets randomly as follows:
· The device might sample one packet from the first 4000 packets.
· The device might sample multiple packets from the next 4000 packets.
· The device might sample no packets from the third 4000 packets.
However, the device samples one packet from 4000 packets on average.
Examples
# Specify the random sampling mode on FortyGigE 1/1/1.
<Sysname> system-view
[Sysname] interface fortygige 1/1/1
[Sysname-FortyGigE1/1/1] sflow sampling-mode random
Related commands
sflow sampling-rate
sflow sampling-rate
Use sflow sampling-rate to enable flow sampling and specify the number of packets out of which flow sampling will sample a packet on an interface.
Use undo sflow sampling-rate to restore the default.
Syntax
sflow sampling-rate rate
undo sflow sampling-rate
Default
No flow sampling rate is configured.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Predefined user roles
network-admin
Parameters
rate: Specifies the number of packets out of which flow sampling will sample a packet on the interface, in the range of 1000 to 500000.
Examples
# Enable flow sampling to sample a packet out of 4000 packets on FortyGigE 1/1/1.
<Sysname> system-view
[Sysname] interface fortygige 1/1/1
[Sysname-FortyGigE1/1/1] sflow sampling-rate 4000
Related commands
sflow sampling-mode
sflow source
Use sflow source to specify the source IP address of sFlow packets.
Use undo sflow source to restore the default.
Syntax
sflow source { ip ip-address | ipv6 ipv6-address } *
undo sflow source { ip | ipv6 } *
Default
The source IP address of sent sFlow packets is determined by routing.
Views
System view
Predefined user roles
network-admin
Parameters
ip ip-address: Specifies the source IPv4 address of sFlow packets.
ipv6 ipv6-address: Specifies the source IPv6 address of sFlow packets.
Examples
# Specify the source IPv4 address of sFlow packets as 10.0.0.1.
<Sysname> system-view
[Sysname] sflow source ip 10.0.0.1