Configuring sFlow Agent and Collector Information

Prerequisites

Before configuring sFlow, complete the following tasks:

  • Ensure that there are reachable routes between the sFlow agent and sFlow collector.
  • Create a virtual private network (VPN) instance if the sFlow agent and collector are located on a private network.

Context

The sFlow collector's address is the destination address of sFlow packets.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run sflow

    The sFlow view is displayed.

  3. Run sflow agent { ip ip-address | ipv6 ipv6-address }

    A source IP address is configured for sFlow packets sent by an sFlow agent.

    The specified IP address of an sFlow agent must be a valid unicast address that has been configured on the device interface. If an IPv6 address is specified, the IPv6 address must be a global unicast address, but not a link-local address.

  4. (Optional) Run sflow export extended-route-data disable

    An sFlow agent is disabled from collecting routing information.

  5. Run sflow collector collector-id

    An sFlow collector is created.

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

  6. sflow server { ip ip-address | ipv6 ipv6-address } [ vpn-instance vpn-name ] [ udp-port port ]

    A destination address is specified for sFlow packets.

  7. (Optional) Run sflow max-packet-length length

    The maximum length is configured for sFlow packets.

  8. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >