openthread / ot-br-posix

OpenThread Border Router, a Thread border router for POSIX-based platforms.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
419 stars 232 forks source link

Unable to ping IPV6 computer from Thread device and vice versa #2086

Closed typepub closed 1 year ago

typepub commented 1 year ago

Hi,

I have this setup:

From OTBR, I can ping both Computer and Thread device From Computer, I can ping OTBR but not Thread device From Thread device, I can ping OTBR but not Computer

So my problem is that the routing between Thread and LAN is not working, both ways.

I checked:

When I try to ping from Computer to Three device, counters for Chain FORWARD and Chain OTBR_FORWARD_INGRESS increase. When I do it the other way (from Thread device) no counter increase.

Here are the rules: ip6tables -vL Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
15 840 OTBR_FORWARD_INGRESS all -- any wpan0 anywhere anywhere

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination

Chain OTBR_FORWARD_INGRESS (1 references) pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere anywhere match-set otbr-ingress-allow-dst dst 15 840 ACCEPT all -- any any anywhere anywhere
0 0 ACCEPT all -- wpan0 any anywhere anywhere PKTTYPE = unicast

Configurations:

Routes: ip -6 route fd6d:7be0:2be0:3146::/64 dev wpan0 proto kernel metric 256 pref medium fd6d:7be0:2be0:3146::/64 dev wlan0 proto ra metric 600 pref medium fda1:fbde:3c93:1::/64 dev wpan0 proto kernel metric 256 pref medium fe80::/64 dev wpan0 proto kernel metric 256 pref medium fe80::/64 dev wlan0 proto kernel metric 1024 pref medium default via fe80::7845:58ff:fee4:4826 dev wlan0 proto ra metric 600 pref high

So I suspect that something is going wrong either with the routing configuration or with the firewall configuration, from Thread device to the Computer, but I don't have the required knowledge to investigate more. Any help will be appreciated. Thanks.

typepub commented 1 year ago

Well, I guess it is just a matter of time: after several hours waiting without touching anything, ping works properly.

superwhd commented 12 months ago

Hi @typepub, I looked a little bit into the information you provided.

It seems your on-link prefix of LAN somehow collides with your Thread's mesh-local prefix. They're both fd6d:7be0:2be0:3146::/64. That causes your OTBR has the route fd6d:7be0:2be0:3146::/64 on both wlan0 and wpan0 devices which causes the connectivity issue. The prefix collision indicates your Thread network is misconfigured. I'm not sure how you configured the Thread network but reconfiguring it with random credentials (by dataset init new and dataset commit active ...) should solve the problem.

typepub commented 11 months ago

Thanks @superwhd .

You were absolutely right. I can add that this page gave me all information to solve my IP address configuration: https://github.com/zephyrproject-rtos/zephyr/issues/29567