Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure sFlow on a Cisco Catalyst Switch

This topic describes how to configure sFlow on other vendors, such as the Cisco Catalyst 2960L and Catalyst 1000 switches.

To configure sFlow on a Catalyst switch:

  1. Access the switch CLI.

    Connect to your Cisco Catalyst switch through SSH or a console cable. If you are connecting to the console though SSH, use a tool like PuTTY or the built-in SSH client in your terminal. Then enter the switch's IP address, username, and password to log in.

  2. Enter global configuration mode.
  3. Configure the sFlow settings.

    Enter the IP address and port of the remote Flow Data collector as follows:

    Specify the following values:

    • ID: ID of this collector definition.

    • x.x.x.x: Flow Data collector IP address.

    • yyyy: Port number of the Flow Data collector, such as 6343.

    • zzzz: The maximum size, in bytes, of the UDP datagram containing the sFlow records to be sent (for instance, 1280 for 1280 bytes).

  4. Configure the sFlow agent IP address. Replace x.x.x.x with the IP address to be used as the sFlow agent IP address.
  5. Enable sFlow on interfaces.

    Specify the following values:

    • INTERFACE_NAME: Name of the interface on which to enable sFlow (such as GigabitEthernet 1/0/1)
    • DIRECTION; The traffic (input or output) to be sampled.

    • ID: ID of the collector definition to which the sFlow records are to be sent.

      yyyy: The sampling rate (e.g., 1024 for 1 in 1024 packets).

    • zzzz: Number of bytes to include from the sampled IP packet.

    Repeat this step for each interface for which sFlow sampling is desired.

  6. Save the configuration.

    Exit global configuration mode and enter the following command:

  7. Verify the configuration.

    This command displays the sFlow settings you just configured. For example:

Congratulations. You successfully configured sFlow on a Cisco Catalyst switch.
Note:

These instructions do not apply to all Cisco Catalyst switches, as sFlow support varies between models. Ensure that your specific switch model supports sFlow before you configure the switch.