My ISP has assigned me a /56 prefix, and I had been using this for a while. Recently we had a major power outage and when things came back up my router was no longer setting up the IPv6 prefix. I added a "-v" to odhc6c and from the logs it looks like my ISP is offering the prefix...
Tue Apr 19 13:33:52 2022 daemon.notice netifd: Network device 'pppoe-wan' link is up
Tue Apr 19 13:33:52 2022 daemon.notice netifd: Interface 'wan' is now up
Tue Apr 19 13:33:53 2022 daemon.notice netifd: Network alias 'pppoe-wan' link is up
Tue Apr 19 13:33:53 2022 daemon.notice netifd: Interface 'wan_6' is enabled
Tue Apr 19 13:33:53 2022 daemon.notice netifd: Interface 'wan_6' has link connectivity
Tue Apr 19 13:33:53 2022 daemon.notice netifd: Interface 'wan_6' is setting up now
Tue Apr 19 13:33:53 2022 daemon.notice odhcp6c[6777]: (re)starting transaction on pppoe-wan
Tue Apr 19 13:33:53 2022 user.info dhcpv6.script: run with pppoe-wan started
Tue Apr 19 13:33:53 2022 daemon.notice odhcp6c[6777]: Starting SOLICIT transaction (timeout 4294967295s, max rc 0)
Tue Apr 19 13:33:53 2022 daemon.notice odhcp6c[6777]: Got a valid ADVERTISE after 5ms
Tue Apr 19 13:33:53 2022 daemon.info odhcp6c[6777]: IA_PD 0001 T1 129600 T2 207360
Tue Apr 19 13:33:53 2022 daemon.info odhcp6c[6777]: 2804:81dc:30::/56 preferred 233280 valid 259200
Tue Apr 19 13:33:54 2022 daemon.warn dnsmasq-dhcp[2764]: DHCP packet received on wan which has no address
Tue Apr 19 13:33:54 2022 daemon.notice odhcp6c[6777]: Starting SOLICIT transaction (timeout 4294967295s, max rc 0)
Tue Apr 19 13:33:54 2022 daemon.notice odhcp6c[6777]: Got a valid ADVERTISE after 5ms
Tue Apr 19 13:33:54 2022 daemon.info odhcp6c[6777]: IA_PD 0001 T1 129600 T2 207360
Tue Apr 19 13:33:54 2022 daemon.info odhcp6c[6777]: 2804:81dc:30::/56 preferred 233280 valid 259200
Tue Apr 19 13:33:55 2022 daemon.notice odhcp6c[6777]: Starting REQUEST transaction (timeout 4294967295s, max rc 10)
Tue Apr 19 13:33:55 2022 daemon.notice odhcp6c[6777]: Send REQUEST message (elapsed 0ms, rc 0)
Tue Apr 19 13:33:55 2022 daemon.notice odhcp6c[6777]: Got a valid REPLY after 6ms
Tue Apr 19 13:33:55 2022 daemon.info odhcp6c[6777]: IA_PD 0001 T1 129600 T2 207360
Tue Apr 19 13:33:55 2022 daemon.info odhcp6c[6777]: 2804:81dc:30::/56 preferred 0 valid 0
Tue Apr 19 13:33:55 2022 daemon.notice odhcp6c[6777]: (re)starting transaction on pppoe-wan
And then it repeats. 2804:81dc:30::/56 is the correct prefix. Why isn't it getting set up?
Here's what the relevant interfaces look like...
Note the 2804:81dc:0:8000:75ff:1a15:29a7:2170/64 on the pppoe-wan interface; that is also assigned by the ISP and seems to get added after the virtual 'wan_6' interface comes up.
The relevant parts of my /etc/config/network file are straight forward enough...
config globals 'globals'
option packet_steering '1'
option ula_prefix 'fd06:633c:9029::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
list ports 'lan5'
config interface 'lan'
option device 'br-lan'
option proto 'static'
list dns '172.23.0.1'
list ipaddr '172.23.0.1/16'
option ip6assign '64'
option metric '10'
config interface 'wan'
option device 'wan'
option proto 'pppoe'
option ipv6 'auto'
option password 'xxxxxxxx'
option username 'yyyyyyy'
option peerdns '0'
option ip6assign '64'
Remove ip6assign from wan interface.
Also under lan interface remove the dns 172.23.0.1, which is the router itself. Use dns forwarding to specify the local nameserver.
Thanks for the reply, but removing the ip6assign from wan if didn't solve my problem. You're right about the extraneous 'dns' entry of course, but that's unrelated. Any other ideas?
The prefix in the reply message has 0 value in preferred and valid. Therefore it cannot be used. Can you run a packet capture and verify the contents? opkg update; opkg install tcpdump; tcpdump -evni any udp port 547 & sleep 5; killall -SIGUSR1 odhcp6c; sleep 5; killall tcpdump
Are you certain you installed the tcpdump and not tcpdump-mini?
Anyway, I guess we can try with: tcpdump -i ppoe-wan -vn udp port 547 in case it doesn't like the mac headers.
So I figured out that if I do tcpdump -i br-lan ip6, then I do see a bunch of IPv6 traffic, but if I do tcpdump -i any ip6, then I don't. Nor do I see any traffic with either tcpdump -i wan ip6 or tcpdump -i pppoe-wan ip6.
After swapping out my router for another one (same model, MikroTik RB 750Gr3) with a fresh install of OpenWrt my original problem of not getting the IPv6 prefix went away. tcpdump still behaves strangely on the newly installed router, so that's a separate issue (I'll investigate further).