Balancing Tunneled Traffic Based on Client IP Addresses

Multi-CPU Distribution

Napatech SmartNIC
User Guide

Distributing tunneled traffic for different IP addresses between streams

Traffic to and from different client IP addresses inside a tunnel can be distributed between streams based on an inner tunnel hash key, so that traffic to and from one client goes to one stream and traffic to and from another client goes to another stream (or to the same stream).

Using an accelerator port filter

Assume a client has an IP address and it connects to remote IP addresses Y and Z. All the traffic from/to IP address should end up in the same stream regardless of the destination IP address Y and Z. Also assume that all uplink traffic is on port 0, all downlink traffic is on port 1 and all tunneled traffic is IPv4. The idea is to generate a hash value from a key that only contains the client IP address. In uplink traffic coming from port 0, the address will be the source address, and in downlink traffic from port 1, the address will be the destination. This can be expressed in the following NTPL commands:

Define HashUp = Hash(HashWord0_3=InnerLayer3Header[12]/32)
Define HashDown = Hash(HashWord0_3=InnerLayer3Header[16]/32)
Define FilterUp = Filter(Port==0)
Define FilterDown = Filter(Port==1)
Assign[StreamId=(0..3); Hash = HashUp] = FilterUp
Assign[StreamId=(0..3); Hash = HashDown] = FilterDown

Using an IP filter

Consider the case where similar functionality is wanted, but instead of having one port for uplink and one for downlink, the connection is a SPAN/mirror port. In this case the IP addresses of the possible gateways in and out of our network (SGSN and GGSN) must be known in order to be able to figure out if a packet is uplink or downlink. The uplink traffic has SGSN as source address or GGSN as destination address. The downlink traffic has SGSN as destination address or GGSN as source address. The up/down filters can in this case be defined like this:

DefineMacro("SGSN", "3")
DefineMacro("GGSN", "4")
IPMatchList[KeySet=SGSN] = IPv4Addr == []
IPMatchList[KeySet=GGSN] = IPv4Addr == []
Define FilterUp = Filter(KeyMatch(Layer3Header[12]/32)==SGSN
    OR KeyMatch(Layer3Header[16]/32)==GGSN)
Define FilterDown = Filter(KeyMatch(Layer3Header[12]/32)==GGSN
    OR KeyMatch(Layer3Header[16]/32)==SGSN)
Assign[StreamId=(0..3); Hash = HashUp] = FilterUp
Assign[StreamId=(0..3); Hash = HashDown] = FilterDown



Napatech, Napatech Software Suite, Reference Documentation


Napatech, NT 4GA Accelerators with Napatech Software Suite, Feature Set N-ANL10, Feature Description