sFlow prerequisites:
- Ensure that the collector destination is reachable.
- IP Routing must be enabled on the device.
sFlow guidelines:
- When you enable sFlow for an interface, you can do it for ingress, egress, or in both directions.
- You should configure the sampling rate based on the sFlow configuration and traffic in the system.
sFlow limitations:
- sFlow is supported only on the physical interface.
- The switch supports two sFlow collectors.
- sFlow is not supported when the device boots up in stack mode.
Default Settings for sFlow
The following table lists the default settings for sFlow parameters.
sFlow sampling rate 2048
sFlow sampling size 116
sFlow counter poll interval 10
sFlow maximum datagram size 1024
sFlow collector port 6343
1. Configuring sFlow Agent
To enable sFlow agent, you must configure a valid unicast IP address on the interface.
Items that are between { } and in bold should be replaced with values specific to the environment being configured.
For Auvik, the agent IP is the switch IP address that will send flows to the collector.
configure terminal
sflow agent {ip ipv4 address | ipv6 ipv6 address}
end
2. Configuring sFlow Collector
For Auvik, the sFlow collector {id} is a number from <1-2>. The collector {ip} is the Auvik collector IP.
configure terminal
sflow collector {id collector-id } {ip ipv4 address | ipv6 ipv6 address} [port 6343] [datagram-size <max-datagram-size bytes>]}
end
3. Configuring Flow Sampling
configure terminal
interface {interface-id}
sflow flow-sampling {input |output } {id collector-id} [rate <rate>] [hdr-size <max-header-size bytes>]}
no sflow flow-sampling {input |output }
end
4. Configuring Counter Sampling
configure terminal
interface {interface-id}
sflow counter-sampling id {collector-id} [interval <interval>]
no sflow counter-sampling
end
*note: Use the same collector {id} here as set in the previous step.
5. Verifying sFlow Configuration
Use these commands to display and verify the sFlow configuration:
show sflow - Displays global sFlow configuration for sFlow agent and
sFlow collector.
show sflow interface - Displays sFlow configuration on all interfaces where
either packet sampling or counter sampling is enabled.
show sflow interface {interface name} - Displays the configurations
specifically on a given interface.
show platform sflow enables - Displays the global sFlow status at the
hardware level.
6. Save the configuration
copy running-config startup-config