Linux 3.9 routing oddity
Pierre Emeriaud
petrus.lt at gmail.com
Tue Jul 2 21:27:57 CEST 2013
Hello list,
I've found something strange regarding ipv6 routing under Linux 3.9
(confirmed under 3.9.1 and 3.9.8), and I wanted to know if I missed
something.
Short story: it ignores a more-specific route if the next-hop is not
in the neighbour table.
Long story:
$ ip -6 route
2001:db8:7972:1::/64 dev tun0 proto kernel metric 256
2001:db8:ee8c:180::/64 dev eth0 proto kernel metric 256 expires 86347sec
2000::/3 via 2001:db8:7972:1::1 dev tun0 metric 1024
fe80::/64 dev eth0 proto kernel metric 256
fe80::/64 dev tun0 proto kernel metric 256
default via fe80::f6ca:e5ff:fe43:d114 dev eth0 proto ra metric 1024
expires 1747sec
NH for 2000::/3 is 2001:db8:7972:1::1, reachable trough tun0. However,
route won't be used until 2001:db8:7972:1::1 appears in the neighbour
table:
$ ip -6 nei show
fe80::f6ca:e5ff:fe43:d114 dev eth0 lladdr f4:ca:e5:43:d1:14 router REACHABLE
$ ip -6 route get 2001:db8:400c:c03::be
2001:db8:400c:c03::be from :: via fe80::f6ca:e5ff:fe43:d114 dev eth0
src 2001:db8:ee8c:180:216:d3ff:feb6:d908 metric 0
$ ping6 2001:db8:7972:1::1
PING 2001:db8:7972:1::1(2001:db8:7972:1::1) 56 data bytes
64 bytes from 2001:db8:7972:1::1: icmp_seq=1 ttl=64 time=69.8 ms
64 bytes from 2001:db8:7972:1::1: icmp_seq=2 ttl=64 time=35.7 ms
^C
--- 2001:db8:7972:1::1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 35.716/52.773/69.830/17.057 ms
$ ip -6 nei show
fe80::f6ca:e5ff:fe43:d114 dev eth0 lladdr f4:ca:e5:43:d1:14 router REACHABLE
2001:db8:7972:1::1 dev tun0 lladdr 86:74:4c:45:18:f2 router REACHABLE
$ ip -6 route get 2001:db8:400c:c06::be
2001:db8:400c:c06::be from :: via 2001:db8:7972:1::1 dev tun0 src
2001:db8:7972:1::4 metric 0
cache
I understand that if the neighbor becomes unreachable the route
could/should be removed, but here it doesn't even try.
This behavior seems to have changed from kernel 3.8.
What do you think / rfc says about this?
Thanks in advance,
Pierre.
More information about the ipv6-ops
mailing list