50% load balanced to host, 50% forwarded to port 1
The following NTPL example demonstrate how to forward traffic from port 0 by splitting it between
forwarding to port 1 and distributing the rest traffic across 12 streams in the host.
Half of the traffic from port 0 is forwarded to port 1, while the remaining half is
distributed across 12 streams in the host, enabling parallel processing or
monitoring.HashMode[Priority = 1; Layer3Type=IP] = Hash2TupleSorted
HashMode[Priority = 0; Layer3Type=IP; Layer4Type=TCP,UDP,SCTP] = Hash5TupleSorted
Action[Tag=balance; Width=24]={Index=0..11; StreamID=0..11},{Index=12..23; DestinationPort=1}
Assign[Action=balance]=Port==0
- HashMode configuration:
- The first HashMode sets the hashing method to Hash2TupleSorted (based on source and destination IP addresses) with lower priority.
- The second HashMode, with higher priority, sets the hashing method to Hash5TupleSorted (based on source/destination IP, source/destination port and protocol) for TCP, UDP, and SCTP packets.
- Action definition (balance):
- The first action range (Index=0..11) maps frames to StreamID=0..11, enabling load balancing across 12 streams in the host.
- The second action range (Index=12..23) directs frames to DestinationPort=1, forwarding them to port 1.
- Assign: Applies the balance action to received traffic on port 0.
Style Conventions
Bold typeface is used for names of, for instance, user interface elements and software components.
Italic typeface is used for replaceable text.
Monospaced typeface is used for code, commands and file names.
Abbreviations
CPU
Central Processing Unit
Dest
DESTination
DN
Document Number
Dst
DESTination
GGSN
Gateway GPRS Support Node
GPRS
General Packet Radio Service
GRE
Generic Routing Encapsulation
GTP
GPRS Tunneling Protocol
Id
IDentifier
Ids
IDentifierS
IP
Internet Protocol
m
Macro
MPLS
MultiProtocol Label Switching
N
Napatech
NT
NapaTech
NTPL
NapaTech Programming Language
Rev.
REVision
RTCP
Real-time Transport Control Protocol
RTP
Real-time Transport Protocol
SCTP
Stream Control Transmission Protocol
SGSN
Serving GPRS Support Node
SIP
Session Initiation Protocol
Src
SouRCe
Tcp, TCP
Transmission Control Protocol
Udp, UDP
User Datagram Protocol
v
Version
VLAN
Virtual Local Area Network
VoIP
Voice Over IP