0

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.

2 Answers 2

1

running route -? shows this example:

route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2
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.

0

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.

You must log in to answer this question.

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