< Home

sflow collector

Function

The sflow collector command creates an sFlow collector and sets or modifies optional parameters for the sFlow collector.

The undo sflow collector command restores default values of optional parameters of the sFlow collector or deletes the sFlow collector.

By default, no sFlow collector is configured.

Format

sflow collector collector-id { ip [ vpn-instance vpn-instance-name ] ip-address | ipv6 [ vpn-instance vpn-instance-name ] ipv6-address } [ datagram-size datagram-size | port port-num | time-out time ] * [ description description ]

sflow collector collector-id { datagram-size datagram-size | port port-num } * [ description description ]

undo sflow collector collector-id [ datagram-size | port | description ] *

Parameters

Parameter

Description

Value

collector-id

Specifies the ID of an sFlow collector. This ID is used when you specify the collector in subsequent sFlow configuration.

The value is an integer that can be 1 or 2.

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value must be an existing VPN instance name.

ip-address

Specifies an IPv4 address of the sFlow collector.

The value is a value unicast IP address in X.X.X.X format, dotted decimal notation. The value cannot be 127.X.X.X.

ipv6-address

Specifies an IPv6 address for the sFlow collector.

The value is a 32-digit hexadecimal number in the format of X:X:X:X:X:X:X:X and is a valid global IPv6 unicast address.

datagram-size datagram-size

Specifies the maximum length of sFlow packets sent from an sFlow agent to an sFlow collector.

The value is an integer, in bytes. It ranges from 1024 to 8100. The default value is 1400.

port port-num

Specifies the UDP destination port number of sFlow packets.

The value is an integer that ranges from 1 to 65535. The default value is 6343.

description description

Specifies the description of an sFlow collector.

The value is a string of 1 to 255 case-sensitive characters without spaces.

time-out time

Specifies the aging time of an sFlow collector.

The value is an integer that ranges from 0 to 3600, in seconds. The default value is 0, indicating that the sFlow collector is not aged out. If the default value is used, the aging time cannot be changed.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage scenario

sFlow is a traffic monitoring technique that collects and analyzes traffic statistics. An sFlow agent encapsulates traffic statistics into sFlow packets and sends the sFlow packets to all sFlow collectors. To send the sFlow packets to a certain sFlow collector, configure an sFlow collector used to receive sFlow packets and analyze traffic of sFlow packets. When both flow sampling and counter sampling are configured on an interface of an sFlow agent, the sFlow agent sends the flow sampling data and counter sampling data to one or two sFlow collectors. Because sFlow packets are sampled quickly and the number of sFlow packets sent every second is limited, run the sflow collector command with datagram-size length specified to set the maximum length of sFlow packets so that an sFlow packet carries more sampled data. This reduces the number of sent sFlow packets.

When you create an sFlow collector, specify the ID and IP address for the sFlow collector. If the aging time of the sFlow collector is not set, the sFlow collector is not aged out by default and the aging time cannot be changed.

Prerequisites

  • There is a reachable route between an sFlow agent and an sFlow collector.
  • A VPN instance has been created if the sFlow collector is located on a private network.

Configuration Impact

If you run the sflow collector command multiple times on the same address family and VPN instance, only the latest configuration takes effect.

Precautions

A maximum of two sFlow collectors can be configured in the system.

Example

# Configure an IPv4 address for the sFlow collector, and set the aging time of the sFlow collector to 100s.

<HUAWEI> system-view
[HUAWEI] sflow collector 1 ip 192.168.100.10 time-out 100

# Configure an IPv6 address for the sFlow collector, and set the aging time of the sFlow collector to 100s.

<HUAWEI> system-view
[HUAWEI] sflow collector 1 ipv6 FC00::1 time-out 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >