Re: IP "Alternate configuration"

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Tabs" are used in GUIs (Graphical User Interfaces). Since you're after a
scriptable solution you need something that controls the same parameters
that your tab does. As I mentioned before, netsh.exe can do this. The
following command is an example: It will set the adapter to DHCP mode.

netsh interface ip set address "Local Area Connection" DHCP

If you want to alter between DHCP and a fixed address then you need two
netsh commands: One to enable DHCP, the other to set fixed addresses (which
are embedded in your command).


"SubnetJO" <SubnetJO@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:62E01BE6-3940-4551-8212-3E79D5B8D0E6@xxxxxxxxxxxxxxxx
Thank for your reply.

I mean...
Take a WinXPpro machine.
Control Panel > Network Connections

On an Ethernet Interface:
Right click > properties

On the general tab, choose "Internet Protocol (TCP/IP)" and then click the
Properties button.

In the "Internet Protocol (TCP/IP) Properties" window, If the interface is
configured to "Obtain an IP address automatically" (on the "General tab"),
you can see the "alternate configuration" tab too.

On this tab you can set a static IP configuration for the case the
automatic
configuration (DHCP) fails.

I can set the IP configuration in many ways, including the Netsh.exe
utility, but I didn't find a way to programmatically place the alternate
IP
configuration.

Thanks,
SubnetJO, Italy







"Pegasus [MVP]" wrote:


"SubnetJO" <SubnetJO@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4D32F41D-F456-4157-A020-A46ECA338CF1@xxxxxxxxxxxxxxxx
Hi all.

Surely you know that if you set a network interface to be configured
dinamically by a DHCP server, you have the "Alternate Configuration"
TAB
where you can place a static IP configuration in the case the dynamic
configuration process fails (for any reason).

I'd like to set the (IP) "alternate configuration" programmatically,
using
a
script (VBS, VB, PowerShell, Netsh... doesn't matter), and I couldn't
find
a
documentation about.

Can any of you provide me a way to accomplish this task?
A sample code would be great!

Really thank you for your help.
SubnetJO, Italy

I cannot see any "Alternate Configuration" tab on my machine. Regardless
of
this, the usual command to set IP parameters is netsh.exe. You can use it
to
set fixed IP addresses or use DHCP.





.


Quantcast