55-7
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 55 Configuring NetFlow-lite Configuring NetFlow Packet Sampling
Switch(config-netflow-lite-monitor)# exporter exporter1
Switch(config-netflow-lite-monitor)# exit
Switch(config-if)# exit
Switch(config)# exit
Switch(config)#
Switch# show netflow-lite monitor 1 interface gi1/3
Interface GigabitEthernet1/3:
Netflow-lite Monitor-1:
Active: TRUE
Sampler: sampler1
Exporter: exporter1
Average Packet Size: 0
Statistics:
Packets exported: 0
Packets observed: 0
Packets dropped: 0
Average Packet Size observed: 64
Average Packet Size used: 64
Similarly, you can configure a monitor on a VLAN in VLAN config mode:
Switch# config terminal
Switch(config)# vlan config 2
Switch(config-vlan-config)# netflow-lite monitor 1
Switch(config-netflow-lite-monitor)# average-packet-size 128
Switch(config-netflow-lite-monitor)# exporter exporter1
Switch(config-netflow-lite-monitor)# sampler sampler1
Switch(config-netflow-lite-monitor)# exit
Switch(config-vlan-config)# exit
Switch(config)#
Switch# show netflow-lite monitor 1 vlan 2
VlanID-2:
Netflow-lite Monitor-1:
Active: TRUE
Sampler: sampler1
Exporter: exporter1
Average Packet Size: 0
Statistics:
Packets exported: 0
Packets observed: 0
Packets dropped: 0
Average Packet Size observed: 64
Average Packet Size used: 64
You can verify your settings with the show policy-map privileged EXEC command.
Usage Guidelines
Only a single packet sampling instance is supported on a monitor. These commands are entered under
the physical port interface mode, port channel interface, or config vlan mode. Monitor is not supported
on other interfaces. If the physical port is a member of a port channel, applying the monitor to the port
has no effect. Instead, the monitor must be applied to the port channel.
When configuring a monitor, the mandatory parameters are sampler and exporter. If no exporter is
associated with a monitor, no samples are exported. If no sampler is specified, no input packet sampling
occurs for that target interface.
The packet sampling mechanism tries to achieve random 1-in-N sampling. The accuracy of the algorithm
is dependent on the size of the packets arriving at a given interface. To tune the relative accuracy of the
algorithm, use the average-packet-size parameter. The whole system supports a maximum of 200
monitors.