Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Dead gateway detection is used to allow TCP to detect failure of the default gateway and to make an adjustment to the IP routing table to use another default gateway. The Microsoft TCP/IP stack uses the TRIGGERED RESELECTION method described in RFC 816, with some slight modifications based upon customer experiences and feedback.

For TCP to perform dead gateway detection, you must change the value for the following registry entry to 1 (True):

HKEY_LOCAL_MACHINE\Comm\Tcpip\Parms\enabledeadgwdetect

With dead gateway detection enabled, TCP may ask IP to change to a backup gateway if a number of connections are experiencing difficulty. Backup gateways can be defined by using the Route utility or the IP Helper API.

When any TCP connection that is routed through the default gateway has attempted to send a TCP packet to the destination a number of times equal to one-half of the registry value TcpMaxDataRetransmissions, without receiving a response, the algorithm changes the Route Cache Entry (RCE) for that one remote IP address to use the next default gateway in the list. When 25 percent of the TCP connections have moved to the next default gateway, the algorithm advises IP to change the computer's default gateway to the one that the connections are now using.

For example, assume that there are currently TCP connections to 11 different IP addresses that are being routed through the default gateway. Now assume that the default gateway fails, that there is a second default gateway configured, and that the value for TcpMaxDataRetransmissionsis at the default of 5.

When the first TCP connection tries to send data, it will not receive any acknowledgments. After the third retransmission, the RCE for that remote IP address will be switched to use the next default gateway in the list. At this point, any TCP connections to that one remote IP address will have switched over, but the remaining connections will still try to use the original default gateway.

When the second TCP connection tries to send data, the same thing will happen. Now, two of the 11 RCEs will point to the new gateway.

When the third TCP connection tries to send data, after the third retransmission, three of 11 RCEs will have been switched to the second default gateway. Because, at this point, over 25 percent of the RCEs have been moved, the default gateway for the whole computer will be moved to the new one.

This new default gateway remains the primary one for the computer until it experiences problems (causing the dead gateway algorithm to try the next one in the list again) or until the computer is restarted.

When the search reaches the last default gateway, it returns to the beginning of the list.

See Also