Chapter 1
Configuring Flexible NetFlow
Configuring and Enabling Flow Sampling
Beginning in privileged EXEC mode, follow these steps to configure and enable flow sampling.
Command
Step 1
configure terminal
Step 2
sampler sampler -name
Step 3
description description
Step 4
mode random 1 out-of window-size
Step 5
exit
Step 6
interface interface-id
Step 7
{ip| ipv6} flow monitor monitor-name
sampler sampler-name {input | output}
Step 8
end
Step 9
show sampler sampler -name
Step 10
copy running-config startup-config
This example shows how to configure and enable a flow sampler:
Switch(config)# sampler SAMPLER-1
Switch(config-sampler)# description Sample at 50
Switch(config-sampler)# mode random 1 out-of 2
Switch(config-sampler)# exit
Switch(config)# interface gigabitethernet 1/1/2
Switch(config-if)# ip flow monitor FLOW-MONITOR-1 sampler SAMPLE-1 input
This is an example of output from the show sampler command:
Switch# show sampler SAMPLER-1
Sampler SAMPLER-1:
ID:
Description:
Type:
Rate:
Samples:
Requests:
Users (1):
OL-25303-03
Purpose
Enters global configuration mode.
Creates a flow monitor and enters Flexible NetFlow sampler
configuration mode. You can also use this command to modify an
existing sampler.
(Optional) Configures a description for the sampler.
Specifies the mode and window size from which to select packets. The
window size range is from 2 to 32768.
Note
Returns to global configuration mode.
Identifies an interface and enters interface configuration mode. Flexible
Net Flow is supported only on the service module 1-Gigabit or
10-Gigabit Ethernet interfaces.
Activates a previously created IPv4 or IPv6 flow monitor by assigning it
to the interface to analyze traffic.
Returns to privileged EXEC mode.
(Optional) Displays the current status of a flow sampler.
(Optional) Saves your entries in the configuration file.
2
Sample at 50%
random
1 out of 2
2482
4964
flow monitor FLOW-MONITOR-1 (ip,Et0/0,I
Although visible in the CLI help, the mode deterministic
keyword is not supported.
2482 out of 4964
Catalyst 3750-X and 3560-X Switch Software Configuration Guide
Configuring Flexible NetFlow
1-9