Reference Manual

HOW TO connect a network behind a gateway to the Internet

Problem:

NAT32 is connectng the private network 172.16.2.0 to the Internet. On that private network, there is a gateway at 172.16.2.2 which connects to another network 172.16.5.0. Our aim is to configure NAT32 and that gateway to allow 172.16.5.x machines to reach the Internet. NAT32 is using the private IP address 172.16.2.100 in this example.

Solution:

 In the NAT32 startup file, add the following command, anywhere before the last shell command:

route add 172.16.5.0 255.255.255.0 172.16.2.2 15 0
The above command tells NAT32 to forward all packets for the 172.16.5.0 subnet to the gateway 172.16.2.2.

Our example gateway has two IP addresses: 172.16.2.2 and 172.16.5.1 (because it connects to both the 172.16.2.0 and the 172.16.5.0 subnets), and it must be configured to use the default route 172.16.2.100, which is the address of NAT32 on the private LAN. Note that if the gateway is a Windows machine, it too will have Internet access through NAT32. Don't forget to set its DNS address to 172.16.2.100 though!

Note that any Windows machine (95/98/NT/2000) can be made to act as a gateway simply by turning on IP Forwarding (NT/2000) or IP Routing (95/98). If you are running the original Windows 95 release, be sure to use the latest VIP.386 (available in the DUN upgrade from Microsoft).

The private machines on the 172.16.5.0 subnet must be configured to use the gateway 172.16.2.100 too, but because that gateway isn't directly reachable (it can only be reached though the 172.16.2.2 gateway) you can't just add that gateway to the Properties of the TCP/IP Protocol with Control Panel Network.

Instead, you do the following:

Note that the private machines should also use 172.16.2.100 as their DNS address.

Important:

You must use Class B private IP addresses for the above example to work.
SEE ALSO
route
[How-To Index] [HOME]