HomeWindowsWindows networkingXP: Set or Configure Network Interface to DHCP with netsh from Command...

XP: Set or Configure Network Interface to DHCP with netsh from Command Line

My predisposition to command line solutions for problems stems from my vast experience with UNIX. (I will admit that it is fun to intimidate GUI users.) However, there are times that command line solutions are the best fit for a problem. For example, if you find yourself frequently switching between a static IP address and DHCP for a network interface, as happens with laptops sometimes, it would be nice to have a command that could fit in a batch file. The netsh command in XP SP2 makes this possible. This tech-recipe shows the command to make an interface use DHCP.


To make the interface Local Area Network use DHCP instead of a static address, use the following command (all on one line):

netsh int ip set address name="Local Area Connection" source=dhcp

Other interface names can be substituted as needed.

Quinn McHenry
Quinn McHenry
Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!