• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# OpenThread CLI - Border Router (BR)
2
3## Command List
4
5Usage : `br [command] ...`
6
7- [counters](#counters)
8- [disable](#disable)
9- [enable](#enable)
10- [help](#help)
11- [init](#init)
12- [nat64prefix](#nat64prefix)
13- [omrprefix](#omrprefix)
14- [onlinkprefix](#onlinkprefix)
15- [pd](#pd)
16- [prefixtable](#prefixtable)
17- [rioprf](#rioprf)
18- [routeprf](#routeprf)
19- [routers](#routers)
20- [state](#state)
21
22## Command Details
23
24### help
25
26Usage: `br help`
27
28Print BR command help menu.
29
30```bash
31> br help
32counters
33disable
34enable
35omrprefix
36onlinkprefix
37pd
38prefixtable
39raoptions
40rioprf
41routeprf
42routers
43state
44Done
45```
46
47### init
48
49Usage: `br init <interface> <enabled>`
50
51Initializes the Border Routing Manager on given infrastructure interface.
52
53```bash
54> br init 2 1
55Done
56```
57
58### enable
59
60Usage: `br enable`
61
62Enable the Border Routing functionality.
63
64```bash
65> br enable
66Done
67```
68
69### disable
70
71Usage: `br disable`
72
73Disable the Border Routing functionality.
74
75```bash
76> br disable
77Done
78```
79
80### state
81
82Usage: `br state`
83
84Get the Border Routing state:
85
86- `uninitialized`: Routing Manager is uninitialized.
87- `disabled`: Routing Manager is initialized but disabled.
88- `stopped`: Routing Manager in initialized and enabled but currently stopped.
89- `running`: Routing Manager is initialized, enabled, and running.
90
91```bash
92> br state
93running
94```
95
96### counters
97
98Usage : `br counters`
99
100Get the Border Router counter.
101
102```bash
103> br counters
104Inbound Unicast: Packets 4 Bytes 320
105Inbound Multicast: Packets 0 Bytes 0
106Outbound Unicast: Packets 2 Bytes 160
107Outbound Multicast: Packets 0 Bytes 0
108RA Rx: 4
109RA TxSuccess: 2
110RA TxFailed: 0
111RS Rx: 0
112RS TxSuccess: 2
113RS TxFailed: 0
114Done
115```
116
117### omrprefix
118
119Usage: `br omrprefix [local|favored]`
120
121Get local or favored or both off-mesh-routable prefixes of the Border Router.
122
123```bash
124> br omrprefix
125Local: fdfc:1ff5:1512:5622::/64
126Favored: fdfc:1ff5:1512:5622::/64 prf:low
127Done
128
129> br omrprefix favored
130fdfc:1ff5:1512:5622::/64 prf:low
131Done
132
133> br omrprefix local
134fdfc:1ff5:1512:5622::/64
135Done
136```
137
138### onlinkprefix
139
140Usage: `br onlinkprefix [local|favored]`
141
142Get local or favored or both on-link prefixes of the Border Router.
143
144```bash
145> br onlinkprefix
146Local: fd41:2650:a6f5:0::/64
147Favored: 2600::0:1234:da12::/64
148Done
149
150> br onlinkprefix favored
1512600::0:1234:da12::/64
152Done
153
154> br onlinkprefix local
155fd41:2650:a6f5:0::/64
156Done
157```
158
159### nat64prefix
160
161Usage: `br nat64prefix [local|favored]`
162
163Get local or favored or both NAT64 prefixes of the Border Router.
164
165`OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is required.
166
167```bash
168> br nat64prefix
169Local: fd14:1078:b3d5:b0b0:0:0::/96
170Favored: fd14:1078:b3d5:b0b0:0:0::/96 prf:low
171Done
172
173> br nat64prefix favored
174fd14:1078:b3d5:b0b0:0:0::/96 prf:low
175Done
176
177> br nat64prefix
178fd14:1078:b3d5:b0b0:0:0::/96
179Done
180```
181
182### pd
183
184Usage: `br pd [enable|disable]`
185
186Enable/Disable the DHCPv6 PD.
187
188```bash
189> br pd enable
190Done
191
192> br pd disable
193Done
194```
195
196Usage: `br pd state`
197
198Get the state of DHCPv6 PD.
199
200`OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE` is required.
201
202- `disabled`: DHCPv6 PD is disabled on the border router.
203- `stopped`: DHCPv6 PD in enabled but won't try to request and publish a prefix.
204- `running`: DHCPv6 PD is enabled and will try to request and publish a prefix.
205
206```bash
207> br pd state
208running
209Done
210```
211
212### prefixtable
213
214Usage: `br prefixtable`
215
216Get the discovered prefixes by Border Routing Manager on the infrastructure link.
217
218Info per prefix entry:
219
220- The prefix
221- Whether the prefix is on-link or route
222- Milliseconds since last received Router Advertisement containing this prefix
223- Prefix lifetime in seconds
224- Preferred lifetime in seconds only if prefix is on-link
225- Route preference (low, med, high) only if prefix is route (not on-link)
226- The router IPv6 address which advertising this prefix
227- Flags in received Router Advertisement header:
228  - M: Managed Address Config flag
229  - O: Other Config flag
230  - Stub: Stub Router flag (indicates whether the router is a stub router)
231
232```bash
233> br prefixtable
234prefix:fd00:1234:5678:0::/64, on-link:no, ms-since-rx:29526, lifetime:1800, route-prf:med, router:ff02:0:0:0:0:0:0:1 (M:0 O:0 Stub:1)
235prefix:1200:abba:baba:0::/64, on-link:yes, ms-since-rx:29527, lifetime:1800, preferred:1800, router:ff02:0:0:0:0:0:0:1 (M:0 O:0 Stub:1)
236Done
237```
238
239### raoptions
240
241Usage: `br raoptions <options>`
242
243Sets additional options to append at the end of emitted Router Advertisement (RA) messages. `<options>` provided as hex bytes.
244
245```bash
246> br raoptions 0400ff00020001
247Done
248```
249
250### raoptions clear
251
252Usage: `br raoptions clear`
253
254Clear any previously set additional options to append at the end of emitted Router Advertisement (RA) messages.
255
256```bash
257> br raoptions clear
258Done
259```
260
261### rioprf
262
263Usage: `br rioprf`
264
265Get the preference used when advertising Route Info Options (e.g., for discovered OMR prefixes) in emitted Router Advertisement message.
266
267```bash
268> br rioprf
269med
270Done
271```
272
273### rioprf \<prf\>
274
275Usage: `br rioprf high|med|low`
276
277Set the preference (which may be 'high', 'med', or 'low') to use when advertising Route Info Options (e.g., for discovered OMR prefixes) in emitted Router Advertisement message.
278
279```bash
280> br rioprf low
281Done
282```
283
284### rioprf clear
285
286Usage: `br rioprf clear`
287
288Clear a previously set preference value for advertising Route Info Options (e.g., for discovered OMR prefixes) in emitted Router Advertisement message. When cleared BR will use device's role to determine the RIO preference: Medium preference when in router/leader role and low preference when in child role.
289
290```bash
291> br rioprf clear
292Done
293```
294
295### routeprf
296
297Usage: `br routeprf`
298
299Get the preference used for publishing routes in Thread Network Data. This may be the automatically determined route preference, or an administratively set fixed route preference - if applicable.
300
301```bash
302> br routeprf
303med
304Done
305```
306
307### routeprf \<prf\>
308
309Usage: `br routeprf high|med|low`
310
311Set the preference (which may be 'high', 'med', or 'low') to use publishing routes in Thread Network Data. Setting a preference value overrides the automatic route preference determination. It is used only for an explicit administrative configuration of a Border Router.
312
313```bash
314> br routeprf low
315Done
316```
317
318### routeprf clear
319
320Usage: `br routeprf clear`
321
322Clear a previously set preference value for publishing routes in Thread Network Data. When cleared BR will automatically determine the route preference based on device's role and link quality to parent (when acting as end-device).
323
324```bash
325> br routeprf clear
326Done
327```
328
329### routers
330
331Usage: `br routers`
332
333Get the list of discovered routers by Border Routing Manager on the infrastructure link.
334
335Info per router:
336
337- The router IPv6 address
338- Flags in received Router Advertisement header:
339  - M: Managed Address Config flag
340  - O: Other Config flag
341  - Stub: Stub Router flag (indicates whether the router is a stub router)
342
343```bash
344> br routers
345ff02:0:0:0:0:0:0:1 (M:0 O:0 Stub:1)
346Done
347```
348