From c90638ca435475c087c2fae8a3f393405b5a1654 Mon Sep 17 00:00:00 2001 From: Sara Monteiro Date: Mon, 20 Mar 2023 09:49:27 +0100 Subject: [PATCH] en/guides: fix docker run command --- site/en/guides/border-router/docker/run.md | 21 +++++++++++++++---- .../border-router/docker/test-connectivity.md | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/site/en/guides/border-router/docker/run.md b/site/en/guides/border-router/docker/run.md index 192a2c95..5b30d557 100644 --- a/site/en/guides/border-router/docker/run.md +++ b/site/en/guides/border-router/docker/run.md @@ -32,14 +32,27 @@ sure to run `sudo modprobe ip6table_filter` for OTBR firewall support. This allows OTBR scripts to create rules inside the Docker container before `otbr-agent` starts. -In a new terminal window, start OTBR Docker, referencing the RCP's serial port. -For example, if the RCP is mounted at `/dev/ttyACM0`: +Run the following commands before starting the container. That enables +the IPv6 in the host machine and the IP forwarding. ``` -$ 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/ttyACM0:/dev/ttyACM0 --privileged openthread/otbr --radio-url spinel+hdlc+uart:///dev/ttyACM0 +sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 +sudo sysctl -w net.ipv4.conf.all.forwarding=1 +sudo sysctl -w net.ipv6.conf.all.forwarding=1 ``` -Upon success, you should have output similar to this: +In a new terminal window, start OTBR Docker container, referencing the RCP's serial port, as in the next command. + +> Notes: Consult the specific documentation from the used RCP and analyze if further +configuration is necessary, for example, setting up baudrate: +`--radio-url 'spinel+hdlc+uart:///dev/ttyUSB0?uart-baudrate=1000000'`, also replace `enp3s0` by the name of your interface on the computer running otbr docker, ex: `wlan0`. + +``` +$ docker run --net=host --dns=127.0.0.1 -it --volume /dev/ttyACM0:/dev/ttyACM0 --privileged openthread/otbr --radio-url spinel+hdlc+uart:///dev/ttyACM0 -B enp3s0 +``` + + +Upon success, you should have the initial output similar to this: ``` WARNING: Localhost DNS setting (--dns=127.0.0.1) may fail in containers. diff --git a/site/en/guides/border-router/docker/test-connectivity.md b/site/en/guides/border-router/docker/test-connectivity.md index 3a1086ce..eda0ba93 100644 --- a/site/en/guides/border-router/docker/test-connectivity.md +++ b/site/en/guides/border-router/docker/test-connectivity.md @@ -31,7 +31,7 @@ Select **FORM** to form the Thread network. Check the output in the terminal win otbr-agent[224]: [INFO]-CLI-----: execute command: prefix add fd11:22::/64 pasor ``` -This output is required for internet connectivty for the Thread network. +This output is required for internet connectivity for the Thread network. ## Step 2: Bring up a second Thread node