Help with NETSH INTERFACE IP Please

G

Guest

I'm trying to write a batch file to set the local IP address to static as
follows:

netsh interface ip set address name="Local Area Connection" source=static
addr=10.0.0.55 mask=255.255.255.0 gateway=10.0.5.1

I keep getting "the syntex for this command is not valid" What's worng with
it... Any help would be much appreciated.
Alan
 
S

Steve Winograd [MVP]

I'm trying to write a batch file to set the local IP address to static as
follows:

netsh interface ip set address name="Local Area Connection" source=static
addr=10.0.0.55 mask=255.255.255.0 gateway=10.0.5.1

I keep getting "the syntex for this command is not valid" What's worng with
it... Any help would be much appreciated.
Alan

When you specify a gateway address, you also have to specify a value
for the gateway metric. For example:

netsh interface ip set address name="Local Area Connection"
source=static addr=10.0.0.55 mask=255.255.255.0
gateway=10.0.5.1 gwmetric=10
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top