Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to change the default gateway for the wired ethernet port on my laptop- the DHCP server is giving the wrong one. I would like it to revert to the existing config on a reboot.

I would prefer a command line way of doing it - so I can easily repeat the command as needed. Do I need ipconfig or route - both of which confuse me.

share|improve this question
up vote 1 down vote accepted

running route -? shows this example:

CHANGE is used to modify gateway and/or metric only.

The route is not persisted, so it should revert after reboot. You can check these links for help using route.

share|improve this answer

I don't think you can change the gateway without also setting the IP to static. The most likely command line tool to be able to do this if it is possible would be "netsh". You'll need to be a local admin or a member of local "network administrators" group for this to work.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .