Configure sFlow Export

Before you can view meaningful sFlow reports, you must configure sFlow-enabled devices, such as routers or switches, to communicate network activity back to the Flow Monitor listener application. There are two methods to configure sFlow to send data to Network Traffic Analysis:

The following examples shows how to configure sFlow devices to send data to Network Traffic Analysis.

Configuring sFlow using the CLI

To configure a sFlow enabled device to send sFlow data to Flow Monitor using the command line interface (CLI):

Caution: This procedure is an example that applies only to an HP ProCurve 3500 switch and should not be used for other devices. The process for configuring a device to export sFlow data varies widely from device to device and is dependent upon your network configuration.

The following example uses CLI configuration to enable sFlow on an HP ProCurve 3500 series switch. The configuration is for Flow Monitor running on a system with IP address 192.168.3.31 and receiving sFlow data on UDP port 9999.

  1. Access the sFlow device via the command line interface (CLI).
  2. Set the sFlow device IP (sFlow collector) using the following commands.

Command

Purpose

(config)# sflow 1 destination <ipaddress> <port>

Sets the sFlow receiving device address (192.168.3.31) and UDP port (9999). For example: (config)# sflow 1 destination 192.168.3.31 9999

(config)# sflow 1 sampling ethernet <interface ID> <sample every n packets>

Sets the sFlow sample rate for each interface (1-24). One out of every 128 packets will be collected in this example. For example:
(config)# sflow 1 sampling ethernet A1-A24 128

(config)# sflow 1 polling ethernet <interface ID> <polling frequency in seconds>

Sets the sFlow polling interval. Polls every 30 seconds in this example. For example: config)# sflow 1 polling ethernet A1-A24 30

Configuring sFlow using SNMP

The following example uses SNMP commands to enable sFlow on an HP ProCurve 2610 series switch. We recommend configuring the sFlow device via the device OS commands from the command line interface (CLI); however, some sFlow devices do not include this capability. In this case, you can use SNMP commands to configure sFlow. This configuration example is for Flow Monitor running on a system with IP address 192.168.3.31 and receiving sFlow data on UDP port 9999.

To configure an sFlow device, using SNMP commands, to send sFlow data to Flow Monitor:

Important: This procedure is an example that applies to an HP ProCurve 2610 switch and should not be used for other devices. The process for configuring a device to export sFlow data varies widely from device to device and is dependent upon your network configuration. Refer to the documentation to determine the correct process for your device.

Important: An sFlow device configured with the SNMP commands typically do not save the configuration to memory. If the device is rebooted, or power is lost, all sFlow configuration is lost and must be manually reset using the SNMP commands. Make sure that you save the SNMP configuration commands for future device configuration.

Note: Make sure that the sFlow device is configured to allow SNMP read/write access and make sure that you have the community string information for read/write access. Refer to the documentation to determine the correct process for your device.

  1. Access the sFlow device via the console, Telnet, or SSH management interface.
  2. Set the sFlow device IP (sFlow collector) using the following example commands.

Command

Purpose

setmib sFlowRcvrAddress.1 -o <collector IP address in hexadecimal format>

Sets the sFlow receiving device address. In this example, the IP address (192.168.3.31) must be provided as a hexadecimal value (C0A8031F). For example:
setmib sFlowRcvrAddress.1 -o C0A8031F

Important: The example IP address must be entered as a hexadecimal value. Use an IP to hexadecimal calculator to determine the hexadecimal value for your sFlow collector's IP address. This example IP address breaks down into a hex value as follows:
192 = C0
168 = A8
    3 = 03
   31 = 1F

setmib sFlowRcvrPort.1 -i <port>

Sets the sFlow receiving device port address. The default Flow Monitor port is 9999. For example: setmib sFlowRcvrPort.1 -i 9999

setmib sFlowRcvrOwner.1 -D <Display String value> sFlowRcvrTimeout.1 -i <Timeout integer value>

Sets the sFlow receiver owner. The -D is a TYPE-STR identifier that specifies a Display String value. This value can be any string, for example NFmonitor (referring to Flow Monitor application which will receive the sFlow data).

The -i is a TYPE-STR identifier that specifies an Integer value. The 100,000,000 value is a timeout value that defines the timeout countdown starting point value (in milliseconds).

For example: setmib sFlowRcvrOwner.1 -D NFmonitor sFlowRcvrTimeout.1 -i 100000000

Note: Repeat the following settings for each interface on the sFlow device you want to monitor. The last number in the MIB OID represents the interface number.

setmib 1.3.6.1.4.1.14706.1.1.5.1.4.11.1.3.6.1.2.1.2.2.1.1.1.<interface integer value>
For example: setmib 1.3.6.1.4.1.14706.1.1.5.1.4.11.1.3.6.1.2.1.2.2.1.1.1.1

setmib 1.3.6.1.4.1.14706.1.1.5.1.4.11.1.3.6.1.2.1.2.2.1.1.1.1 -i <sample every n packets>

Sets the sFlow sample rate. One out of every 128 packets will be collected in this example. For example:
setmib 1.3.6.1.4.1.14706.1.1.5.1.4.11.1.3.6.1.2.1.2.2.1.1.1.1 -i 128

setmib 1.3.6.1.4.1.14706.1.1.5.1.3.11.1.3.6.1.2.1.2.2.1.1.1.1 -i <Enable/Disable sFlow integer value>

Enables sFlow on the device. 1 enables / 0 disables sFlow. For example:
setmib 1.3.6.1.4.1.14706.1.1.5.1.3.11.1.3.6.1.2.1.2.2.1.1.1.1 -i 1

setmib 1.3.6.1.4.1.14706.1.1.6.1.4.11.1.3.6.1.2.1.2.2.1.1.53.1 -i <polling frequency in seconds>

Sets the sFlow polling interval. Polls every 30 seconds in this example. For example:
setmib 1.3.6.1.4.1.14706.1.1.6.1.4.11.1.3.6.1.2.1.2.2.1.1.53.1 -i 30

setmib 1.3.6.1.4.1.14706.1.1.6.1.3.11.1.3.6.1.2.1.2.2.1.1.53.1 -i <Enable/Disable sFlow polling integer value>

Enables sFlow polling. 1 enables / 0 disables sFlow polling. For example:
setmib 1.3.6.1.4.1.14706.1.1.6.1.3.11.1.3.6.1.2.1.2.2.1.1.53.1 -i 1

See Also

Configure Flow Export on Source Devices

Configure Flow Export

Configuring Flexible NetFlow on a Cisco device