Link to home
Create AccountLog in
Avatar of dgwilson

asked on

Windows 7 DHCP Default Gateway not Overridden by manual Default Gateway

We have recently installed Windows 7 for student computers. All student computers must be routed through our content filter which is located at This was done in WinXP by adding a Default Gateway in the network adapter settings > TCP/IP Properties > Advanced > Default Gateway.
All teacher computers are routed through the DHCP assigned Default Gateway of

In WinXP the dhcp default gateway was correctly overridden by this manual setting.  In Win7 it appears that the dhcp default gateway is retained and the manual one is added to the list so that there are two with the dhcp one having the primary metric.

I have tried several ways to remove the dhcp default gateway such as, running the "route delete" command. Doing this from an administrator command prompt works but it just resets upon reboot.  I've tried adding this command to the registry's Run section but it seems to run as a non-administrator and therefore will not complete successfully.

Is there any way to prevent this and force the manual default gateway to override the dhcp one?  Or to remove the dhcp assigned one automatically on boot/login?

HELP!  We CANNOT allow student computers to connect to the internet without going through the content filter.
Avatar of achaldave
Flag of United States of America image

If you can you should create separate VLANs for teachers and students. Other option is to assign IP address to teachers' machines manually and students from DHCP.
Try turning off the "Automatic Metric" settings under the network adapter settings, "Internet Protocol Version 4 (TCP\IPv4)" properties,  Advanced.

Then if you need to increase the metric setting higher than your manually set gateway.
Avatar of dgwilson


Thank you for the suggestions so far.  Reassigning IP addresses etc. is a MAJOR undertaking and far from a solution.  I've set the metric to manual and the DHCP seems to set it's metric to one lower (higher priority) every time, even when I've set the manual default gateway to 1.

Please offer *SOLUTIONS*.  Guesses and try this and try that ... I can do that myownself. Come on "experts"!!!
Surely Win7 did not add this multiple gateway *feature* without some way to control it!
Add gateway to the interface and create "DontAddDefaultGatewayDefault" dword  type registry key under HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\
with value 1.
Avatar of dgwilson

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Because it is the ONLY one that works!