<br><font size=2 face="sans-serif">Hi,</font><br><br><font size=2 face="sans-serif">I think I found a problem in iproute
or ubuntu kernel. I think that the "ip route get" returns wrong
interface and gateway in an multipath routing environment on Ubuntu 6.06
LTS.</font><br><font size=2 face="sans-serif">I reported it also to launchpad as a
bug: https://bugs.launchpad.net/ubuntu/+source/iproute/+bug/105521</font><br><br><font size=2 face="sans-serif">The easiest way to reproduce it is to
start an Ubuntu 6.06 LTS Live on a system with three IF's and setup the
environment as follows:</font><br><br><font size=2 face="sans-serif">root@ubuntu:~# ifconfig eth0 192.168.0.1
netmask 255.255.255.0 broadcast 192.168.0.255 up</font><br><font size=2 face="sans-serif">root@ubuntu:~# ifconfig eth1 192.168.1.1
netmask 255.255.255.0 broadcast 192.168.1.255 up</font><br><font size=2 face="sans-serif">root@ubuntu:~# ifconfig eth2 192.168.2.1
netmask 255.255.255.0 broadcast 192.168.2.255 up</font><br><font size=2 face="sans-serif">root@ubuntu:~# ip route add default
nexthop via 192.168.1.254 dev eth1 weight 1 nexthop via 192.168.2.254 dev
eth2 weight 1</font><br><font size=2 face="sans-serif">root@ubuntu:~# ip rule add prio 111
from 192.168.1.1 table 111</font><br><font size=2 face="sans-serif">root@ubuntu:~# ip rule add prio 222
from 192.168.2.1 table 222</font><br><font size=2 face="sans-serif">root@ubuntu:~# ip route add default
table 111 via 192.168.1.254</font><br><font size=2 face="sans-serif">root@ubuntu:~# ip route add default
table 222 via 192.168.2.254</font><br><br><font size=2 face="sans-serif">root@ubuntu:~# ip route ls</font><br><font size=2 face="sans-serif">192.168.2.0/24 dev eth2 proto kernel
scope link src 192.168.2.1</font><br><font size=2 face="sans-serif">192.168.1.0/24 dev eth1 proto kernel
scope link src 192.168.1.1</font><br><font size=2 face="sans-serif">192.168.0.0/24 dev eth0 proto kernel
scope link src 192.168.0.1</font><br><font size=2 face="sans-serif">default</font><br><font size=2 face="sans-serif"> nexthop
via 192.168.1.254 dev eth1 weight 1</font><br><font size=2 face="sans-serif"> nexthop
via 192.168.2.254 dev eth2 weight 1</font><br><br><font size=2 face="sans-serif">root@ubuntu:~# ip rule ls</font><br><font size=2 face="sans-serif">0: from all lookup local</font><br><font size=2 face="sans-serif">111: from 192.168.1.1 lookup 111</font><br><font size=2 face="sans-serif">222: from 192.168.2.1 lookup 222</font><br><font size=2 face="sans-serif">32766: from all lookup main</font><br><font size=2 face="sans-serif">32767: from all lookup default</font><br><br><font size=2 face="sans-serif">root@ubuntu:~# ip route ls table 111</font><br><font size=2 face="sans-serif">default via 192.168.1.254 dev eth1</font><br><font size=2 face="sans-serif">root@ubuntu:~# ip route ls table 222</font><br><font size=2 face="sans-serif">default via 192.168.2.254 dev eth2</font><br><br><font size=2 face="sans-serif">root@ubuntu:~# uname -a</font><br><font size=2 face="sans-serif">Linux ubuntu 2.6.15-23-386 #1 PREEMPT
Tue May 23 13:49:40 UTC 2006 i686 GNU/Linux</font><br><br><font size=2 face="sans-serif">root@ubuntu:~# ip -V</font><br><font size=2 face="sans-serif">ip utility, iproute2-ss041019</font><br><br><font size=2 face="sans-serif">root@ubuntu:~# ip route get 1.2.3.1</font><br><font size=2 face="sans-serif">1.2.3.1 via 192.168.2.254 dev eth2 src
192.168.1.1</font><br><font size=2 face="sans-serif"> cache mtu 1500 advmss
1460 hoplimit 64</font><br><font size=2 face="sans-serif">root@ubuntu:~# ip route get 1.2.3.2</font><br><font size=2 face="sans-serif">1.2.3.2 via 192.168.2.254 dev eth2 src
192.168.2.1</font><br><font size=2 face="sans-serif"> cache mtu 1500 advmss
1460 hoplimit 64</font><br><br><font size=2 face="sans-serif">As you can see, the "ip route get"
always returns ".. via 192.168.2.254 dev eth2 ..." and only switches
the source ip but not the corresponding interface and gateway. I saw this
behaviour a long time ago on Debian, but by now, on Debian Woody this is
working fine as least on kernel 2.6.14 and 2.6.16 with the same iproute
package and the "ip route get" output also gives the right interface
and gateway ( I did not test it on more environments ). On an installed
Ubuntu 6.06 LTS the behaviour is also wrong ( I found this problem on a
2.6.15-28-server kernel with the same iproute package ).</font><br><br><font size=2 face="sans-serif">¿ Any idea why this is happening ? ¿
Is this a regression ? ¿ Any suggestions ?</font><br><br><br><font size=2 face="sans-serif">Kind Regards,</font><br><font size=2 face="sans-serif">Eric Janz</font>--<BR>
<BR>
ADVERTENCIA LEGAL<BR>
El contenido de este correo es confidencial y dirigido unicamente a su destinatario. Para acceder a su clausula de privacidad consulte http://www.barceloviajes.com/privacy<BR>
<BR>
LEGAL ADVISORY<BR>
This message is confidential and intended only for the person or entity to which it is addressed. In order to read its privacy policy consult it at http://www.barceloviajes.com/privacy<BR>
<BR>