Applying a Flow to an Interface You can apply a flow monitor and an optional sampler to an interface. Configuring Flexible NetFlow Applying a Flow to an Interface Command or Action Purpose Device(config)# sampler SAMPLER-1 • This command also allows you to modify an existing sampler. Step 4 description description Example: Device(config-sampler)# description Sample at 50% (Optional) Creates a description for the flow sampler. Step 5 mode {random} 1 out-of window-size Example: Device(config-sampler)# mode random 1 out-of 2 Specifies the sampler mode and the flow sampler window size. • The range for the window-size argument is from 0 to 1024. Step 6 exit Example:
Device(config-sampler)# exit Exits sampler configuration mode and returns to global configuration mode. Step 7 interface type number Example: Device(config)# interface GigabitEthernet 0/0/0 Specifies an interface and enters interface configuration mode. Step 8 {ip | ipv6} flow monitor monitor-name [[sampler] sampler-name] {input | output} Example: Device(config-if)# ip flow monitor FLOW-MONITOR-1 sampler SAMPLER-1 input Assigns the flow monitor and the flow sampler that you created to the interface to enable sampling. Step 9 end Example: Device(config-if)# end Exits interface configuration mode and returns to privileged EXEC mode. Step 10 show sampler sampler-name Example:
Device# show sampler SAMPLER-1 Displays the status and statistics of the flow sampler that you configured and enabled. Configuring Flexible NetFlow 28