XP: Set or configure static network IP address wtih netsh from command line
Posted by Quinn McHenry in Windows networking
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.
About Quinn McHenry
View more articles by Quinn McHenry
The Conversation
Follow the reactions below and share your own thoughts.





March 13, 2009 at 3:03 pm, aditya said:
not working