11-Network Management and Monitoring Command Reference

HomeSupportReference GuidesCommand ReferencesH3C S6520X-HI[EI][SI] & S6520-SI & S5560X-HI & S5000-EI & MS4600 Switch Series Command References-R63xx-6W10111-Network Management and Monitoring Command Reference
15-sFlow commands
Title Size Download
15-sFlow commands 78.93 KB

sFlow commands

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              netserver

2     192.168.3.5     6543  500        1400              Office

Port counter sampling information:

Interface   Instance   CID   Interval(s)

XGE1/0/1    2          2     100

XGE1/0/1    1          1     200

Port flow sampling information:

Interface   Instance   FID   MaxHLen Rate       Mode      Status

XGE1/0/1    2          2     128     1000       Random    Active

XGE1/0/1    1          1     128     1000       Random    Active

Table 1 Command output

Field

Description

sFlow datagram version

sFlow version, which can only take the value of 5. The device can send only sFlow packets whose sFlow version is 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 instance to which the sFlow collector belongs.

Description

Description of the sFlow collector.

Port counter sampling information

Information about interfaces configured with counter sampling.

Port flow sampling information

Information about interfaces configured with flow sampling.

Interface

Interface configured with sFlow.

Instance

ID of the sFlow instance for sending counter or flow sampled packets.

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.

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 ipv4-address | ipv6 ipv6-address }

undo sflow agent { ip | ipv6 }

Default

No IP address is configured for the sFlow agent. The device periodically identifies whether the sFlow agent has an IP address. If the sFlow agent does not have an IP address, 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 ipv4-address: Specifies an IPv4 address for the sFlow agent.

ipv6 ipv6-address: Specifies an IPv6 address for the sFlow agent.

Usage guidelines

As a best practice, manually configure an IP address for the sFlow agent.

If you execute this command multiple times, the most recent configuration takes effect.

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 ipv4-address | ipv6 ipv6-address } [ port port-number | datagram-size size | time-out seconds | description string ] *

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. The value range for this argument is 1 to 10.

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance to which the sFlow collector belongs. The vpn-instance-name argument represents the VPN instance name, a case-sensitive string of 1 to 31 characters. The VPN instance name cannot contain spaces. By default, the sFlow collector belongs to the public network.

ip ipv4-address: Specifies an IPv4 address for the sFlow collector.

ipv6 ipv6-address: Specifies an IPv6 address for the sFlow collector.

port port-number: Specifies the UDP port number of the sFlow collector, in the range of 1 to 65535. The default is 6343.

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 value is 1400 bytes.

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 settings are deleted. The sFlow collector settings do not age out by default.

description string: Specifies a description, a case-sensitive string of 1 to 127 characters. The default description is "CLI Collector."

Examples

# Configure the following parameters for sFlow collector 2:

·     IP address—3.3.3.1.

·     Port number—Default.

·     Description—netserver.

·     Aging timer—1200 seconds.

·     Maximum length of the sFlow data portion in the sFlow packet—1000 bytes.

<Sysname> system-view

[Sysname] sflow collector 2 ip 3.3.3.1 description netserver time-out 1200 datagram-size 1000

sflow counter collector

Use sflow counter collector to specify an sFlow instance and an sFlow collector for counter sampling.

Use undo sflow counter collector to restore the default.

Syntax

sflow counter [ instance instance-id ]  collector collector-id

undo sflow counter [ instance instance-id ]  collector

Default

No sFlow instance or sFlow collector is specified for counter sampling.

Views

Layer 2 Ethernet interface view

Layer 3 Ethernet interface view

Predefined user roles

network-admin

Parameters

instance instance-id: Specifies an sFlow instance by its ID in the range of 1 to 4. The default ID for an sFlow instance is 1. If you do not specify an sFlow instance, this command specifies sFlow instance 1 for counter sampling.

collector-id: Specifies an sFlow collector by its ID. The value range for this argument is 1 to 10.

Usage guidelines

This command enables the device to send counter sampling information on an interface to the specified sFlow collector.

On an interface, one sFlow instance has only one sFlow collector. To specify multiple sFlow collectors for counter sampling, execute this command multiple times and use different sFlow instances each time. If you execute this command multiple times but use the same sFlow instance and different sFlow collectors each time, the most recent configuration takes effect.

On an interface, counter sampling and flow sampling are separate from each other. They can have the same sFlow instance but different sFlow collectors specified.

Settings of sFlow instances and sFlow collectors for different interfaces do not affect each other. Configure this command based on actual requirement.

Examples

# Specify sFlow instance 2 and sFlow collector 2 on Ten-GigabitEthernet 1/0/1 for counter sampling.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/1] sflow counter instance 2 collector 2

sflow counter interval

Use sflow counter interval to enable counter sampling and set a counter sampling interval.

Use undo sflow counter interval to disable counter sampling.

Syntax

sflow counter interval interval

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: 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 Ten-GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/1] sflow counter interval 120

sflow flow collector

Use sflow flow collector to specify an sFlow instance and an sFlow collector for flow sampling.

Use undo sflow flow collector to restore the default.

Syntax

sflow flow [ instance instance-id ]  collector collector-id

undo sflow flow [ instance instance-id ]  collector

Default

No sFlow instance or sFlow collector is specified for flow sampling.

Views

Layer 2 Ethernet interface view

Layer 3 Ethernet interface view

Predefined user roles

network-admin

Parameters

instance instance-id: Specifies an sFlow instance by its ID in the range of 1 to 4. The default ID for an sFlow instance is 1. If you do not specify an sFlow instance, this command specifies sFlow instance 1 for flow sampling.

collector-id: Specifies an sFlow collector by its ID. The value range for this argument is 1 to 10.

Usage guidelines

This command enables the device to send flow sampling information on an interface to the specified sFlow collector.

On an interface, one sFlow instance has only one sFlow collector. To specify multiple sFlow collectors for flow sampling, execute this command multiple times and use different sFlow instances each time. If you execute this command multiple times but use the same sFlow instance and different sFlow collectors each time, the most recent configuration takes effect.

On an interface, counter sampling and flow sampling are separate from each other. They can have the same sFlow instance but different sFlow collectors specified.

Settings of sFlow instances and sFlow collectors for different interfaces do not affect each other. Configure this command based on actual requirement.

Examples

# Specify sFlow instance 2 and sFlow collector 2 on Ten-GigabitEthernet 1/0/1 for flow sampling.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/1] sflow flow instance 2 collector 2

sflow flow max-header

Use sflow flow max-header to set the maximum number of bytes (starting from the packet header) that flow sampling can copy per packet.

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. As a best practice, use the default value.

Examples

# Set the maximum number of bytes to 60 for flow sampling to copy per packet on Ten-GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/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 random

undo sflow sampling-mode

Default

Random sampling is used.

Views

Layer 2 Ethernet interface view

Layer 3 Ethernet interface view

Predefined user roles

network-admin

Parameters

random: Specifies the random sampling mode. For example, if the packet sampling interval is set to 4000 (by using the sflow sampling-rate command), 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 random flow sampling mode on Ten-GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/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.

Use undo sflow sampling-rate to disable flow sampling.

Syntax

sflow sampling-rate rate

undo sflow sampling-rate

Default

Flow sampling is disabled.

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. The value range for this argument is 1000 to 500000. As a best practice, set the sampling interval to 2n that is greater than or equal to 8192, for example, 32768.

Examples

# Enable flow sampling to sample a packet out of 32768 packets on Ten-GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface ten-gigabitethernet 1/0/1

[Sysname-Ten-GigabitEthernet1/0/1] sflow sampling-rate 32768

Related commands

sflow sampling-mode

sflow source

Use sflow source to specify the source IP address of sent sFlow packets.

Use undo sflow source to restore the default.

Syntax

sflow source { ip ipv4-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 ipv4-address: Specifies the source IPv4 address of sent sFlow packets.

ipv6 ipv6-address: Specifies the source IPv6 address of sent sFlow packets.

Examples

# Specify the source IPv4 address of sent sFlow packets as 10.0.0.1.

<Sysname> system-view

[Sysname] sflow source ip 10.0.0.1

 

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