 jonsmirl join:2007-06-02 Wellesley Hills, MA | Multiple IPv6 routers on LAN Using Linux I have a 6to4 tunnel running on Ethernet (subnet 2002:ad4c:16cc:1) without problem. It runs radvd and announces a default route back to the Internet like this: "default via fe80::6a7f:74ff:fe0a:fbec dev br0"
On this same Ethernet subnet I have a Linux plugbox (fe80::225:31ff:fe01:cc) which is a gateway to a network of IPv6 enabled sensors. I've assigned this second subnet 2002:ad4c:16cc:2.
How do I get the plugbox to announce "2002:ad4c:16cc:2 via fe80::225:31ff:fe01:cc" so that the hosts on the Ethernet subnet (2002:ad4c:16cc:1) will automatically pick up the route? The route works if I add it to the boxes manually. I can ping6 the motes from the Internet.
I've tried getting radvd on the plugbox to do this but I've had no success. |
|
|
|
 Logan_APremium join:2010-12-14 Methuen, MA | interface eth0
{
AdvSendAdvert on;
AdvDefaultLifetime 0;
prefix 2002:ad4c:16cc:1/64
{
AdvOnLink on;
AdvAutonomous on;
};
route 2002:ad4c:16cc:2/64
{
AdvRoutePreference high;
};
};
AdvDefaultLifetime 0; will tell the hosts that it's not a default router for the 2002:ad4c:16cc:1/64 subnet, then with the route block will tell the hosts that 2002:ad4c:16cc:2/64 can be reached via that router on a higher preference then the other routers in the network. |
|
 jonsmirl join:2007-06-02 Wellesley Hills, MA | You answer makes sense, but I can't get the route to add. From a host on the Ethernet LAN I see this with radvd dump.
interface br0 { AdvSendAdvert on; # Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump AdvManagedFlag off; AdvOtherConfigFlag off; AdvReachableTime 0; AdvRetransTimer 0; AdvCurHopLimit 64; AdvDefaultLifetime 0; AdvHomeAgentFlag off; AdvDefaultPreference medium; AdvLinkMTU 1280; AdvSourceLLAddress on;
prefix 2002:ad4c:16cc:1::/64 { AdvValidLifetime 86400; AdvPreferredLifetime 14400; AdvOnLink on; AdvAutonomous on; AdvRouterAddr off; }; # End of prefix definition
route 2002:ad4c:16cc:2::/64 { AdvRoutePreference high; AdvRouteLifetime 30; }; # End of route definition
}; # End of interface definition # # radvd configuration generated by radvdump 1.6 # based on Router Advertisement from fe80::6a7f:74ff:fe0a:fbec # received by interface br0 #
interface br0 { AdvSendAdvert on; # Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump AdvManagedFlag off; AdvOtherConfigFlag off; AdvReachableTime 0; AdvRetransTimer 0; AdvCurHopLimit 64; AdvDefaultLifetime 30; AdvHomeAgentFlag off; AdvDefaultPreference medium; AdvLinkMTU 1280; AdvSourceLLAddress on;
prefix 2002:ad4c:16cc:1::/64 { AdvValidLifetime 86400; AdvPreferredLifetime 86400; AdvOnLink on; AdvAutonomous on; AdvRouterAddr on; }; # End of prefix definition
}; # End of interface definition
jonsmirl@terra:~$ ip -6 route 2002:ad4c:16cc:1::/64 dev br0 proto kernel metric 256 expires 86397sec mtu 1280 advmss 1220 hoplimit 4294967295 fe80::/64 dev br0 proto kernel metric 256 mtu 1280 advmss 1220 hoplimit 4294967295 fe80::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 fe80::/64 dev virbr0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295 default via fe80::6a7f:74ff:fe0a:fbec dev br0 proto kernel metric 1024 expires 26sec mtu 1280 advmss 1220 hoplimit 64 jonsmirl@terra:~$
jonsmirl@terra:~$ ifconfig br0 Link encap:Ethernet HWaddr 70:71:bc:b8:9b:ee inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: 2002:ad4c:16cc:1:7271:bcff:feb8:9bee/64 Scope:Global inet6 addr: fe80::7271:bcff:feb8:9bee/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:67851 errors:0 dropped:0 overruns:0 frame:0 TX packets:64561 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:65805284 (65.8 MB) TX bytes:7323146 (7.3 MB)
eth0 Link encap:Ethernet HWaddr 70:71:bc:b8:9b:ee inet6 addr: fe80::7271:bcff:feb8:9bee/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:73080 errors:0 dropped:0 overruns:0 frame:0 TX packets:64694 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:68664289 (68.6 MB) TX bytes:7334887 (7.3 MB) Interrupt:20 Memory:fbbc0000-fbbe0000
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:268 errors:0 dropped:0 overruns:0 frame:0 TX packets:268 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:19783 (19.7 KB) TX bytes:19783 (19.7 KB)
virbr0 Link encap:Ethernet HWaddr f2:34:83:32:ee:c0 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::f034:83ff:fe32:eec0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:111 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:19307 (19.3 KB)
jonsmirl@terra:~$ |
|
 Logan_APremium join:2010-12-14 Methuen, MA | are CONFIG_IPV6_ROUTER_PREF and CONFIG_IPV6_ROUTE_INFO enabled in your kernel config?
logan@RigginStereo:~$ grep CONFIG_IPV6_ROUTER_PREF /boot/config-*
/boot/config-2.6.32-5-amd64:CONFIG_IPV6_ROUTER_PREF=y
/boot/config-2.6.38-bpo.2-amd64:CONFIG_IPV6_ROUTER_PREF=y
logan@RigginStereo:~$ grep CONFIG_IPV6_ROUTE_INFO /boot/config-*
/boot/config-2.6.32-5-amd64:CONFIG_IPV6_ROUTE_INFO=y
/boot/config-2.6.38-bpo.2-amd64:CONFIG_IPV6_ROUTE_INFO=y
also net.ipv6.conf.{name of interface/all/default}.accept_ra_rt_info_max_plen needs to be set to 64 or larger in order for the kernel to accept route information options in the RA that have a 64 prefix
on most distros, it's set to 0, so the kernel will only accept RAs that make a default route. you will need to change that with the sysctl command
logan@RigginStereo:~$ sudo /sbin/sysctl net.ipv6.conf.all.accept_ra_rt_info_max_plen = 64
logan@RigginStereo:~$ /sbin/sysctl net.ipv6.conf.all.accept_ra_rt_info_max_plen
net.ipv6.conf.all.accept_ra_rt_info_max_plen = 64
if setting the accept_ra_rt_info_max_plen sysctl works, you will need to look into how your linux distribution allows you to set sysctl parameters on every boot. |
|
 jonsmirl join:2007-06-02 Wellesley Hills, MA | The kernels don't have CONFIG_IPV6_ROUTER_PREF set. Is there a work around? It took a couple of days to switch to Natty and it didn't help.
Details of what I tried on the Contiki list... »sourceforge.net/mailarchive/mess···27495156 |
|