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