Default gateway behavior in win7 vs XP
Hi
If i use a XP box and let it get a IP address from DHCP but hard code the default gateway , everything goes to that
gateway and route print does not show the DHCP handed out gateways at all on the machine as it should be. Now on a windows 7 machine if i do the same setup i get a different behavior my traffice does not go through the default gateway all the time and a
route print shows routes to the DHCP gateways whic i do not want. Other people have seen this issue somehave reported it to microsoft but no answer back.
All i need is a registry key to set windows 7 to the behavior of XP.
thanks
August 18th, 2011 7:23pm
Please refer the followinga article to change the default gateway with netsh command lines.
Netsh commands for Interface Internet Protocol version 4 (IPv4)
http://technet.microsoft.com/en-us/library/cc731521(WS.10).aspxPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2011 11:06am
Fine you say uswe netshto set the gateaway but will that be save across reboots, if not then it is of no use then.
August 24th, 2011 12:00am
If you do not want the traffic to route to the DHCP gateway, you can add a persistent route which will stay the same even after reboots. You have to use the
route add command with the -p switch to make the entry permanent.
More here:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/route.mspx?mfr=true
Though the article has a Windows XP title, this applies to Windows 7 also. This adds a permanent entry to the registry. Quoting from the page:
"-p : When used with the
add command, the specified route is added to the registry and is used to initialize the IP routing table whenever the TCP/IP protocol is started. By default, added routes are not preserved when the TCP/IP protocol is started. Persistent routes
are stored in the registry location HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes."
Please revert back here if this does not resolve your issue or if I may have misunderstood your question. Hope it helps!
Kunal D Mehta - a Windows Server Enthusiast.
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2011 8:30pm
Sorry but you are not getting it, win7 does not adhere to the default gateway that is defined by hand, and want the same behavior as XP . Try it on win 7 and you will see.
thanks
August 24th, 2011 8:39pm


