Configuring the agent-ip and Enabling sFlow Globally

Configure the sFlow agent IPv4 address, and then enable sFlow before the system can monitor and capture traffic statistics to send to an sFlow collector. By default, sFlow is globally disabled.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Enable the agent IPv4 address:

    sflow agent–ip {A.B.C.D}

  3. Enable sFlow:

    sflow enable

  4. Verify the global configuration:

    show sflow

Example

Globally enable sFlow, and then verify the configuration.

Switch:1>enable
Switch:1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch:1(config)#sflow agent-ip 192.0.2.27
INFO: Please be aware that sFlow agent IP address is only supported in MGMT or GRT VRF.
Switch:1(config)#sflow enable
Switch:1(config)#show sflow
 =================================================================
                           sFlow Global Configuration

==================================================================
        Global State                   : Enabled
        Agent  IP                      : 192.0.2.27

What to do next

After you configure the agent-ip and globally enable sFlow, proceed to configuring the sFlow collector.

Variable Definitions

Use the data in the following table to use the sflow agent-ip command.

Variable

Definition

{A.B.C.D.}

Specifies the agent-ip address (IPv4).

Note:

For Segmented Management Instance interfaces, you must configure the agent-ip address to the IP address of the Segmented Management Instance interface on which datagrams egress.