[ILUG] IP address manipulation and routing
Niall O Broin
niall at linux.ie
Thu Mar 31 14:12:52 IST 2005
I'm working on a project which is being converted from SCO using
Informix to Linux using MySQL.
For reasons which are not germane to this discussion, this box makes
connections to two other systems and each other system must see
connections coming from a separate IP.
On the SCO box, this is done by having two NICs, each with the
appropriate IP address, and setting up routes to the other systems with
a 'dev' specifier so that the traffic arrives at the external system
with the appropriate IP.
This is of course achievable in exactly the same way on Linux, but I
was wondering could it be achieved with one NIC? The reason for this is
that the boxes have two NICs, but I'd like to use one in each box
(redundant pair) to be used for a crossover cable which will do nothing
but carry MySQL replication traffic and heartbeat. The boxes are
PE2850s which I presume could have another NIC installed (they're 2U,
and there are slot covers there, so I presume a PCI riser is installed.
I'd be well pissed with Dell if it were an optional extra. But the box
isn't mine, and I haven't had its top off yet) but that to me just adds
another POF which I'd prefer top avoid, if there's a software solution.
One thought is to use route commands and specify dev eth0:1 (or
whatever) but I don't know if that's allowed in a dev specifier.
Another thought is that this is presumably achievable with iptables
somehow, but I am not anything like an iptables whiz.
More information about the ILUG