Napatech cards are used as the capture cards for VMX-Capture. They provide:

  • Deep buffers, to provide highest fidelity capture.

  • The ability to take in PTP and/or PPS time signals (if required - Beeks Analytics can also decode packet aggregator timestamps).

  • The ability to separate traffic into distinct streams at the Napatech FPGA layer - this has the benefit of offloading this task from the server CPU, providing greater scalability and ability to balance traffic between PMUXs.

The ability to balance traffic between streams is a key element of the open scaling foundational principle of the Beeks Analytics architecture.

One or more Napatech cards are mandatory for any deployment of VMX-Capture that captures packet data from the wire or replays packet data to the wire.

Capture Card Configuration Files

The following files are used to configure the capture card:

Capture Card Configuration Files

Both of these configuration files sit in the /opt/napatech3/config directory. This directory also contains example versions of these files.

The options available in vmx.ntpl may vary slightly depending on which Napatech card you have installed in the appliance running VMX-Capture. The examples included below assume the NT200A02 Napatech card is installed.

Napatech Stream Configuration

A Napatech card has ‘streams’ - these are effectively separate buffers. The diagram below shows the division of this traffic into separate streams.

The Host Buffer in the diagram below is the main buffer, and this is used by Beeks Analytics to absorb events such as market open events. This is configured via HostBufferSegmentSizeRX in the ntservice.ini.

FPGA Capture Card Packet Journey

When you configure VMX-Capture, you can control the division of traffic into streams. This is done within the vmx.ntpl file. The syntax of this file uses the rich Napatech Programming Language (NTPL).

Capture Card Configuration Examples

This section provides some example vmx.ntpl configuration examples which may be useful in configuring VMX-Capture.

Port-based Stream allocation

This is an example of the simplest stream configuration:

Delete=All
 
Assign[StreamId=0] = Port == 0
Assign[StreamId=1] = Port == 1

The Delete=All statement ensures that no previous macros or filters are being used.

The Assign commands then set traffic arriving on Napatech card port 0 to Napatech stream 0, and traffic arriving on Napatech card port 1 to Napatech stream 1.

You could then create a PMUX with the -s 1 setting to capture the traffic that was received on Napatech card port 1. This PMUX will not see any of the traffic that was received on Napatech card port 0.

Merging traffic from multiple ports onto the same stream

Conversely, the following configuration will merge traffic from ports 0 and 1 onto the same stream:

Delete=All
Assign[StreamId=0;Priority=0] = (Port == 0,1)

VLAN-based Stream allocation

The following example splits the traffic arriving on port1 dependent on the outer VLAN ID seen in the traffic.

Delete=All
DefineMacro("mVlan0VlanId", "Data[DynOffset=DynOffLayer2Frame;Offset=14;DataType=ByteStr2;DataMask=[11:0]]")
DefineMacro("mVlan1VlanId", "Data[DynOffset=DynOffLayer2Frame;Offset=18;DataType=ByteStr2;DataMask=[11:0]]")
 
// external customer slots 1-10 vlan ranges on port 1
Assign[StreamId=3] = (Port == 1 and (mVlan0VlanId >= 1000 and mVlan0VlanId <= 1099))
Assign[StreamId=4] = (Port == 1 and (mVlan0VlanId >= 1100 and mVlan0VlanId <= 1199))
Assign[StreamId=5] = (Port == 1 and (mVlan0VlanId >= 1200 and mVlan0VlanId <= 1299))
 
// Traffic received on port 0 with vlan 2 or vlan 3
Assign[StreamId=0; Priority = 61] = (Port == 0 and mVlan0VlanId == (2..3))
// catch all bucket for port 0
Assign[StreamId=1; Priority = 62] = (Port == 0 )
// catch all stream for port 1
Assign[StreamId=2; Priority = 62] = (Port == 1)

The mVlan0VlanId command is an example of one of the Napatech-provided macros which simplifies the process of using information in the network traffic to divide the incoming traffic into streams. See the Napatech NTPL documentation for more examples of other macros that are available.

Round-robin between 6 streams

The following example round robins traffic between 6 streams. This is useful if you do not need your stream allocation to be deterministic.

Delete=All
HashMode = None
Assign[StreamId = (0..5)] = All

Deterministic allocation of traffic to stream based on an IP address hash

The following example takes advantage of the Napatech Hash feature to deterministically assign a particular IP address tuple to one of 7 streams.

Delete=All
HashMode = Hash5Tuple
Assign[StreamId = (0..6)] = All

Many other hashing options are available, including MPLS Label, VLAN ID, TCP or UDP Ports or IP identification field. See the Napatech Hash Calculation documentation for the full list.

Filter all UDP to one stream and TCP to another

The following example configures one stream for UDP, and another for TCP. This example uses the IP Protocol field for UDP (17) to distinguish the UDP packets, because fragmented UDP packets don’t match UDP filter and would otherwise get directed to the TCP stream.

Delete=All
Assign[StreamId=0;Priority=0] = (IpProtocol == 17)
Assign[StreamId=1;Priority=1] = All

Static IP Address-based Stream allocation

The following example allocates a stream based on particular IP addresses in the traffic. In addition, the traffic must also be seen on Napatech port 0 and must arrive with an outer VLAN ID tag of 2 or 3.

Delete=All
 
KeyDef[Name=IPv4Src; KeyType=IPv4] = (IPv4SrcField)
KeyDef[Name=IPv4Dst; KeyType=IPv4] = (IPv4DstField)
 
Assign[StreamId = 13; Priority = 13] = Port == 0 AND mVlan0VlanId == (2..3) AND isIPv4 AND (Key(IPv4Src) == 13 OR Key(IPv4Dst) == 13)
KeyList[KeyType = IPv4; KeySet = 13]= ([10.10.10.10]),([101.121.131.141]),([4.20.4.11])

Static Split by UDP Destination Port

This is a very useful example for splitting incoming market data between different PMUXes. This allows traffic large volumes of traffic to be split across different PMUXes, each running on different CPU cores, allowing high efficient use of the hardware resources in the VMX-Capture appliance. The example below uses example OPRA destination ports of 15000, 16000, and 17000 to split the traffic.

Port ranges or IP addresses can also be used.

Delete=All
Define DestPortIsOpra1 = Filter(Data[DynOffset=DynOffUDPFrame;Offset=2;DataType=ByteStr2] == 15000)
Define IsOpra1 = Filter(DestPortIsOpra1)
Define DestPortIsOpra2 = Filter(Data[DynOffset=DynOffUDPFrame;Offset=2;DataType=ByteStr2] == 16000)
Define IsOpra2 = Filter(DestPortIsOpra2)
Define DestPortIsOpra3 = Filter(Data[DynOffset=DynOffUDPFrame;Offset=2;DataType=ByteStr2] == 17000)
Define IsOpra3 = Filter(DestPortIsOpra3)
Assign[StreamId=0] = Port == 0
Assign[StreamId=1] = IsOpra1
Assign[StreamId=2] = IsOpra2
Assign[StreamId=3] = IsOpra3

Traffic deduplication

The Napatech card supports a deduplication function. This is useful where traffic is seen at multiple points in the network and (for simplicity of monitoring) you only want to see the traffic in a single location.

The following example implements deduplication within a 20 second window:

Deduplication [Timeout = 20] = Port == 0
Deduplication [Timeout = 20] = Port == 1

Deduplication can be tuned further - for example Ethernet deduplication, Layer 3 deduplication or layer 4 deduplication. See the DeduplicationConfig section of the NTPL documentation for more details of how to configure these different options.

Further information about Capture Card Configuration

The Napatech documentation portal has more information about the configuration options for the Napatech card. In addition to the documents mentioned above, the following documents are particularly useful: