Configuring Layer 2 NetFlow You can define Layer 2 keys in Flexible NetFlow records that you can use to capture flows in Layer 2 interfaces. Procedure Configuring Flexible NetFlow Configuring Layer 2 NetFlow Command or Action Purpose Step 1 enable Example: Device> enable Enables privileged EXEC mode. • Enter your password if prompted. Step 2 configure terminal Example: Device(config)# configure terminal Enters global configuration mode. Step 3 flow record name Example: Device(config)# flow record L2 record _ Device(config-flow-record)# Enters flow record configuration mode. Step 4 match datalink {dot1q |ethertype | mac | vlan} Example:
Device(config-flow-record)# match datalink ethertype Specifies the Layer 2 attribute as a key. Step 5 end Example: Device(config-flow-record)# end Returns to privileged EXEC mode. Step 6 show flow record [name ] Example: Device# show flow record (Optional) Displays information about NetFlow on an interface. Step 7 copy running-config startup-config Example: Device# copy running-config startup-config (Optional) Saves your entries in the configuration file. Configuring Flexible NetFlow 31