Hashing

From Green Bay 2 to Link™ Capture Software 11.6

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

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 11.6 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 11.6

This is a converted Link™ Capture Software 11.6 NTPL example.

Define SourceIP = Field(Layer3Header[12]/32)
Define DestIP = 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)
Define UplinkFilter = Filter(TunnelType == GTPv1-U-GPDU AND(KeyMatch(SourceIP)==1
 AND KeyMatch(DestIP)==ANY))
Define DownlinkFilter = Filter(TunnelType == GTPv1-U-GPDU AND(KeyMatch(DestIP)==1
 AND KeyMatch(SourceIP)==ANY))
IPMatchList = IPv4Addr == [10.10.10.1]
Assign[Hash=UplinkHash; StreamId=(0..7)] = UplinkFilter
Assign[Hash=DownlinkHash; StreamId=(0..7)] = DownlinkFilter