IPv6 home set-up | OpenWrt 18.06.1 - how to?

In a nutshell:

Stateful DHCPv6 auto-configuration of IPv6 is the equivalent of DHCP in IPv4. A DHCPv6 service provides the IPv6 address to the client device and both client and server maintain the "state" of that address (i.e. lease time, etc). The router in its router advertisement message will tell the newly come-up host to ask for all address (global address, DNS address, SIP proxy server address) from the DHCPv6 server.

Stateless DHCPv6 is for the auto-configuration by the client device of its IPv6 address and routing based on the router advertisements. The router tells the newly come-up host to take only the extra information like DNS, SIP proxy server address from the DHCPv6 server, while the global address is given to the host by the prefix present in the router advertisement message. The router gives the prefix of 64 bits and the host uses its MAC address (48 bits) converted in EUI-64 method to obtain a global IPv6 address.

In detail, from the article What is the difference between stateful and stateless IPv6?

IPv6 address assignment options

  • Static (manual) address assignment – exactly like with IPv4.

  • Stateless Address Auto Configuration (SLAAC) – nodes listen for ICMPv6 Router Advertisements (RA) messages periodically sent out by routers on the local link, or requested by the node using an RA solicitation message. They can then create a Global unicast IPv6 address by combining its interface EUI-64 (based on the MAC address on Ethernet interfaces) plus the Link Prefix obtained via the Router Advertisement. This is a unique feature only to IPv6 which provides simple “plug & play” networking. By default, SLAAC does not provide anything to the client outside of an IPv6 address and a default gateway. SLAAC is greatly discussed in RFC 4862.

  • Stateless DHCPv6 – with this option SLAAC is still used to get the IP address, but DHCP is used to obtain “other” configuration options, usually things like DNS, NTP, etc. The advantage here is that the DHCP server is not required to store any dynamic state information about any individual clients. In case of large networks which has huge number of end points attached to it, implementing stateless DHCPv6 will highly reduce the number of DHCPv6 messages that are needed for address state refreshment.

  • Stateful DHCPv6 – functions exactly the same as IPv4 DHCP in which hosts receive both their IPv6 address and additional parameters from the DHCP server. Like DHCP for IPv4, the components of a DHCPv6 infrastructure consist of DHCPv6 clients that request configuration, DHCPv6 servers that provide configuration, and DHCPv6 relay agents that convey messages between clients and servers when clients are on subnets that do not have a DHCPv6 server. You can learn more about DHCP for IPv6 in RFC 3315.

NOTE: The only way to get a default gateway in IPv6 is via a RA message. DHCPv6 does not carry default route information at this time.

DHCP Unique Identifier

This is a unique identifier generated by the client itself that serves to uniquely identify it for the DHCPv6 server.

From Wikipedia DHCPv6:

DHCP Unique Identifier

The DHCP Unique Identifier (DUID) is used by a client to get an IP address from a DHCPv6 server. It has a 2-byte DUID type field, and a variable-length identifier field up to 128 bytes. Its actual length depends on its type. The server compares the DUID with its database and delivers configuration data (address, lease times, DNS servers, etc.) to the client. The first 16 bits of a DUID contain the DUID type, of which there are four types. The meaning of the remaining DUID depends on the type.


So, there were two separate problems:

  • WAN - IPv6 Upstream not connecting

  • LAN - Error in the configuration


For #1, i.e. WAN configuration, I tried pretty much everything that the GUI offers without success.

Since I finally came with a workaround, I will share it with you:

  1. Downgrade to the 17.x firmware. It will keep your settings, don't worry.

  2. Upgrade back to the 18.x firmware.

That's all, magically the IPv6 WAN Upstream is finally connecting.


For #2, i.e. LAN configuration, set it up as follows:

  1. Network - Interfaces - LAN - Common Configuration - General Setup tab - IPv6 assignment length must be set to the length of your prefix.

  2. Network - Interfaces - LAN - DHCP Server is based on how you topology is like, in my case the following works:

    • Router Advertisement-Service: server-mode

    • DHCPv6-Service: server-mode

    • NDP-Proxy: hybrid-mode

    • DHCPv6-Mode: stateless + stateful

I will keep this answer updated if I find further errors in the configuration.


I have now tested my Windows 10, Linux Mint 19, and Android 7.0 on http://test-ipv6.com/

and I got:

Test with IPv4 DNS record

ok (0.267s) using ipv4

Test with IPv6 DNS record

ok (0.168s) using ipv6

Test with Dual Stack DNS record

ok (0.206s) using ipv6

Test for Dual Stack DNS and large packet

ok (0.154s) using ipv6

Test IPv4 without DNS

ok (0.108s) using ipv4

Test IPv6 without DNS

ok (0.091s) using ipv6

Test IPv6 large packet

ok (0.256s) using ipv6

Test if your ISP's DNS server uses IPv6

ok (0.275s) using ipv6

Find IPv4 Service Provider

ok (0.128s) using ipv4 ASN 44489

Find IPv6 Service Provider

ok (0.107s) using ipv6 ASN 44489

which is 100% Ok. Those 2 skipped tests were caused by accessing the test site using HTTPS, which is still in beta there, so it is probably better to use plain HTTP: http://test-ipv6.com/

That's it. I now need to fiddle around firewalls and stateful + stateless IPv6, but that will not change the fact, that I've managed to make IPv6 work in my home.


I found one additional test site, which could be useful:

IPv6-only: http://v6.testmyipv6.com/

Dual-Stack: http://ds.testmyipv6.com/