Saturday, July 13, 2024
HomeWindowsWindows networkingXP: Set or configure static network IP address wtih netsh from command...

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

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.

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 !!