Lost with IPv6 and Fritz.Box WAN Router


I am a little lost with IPv6. It is much more complicated (and new to me) than IPv4. I have a little special setup as it looks like this: WAN -> Fritz.Box -> LAN -> OpenWRT (DHCP and DNS Master)

As the Fritz.Box still acts as a firewall/router and I have not enough space at the location of my WAN entrypoint I configured it like this to use an OpenWRT AP as a central master for DNS and DHCP. Works very fine with IPv4 but I did not find any solution for IPv6. Searching this forum and Google mostly pointed out to use the WAN port to configure IPv6 but in my configuration I am using the LAN Iinterface.

So does anybody perhaps know how to configure this or have I hint for a blog? I still activated the feature in the Fritz.Box to provide a subnet.

So I like to use my Fritz.Box as a Relay only and everything else should be done within OpenWRT.

You will need to activate DHCPv6-PD on the Fritz!Box, so that your OpenWrt router can request/ be granted a (sub-)prefix for its own disposal.


That I still done but OpenWRT stays on fd5b:0de6:7da8::1 which ula_prefix is set in the network-config which is perhaps fine as it should stay on the same address. Also it does not answer to any DHCPv6 request if I am right independent of server or hybrid mode. I can see an unknown IP6 address (fe80:...) only.

PS. Perhaps it is related to the error I found in the logs produced by odhcpd: daemon.err odhcpd[1138]: Failed to send to ff02::1%lan@br-lan (Bad file descriptor)

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr ''
        option netmask ''

config globals 'globals'
        option ula_prefix 'fd5b:0de6:7da8::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1.1'
        option netmask ''
        option ip6assign '60'
        option proto 'static'
        option ipaddr ''
        option gateway ''
        list dns ''
        list dns ''
        option delegate '0'
config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option ednspacket_max '1232'
        list rebind_domain 'muc.local'
        option confdir '/tmp/dnsmasq.d'
        option local '/ham.local/'
        option domain 'ham.local'
        option localservice '0'
        list server '/muc.local/'

config dhcp 'lan'
        option interface 'lan'
        option limit '150'
        option dhcpv4 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option start '21'
        option leasetime '1d'
        option ra 'hybrid'
        option dhcpv6 'hybrid'
        option master '1'
        option ra_management '1'
        option ra_default '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

I suggest to start with a simple configuration, just enough to get IPv6 working on the AP:

  • disable DHCPv6 and RA server
  • enable IPv6 autoconfiguration in /etc/config/network:
config interface 'lan6'
        option ifname '@lan'
        option proto 'dhcpv6'
        option reqprefix 'no'

Once the AP has a public IPv6 address with internet connectivity, you can modify the configuration step-by-step towards your goal.


As mpa explained, when it comes to IPv6, you configure your OpenWrt as dump access point. Therefore, you can go for the guide from the wiki. Although, mpa mentioned already all relevant parts for you from that Wiki entry. Nothing new here (perhaps in future, therefore, I am linking it). However, the question is whether you need IPv6 connectivity of your OpenWrt at all. See this discussion for details …

If you really, really need IPv6 connectivity of your OpenWrt, because

  • OpenWrt uses a service which is IPv6-only or
  • OpenWrt offers an external service which must be reachable via IPv6),

then the OpenWrt wiki is not complete, yet: You should† also delete the ula_prefix in the globals section of ‘/etc/config/network’ because it blocks the (default advertised) DNS server of your FRITZ!Box: uci delete network.globals.ula_prefix

You could change that. In your FRITZ!Box -> Internet -> Freigaben, assign your OpenWrt what AVM calls ‘Exposed Host’. Then OpenWrt can play the firewall in IPv4. And then, you could configure your OpenWrt as cascaded IPv6 router as explained in this (external) discussion …

† It is a should and not must because OpenWrt is able to fall back to the DNS of IPv4. IPv6 is not required to query DNS-AAAA records.