Hashing

From Green Bay 2 to Link-Capture™ Software 12.8

Platform
Napatech SmartNIC
Content Type
Migration Document
Capture Software Version
Link™ Capture Software 12.8

Hash migration

This section illustrates how a hashing NTPL example from Green Bay 2 matching on an IPv4 address can be converted to a Link-Capture™ Software 12.8 NTPL example with the equivalent functionality.

Green Bay 2

This is the NTPL example from Green Bay 2.

IPMatchList[ListType=OuterIP] = IPv4Addr == [10.10.10.1]
HashMode[IPMatch=SrcOrDstIP; InnerLayer3Type = IPV4; MaskNo=1; TupleSwap=IPMatchLast]
 = HashInner2Tuple
HashMask[HashWord0=[FF.FF.FF.FF]; HashWord4=[0.0.0.0]] = MaskNo == 1
Assign[StreamId=(0..7)] = (IPMatch == SrcIP,DstIP and TunnelType == GTPv1-U-GPDU)

Link-Capture™ Software 12.8

This is a converted Link-Capture™ Software 12.8 NTPL example.

Define IPv4_list = Macro("3")
Define IPv4SrcField = Field(Layer3Header[12]/32)
Define IPv4DstField = Field(Layer3Header[16]/32)

Define InnerSourceIP = Field(InnerLayer3Header[12]/32)
Define InnerDestIP = Field(InnerLayer3Header[16]/32)

Define UplinkHash = Hash(HashWord0_3=InnerSourceIP)
Define DownlinkHash = Hash(HashWord0_3=InnerDestIP)

KeyType[Name=kt_IPv4; Access=Full] = {32}
KeyDef[Name=IPv4Src; KeyType=kt_IPv4] = (IPv4SrcField)
KeyDef[Name=IPv4Dst; KeyType=kt_IPv4] = (IPv4DstField)
KeyList[KeySet = IPv4_list; KeyType = kt_IPv4] = ([10.10.10.1])

Assign[StreamId=(0..7); Hash= UplinkHash] = TunnelType == GTPv1-U-GPDU AND \\
( Key(IPv4Src) == IPv4_list OR Key(IPv4Dst) == ANY )
Assign[StreamId=(0..7); Hash= DownlinkHash] = TunnelType == GTPv1-U-GPDU AND \\
( Key(IPv4Dst) == IPv4_list OR Key(IPv4Src) == ANY )