Had a really hard time setting multipath routing in Ubuntu today! I have setup this before, and it was really simple. But today i tried all variants and nothing helped! Besides the source based routing rules, there was a simple record in main table, added like this:
ip route add default equalize nexthop 1.1.1.1 dev ppp0 weight 2 nexthop 2.2.2.2 dev ppp1 weight 1
Looks okey? Yeah, but no matter how many times i ip route flush cache, traffic always goes via the second interface. Tried things like:
$ for i in `seq 1 254`; do ip ro get xxx.$i.yyy.zzz; done
...and so on, nothing! It always goes via ppp1. After a tens of different routing/setup combinations, i found at debian-administration.orgin comments, that CONFIG_IP_ROUTE_MULTIPATH_CACHED is broken/buggy and must be turned off in kernel, or else multipath routing/loadbalancing won't work like it should. All standard kernel images in Ubunty Edgy have this turned on. Though linux-image-2.6.20-14 from Festy has it already turned off.









