I'm running Ubuntu 16.04 behind a router. I can get IPv6 on the router working, but it fails on the client. If anyone has any input on how I can resolve that, I'd appreciate it.

I can use either SLAAC (radvdump output, below) or DHCPv6 to get an IP from the ISP, resulting in an IP based on the MAC of the router's WAN interface, plus a link-local. ip -6 addr on the router shows:

inet6 2607:X:X:X:Y:yff:fey:Y/64 scope global dynamic

Then, I can set the router's LAN interface to static: 2607:X:X:X::/64 and use the routers's stateless or stateful DHCP server to get addresses for the client (first address only present when using the stateful server):

inet6 2607:X:X:X::x/128         scope global dynamic
inet6 2607:X:X:X:Y':Y':Y':Y'/64 scope global temporary dynamic 
inet6 2607:X:X:X:Z:Z:Z:Z/64     scope global mngtmpaddr noprefixroute dynamic

ip -6 route on the client (first route only present when using the stateful server and fe80::Y:yff:fey:Y is the link-local ip of the router's LAN interface)

2607:X:X:X::x dev enp0s25 proto kernel metric 256 expires 86292sec pref medium 
2607:X:X:X::/64 via fe80::Y:yff:fey:Y dev enp0s25 proto ra metric 100 pref medium
2607:X:X:X::/64 dev enp0s25 proto kernel metric 256 expires 7090sec pref medium
fe80::/64 dev enp0s25 proto kernel metric 256 pref medium
default via fe80::Y:yff:fey:Y dev enp0s25 proto static metric 100 pref medium

When the router is set to use DHCP with the ISP, I can also try to dispense with the static setting for the router's LAN interface, by using prefix delegation; but then whether I use stateful or stateless DHCP with the client, I only get a link-local address. This seems odd as the prefix/netmask are included in the ISP's router advertisement (below).

---------------------------------------------

# radvdump [run on the router]

interface ath0
{
    AdvSendAdvert on;
    # Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
    AdvManagedFlag off;
    AdvOtherConfigFlag on;
    AdvReachableTime 0;
    AdvRetransTimer 0;
    AdvCurHopLimit 64;
    AdvDefaultLifetime 1800;
    AdvHomeAgentFlag off;
    AdvDefaultPreference medium;
    AdvSourceLLAddress on;

    RDNSS 2607:X:X:X::53
    {
        AdvRDNSSPreference 0;
        AdvRDNSSOpen off;
        AdvRDNSSLifetime 1800;
    }; # End of RDNSS definition


    prefix 2607:X:Y:Y::/64
    {
        AdvValidLifetime 2592000;
        AdvPreferredLifetime 604800;
        AdvOnLink on;
        AdvAutonomous on;
        AdvRouterAddr off;
    }; # End of prefix definition

}; # End of interface definition
#
# radvd configuration generated by radvdump 1.2
# based on Router Advertisement from fe80::Z:Z:Z:Z
# received by interface ath0

/etc/network/interfaces is unchanged from the ubuntu install:

auto lo
iface lo inet loopback

I also note here the output of sysctl. This answer indicates I may need to change some of these, but others indicate that changes should be in the interfaces file and/or Network Manager, and that these don't play well with sysctl. It's the enp0s25 interface that connects to the LAN:

$ sudo sysctl -a | grep accept_ra

net.ipv6.conf.all.accept_ra = 1
net.ipv6.conf.all.accept_ra_defrtr = 1
net.ipv6.conf.all.accept_ra_from_local = 0
net.ipv6.conf.all.accept_ra_min_hop_limit = 1
net.ipv6.conf.all.accept_ra_mtu = 1
net.ipv6.conf.all.accept_ra_pinfo = 1
net.ipv6.conf.all.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.all.accept_ra_rtr_pref = 1
net.ipv6.conf.default.accept_ra = 1
net.ipv6.conf.default.accept_ra_defrtr = 1
net.ipv6.conf.default.accept_ra_from_local = 0
net.ipv6.conf.default.accept_ra_min_hop_limit = 1
net.ipv6.conf.default.accept_ra_mtu = 1
net.ipv6.conf.default.accept_ra_pinfo = 1
net.ipv6.conf.default.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.default.accept_ra_rtr_pref = 1
net.ipv6.conf.enp0s25.accept_ra = 1
net.ipv6.conf.enp0s25.accept_ra_defrtr = 0
net.ipv6.conf.enp0s25.accept_ra_from_local = 0
net.ipv6.conf.enp0s25.accept_ra_min_hop_limit = 1
net.ipv6.conf.enp0s25.accept_ra_mtu = 1
net.ipv6.conf.enp0s25.accept_ra_pinfo = 0
net.ipv6.conf.enp0s25.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.enp0s25.accept_ra_rtr_pref = 0
net.ipv6.conf.lo.accept_ra = 1
net.ipv6.conf.lo.accept_ra_defrtr = 1
net.ipv6.conf.lo.accept_ra_from_local = 0
net.ipv6.conf.lo.accept_ra_min_hop_limit = 1
net.ipv6.conf.lo.accept_ra_mtu = 1
net.ipv6.conf.lo.accept_ra_pinfo = 1
net.ipv6.conf.lo.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.lo.accept_ra_rtr_pref = 1
net.ipv6.conf.virbr0.accept_ra = 0
net.ipv6.conf.virbr0.accept_ra_defrtr = 1
net.ipv6.conf.virbr0.accept_ra_from_local = 0
net.ipv6.conf.virbr0.accept_ra_min_hop_limit = 1
net.ipv6.conf.virbr0.accept_ra_mtu = 1
net.ipv6.conf.virbr0.accept_ra_pinfo = 1
net.ipv6.conf.virbr0.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.virbr0.accept_ra_rtr_pref = 1
net.ipv6.conf.virbr0-nic.accept_ra = 1
net.ipv6.conf.virbr0-nic.accept_ra_defrtr = 1
net.ipv6.conf.virbr0-nic.accept_ra_from_local = 0
net.ipv6.conf.virbr0-nic.accept_ra_min_hop_limit = 1
net.ipv6.conf.virbr0-nic.accept_ra_mtu = 1
net.ipv6.conf.virbr0-nic.accept_ra_pinfo = 1
net.ipv6.conf.virbr0-nic.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.virbr0-nic.accept_ra_rtr_pref = 1
net.ipv6.conf.wlp3s0.accept_ra = 0
net.ipv6.conf.wlp3s0.accept_ra_defrtr = 0
net.ipv6.conf.wlp3s0.accept_ra_from_local = 0
net.ipv6.conf.wlp3s0.accept_ra_min_hop_limit = 1
net.ipv6.conf.wlp3s0.accept_ra_mtu = 1
net.ipv6.conf.wlp3s0.accept_ra_pinfo = 0
net.ipv6.conf.wlp3s0.accept_ra_rt_info_max_plen = 0
net.ipv6.conf.wlp3s0.accept_ra_rtr_pref = 0
  • Looks like you configured the same prefix on WAN and LAN sides of the router. That's incorrect. Your ISP need to route a prefix to your WAN address such that you can use that on the LAN. How to get a routed prefix depends on the ISP. Some require your router to request a prefix through DHCPv6. I have come across one that have a website where you can get a routed prefix. – kasperd Oct 29 at 13:28
  • Thanks @kasperd. It does appear there is no PD with DHCP, as far as I can make out - though I'd like to be 100% sure. I'll either have to go for a bridge - in which case I need to figure out how to assign myself non-mac based IPv6's - or run an IPv6 NAT, which I'll also have to figure out how to do. The project exhausted me though, so I'm going to get back to it in a bit.... – Diagon Oct 30 at 2:04
  • Both of those approaches are absolutely inferior. A routed prefix is the way to go. If your router requests a delegated prefix and you don't get a routed prefix that way, you need to ask your ISP how to get a routed prefix. – kasperd Oct 30 at 8:05
  • While I agree, this is an unsupported university visitor network. So I'm on my own. I'll try to find out how to do a packet capture & make sure there's no prefix advertised, but otherwise those are the choices. – Diagon Oct 30 at 8:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.