IPV6 forwards FritzBox (DS-LITE) <-> OpenWrt <-> LAN machine

Hi everyone,

I am using OpenWRT for a while now, and have never managed to solve the following problem:

  • I have an ISP that uses DS-Lite, meaning that I get a public ipv6 address and a /56 prefix on my DSL-modem
  • My DSL-modem is a FritzBox 7560, which broadcasts a (guest) WLAN and has a single LAN connection to the WAN interface of my OpenWRT router.
  • I have configured the OpenWRT router as an exposed host on the FritzBox and have the DHCP6 server configured on the FritzBox to assign IP addresses and a prefix. The DHCP6 configuration for the LAN interface is set to relay, whereas it is DHCP client for WAN6.
  • With this configuration, LAN interface get public global ipv6 addresses, which the FritzBox knows as well (2001:xxxxxx)

Allowing dropbear for WAN access on a custom port <sshport> and configuring the Firewall Traffic Rule as

	option name 'WAN-SSH-ipv6'
	option family 'ipv6'
	list proto 'tcp'
	option src 'wan'
	option target 'ACCEPT'
	option dest_port '2323'

gives me WAN access to by OpenWRT Router, which I test by trying to access it via the guest-WLAN configuration on my FB.
In short:
ssh -p <sshport> root@<router-public-ipv6-address>
does work.

Ultimately, I want to allows access to virtual machines on my FreeNAS device, which lives in LAN.

To make this access public, I will probably have to use dyndns and a port mapper.

However, for troubleshooting issues at the moment I am just trying to exposing an apache webserver running on my desktop at ipv6 2001:ab:cd:ef:12:34:55:67 on port <webport>
to the internet.

From within LAN, everything works well. I can access the webserver via ipv6, and the URL http://[2001:ab:cd:ef:12:34:55:67]:<webport> in Firefox displays the webserver.

So I tried to setup a traffic rule to make this available also via WAN.
I used the adapted example from https://openwrt.org/docs/guide-user/firewall/fw3_configurations/fw3_ipv6_examples to setup the corresponding rule:

config rule
	option src 'wan'
	option proto 'tcp'
	option dest 'lan'
	option family 'ipv6'
	option target 'ACCEPT'
	list dest_ip '2001:ab:cd:ef:12:34:55:67'
	option dest_port '<webport>'

Now I can finally access the webserver from WAN.

The next step would be now to make this rule somehow, so that it persists when

  • the ISP changes the IPv6 prefix 2001:ab:cd:ef to something else
  • The local suffix of the IP changes to something else (e.g. when router or computer is restarted)

The first bullet point seems to be solved by adapting my config to

config rule
	list dest_ip '::12:34:55:67/-64'

meaning that I mask the prefix.
So this all works.

The question is now, how can I make this rule also independent of the suffix, i.e. by setting a static suffix.

According to https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#static_leases , I setup an IPv6 suffix '111' in my dhcp.

config host                                
        option name 'desktop'                                 
        option dns '1'                               
        option mac 'XX:XX:XX:XX:XX:XX' 
        option ip '192.168.1.111'                         
        option duid '<some-duid-that-was-selected-by-LUCI>'
        option hostid '111'

I am not really sure how to find the DUID of my desktop (arch linux, using networkmanager), but LUCI selected this DUID for me.

(You see, here I am starting to get confused)

I then hoped that using the adapted rule

config rule
	list dest_ip '::111/-64'

would work, but it doesn't.

The problem seems to be that my desktop does not get assigned any form of "static" ipv6.

This might be a problem with the "relay" DHCPv6 configuration for the LAN interface on OpenWRT.
So I might need to generally reconfigure the IPv6 settings in the FritzBox and OpenWRT, and I have no problems to do so.
However, the current permutation of configurations for IPv6 DHCP in OpenWRT and the FritzBox was the only one where IPv6 would work in general (i.e. that e.g. http://test-ipv6.com/ completed all tests successfully).

Can anyone help me with my configuration?

Since you are relaying, the config host you have in dhcp config has no effect for ipv6. You should be configuring that in Fritz, since this is where the actual dhcp6 server is running.

Ok, I think understand.

Assigning some of the routing in the FritzBox and some on the OpenWRT seems not to be the best idea. I was using the "relay" configuration only in order to have ipv6 working at all.

I think instead of trying to configure the FritzBox, I would like to have all the ipv6 routing done on the OpenWRT server.
Maybe you or someone could help me with that.

So I think I have two options:

  1. Somehow use the FritzBox purely as a modem and enable PPPoE passthrough and then try to directly connecting to my ISP from the OpenWRT like this [in German]
  2. Deactivating all the IPv6 DHCP routing on the Fritzbox and having the OpenWRT do all that, not using the relay option.

So I tried to do the second one first after backing up my working OpenWRT configuration. (where working in the sense that the test on test-ipv6.com suceed).
I did not manage, restored the old conf, and for some reason that doesn't work anymore.)

So I am back at square zero.

So the ultimate question is how to set up the ipv6 routing in general with my setup and am looking for help.

My Options in the Fritzbox are the following when with DHCPv6:

Or those without DHCPv6:

I further can setup my router (the only device connected to the Fritzbox, when I don't have it wireless active to test LAN connections) as en exposed host:


(the suffix displayed here is derived from its MAC address)

At the moment, with the selected DHCPv6 option (DNS Server + IPv6-Prefix (IA_PD)) the interface page on my OpenWRT looks like this:

The WAN6 device has an ipv6 address corresponding to ISP-Prefix (64bit + the suffix derived from the MAC of my router). The delegated prefix has the same first 60 bits.

The LAN device has this weird (link-local) IP.

So my question are:

  • How should I setup Fritzbox and OpenWRT such that the devices in my LAN have public accessible, unique IPv6 addresses generated as (prefix by ISP + Some local identifier), such that they are externally accessible?
  • How should the ipv6 address space in LAN and WAN6 look like?

I am really open for any working solution, that allows me to specify all the routing/addresses etc on the OpenWRT device, even if that means that I have to completely reset all configurations. I have tried this on-and-off for over two years now (to the point that I changed my ISP to one that gives me a public ipv4, but this is only happening in a couple of months...).

Thanks for any help!

My german is a bit rusty, so I don't quite understand all the options in the Fritz.

It's ULA, not Link Local, but you have Link Local too, starting from fe80.

Right now it looks fine, you have a prefix delegated on wan6. Post once again the uci export network; uci export dhcp; ifstatus wan6

I suggest the following configuration (untested).

On the Fritzbox:

  • Enable "DNS-Server und IPv6-Präfix (IA_PD) zuweisen"
  • Optionally, add a static DHCP host entry for the OpenWrt router
  • Add a firewall rule to allow traffic to the OpenWrt router. Be sure to to also allow IPv6 traffic to the OpenWrt LAN using the option "Firewall für delegierte IPv6-Präfixe dieses Gerätes öffnen."

On OpenWrt:
Start with the default configuration, add the DHCP host entry for your webserver.
Be sure to keep the following (do not change this to relay):

config dhcp 'lan'        
        ...
        option dhcpv6 'server'

This allows you to manage the DHCP host entries on OpenWrt, rather than the Fritzbox.
Add the IPv6 firewall rule as you did before.

For the LAN interface, there should be a public IPv6 address (2001:...) with a prefix of /64 or shorter.
This is missing in your screenshot and needs to be fixed to make DHCPv6 server mode work.
Is the ip6assign option set at all?

When you try these suggestions, and find something is still not working, please post again your configuration. On OpenWrt, this would be /etc/config/network and /etc/config/dhcp at least.

Hello and thank you very much for the quick answers, @trendy and @mpa
Especially for not minding the german screenshots - FB has no english UI unfortunately.

So I tried @mpa 's suggestions

  • I set the DHCPv6 Options as recommended.
  • I am confused as how to set-up a static ip in ipv6 (see screenshot below), however I set a static ipv4 route.


( Not quite sure what to put here )

  • I designated the OpenWRT router as an exposed host and opened the Firewall for delegated prefixes.

I started from the default config, and my /etc/config/dhcp looks like this:

config dnsmasq                                       
        option domainneeded '1'                                
        option boguspriv '1'                                   
        option filterwin2k '0'                            
        option localise_queries '1'                       
        option rebind_protection '1'                 
        option rebind_localhost '1'                            
        option local '/lan/'                                   
        option domain 'lan'                               
        option expandhosts '1'                            
        option nonegcache '0'                        
        option authoritative '1'                               
        option readethers '1'                                  
        option leasefile '/tmp/dhcp.leases'               
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'                       
        option localservice '1'       
        option confdir '/tmp/dnsmasq.d'
                                                          
config dhcp 'lan'                                         
        option interface 'lan'                       
        option start '100'            
        option limit '150'            
        option leasetime '12h'                            
        option dhcpv6 'server'                            
        option ra 'server'                           
        option ra_slaac '1'           
        list ra_flags 'managed-config'
        list ra_flags 'other-config'                      
                                                          
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'          

The rest of the config is just some static (ipv4) routes.

My full /etc/config/network:

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

config globals 'globals'
        option ula_prefix 'fdd0:ca0e:f3b0::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option force_link '0'

config interface 'wan'
        option ifname 'eth1.2'
        option delegate '0'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth1.2'
        option proto 'dhcpv6'
        option delegate '0'
        option reqaddress 'try'
        option reqprefix '60'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'

Unfortunately, it still does not work.
The tests on test-ipv6.com fail and the network overview page looks likes this:


So still no public ipv6 or prefix on LAN...

Any ideas?

ifup wan6; sleep 10; ifstatus wan6; logread -e odhcpd

thank you @trendy for the suggestion.
Seems that this was on point.

Here are the output of ifstatus and the logs of the ohcpd, as per you command.
(I just masked part of my public ipv6 for privacy reasons.)

{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 6,
	"l3_device": "eth1.2",
	"proto": "dhcpv6",
	"device": "eth1.2",
	"updated": [
		"addresses",
		"routes",
		"prefixes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": false,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "2001:xxxx:xxxx:fe00:58ef:68ff:feb7:6acc",
			"mask": 64,
			"preferred": 3591,
			"valid": 7191
		}
	],
	"ipv6-prefix": [
		{
			"address": "2001:xxxx:xxxx:fef0::",
			"mask": 60,
			"preferred": 3594,
			"valid": 7194,
			"class": "wan6",
			"assigned": {
				
			}
		}
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "2001:xxxx:xxxx:fe00::",
			"mask": 64,
			"nexthop": "::",
			"metric": 256,
			"valid": 7191,
			"source": "::/0"
		},
		{
			"target": "2001:xxxx:xxxx:fe00::",
			"mask": 64,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1791,
			"source": "::/0"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1791,
			"source": "2001:xxxx:xxxx:fef0::/60"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1791,
			"source": "2001:xxxx:xxxx:fe00:58ef:68ff:feb7:6acc/64"
		}
	],
	"dns-server": [
		"fd00::eadf:70ff:feea:d468"
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"passthru": "0038001400010010fd00000000000000eadf70fffeead46800170010fd00000000000000eadf70fffeead46800560010200116b82dbdfe00eadf70fffeead468"
	}
}
Mon Jan  4 15:01:36 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:01:52 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:02:08 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:09:03 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:12:28 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:19:18 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:23:28 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:27:06 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 0 addresses
Mon Jan  4 15:27:07 2021 daemon.err odhcpd[2188]: setsockopt(IPV6_ADD_MEMBERSHIP): No such device
Mon Jan  4 15:27:07 2021 daemon.err odhcpd[2188]: setsockopt(SO_BINDTODEVICE): No such device
Mon Jan  4 15:27:07 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 2 addresses
Mon Jan  4 15:27:08 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:27:08 2021 daemon.err odhcpd[2188]: Failed to send to ff02::1%lan@br-lan (Address not available)
Mon Jan  4 15:27:09 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 2 addresses
Mon Jan  4 15:27:24 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:27:40 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:27:56 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:36:25 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:36:32 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 15:39:14 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:41:35 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:51:18 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:00:20 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:04:11 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:10:52 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:16:01 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:19:56 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:27:36 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:35:34 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:39:19 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:48:30 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:54:08 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:58:28 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:07:36 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:12:04 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:18:23 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:23:40 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:28:04 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:35:22 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:39:19 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:45:38 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:53:29 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:58:35 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:02:20 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!

I think I see what the problem is: something goes wrong with pd delegation, but I have no idea how to fix it.

Try this:

uci set network.lan.ip6assign='62'
uci commit network
ifup lan

Still the same.
Interface in LUCI shows that now I have a /62 prefix on LAN.
ifstatus and odhcpd still show the same:

ifup wan6; sleep 10; ifstatus wan6; logread -e odhcpd
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 7,
	"l3_device": "eth1.2",
	"proto": "dhcpv6",
	"device": "eth1.2",
	"updated": [
		"addresses",
		"routes",
		"prefixes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": false,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "2001:xxxx:xxxx:fe00:58ef:68ff:feb7:6acc",
			"mask": 64,
			"preferred": 3590,
			"valid": 7190
		}
	],
	"ipv6-prefix": [
		{
			"address": "2001:xxxx:xxxx:fef0::",
			"mask": 60,
			"preferred": 3593,
			"valid": 7193,
			"class": "wan6",
			"assigned": {
				
			}
		}
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "2001:xxxx:xxxx:fe00::",
			"mask": 64,
			"nexthop": "::",
			"metric": 256,
			"valid": 7190,
			"source": "::/0"
		},
		{
			"target": "2001:xxxx:xxxx:fe00::",
			"mask": 64,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1790,
			"source": "::/0"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1790,
			"source": "2001:xxxx:xxxx:fef0::/60"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1790,
			"source": "2001:xxxx:xxxx:fe00:58ef:68ff:feb7:6acc/64"
		}
	],
	"dns-server": [
		"fd00::eadf:70ff:feea:d468"
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"passthru": "0038001400010010fd00000000000000eadf70fffeead46800170010fd00000000000000eadf70fffeead46800560010200116b82dbdfe00eadf70fffeead468"
	}
}
Mon Jan  4 15:27:24 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:27:40 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:27:56 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:36:25 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:36:32 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 15:39:14 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:41:35 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 15:51:18 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:00:20 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:04:11 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:10:52 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:16:01 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:19:56 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:27:36 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:35:34 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:39:19 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:48:30 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:54:08 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 16:58:28 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:07:36 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:12:04 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:18:23 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:23:40 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:28:04 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:35:22 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:39:19 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:45:38 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:53:29 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 17:58:35 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:02:20 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:09:28 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:14:00 2021 daemon.err odhcpd[2188]: setsockopt(IPV6_ADD_MEMBERSHIP): No such device
Mon Jan  4 18:14:00 2021 daemon.err odhcpd[2188]: setsockopt(SO_BINDTODEVICE): No such device
Mon Jan  4 18:14:00 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:14:00 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:14:01 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:14:01 2021 daemon.err odhcpd[2188]: Failed to send to ff02::1%lan@br-lan (Address not available)
Mon Jan  4 18:14:02 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:14:17 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:14:33 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:14:49 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:16:04 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!

Remove this from wan6 interface...
And restore the ip6assign 60 on the lan.

I just did, but nothings seems to have changed (other than having a /60 prefix on LAN again).

uci show network.wan6; uci show network.lan; ifup wan6; ifup lan; sleep 10; ifstatus wan6; logread -e odhcpd

uci show network.wan6; uci show network.lan; ifup wan6; ifup lan; sleep 10; ifstatus wan6; logread -e odhcpd
network.wan6=interface
network.wan6.ifname='eth1.2'
network.wan6.proto='dhcpv6'
network.wan6.delegate='0'
network.wan6.reqaddress='try'
network.wan6.reqprefix='60'
network.lan=interface
network.lan.type='bridge'
network.lan.ifname='eth0.1'
network.lan.proto='static'
network.lan.ipaddr='192.168.1.1'
network.lan.netmask='255.255.255.0'
network.lan.force_link='0'
network.lan.ip6assign='60'
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 5,
	"l3_device": "eth1.2",
	"proto": "dhcpv6",
	"device": "eth1.2",
	"updated": [
		"addresses",
		"routes",
		"prefixes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": false,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "2001:x:x:fe00:58ef:68ff:feb7:6acc",
			"mask": 64,
			"preferred": 3592,
			"valid": 7192
		}
	],
	"ipv6-prefix": [
		{
			"address": "2001:x:x:fef0::",
			"mask": 60,
			"preferred": 3595,
			"valid": 7195,
			"class": "wan6",
			"assigned": {
				
			}
		}
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "2001:x:x:fe00::",
			"mask": 64,
			"nexthop": "::",
			"metric": 256,
			"valid": 7192,
			"source": "::/0"
		},
		{
			"target": "2001:x:x:fe00::",
			"mask": 64,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1792,
			"source": "::/0"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1792,
			"source": "2001:x:x:fef0::/60"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1792,
			"source": "2001:x:x:fe00:58ef:68ff:feb7:6acc/64"
		}
	],
	"dns-server": [
		"fd00::eadf:70ff:feea:d468"
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"passthru": "0038001400010010fd00000000000000eadf70fffeead46800170010fd00000000000000eadf70fffeead46800560010200116b82dbdfe00eadf70fffeead468"
	}
}
Mon Jan  4 18:22:54 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 0 addresses
Mon Jan  4 18:22:54 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 0 addresses
Mon Jan  4 18:22:55 2021 daemon.err odhcpd[2188]: setsockopt(IPV6_ADD_MEMBERSHIP): No such device
Mon Jan  4 18:22:55 2021 daemon.err odhcpd[2188]: setsockopt(SO_BINDTODEVICE): No such device
Mon Jan  4 18:22:55 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:22:56 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:22:56 2021 daemon.err odhcpd[2188]: Failed to send to ff02::1%lan@br-lan (Address not available)
Mon Jan  4 18:22:57 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:23:12 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:23:24 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:23:29 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 0 addresses
Mon Jan  4 18:23:29 2021 daemon.err odhcpd[2188]: setsockopt(IPV6_ADD_MEMBERSHIP): No such device
Mon Jan  4 18:23:29 2021 daemon.err odhcpd[2188]: setsockopt(SO_BINDTODEVICE): No such device
Mon Jan  4 18:23:29 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:23:30 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:23:30 2021 daemon.err odhcpd[2188]: Failed to send to ff02::1%lan@br-lan (Address not available)
Mon Jan  4 18:23:31 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:23:46 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:23:53 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:29:24 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!
Mon Jan  4 18:30:31 2021 daemon.err odhcpd[2188]: setsockopt(IPV6_ADD_MEMBERSHIP): No such device
Mon Jan  4 18:30:31 2021 daemon.err odhcpd[2188]: setsockopt(SO_BINDTODEVICE): No such device
Mon Jan  4 18:30:31 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:30:31 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:30:32 2021 daemon.err odhcpd[2188]: Failed to send to ff02::1%lan@br-lan (Address not available)
Mon Jan  4 18:30:33 2021 daemon.info dnsmasq[5601]: read /tmp/hosts/odhcpd - 3 addresses
Mon Jan  4 18:30:37 2021 daemon.warn odhcpd[2188]: A default route is present but there is no public prefix on lan thus we don't announce a default route!

Seems that the option
network.wan6.delegate='0'
remains when I delete that in the WAN section.
Do I need an separate entry in "/etc/config/network" for WAN6?
If so, should I set any other options?

uci del network.wan6.delegate; uci commit network; ifup wan6; sleep 10; ifstatus wan6

uci set network.wan6.delegate='1'; uci commit network; ifup wan6; sleep 10; ifstatus wan6
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 6,
	"l3_device": "eth1.2",
	"proto": "dhcpv6",
	"device": "eth1.2",
	"updated": [
		"addresses",
		"routes",
		"prefixes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "2001:x:x:fe00:58ef:68ff:feb7:6acc",
			"mask": 64,
			"preferred": 3590,
			"valid": 7190
		}
	],
	"ipv6-prefix": [
		{
			"address": "2001:x:x:fef0::",
			"mask": 60,
			"preferred": 3594,
			"valid": 7194,
			"class": "wan6",
			"assigned": {
				"lan": {
					"address": "2001:x:x:fef0::",
					"mask": 60
				}
			}
		}
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "2001:x:x:fe00::",
			"mask": 64,
			"nexthop": "::",
			"metric": 256,
			"valid": 7190,
			"source": "::/0"
		},
		{
			"target": "2001:x:x:fe00::",
			"mask": 64,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1790,
			"source": "::/0"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1790,
			"source": "2001:x:x:fef0::/60"
		},
		{
			"target": "::",
			"mask": 0,
			"nexthop": "fe80::eadf:70ff:feea:d468",
			"metric": 512,
			"valid": 1790,
			"source": "2001:x:x:fe00:58ef:68ff:feb7:6acc/64"
		}
	],
	"dns-server": [
		"fd00::eadf:70ff:feea:d468"
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		"passthru": "0038001400010010fd00000000000000eadf70fffeead46800170010fd00000000000000eadf70fffeead46800560010200116b82dbdfe00eadf70fffeead468"
	}
}

That seems to have done the job:

I have no on LAN a prefix, and my desktop gets assigned a public ipv6.

However, all the tests still fail:

ping ipv6.google.com resolves the address but times out...

Check with tcpdump what is going on:
opkg update; opkg install tcpdump; tcpdump -i any -evn icmp6
then start a ping from a lan host.

I had already tcpdump-mini package installed, so I used that.
On my LAN host I then did ping ipv6.google.com

ping ipv6.google.com                               
PING ipv6.google.com(fra15s24-in-x0e.1e100.net (2a00:1450:4001:820::200e)) 56 data bytes
^C
--- ipv6.google.com ping statistics ---
26 packets transmitted, 0 received, 100% packet loss, time 25581ms

And here are the last lines of the tcpdump output:

19:57:30.954322  In 70:85:c2:43:6d:9e ethertype 802.1Q (0x8100), length 124: vlan 1, p 0, ethertype IPv6, (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 22
19:57:30.954322  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 22
19:57:30.954322  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 22
19:57:30.954368 Out 5a:ef:68:b7:6a:cc ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 254, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 22
19:57:31.978276  In 70:85:c2:43:6d:9e ethertype 802.1Q (0x8100), length 92: vlan 1, p 0, ethertype IPv6, (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::7cb8:c30d:7eb0:f72b > fdd0:ca0e:f3b0::1: [icmp6 sum ok] ICMP6, neighbor solicitation, length 32, who has fdd0:ca0e:f3b0::1
	  source link-address option (1), length 8 (1): 70:85:c2:43:6d:9e
19:57:31.978276  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 88: (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::7cb8:c30d:7eb0:f72b > fdd0:ca0e:f3b0::1: [icmp6 sum ok] ICMP6, neighbor solicitation, length 32, who has fdd0:ca0e:f3b0::1
	  source link-address option (1), length 8 (1): 70:85:c2:43:6d:9e
19:57:31.978276  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 88: (hlim 255, next-header ICMPv6 (58) payload length: 32) fe80::7cb8:c30d:7eb0:f72b > fdd0:ca0e:f3b0::1: [icmp6 sum ok] ICMP6, neighbor solicitation, length 32, who has fdd0:ca0e:f3b0::1
	  source link-address option (1), length 8 (1): 70:85:c2:43:6d:9e
19:57:31.978343 Out 58:ef:68:b7:6a:cc ethertype IPv6 (0x86dd), length 80: (hlim 255, next-header ICMPv6 (58) payload length: 24) fdd0:ca0e:f3b0::1 > fe80::7cb8:c30d:7eb0:f72b: [icmp6 sum ok] ICMP6, neighbor advertisement, length 24, tgt is fdd0:ca0e:f3b0::1, Flags [router, solicited]
19:57:31.978348 Out 58:ef:68:b7:6a:cc ethertype IPv6 (0x86dd), length 80: (hlim 255, next-header ICMPv6 (58) payload length: 24) fdd0:ca0e:f3b0::1 > fe80::7cb8:c30d:7eb0:f72b: [icmp6 sum ok] ICMP6, neighbor advertisement, length 24, tgt is fdd0:ca0e:f3b0::1, Flags [router, solicited]
19:57:31.978357  In 70:85:c2:43:6d:9e ethertype 802.1Q (0x8100), length 124: vlan 1, p 0, ethertype IPv6, (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 23
19:57:31.978357  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 23
19:57:31.978357  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 23
19:57:33.002286  In 70:85:c2:43:6d:9e ethertype 802.1Q (0x8100), length 124: vlan 1, p 0, ethertype IPv6, (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 24
19:57:33.002286  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 24
19:57:33.002286  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 24
19:57:33.002334 Out 5a:ef:68:b7:6a:cc ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 254, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 24
19:57:34.026296  In 70:85:c2:43:6d:9e ethertype 802.1Q (0x8100), length 124: vlan 1, p 0, ethertype IPv6, (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 25
19:57:34.026296  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 25
19:57:34.026296  In 70:85:c2:43:6d:9e ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 255, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 25
19:57:34.026343 Out 5a:ef:68:b7:6a:cc ethertype IPv6 (0x86dd), length 120: (flowlabel 0x5c3bf, hlim 254, next-header ICMPv6 (58) payload length: 64) 2001:x:x:fef0:c6d0:c48a:9ac5:92c2 > 2a00:1450:4001:820::200e: [icmp6 sum ok] ICMP6, echo request, seq 25
^C
124 packets captured
132 packets received by filter
1 packet dropped by kernel

Thank you so much for your help, this is way over my head :slight_smile:
Once we figure out what went wrong, if you are still motivated, you might help me understand what I am doing.
As I understand it, we are now trying to find out where or how far packets are going.

Seems quite alright to me. OpenWrt got the packet from the lan host on the lan interface (1st line) and sent it to the wan interface (2nd line). This pattern keeps repeating, but no reply back from google. You'll have to check somehow on the Fritz what happens to the packets.

How to capture packets on the Fritzbox:
http://service.avm.de/help/de/FRITZ-Box-7560/015/hilfe_support

section "Paketmitschnitt erstellen"

2 Likes