complicated routing with public and private IPs

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

complicated routing with public and private IPs

Unread post by faris »

Can someone point me in the right direction please?

I'm getting really furstrated by a gap in my knowledge.

I have two servers:

Server A:
eth0=Public-IP-A (100Mb/s)
eth1=Private-IP-A (1Gb/s)

Server B:
eth0=Public-IP-B (100Mb/s)
eth1=Private-IP-B (1Gb/s)

There's a crossover cable connecting eth1 on both machines directly.

eth0 on both machines are connected to a 100Mb/s ethernet switch and the internet. The public IPs are on the same subnet.

The eth1 connection is there to allow faster file transfer (1Gb/s connections as opposed to 100Mb/s) between machines for backups. These machines run Virtuozzo.

Virtuozzo hardware nodes effectively act as routers. So they accept packets sent to the IPs of any VPS running on them and forward them to the appropriate VPS.

Unfortunately, in order to get the 1Gb/s connection to be of any use, I have to manually add a route for eth1 on ServerA that says Public-IP-B via Private-IP-A -- and similarly Public-IP-A via Private-IP-B on ServerB (all this is done via /etc/sysconfig/networking-scripts/route-eth1)

This is fine. It works. BUT I also have to manually add similar routes on Server A for the IPs of each VPS I add to server B (and vice versa on Server B).

If I don't do so, packets from Server A to a VPS on Server B go out via eth0 but come back on eth1 and therefore get ignored (or is it the other way round - out via eth1 and in via eth0? Doesn't matter. Point is it doesn't work without adding routes manually because the packets don't come and go via the same interface and get ignored).

This seems "wrong". There has got to be a way around this, surely? It seems daft to keep having to add routes manually each time I add a VPS in order to make sure traffic between the two machines gets there and back correctly.

The term bridging comes to mind -- is that what I need to do? Bridge eth1 and eth0? Or something else? Or is what I want to do just not possible and I will have to manually add routes for the rest of my days?

Faris.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Post Reply