< Home

sflow agent

Function

The sflow agent command creates an sFlow agent and specifies an IP address for the sFlow agent or updates the IP address of the existing sFlow agent.

The undo sflow agent command deletes the IP address of an sFlow agent.

By default, an sFlow agent uses the IP address of the outbound interface in the route to the sFlow collector as the sFlow agent IP address of sFlow packets.

Format

sflow agent { ip [ vpn-instance vpn-instance-name ] ip-address | ipv6 [ vpn-instance vpn-instance-name ] ipv6-address }

undo sflow agent { ip [ vpn-instance vpn-instance-name ] ip-address | ipv6 [ vpn-instance vpn-instance-name ] ipv6-address }

Parameters

Parameter

Description

Value

ip ip-address

Specifies the IPv4 address of an sFlow agent.

The value is in dotted decimal notation and is a valid unicast address except 127.X.X.X.

ipv6 ipv6-address

Specifies an IPv6 address of the sFlow agent.

The value is an IPv6 unicast address, which is a 32-digit hexadecimal number.

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

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

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 specified sFlow collectors. To send the sFlow packets to a certain sFlow collector, configure an IP address for the sFlow agent as the source address of sFlow packets. The sFlow collector analyzes and displays the traffic statistics based on the traffic in the received sFlow packets. Network administrators can view the traffic statistics on a specified interface based on the IP address of the sFlow agent and interface number.

Prerequisites

  • The IP address configured as the source address must exist on the device.
  • A VPN instance has been created if the sFlow agent is located on a private network.

Configuration Impact

If you run the sflow agent command multiple times, only the latest configuration takes effect.

Precautions

A maximum of two sFlow agents can be configured in the system, and each VPN instance of an address family supports only one agent. The IP address of an agent must be a valid unicast IP address of an interface. If an IPv6 address is specified for an agent, the IPv6 address must be a global unicast address, but cannot be a link-local address.

Example

# Configure an IPv4 address for the sFlow agent.

<HUAWEI> system-view
[HUAWEI] sflow agent ip 192.168.100.10

# Configure an IPv6 address for the sFlow agent.

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