TCP/IP Alternate Configuration.

JesperMP

Lifetime Supporting Member + Moderator
Join Date
Feb 2003
Location
ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts
16,342
Hi.

Several people mentions using the more than one IP address with the same PC and same NIC. It sure would be nice for me if I could learn that trick too.

I know about the Alternate COnfiguration tab in the Properties of the TCP/IP setup. But I cannot get it to work (* sob *).
On the "General" tab I have the "Obtain IP address automatically" set. This is required for access to my company network, and I dont want to forgo that.
And then I try to set an additional IP+Subnet on the "Alternate Configuration" tab (looks very simple and easy). But it just dont work.

IPCONGIG /ALL only reports the IP address set by the DNS server.
If I try to connect a PLC with a matching IP+Subnet to the alternate configuration, I cannot reach it.

What is the secret ?
 
Hi STL.

Thanks for your suggestion, but if I understand this correctly, then using NETSH I would actually switch IP adresses, not having two active at a time.
What I would like is to be online with my PLC and company LAN at the same time. Without resorting to adding another NIC.
Other people say that they can do it, and why is there this selection in the TCP/IP config if it doesnt work ?
 
Yes DHCP is enabled.

The dialog for XP is a little bit different to what you linked to.
There is an "Add.." button under "Advanced" but it is for "Gateways", which I dont think I should touch.

Now I think I have discovered the truth. Hitting F1 in the dialog displays a help text that says that "Specifies that TCP/IP uses an alternate configuration if a DHCP server is not found". So all this just means that it automatically selects the alternate IP if it cannot reach the company network.

So I have misunderstood what could be done with this feature. Sorry about that.
NETSH is probably the best way to go. Can it be used to switch between a DNS server and a fixed IP ?
 
Windows uses either Automatic Private IP Addressing (APIPA) or the alternate configuration to automate Internet Protocol (IP) configuration of network connections.

By default, the computer first attempts to contact a DHCP server on the network and dynamically obtain configuration for each installed network connection, as follows:


If a DHCP server is reached and leased configuration is successful, TCP/IP configuration is completed.


If a DHCP server is not reached after approximately 60 seconds or leased configuration fails, the computer uses the setting on the Alternate Configuration tab to determine whether to use APIPA for automatic TCP/IP configuration or to configure TCP/IP with the alternate configuration. When APIPA is used, Windows TCP/IP uses an address in the APIPA IP address range (169.254.0.1 through 169.254.255.254) and the subnet mask is set to 255.255.0.0.


You can try turning off APIPA:

Open Registry Editor, navigate to the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\Tcpip\Parameters


Create the following entry:

IPAutoconfigurationEnabled: REG_DWORD

Assign a value of 0 to disable Automatic Private IP Addressing (APIPA) support.
 
Hi Jesper,

Can it be used to switch between a DNS server and a fixed IP ?

My Dell Laptop is away having its Hard disk replaced! so i cant 100% check, However before it died i was switching between fixed IP addresses, I dont see any reason why you couldnt switch between the two. I'll test later upon its return..

That link of Kens looks promising though!

Regards
Steve
 
OK, what you are asking I think is how to multi-home a NIC. First you can not use DHCP at all. You must manually configure your IP and then you can assign (manually) multiple IPs to that NIC. I am sure there is some limit, but I do not know what that is. On our server we have 2-NICs and each one has 3-IPs assigned. By the way the screen shots below are from Windows XP with SP2.

See pictures below:
IP-ConfigStep01.JPG


After assigning the first address, then click the "Advanced..." button to get the next screen.
IP-ConfigStep02.JPG


Now click on the "Add..." button under the "IP adresses" list to assign multiple addresses to the NIC.

IP-ConfigStep03.JPG


After adding another address your IP Settings tab should look like the following.
IP-ConfigStep04.JPG
 
Last edited:
JesperMP said:
Thanks for your suggestion, but if I understand this correctly, then using NETSH I would actually switch IP adresses, not having two active at a time.
What I would like is to be online with my PLC and company LAN at the same time. Without resorting to adding another NIC.
From this statement I get the feeling that your PLC and company LAN are on the same physical network (meaning you can communicate with both from the same ethernet cable) but are on different subnets. If this is the case it might be possible to change your subnet mask to allow your computer to see both networks at the same time.

If you post the IP addresses you are using, we might be able to tell you a subnet mask that will allow you to see both at the same time.
 
The alternative configuration works if there are no DHCP server detected and (it is important!) there is a network connection to something else. That "else" could be anything: a PLC, an Ethernet touchscreen etc.

I use this all the time: an automatic configuration kicks in whenever I am connected to the company network (i.e. a DHCP server is present). As soon as I unplug my network card form the corporate net and plug into a stand-alone PLC, the alternative configuration gets enabled after about a minute or so. There must be a physical connection, otherwise it would not work. Then, of course, the IP addresses and the subnet masks must match.
 
dash and LadderLogic.
All this sounds interesting I can probably use that sometime.
But as I want to be simultanously online with the company LAN and the PLC, i have to use DHCP.

Tark.
The DNS server has assigned my PC the IP 10.1.2.45 and subnet 255.255.0.0
Anyway, all this is in the hands of the higher powers (IT department).
And I dont think they will allow (or be bothered to) change my subnet mask.
The PLCs and HMIs that I want to connect to typically have an IP 192.168.0.x

I dont want to make a big fuss out of this. So I am warming to the idea of another NIC. I will go look for a cheap USB one.
 
I think you are right, another nic is probably the easiest way to go.


My old Dell C820 was great because it had an ethernet port on the left side, near the front which i would use for PLC programming in the office or in the field. When back at the shop on my docking station, there was another ethernet port that was not a replication of the first port but instead was another nic built into the docking station. Viola, a second nic set for DHCP whenever I was at the shop on the company network.

Alas, my new Dell D820 does not have this feature as the built in ethernet port is physically blocked by the docking station.

But there was a will, so there was a way. I had a secured wireless access point installed (my laptop has a built in wireless card) on our company network. So I now use my hard wired connection for the PLCs and access the company network wirelessly.

Would any of those situations benefit you?

Marc
 

Similar Topics

Good people of PLCs.net, I am currently working with an HMI that is advantech 1250H, that communicates with a 1769 Compact logix and Currently...
Replies
2
Views
70
Hi folks, I have a Controllogix in communication with a zigbee coordinator using Logix AIO for modbus tcp. This zigbee coordinator have 3 slaves...
Replies
6
Views
170
I have a PH meter that I am trying to bring its data into 1756-L81. I have downloaded the Rockwell MODBUS AOI kit, but I am not sure if I need to...
Replies
5
Views
194
Hi, We have an application that has a device that goes through a reboot (appears un-graceful) What then happens is the MVI module appears to hang...
Replies
0
Views
88
I am very new to Modbus and the industry, so forgive me if I am missing something obvious. I have known Modbus register addresses coming from a...
Replies
7
Views
250
Back
Top Bottom