On IPv6 linux router, autoconf and accept router advertisements for single interface

Apparently right now if you have /proc/sys/net/ipv6/conf/all/forwarding set to a value of 1 that completely disables the auto configuration of Interfaces and routes, but I have a system with one interface that I want to dynamically configure the address.

I have a Linux box with multiple interfaces acting as a router with multiple wan connections. On the IPv4 side I am using multiple route tables and ip rules to direct traffic to separate uplinks.

My primary wan connection has static IPv6 address that are permanently assigned to my connection. The backup connection is basically a cheap broadband connection, and I have no static addresses IPv6, or IPv4. I can see via radvdump that my provider of my cheap broadband backup link that they are now sending out IPv6 router advertisements. on that link. Since my box is a router and has forwarding enabled, how do I dynamically configured the address on this link? Is there any way to have my system accept router advertisements configure its address, and then add the route with a metric higher than my routes from my primary connection?

dual wan diagram

My firewall is also running squid, and the vast bulk of my communication goes through the proxy. So in the case of a failure of the primary link I am not going to have to do any weird IPv6 NAT or anything to get my internal hosts to work with the dynamic network assigned on my broadband interface. The bulk of the communication will be nicely handled by the application level proxy.

So how do I get that interface on my Linux system connected to broadband network configured for IPv6? In the slight chance it matters, the Linux box is running Debian wheezy, with the 3.14-0.bpo.2-amd64 kernel.


Solution 1:

As I understand the problem, radvd just controls the internal link. Leave forwarding on for all links. For the low end broadband interface make sure that the following settings are configured:

echo 2 > /proc/sys/net/ipv6/conf/<nic>/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/<nic>/accept_ra_pinfo
echo 1 > /proc/sys/net/ipv6/conf/<nic>/autoconf

See also ip-sysctl.txt