Hi, all! Behind my ISP's modem, I have placed my OpenWrt router. I would like all devices connected to the OpenWrt router to get global IPv6 addresses so that test-ipv6.com returns 10/10 for each of them. Unfortunately, my ISP provides my modem with a 64-bit IPv6 prefix, so that no more bits are left for any subnets.
In other words, OpenWrt is unable to provide its connected devices with global IPv6 addresses (although the OpenWrt router itself does receive a global IPv6 address from the FRITZ!Box modem). On my laptop, test-ipv6.com returns 0/10, and ping6 2a03:b0c0:3:d0::1a51:c001
does not work either.
1. Network setup
The device that connects to the internet in my network is a FRITZ!Box 6660 Cable (running the official FRITZ OS) provided by my ISP. Behind it, I have put my Archer A7 router running OpenWrt.
Here's a diagram showing my network setup. (Ignore the bandwidths, they're unrelated to this issue. I was too lazy to create a new drawing.)
2. Why IPv6 prefix delegation doesn't work
By default, my ISP provides a 64-bit IPv6 prefix to the FRITZ!Box, which makes IPv6 prefix delegation (PD) impossible. That's why only the devices connected directly to the FRITZ!Box receive global IPv6 addresses, and devices connected to the Archer A7 only get local IPv6 addresses not suitable for accessing the public internet.
In the FRITZ!Box' web interface, there is a setting to request an IPv6 prefix of a custom length, which would very easily solve this problem. However, when clicking on “save”, the changes are not applied, meaning I can't actually change the IPv6 prefix length.
Another customer of my ISP also experienced this issue and was able to get through to the technical support hotline where an ISP employee fixed the issue. When I called customer support myself, however, they didn't understand the problem and referred me to the ISP's local office and the FRITZ!Box' manufacturer AVM, both of whom also didn't understand the issue and couldn't help me either.
3. Static IPv6 route: seems to work?
I read online that static routes may be an option if prefix delegation is not available. (Actually, several people claimed that, in practice, PD is the only realistic option because static routes are allegedly “too complicated”.)
3.1 FRITZ!Box
Therefore, in the FRITZ!Box' web interface, I opened “Home network” “network”
“network settings”
“IPv6 routes” and created this route:
- IPv6 network:
0000:X1:X2:X3:X4:0000:0000:0000
- prefix length: 48
- IPv6 gateway:
fe80:0000:X1:X2:X3:X4:0:0
(For privacy, I redacted parts of the IPv6 addresses with consistent placeholders, i.e. for example, X1
has the same value in both the network and in the gateway.)
Here, the gateway is the local IPv6 address of the OpenWrt router in the FRITZ!Box modem's network. ifconfig
reveals that the address is associated with the Archer A7's br-lan
, eth0
and eth0.2
interfaces.
3.2 OpenWrt
In OpenWrt's web UI, I opened “Network” “Firewall”
“WAN”
“Advanced Settings” where I disabled “IPv6 masquerading” in order to prevent OpenWrt from doing network address translation, so that the static route is actually used. (Is this explanation correct at all?)
3.3 Result
When visiting test-ipv6.com, I get a 10/10, and ping6 2a03:b0c0:3:d0::1a51:c001
(openwrt.org) also works fine on my laptop, which basically means that my setup works.
However, I am not sure whether I am following good practices and whether my solution will continue to work permanently.
3.4 Static IPv6 address?
I interpret the term “static route” and the fact that I “hard-coded” a specific IPv6 address that my setup will cease to work once the OpenWrt router gets a new IPv6 address. So far, it has not yet changed across multiple reboots of the OpenWrt router (although the FRITZ!Box was not rebooted in the meantime).
Should I configure OpenWrt to use a static IPv6 address in order to prevent breaking my setup? If so, what should I enter in “Network” “Interfaces”
“WAN6”?
Of course, I would enter the current IPv6 address. But where to look up the IPv6 gateway address?
Also, why does the popup ask me to enter an IPv4 address, IPv4 netmask and IPv4 gateway on the IPv6 interface?
3.5 Privacy implications of a static local IPv6
Does the global IPv6 address' interface identifier depend on the local IPv6 address? In other words: Will the interface identifier of the global IPv6 address also become static if OpenWrt gets a static local address?
If so, how can I circumvent this? I don't want to artificially make myself more trackable online.
4. Other approaches
I am not aware of any other ways to circumvent prefix delegation, but feel free to suggest any (if there are). Especially if you happen to know how to fix the PD issue in the FRITZ!Box' settings