23
Mar
09

Windows XP: Change IP address (static DHCP) using command prompt

boom-main_fullThere are conflicts of IP addresses everywhere, most typical case would be home networking using DHCP and office network use Static IP due to security measurement. Switch them would be quite troublesome.

The harder way is to do it via command prompt. To change DHCP address to static IP:

netsh interface ip set address name=”<network connection name>” static <static IP> <network mask> <default gateway>

eg. netsh interface ip set address name=”Ethernet Network Connection” static 192.168.0.10 255.255.255.0 192.168.0.1

To change it back to DHCP client:

netsh interface ip set address name=”<network connection name>” dhcp

eg. netsh interface ip set address name=”Ethernet Network Connection” dhcp

Other than these, changing the DNS server manually would be:

netsh interface ip set dns name=”<network connection name>” static <DNS server IP address>

eg.netsh interface ip set dns name=”Ethernet Network Connection” static 192.168.0.1 (assume the gateway is same as DNS server)

Lastly, changing the WINS server manually would be:

netsh interface ip set wins name=”<network connection name>” static <DNS server IP address>

eg.netsh interface ip set wins name=”Ethernet Network Connection” static 192.168.0.1 (assume the gateway is same as WINS server)

Troublesome, isn’t it? What if you put all the commands into one batch file (.bat), with one click, it is easier than GUI!

Reference:

  1. Configure TCP/IP from the Command Prompt
  2. Microsft Help and Support:How to Use the NETSH Command to Change from Static IP Address to DHCP in Windows 2000
Advertisements

7 Responses to “Windows XP: Change IP address (static DHCP) using command prompt”


  1. July 9, 2009 at 7:04 am

    This blog helped me to change ip address in windows xp.

  2. July 21, 2009 at 10:34 am

    Thanks for great posting, will back to read other useful post 😉

  3. August 29, 2009 at 10:00 pm

    i don’t understand that…

  4. January 12, 2010 at 11:16 am

    How can I find more information related to this post? Its very interesting and I think this will benefit others after reading through the provided material. Thank you and keep up the good work!

    • 7 albertsiow
      March 1, 2010 at 7:58 am

      you can refer the reference links at the end of the post. Always remember that: Google is your best friend! ^_^


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: