[![Ask DeepWiki][deepwiki-svg]][deepwiki] --- # OpenThread Border Router A Thread Border Router connects a Thread network to other IP-based networks, such as Wi-Fi or Ethernet. A Thread Border Router supports the following functions: - End-to-end IP connectivity via routing between Thread devices and other external IP networks. - Bidirectional DNS-based service discovery via mDNS (on a Wi-Fi/Ethernet link) and SRP (on a Thread network). - DHCPv6 Prefix Delegation to obtain IPv6 prefixes for a Thread network. - NAT64 for connecting to IPv4 networks. - External Thread Commissioning (for example, a mobile phone) to authenticate and join a Thread device to a Thread network. OpenThread's implementation of a Border Router is called OpenThread Border Router (OTBR). More information about Thread can be found at [threadgroup.org](http://threadgroup.org/). Thread is a registered trademark of the Thread Group, Inc. [deepwiki]: https://deepwiki.com/openthread/ot-br-posix [deepwiki-svg]: https://deepwiki.com/badge.svg # Getting started The quickest way to set up a Thread-compliant Border Router is to follow the [Raspberry Pi Setup guide](https://openthread.io/guides/border-router/prepare). > Note: For users in China, end-user documentation is available at [openthread.google.cn](https://openthread.google.cn/guides/border-router). On macOS, `./script/bootstrap` installs the build dependencies with Homebrew and ```sh INFRA_IF_NAME=en0 RADIO_URL='spinel+hdlc+uart:///dev/cu.usbserial-XXXX?uart-baudrate=460800' ./script/setup ``` builds the border router, installs it under `/usr/local`, adds its `pf` anchors and IP forwarding, and loads it as the launchd job `io.openthread.otbr-agent`, which starts at boot. The agent's options live in `/usr/local/etc/default/otbr-agent`. Its log is in the unified log (`log show --predicate 'process == "otbr-agent"' --last 10m`); `/var/log/otbr-agent.log` receives what it writes to stderr. The Thread interface is a utun, named by the agent's socket (`ls /var/run/openthread-utun*.sock`; under `/tmp` with an OpenThread from before openthread#13746), and `sudo /usr/local/sbin/ot-ctl -I utunN state` talks to it. The web GUI (`WEB_GUI=1`, the default here as on Raspbian) is the launchd job `io.openthread.otbr-web` at ; its options live in `/usr/local/etc/default/otbr-web`, and `/var/log/otbr-web.log` receives its output. Until the agent takes the utun the service asks for (openthread#13742), put the utun it got in that file's `-I` and `sudo launchctl kickstart -k system/io.openthread.otbr-web`. # Contributing We would love for you to contribute to OpenThread Border Router and help make it even better than it is today! See our [Contributing Guidelines](https://github.com/openthread/ot-br-posix/blob/main/CONTRIBUTING.md) for more information. Contributors are required to abide by our [Code of Conduct](https://github.com/openthread/ot-br-posix/blob/main/CODE_OF_CONDUCT.md) and [Coding Conventions and Style Guide](https://github.com/openthread/ot-br-posix/blob/main/STYLE_GUIDE.md). # License OpenThread Border Router is released under the [BSD 3-Clause license](https://github.com/openthread/ot-br-posix/blob/main/LICENSE). See the [`LICENSE`](https://github.com/openthread/ot-br-posix/blob/main/LICENSE) file for more information. Please only use the OpenThread name and marks when accurately referencing this software distribution. Do not use the marks in a way that suggests you are endorsed by or otherwise affiliated with Nest, Google, or The Thread Group. # Need help? OpenThread support is available on GitHub: - Bugs and feature requests pertaining to the OpenThread Border Router — [submit to the openthread/ot-br-posix Issue Tracker](https://github.com/openthread/ot-br-posix/issues) - OpenThread bugs and feature requests — [submit to the OpenThread Issue Tracker](https://github.com/openthread/openthread/issues) - Community Discussion - [ask questions, share ideas, and engage with other community members](https://github.com/openthread/openthread/discussions) ## OpenThread To learn more about OpenThread, see the [OpenThread repository](https://github.com/openthread/openthread).