55-5
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 55 Configuring NetFlow-lite Configuring NetFlow Packet Sampling

Example

This example shows how to configure sampling parameters and to display the sampler configuration:
Switch# config terminal
Switch(config)# netflow-lite sampler sampler1
Switch(config-netflow-lite-sampler)# packet-rate 32
Switch(config-netflow-lite-sampler)# packet-section size 128
Switch(config-netflow-lite-sampler)# packet-offset 16
Switch(config-netflow-lite-sampler)# exit
Switch(config)# exit
Switch#
Switch# show netflow-lite sampler sampler1
Netflow-lite Sampler sampler1:
Id : 1
Packet Sampling rate: 1 out of 32
Packet Section Size: 64 bytes
Packet offset: 16 bytes
You can verify your settings with the show netflow-lite sampler privileged EXEC command
Usage Guidelines
The packet sampling rate can range from 32 to 2^15 in powers of 2. To troubleshoot two 1 Gigabit ports,
a rate of 1 is allowed. This is equivalent to rx span only. It cannot be configured on 10 Gigabit ports
because the bandwidth demand for export will be too high.
Mandatory parameters are packet rate. A maximum of 2 x 1Gigabit ports can be configured with 1-in-1
sampling. The best packet sampling rate that can be configured on any 1 Gigabit or 10 Gigabit port is
1-in-32. Packet sampling rates can be configured in powers of 2 (like 1-in-64 and 1-in-128).
You can update a sampler at a target interface, but you cannot remove or unconfigure mandatory
parameters.
All mandatory parameters must be present to validate a sampler. Any unspecified non-mandatory
parameters take on default values.
Activating Sampling on an Interface or VLAN
This task defines a monitor instance on an interface or VLAN, identifying the sampler and exporter to
use.
Step 5 Switch(config-netflow-lite-sampler)# packet-offset
offset Specifies a starting packet offset in NetFlow-lite
submode.
Step 6 Switch(config-netflow-lite-sampler)# exit Exits NetFlow-lite sampler submode.
Step 7 Switch(config)# exit Exits global configuration mode.
Step 8 Switch# show netflow-lite sampler sampler Displays information about a sampler.
Command Purpose