NETSH command doesnt work???

B

BertieBigBollox

Got a script that runs automatically to set the IP address of my
win2000 servers.

It uses the following command:-

netsh interface ip set address local static <IP address> <netmask>
<default gateway> 1

Doesnt give an error but does nothing. Leaves IP as 0.0.0.0.

If I go into network connections, I can change the IP from there but I
need to be able to run from script.
 
P

Pegasus [MVP]

Got a script that runs automatically to set the IP address of my
win2000 servers.

It uses the following command:-

netsh interface ip set address local static <IP address> <netmask>
<default gateway> 1

Doesnt give an error but does nothing. Leaves IP as 0.0.0.0.

If I go into network connections, I can change the IP from there but I
need to be able to run from script.

To avoid ambiguities, you should specify the name of the connection you wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia" static
192.168.1.44 255.255.255.0 192.168.1.2 1
 
P

Pegasus [MVP]

Got a script that runs automatically to set the IP address of my
win2000 servers.

It uses the following command:-

netsh interface ip set address local static <IP address> <netmask>
<default gateway> 1

Doesnt give an error but does nothing. Leaves IP as 0.0.0.0.

If I go into network connections, I can change the IP from there but I
need to be able to run from script.

To avoid ambiguities, you should specify the name of the connection you wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia" static
192.168.1.44 255.255.255.0 192.168.1.2 1
 
B

BertieBigBollox

Got a script that runs automatically to set the IP address of my
win2000 servers.

It uses the following command:-

netsh interface ip set address local static <IP address> <netmask>
<default gateway> 1

Doesnt give an error but does nothing. Leaves IP as 0.0.0.0.

If I go into network connections, I can change the IP from there but I
need to be able to run from script.

Have tried completely uninstalling the network interfaces and
reinstalling but still the same.

Strangely enough, it listed the interfaces as Local Area Interface 2
and 3 again. Whats happened to 1? IS there something in the registry
or something deciding that theres aleady a LAN 1?
 
B

BertieBigBollox

Got a script that runs automatically to set the IP address of my
win2000 servers.

It uses the following command:-

netsh interface ip set address local static <IP address> <netmask>
<default gateway> 1

Doesnt give an error but does nothing. Leaves IP as 0.0.0.0.

If I go into network connections, I can change the IP from there but I
need to be able to run from script.

Have tried completely uninstalling the network interfaces and
reinstalling but still the same.

Strangely enough, it listed the interfaces as Local Area Interface 2
and 3 again. Whats happened to 1? IS there something in the registry
or something deciding that theres aleady a LAN 1?
 
B

BertieBigBollox

To avoid ambiguities, you should specify the name of the connection you wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia"  static
  192.168.1.44  255.255.255.0 192.168.1.2 1

So what does LOCAL do?
 
B

BertieBigBollox

To avoid ambiguities, you should specify the name of the connection you wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia"  static
  192.168.1.44  255.255.255.0 192.168.1.2 1

So what does LOCAL do?
 
B

BertieBigBollox

To avoid ambiguities, you should specify the name of the connection you wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia"  static
  192.168.1.44  255.255.255.0 192.168.1.2 1

Also, still doesnt work even if I use the interface name. Appears to
work and comes back OK though.
 
B

BertieBigBollox

To avoid ambiguities, you should specify the name of the connection you wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia"  static
  192.168.1.44  255.255.255.0 192.168.1.2 1

Also, still doesnt work even if I use the interface name. Appears to
work and comes back OK though.
 
P

Pegasus [MVP]

To avoid ambiguities, you should specify the name of the connection you
wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia" static
192.168.1.44 255.255.255.0 192.168.1.2 1

Also, still doesnt work even if I use the interface name. Appears to
work and comes back OK though.

=================

Worked perfectly for me, running WinXP Professional.
 
P

Pegasus [MVP]

To avoid ambiguities, you should specify the name of the connection you
wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia" static
192.168.1.44 255.255.255.0 192.168.1.2 1

Also, still doesnt work even if I use the interface name. Appears to
work and comes back OK though.

=================

Worked perfectly for me, running WinXP Professional.
 
P

Pegasus [MVP]

To avoid ambiguities, you should specify the name of the connection you
wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia" static
192.168.1.44 255.255.255.0 192.168.1.2 1

Also, still doesnt work even if I use the interface name. Appears to
work and comes back OK though.

==============

Please post the following:
a) The exact command you used.
b) The full output from the command
ipconfig /all
 
P

Pegasus [MVP]

To avoid ambiguities, you should specify the name of the connection you
wish
to modify, e.g. like so:

netsh interface ip set address name="wireless pcmcia" static
192.168.1.44 255.255.255.0 192.168.1.2 1

Also, still doesnt work even if I use the interface name. Appears to
work and comes back OK though.

==============

Please post the following:
a) The exact command you used.
b) The full output from the command
ipconfig /all
 
B

BertieBigBollox

Also, still doesnt work even if I use the interface name. Appears to
work and comes back OK though.

=================

Worked perfectly for me, running WinXP Professional.- Hide quoted text -

- Show quoted text -

Think its specific to this machine. Script works fine on other
servers. Got no idea why it fails on this,,,
 
B

BertieBigBollox

Also, still doesnt work even if I use the interface name. Appears to
work and comes back OK though.

=================

Worked perfectly for me, running WinXP Professional.- Hide quoted text -

- Show quoted text -

Think its specific to this machine. Script works fine on other
servers. Got no idea why it fails on this,,,
 

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