-4

I have a server with 4 modules, and one Ethernet Port and an internal hub to assign these modules to, configured as below.

  • Module 1: 192.168.10.1
  • Module 2: 192.168.10.2
  • Module 3: 192.168.10.3
  • Module 4: 192.168.10.4

Each of these Modules intend to talk to 4 devices, all of which have the same IP address, and cannot be changed. (192.168.10.150)

I then have a PC which controls this server and the devices, and the PC has an IP address of 192.168.10.10. Everything is set statically here, and needs to stay the way it is.

Is there a way I can make this server, with multiple IP addresses, talk to these different devices which share the same IP address?

Nathan C
  • 15,059
  • 4
  • 43
  • 62
eecs
  • 13
  • 3
  • You are indicating that there are multiple devices on the same subnet with the same IP address, all "alive" at the same instant in time, with no high-availability load balancing mechanism? But each devices has a different `MAC`, so you can `arp` to find the the physical address to send the packets to in the broadcast domain. What are you doing? `arp spoofing`? – brandeded Feb 12 '14 at 18:59
  • 4
    This question is giving me a migraine. Why the holy expletive-deleted would you intentionally create a 4-way IP address conflict? that's your problem, right there. Solve that instead of ... what you're trying to do here. – HopelessN00b Feb 12 '14 at 19:09
  • 2
    You could put a Raspberry PI with static NAT in front of each device to translate it to it's own IP. But seriously, just fix the damn problem in the first place. – MikeyB Feb 12 '14 at 19:21
  • @sa-cha I ***STRONGLY*** suggest you purchase and read a good book on IP networking and learn exactly how it operates on a logical (protocol) level before you try any more "creative" configurations. Per my answer below, if we're all understanding what you're describing your configuration is insane. – voretaq7 Feb 12 '14 at 19:30
  • 1
    @MikeyB static NAT is something I can look into. Thanks! – eecs Feb 12 '14 at 19:35

4 Answers4

3

Put a cheap box such as Raspberry PI with static NAT in front of each device to translate it to it's own IP.

Now the server is hitting different IPs for each device (server is happy) while each device can happily work away in blissful ignorance that it's being NATted (device is happy).

But seriously, just fix the damn problem in the first place. Ew.

MikeyB
  • 39,291
  • 10
  • 105
  • 189
2

Is there a way I can make the server with multiple IP addresses talk to different devices which have same IP addresses?

If you want all 4 nics on the server to be active and accessing multiple devices that have the same IP...NO.

You could look into something like ForceBindIP: http://old.r1ch.net/stuff/forcebindip/ if you were interested in routing certain apps through certain NICs on the server but having those remote all have the same IP isn't going to work.

The only way I can even conceive such a thing is if you plugged/unplugged ethernet cables all the time. e.g. unplug all but 1 server NIC and then unplug all but 1 remote device. Rinse, and repeat. But your current scenario of 4 server nics <> Hub <> 4 devices...ain't gonna work with dupe IPs if you want it to talk via IP.

TheCleaner
  • 32,627
  • 26
  • 132
  • 191
1

No. No no no. NO.

NO.

You're describing this situation (switches optional; you could just have cables port-to-port):
enter image description here

In such a configuration your poor computer (played by our hapless laptop) is in an IP-impossible situation: It has three interfaces, all presumably configured to be in the same subnet (192.168.1.0/24 since you're accessing 192.168.1.200 from each of them and that's the only way the subnet math works out).

Your computer thinks it's in this situation:

enter image description here

You have four interfaces configured with the same subnet, so your computer logically assumes they are connected to the same network.
You can't have duplicate IP addresses in an IP network (because the IP specification says you can't), so your computer also logically assumes that 192.168.1.200 is a single device (not 4).

So you're left with a very confused computer and a 4-way IP address conflict that will cause havoc on your network.


I'm not sure what exactly what you're trying to do, but you can't do it this way.

voretaq7
  • 79,879
  • 17
  • 130
  • 214
0

Yes, this is easy. Set a static entry in your ARP table on your laptop. Hopefully you are running Linux or FreeBSD on your PC Laptop. :) Read this manual page:

man arp
Rudy
  • 31
  • 1