[CentOS] Redundant LAN routing possible?

Whit Blauvelt whit at transpect.com
Sun Jul 11 01:17:25 UTC 2010


On Sun, Jul 11, 2010 at 05:21:50AM +0800, Emmanuel Noobadmin wrote:

> e.g.
> System A
> eth0 -> lan switch/router 1
> eth1 -> lan switch/router 2
> 
> System B
> eth0 -> lan switch 1
> eth1 -> lan switch 2
> 
> Then somehow specify that, if lan switch 1 fails, the two systems will
> switch to using switch 2 so that in case of a switch failure, the
> network continues to remain operational.

If you're clever with scripting and iproute2 commands, rules and multiple
routing tables, and everything's Linux, this is certainly doable. You could
have your System A ping System B's IP via eth0 every minute, and on failure
reassign its default route and IP to eth1. Meanwhile you can set up rules and
routes on System B so that whichever NIC traffic comes in on, the response
will use the same NIC ... stuff you'll find if you google around for how to
be dual-homed between ISPs is quite applicable here.

It's too complex to work it out for you in detail without spending an hour
on it. But I've done this sort of thing and had it work very well.

Whit



More information about the CentOS mailing list