Thread Border router and Thread Router

834 views
Skip to first unread message

Vishnu Bemera

unread,
Sep 7, 2018, 10:22:07 AM9/7/18
to openthread-users
hi
  I would like to know whether Thread Border Router can function as thread router
  In my experiment I want to use only Thread border router and wants it to take care of thread router/thread leader roles too.
  Is it possible?

Thanks
Vishnu

Martin Turon

unread,
Sep 7, 2018, 11:48:19 AM9/7/18
to Vishnu Bemera, openthread-users
Hi Vishnu,

From a specification standpoint, the Border Router role and whether the device is a router or end device on the Thread network are independent.

Both configurations are possible:

  • Thread Router-capable device that registers as a Border Router for an external prefix.
    Such a device will automatically transition from REED to Router to Leader as appropriate, following the rules in the Thread specification.

  • Thread end device that registers as a Border Router for an external prefix.
    Such a device will never become a router or leader, will always communicate through its parent router. 
    Packets destined for its external prefix will still be routed to it for forwarding purposes.
I'm not clear from your question which configuration you are seeking to setup, but both are possible.

Generally, the Thread network role can be controlled dynamically with the mode bits and the routerrole command, and the border router role is entered independently by registering as a default route for an external prefix.

This page explains Thread device roles in more depth.

Martin

_____________________________
Martin Turon  |  Nest Labs

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to openthread-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/89d852cc-cf59-476b-9eff-953614ffe4f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jonathan Hui

unread,
Sep 7, 2018, 12:56:37 PM9/7/18
to Vishnu Bemera, openthread-users
The short answer is yes - OpenThread Border Router has Thread Routing capability enabled by default. Following the OpenThread Border Router Guide, should get you what you want.

--
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 post to this group, send email to openthre...@googlegroups.com.

Vishnu Bemera

unread,
Sep 28, 2018, 9:59:39 AM9/28/18
to openthread-users
hi Martin,
  Thanks for the information. Let me add additional information to clarify my earlier question:
  I want to use single raspberry pi to run/setup border router and other thread roles like thread router/leader.
  will the ot-ncp-ftd or ot-cli-ftd binary be compiled to enable both border router and thread router/leader functionality?
  if answer is yes, please tell me how to compile to enabled all the roles including border router.
  if border router role can not be enabled for above mentioned binaries, can I run/set up border router on the same hardware along with the thread router/leader?
  
  Also I would like to know whether border router binary be built for posix and run as a containter?

Thanks
Vishnu
  

On Friday, September 7, 2018 at 9:18:19 PM UTC+5:30, mturon wrote:
Hi Vishnu,

From a specification standpoint, the Border Router role and whether the device is a router or end device on the Thread network are independent.

Both configurations are possible:

  • Thread Router-capable device that registers as a Border Router for an external prefix.
    Such a device will automatically transition from REED to Router to Leader as appropriate, following the rules in the Thread specification.

  • Thread end device that registers as a Border Router for an external prefix.
    Such a device will never become a router or leader, will always communicate through its parent router. 
    Packets destined for its external prefix will still be routed to it for forwarding purposes.
I'm not clear from your question which configuration you are seeking to setup, but both are possible.

Generally, the Thread network role can be controlled dynamically with the mode bits and the routerrole command, and the border router role is entered independently by registering as a default route for an external prefix.

This page explains Thread device roles in more depth.

Martin

_____________________________
Martin Turon  |  Nest Labs

On Fri, Sep 7, 2018 at 7:22 AM, Vishnu Bemera <vishn...@gmail.com> wrote:
hi
  I would like to know whether Thread Border Router can function as thread router
  In my experiment I want to use only Thread border router and wants it to take care of thread router/thread leader roles too.
  Is it possible?

Thanks
Vishnu

--
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 post to this group, send email to openthre...@googlegroups.com.

Jonathan Hui

unread,
Sep 28, 2018, 11:28:14 AM9/28/18
to Vishnu Bemera, openthread-users
As mentioned in my previous email, OpenThread Border Router has Thread Router/Leader capability enabled by default. Following the OpenThread Border Router Guide (which includes a section on building the NCP), will get you a single RPi that supports Thread Router/Leader and Border Routing.

We are finalizing a Docker-based OTBR with documentation. Stay tuned.

--
Jonathan Hui

Martin Turon

unread,
Sep 28, 2018, 12:55:20 PM9/28/18
to Jonathan Hui, Vishnu Bemera, openthread-users
Hi Vishnu,

Yes, I think Jonathan has answered all your questions below.  

The Border Router / Thread Router / Leader configuration you seek is exactly the one enabled by default in the sample RasPi Host + OpenThread NCP platform.  

The NCP platform in the guide is CC2538, but there are many platforms and connectivity options (UART, SPI, USB) available to choose from.

Good luck with your experiments.

Martin

_____________________________
Martin Turon  |  Nest Labs

Jonathan Hui


To unsubscribe from this group and stop receiving emails from it, send an email to openthread-users+unsubscribe@googlegroups.com.
To post to this group, send email to openthread-users@googlegroups.com.

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to openthread-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/CAGwZUDuKKRMKMUn1zKR1nHVHiDSRM57d_vuW1Wao9Kw82YkO%3Dg%40mail.gmail.com.

Vishnu Bemera

unread,
Oct 1, 2018, 4:03:35 AM10/1/18
to openthre...@googlegroups.com
Thanks Martin and Jonathan. Now it is clear and understood.
 when you say "The NCP platform in the guide is CC2538, but there are many platforms and connectivity options (UART, SPI, USB) available to choose from" and  if I want to run the border router on the SoC, where will be the OTBR platform running? Or can we say, border router will support either NCP or host/controller architecture?

Vishnu Bemre

unread,
Oct 16, 2018, 7:01:01 AM10/16/18
to Jonathan Hui, openthread-users
Hi Jonathan,
  I saw the docker file for border router in GitHub but could not find the document.
Can you please let me know the document location.  

Thanks
VIshnu

Yakun Xu

unread,
Oct 16, 2018, 7:16:47 AM10/16/18
to openthread-users

Jeff Bumgardner

unread,
Oct 16, 2018, 10:20:02 AM10/16/18
to Yakun Xu, openthread-users
Hi Vishnu, we're working on the complete setup guide for using OTBR in Docker... should be up on openthread.io soon.  Sorry for the delay.

Jeff

Vishnu Bemre

unread,
Oct 16, 2018, 10:36:37 AM10/16/18
to Jeff Bumgardner, Yakun Xu, openthread-users
Hi Jeff,
 Thanks. Will wait for the document.

Hi Yakun,
 Thanks. Will go through the script. 

Regards
Vishnu

Jeff Bumgardner

unread,
Oct 23, 2018, 12:36:54 PM10/23/18
to openthread-users
The OTBR Docker guide is now up:


Let us know if you have any issues!

Jeff

sujay kg

unread,
Oct 24, 2018, 6:08:37 AM10/24/18
to Jeff Bumgardner, openthre...@googlegroups.com
Jeff,

I tried to bring up the OTBR on RPI 3B using emulated posix NCP but met with errors while  running the docker run command.
Can you help me figure out the root cause of the issue ? 


following is the configuration:
root@raspberrypi:~# uname -a
Linux raspberrypi 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux

root@raspberrypi:~# docker version
Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:30:52 2018
 OS/Arch:           linux/arm
 Experimental:      false

Error log:

 docker run  --privileged -it 68fcc7f77576 
 --sysctl net.ipv6.conf.all.disable_ipv6=0 
  --sysctl net.ipv4.conf.all.forwarding=1 
  --sysctl  net.ipv6.conf.all.forwarding=1  
  -p 8080:80
  --dns=127.0.0.1
  -it --volume /dev/pts/5:/dev/ttyUSB0

NCP_PATH: /dev/ttyUSB0
TUN_INTERFACE_NAME: wpan0
NAT64_PREFIX: 64:ff9b::/96
AUTO_PREFIX_ROUTE: true
AUTO_PREFIX_SLAAC: true
Current platform is ubuntu
* Applying /etc/sysctl.d/10-console-messages.conf ...
kernel.printk = 4 4 1 7
* Applying /etc/sysctl.d/10-ipv6-privacy.conf ...
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
* Applying /etc/sysctl.d/10-kernel-hardening.conf ...
kernel.kptr_restrict = 1
* Applying /etc/sysctl.d/10-link-restrictions.conf ...
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /etc/sysctl.d/10-magic-sysrq.conf ...
kernel.sysrq = 176
* Applying /etc/sysctl.d/10-network-security.conf ...
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_syncookies = 1
* Applying /etc/sysctl.d/10-ptrace.conf ...
* Applying /etc/sysctl.d/10-zeropage.conf ...
vm.mmap_min_addr = 32768
* Applying /etc/sysctl.d/60-otbr-ip-forward.conf ...
net.ipv6.conf.all.forwarding = 1
net.ipv4.ip_forward = 1
* Applying /etc/sysctl.conf ...
 * Starting userspace NAT64 tayga                                               RTNETLINK answers: Permission denied
                                                                         [ OK ]
/usr/sbin/service
 * Starting domain name service... bind9                                 [ OK ] 
/usr/sbin/service
 * dbus is not running
 * Starting system message bus dbus                                      [ OK ] 
   ...fail!
wpantund[134]: Starting wpantund 0.08.00d (Oct 24 2018 08:11:10) . . .
wpantund[134]: BUILD_VERSION = 47f3212
wpantund[134]: Configuration file "/etc/wpantund.conf" read.
wpantund[134]: Unable to open socket. "No such file or directory" (2) (filename = /dev/ttyUSB0, type = 6)
wpantund[134]: Unable to open socket with path </dev/ttyUSB0>, errno=2 (No such file or directory)
wpantund[134]: Runtime error thrown while starting up, "Unable to open socket"
wpantund[134]: Cleaning up. (gRet = 4)
wpantund[134]: Stopped.
   ...fail!
   ...fail!
otWeb[150]: border router web started on wpan0
otWeb[150]: reply is NULL; error: The name com.nestlabs.WPANTunnelDriver was not provided by any .service files
otWeb[150]: reply error: The name com.nestlabs.WPANTunnelDriver was not provided by any .service files
otWeb[150]: destination is NULL; error: (null)
otWeb[150]: message is NULL
otbr-agent[165]: Starting border router agent on wpan0...
otbr-agent[165]: NCP requesting DBus name otbr.agent.wpan0...
otbr-agent[165]: NCP failed to find the interface!
otbr-agent[165]: NCP failed to initialize!
otbr-agent[165]: Failed to create border route agent instance: -1!


bhagath kumar

unread,
Oct 24, 2018, 6:53:48 AM10/24/18
to sujay kg, Jeff Bumgardner, openthre...@googlegroups.com
Hi Sujai,

/dev/ttyUSB0 is not found in raspberry pi.thats why the error comes.

U need to attach a proper NCP to usb0/acm0

Or add emulated POSIX NCP in socket field

Thanks,
Bhagathkumar

Jeff Bumgardner

unread,
Oct 24, 2018, 12:11:16 PM10/24/18
to bhagat...@gmail.com, Sjy, openthre...@googlegroups.com
Sujai, your run command is different, not sure if it matters but did you try the one in the guide?

docker run --sysctl "net.ipv6.conf.all.disable_ipv6=0 \
        net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" \
        -p 8080:80 --dns=127.0.0.1 -it --volume \
        /dev/pts/7:/dev/ttyUSB0 --privileged otbr
Also, can you confirm that the POSIX NCP and socat are both running prior to running the Docker container as detailed beginning at https://openthread.io/guides/border-router/docker/run#set_up_a_bidirectional_data_stream 

Jeff

sujay kg

unread,
Oct 25, 2018, 4:52:52 AM10/25/18
to Jeff Bumgardner, bhagat...@gmail.com, openthre...@googlegroups.com
Jeff,

I saw couple of errors in the beginning which prompted me to change the docker run command. I rebooted my RPI ,started the setup from the scratch . The setup was successful with emulated POSIX NCP. 

Thanks 
-Sujay

Jeff Bumgardner

unread,
Oct 25, 2018, 11:04:53 AM10/25/18
to Sjy, Bhagathkumar Bhagavathi, openthre...@googlegroups.com
Great, glad to hear you got it working!

Yong Yu Fang

unread,
Nov 15, 2018, 11:27:32 PM11/15/18
to openthread-users
Hi Jeff,


I am trying to run Docker on my RPI with emulated NCP and I have followed the guide on openthread.io.

The issue I am facing is:

At the of the 'Start the POSIX NCP' step,

~/openthread/output/x86_64-unknown-linux-gnu/bin/ot-ncp-ftd 1 \
> /dev/pts/2 < /dev/pts/2

It is running on 'x86_64-unknown-linux-gnu' whereby I'm running on 'arm7l-unknown-linux-gnueabihf'. Will this cause an issue?

When I tried to run ~/openthread/output/arm7l-unknown-linux-gnueabifh/bin/ot-ncp-ftd 1 \
> /dev/pts/2 < /dev/pts/2 ,

I get an 'Invalid value for TimerSpeedUpFactor: /dev/pts/2

So basically I cannot even get the emulated NCP running...... and I also tried running this command:

docker run --sysctl "net.ipv6.conf.all.disable_ipv6=0 \
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" \
-p 8080:80 --dns=127.0.0.1 -it --volume \

/dev/pts/3:/dev/ttyUSB0 --privileged openthread/otbr

With 'standard_init_linux.go:190: exec user process caused "exec format error"

Any help be much appreciated! Thanks!!!

g...@google.com

unread,
Nov 18, 2018, 8:32:53 PM11/18/18
to openthread-users
It seems that your shell is not parsing command line options right. Try remove the '\' first with all the command in one line.
Reply all
Reply to author
Forward
0 new messages