IP conflict issues

Satyam Mooloo

Honorable
Oct 16, 2013
2
0
10,510
We are in a building (A) which connects with 2 other buildings B & C through Private Virtual
Circuit(PVC).

Building B has a WAN IP 192.168.1.1 and contains a server with IP 192.168.5.1
Building C has a WAN IP 192.168.1.2 and contains a server with same IP 192.168.5.1

My issue is that I'm getting an IP conflict when building A is trying to access either building B or C due to the same IP configurations in both servers.

I'm suggesting that I NAT Building B server and make it a private IP and assign an public IP address to it, lets say 10.10.10.1; that is to say, I want to hide the Bldg B server IP in order to avoid this IP conflict.

Is it possible for whatever I have in mind or can someone suggest me for a better solution.

Thanks and regards

 
First you are going to need a real router most consumer things called routers are actually gateways they can only nat lan addresses to a single wan.

Any commercial cisco router has this ability...even very very old ones. They have this exact example on their web site of advanced nat configuration. Most other firewalls and commercial routers also can do this. I would suspect you might be able to do it with dd-wrt but I don't know.

The first thing you must do is have the ability to nat blocks of ip addreses. You would for example nat 192.168.5.1 to 10.10.5.1 and 192.168.5.2 to 10.10.5.2. This is actually trivial since it is single command.

The thing that makes this complex is say 192.168.5.1 needs to talk to 192.168.5.2 on the other network. By default it will just ARP the ip and not even send it to the router. So the users must now use say 10.10.5.2 to talk to the other server. BUT this is only half the problem the traffic will get to the 10.10.5.2 server (ie 192.168.5.2 on network 2) but the source address is still 192.168.5.1 which it will send back to the wrong machine. You must also translate the source addresses Say to 10.20.5.x.

It is not all that hard to do if you have a router that supports this. It just hurts your head for a while to understand why it works.