Ipv6 relay, no routes for client device

My router system is OpenWrt R21.8.6 / LuCI Master (git-22.320.45106-7c2d8f9).
The router uses a 5G mobile modem to connect to WAN, and it seems ISP won't give ipv6 prefix. So I set up ipv6 relay as follows for /etc/config/dhcp:

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option ra 'relay'
        option dhcpv6 'relay'
        option ndp 'relay'

config dhcp 'wwan_5g_v6'
    option dhcpv6 'relay'
    option ra 'relay'
    option ndp 'relay'
    option master '1'
    option interface 'wwan_5g_v6'

Client devices could receive ipv6 addresses, but couldn't get proper routing. One linux client even couldn't successfully ping to another local client via ipv6.
The ipv6 routing rules for this client is like

โžœ  ~ ip -6 route show
240e:471:e20:2d4c::/64 dev wlp1s0 proto ra metric 600 pref medium
fe80::/64 dev docker0 proto kernel metric 256 pref medium
fe80::/64 dev veth385a46e proto kernel metric 256 pref medium
fe80::/64 dev enp4s0f3u1u1 proto kernel metric 1024 pref medium
fe80::/64 dev wlp1s0 proto kernel metric 1024 pref medium
default via fe80::98ba:ceff:fe43:cccf dev wlp1s0 proto ra metric 600 pref medium

On another windows client, ping works fine, but couldn't transfer data stably. It only transfers a little amount of data at the begining of each connection and then the connection breaks.

I learn from another thread (How Can I use openwrt to relay the IPv6? - #2 by tsukimori) that "Learn Routes" option may help this problem. But there is no such option for my Luci. Can I set this option via ssh shell?

Or is there any better solutions? Thanks

I've also tried setting ndproxy_routing to 1 for odhcpd, but it didn't work either.

What does ubus call system board say?

Routing is fine from the routing table you posted. But routing is not used when you access local network. There is a thing called neighbor discovery, similar to ARP in IPv4, and stays inside the lan. What you can do is to verify that you have a valid mac address for the neighbor you are trying to ping ip -6 neigh show and tcpdump shows that neighbor solicitation and advertisement are exchanged tcpdump -i br-lan 'ip6[40] == 135 && ip6[40] == 136'

ubus call system board says:

{
        "kernel": "4.19.232-photonicat",
        "hostname": "photonicat-openwrt",
        "system": "ARMv8 Processor rev 0",
        "model": "Rockchip RK3568 photonicat Linux Board",
        "board_name": "rockchip,rk3568-photonicat",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "21.02",
                "target": "armvirt/64",
                "revision": "R21.8.6",
                "description": "OpenWrt "
        }
}

I've found other threads with similar situation. They are sure this is the problem of odhcpd. I now have changed ยท/etc/config/dhcp to:

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option ra 'relay'
        option dhcpv6 'relay'
        option ndp 'relay'
        option ndproxy_routing '1'

config dhcp 'wwan_5g_v6'
        option dhcpv6 'relay'
        option ra 'relay'
        option ndp 'relay'
        option master '1'
        option interface 'wwan_5g_v6'
        option ignore '1'
        option ndproxy_routing '1'

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

Now the ipv6 resolve seems malfunctioning for the linux client, but it could ping ipv6 successfully with real address and a nearly two times delay compared to the router, and the data transfer seems fine without disconnection problem.
On the other hand, the windows client ping successfully (by both ipv6 addr and name) and with normal delay, but the connection still breaks very soon.

I don't see any 4.9 kernel in version 21.02, also there is no 21.8.6 revision, so this looks like it is not a vanilla OpenWrt, but some modified version. You'd have better luck asking at the maintainer's forum/tech support, as we don't know what modifications they have done and how to reproduce the issue.

1 Like