Test Connectivity

Once you have started OTBR Docker, form a Thread network and test its connectivity to the internet.

Form the Thread Network

OTBR Web GUI Home

On the machine running OTBR Docker:

  1. Open a browser window and navigate to 127.0.0.1:8080. If OTBR Docker is running correctly, the OTBR Web GUI loads.
  2. Select the "Form" menu option and change some of the default credentials. We recommend leaving the default Channel and On-Mesh Prefix values. Whatever you use, make a note of them so you can test a separate Thread node later.
    ParameterSample Value
    Network Name OTBR4444
    PAN ID 0x4444
    Network Key 33334444333344443333444433334444
    Extended PAN ID 3333333344444444
    Passphrase 444444
    Channel 15
    On-Mesh Prefix fd11:22::
  3. Select FORM to form the Thread network. Check the output in the terminal window running OTBR Docker. You should see wpantund log output for the addition of the on-mesh prefix and a SLAAC address:
    wpantund[134]: Adding on-mesh prefix "fd11:22::/64" to NCP
    wpantund[134]: Pushing a new SLAAC address fd11:22::d0cb:446a:ea5:a63f/64 to NCP
    This output is required for internet connectivty for the Thread network.

Bring up a second Thread node

With OTBR Docker up and running, add a standalone Thread node to the Thread network and test that it has connectivity to the internet.

If using a physical NCP with OTBR Docker, use a second physical Thread node to test. If using an emulated NCP with OTBR Docker, use a second emulated POSIX node to test.

Physical Thread node

Build and flash a standalone Thread node on the supported platform of your choice. This node does not have to be built with any specific build switches.

See Build OpenThread for basic building instructions.

See the Build a Thread network with nRF52840 boards and OpenThread Codelab for detailed instructions on building and flashing the Nordic nRF52840 platform.

  1. After building and flashing, attach the Thread device to the machine running OTBR Docker via USB. Use screen in a new terminal window to access the CLI. For example, if the device is mounted on port /dev/ttyACM1:
    screen /dev/ttyACM1 115200
  2. Press the Enter key to bring up the > OpenThread CLI prompt.

Emulated Thread node

  1. Open a new terminal window on the machine running OTBR Docker.
  2. Start the POSIX CLI application to bring up an emulated node:
    cd ~/openthread
    ./output/x86-64-unknown-linux-gnu/bin/ot-cli-ftd 2
  3. Press the Enter key to bring up the > OpenThread CLI prompt.

Join the second node to the Thread network

Using the OpenThread CLI for your physical or emulated Thread node, join the node to the Thread network created by OTBR Docker.

  1. Update the Thread network credentials for the node, using the same values from OTBR Docker:
    networkname OTBR4444
    Done
    panid 0x4444
    Done
    masterkey 33334444333344443333444433334444
    Done
    extpanid 3333333344444444
    Done
    channel 15
    Done
  2. Bring up the Thread interface and start Thread:
    ifconfig up
    Done
    thread start
    Done
  3. The node should join the OTBR Thread network automatically. Within two minutes its state should be router:
    state
    router
  4. Check the node's IP addresses to ensure it has an IPv6 address with the on-mesh prefix of fd11:22::/64 as specified during Thread network formation:
    ipaddr
    fd11:22:0:0:614e:4588:57a1:a473
    fd33:3333:3344:0:0:ff:fe00:f801
    fd33:3333:3344:0:1b5f:db5:ecac:a9e
    fe80:0:0:0:e0c4:5304:5404:5f70:98cd

Ping a public address

You should be able to a ping a public IPv6 address from the standalone Thread node at this point. Since Thread only uses IPv6, to ping a public IPv4 address you must translate it to IPv6 and combine it with the well-known prefix of 64:ff9b::/64 used by Network Address Translation (NAT) in OTBR.

For more information on how NAT is configured in OTBR, see Configure NAT.

  1. To get a translated IPv4 address, use a website like findipv6.com.
  2. Translate the IPv4 address you wish to test. For example, 172.217.164.110 translated to IPv6 is ::ffff:acd9:a46e.
  3. Using only the last 4 bytes of the resulting IPv6 address, combine it with the well-known prefix of 64:ff9b::/64 to get a new IPv6 address:
    64:ff9b::acd9:a46e
  4. Ping this new IPv6 address from the CLI of the standalone Thread node to test it's internet connectivity. Pinging this address is akin to pinging the original IPv4 address:
     ping 64:ff9b::acd9:a46e
    16 bytes from 64:ff9b:0:0:0:0:acd9:a46e: icmp_seq=1 hlim=118 time=45ms

Success! The second Thread node can now communicate with the internet, through OTBR Docker.