What's the best way to accomodate multiple devices that all want to use the same fixed IP address into the same LAN?

Since the devices will all have the same real IP you would need to do some kind of masking or static NAT.

One solution would be to put every device (switchport) on a separate VLAN and route between the networks. The switch would need to be able to do static nat on a per port basis.

Another solution might be to make a linux machine on one port member of all VLANs and utilize virtual IPs and do the routing/nat part in linux. Iptables can do NAT.


It can be done. Actually I have done it myself last year.

3 Airco units with LAN monitoring that each insisted on being 10.0.0.2 and expect the default gateway to be 10.0.0.1 and the subnet 255.0.0.0. It can be changed, but only by the manufacturer who is no longer in business.

Buying new ones was not an option: Industrial units about $100.000 a piece.

Worst thing: Communication had to be 2-way: Remote access to the web-interface in the device and it needed to be able to send out syslog messages on it's own.

The trick is that you need multiple NAT-ting routers to make this work. A single router simply can't deal with to downstream LAN's having the same ip-subnet. (At least not any equipment I have ever seen...)

What I did was buy 3 cheap of the shelf routers (D-Link DIR-615). Put each of the units behind it's own router. Setup each router to be 10.0.0.1 on the LAN side and do port-forwarding for HTTP to the 10.0.0.2 address. WAN side of each router went on the regular LAN where each got it's own normal ip-address.

To connect to a unit I simply point a web-browser to the WAN-ip of it's router and port-forwarding does the rest. Syslog messages (outgoing) of the devices get NATted and appear to come from the 3 routers.

Only drawback is that to re-configure the D-Links I need to connect a PC to the LAN-side of each so I can get at the web-based management interface of the router. (The D-link can actually run it management interface on the WAN side but as far as I could tell only on port 80 which would have interfered with the port-fowarding.)

Tags:

Networking

Nat