1

I am having trouble executing the following command on Windows XP SP3.

netsh interface ip set address name="Local Area Connection 2" static 192.168.100.5 255.255.255.0 192.168.100.1

I am fairly confident that this command is correct, however I am receiving:

The syntax supplied for this command is not valid.  Check help for the correct syntax.

This command works on Windows 7 just fine, and according to the help provided by Windows XP, this is the correct syntax.

Any one have any ideas? Thanks in advance!

tcshain
  • 89
  • 2
  • 9
  • see also https://stackoverflow.com/questions/9868045/changing-ip-address-via-command-line-on-windows-xp/9891452 – TT-- Jul 15 '18 at 02:49

2 Answers2

1

The pc is Windows XP SP3.

I get the same error with this (Italian) interface name :

"Connessione alla rete locale (LAN) 3"

I found the problem.

It is mandatory to specify after the gateway also the parameter gwmetric.

This solves all my issues with NETSH int ip set address.

Massimo
  • 3,171
  • 3
  • 28
  • 41
0

Example:

netsh interface ip set address name="Local Area Connection" static 1.2.3.4 255.255.255.0 2.3.4.5 gwmetric=1

Static IP Address ----- Subnet Mask ----- Default Gateway ------ Metric

James
  • 900
  • 3
  • 15
  • 28