Frames can be filtered based on various protocol information.
Supported protocols
Napatech SmartNICs with Link-Capture™ Software
decode every received frame and classify according to the various protocol layers as
follows.
- Encapsulation: ISL, CFP, VLAN, or MPLS
- Broadcast, Multicast, Unicast
- Layer 2: Ether II, LLC, SNAP, Raw, PPPoEDiscovery, PPPoESession
- Layer 3: IP, IPv4, IPv6,
- Layer 4: UDP, TCP, ICMP, SCTP
- Tunneling: GREv0, GREv1, GTPv0-U, GTPv1-U, GTPv1-C, GTPv2-C, GTPv1v2-C, GTPv1-U-GPDU, GTPv1-U-Signal, IPinIP, EtherIP, VXLAN, NVGRE, EoMPLS
- Inner encapsulation: VLAN, MPLS
- Inner layer 2: EtherII
- Inner layer 3: IP, IPv4, IPv6,
- Inner layer 4: UDP, TCP, ICMP, SCTP
NTPL examples
This example configures the SmartNIC to capture IPv4 frames containing the UDP
protocol.
Assign[streamid=0] = (Layer3Protocol==IPv4) AND (Layer4Protocol==UDP)The following example shows how to filter tunneled IPv4 traffic which contains the IPv4 or IPv6 protocol in the inner layer.
// Define a macro for IPv4 frames containing inner IPv4. Define isIPv4_containing_IPv4 = Macro("Layer3Protocol==IPv4 AND InnerLayer3Protocol==IPv4") // Define a macro for IPv4 frames containing inner IPv6. Define isIPv4_containing_IPv6 = Macro("Layer3Protocol==IPv4 AND InnerLayer3Protocol==IPv6") Assign[streamid=1] = isIPv4_containing_IPv4 Assign[streamid=2] = isIPv4_containing_IPv6This following example sets filters for:
- Delivering GTP-C traffic to stream 0.
- Filtering UDP traffic inside the GTPv1 tunnel and distributing based on the inner 5-tuple hash mode.
// Define a filter for GTP-U traffic. Define isGTP-U = Filter(TunnelType==GTPv1-U AND InnerLayer3Protocol==IPv4 AND \\ InnerLayer4Protocol==UDP) // Define a filter for GTP-C traffic. Define isGTP-C = Filter(TunnelType==GTPv2-C) // Distribute traffic based on inner UDP sessions. HashMode=HashInner5TupleSorted // Stream 0: GTPv2-C traffic. Assign[StreamId=0] = isGTP-C // Stream 1 to 16: GTPv2 traffic hashed using HashInner5TupleSorted. Assign[StreamId=(1..16)] = isGTP-UMPLS and VLAN encapsulated frames can be filtered as follows.
Assign[streamid=3] = (Encapsulation==MPLS) Assign[streamid=4] = (Encapsulation==VLAN)
Note: The
TPID values, 0x8100 (33024) and 0x88a8 (34984), are always valid for VLAN tags in the
SmartNIC. An additional TPID value for VLAN tags is configurable in the
/opt/napatech3/config/ntservice.ini file. For example:
The following NTPL example configures the
SmartNIC to filter VXLAN encapsulated
frames.AltTPID = 0x9100
Assign[StreamId=5] = TunnelType==VxLan
Note: Alternative UDP
port numbers for VXLAN are configurable in the
/opt/napatech3/config/ntservice.ini
file.
VXLANAltDestinationPorts = 8472, 8473A maximum of two alternative UDP port numbers are supported. The standard UDP port, 4789, is always matched regardless of this configuration.