On Thursday 17 August 2006 03:54, Jarek Poplawski wrote:
> On 16-08-2006 16:18, Jacques Rompen wrote:
> > On 8/16/06, *Jarek Poplawski* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> > wrote:
> >
> >     As far as I know multipath cached should work for routing output
> >     of a current box but it's not working for router (if something
> >     has not changed lately). Multipath without "cached" should do
> >     simple randomization, but maybe for the begining it would be
> >     better to assign fixed paths by source ip and save experimenting
> >     with multipaths for later.
> >
> >     Jarek P.
> >
> >
> > Hi Jarek,
> >
> > I will try with only multipath.
> >
> > Ive tried the static routes. But still ive had trouble getting this code
> > to work
> > ip ro add default  nexthop via x.x.x.x dev eth1 weight 1 nexthop via
> > y.y.y.y dev eth2
> > ip route add default table provider1 via x.x.x.x dev eth1
> > ip route add default table provider2 via y.y.y.y dev eth2
> > because x.x.x.x = y.y.y.y in my case. Somehow it doesnt look at the eth
> > device anymore.
>
> Anyway in my opinion it should work.
> Try something like this:
>
> #IP_ROUTE_MULTIPATH = "y"
> #(if 2.6.x  IP_ROUTE_MULTIPATH_CACHED = "n" !)
> #Here with CONNMARK method (so without Anastasov's patch!).
> #Change 192.168.0.0/24 and eth0 to your local network
> #address/mask and interface.
>
> ip route add default nexthop via x.x.x.x dev eth1 \
>    nexthop via x.x.x.x dev eth2
>
> ip route add 192.168.0.0/24 dev eth0 table 101
> ip route add default via x.x.x.x dev eth1 table 101
>
> ip route add 192.168.0.0/24 dev eth0 table 102
> ip route add default via x.x.x.x dev eth2 table 102
>
> ip rule add fwmark 1 table 101
> ip rule add fwmark 2 table 102
>
> iptables -t mangle -A POSTROUTING -o eth1 -j MARK --set-mark 1
> iptables -t mangle -A POSTROUTING -o eth2 -j MARK --set-mark 2
>
> iptables -t mangle -A POSTROUTING -j CONNMARK --save-mark
> iptables -t mangle -A PREROUTING -j CONNMARK --restore-mark
>
> echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter


if all ethx are on the same switch, you will need:
echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore
#you can also do it in a per iface basis

by default, if you recive an arp request(whohas) on a iface(iface1), asking 
for an ip that another iface(iface2) has, then the arp request is ansered 
with the MAC address of the first iface(iface1). If all devices are in the 
same fisical segment this can lead to a single device answer for all IPs, or 
to a total caos. 

This one is very hard to catch and i forgot to mention, now solved :-)

--
Luciano
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

Reply via email to