Native IPv6 via PPPoE unstable - possible configuration error?

I think I found out, what the problem is. With the help of Wireshark.

odhcpd is sending "Router Advertisements" exactly once in an hour.
However, the router lifetime is set to 1800 seconds (30 minutes) in the RA message.
That means, that half of the time, my client has no default route.

Could this be a bug in the default config?

I found a setting to increase the "Router lifetime" parameter (ra_lifetime).
But I found no option to increase the cadance of the RA messages from once an hour (default) to something like every 30 or 15 minutes. Does anyone know of this setting?
"ra_maxinterval" option doesn't do the trick.

Maybe @dedeckeh can help

The default should be 10 minutes, unless some host requests it.

ra_maxinterval

You mean "option leasetime '10m'"? That one is the default for DHCPv4. But not for RA.

I have set this parameter to 600. The only effect this has is that the RA packet contains a field "Advertisement interval : 600".
But the interval stays at 3600 seconds. I see that in Wireshark.

No, this is the lease time for dhcpv4. I am referring to ra_maxinterval which is 600s = 10 minutes by default.

I got plenty of RAs in 15 minutes' time.

root@magiatiko:[~]#tcpdump -i eth0.4 -evn 'icmp6 && ip6[40] == 134'
tcpdump: listening on eth0.4, link-type EN10MB (Ethernet), capture size 262144 bytes
17:32:16.025157 dc:a6:32:xx:xx:xx > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 270: (flowlabel 0x9fa13, hlim 255, next-header ICMPv6 (58) payload length: 216) fe80::dea6:32ff:fexx:xxxx > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 216
        hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms
          source link-address option (1), length 8 (1): dc:a6:32:xx:xx:xx
          mtu option (5), length 8 (1):  1492
          prefix info option (3), length 32 (4): 2001:yyyy:yyyy:7500::/64, Flags [onlink, auto], valid time 330742s, pref. time 270262s
          prefix info option (3), length 32 (4): fd00:bbbb::/64, Flags [onlink, auto], valid time infinity, pref. time infinity
          route info option (24), length 24 (3):  2001:yyyy:yyyy:7500::/56, pref=medium, lifetime=1800s
          route info option (24), length 24 (3):  fd00:bbbb::/48, pref=medium, lifetime=1800s
          rdnss option (25), length 40 (5):  lifetime 1800s, addr: fd00:bbbb::2 addr: fd00:bbbb::3
          dnssl option (31), length 24 (3):  lifetime 1800s, domain(s): mrv.
          advertisement interval option (7), length 8 (1):  600ms


17:38:21.293791 dc:a6:32:xx:xx:xx > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 270: (flowlabel 0x9fa13, hlim 255, next-header ICMPv6 (58) payload length: 216) fe80::dea6:32ff:fexx:xxxx > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 216
        hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms
          source link-address option (1), length 8 (1): dc:a6:32:xx:xx:xx
          mtu option (5), length 8 (1):  1492
          prefix info option (3), length 32 (4): 2001:yyyy:yyyy:7500::/64, Flags [onlink, auto], valid time 330377s, pref. time 269897s
          prefix info option (3), length 32 (4): fd00:bbbb::/64, Flags [onlink, auto], valid time infinity, pref. time infinity
          route info option (24), length 24 (3):  2001:yyyy:yyyy:7500::/56, pref=medium, lifetime=1800s
          route info option (24), length 24 (3):  fd00:bbbb::/48, pref=medium, lifetime=1800s
          rdnss option (25), length 40 (5):  lifetime 1800s, addr: fd00:bbbb::2 addr: fd00:bbbb::3
          dnssl option (31), length 24 (3):  lifetime 1800s, domain(s): mrv.
          advertisement interval option (7), length 8 (1):  600ms
17:42:07.174761 dc:a6:32:xx:xx:xx > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 270: (flowlabel 0x9fa13, hlim 255, next-header ICMPv6 (58) payload length: 216) fe80::dea6:32ff:fexx:xxxx > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 216
        hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms
          source link-address option (1), length 8 (1): dc:a6:32:xx:xx:xx
          mtu option (5), length 8 (1):  1492
          prefix info option (3), length 32 (4): 2001:yyyy:yyyy:7500::/64, Flags [onlink, auto], valid time 330151s, pref. time 269671s
          prefix info option (3), length 32 (4): fd00:bbbb::/64, Flags [onlink, auto], valid time infinity, pref. time infinity
          route info option (24), length 24 (3):  2001:yyyy:yyyy:7500::/56, pref=medium, lifetime=1800s
          route info option (24), length 24 (3):  fd00:bbbb::/48, pref=medium, lifetime=1800s
          rdnss option (25), length 40 (5):  lifetime 1800s, addr: fd00:bbbb::2 addr: fd00:bbbb::3
          dnssl option (31), length 24 (3):  lifetime 1800s, domain(s): mrv.
          advertisement interval option (7), length 8 (1):  600ms
17:43:19.161346 dc:a6:32:xx:xx:xx > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 270: (flowlabel 0x9fa13, hlim 255, next-header ICMPv6 (58) payload length: 216) fe80::dea6:32ff:fexx:xxxx > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 216
        hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms
          source link-address option (1), length 8 (1): dc:a6:32:xx:xx:xx
          mtu option (5), length 8 (1):  1492
          prefix info option (3), length 32 (4): 2001:yyyy:yyyy:7500::/64, Flags [onlink, auto], valid time 330079s, pref. time 269599s
          prefix info option (3), length 32 (4): fd00:bbbb::/64, Flags [onlink, auto], valid time infinity, pref. time infinity
          route info option (24), length 24 (3):  2001:yyyy:yyyy:7500::/56, pref=medium, lifetime=1800s
          route info option (24), length 24 (3):  fd00:bbbb::/48, pref=medium, lifetime=1800s
          rdnss option (25), length 40 (5):  lifetime 1800s, addr: fd00:bbbb::2 addr: fd00:bbbb::3
          dnssl option (31), length 24 (3):  lifetime 1800s, domain(s): mrv.
          advertisement interval option (7), length 8 (1):  600ms

Without any manipulation of the default settings for ra intervals:

root@magiatiko:[~]#uci show dhcp.lan
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.lan.ra_slaac='1'
dhcp.lan.ra_flags='managed-config' 'other-config'
dhcp.lan.ra_management='1'
dhcp.lan.leasetime='2h'
dhcp.lan.domain='mrv'
dhcp.lan.dns='fd00:bbbb::2' 'fd00:bbbb::3'
dhcp.lan.dhcp_option='42,10.0.2.1,10.0.2.3' '252,"\n"' '15,mrv' '6,10.0.2.2,10.0.2.3' '119,mrv'
dhcp.lan.force='1'

That's interesting.
you are saying, your config is the default one? You have different options that I don't have, where I have options that you don't have.
Are you using odhcp for doing the RA and DHCP stuff?
Did you maybe migrate over several OpenWRT versions over the past years?

Because mine is looking as follows:

root@verteiler:~# uci show dhcp.VLAN_Trusted
dhcp.VLAN_Trusted=dhcp
dhcp.VLAN_Trusted.interface='VLAN_Trusted'
dhcp.VLAN_Trusted.start='20'
dhcp.VLAN_Trusted.limit='100'
dhcp.VLAN_Trusted.ra='server'
dhcp.VLAN_Trusted.leasetime='10m'
dhcp.VLAN_Trusted.dhcp_option='6,92.63.212.161,93.185.134.36'
dhcp.VLAN_Trusted.dns='2a00:e98:4::4' '2a00:e98:5::5'
dhcp.VLAN_Trusted.ra_default='1'
dhcp.VLAN_Trusted.ra_lifetime='3600'
dhcp.VLAN_Trusted.ra_maxinterval='600'

My DHCP server is the default one in OpenWRT 19.07.3: dhcpd-ipv6only 2020-05-03-49e4949c-3

I didn't say my config is totally the default one. But the default is to send RAs at least every 10 minutes. There is also the ra_mininterval which by default sends RAs at most every 200s

Yes

I recently changed router, so I configured everything manually from scratch.

Prefix delegation is possible with 2a01:411:2066:2077::/64 with the restriction that sub prefix delegation to different downstream lan interfaces (lan, VLAN_Trusted, VLAN_Gast, VLAN_IoT) is not possible as the prefix length is 64. Only one of these interfaces can have the prefix by setting ip6assign to 64 in the relevant interface section