Techn4b’s Blog

May 20, 2009

Windows XP change IP from command prompt

Filed under: Windows — Tags: , , , , , , , , , , — techn4b @ 16:37

Of course you can change the IP from the command prompt.

The command is:
to change IP and default gateway:
netsh int ip set address “local area connection” static 1

to change DNS:
netsh int ip set dns “local area connection” static primary

This is assuming 3 things.
1) The network adapter you’re trying to change the IP for is “local area connection”. It could also be “local area connection 2” or “wireless network connection”. Look in your control panel for the correct name
2) The IP you want to set is, change this to whatever IP to want to use.
3) The default gateway and dns are the same IP. If you are using some kind of router they usually are. Change this to match your network config found with the command ipconfig /all

You will need to run both commands to change the IP.

Posted by

Comment: worked great for me. thanks


Blog at