Configuring an sFlow Collector
Configure an sFlow collector to determine the device to which the sFlow agent sends sFlow datagrams. You can configure up to two collectors for each interface slot in the chassis.
Before you begin
-
You must globally enable sFlow.
About this task
The sFlow datagrams that the agent sends to the collector are not encrypted. Use a VLAN to create a secure measurement network to route sFlow datagrams.
To further protect the sFlow collector, configure it to accept only sFlow datagrams, or to check sequence numbers and verify source addresses.
Procedure
Example
Configure collector ID, 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 collector 1 address 192.0.2.26 owner sflow1 port 6343 timeout 497 Switch:1(config)#sflow collector 2 address 192.0.2.27 owner sflow2 port 6343 timeout 531 Switch:1(config)#show sflow collector ========================================================================================== sFlow Collector Configuration Info ========================================================================================== Id Owner Collector-IP Port Timeout(secs) Reachable via ------------------------------------------------------------------------------------------ 1 sflow1 192.0.2.26 6343 497 192.0.2.15 2 sflow2 192.0.2.27 6343 531 192.0.2.16 ------------------------------------------------------------------------------------------ All 2 out of 2 Total Num of sflow collector entries displayed
What to do next
After you configure the sFlow collector, configure the packet sampling rate to enable sFlow on a port or ports.
Variable Definitions
Use the data in the following table to use the sflow collector command.
Variable |
Value |
---|---|
collector <1–2> |
Specifies the id to export sFlow datagrams to the collector id. Use the no operator to remove an sflow collector id and a collector name. no sflow collector <1–2> owner WORD<1–20> To configure the default value, enter default sflow collector <1–2> |
address {A.B.C.D.} |
Specifies the collector IP address. Use the no operator to remove an sflow collector address. no sflow collector <1–2> address {A.B.C.D} |
owner WORD<1–20> |
Specifies the sFlow collector name. |
port <1–65535> |
Specifies the destination UDP port. The default port is 6343. To configure the default value, enter default sflow collector <1–2> port |
timeout <1–65535> |
Specifies the time remaining (in seconds) before the collector is released. The default timeout is 0, which means the timeout is not used and the collector sends data forever. To configure the default value, enter default sflow collector <1–2> timeout |
vrf WORD<1–16> |
Specifies the name of the VRF used to reach the collector. Note:
This parameter is not supported on all hardware platforms. |