OpenThread IPv6 to IPv4 ping problem

improv
Posts: 1
Joined: Wed Jun 12, 2024 2:14 pm

OpenThread IPv6 to IPv4 ping problem

Postby improv » Wed Jun 12, 2024 3:20 pm

Hi there, i have been struggling with this one nut that has been holding me back for a couple of day now and i am out of ideas what to try.

TLDR: Pinging and in general communication within Thread network works, but once i try to ping outside IPv4 address of my PC for example, it does not work, neither does pinging 8.8.8.8 work.
I am sorry to be asking here, but i am pretty unsure what to do now, i have tried a lots of things but they do not work, so any help will be really appreciated.

Hardware:
ESP Thread Border Router from Espressif: https://www.aliexpress.com/item/1005005688193617.html
ESP32-H2-DevKitM-1-N4: https://www.aliexpress.com/item/1005005252175587.html

How to reproduce:
I have followed the official docs for setting up border router here: https://docs.espressif.com/projects/esp ... d_run.html
That means i have successfully:
  • cloned the esp-idf project
  • cloned the esp-thread-br
  • built the ot_rcp with correctly setting the OPENTHREAD_RCP_SPI to yes using menuconfig
  • configured the basic_thread_border_router using menuconfig to set OPENTHREAD_RADIO_SPINEL_SPI to yes, pre-fill the WiFi ssid and password and ticked autostart as well
  • flashed the basic_thread_border_router
  • built and flashed the ot_cli
  • put the dataset in place
Here is my menuconfig for ot_cli:
Screenshot from 2024-06-12 16-43-26.png
Screenshot from 2024-06-12 16-43-26.png (133.14 KiB) Viewed 838 times
Here is my menuconfig for basic_thread_border_router:
Screenshot from 2024-06-12 16-48-32.png
Screenshot from 2024-06-12 16-48-32.png (134.75 KiB) Viewed 838 times
Here are some outputs to confirm:
ot_cli:

Code: Select all

> state

router
Done

Code: Select all

> netdata show

Prefixes:
fd7d:131e:fe56:1::/64 paos low 9400
Routes:
fd7d:131e:fe56:2:0:0::/96 sn low 9400
fc00::/7 sa med 9400
Services:
44970 5d fd000db800a000006745bf3c79453177d120 s 9400
Contexts:
fd7d:131e:fe56:1::/64 1 c
Commissioning:
59479 - - -
Done
basic_thread_border_router:

Code: Select all

Done
> state

leader

Code: Select all

> netdata show

Prefixes:
fd7d:131e:fe56:1::/64 paos low 9400
Routes:
fd7d:131e:fe56:2:0:0::/96 sn low 9400
fc00::/7 sa med 9400
Services:
44970 5d fd000db800a000006745bf3c79453177d120 s 9400
Contexts:
fd7d:131e:fe56:1::/64 1 c
Commissioning:
59479 - - -
Done

Code: Select all

> nat64 state

PrefixManager: Active
Done
Pinging
basic_thread_border_router IPv6 mleid:

Code: Select all

> ipaddr mleid

fd00:db8:a0:0:6745:bf3c:7945:3177
Done
ot_cli IPv6 mleid:

Code: Select all

> ipaddr mleid

fd00:db8:a0:0:523a:b933:67a3:1a2b
Done
Pinging within Thread network also works just fine, here is pinging from ot_cli --->>> basic_thread_border_router:

Code: Select all

> ping fd00:db8:a0:0:523a:b933:67a3:1a2b

16 bytes from fd00:db8:a0:0:523a:b933:67a3:1a2b: icmp_seq=2 hlim=255 time=43ms
1 packets transmitted, 1 packets received. Packet loss = 0.0%. Round-trip min/avg/max = 43/43.0/43 ms.
Done
Here is pinging from basic_thread_border_router --->>> ot_cli:

Code: Select all

Done
> ping fd00:db8:a0:0:6745:bf3c:7945:3177

16 bytes from fd00:db8:a0:0:6745:bf3c:7945:3177: icmp_seq=2 hlim=255 time=46ms
1 packets transmitted, 1 packets received. Packet loss = 0.0%. Round-trip min/avg/max = 46/46.0/46 ms.
Done

I have tried more things than these basic ones, but i have been cycling from reseting the devices to retry again and again so many times i do not know for sure what i did and did not try already. Any help will be appreciated, thank you!
PS: If you just so happened to find a post that is exactly the same name, that was me accidentally hitting the submit.

acsoprana
Posts: 21
Joined: Mon Oct 14, 2024 1:50 pm

Re: OpenThread IPv6 to IPv4 ping problem

Postby acsoprana » Fri Nov 08, 2024 4:41 pm

Hello, I also implemented a thread network using the devices you mentioned and I had some problems that I can help you with.

First, for a thread network, whether or not you use a router board doesn't make much difference if you only use the data and controls internally. The router board only routes the data that must transcend the thread network externally, which is your case. So, for the ping to work for the IPv4 network outside the thread network, you must ping from a node and not from the router board.

For example: access the ESP32-H2 or C6 that you configured in the thread network and ping Google's DNS (ping 8.8.8.8) as you have already done. I believe you will receive the ping request response.

The ping performed directly from the router board does not work with the Espressif implementation example. To do this, you have to change the programming so that the ping can be done by the router board.

The router board in this case only acts as a data traffic facilitator between the two networks. However, even if you want to ping from the IPv4 network to the IPv6 network of the thread, you also have to perform other possible configurations.

So in your case, the ping should always be performed on one of the nodes of the thread network and not on the router board.

If it doesn't work, try performing the basic configurations again on each device and it will work. I myself reset and configured the settings several times to understand.

Good luck.

Who is online

Users browsing this forum: No registered users and 58 guests