NAT32

Reference Manual

Refresh Back

NAME

Flow Control - NAT32 flow control description
SYNOPSIS
Usage setth setlow setls

 

...
STATUS
...
DESCRIPTION

The term flow control denotes the control of IP packet flow through a router.

In NAT32, packets are received from the device driver by the NETIN thread of each interface. The received packets are placed in an input queue from where they are extracted by the IP thread for routing and subsequent transmission over another interface.

Received packets are stored in buffers obtained from a common buffer pool of (currently) 256 buffers. The use of a static buffer pool ensures that denial of service attacks will never be able to deplete system memory. To prevent buffer starvation, each interface has a low-water mark at which point packet reception is slowed down. This is done by forcing a thread switch so that other threads will run and return buffers to the pool. The thread switch is forced by sleeping for a short, precise interval. That interval is typically 5 msec, but can be modified as needed. Note that NAT32 uses a fast timer mechanism with a resolution of 1 msec for all timing purposes.

When the packet arrival rate at an interface exceeds the packet transmission rate of the nexthop interface the input queue will become full, and further input is discarded until space in the queue again becomes available. To ensure that high-speed interfaces do not starve low-speed interfaces, the number of packets that any interface thread can place in the queue is limited to a value known as the input queue threshold.

NOTES

The network buffer pool size is fixed at 256, the default low-water mark is 16 and the default short sleep time is 5 msec.

The default values can be modified for experimental purposes and throughput performance should be measured with network speed testing software before committing the values to production use. It is strongly recommended that a command line speed testing tool such as Speedtest CLI be used rather than top-heavy web apps.

SEE ALSO
bpool, setth, setlow, Back