Microsoft KB Archive/157025

From BetaArchive Wiki

Default Gateway Configuration for Multihomed Computers

Q157025



The information in this article applies to:


  • Microsoft Windows NT Advanced Server, version 3.1
  • Microsoft Windows NT Workstation versions 3.1, 3.5, 3.51, 4.0
  • Microsoft Windows NT Server versions 3.1, 3.5, 3.51, 4.0
  • Microsoft Windows for Workgroups version 3.11
  • Microsoft TCP/IP-32 for Windows for Workgroups, versions 3.11, 3.11a, 3.11b
  • Microsoft Windows 95
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server





SUMMARY

A multihomed computer is one that has multiple network interfaces. For computers using TCP/IP, these interfaces can be separate network interface cards (NICs) or multiple IP addresses on one NIC. This article discusses the recommended method of configuring the default gateway on multihomed computers.



MORE INFORMATION

In the TCP/IP properties of each of the products listed above, you have the option to configure a default gateway for each NIC or multiple default gateways for the same NIC. Every NIC that has a default gateway adds a 0.0.0.0 route (default route) to the routing table.

In either case, the TCP/IP routing table will have multiple default routes listed (to view the routing table, type "ROUTE PRINT" from the command prompt). The route most likely to be used is the default gateway for the primary NIC that is bound to TCP/IP, but this is not always the case. If the Transmission Control Protocol (TCP) session on the active default gateway times out, TCP can switch to the next default gateway. This can present a problem depending on your network configuration.

It is not recommended to have multiple adapters configured on the same network (it may even create more overhead). For more information on TCP/IP behavior when multiple adapters are configured on the same network, please see the following article in the Microsoft Knowledge Base:

Q175767 Expected Behavior of Multiple Adapters on Same Network

If both NICs are on the same contiguous network, this should not be a problem as long as the default gateways are valid. However, if the NICs are configured on disjoint networks, or networks that are physically separated and cannot communicate with each other, you will not be able to communicate with the destination host reliably.

A common use of multiple default gateways is to configure a backup gateway in the event of a failure of the primary gateway (router). This backup gateway is used by dead gateway detection, and is only triggered with TCP or connection-oriented traffic. Utilities like PING cannot force the default gateway to switch, because these utilities use User Datagram Protocol (UDP) and Internet Control Message Protocol (ICMP).

For additional information, please see the following articles in the Microsoft Knowledge Base:

Q128978 Dead Gateway Detection in TCP/IP for Windows NT

Q171564 TCP/IP Dead Gateway Detection Algorithm Updated for Windows NT

Only one default gateway should be configured on any multihomed computer. The default gateway is a global configuration for the server, not a setting that must be set for each network adapter. The server is already aware of all the networks it is directly connected to, and adds a route to each network for which it has a TCP/IP address.

The default gateway is used only for traffic that needs to go to a network for which the server has no route. There is only one default gateway active for a computer at a time. You should generally configure the default gateway on the most complex network, and leave the field blank on the other adapter. However, if fault tolerance is desired, choose one of the following:


  • If multiple routers are available on the same subnet, configure one (or more) default gateways on the same network adapter. This allows you to know which one is actually the primary. Leave all other adapters' default gateway configuration blank.
  • If the adapters on the multihomed computer are on disjoint networks (subnets that are not connected by a router), configure one (or more) default gateways on the same network adapter and use static routes for the remote networks that are reached through the network adapter with no default gateway.
  • Use a Routing Information Protocol (RIP) listener by enabling silent RIP and broadcasting available default routes with unique costs. The preferred default gateway can be the one advertised with the lowest cost. For more information, please see the following article in the Microsoft Knowledge Base:

    Q169161 Registry Parameters for RIP for IP Version 1

  • The simplest way to control the ordering of default gateways is to add only a single default gateway through the TCP/IP properties in Control Panel and add any additional gateways using the command line utility Route.exe. By providing a unique cost for each gateway, the ordering of the gateways can be easily determined.

Additional query words: multi-homed multi homed

Keywords : kbnetwork win95
Issue type : kbinfo
Technology : kbWinNTsearch kbWinNTWsearch kbWinNTW400 kbWinNTW400search kbWinNT351xsearch kbWinNT350xsearch kbWinNT400xsearch kbWinNTW350 kbWinNTW350xsearch kbWinNTW351xsearch kbWinNTW351 kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000Serv kbWinNTW310 kbWinNTSsearch kbWinNTS400xsearch kbWinNTS400 kbWinNTS351 kbWinNTS350 kbWinNTS310 kbWinNTAdvSerSearch kbWinNTAdvServ310 kbwin2000ServSearch kbwin2000Search kbwin2000ProSearch kbwin2000Pro kbWinNTS351xsearch kbWinNTS350xsearch kbWinNTS310xsearch kbAudDeveloper kbWin95search kbWinNT310xSearch kbWinNTW310Search kbTCPIPSearch kbWFWSearch kbWinAdvServSearch kbZNotKeyword3 kbWFW311 kbTCPIP311 kbTCPIP311a kbTCPIP311b


Last Reviewed: March 11, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.