Skip to contentSkip to conversation

Multipath Routing Problems

LARTC Armin ranjbar 3 participants 8 messages Jun 23, 2006 – Jun 27, 2006

lore
Share & tools
lore
#0 lore raw

Hi all :)

there is somekind of strange Routing problem that im getting with Linux-2.6.16 and iproute 2.6.16 , when i use command like :

ip route add default nexthop via 1.1.1.1 dev eth0 nexthop via 1.1.1.2 dev eth1

all packets goes on 1.1.1.2 ( always last interface ) , whats is the problem ? this situation also tested with equalize flag , on two physical interface and etc ...

Signature · 5 lines
Lady Luck brings added income today.  Lady friend takes it away tonight.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#1 lore raw

Hi all :)

there is somekind of strange Routing problem that im getting with Linux-2.6.16 and iproute 2.6.16 , when i use command like :

ip route add default nexthop via 1.1.1.1 dev eth0 nexthop via 1.1.1.2 dev eth1

all packets goes on 1.1.1.2 ( always last interface ) , whats is the problem ? this situation also tested with equalize flag , on two physical interface and etc ...

Signature · 5 lines
Lady Luck brings added income today.  Lady friend takes it away tonight.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#2 lore raw
In reply to Armin ranjbar
Quoted 11 lines · Armin ranjbar

Hi all :)

there is somekind of strange Routing problem that im getting with Linux-2.6.16 and iproute 2.6.16 , when i use command like :

ip route add default nexthop via 1.1.1.1 dev eth0 nexthop via 1.1.1.2 dev eth1

all packets goes on 1.1.1.2 ( always last interface ) , whats is the problem ? this situation also tested with equalize flag , on two physical interface and etc ...

Equalize was available as a patch in 2.4 kernels and AFAIK there are not 2.6 patches, so to set that flag do nothing in most cases.

I think you have CONFIG_IP_ROUTE_MULTIPATH_CACHED set in your kernel(which is EXPERIMENTAL and mostly undocumented) and you're not selecting any of the 4 multipath cache algos. Try adding 'mpath' option to your 'tc' command:

ip route add default mpath rr nexthop via 1.1.1.1 dev eth0 nexthop via 1.1.1.2 dev eth1

If that do not work, recompile your kernel without CONFIG_IP_ROUTE_MULTIPATH_CACHED multipath will probably work at first try.

Plz don't forget to post your results to the list.

Signature · 5 lines
Luciano
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#3 lore raw
In reply to Armin ranjbar
Quoted 4 lines · On Fri, 23 Jun 2006 20:04:53 -0300 Luciano Ruete <[email protected]> wrote:

Equalize was available as a patch in 2.4 kernels and AFAIK there are not 2.6 patches, so to set that flag do nothing in most cases.

its quite strange , its somesort of working under 2.6.16 ,

Quoted 11 lines

I think you have CONFIG_IP_ROUTE_MULTIPATH_CACHED set in your kernel(which is EXPERIMENTAL and mostly undocumented) and you're not selecting any of the 4 multipath cache algos. Try adding 'mpath' option to your 'tc' command:

ip route add default mpath rr nexthop via 1.1.1.1 dev eth0 nexthop via 1.1.1.2 dev eth1

If that do not work, recompile your kernel without CONFIG_IP_ROUTE_MULTIPATH_CACHED multipath will probably work at first try.

Plz don't forget to post your results to the list.

my kernel compiled with :

CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_MULTIPATH_CACHED=y
CONFIG_IP_ROUTE_MULTIPATH_RR=y
CONFIG_IP_ROUTE_MULTIPATH_RANDOM=y
CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=y
CONFIG_IP_ROUTE_MULTIPATH_DRR=y

and all of this algorithms works perfectly over icmp , but there is some (maybe) problems with tcp round robin algorithm :

with :
ip route add default mpath rr nexthop via 1.1.1.2 dev eth0 nexthop via 1.1.1.3 dev eth0 wget i attempt to wget a file over tcp port 80 , all packets goes to 1.1.1.2 , nothing on 1.1.1.3 .

but with :
ip route add default mpath random nexthop via 1.1.1.2 dev eth0 nexthop via 1.1.1.3 dev eth0 i've got something on 1.1.1.3 and everything goes as expected , any idea ? we have to report bug ?

Quoted 3 lines
Signature · 2 lines
-- 
Luciano

thank you

Signature · 5 lines
You will be aided greatly by a person whom you thought to be unimportant.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#4 lore raw
In reply to Armin ranjbar
Quoted 10 lines

CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_MULTIPATH_CACHED=y
CONFIG_IP_ROUTE_MULTIPATH_RR=y
CONFIG_IP_ROUTE_MULTIPATH_RANDOM=y
CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=y
CONFIG_IP_ROUTE_MULTIPATH_DRR=y

and all of this algorithms works perfectly over icmp , but there is some (maybe) problems with tcp round robin algorithm :

Quoted 7 lines

with :
ip route add default mpath rr nexthop via 1.1.1.2 dev eth0 nexthop via 1.1.1.3 dev eth0 wget i attempt to wget a file over tcp port 80 , all packets goes to 1.1.1.2 , nothing on 1.1.1.3 .

but with :
ip route add default mpath random nexthop via 1.1.1.2 dev eth0 nexthop via 1.1.1.3 dev eth0 i've got something on 1.1.1.3 and everything goes as expected , any idea ? we have to report bug ?

There are some problems with the balancing code in newer kernels. As stated few days earlier removing multipath caching does help prety good.
Also a side remark with one client (load) you will see almost no effect. When you load the link wih lots of connections then the balancing works.

Remove multipath caching and try again
If your ISP's can offer you BGP (even read only/listen) resort to it. It will do much better.

Signature · 5 lines
С уважение,
Владимир Витков

http://www.netsecad.com
http://www.supportbg.com

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#5 lore raw
In reply to Armin ranjbar
Quoted 1 line · On Sun, 25 Jun 2006 21:46:06 +0300 "Vladimir Vitkov" <[email protected]> wrote:

Remove multipath caching and try again

if i remove
CONFIG_IP_ROUTE_MULTIPATH_CACHED

i will be unable to use :
CONFIG_IP_ROUTE_MULTIPATH_RR
CONFIG_IP_ROUTE_MULTIPATH_RANDOM
CONFIG_IP_ROUTE_MULTIPATH_WRANDOM
CONFIG_IP_ROUTE_MULTIPATH_DRR

right ?

Signature · 5 lines
You will always get the greatest recognition for the job you least like.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#6 lore raw
In reply to Armin ranjbar
Quoted 8 lines · Armin ranjbar

On Sun, 25 Jun 2006 21:46:06 +0300

Quoted 1 line · Vladimir Vitkov

Remove multipath caching and try again

if i remove
CONFIG_IP_ROUTE_MULTIPATH_CACHED

Quoted 7 lines

i will be unable to use :
CONFIG_IP_ROUTE_MULTIPATH_RR
CONFIG_IP_ROUTE_MULTIPATH_RANDOM
CONFIG_IP_ROUTE_MULTIPATH_WRANDOM
CONFIG_IP_ROUTE_MULTIPATH_DRR

right ?

yes, this modules are also EXPERIMENTAL code, and multipath work perfectly without them.

--
Luciano
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#7 lore raw
In reply to Armin ranjbar
Quoted 9 lines · Armin ranjbar
Quoted 1 line · On Sun, 25 Jun 2006 21:46:06 +0300 "Vladimir Vitkov" <[email protected]> wrote:

Remove multipath caching and try again

if i remove
CONFIG_IP_ROUTE_MULTIPATH_CACHED

Quoted 7 lines

i will be unable to use :
CONFIG_IP_ROUTE_MULTIPATH_RR
CONFIG_IP_ROUTE_MULTIPATH_RANDOM
CONFIG_IP_ROUTE_MULTIPATH_WRANDOM
CONFIG_IP_ROUTE_MULTIPATH_DRR

right ?

yes correct you will get only random multipath. It works perfectly well

Quoted 7 lines

--
You will always get the greatest recognition for the job you least like.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

Signature · 5 lines
С уважение,
Владимир Витков

http://www.netsecad.com
http://www.supportbg.com

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc