Split access multi-route problem - need help.

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Am writing to the list in the hope that someone out there might be able
to shed some light on a weird problem I have with a multiple route
configuration.

Some time ago I configured a web server to have two different IP
addresses from two different ranges on each of it's two ethernet cards.
 I followed the excellent instructions at
http://lartc.org/lartc.html#AEN268 and came up with the following
configuration:

#!/bin/bash
/sbin/ip route add 194.164.97.0 dev eth0 src 194.164.97.252 table T1
/sbin/ip route add default via 194.164.97.1 table T1
/sbin/ip route add 86.54.82.144 dev eth1 src 86.54.82.146 table T2
/sbin/ip route add default via 86.54.82.145 table T2

/sbin/ip route add 194.164.97.0 dev eth0 src 194.164.97.252
/sbin/ip route add 86.54.82.144 dev eth1 src 86.54.82.146

/sbin/ip route add default via 194.164.97.1

/sbin/ip rule add from 194.164.97.252 table T1
/sbin/ip rule add from 86.54.82.146 table T2
/sbin/iptables-save

I'm uncertain if the last line is actually needed there.

Anyway, this worked perfectly, or seemed to.  The two web sites could be
accessed properly and I could use ping to access the internet via either
interface, so 'ping -I eth0 lartc.org' and 'ping -I eth1 lartc.org' both
worked absolutely fine.

Now what's gone wrong.  My lovely web server's RAID controller started
failing and I have to move to another server in somewhat of a hurry.  I
copied over the configuration but on the new server it just doesn't work.

What happens is that whichever interface is defined in the '/sbin/ip
route add default via 194.164.97.1' line of the configuration above
becomes the only route out that works.  So for example 'ping -I eth1
lartc.org' no longer returns a result.

Would appreciate any help, especially if someone can confirm that my
configuration is correct and perhaps shed some light on other things
that I may have overlooked, such as the correct kernel modules etc.

For reference the install is Debian Etch, kernel 2.6.18-5-amd64.

Any help much appreciated,

Thanks in advance,

Mike.
-- 
----------
Mike Harris
Psand.net
Tlf: +44 7811 671 893 / +34 69 676 3122 / +44 870 162 4927 ext 2
Fax: +44 870 162 4925
Web: http://psand.net
PGP: http://www.psand.net/mike/mike.gpg.pub
IRC: irc://irc.psand.net:6667/#psand
----------
Psand Limited is registered in England and Wales
company number 03291616. Registered office:
54 Goodwin Road, Ramsgate, Kent, CT11 0JJ, UK.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux