[ILUG] IP address manipulation and routing

P at draigBrady.com P at draigBrady.com
Thu Mar 31 14:45:59 IST 2005


Why can't everyone ask lucid questions like you.

Niall O Broin wrote:
> 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.

yep, should work as can be seen here:
http://www.faqs.org/docs/Linux-mini/IP-Alias.html

> Another 
> thought is that this is presumably achievable with iptables somehow, but 
> I am not anything like an iptables whiz.

you can mangle the packets anyway you want,
but that would be more hassle.

-- 
Pádraig Brady - http://www.pixelbeat.org
--- Following generated by rotagator ---

If you need to leave a program running after you log out, try screen:
http://www.pixelbeat.org/lkdb/screen.html
--



More information about the ILUG mailing list