How to Configure a Default Gateway for Multihomed Computer with LAN and Internet Access (262397)



The information in this article applies to:

  • Microsoft Windows 95
  • Microsoft Windows 98
  • Microsoft Windows 98 Second Edition

This article was previously published under Q262397

SUMMARY

This article describes how to configure the default gateway for a multihomed computer with Internet access by using one network adapter and Local Area Network access by using the other network adapter.

MORE INFORMATION

When two network adapters are present in a computer (multihomed), a default gateway should only be assigned to one of the network adapter's TCP/IP properties. If one of the network adapters is used to connect to the Internet, the default gateway should be assigned to that network adapter. In many cases, the default gateway, as well as the other necessary TCP/IP information is assigned automatically by the Internet Service Provider by using Dynamic Host Configuration Protocol (DHCP). This can be confirmed by using the IP Configuration utility (Winipcfg.exe) to view the TCP/IP properties for the network adapter you are using to connect to the Internet.

For the network adapter that is connected only to the Local Area Network (LAN), such as a home or corporate network, a static routing entry must be entered into the computer's routing table if the computer needs to obtain access to network resources across a router or multiple routers. For example, if the router interface on the same subnet has an IP address of 192.168.1.1 and the router is connecting the 192.168.1.0 network to a 201.115.1.0 network, the following command would need to be entered either at a command prompt within Windows or from a batch file:

ROUTE ADD 201.115.1.0 MASK 255.255.255.0 192.168.1.1

This command instructs Windows to send all traffic that is destined for the 201.115.1.0 network to the 192.168.1.1 interface on the router. To verify that the ROUTE ADD command was successful, use the ROUTE PRINT command to view the current routing table. If multiple routers are being used on the LAN segment, a separate ROUTE ADD is needed for each router.

Note that the routing entry is not persistent in Windows 98/95, even with the -p switch, and is lost after you restart the computer. To have this entry automatically added for every Windows session, create a batch file with the necessary ROUTE ADD command(s) and place it in the Windows StartUp folder to be executed each time Windows starts.
If DHCP is used to assign IP addresses on the LAN, the DHCP server should be configured to not provide a default gateway.

Modification Type:MinorLast Reviewed:12/20/2004
Keywords:kbhowto kbnetwork KB262397