1
Here is a diagram of my situation.
/-(Network cloud)- Host B (192.168.1.2)
Host A -NIC 1 (192.168.1.50) - <-- Connected via patch panel to either B or C
\-(Network cloud)- Host C (192.168.1.2)
- NIC 2 (currently unused)
All hosts are running Linux Redhat variants. This configuration has previously been two completely separated networks for the purpose of testing software deployments. Both Host B and Host C are on identical networks in that they both are configured with the same host and network addresses. In addition, the connection between Host A and the two networks goes through a series of switches and routers that for testing reasons cannot be modified.
I have all of my development tools installed on Host A. I have one NIC on host A configured for an ip on the 192.168.1.0 network such that I can connect to either Host B or Host C's network. I have one additional NIC on host A that can be used as well.
My question is, what options, if any, do I have to connect to both Host B and Host C at the same time? Given that I am only allowed to change the configuration on Host A and must not change the configuration on Host B, Host C, or any hop along the way.
My first thought was that I could solve this problem using NAT translation on Host A. But I wasn't sure how that would have to be configured, or if that is even going to work for my situation.
Are you sure these are routers? If Hosts A and B both have IP addresses in 192.168.1.0/24, then the router should return an error when you try to assign an address to the 2nd interface. Do you know the IPs of the four router interfaces? (I assume you can't change these either, but you'll at least need them to set the gateways on host A's NICs) – Spamwich – 2014-03-13T22:14:26.143
If I was in your shoes I would be setting up NAT on each of the routers using different IP addresses for each. Then from host A I would simply use the two different addresses. @user3050461: That's simply incorrect. If it was the same network then some device (which may be the router) would send an arp reply that should cause an error as the second system is brought up. If they are not the same network then it's perfectly acceptable. Anycasting is a bit similar. With that you typically rely on BGP to route the packets to the for you however.
– yoonix – 2014-03-13T22:37:15.537@user3050461 I may not understand the question. Right now I'm not using the second NIC in Host A. I'm just configuring the first NIC for an open address on the 192.168.1.0/24 network and physically plugging it into one of the two routers. – kenen – 2014-03-13T22:40:17.320
@yoonix I phrased that poorly. What I meant was that the router won't like having two of its own interfaces assigned addresses in the same subnet. – Spamwich – 2014-03-13T22:49:49.853
@user3050461 Ah, I understand. This is my fault for not completely understanding the network before asking the question. I believe there are switches and VLANS involved as well. I was attempting to limit the diagram to the only devices that I thought were relevent to the question. I have been plugging Host A into a patch panel which goes to one of two racks that contain Host B or C, routers, switches and a bunch of devices that are external to the path from Host A and B/C. I'll update the question to make it more clear, especially since I can't really modify anything outside of Host A. – kenen – 2014-03-13T23:03:36.603
1@kenen Ok I too am starting to get a better picture. If you have identical configuration and addressing on both NICs then your development tools on host A need to be able to specify which interface to use. I would probably just disable one eth interface at a time for the sake of simplicity, but I'm no dev :) – Spamwich – 2014-03-13T23:20:56.693
The translation can't be done on host A because what are you going to use as the NATed address? If you had an address that could reach one host and a separate for the other you probably would just use those addresses to begin with. ;). @user3050461: gotcha. I figured that's what you meant after I wrote that. Sorry for the confusion. – yoonix – 2014-03-13T23:55:33.050