Configuring Layer 2 NetFlow
You can define Layer 2 keys in NetFlow Lite records that you can use to capture flows in Layer 2 interfaces.
SUMMARY STEPS
1.
configure terminal
2.
flow record name
3.
match datalink
{
ethertype
|
mac
{
destination
{
address input
} |
source
{
address input
} } }
4.
match
{
ipv4
{
destination
|
protocol
|
source
|
tos
} |
ipv6
{
destination
|
flow-label
|
protocol
|
source
|
traffic-class
} |
transport
{
destination-port
|
source-port
} }
5.
end
6.
show flow record
[
name
]
7.
copy running-config startup-config
DETAILED STEPS
Purpose
Command or Action
Enters the global configuration mode.
configure terminal
Example:
Switch#
configure terminal
Step 1
Enters flow record configuration mode.
flow record name
Step 2
Example:
Switch(config)#
flow record L2_record
Switch(config-flow-record)#
Specifies the Layer 2 attribute as a key. In this
example, the keys are the source and destination MAC
addresses from the packet at input.
match datalink
{
ethertype
|
mac
{
destination
{
address
input
} |
source
{
address input
} } }
Example:
Switch(config-flow-record)#
match datalink mac source
Step 3
When a datalink flow monitor is assigned to
an interface or VLAN record, it only creates
flows for non-IPv4 or non-IPv6 traffic.
Note
address input
Switch(config-flow-record)#
match datalink mac
destination address input
Specifies additional Layer 2 attributes as a key. In this
example, the keys are IPv4 protocol and ToS.
match
{
ipv4
{
destination
|
protocol
|
source
|
tos
} |
ipv6
{
destination
|
flow-label
|
protocol
|
source
|
traffic-class
} |
transport
{
destination-port
|
source-port
} }
Step 4
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
532
How to Configure NetFlow Lite
Summary of Contents for Catalyst 2960 Series
Page 96: ......
Page 196: ......
Page 250: ......
Page 292: ......
Page 488: ......
Page 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Page 590: ......
Page 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Page 620: ......
Page 750: ......
Page 1604: ......
Page 1740: ......
Page 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Page 2106: ......
Page 2118: ......
Page 2164: ......