Hello! I have trouble with multipath routing. Those options are enabled in kernel: [*] IP: policy routing [*] IP: equal cost multipath [*] IP: equal cost multipath with caching support (EXPERIMENTAL) <*> MULTIPATH: round robin algorithm But issuing: ip r a 1.2.3.0/23 scope global equalize nexthop via 80.245.176.11 \ dev eth0 weight 1 nexthop via 80.245.176.13 dev eth0 weight 1 and then # ip r s [...] 1.2.3.0/24 nexthop via 80.245.176.11 dev eth0 weight 1 nexthop via 80.245.176.13 dev eth0 weight 1 As you can see there is no equalize keyword in here. Also I have trouble using multipath quagga, it simply doesn''t put multipath route in routing table. For example: faramir# sh ip bgp 10.100.0.1 BGP routing table entry for 10.101.0.0/22 Paths: (2 available, best #1, table Default-IP-Routing-Table) Not advertised to any peer Local 80.245.176.13 (metric 1) from 80.245.176.13 (80.245.177.4) Origin IGP, metric 0, localpref 100, weight 150, valid, internal, best Last update: Tue Jun 5 01:59:29 2007 Local 80.245.176.10 (metric 1) from 80.245.176.10 (80.245.176.10) Origin IGP, metric 0, localpref 100, weight 100, valid, internal Last update: Tue Jun 5 01:28:02 2007 # ip r s [...] 10.100.0.0/22 via 80.245.176.11 dev eth0 proto zebra But if I manually put something like that in quagga: faramir(config)# ip route 1.2.3.0/24 80.245.176.13 faramir(config)# ip route 1.2.3.0/24 80.245.176.11 Then: # ip r s [...] 1.2.3.0/24 nexthop via 80.245.176.11 dev eth0 weight 1 nexthop via 80.245.176.13 dev eth0 weight 1 Please help, I am out of ideas. -- Michał Margula, alchemyx@uznam.net.pl, http://alchemyx.uznam.net.pl/ "W życiu piękne są tylko chwile" [Ryszard Riedel]
On Tue, Jun 05, 2007 at 11:13:52AM +0200, Michał Margula wrote:> Hello! >Hi> I have trouble with multipath routing. Those options are enabled in > kernel: > > [*] IP: policy routing > [*] IP: equal cost multipath > [*] IP: equal cost multipath with caching support (EXPERIMENTAL) > <*> MULTIPATH: round robin algorithm >First of all equal cost multipathing is evil ;>, It simply doesn''t work for packets in forwarding path besides support in kernel is not maintained Realy if you want load balance both uplinks disable CONFIG_IP_ROUTE_MULTIPATH_CACHED and you will have random traffic distribiution between both links. More details : http://lists.openwall.net/netdev/2007/03/14/50 http://lists.openwall.net/netdev/2007/03/12/76 http://lists.quagga.net/pipermail/quagga-users/2007-May/008469.html> Also I have trouble using multipath quagga, it simply doesn''t put > multipath route in routing table. > > For example: > > faramir# sh ip bgp 10.100.0.1 > BGP routing table entry for 10.101.0.0/22 > Paths: (2 available, best #1, table Default-IP-Routing-Table) > Not advertised to any peer > Local > 80.245.176.13 (metric 1) from 80.245.176.13 (80.245.177.4) > Origin IGP, metric 0, localpref 100, weight 150, valid, internal, > best > Last update: Tue Jun 5 01:59:29 2007 > > Local > 80.245.176.10 (metric 1) from 80.245.176.10 (80.245.176.10) > Origin IGP, metric 0, localpref 100, weight 100, valid, internal > Last update: Tue Jun 5 01:28:02 2007 >BGP always have alternative paths in BGP RIB and mostly don''t insert them as multipath route to FIB. Of course there is path : http://lebon.org.ua/quagga.html that force route to be inserted to kernel with multiple gateways - but realy this is some kind of dirty-hack. Check thread ''Linux and BGP multipath'' on quagga-dev, and especially this mail: http://lists.quagga.net/pipermail/quagga-dev/2007-April/004700.html> # ip r s > [...] > 10.100.0.0/22 via 80.245.176.11 dev eth0 proto zebra > > But if I manually put something like that in quagga: > > faramir(config)# ip route 1.2.3.0/24 80.245.176.13 > faramir(config)# ip route 1.2.3.0/24 80.245.176.11 >yeah this is static route. /pch -- Dyslexia bug unpatched since 1977 ... exploit has been leaked to the underground.
Piotr Chytla pisze:> First of all equal cost multipathing is evil ;>, It simply doesn''t work for packets in > forwarding path besides support in kernel is not maintained > > Realy if you want load balance both uplinks disable > CONFIG_IP_ROUTE_MULTIPATH_CACHED and you will have random traffic > distribiution between both links. > > More details : > http://lists.openwall.net/netdev/2007/03/14/50 > http://lists.openwall.net/netdev/2007/03/12/76 > http://lists.quagga.net/pipermail/quagga-users/2007-May/008469.html >Oh. I see. Thanks. BTW: google doesn''t show that links when looking for multipath on linux :-) Random load sharing over multiple routes is not a good idea, or maybe is it? Am I guessing right that with enough amount of traffic and having two nexthops it will split 50%/50% ?> BGP always have alternative paths in BGP RIB and mostly don''t insert them > as multipath route to FIB. > > Of course there is path : http://lebon.org.ua/quagga.html that force > route to be inserted to kernel with multiple gateways - but realy this > is some kind of dirty-hack.I know that site, but I thought that those patches were obsoleted, because of --multipath option when compiling quagga.> Check thread ''Linux and BGP multipath'' on quagga-dev, and especially this mail: > > http://lists.quagga.net/pipermail/quagga-dev/2007-April/004700.htmlI know that also :). BTW: until now I was quite pleased with linux networking which quality is amazing. But now, when I need loadbalancing I am disapointed, because it doesn''t support things that with cisco hardware you take for granted. I miss mostly recursive routes. Something like that ip route add 80.245.177.4/32 via 80.245.176.11 ip route add 10.0.0.0/24 via 80.245.177.4 It would solve problems with multipath bgp and loadbalancing because I could add remove additional routes to 80.245.177.4 (or some other imaginary loopback) and it would work as expected. I hope it will be added some day :) Thank you for your help! -- Michał Margula, alchemyx@uznam.net.pl, http://alchemyx.uznam.net.pl/ "W życiu piękne są tylko chwile" [Ryszard Riedel]
Piotr Chytla pisze:> First of all equal cost multipathing is evil ;>, It simply doesn''t work for packets in > forwarding path besides support in kernel is not maintained > > Realy if you want load balance both uplinks disable > CONFIG_IP_ROUTE_MULTIPATH_CACHED and you will have random traffic > distribiution between both links. >Unfortunately it still doesn''t work as expected. When i ping some host it always go trough one nexthop. It does per-destination loadbalancing, I am afraid. -- Michał Margula, alchemyx@uznam.net.pl, http://alchemyx.uznam.net.pl/ "W życiu piękne są tylko chwile" [Ryszard Riedel]