netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux IPV6_SUBTREES not functioning
@ 2013-08-02 10:15 Teco Boot
  2013-08-06  8:30 ` Hannes Frederic Sowa
  0 siblings, 1 reply; 5+ messages in thread
From: Teco Boot @ 2013-08-02 10:15 UTC (permalink / raw)
  To: netdev; +Cc: boutier

For destination & source address routing, I prefer the single routing table approach with IPV6_SUBTREES over the multiple tables with ip rules approach.
Can some take a look at my findings? It looks broken. It seems the source address check in route cache is missing.

Teco


Output:
==========
this is my system:
Linux ubuntu 3.8.0-25-generic #37-Ubuntu SMP Thu Jun 6 20:47:30 UTC 2013 i686 i686 i686 GNU/Linux
CONFIG_IPV6_SUBTREES=y
... clean up for our experiment
... add a link-local
... add default
... add some source address specific defaults
====> now I have this routing table
default from 2001:db8:10::/48 via fe80::10 dev eth0  metric 1024 
default from 2001:db8:11::/48 via fe80::11 dev eth0  metric 1024 
default from 2001:db8:12::/48 via fe80::12 dev eth0  metric 1024 
fe80::1 dev eth0  proto kernel  metric 256 
default via fe80::ff dev eth0  metric 1024 
====> show route to same destination
2001:db8:babe::1 from 2001:db8:10::1 via fe80::10 dev eth0  metric 0 \    cache 
2001:db8:babe::1 from 2001:db8:11::1 via fe80::ff dev eth0  metric 0 \    cache 
2001:db8:babe::1 from 2001:db8:12::1 via fe80::ff dev eth0  metric 0 \    cache 
2001:db8:babe::1 from 2001:db8:1::1 via fe80::ff dev eth0  metric 0 \    cache 
2001:db8:babe::1 from :: via fe80::ff dev eth0  metric 0 \    cache 
====> show route to different destinations
2001:db8:cafe::10 from 2001:db8:10::1 via fe80::10 dev eth0  metric 0 \    cache 
2001:db8:cafe::11 from 2001:db8:11::1 via fe80::11 dev eth0  metric 0 \    cache 
2001:db8:cafe::12 from 2001:db8:12::1 via fe80::12 dev eth0  metric 0 \    cache 
2001:db8:cafe::21 from 2001:db8:1::1 via fe80::ff dev eth0  metric 0 \    cache 
2001:db8:cafe::22 from :: via fe80::ff dev eth0  metric 0 \    cache 
====> now the route cache is
2001:db8:babe::1 from 2001:db8:10::/48 via fe80::10 dev eth0  metric 0 \    cache 
2001:db8:babe::1 via fe80::ff dev eth0  metric 0 \    cache 
2001:db8:cafe::10 from 2001:db8:10::/48 via fe80::10 dev eth0  metric 0 \    cache 
2001:db8:cafe::11 from 2001:db8:11::/48 via fe80::11 dev eth0  metric 0 \    cache 
2001:db8:cafe::12 from 2001:db8:12::/48 via fe80::12 dev eth0  metric 0 \    cache 
2001:db8:cafe::21 via fe80::ff dev eth0  metric 0 \    cache 
2001:db8:cafe::22 via fe80::ff dev eth0  metric 0 \    cache 
 


My script:
=======
#!/bin/sh

echo "this is my system:" 
uname -a
grep IPV6_SUBTREES /boot/config-3.8.0-25-generic

echo ... clean up for our experiment
ip -6 address flush dev eth0
ip -6 route flush table all

echo ... add a link-local
ip address add fe80::1 dev eth0

echo ... add default
ip -6 route add default via fe80::ff dev eth0

echo ... add some source address specific defaults
ip -6 route add default from 2001:db8:10::/48 via fe80::10 dev eth0
ip -6 route add default from 2001:db8:11::/48 via fe80::11 dev eth0
ip -6 route add default from 2001:db8:12::/48 via fe80::12 dev eth0

echo -n "====> "
echo now I have this routing table
ip -6 -o route show table main

echo -n "====> "
echo show route to same destination
ip -6 -o route get 2001:db8:babe::1 from 2001:db8:10::1
ip -6 -o route get 2001:db8:babe::1 from 2001:db8:11::1
ip -6 -o route get 2001:db8:babe::1 from 2001:db8:12::1
ip -6 -o route get 2001:db8:babe::1 from 2001:db8:1::1
ip -6 -o route get 2001:db8:babe::1

echo -n "====> "
echo show route to different destinations
ip -6 -o route get 2001:db8:cafe::10 from 2001:db8:10::1
ip -6 -o route get 2001:db8:cafe::11 from 2001:db8:11::1
ip -6 -o route get 2001:db8:cafe::12 from 2001:db8:12::1
ip -6 -o route get 2001:db8:cafe::21 from 2001:db8:1::1
ip -6 -o route get 2001:db8:cafe::22
echo -n "====> "
echo now the route cache is
ip -6 -o route show cache

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-06 11:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02 10:15 Linux IPV6_SUBTREES not functioning Teco Boot
2013-08-06  8:30 ` Hannes Frederic Sowa
2013-08-06  8:46   ` Teco Boot
2013-08-06  8:53     ` Hannes Frederic Sowa
2013-08-06 11:43       ` Hannes Frederic Sowa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).