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- [prefixtable](#prefixtable) 16- [rioprf](#rioprf) 17- [routeprf](#routeprf) 18- [state](#state) 19 20## Command Details 21 22### help 23 24Usage: `br help` 25 26Print BR command help menu. 27 28```bash 29> br help 30counters 31disable 32enable 33omrprefix 34onlinkprefix 35prefixtable 36rioprf 37routeprf 38state 39Done 40``` 41 42### init 43 44Usage: `br init <interface> <enabled>` 45 46Initializes the Border Routing Manager on given infrastructure interface. 47 48```bash 49> br init 2 1 50Done 51``` 52 53### enable 54 55Usage: `br enable` 56 57Enable the Border Routing functionality. 58 59```bash 60> br enable 61Done 62``` 63 64### disable 65 66Usage: `br disable` 67 68Disable the Border Routing functionality. 69 70```bash 71> br disable 72Done 73``` 74 75### state 76 77Usage: `br state` 78 79Get the Border Routing state: 80 81- `uninitialized`: Routing Manager is uninitialized. 82- `disabled`: Routing Manager is initialized but disabled. 83- `stopped`: Routing Manager in initialized and enabled but currently stopped. 84- `running`: Routing Manager is initialized, enabled, and running. 85 86```bash 87> br state 88running 89``` 90 91### counters 92 93Usage : `br counters` 94 95Get the Border Router counter. 96 97```bash 98> br counters 99Inbound Unicast: Packets 4 Bytes 320 100Inbound Multicast: Packets 0 Bytes 0 101Outbound Unicast: Packets 2 Bytes 160 102Outbound Multicast: Packets 0 Bytes 0 103RA Rx: 4 104RA TxSuccess: 2 105RA TxFailed: 0 106RS Rx: 0 107RS TxSuccess: 2 108RS TxFailed: 0 109Done 110``` 111 112### omrprefix 113 114Usage: `br omrprefix [local|favored]` 115 116Get local or favored or both off-mesh-routable prefixes of the Border Router. 117 118```bash 119> br omrprefix 120Local: fdfc:1ff5:1512:5622::/64 121Favored: fdfc:1ff5:1512:5622::/64 prf:low 122Done 123 124> br omrprefix favored 125fdfc:1ff5:1512:5622::/64 prf:low 126Done 127 128> br omrprefix local 129fdfc:1ff5:1512:5622::/64 130Done 131``` 132 133### onlinkprefix 134 135Usage: `br onlinkprefix [local|favored]` 136 137Get local or favored or both on-link prefixes of the Border Router. 138 139```bash 140> br onlinkprefix 141Local: fd41:2650:a6f5:0::/64 142Favored: 2600::0:1234:da12::/64 143Done 144 145> br onlinkprefix favored 1462600::0:1234:da12::/64 147Done 148 149> br onlinkprefix local 150fd41:2650:a6f5:0::/64 151Done 152``` 153 154### nat64prefix 155 156Usage: `br nat64prefix [local|favored]` 157 158Get local or favored or both NAT64 prefixes of the Border Router. 159 160`OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is required. 161 162```bash 163> br nat64prefix 164Local: fd14:1078:b3d5:b0b0:0:0::/96 165Favored: fd14:1078:b3d5:b0b0:0:0::/96 prf:low 166Done 167 168> br nat64prefix favored 169fd14:1078:b3d5:b0b0:0:0::/96 prf:low 170Done 171 172> br nat64prefix 173fd14:1078:b3d5:b0b0:0:0::/96 174Done 175``` 176 177### prefixtable 178 179Usage: `br prefixtable` 180 181Get the discovered prefixes by Border Routing Manager on the infrastructure link. 182 183```bash 184> br prefixtable 185prefix: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 186prefix: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 187Done 188``` 189 190### rioprf 191 192Usage: `br rioprf` 193 194Get the preference used when advertising Route Info Options (e.g., for discovered OMR prefixes) in emitted Router Advertisement message. 195 196```bash 197> br rioprf 198med 199Done 200``` 201 202### rioprf \<prf\> 203 204Usage: `br rioprf high|med|low` 205 206Set 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. 207 208```bash 209> br rioprf low 210Done 211``` 212 213### rioprf clear 214 215Usage: `br rioprf clear` 216 217Clear 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. 218 219```bash 220> br rioprf clear 221Done 222``` 223 224### routeprf 225 226Usage: `br routeprf` 227 228Get 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. 229 230```bash 231> br routeprf 232med 233Done 234``` 235 236### routeprf \<prf\> 237 238Usage: `br routeprf high|med|low` 239 240Set 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. 241 242```bash 243> br routeprf low 244Done 245``` 246 247### routeprf clear 248 249Usage: `br routeprf clear` 250 251Clear 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). 252 253```bash 254> br routeprf clear 255Done 256``` 257