TCP/IP uses a forwarding buffer to pass routed packets between
NICs. According to Microsoft
Support Online article Q221926,
the default setting for the forwarding buffer is 0xFFFFFFFF bytes, which
means the buffer can potentially consume all available kernel memory.
A potential memory leak.
Windows NT normally processes TCP/IP network packets as soon as they arrive. When routing between a high-speed LAN and a slower link or a very busy network segment, the operating system may need to temporarily store incoming TCP/IP packets in a forwarding buffer. For example, when you use NT as a router between a high- speed LAN (e.g., Ethernet) and a slower WAN link (e.g., ISDN or dial-up Internet connection), the LAN delivers packets to NT faster than the WAN link can process them. To ensure no data is lost, NT stores the incoming packets in a forwarding buffer until the slower WAN connection can transmit more data. You can control how the OS buffers the packets by adjusting two Registry entries that control the forwarding buffer size and operation, and you can modify the values with the Registry Editor. The Registry path is HLMS\CurrentControlSet\Services\Tcpip\Parameters, and the value entries are MaxForwardBufferMemory and MaxNumForwardPackets.
The TCP/IP Registry value entry MaxForwardBufferMemory sets a
threshold (or maximum value) in KB for the size of the buffered data. When
the amount of buffered data exceeds this threshold, NT can either drop
the buffered packets or drop packets as they arrive. The default setting
for this entry is 0xFFFFFFFF, which means the buffer can consume all available
kernel memory. Of course, once NT forwards the packets, this memory returns
to the kernel memory pool.
The TCP/IP Registry value entry MaxNumForwardPackets sets a threshold
(maximum) for the number of buffered packets. When the number of packets
exceeds this amount, NT will drop network packets as described above.
When you modify these Registry entries, you trade router performance
for throughput. Network packets that the router drops as a result of these
settings can seriously disrupt network communication. Ideally,
you should make the forwarding buffer as large as possible to minimize
packet loss. You can find a good description of other ways to optimize
TCP/IP over slow WAN links in Microsoft Support Online article Q140552.
Handle with care.
Both entries are of data type REG_DWORD. One of the article recommends setting MaxForwardBufferMemory to 74240 and MaxNumForwardPackets to 50.