Dead gateway detection in the Windows TCP/IP stack
I just had an “ahh hah” moment when I came across DeadGWDetectDefault/EnableDeadGWDetect registry value (located at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters).
This is what causes a static route entry to be placed in the table if the gateway assigned to a route inclusive of the address fails to route the packets.
[When set to a value of 1,] allows TCP to detect failure of the default gateway and to adjust the IP routing table to use another default gateway.
1 is the default setting.