changing default gateway through command line

  • Thread starter Thread starter Madhur Ahuja
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top