You are on page 1of 1

How to Use the NETSH Command to Change from Static IP Address to ...

http://support.microsoft.com/?kbid=257748

Article ID: 257748 - Last Review: March 1, 2007 - Revision: 3.4

How to Use the NETSH Command to Change from Static IP Address to DHCP in Windows 2000
System Tip
This article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you.Visit the Windows 7 Solution Center This article was previously published under Q257748
Notice

This article applies to Windows 2000. Support for Windows 2000 ends on July 13, 2010. The Windows 2000 End-ofSupport Solution Center (http://support.microsoft.com/?scid=http%3a%2f%2fsupport.microsoft.com%2fwin2000) is a starting point for planning your migration strategy from Windows 2000. For more information see the Microsoft Support Lifecycle Policy (http://support.microsoft.com/lifecycle/) .
SUMMARY

You can use the netsh command in Windows 2000 to script the process of changing a computer from a static Internet Protocol (IP) address to Dynamic Host Configuration Protocol (DHCP) or vice versa. The netsh command accomplishes this task without the need to restart the computer. This feature is particularly useful for laptops that move from one environment to another, when it is necessary to use statically assigned IP addresses at one location and DHCP assigned IP addresses at another.
MORE INFORMATION

To switch the specified adapter from a static address to DHCP, type the following command: netsh interface ip set address "Local Area Connection" dhcp NOTE: Typing this command changes the interface named "Local Area Connection" to DHCP. To display all of the adapters in the computer with their current IP addresses to determine the correct adapter name, type the following command: Netsh interface ip show config To change to a static address, type the following command: netsh interface ip set address "Local Area Connection" static ipaddr subnetmask gateway metric NOTE: Replace ipaddr with the static IP address, subnetmask with the subnet mask, gateway with the default gateway and, if necessary, metric with the appropriate metric. The following example changes the interface "Local Area Connection" to a static address of 192.168.0.10 with a subnet mask of 255.255.255.0, and the interface has a default gateway of 192.168.0.1 with a metric of 1: netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1

APPLIES TO Keywords: kbenv kbinfo KB257748

Get Help Now


Contact a support professional by E-mail, Online, or Phone

Microsoft Support

2010 Microsoft

1 of 1

11/21/2010 10:02 PM

You might also like