1

I've got an Ubuntu 14.04 box that acts as my home router. I've got an IPv6 /64 delegated by my ISP, and I'm using RA and the WIDE DHCPv6 client to configure IPv6. Everything works well, except no default route gets set. If I use radvdump to see the RA packages on my WAN interface and use that to set the default route manually, everything works perfectly.

I could (and currently, I do) just put this manual route specification as an up command in /etc/network/interfaces for the WAN interface, but this isn't ideal - it seems like every time my ISP does maintenance, the address of the router changes and I have to reconfigure it again. I'd like to get the route from the RA, but I just can't seem to get that set. Am I missing something?

eth1 is my WAN interface, and eth0 is the LAN.

sysctl settings

root@nix $ grep ipv6 /etc/sysctl.conf
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.eth1.accept_ra=2         # The WAN interface
net.ipv6.conf.eth1.accept_ra_defrtr=1
net.ipv6.conf.eth0.accept_ra=0         # The LAN interface
net.ipv6.conf.all.accept_redirects = 0

WIDE config

interface eth1 # WAN
{
  send ia-na 1;
  send ia-pd 1;
  request domain-name-servers;
  request domain-name;

  script "/etc/wide-dhcpv6/dhcp6c-script"; # does resolvconf work
};

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

id-assoc na 1 {
};

radvd config

interface eth0
{
        AdvManangedFlag off;
        AdvOtherConfigFlag off;
        AdvSendAdvert on;
        AdvLinkMTU 1280;
        prefix ::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
        };
};

/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The LAN interface
auto eth0
iface eth0 inet static
        address 172.20.0.1
        netmask 255.255.255.0

# The WAN interface
auto eth1
iface eth1 inet dhcp
iface eth1 inet6 auto
        # My current workaround:
        up ip -6 route add default via fe80::21b:edff:feb2:d481 dev eth1

Any help would be appreciated!

3
  • 1
    Apparently, kernel version prior to 2.6.37 silently ignore net.ipv6.conf.eth1.accept_ra=2. Apparently, the workaround is to disable forwarding on the WAN interface.
    – Ron Maupin
    May 8, 2016 at 17:44
  • Hmm. I'm on 3.13.0. Disabling forwarding on the WAN interface just stops replies from getting back to internal LAN machines, it seems.
    – justinian
    May 8, 2016 at 18:26
  • Well, it has been my experience that much of the Linux IPv6 support is flawed. It doesn't really seem to be a Linux priority. I don't actually see a problem of setting the default to the WAN link-local address. Often, we set it to the interface, rather than an address, on real routers, and that seems to be about the same thing. You should get more than a single /64 from your ISP. You may actually be getting a delegated /56. At least ask for that. ISPs are not supposed to only give you a single IPv6 subnet.
    – Ron Maupin
    May 8, 2016 at 18:35

1 Answer 1

5

Linux turns off accept_ra when forwarding is enabled. To force it on on your upstream interface (let's say eth0) you can use net.ipv6.conf.eth0.accept_ra = 2. This forces the interface to accept router advertisements even when forwarding is enabled.

1
  • Sadly, eth1, my upstream interface, already has accept_ra set to 2. I discovered the forwarding/accept_ra issue when researching via google, which sounded like a perfect fit for my problem, but alas...
    – justinian
    May 8, 2016 at 16:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .