changing default gateway through command line

M

Madhur Ahuja

Hello
Can anyone tell me how to change the default gateway of an interface through
command line. I think it is possible through netsh.exe but I am not able to
do it.
 
D

DS

Madhur Ahuja said:
Hello
Can anyone tell me how to change the default gateway of an interface
through command line. I think it is possible through netsh.exe but I
am not able to do it.

--
Madhur Ahuja [madhur<underscore>ahuja<at>yahoo<dot>com]

Homepage & other stuff
http://madhur.netfirms.com

I'm sure you have figured this out by now but......

From a cmd prompt......

route delete 0.0.0.0 -this removes the current GW
route add 0.0.0.0 mask 0.0.0.0 x.x.x.x -where x.x.x.x is the new
gateway.
 
M

Madhur Ahuja

I'm sure you have figured this out by now but......

From a cmd prompt......

route delete 0.0.0.0 -this removes the current GW
route add 0.0.0.0 mask 0.0.0.0 x.x.x.x -where x.x.x.x is the new
gateway.

Thanks the default gateway was created and worked. But I wonder, the default
gateway setting on each of my connection is still grayed. Is there any
difference
if someone sets the default gateway on particular connection and if someone
sets
it by this method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top