netdata from borderrouter lost after a few days of uptime

81 views
Skip to first unread message

Johannes Neyer

unread,
Jan 3, 2022, 10:26:03 AM1/3/22
to openthre...@googlegroups.com
Hi

Prefixes and routes from a borderrouter disappear after a few days of
uptime. It seems like the netdata that was registered is lost when the
borderrouter switches role (e.g.: router -> child -> router) which
happens sometimes.

I don't know if this is a bug or by design.

If this is by design is there a way to ensure that the registered
prefixes and routes are maintained?

Best regards
Johannes
netsetup.txt
netdata_empty_log.txt

Jonathan Hui

unread,
Jan 3, 2022, 4:45:07 PM1/3/22
to Johannes Neyer, openthre...@googlegroups.com
The Thread device should attempt to register its local network data again if the leader's network data is not consistent.

What git commit are you using?

I just tested this with the latest main branch and the intended behavior seems to work for me - my console output is copied below.

Note that the network data is not persistent. If the device restarts for any reason, the local network data will be lost. You can check whether the device reboots by using the uptime CLI command.

> ifconfig up
Done
> thread start
Done
> netdata show    
Prefixes:
Routes:
Services:
Done
> prefix add fd01::/64 pasor
Done
> route add 64:ff9b::/96 s med
Done
> netdata register
Done
> netdata show
Prefixes:
fd01:0:0:0::/64 paros med 6000
Routes:
64:ff9b:0:0:0:0::/96 s med 6000
Services:
Done
> state
router
Done
> state child
Done
> state
child
Done
> netdata show
Prefixes:
fd01:0:0:0::/64 paros med 8802
Routes:
64:ff9b:0:0:0:0::/96 s med 8802
Services:
Done
> state router
Done
> state
router
Done
> netdata show
Prefixes:
fd01:0:0:0::/64 paros med 6000
Routes:
64:ff9b:0:0:0:0::/96 s med 6000
Services:
Done

--
Jonathan Hui



--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/6ad5731d-85ea-5d21-dc7c-6a668a42147a%40gmail.com.

Johannes Neyer

unread,
Jan 4, 2022, 4:37:06 AM1/4/22
to Jonathan Hui, openthre...@googlegroups.com
I am running ot-br-posix from march (4b6d3b86) on a Raspberry Pi 3B.

I am certain that the pi did not reboot. I don't have the OT uptime command though:
pi@clt-lab-t-6061:~ $ sudo ot-ctl "uptime"
Error 35: InvalidCommand
pi@clt-lab-t-6061:~ $ uptime
 09:12:51 up 12 days, 16:06,  1 user,  load average: 0.00, 0.02, 0.00

The prefix and route are registered on boot via systemd (see attachment).

How would I go about re-registering the network data in case it's lost?

Creating a systemd service that periodically checks if the output of netdata show contains the expected prefix/route with the borderrouters RLOC comes to mind but that seems fragile. Especially because my network sometimes seems to take a few hours to get into a stable state (it contains 3 borderrouters, 12 FTDs and 18 SEDs).

For example right now when the netdata is lost I do the following to get back a working network:
- shut down all three borderrouters
- wait an hour
- turn on the first borderrouter
- wait an hour
- turn on the second borderrouter
- wait an hour
- turn on the third borderrouter

It then works for a week or two and then I have to repeat the process.
ot-net-setup.service
ot-net-setup.sh

neye

unread,
Jan 6, 2022, 4:31:06 AM1/6/22
to openthread-users
The problem also seems to only occur when there is more than one borderrouter running on the network. All the borderrouters register the same route and prefix.

Jonathan Hui

unread,
Jan 14, 2022, 8:47:13 PM1/14/22
to neye, openthread-users
One thing to check is whether the prefix/route information is still in the local network data.

If possible, you can grab this patch openthread/openthread#7316 to inspect the local network data.

--
Jonathan Hui



Reply all
Reply to author
Forward
0 new messages