[LARTC] Sort of solution to traffic only going to last nexthop

2006-02-08 Thread Mikael Svenson
Just wanted to let the people who have trouble with this know that I got 
it to work.


I ditched my Gentoo install and fired up Fedora Core 4. But it was not 
working out of the box.


When I updated to the latest kernel rpm 2.6.15 it worked like a charm :D

So.. Fedora Core 4 with the latest 2.6 kernel ought to get you up and 
running.


Hope this helps someone. My three weeks of anguish are finally over :)

Regards,
Mikael Svenson
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Multiple links and nat

2006-01-20 Thread Mikael Svenson

I read the previous thread about this but I seem to have a small problem.

I'm running gentoo with 2.6.14 kernel and have applied the patch from 
http://www.ssi.bg/~ja/#routes.


If I try to lynx to two different pages from the box itself it switches 
the interfaces every other time which is how it's supposed to work.


If I use an extra machine and set it's gateway to 10.0.4.211(eth0), then 
all requests are being sent to just one interface all the time. The same 
happens if I try other machines.


It's only requests generated inside the box which are being routed 
properly. I'm just wondering if something is amiss in my setup.


I have also tried the mpath2.sh script, but I got the same results.


My setup is like this:

eth0: 10.0.4.211 (internal network)
eth1: 192.168.1.2 (ISP1)
eth2: 10.0.0.2 (ISP2)

Commands:

ip route add 192.168.1.0/24 dev eth1 src 192.168.1.2 table T1
ip route add default via 192.168.1.1 table T1
ip route add 10.0.0.0/24 dev eth2 src 10.0.0.2 table T2
ip route add default via 10.0.0.1 table T2

ip rule add from 192.168.1.2 table T1
ip rule add from 10.0.0.2 table T2

ip route add default scope global nexthop via 192.168.1.1 dev eth1 
weight 1 nexthop via 10.0.0.1 dev eth2 weight 1


iptables -t nat -A PREROUTING -s 10.0.4.0/255.255.254.0 -d 
192.168.1.0/24 -j ACCEPT
iptables -t nat -A PREROUTING -s 10.0.4.0/255.255.254.0 -d 10.0.0.0/24 
-j ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -s 10.0.4.0/255.255.254.0 -j 
MASQUERADE
iptables -t nat -A POSTROUTING -o eth2 -s 10.0.4.0/255.255.254.0 -j 
MASQUERADE

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