Jun 28 2008

How to configure Windows IP settings from the command prompt.

If you're new here, you may want to start with my most popular posts. Then, subscribe to my RSS feed to stay updated. Thanks for visiting!

Google Query: change ip address from command line

As an IT professional, I often have to use a laptop to test software or services on different subnets where I am working. Some of these subnets do not provide DHCP so that I can obtain an IP Address automagically ;) . I would have to go into the IP settings of the network adapter and change the settings manually when I wanted to talk on a new subnet. This was a pain. Then, I remembered a program called “Netsh.exe” that comes with Windows 2000, XP, and 2003.

I always forget the syntax though. A quick google search landed me on the Petri IT Knowledgebase

Basically, what I ended up doing is this:

-Open up notepad
-Type the following into your blank “.txt” file

netsh interface ip set address name="Adapter Name" static ip mask gateway
Where Adapter Name is the name for your NIC that you want to configure (e.g. “Local Area Connection”), ip is the ip address you want to set, mask is the subnet mask, and gateway is the gateway you want to set.

-Save the text file as a “*.cmd” or “*.bat” file and run it whenever you want to change subnets (just create a *.cmd or *.bat file for each subnet).

That’s it! No more manually setting up your NIC because that just takes way too long ;) .

Technorati Tags: , , ,

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.


Subscribe Form

Subscribe to Blog


Recent Readers

                  Computers Blogs - Blog Top Sites