XP: Set or configure static network IP address wtih netsh from command line

Home -> Windows -> Network administration

9107 views

From the computer of: qmchenry (338 recipes)
Created: Jul 18, 2006


Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

Setting the IP address from the command line from XP is simple with the netsh command. This is ideal for use in batch files.

To set the following settings on the network interface "Local Area Network"

IP address: 192.168.50.100
Subnet mask: 255.255.255.0
Gateway: 192.168.50.1

use the following command (one line):

netsh int ip set address name="Local Area Connection" source=static 192.168.50.100 255.255.255.0 192.168.50.1 1


The order of the values in the command is IP address, subnet mask, and gateway. The 1 at the end is a routing metric for the gateway address. The value 1 will work for most circumstances.

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  XP: Set or configure network interface to DHCP wtih netsh from command line
  XP & 2000 users that use static ip's in one office & dhcp in another office
  How to Configure a Static Client for Windows XP Internet Connection Sharing
  How to Reset Internet Protocol (TCP/IP) in Windows XP
  Run Network Diagnostics on Windows to Debug Your Connections
  Virtual Server 2005: How To Configure the Virtual DHCP Server
  How to Use Internet Connection Sharing (ICS)
  NT/2000/XP: Display or view the Windows routing table
  NT/2000/XP: Add a temporary route to the Windows routing table
  How to Enable Internet Connection Sharing in a Home or Small Office Network

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.