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

  • In IPv6 the default gateway is advertised with the RA. Can you show your radvd config? – Sander Steffann Oct 4 '13 at 21:32
  • The radvd config on the router is for advertising clients looking to get addresses from it, surely? I don't control the upstream device, so don't have any configuration from them. – growse Oct 6 '13 at 18:55
  • Ah, ok. The upstream should be sending you RA's that advertise the upstream as a default route. With IPv6 PPP and DHCPv6 don't influence routing, only the RA does. Maybe you can do a tcpdump of the ppp interface when it comes up to see if they are sending RA's as they should? – Sander Steffann Oct 6 '13 at 22:45

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:


if you add:


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

| improve this answer | |
  • I'll try looking at debug. The ppp config file does have both defaultroute and replacedefaultroute, and I've got +ipv6 set in the general options. – growse Oct 6 '13 at 20:12

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

To ensure that kernel config params are really set everytime the ppp device comes up try to use a udev rule:

KERNEL=="ppp0", SUBSYSTEM=="net", ACTION=="add", RUN+="/bin/bash -c 'echo 2 >/proc/sys/net/ipv6/conf/ppp0/accept_ra; echo 2 >/proc/sys/net/ipv6/conf/ppp0/forwarding;'"

Place it somewhere in /etc/udev/rules.d/ and reestablish the ppp connection. In some cases my configured accept_ra value has been reset to the default value (if they differ) once the ppp device vanished on disconnect. When it reconnects again i was missing my default route too because of the wrong value set in accept_ra.

| improve this answer | |

Could you capture interface ppp trace with tcpdump during ppp negotiation so you can see if ipv6 adress is being provided by RAS? I work developing sw for routers running embedded linux and the easiest way for diagnostise ppp negotiation problems is capture the pppoe packets during this phase (PADI, PADO, PADR, PADS, PADT).

| improve this answer | |
  • Can you share any tips on how to do this? Would something like tcpdump -i any -nnvvXSs 1514 -w pppup.pcap give the detail needed? – growse Oct 6 '13 at 18:56
  • Yes, something like tcpdump -i ppp0 -w pppup.cap then open pcap file with wireshark. – MABC Oct 8 '13 at 22:18
  • ppp0 won't exist before ppp starts connecting so you can't use it with tcpdump, you need to use the debug option to ppp. – JasperWallace Oct 9 '13 at 1:34
  • Try ifconfig -a to see if ppp0 exist. If so use ifconfig ppp0 up to make ppp0 exist before tcpdump was launched. – MABC Oct 9 '13 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.