Linux server not receiving default IPv6 route over PPP link

dhcpipv6linuxpoint-to-point-protocolrouter

I'm replacing a pfSense router in a remote office with a small linux device, running Debian. The router only has to handle very basic iptables / DHCP and VPN facilities. It is configured so that the upstream provider is a PPPoE connection, down which a static IPv4 and IPv6 addresses (and IPv6 prefix) are provided.

I'm using a combination of radvd, wide-dhcpv6-client, wide-dhcpv6-server and ppp to configure the addressing. Pretty much everything works, except for the fact that the router doesn't receive a default IPv6 route when the ppp0 comes up. Clients can ping the router, but the router can't ping the outside world.

I've configured wide-dhcpv6-client like this (eth0 is the local LAN adapter):

profile default
{
  request domain-name-servers;
  request domain-name;

  script "/etc/wide-dhcpv6/dhcp6c-script";
};
interface ppp0 {
    send ia-pd 0;
    send rapid-commit;
};

id-assoc pd 0 {
    prefix-interface eth0 {
        sla-len 0;
        sla-id 1;
        ifid 1;
    };
};

The upstream provided DNS servers are populated correctly in resolv.conf (both IPv4 and IPv6) and the IPv6 address on eth0 is set to the correct address (2001:111:1111::1), and radvd advertises the correct prefix. However, ip -6 show route doesn't have any gateway listed:

2001:111:1111::/48 dev eth0  proto kernel  metric 256
fe80::/64 dev eth1  proto kernel  metric 256
fe80::/64 dev ppp0  proto kernel  metric 256
fe80::/64 dev eth0  proto kernel  metric 256
fe80::/10 dev ppp0  metric 1
fe80::/10 dev ppp0  proto kernel  metric 256

I've also got the following settings set:

net.ipv6.conf.ppp0.forwarding = 2
net.ipv6.conf.ppp0.accept_ra = 2

If I simply do ip -6 route add 0::/0 dev ppp0, IPv6 routing magically starts working. However, my expectation is that when the ppp0 interface comes up, the route should be autoconfigured, along with the prefix, DNS servers and everything else.

IPv6 routing works on pfSense (2.1), so I don't think it's upstream doing anything funny. Do I need to manually add this route each time ppp0 comes up, or should this automatically work?

edit I enabled debug mode on dhcp6c and this is what gets output when the interface comes up: http://pastebin.com/dUDPm2D1

Best Answer

I've got a debian Linux box doing almost the same thing (I don't use a dhcpv6 server and I'm using dibbler as the ipv6 dhcp client for the ppp interface), in my PPP config I've got:

defaultroute
replacedefaultroute
+ipv6
ipv6cp-accept-local

if you add:

debug

to the ppp config you'll get the details of the ipv6 negotiation. I suspect you're missing the defaultroute option