Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
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
add comment

2 Answers 2

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).

share|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. –  user2119381 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. –  user2119381 Oct 9 '13 at 21:23
add comment

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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