Reference Manual

HOW TO use NAT32 to limit selected traffic through an external Router.

Problem

You have a DSL Router or a Cable Modem Router (or even just a PC running Windows ICS) to which your private machines send their Internet traffic. Some machines are using too much bandwidth resulting in poor network throughput for the other machines. You would like to limit throughput for some particular machine or for some particular applications.

Solution

Run NAT32 on one machine and configure it to use just the private LAN Adapter. Then add the following route to the NAT32 Routing Table:

route add 0.0.0.0 0.0.0.0 192.168.0.1

Also execute the following rmode command:

rmode 1 on

This example assumes your external router has the IP address 192.168.0.1 and that NAT32 has the IP address 192.168.0.254.

On the machine that is using too much bandwidth, open a Windows Console and enter the commands:

route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 192.168.0.254

That will make the machine send its Internet traffic to NAT32 at 192.168.0.254. NAT32's Administration feature can then be used to limit the outgoing traffic of the machine to some reasonable value. Alternatively, NAT32's Filter feature can be used to delay specific traffic from the machine.

Even though traffic from the Internet to the machine will still arrive directly from the external Router, NAT32 will have slowed down the outgoing traffic and thus reduced the total bandwidth usage.

To restore the original gateway the machine was using, enter the commands:

route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 192.168.0.1

To automate the NAT32 setup of this configuration, add the following lines to your user.txt file:


#
# NAT32 Traffic Throttle
#
dhcpd 1 off
rmode 1 on
route add 0.0.0.0 0.0.0.0 192.168.0.1
admin on

The first command turns off the NAT32 DHCP Server, as most external routers already run a DHCP Server.
The second command puts NAT32 into a routing-only mode in which no mappings or translations of any kind are performed.
The third command adds a default route to the NAT32 routing table so that NAT32 will forward all incoming Internet traffic to the external router. This traffic is forwarded without modification and no port mapping or address translation is performed.
The fourth command turns on NAT32 Administration. You can then open the NAT32 Admin window and apply a desired bandwidth limit or packet transmission limit to the private machines that choose to communicate with the Internet via NAT32.
Alternatively, a filter like the following could be used to slow down all FTP transfers running on the machine:

setf 1 add 0 0 0 0 6 0 20 500

SEE ALSO

admin, filter, rmode, route, Traffic Management, Windows ICS
[Edit] [Back]