02-09-2020 09:37 AM
I am following the Cisco doc below however I keep receiving "ERROR: Record TEST has IP fields. L2 fields are not allowed" when attempting to configure a Flow Record with "match datalink ethertype" however I only have the following configured for the record so far. I am using a NX-OSv in VIRL. The document does not state anything about configuring Netflow for L2 and L3 traffic. Any help?
flow record TEST
description IPv4Flow
match ip protocol
match transport destination-port
collect counter packets
Solved! Go to Solution.
04-27-2020 04:36 AM
This error shows up when you're attempting to configure L2 commands on a L3 interface. You can only configure L2 Netflow on L2 interfaces, L3 on L3 interfaces. Here is an example for L3 interfaces.
feature netflow
flow timeout active 60
flow exporter NETFLOW_EXP
description \\Netflow Export//
destination <IP ADDRESS>
transport udp 2055
source <SOURCE VLAN>
version 9
flow record FLOW_RECORD
description \\NetFlow record//
match ipv4 source address
match ipv4 destination address
match ip protocol
match ip tos
match transport source-port
match transport destination-port !***Whatever you'd like to match on***
collect transport tcp flags
collect counter bytes long
collect counter packets long
collect timestamp sys-uptime first
collect timestamp sys-uptime last
flow monitor IPv4_NETFLOW
record FLOW_RECORD
exporter NETFLOW_EXP
!
int X
ip address <IP> <MASK>
ip flow monitor IPv4_NETFLOW input sampler NF-Sampler
This link may be helpful as well:
HTH,
Chuck McFadden
--please mark helpful posts as helpful--
04-27-2020 04:36 AM
This error shows up when you're attempting to configure L2 commands on a L3 interface. You can only configure L2 Netflow on L2 interfaces, L3 on L3 interfaces. Here is an example for L3 interfaces.
feature netflow
flow timeout active 60
flow exporter NETFLOW_EXP
description \\Netflow Export//
destination <IP ADDRESS>
transport udp 2055
source <SOURCE VLAN>
version 9
flow record FLOW_RECORD
description \\NetFlow record//
match ipv4 source address
match ipv4 destination address
match ip protocol
match ip tos
match transport source-port
match transport destination-port !***Whatever you'd like to match on***
collect transport tcp flags
collect counter bytes long
collect counter packets long
collect timestamp sys-uptime first
collect timestamp sys-uptime last
flow monitor IPv4_NETFLOW
record FLOW_RECORD
exporter NETFLOW_EXP
!
int X
ip address <IP> <MASK>
ip flow monitor IPv4_NETFLOW input sampler NF-Sampler
This link may be helpful as well:
HTH,
Chuck McFadden
--please mark helpful posts as helpful--
04-27-2020 06:52 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide