Configuring Dead Gateway Detection Problem

You want to configure dead-gateway detection on a Windows Server 2003 computer so that the computer can continue to route traffic even if its default gateway becomes unavailable.

Solution

Using the Registry

To enable dead-gateway detection for a Windows Server 2003 computer, set the following Registry value:

[HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\Tcpip\Parameters\] "EnableDeadGWDetect"=dword:1

To disable dead-gateway detection, set the previous DWORD value to 0 (false). Using VBScript

This code enables dead-gateway detection for all configured network adapters.

strComputer = "."

boolEnable = TRUE ' set to FALSE to disable

Set objWMIService = GetObject("winmgmts:" _

& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set objSettings = objWMIService.Get("Win32_NetworkAdapterConfiguration") objSettings.SetDeadGWDetect(boolEnable)

WScript.Echo "Dead-gateway detection set to " & boolEnable

How It Works

Dead-gateway detection is a feature of Windows Server 2003 that allows a local machine to detect the failure of its default gateway, and to route traffic to another configured gateway to ensure uninterrupted connectivity. This setting is useful for computers that have multiple network interface cards (NICs) attached to the same subnet, where more than one NIC could be configured as the default gateway for a particular connection. In this instance, default gateway detection allows you to create fault tolerance for traffic being routed from the local Windows Server 2003 computer.

When transmitting a TCP packet to a particular destination, TCP/IP in Windows Server 2003 will keep track of whether it receives a response or not; if it does not receive responses when using a particular gateway within a configurable amount of time (one half of the value of the TcpMaxDataRetransmissions DWORD value in the Tcpip\Parameters Registry section), it will then move to the next available gateway and begin to use that address to route outgoing traffic. In effect, this new IP address will become the Windows Server 2003 computer's default gateway until the computer is restarted or the new default gateway also fails.

■Note When Windows Server 2003 reaches the end of its list of available default gateways, it will return to the beginning of the list when transmitting subsequent packets in an attempt to locate a functioning default gateway.

See Also

• Recipe 4-7 for more on displaying and working with the Windows IP routing table

• Recipe 4-11 for more on working with static Windows routes

• Microsoft TechNet: The Cable Guy, September 2003, "Default Gateway Behavior for Windows TCP/IP" (http://www.microsoft.com/technet/community/columns/cableguy/ cg0903.mspx#EDAA)

Was this article helpful?

0 0

Responses

  • Peter
    How to desable dead gateway detection?
    8 months ago
  • gundabald
    What is the proper setting for dead gateway detection?
    5 months ago

Post a comment