USING TWO NETWORK CARDS TO CONFIGURE A DEFAULT GATEWAY


Two IP networks can be joined together using a Windows 9x computer as a router. To do this, two network interface cards (NICs) are installed in the computer to form what Microsoft calls a "multihomed" computer.

To illustrate, we'll examine a Windows 9x computer being used as a router between a LAN and the Internet. In our example, the internal LAN consists of computers with a private 192.168.x.x address range that are physically connected to one NIC. The other NIC is used to connect to the Internet. To successfully configure our router/computer, we need only assign a Default Gateway to the NIC on the Internet Connection.

Internet Service Providers (ISP) generally provide IP addresses and associated TCP/IP configuration details using Dynamic Host Configuration Protocol (DHCP). A Default Gateway address should be included in this information provided by your ISP.

Only the NIC dedicated to the Internet connection should be assigned the Default Gateway address. If a TCP/IP configuration is made on the other NIC, whether statically or by DHCP, it should not include a Default Gateway.

To maintain only one NIC Default Gateway address, you also may need to route TCP/IP traffic to another IP network on the LAN side across a router. To do this, we use the Route command W we assigned one Default Gateway to a multihomed Windows 9x computer (a computer with two Network Interface Cards, or NICs) being used as a router between a LAN and the Internet.

In addition, this computer may need to pass TCP/IP traffic out to another IP network on the LAN side across a router. However, to use our 9x computer as a router, only one NIC should be assigned a Default Gateway address, which we did on the NIC with the Internet connection.

Since we should not assign a Default Gateway address to the second NIC, we can use the "route" command to add the appropriate address information to the Windows 9x's routing table so it can pass TCP/IP traffic.

In our example, the LAN-side NIC address is 192.168.1.10. Because our internal LAN consists of computers with a private 192.168.x.x address range, the router knows that the 192.168.2.0 network has an interface address of 192.168.1.1.

To use the route command, we go to the command-line processor in DOS by typing:


Start | Run | "command" | OK


and add the route command and the appropriate routing information as shown below:


ROUTE ADD 192.168.2.0 MASK 255.255.255.0 192.168.1.1


To check that the route addresses have been correctly assigned, we can type:


route print


at the command line to see a listing of assigned addresses.


Because Windows 9x does not have a persistent route facility, you cannot use the -p switch in the route command.


To have Windows add the route to its routing table each time you start the computer, you will need to create the command in a batch file and add it to the Windows' Startup folder.