## attachtime

Prints the current attach time (duration since device was last attached). Duration is formatted as `{hh}:{mm}:{ss}` for hours, minutes, and seconds if it is less than one day. If the duration is longer than one day, the format is `{dd}d.{hh}:{mm}:{ss}`.

### Parameters

No parameters.

### Examples

    attachtime
    01:38:25
    Done

### CLI and API References

- No associated API

## ba admitter (enable, disable)

Enables or disables the Border Agent Admitter.

The default enable/disable state of Border Admitter (after OpenThread stack initialization) is determined by the OpenThread config `OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLED_BY_DEFAULT`.

### Parameters

```
ba admitter enable|disable
```

### Examples

    ba admitter enable
    Done

    ba admitter
    Enabled
    Done

### CLI and API References

- [otBorderAdmitterSetEnabled](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga656d13f15f1f0cca40e4f9afca3145b5)

## ba admitter

Indicates whether the Border Agent Admitter is enabled.

### Parameters

No parameters.

### Examples

    ba admitter
    Disabled
    Done

### CLI and API References

- [otBorderAdmitterIsEnabled](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga04f7d7abbcf58599ef4722b3eb6de733)

## ba admitter enrollers

Outputs the list of enrollers and accepted joiners per enroller.

### Parameters

No parameters.

### Examples

    ba admitter enrollers
    Enroller - id: phone01275ABC
        steering-data: [0042008000000000]
        mode: 0xc0
        msec-since-registered: 10478
        Joiner - iid: a5d2e4f0c8b1937e
            msec-since-accepted: 3299
            msec-till-expiration: 418852
    Done

### CLI and API References

- [otBorderAdmitterGetNextEnrollerInfo](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gadc36b2c2b4f973aa14ef4e66db98a02e)
- [otBorderAdmitterGetNextJoinerInfo](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga5f7b28a6042351c7e2932131e9e5269c)

## ba admitter joinerudpport (get,set)

Gets or sets the Border Agent Admitter [Joiner](https://openthread.io/reference/class/ot/cli/joiner) UDP port.

### Parameters

```
ba admitter joinerudpport [port]
```

### Examples

    ba admitter joinerudpport
    1000
    Done

    ba admitter joinerudpport 1001
    Done

### CLI and API References

- [otBorderAdmitterGetJoinerUdpPort](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga77782412b56a39ae01b3e79aa167adf4)
- [otBorderAdmitterSetJoinerUdpPort](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga7c1f6102e1b97d2a7620064d22827f70)

## ba admitter state

Outputs the state of Border Agent Admitter.

### Parameters

No parameters.

### Examples

    ba admitter state
    enabled: yes
    is-prime: yes
    is-active-commissioner: yes
    is-petition-rejected: no
    Done

### CLI and API References

- [otBorderAdmitterIsEnabled](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga04f7d7abbcf58599ef4722b3eb6de733)
- [otBorderAdmitterIsPrimeAdmitter](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga76a69f3a80951c6d07fb224b9289675e)
- [otBorderAdmitterIsActiveCommissioner](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga3afaf166bd9ea3446a2542b650a2ee13)
- [otBorderAdmitterIsPetitionRejected](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga8355b0e6535ab1bd2cc807d446fd14df)

## ba counters

Gets the border agent counters.

### Parameters

No parameters.

### Examples

    ba counters
    epskcActivation: 0
    epskcApiDeactivation: 0
    epskcTimeoutDeactivation: 0
    epskcMaxAttemptDeactivation: 0
    epskcDisconnectDeactivation: 0
    epskcInvalidBaStateError: 0
    epskcInvalidArgsError: 0
    epskcStartSecureSessionError: 0
    epskcSecureSessionSuccess: 0
    epskcSecureSessionFailure: 0
    epskcCommissionerPetition: 0
    pskcSecureSessionSuccess: 0
    pskcSecureSessionFailure: 0
    pskcCommissionerPetition: 0
    mgmtActiveGet: 0
    mgmtPendingGet: 0
    Done

### CLI and API References

- [otBorderAgentGetCounters](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga3bd5026265c2d51b96cc48d879030fa8)

## ba disable

Disables the Border Agent service on the device.

### Parameters

No parameters.

### Examples

    ba disable
    Done

### CLI and API References

- [ba enable](https://openthread.io/reference/cli/commands#ba_enable)
- [otBorderAgentSetEnabled](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga35a5778765300a35d7645cc47553842d)

## ba enable

Enables the Border Agent service on the device.

By default, the Border Agent service is enabled. The `ba enable` and `ba disable` commands allow users to explicitly control its state. This can be useful in scenarios such as:

- The user wishes to delay the start of the Border Agent service (and its mDNS advertisement of the `_meshcop._udp` service on the infrastructure link). This allows time to prepare or determine vendor-specific TXT data entries for inclusion.
- Unit tests or test scripts might disable the Border Agent service to prevent it from interfering with specific test steps. For example, tests validating mDNS or DNS-SD functionality may disable the Border Agent to prevent its registration of the MeshCoP service.

<br />

### Parameters

No parameters.

### Examples

    ba enable
    Done

### CLI and API References

- [otBorderAgentSetEnabled](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga35a5778765300a35d7645cc47553842d)

## ba ephemeralkey (enable, disable)

Enables/disables the Border Agent's Ephemeral Key Manager.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`.

If this function is called to disable, while an an ephemeral key is in use, the ephemeral key use will be stopped (as if `
https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga72943c0cccdf0f803b12263c878ccf64
` is called).

### Parameters

```
ba ephemeralkey enable|disable
```

### Examples

    ba ephemeralkey enable
    Done

    ba ephemeralkey
    Enabled
    Done

### CLI and API References

- [otBorderAgentEphemeralKeySetEnabled](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga594fa70a3c1d93812161697110c948cc)

## ba ephemeralkey

Gets the state of Border Agent's Ephemeral Key Manager.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`.

### Parameters

No parameters.

### Examples

    ba ephemeralkey
    Stopped
    Done

### CLI and API References

- [otBorderAgentEphemeralKeyGetState](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gae22c5cc6460043718a3a11ee74243ee8)

## ba ephemeralkey callback (enable, disable)

Sets the callback function to notify state changes of Border Agent's Ephemeral Key Manager.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`.

A subsequent call to this function will replace any previously set callback.

### Parameters

```
ba ephemeralkey callback enable|disable
```

### Examples

    ba ephemeralkey callback enable
    Done

    ba ephemeralkey start W10X10 5000 49155
    Done
    BorderAgentEphemeralKey callback - state:Started
    BorderAgentEphemeralKey callback - state:Connected

### CLI and API References

- [otBorderAgentEphemeralKeySetCallback](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga6c4d0056dea384053dd3951dad90c556)

## ba ephemeralkey generate-tap

Generates a cryptographically secure random Thread Administration One-Time Passcode (TAP) string.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE` and `OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE`.

The TAP is a string of 9 characters, generated as a sequence of eight cryptographically secure random numeric digits \[`0`-`9`\] followed by a single check digit determined using the Verhoeff algorithm.

Note that this command simply generates and outputs a TAP. It does not start ephemeral key use with this TAP on the Border Agent.

### Parameters

No parameters.

### Examples

    ba ephemeralkey generate-tap
    989710128
    Done

### CLI and API References

- [otBorderAgentEphemeralKeyGenerateTap](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gad517d013c4b5c3bb9f1e413deb0da4ca)

## ba ephemeralkey port

Gets the UDP port used by Border Agent's Ephemeral Key Manager.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`.

The port is applicable if an ephemeral key is in use, i.e., the state is not `OT_BORDER_AGENT_STATE_DISABLED` or `OT_BORDER_AGENT_STATE_STOPPED`.

### Parameters

No parameters.

### Examples

    ba ephemeralkey port
    49153
    Done

### CLI and API References

- [otBorderAgentEphemeralKeyGetUdpPort](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga14fea2b94268900cd845cb61f9ed6e57)

## ba ephemeralkey start

Starts using an ephemeral key for a given timeout duration.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`.

An ephemeral key can only be set when `
https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gae22c5cc6460043718a3a11ee74243ee8
` is `OT_BORDER_AGENT_STATE_STOPPED`, i.e., enabled but not yet started. Otherwise, `OT_ERROR_INVALIDSTATE`*is returned. This means that setting the ephemeral key again while a previously set key is still in use will fail. Callers can stop the previous key by calling `
<a href="/reference/group/api-border-agent.html#group`* `_api-border-agent_1ga72943c0cccdf0f803b12263c878ccf64">otBorderAgentEphemeralKeyStop()
` before starting with a new key.

The Ephemeral Key Manager and the Border Agent service (which uses PSKc) can be enabled and used in parallel, as they use independent and separate DTLS transport and sessions.

The given `aKeyString` is used directly as the ephemeral PSK (excluding the trailing null `\0` character). Its length must be between `OT_BORDER_AGENT_MIN_EPHEMERAL_KEY_LENGTH` and `OT_BORDER_AGENT_MAX_EPHEMERAL_KEY_LENGTH`, inclusive. Otherwise `OT_ERROR_INVALID_ARGS` is returned.

When successfully set, the ephemeral key can be used only once by an external commissioner candidate to establish a secure session. After the commissioner candidate disconnects, the use of the ephemeral key is stopped. If the timeout expires, the use of the ephemeral key is stopped, and any connected session using the key is immediately disconnected.

The Ephemeral Key Manager limits the number of failed DTLS connections to 10 attempts. After the 10th failed attempt, the use of the ephemeral key is automatically stopped (even if the timeout has not yet expired).

### Parameters

```
ba ephemeralkey start keystring [timeout-in-msec] [port]
```

### Examples

    ba ephemeralkey start Z10X20g3J15w1000P60m16 5000 1234
    Done

### CLI and API References

- [otBorderAgentEphemeralKeyStart](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gaff59a0f7d28e5001a5a12f6515735536)

## ba ephemeralkey stop

Stops the ephemeral key use and disconnects any session using it.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`.

If there is no ephemeral key in use, calling this function has no effect.

### Parameters

No parameters.

### Examples

    ba ephemeralkey stop
    Done

### CLI and API References

- [otBorderAgentEphemeralKeyStop](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga72943c0cccdf0f803b12263c878ccf64)

## ba ephemeralkey validate-tap

Validates a given Thread Administration One-Time Passcode (TAP) string.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE` and `OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE`.

Validates that the TAP string has the proper length, contains digit characters \[`0`-`9`\], and validates the Verhoeff checksum.

### Parameters

```
ba ephemeralkey validate-tap tapstring
```

### Examples

    ba ephemeralkey validate-tap 989710128
    validated
    Done

### CLI and API References

- [otBorderAgentEphemeralKeyValidateTap](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga66097b3f798dfc62fa56dee99d21c410)

## ba evictcommissioner

Forcefully evicts the current active Thread Commissioner.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_COMMISSIONER_EVICTION_API_ENABLE`.

This is intended as an administrator tool to address a misbehaving or stale commissioner session that may be connected through a different Border Agent. It provides a mechanism to clear the single Active Commissioner role within the Thread network, allowing a new candidate to be selected as the Active commissioner.

### Parameters

No parameters.

### Examples

    ba evictcommissioner
    Done

### CLI and API References

- [otBorderAgentEvictActiveCommissioner](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga6c6aa076db2ec23d825778adfbaae40d)

## ba id (get,set)

Gets or sets the 16 bytes Border Router ID which can uniquely identifies the device among multiple BRs.

### Parameters

```
ba id [border-agent-id]
```

Use the optional `border-agent-id` argument to set the Border Agent ID.

### Examples

    ba id
    cb6da1e0c0448aaec39fa90f3d58f45c
    Done

    ba id 00112233445566778899aabbccddeeff
    Done

### CLI and API References

- [otBorderAgentGetId](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gacccad10d2b9a9f45b93f724894c6780f)
- [otBorderAgentSetId](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gaa0a606383ee895407acb24d4f278d2f8)

## ba port

Gets the UDP port of the Thread Border Agent service.

### Parameters

No parameters.

### Examples

    ba port
    49153
    Done

### CLI and API References

- [otBorderAgentGetUdpPort](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gad7f6d91b926eda80485d077ea53fa597)

## ba servicebasename

Sets the base name to construct the service instance name used when advertising the mDNS `_meshcop._udp` service by the Border Agent.

Requires the `OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_ENABLE` feature.

The name can also be configured using the `OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_BASE_NAME` configuration option (which is the recommended way to specify this name). This API is provided for projects where the name needs to be set after device initialization and at run-time.

Per the Thread specification, the service instance should be a user-friendly name identifying the device model or product. A recommended format is "VendorName ProductName".

To construct the full name and ensure name uniqueness, the OpenThread Border Agent module appends a suffix (e.g., " #XXXX" where "XXXX" represents the last two bytes of the device's Extended Address in hex) to the given base name. If a name conflict is detected on the network, an additional index may be appended (e.g., " #XXXX (1)").

Note that the same name will be used for the ephemeral key service `_meshcop-e._udp` when the ephemeral key feature is enabled and used.

### Parameters

No parameters.

### Examples

    ba servicebasename OpenThreadBorderAgent
    Done

### CLI and API References

- [otBorderAgentSetMeshCoPServiceBaseName](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1ga7709732123fee1d12cecbbdb25468ffe)

## ba sessions

Prints the list of Border Agent's sessions. Information per session:

- Peer socket address (IPv6 address and port).
- Whether or not the session is connected.
- Whether or not the session is accepted as full commissioner.
- Session lifetime in milliseconds (calculated from the time the session was first established).

<br />

### Parameters

No parameters.

### Examples

    ba sessions
    [fe80:0:0:0:cc79:2a29:d311:1aea]:9202 connected:yes commissioner:no lifetime:1860
    Done

### CLI and API References

- No associated API

## ba state

Prints the current state of the Border Agent service. Possible states are:

- `Disabled`: Border Agent service is disabled.
- `Inactive`: Border Agent service is enabled but not yet active.
- `Active`: Border Agent service is enabled and active. External commissioner can connect and establish secure DTLS sessions with the Border Agent using PSKc

<br />

### Parameters

No parameters.

### Examples

    ba state
    Active
    Done

### CLI and API References

- [otBorderAgentIsActive](https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gacd82e75a0a0f4d1a0605cc8e921a3a96)

## batracker (enable, disable)

Enables or disables the Border Agent Tracker.

Requires `OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE`.

When enabled, the tracker browses for the `_meshcop._udp` mDNS service to discover and track Border Agents on the infra-if network.

### Parameters

```
batracker enable|disable
```

### Examples

    batracker enable
    Done

    batracker disable
    Done

### CLI and API References

- [otBorderAgentTrackerSetEnabled](https://openthread.io/reference/group/api-border-agent-tracker#group__api-border-agent-tracker_1ga8c2381734a39a4ea2164617d2dd594fe)

## batracker agents

Outputs the list of discovered border agents. Information per agent includes:

- Service name
- Port number
- Host name
- TXT data (parsed human-readable information, or raw key/value pairs)
- Host addresses
- Milliseconds since agent was first discovered
- Milliseconds since the last change to agent info (port, addresses, TXT data)

<br />

By default, if `OPENTHREAD_CONFIG_BORDER_AGENT_TXT_DATA_PARSER_ENABLE` is enabled, the TXT data is parsed and displayed in a human-readable format.

The optional `rawtxt` argument forces the output of TXT data in its raw format (key/value pairs), even when the parser is enabled. If the parser is disabled, the raw format is always used.

### Parameters

```
batracker agents [rawtxt]
```

### Examples

    batracker agents
    ServiceName: OTBR-by-Google-a7215b46a4f1fd
        Port: 49154
        Host: otbe345eefb12f7f9c
        TxtData:
            RecordVersion: 1
            AgentId: e12f639deb66987e11a7215cd123
            ThreadVersion: 1.4.0
            NetworkName: ota7215b46a4f1fd
            ExtendedPanId: 16dd92d88a32e63f
            ActiveTimestamp: 1771558107
            PartitionId: 0x10930b04
            DomainName: DefaultDomain
            BbrSeqNum: 23
            BbrPort: 61631
            OmrPrefix: fd70:ad65:47d9:1::/64
            ExtAddress: 8e5d342e265b279c
            VendorName: Google
            ModelName: OTBR
            StateBitmap:
                ConnMode: pskc
                ThreadIfState: active
                Availability: high
                ThreadRole: leader
                BbrIsActive: yes
                BbrIsPrimary: yes
                EpskcSupported: yes
                MultiAilState: not-detected
                AdmitterSupported: yes
        Address(es):
            fd7c:af54:fada:4dcc:6aec:8aff:fe0d:e90b
        MilliSecondsSinceDiscovered: 3523
        MilliSecondsSinceLastChange: 3523
    Done

    batracker agents rawtxt
    ServiceName: OTBR-by-Google-be345eefb12f7f9c
        Port: 49152
        Host: otbe345eefb12f7f9c
        TxtData:
            id=4b21d3f4a431725048380698f3073a4b
            rv=31
            nn=4f70656e546872656164
            xp=dead00beef00cafe
            tv=312e342e30
            xa=be345eefb12f7f9c
            sb=00000820
            dn=44656661756c74446f6d61696e
        Address(es):
            fe80:0:0:0:108f:3188:ff96:8e9f
            fd7c:af54:fada:564d:7:fd6e:744c:e300
            fd7c:af54:fada:564d:d9:899d:1217:9e2
        MilliSecondsSinceDiscovered: 5237
        MilliSecondsSinceLastChange: 5237
    Done

### CLI and API References

- [otBorderAgentTxtDataParse](https://openthread.io/reference/group/api-border-agent-txt-data#group__api-border-agent-txt-data_1ga55e57cbacdbe3f60e18df3c0a3d63d14)
- [otBorderAgentTxtDataInfo](https://openthread.io/reference/struct/ot-border-agent-txt-data-info)

## batracker state

Shows the state of Border Agent Tracker, `running` or `inactive`.

### Parameters

No parameters.

### Examples

    batracker state
    running
    Done

### CLI and API References

- No associated API

## bbr

Returns the current Primary Backbone Router information for the Thread device.

### Parameters

No parameters.

### Examples

    bbr
    BBR Primary:
    server16: 0xE400
    seqno:    10
    delay:    120 secs
    timeout:  300 secs
    Done

    bbr
    BBR Primary: None
    Done

### CLI and API References

- No associated API

## bbr config (set)

Sets the local Backbone Router configuration [otBackboneRouterConfig](https://openthread.io/reference/struct/ot-backbone-router-config).

A Server Data Request message `SRV_DATA.ntf` is initiated automatically if BBR Dataset changes for Primary Backbone Router.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled.

`bbr register` should be issued explicitly to register Backbone Router service to Leader for Secondary Backbone Router.

### Parameters

```
bbr config [seqno seqno] [delay delay] [timeout timeout]
```

### Examples

    bbr config seqno 20 delay 30
    Done

### CLI and API References

- [otBackboneRouterSetConfig](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1ga0540ee430b926285444038522bf60162)

## bbr config

Gets the local Backbone Router configuration.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    bbr config
    seqno:    10
    delay:    120 secs
    timeout:  300 secs
    Done

### CLI and API References

- [otBackboneRouterGetConfig](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1ga7e281e18a8348af9d51e76f4bd322286)

## bbr disable

Enables or disables Backbone functionality.

If enabled, a Server Data Request message `SRV_DATA.ntf` is triggered for the attached device if there is no Backbone Router Service in the Thread Network Data.

If disabled, `SRV_DATA.ntf` is triggered if the Backbone Router is in the Primary state.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    bbr disable
    Done

### CLI and API References

- [otBackboneRouterSetEnabled](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1gad2a7d451581c2685904f60e42392fbff)

## bbr enable

Enables or disables Backbone functionality.

If enabled, a Server Data Request message `SRV_DATA.ntf` is triggered for the attached device if there is no Backbone Router Service in the Thread Network Data.

If disabled, `SRV_DATA.ntf` is triggered if the Backbone Router is in the Primary state.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    bbr enable
    Done

### CLI and API References

- [otBackboneRouterSetEnabled](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1gad2a7d451581c2685904f60e42392fbff)

## bbr jitter (get,set)

Gets or sets jitter (in seconds) for Backbone Router registration.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled.

### Parameters

```
bbr jitter [jitter]
```

### Examples

    bbr jitter
    20
    Done

    bbr jitter 10
    Done

### CLI and API References

- [otBackboneRouterGetRegistrationJitter](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1ga56cddac4c54b2f225ec46ae13c9e33b2)
- [otBackboneRouterSetRegistrationJitter](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1gad5715234b73c8267ed554c5ebce34198)

## bbr mgmt mlr listener add

Adds a Multicast Listener with a timeout value, in seconds.

Pass `0` to use the default MLR timeout.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE`, `OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE`, and `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` are enabled.

### Parameters

```
bbr mgmt mlr listener add ipaddress [timeout-seconds]
```

### Examples

    bbr mgmt mlr listener add ff04::1
    Done

    bbr mgmt mlr listener add ff04::2 300
    Done

### CLI and API References

- [otBackboneRouterMulticastListenerAdd](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1ga494eee98be65ab2215b0d8aba6d2f5b1)

## bbr mgmt mlr listener

Returns the Multicast Listeners with the [otBackboneRouterMulticastListenerInfo](https://openthread.io/reference/struct/ot-backbone-router-multicast-listener-info)`mTimeout` in seconds.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` and `OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE` are enabled.

### Parameters

No parameters.

### Examples

    bbr mgmt mlr listener
    ff04:0:0:0:0:0:0:abcd 3534000
    ff04:0:0:0:0:0:0:eeee 3537610
    Done

### CLI and API References

- [otBackboneRouterMulticastListenerGetNext](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1ga2b978415d39b03cdad25c8b254db1f72)

## bbr mgmt mlr listener clear

Clears the Multicast Listeners.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE`, `OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE`, and `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` are enabled.

### Parameters

No parameters.

### Examples

    bbr mgmt mlr listener clear
    Done

### CLI and API References

- [otBackboneRouterMulticastListenerClear](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1gaddabf7ce2f41c42b9be05bcbbec5353d)

## bbr mgmt mlr response

Configures the response status for the next Multicast Listener Registration.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE`, `OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE`, and `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` are enabled.

### Parameters

```
bbr mgmt mlr response status-code
```

For `status-code`, use:

- 0: ST_MLR_SUCCESS
- 2: ST_MLR_INVALID
- 3: ST_MLR_NO_PERSISTENT
- 4: ST_MLR_NO_RESOURCES
- 5: ST_MLR_BBR_NOT_PRIMARY
- 6: ST_MLR_GENERAL_FAILURE

<br />

### Examples

    bbr mgmt mlr response 2
    Done

### CLI and API References

- [otBackboneRouterConfigNextMulticastListenerRegistrationResponse](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1ga366b64db1546c58965a259b6c2bc0b8c)

## bbr register

Explicitly registers local Backbone Router configuration.

A Server Data Request message `SRV_DATA.ntf` is triggered for the attached device.

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    bbr register
    Done

### CLI and API References

- [otBackboneRouterRegister](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1gaebd6ea034f2e7374c0aeaf5fd0e1efcc)

## bbr state

Gets the Backbone Router [otBackboneRouterState](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1gafd3cf90619f918d83a510856edef58c1).

Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    bbr state
    Disabled
    Done

    bbr state
    Primary
    Done

    bbr state
    Secondary
    Done

### CLI and API References

- [otBackboneRouterGetState](https://openthread.io/reference/group/api-backbone-router#group__api-backbone-router_1gae073f54e228a87730dc075fcf8bb2d06)

## br disable

Disables the Border Routing Manager.

### Parameters

No parameters.

### Examples

    br disable
    Done

### CLI and API References

- [otBorderRoutingSetEnabled](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga0b17e9bc5360cfaa1b12cf51d271adbc)

## br enable

Enables the Border Routing Manager.

### Parameters

No parameters.

### Examples

    br enable
    Done

### CLI and API References

- [otBorderRoutingSetEnabled](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga0b17e9bc5360cfaa1b12cf51d271adbc)

## br ifaddrs

Get the infrastructure interface addresses. These are addresses used by the BR itself, for example, when sending Router Advertisements. Info per entry:

- IPv6 address
- Seconds since the last RA was sent from this BR using this address.

<br />

### Parameters

No parameters.

### Examples

    br ifaddrs
    fe80::896:228b:4ae0:8609, sec-since-use:15
    Done

### CLI and API References

- [otBorderRoutingGetNextIfAddrEntry](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga717de02c9cb222d6a9c6a60590e02a81)

## br infraif

Gets the interface index and running state of the configured infrastructure interface.

### Parameters

No parameters.

### Examples

    br infraif
    if-index:2, is-running:yes
    Done

### CLI and API References

- No associated API

## br init

Initializes the Border Routing Manager.

### Parameters

```
br init infrastructure-network-index is-running
```

### Examples

    br init 2 1
    Done

### CLI and API References

- [otBorderRoutingInit](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gac8da634c6f717dcd2070ae0ecb5ea9c9)

## br multiail (enable, disable)

Enables or disables the Multi-AIL Detector.

If `OPENTHREAD_CONFIG_BORDER_ROUTING_MULTI_AIL_DETECTION_AUTO_ENABLE_MODE` is enabled, the detector is enabled by default and starts running when the infra-if network is initialized and becomes active (running).

### Parameters

```
br multiail enable|disable
```

### Examples

    br multiail enable
    Done

### CLI and API References

- [otBorderRoutingSetMultiAilDetectionEnabled](https://openthread.io/reference/group/api-multi-ail-detection#group__api-multi-ail-detection_1ga0d5be3c53c35b4553fc84c067c5e92e9)

## br multiail

Gets the current detected state regarding multiple Adjacent Infrastructure Links (AILs).

It returns whether the detector currently believes that Border Routers (BRs) on the Thread mesh may be connected to different AILs.

The detection mechanism operates as follows: The detector monitors the number of peer BRs listed in the Thread Network Data (see `
https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gaf6cd4292a95114f9ddabf15845f26865
`) and compares this count with the number of peer BRs discovered by processing received Router Advertisement (RA) messages on its connected AIL. If the count derived from Network Data consistently exceeds the count derived from RAs for a detection duration of 10 minutes, it concludes that BRs are likely connected to different AILs. To clear state a shorter window of 1 minute is used.

The detection window of 10 minutes helps to avoid false positives due to transient changes. The detector uses 200 seconds for reachability checks of peer BRs (sending Neighbor Solicitation). Stale Network Data entries are also expected to age out within a few minutes. So a 10-minute detection time accommodates both cases.

While generally effective, this detection mechanism may get less reliable in scenarios with a large number of BRs, particularly exceeding ten. This is related to the "Network Data Publisher" mechanism, where BRs might refrain from publishing their external route information in the Network Data to conserve its limited size, potentially skewing the Network Data BR count.

### Parameters

No parameters.

### Examples

    br multiail
    not detected

### CLI and API References

- [otBorderRoutingIsMultiAilDetected](https://openthread.io/reference/group/api-multi-ail-detection#group__api-multi-ail-detection_1ga99470fa2a4af2669f19688fc36509fad)

## br multiail callback

Sets a callback function to be notified of changes in the multi-AIL detection state.

Subsequent calls to this function will overwrite the previous callback setting. Using `NULL` for `aCallback` will disable the callback.

### Parameters

```
br multiail callback enable|disable
```

### Examples

    br multiail callback enable
    Done

### CLI and API References

- [otBorderRoutingSetMultiAilCallback](https://openthread.io/reference/group/api-multi-ail-detection#group__api-multi-ail-detection_1ga45a045c3282206447aaa20660a155d42)

## br multiail state

Outputs full state of multi-AIL detector:

- Whether the detector is enabled.
- Whether the detector is running (when it is enabled and the infra-if interface is also active).
- Whether multi-AIL was detected.

<br />

### Parameters

No parameters.

### Examples

    br multiail state
    Enabled: yes
    Running: yes
    Detected: no
    Done

### CLI and API References

- No associated API

## br nat64prefix

Outputs both local and favored NAT64 prefixes.

### Parameters

No parameters.

### Examples

    br nat64prefix
    Local: fd14:1078:b3d5:b0b0:0:0::/96
    Favored: fd14:1078:b3d5:b0b0:0:0::/96 prf:low
    Done

### CLI and API References

- [otBorderRoutingGetNat64Prefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga1ca49c4b30d0664381590650926ad474)
- [otBorderRoutingGetFavoredNat64Prefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga6a0bcf88d120a8fc859f98a7505b1d75)

## br nat64prefix favored

Gets the currently favored NAT64 prefix.

The favored NAT64 prefix can be discovered from infrastructure link or can be this device's local NAT64 prefix.

### Parameters

No parameters.

### Examples

    br nat64prefix favored
    fd14:1078:b3d5:b0b0:0:0::/96 prf:low
    Done

### CLI and API References

- [otBorderRoutingGetFavoredNat64Prefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga6a0bcf88d120a8fc859f98a7505b1d75)

## br nat64prefix local

Gets the local NAT64 Prefix of the Border Router.

NAT64 Prefix might not be advertised in the Thread network.

`OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` must be enabled.

### Parameters

No parameters.

### Examples

    br nat64prefix local
    fd14:1078:b3d5:b0b0:0:0::/96
    Done

### CLI and API References

- [otBorderRoutingGetNat64Prefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga1ca49c4b30d0664381590650926ad474)

## br nat64prefixtable

Get the RA-discovered NAT64 prefixes by Border Routing Manager on the infrastructure link. Info per prefix entry:

- The prefix
- Milliseconds since last received Router Advertisement containing this prefix
- Prefix lifetime in seconds
- The router IPv6 address which advertises this prefix
- Flags in received Router Advertisement header:
  - M: Managed Address Config flag
  - O: Other Config flag
  - S: SNAC Router flag

<br />

### Parameters

No parameters.

### Examples

    br nat64prefixtable
    prefix:fd00:1234:5678:0:0:0::/96, ms-since-rx:29526, lifetime:1800, router:fe80:0:0:0:0:0:0:1 (M:0 O:0 S:1)
    prefix:fd11:2233:4455:0:0:0::/96, ms-since-rx:29527, lifetime:1800, router:fe80:0:0:0:0:0:0:1 (M:0 O:0 S:1)
    Done

### CLI and API References

- [otBorderRoutingGetNextNat64PrefixEntry](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga66060a2ff5437a36400dba6326f9bbfb)

## br omrconfig auto

Sets OMR prefix configuration mode to `auto` In this mode, the Border Routing Manager automatically selects and manages the OMR prefix.

### Parameters

No parameters.

### Examples

    br omrconfig auto
    Done

### CLI and API References

- No associated API

## br omrconfig

Outputs current OMR prefix configuration mode.

### Parameters

No parameters.

### Examples

    br omrconfig
    auto
    Done

    br omrconfig
    custom (fd00:0:0:0::/64, prf:med)
    Done

### CLI and API References

- [otBorderRoutingGetOmrConfig](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gab769ac646458dae995fcc79d36745956)

## br omrconfig custom

Sets OMR prefix configuration mode to `custom`. In this mode, a custom OMR prefix and its associated preference are used.

### Parameters

```
br omrconfig custom prefix [high|med|low]
```

### Examples

    br omrconfig custom fd00::/64 med
    Done

### CLI and API References

- No associated API

## br omrconfig disable

Sets OMR prefix configuration mode to `disable` which prevents the Border Routing Manager from adding any local or DHCPv6 PD OMR prefixes to the Network Data.

### Parameters

```
br omrconfig disable
```

### Examples

    br omrconfig disable
    Done

### CLI and API References

- No associated API

## br omrprefix

Outputs both local and favored OMR prefix.

### Parameters

No parameters.

### Examples

    br omrprefix
    Local: fdfc:1ff5:1512:5622::/64
    Favored: fdfc:1ff5:1512:5622::/64 prf:low
    Done

### CLI and API References

- [otBorderRoutingGetOmrPrefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga543d2be812eae47eabf023a9414be047)
- [otBorderRoutingGetFavoredOmrPrefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga2a7745ab18bb5d3f15d98928edebc2c9)

## br omrprefix favored

Gets the currently favored Off-Mesh-Routable (OMR) Prefix.

The favored OMR prefix can be discovered from Network Data or can be this device's local OMR prefix.

### Parameters

No parameters.

### Examples

    br omrprefix favored
    fdfc:1ff5:1512:5622::/64 prf:low
    Done

### CLI and API References

- [otBorderRoutingGetFavoredOmrPrefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga2a7745ab18bb5d3f15d98928edebc2c9)

## br omrprefix local

Gets the local Off-Mesh-Routable (OMR) Prefix, for example `fdfc:1ff5:1512:5622::/64`.

An OMR Prefix is a randomly generated 64-bit prefix that's published in the Thread network if there isn't already an OMR prefix. This prefix can be reached from the local Wi-Fi or Ethernet network.

> [!NOTE]
> **Note:** When DHCPv6 PD is enabled, the border router may publish the prefix from DHCPv6 PD.

### Parameters

No parameters.

### Examples

    br omrprefix local
    fdfc:1ff5:1512:5622::/64
    Done

### CLI and API References

- [otBorderRoutingGetOmrPrefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga543d2be812eae47eabf023a9414be047)

## br onlinkprefix

Outputs both local and favored on-link prefixes.

### Parameters

No parameters.

### Examples

    br onlinkprefix
    Local: fd41:2650:a6f5:0::/64
    Favored: 2600::0:1234:da12::/64
    Done

### CLI and API References

- [otBorderRoutingGetOnLinkPrefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga8429ad6ac6890e6d63ad977361bfea30)
- [otBorderRoutingGetFavoredOnLinkPrefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga9d7265c17ea801b22ee1b657e97ead3d)

## br onlinkprefix favored

Gets the currently favored On-Link Prefix.

The favored prefix is either a discovered on-link prefix on the infrastructure link or the local on-link prefix.

### Parameters

No parameters.

### Examples

    br onlinkprefix favored
    2600::0:1234:da12::/64
    Done

### CLI and API References

- [otBorderRoutingGetFavoredOnLinkPrefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga9d7265c17ea801b22ee1b657e97ead3d)

## br onlinkprefix local

Gets the local On-Link Prefix for the adjacent infrastructure link.

The local On-Link Prefix is a 64-bit prefix that's advertised on the infrastructure link if there isn't already a usable on-link prefix being advertised on the link.

### Parameters

No parameters.

### Examples

    br onlinkprefix local
    fd41:2650:a6f5:0::/64
    Done

### CLI and API References

- [otBorderRoutingGetOnLinkPrefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga8429ad6ac6890e6d63ad977361bfea30)

## br pd (enable,disable)

Enables / Disables DHCPv6 Prefix Delegation.

`OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE` must be enabled.

### Parameters

```
br pd enable|disable
```

### Examples

    br pd enable
    Done

    br pd disable
    Done

### CLI and API References

- [otBorderRoutingDhcp6PdSetEnabled](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gab3c94fb8a505857b1dd95978b1e270dd)

## br pd omrprefix

Gets the DHCPv6 Prefix Delegation (PD) provided off-mesh-routable (OMR) prefix.

Only mPrefix, mValidLifetime and mPreferredLifetime fields are used in the returned prefix info.

`OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE` must be enabled.

### Parameters

No parameters.

### Examples

    br pd omrprefix
    2001:db8:cafe:0:0/64 lifetime:1800 preferred:1800
    Done

### CLI and API References

- [otBorderRoutingGetPdOmrPrefix](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga9045b43f0d74891f69b63236d02b74e1)

## br pd state

Gets the current state of DHCPv6 Prefix Delegation.

Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE` to be enabled.

### Parameters

No parameters.

### Examples

    br pd state
    running
    Done

### CLI and API References

- [otBorderRoutingDhcp6PdGetState](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gab39e1553a0ed0e897982096885b598c2)

## br peers

Get the list of peer BRs found in Network Data entries. `OPENTHREAD_CONFIG_BORDER_ROUTING_TRACK_PEER_BR_INFO_ENABLE` is required. Peer BRs are other devices within the Thread mesh that provide external IP connectivity. A device is considered to provide external IP connectivity if at least one of the following conditions is met regarding its Network Data entries:

- It has added at least one external route entry.
- It has added at least one prefix entry with both the default-route and on-mesh flags set. The list of peer BRs specifically excludes the current device, even if its is itself acting as a BR. Info per BR entry:
- RLOC16 of the BR
- Age as the duration interval since this BR appeared in Network Data. It is formatted as `{hh}:{mm}:{ss}` for hours, minutes, seconds, if the duration is less than 24 hours. If the duration is 24 hours or more, the format is `{dd}d.{hh}:{mm}:{ss}` for days, hours, minutes, seconds.

<br />

### Parameters

No parameters.

### Examples

    br peers
    rloc16:0x5c00 age:00:00:49
    rloc16:0xf800 age:00:01:51
    Done

### CLI and API References

- [otBorderRoutingGetNextPrefixTableEntry](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga2dabe14d283c7955c5ea519cbf608ebe)

## br peers count

Returns the number of peer BRs found in the Network Data.

Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_TRACK_PEER_BR_INFO_ENABLE`.

Peer BRs are other devices within the Thread mesh that provide external IP connectivity. A device is considered to provide external IP connectivity if at least one of the following conditions is met regarding its Network Data entries:

- It has added at least one external route entry.
- It has added at least one prefix entry with both the default-route and on-mesh flags set.

The list of peer BRs specifically excludes the current device, even if it is itself acting as a BR.

### Parameters

No parameters.

### Examples

    br peers count
    2 min-age:00:00:47
    Done

### CLI and API References

- [otBorderRoutingCountPeerBrs](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gaf6cd4292a95114f9ddabf15845f26865)

## br prefixtable

Get the discovered prefixes by Border Routing Manager on the infrastructure link. Info per prefix entry:

- The prefix
- Whether the prefix is on-link or route
- Milliseconds since last received Router Advertisement containing this prefix
- Prefix lifetime in seconds
- Preferred lifetime in seconds only if prefix is on-link
- Route preference (low, med, high) only if prefix is route (not on-link)
- The router IPv6 address which advertises this prefix
- Flags in received Router Advertisement header:
  - M: Managed Address Config flag
  - O: Other Config flag
  - S: SNAC Router flag

<br />

### Parameters

No parameters.

### Examples

    br prefixtable
    prefix: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 S:1)
    prefix: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 S:1)
    Done

### CLI and API References

- [otBorderRoutingGetNextPrefixTableEntry](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga2dabe14d283c7955c5ea519cbf608ebe)

## br raoptions (set,clear)

Sets additional options to append at the end of emitted Router Advertisement (RA) messages.

The content of `aOptions` is copied internally, so it can be a temporary buffer (e.g., a stack allocated array).

Subsequent calls to this function overwrite the previously set value.

### Parameters

```
br raoptions options|clear
```

`br raoptions clear` passes a `nullptr` to [otBorderRoutingSetExtraRouterAdvertOptions](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gaaa5b7bc34a706ccdf7efaa40e103f8b6). Otherwise, you can pass the `options` byte as hex data.

### Examples

    br raoptions 0400ff00020001
    Done

    br raoptions clear
    Done

### CLI and API References

- [otBorderRoutingSetExtraRouterAdvertOptions](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gaaa5b7bc34a706ccdf7efaa40e103f8b6)

## br rdnsstable

Get the discovered Recursive DNS Server (RDNSS) address table by Border Routing Manager on the infrastructure link. Info per entry:

- IPv6 address
- Lifetime in seconds
- Milliseconds since last received Router Advertisement containing this address
- The router IPv6 address which advertised this prefix
- Flags in received Router Advertisement header:
  - M: Managed Address Config flag
  - O: Other Config flag
  - S: SNAC Router flag

<br />

### Parameters

No parameters.

### Examples

    br rdnsstable
    fd00:1234:5678::1, lifetime:500, ms-since-rx:29526, router:ff02:0:0:0:0:0:0:1 (M:0 O:0 S:1)
    fd00:aaaa::2, lifetime:500, ms-since-rx:107, router:ff02:0:0:0:0:0:0:1 (M:0 O:0 S:1)
    Done

### CLI and API References

- [otBorderRoutingGetNextRdnssAddrEntry](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gacb7e19e0a37f4a9a6a70cfed1e62563b)

## br rioprf (high,med,low)

Explicitly sets the preference to use when advertising Route Info Options (RIO) in Router Advertisement messages sent over the infrastructure link.

After a call to this function, BR will use the given preference for all its advertised RIOs. The preference can be cleared by calling `
https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga5d800a91422df0e4d3560d30c543caba
`.

### Parameters

```
br rioprf [high|med|low]
```

### Examples

    br rioprf low
    Done

### CLI and API References

- [otBorderRoutingSetRouteInfoOptionPreference](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gaaf33366522d3c25f88300a231ba848ff)

## br rioprf

Gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement messages sent over the infrastructure link.

The RIO preference is determined as follows:

- If explicitly set by user by calling `https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gaaf33366522d3c25f88300a231ba848ff`, the given preference is used.
- Otherwise, it is determined based on device's current role: Medium preference when in router/leader role and low preference when in child role.

### Parameters

No parameters.

### Examples

    br rioprf
    med
    Done

### CLI and API References

- [otBorderRoutingGetRouteInfoOptionPreference](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga81b977008d92c3602bdccc5cb648c86f)

## br rioprf clear

Clears a previously set preference value for advertised Route Info Options.

After a call to this function, 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.

### Parameters

No parameters.

### Examples

    br rioprf clear
    Done

### CLI and API References

- [otBorderRoutingClearRouteInfoOptionPreference](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga5d800a91422df0e4d3560d30c543caba)

## br routeprf (high,med,low)

Explicitly sets the preference of published routes in Network Data.

After a call to this function, BR will use the given preference. The preference can be cleared by calling `
https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga3ee36a96337d0ba07b45e378add3bbf4
`.

### Parameters

```
br routeprf [high|med|low]
```

### Examples

    br routeprf low
    Done

### CLI and API References

- [otBorderRoutingSetRoutePreference](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gad888777e797f565007d585a7f81f0a17)

## br routeprf

Gets the current preference used for published routes in Network Data.

The preference is determined as follows:

- If explicitly set by user by calling `https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gad888777e797f565007d585a7f81f0a17`, the given preference is used.
- Otherwise, it is determined automatically by `RoutingManager` based on the device's role and link quality.

### Parameters

No parameters.

### Examples

    br routeprf
    med
    Done

### CLI and API References

- [otBorderRoutingGetRoutePreference](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gafc0666d0a7fa1dca3f9293f56ecb8626)

## br routeprf clear

Clears a previously set preference value for published routes in Network Data.

After a call to this function, BR will determine the preference automatically based on the device's role and link quality (to the parent when acting as end-device).

### Parameters

No parameters.

### Examples

    br routeprf clear
    Done

### CLI and API References

- [otBorderRoutingClearRoutePreference](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1ga3ee36a96337d0ba07b45e378add3bbf4)

## br routers

Get the list of discovered routers by Border Routing Manager on the infrastructure link. Info per router:

- The router IPv6 address
- Flags in received Router Advertisement header:
  - M: Managed Address Config flag
  - O: Other Config flag
  - S: SNAC Router flag (indicates whether the router is a stub router)
- Milliseconds since last received message from this router
- Reachability flag: A router is marked as unreachable if it fails to respond to multiple Neighbor Solicitation probes.
- Age: Duration interval since this router was first discovered. It is formatted as `{hh}:{mm}:{ss}` for hours, minutes, seconds, if the duration is less than 24 hours. If the duration is 24 hours or more, the format is `{dd}d.{hh}:{mm}:{ss}` for days, hours, minutes, seconds.
- `(this BR)` is appended when the router is the local device itself.
- `(peer BR)` is appended when the router is likely a peer BR connected to the same Thread mesh. This requires `OPENTHREAD_CONFIG_BORDER_ROUTING_TRACK_PEER_BR_INFO_ENABLE`.

<br />

### Parameters

No parameters.

### Examples

    br routers
    ff02:0:0:0:0:0:0:1 (M:0 O:0 S:1) ms-since-rx:1505 reachable:yes age:00:18:13
    Done

### CLI and API References

- [otBorderRoutingGetNextRouterEntry](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gae803f34f39124d89e07e63c366d0f3cb)

## br state

Gets the current state of Border Routing Manager.

### Parameters

No parameters.

### Examples

    br state
    running

### CLI and API References

- [otBorderRoutingGetState](https://openthread.io/reference/group/api-border-routing#group__api-border-routing_1gab5fe89dca764c317ffb4ea922fca8851)

## bufferinfo

Gets the current message buffer information.

- `total` displays the total number of message buffers in pool.
- `free` displays the number of free message buffers.
- `max-used` displays max number of used buffers at the same time since OT stack initialization or last `bufferinfo reset`.

<br />

Next, the CLI displays info about different queues used by the OpenThread stack, for example `6lo send`. Each line after the queue represents info about a queue:

- The first number shows number messages in the queue.
- The second number shows number of buffers used by all messages in the queue.
- The third number shows total number of bytes of all messages in the queue.

<br />

### Parameters

No parameters.

### Examples

    bufferinfo
    total: 40
    free: 40
    max-used: 5
    6lo send: 0 0 0
    6lo reas: 0 0 0
    ip6: 0 0 0
    mpl: 0 0 0
    mle: 0 0 0
    coap: 0 0 0
    coap secure: 0 0 0
    application coap: 0 0 0
    Done

### CLI and API References

- [otMessageGetBufferInfo](https://openthread.io/reference/group/api-message#group__api-message_1ga46a0fcbffb8239ea24e343c2f154cc0e)

## bufferinfo reset

Reset the Message Buffer information counter tracking the maximum number buffers in use at the same time.

This resets `mMaxUsedBuffers` in `
https://openthread.io/reference/struct/ot-buffer-info
`.

### Parameters

No parameters.

### Examples

    bufferinfo reset
    Done

### CLI and API References

- [otMessageResetBufferInfo](https://openthread.io/reference/group/api-message#group__api-message_1ga55b5343c6dd72682d3d1785bb30fe5d0)

## ccathreshold (get,set)

Gets or sets the CCA threshold in dBm measured at the antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.

### Parameters

```
ccathreshold [CCA-threshold-dBm]
```

Use the optional `CCA-threshold-dBm` argument to set the CCA threshold.

### Examples

    ccathreshold
    -75 dBm
    Done

    ccathreshold -62
    Done

### CLI and API References

- [otPlatRadioGetCcaEnergyDetectThreshold](https://openthread.io/reference/group/radio-config#group__radio-config_1gabb70b6dad5ff85f48957bbea7adaa89d)
- [otPlatRadioSetCcaEnergyDetectThreshold](https://openthread.io/reference/group/radio-config#group__radio-config_1ga7aa66dc7e995abdcaceac2b73e614ffc)

## channel (get,set)

Gets or sets the IEEE 802.15.4 Channel value.

### Parameters

```
channel [channel-num]
```

Use `channel-num` to set the channel.

### Examples

    channel
    11
    Done

    channel 11
    Done

### CLI and API References

- No associated API

## channel manager auto

Enables or disables the auto-channel-selection functionality for network channel.

When enabled, `ChannelManager` will periodically invoke a `RequestChannelSelect(false)`. The period interval can be set by `
https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1ga3d540882eb8135dd8a7e47cdaede80e8
`.

`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` or `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE`, and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required.

### Parameters

```
channel manager auto enable
```

`1` is a boolean to `enable`.

### Examples

    channel manager auto 1
    channel manager auto 1
    Done

### CLI and API References

- [otChannelManagerSetAutoChannelSelectionEnabled](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1ga99fd4da6016407af18f84e45cbd5daa2)

## channel manager change

Requests a Thread network channel change.

The network switches to the given channel after a specified delay (see [otChannelManagerSetDelay()](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1gabecf850105d3adbf5b7fc8edf783de7d)). The channel change is performed by updating the Pending Operational Dataset.

A subsequent call will cancel an ongoing previously requested channel change.

`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` is required.

### Parameters

```
channel manager change channel-num
```

### Examples

    channel manager change 11
    channel manager change 11
    Done

### CLI and API References

- [otChannelManagerRequestChannelChange](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1ga795e257c961a1933adb0b1cda52af64f)

## channel manager

Get the channel manager state. `OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` or `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE` is required.

### Parameters

No parameters.

### Examples

    channel manager
    channel: 11
    auto: 1
    delay: 120
    interval: 10800
    supported: { 11-26}
    favored: { 11-26}
    Done

### CLI and API References

- [otChannelManagerGetRequestedChannel](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1gad9e3ee77176366732333ccd0654bc52b)

## channel manager delay

Sets the delay (in seconds) used for a network channel change.

Only available on FTDs. The delay should preferably be longer than the maximum data poll interval used by all Sleepy End Devices within the Thread network.

`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required.

### Parameters

```
channel manager delay delay-seconds
```

### Examples

    channel manager delay 120
    channel manager delay 120
    Done

### CLI and API References

- [otChannelManagerSetDelay](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1gabecf850105d3adbf5b7fc8edf783de7d)

## channel manager favored

Sets the favored channel mask.

`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` or `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE`, and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required.

### Parameters

```
channel manager favored mask
```

### Examples

    channel manager favored 0x7fffc00
    channel manager favored 0x7fffc00
    Done

### CLI and API References

- [otChannelManagerSetFavoredChannels](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1ga5552292ac8730b47743c7e2e56387bfb)

## channel manager interval

Sets the period interval (in seconds) used by auto-channel-selection functionality.

`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` or `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE`, and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required.

### Parameters

```
channel manager interval interval-seconds
```

### Examples

    channel manager interval 10800
    channel manager interval 10800
    Done

### CLI and API References

- [otChannelManagerSetAutoChannelSelectionInterval](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1ga3d540882eb8135dd8a7e47cdaede80e8)

## channel manager select

Requests that `ChannelManager` checks and selects a new channel and starts a channel change.

Unlike the `
https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1ga795e257c961a1933adb0b1cda52af64f
` where the channel must be given as a parameter, this function asks the `ChannelManager` to select a channel by itself (based on collected channel quality info).

Once called, the Channel Manager will perform the following 3 steps:

1) `ChannelManager` decides if the channel change would be helpful. This check can be skipped if `aSkipQualityCheck` is set to true (forcing a channel selection to happen and skipping the quality check). This step uses the collected link quality metrics on the device (such as CCA failure rate, frame and message error rates per neighbor, etc.) to determine if the current channel quality is at the level that justifies a channel change.

2) If the first step passes, then `ChannelManager` selects a potentially better channel. It uses the collected channel quality data by `ChannelMonitor` module. The supported and favored channels are used at this step. (see `
https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1gafed3b8616573e36ec18c9c4811ddeb9a
` and `
https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1ga5552292ac8730b47743c7e2e56387bfb
`).

3) If the newly selected channel is different from the current channel, `ChannelManager` requests/starts the channel change process (internally invoking a `RequestChannelChange()`).

`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` or `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE`, and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required.

### Parameters

```
channel manager select skip-quality-check
```

Use a `1` or `0` for the boolean `skip-quality-check`.

### Examples

    channel manager select 1
    channel manager select 1
    Done

### CLI and API References

- [otChannelManagerRequestChannelSelect](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1gabcc418c7fc63d10fa885d5937e52fcaf)

## channel manager supported

Sets the supported channel mask.

`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` or `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE`, and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required.

### Parameters

```
channel manager supported mask
```

### Examples

    channel manager supported 0x7fffc00
    channel manager supported 0x7fffc00
    Done

### CLI and API References

- [otChannelManagerSetSupportedChannels](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1gafed3b8616573e36ec18c9c4811ddeb9a)

## channel manager threshold

Sets the CCA failure rate threshold.

`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` or `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE`, and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required.

### Parameters

```
channel manager threshold threshold-percent
```

Use a hex value for `threshold-percent`. `0` maps to 0% and `0xffff` maps to 100%.

### Examples

    channel manager threshold 0xffff
    channel manager threshold 0xffff
    Done

### CLI and API References

- [otChannelManagerSetCcaFailureRateThreshold](https://openthread.io/reference/group/api-channel-manager#group__api-channel-manager_1ga9556434f82e377a4263113eb285050c6)

## channel monitor

Get the current channel monitor state and channel occupancy. `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` is required.

### Parameters

No parameters.

### Examples

    channel monitor
    enabled: 1
    interval: 41000
    threshold: -75
    window: 960
    count: 10552
    occupancies:
    ch 11 (0x0cb7)  4.96% busy
    ch 12 (0x2e2b) 18.03% busy
    ch 13 (0x2f54) 18.48% busy
    ch 14 (0x0fef)  6.22% busy
    ch 15 (0x1536)  8.28% busy
    ch 16 (0x1746)  9.09% busy
    ch 17 (0x0b8b)  4.50% busy
    ch 18 (0x60a7) 37.75% busy
    ch 19 (0x0810)  3.14% busy
    ch 20 (0x0c2a)  4.75% busy
    ch 21 (0x08dc)  3.46% busy
    ch 22 (0x101d)  6.29% busy
    ch 23 (0x0092)  0.22% busy
    ch 24 (0x0028)  0.06% busy
    ch 25 (0x0063)  0.15% busy
    ch 26 (0x058c)  2.16% busy
    Done

### CLI and API References

- No associated API

## channel monitor start

Start the channel monitor. OT CLI sends a boolean value of `true` to [otChannelMonitorSetEnabled](https://openthread.io/reference/group/api-channel-monitor#group__api-channel-monitor_1gad15af69b1c22e84ad9fbf1fbde931924). `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` is required.

### Parameters

No parameters.

### Examples

    channel monitor start
    channel monitor start
    Done

### CLI and API References

- [otChannelMonitorSetEnabled](https://openthread.io/reference/group/api-channel-monitor#group__api-channel-monitor_1gad15af69b1c22e84ad9fbf1fbde931924)

## channel monitor stop

Stop the channel monitor. OT CLI sends a boolean value of `false` to [otChannelMonitorSetEnabled](https://openthread.io/reference/group/api-channel-monitor#group__api-channel-monitor_1gad15af69b1c22e84ad9fbf1fbde931924). `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` is required.

### Parameters

No parameters.

### Examples

    channel monitor stop
    channel monitor stop
    Done

### CLI and API References

- [otChannelMonitorSetEnabled](https://openthread.io/reference/group/api-channel-monitor#group__api-channel-monitor_1gad15af69b1c22e84ad9fbf1fbde931924)

## channel preferred

Gets the radio preferred channel mask that the device prefers to form on.

### Parameters

No parameters.

### Examples

    channel preferred
    0x7fff800
    Done

### CLI and API References

- [otPlatRadioGetPreferredChannelMask](https://openthread.io/reference/group/radio-operation#group__radio-operation_1gaa6934f9af8044f1450f85bebec578734)

## channel supported

Get the radio supported channel mask that the device is allowed to be on.

### Parameters

No parameters.

### Examples

    channel supported
    0x7fff800
    Done

### CLI and API References

- [otPlatRadioGetSupportedChannelMask](https://openthread.io/reference/group/radio-operation#group__radio-operation_1ga9507ef1c7d93a8c3bc0f004a4e16cec1)

## child (id)

Gets diagnostic information for an attached Child by its Child ID or RLOC16.

### Parameters

```
child child-id
```

### Examples

    child 1
    Child ID: 1
    Rloc: 9c01
    Ext Addr: e2b3540590b0fd87
    Mode: rn
    CSL Synchronized: 1
    CSL Period: 3125
    Net Data: 184
    Timeout: 100
    Age: 0
    Link Quality In: 3
    RSSI: -20
    Supervision Interval: 129
    Done

### CLI and API References

- [otThreadGetChildInfoById](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga431ac6e86b0f87a94794b0118f0fe515)

## child list

Returns a list of attached Child IDs.

### Parameters

No parameters.

### Examples

    child list
    1 2 3 6 7 8
    Done

### CLI and API References

- [otThreadGetChildInfoByIndex](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga63d7b5071ddf136657ce8f13358ea129)

## child table

Prints a table of the attached children.

### Parameters

No parameters.

### Examples

    child table
    | ID  | RLOC16 | Timeout    | Age        | LQ In | C_VN |R|D|N|Ver|CSL|QMsgCnt| Extended MAC     |
    +---+---+---+---+---+---+-+-+-+---+---+---+---+
    |   1 | 0xc801 |        240 |         24 |     3 |  131 |1|0|0|  3| 0 |     0 | 4ecede68435358ac |
    |   2 | 0xc802 |        240 |          2 |     3 |  131 |0|0|0|  3| 1 |     0 | a672a601d2ce37d8 |
    Done

### CLI and API References

- [otThreadGetChildInfoByIndex](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga63d7b5071ddf136657ce8f13358ea129)

## childip

Gets a list of IP addresses stored for MTD children.

### Parameters

No parameters.

### Examples

    childip
    3401: fdde:ad00:beef:0:3037:3e03:8c5f:bc0c
    Done

### CLI and API References

- [otThreadGetChildNextIp6Address](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gad4c9e17a07de6229b0dd1371f822258e)

## childip max (set)

Sets or restores the maximum number of IP addresses that each MTD child may register with this device as parent.

Pass `0` to clear the setting and restore the default.

Available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.

> [!NOTE]
> **Note:** Only used by Thread Test Harness to limit the address registrations of the reference parent in order to test the MTD DUT reaction.

### Parameters

```
childip max count
```

### Examples

    childip max 2
    Done

### CLI and API References

- [otThreadSetMaxChildIpAddresses](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gae7a2e1e6e28fa2c67ec4fb6ad10b6104)

## childip max

Gets the maximum number of IP addresses that each MTD child may register with this device as parent.

### Parameters

No parameters.

### Examples

    childip max
    4
    Done

### CLI and API References

- [otThreadGetMaxChildIpAddresses](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga4e03c15d83bf178a96078c803ac1208c)

## childmax (set)

Sets the maximum number of children currently allowed.

This parameter can only be set when Thread protocol operation has been stopped.

### Parameters

```
childmax count
```

### Examples

    childmax 2
    Done

### CLI and API References

- [otThreadSetMaxAllowedChildren](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gab8a0dafce0a78b73b535b36285bf6c23)

## childmax

Gets the maximum number of children currently allowed.

### Parameters

No parameters.

### Examples

    childmax
    5
    Done

### CLI and API References

- [otThreadGetMaxAllowedChildren](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga73b08e8d3a7424cca1640aa44f09ebf3)

## childrouterlinks (get,set)

Gets or sets the MLE_CHILD_ROUTER_LINKS value.

### Parameters

```
childrouterlinks [links]
```

### Examples

    childrouterlinks
    16
    Done

    childrouterlinks 16
    Done

### CLI and API References

- [otThreadGetChildRouterLinks](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga712a3665998239e56f3d1d7aa45f79ae)
- [otThreadSetChildRouterLinks](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga6ec8ebba6657946ffe7527f078ece636)

## childsupervision checktimeout (set)

Sets the supervision check timeout interval (in seconds) on the child.

### Parameters

```
childsupervision checktimeout timeout-seconds
```

### Examples

    childsupervision checktimeout 30
    Done

### CLI and API References

- [otChildSupervisionSetCheckTimeout](https://openthread.io/reference/group/api-child-supervision#group__api-child-supervision_1ga56528456df5809364681d25cf263ceb0)

## childsupervision checktimeout

Gets the supervision check timeout interval (in seconds) on the child.

If the device is a sleepy child and it does not hear from its parent within the specified check timeout, it initiates the re-attach process (MLE Child Update Request/Response exchange with its parent).

### Parameters

No parameters.

### Examples

    childsupervision checktimeout
    30
    Done

### CLI and API References

- [otChildSupervisionGetCheckTimeout](https://openthread.io/reference/group/api-child-supervision#group__api-child-supervision_1ga45e1b9662b0586c190c86581fd990009)

## childsupervision interval (set)

Sets the child supervision interval (in seconds) on the child.

### Parameters

```
childsupervision interval interval-seconds
```

### Examples

    childsupervision interval 30
    Done

### CLI and API References

- [otChildSupervisionSetInterval](https://openthread.io/reference/group/api-child-supervision#group__api-child-supervision_1ga6b5a90ee55c37a1c66020539ec9b187b)

## childsupervision interval

Gets the Child Supervision interval (in seconds) on a child.

Child Supervision feature provides a mechanism for parent to ensure that a message is sent to each sleepy child within the supervision interval. If there is no transmission to the child within the supervision interval, OpenThread enqueues and sends a Child Supervision Message to the child.

### Parameters

No parameters.

### Examples

    childsupervision interval
    30
    Done

### CLI and API References

- [otChildSupervisionGetInterval](https://openthread.io/reference/group/api-child-supervision#group__api-child-supervision_1ga3faa336529ff0d5528bfbbbfcfd1cfc8)

## childtimeout (set)

Sets the Thread Child Timeout (in seconds) used when operating in the Child role.

### Parameters

```
childtimeout timeout-seconds
```

### Examples

    childtimeout 300
    Done

### CLI and API References

- [otThreadSetChildTimeout](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaf22e732ad154f5ca833957a1396d2e19)

## childtimeout

Gets the Thread Child Timeout (in seconds) used when operating in the Child role.

### Parameters

No parameters.

### Examples

    childtimeout
    300
    Done

### CLI and API References

- [otThreadGetChildTimeout](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaf94d0e97079b92c925fa32a4c41c1cbd)

## coap cancel

Cancels an existing observation subscription to a remote resource on the CoAP server.

> [!NOTE]
> **Note:** This command is available only when `OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE` is set.

### Parameters

No parameters.

### Examples

    coap cancel
    Done

### CLI and API References

- [coap observe](https://openthread.io/reference/cli/commands#coap_observe)

## coap delete

Deletes the specified CoAP resource.

### Parameters

```
coap delete address uri-path [type] [payload]
```

- `address`: IPv6 address of the CoAP server.
- `uri-path`: URI path of the resource.
- `type`:
  - `con`: Confirmable
  - `non-con`: Non-confirmable (default)
- `payload`: The CoAP payload string. For example, `hellothere`.

### Examples

    coap delete fdde:ad00:beef:0:2780:9423:166c:1aac test-resource con hellothere
    Done

### CLI and API References

- No associated API

## coap get

Gets information about the specified CoAP resource on the CoAP server.

### Parameters

```
coap get address uri-path [type]
```

- `address`: IPv6 address of the CoAP server.
- `uri-path`: URI path of the resource.
- `type`:
  - `con`: Confirmable
  - `non-con`: Non-confirmable (default)
  - `block-`: Use this option, followed by the block-wise value, if the response should be transferred block-wise. Valid values are: `block-16`, `block-32`, `block-64`, `block-128`, `block-256`, `block-512`, or `block-1024`.

### Examples

    coap get fdde:ad00:beef:0:2780:9423:166c:1aac test-resource
    Done

    coap get fdde:ad00:beef:0:2780:9423:166c:1aac test-resource block-1024
    Done

### CLI and API References

- No associated API

## coap observe

Triggers a subscription request which allows the CoAP client to observe the specified resource on the CoAP server for possible changes in its state.

> [!NOTE]
> **Note:** This command is available only when `OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE` is set.

### Parameters

```
coap observe address uri-path [type]
```

- `address`: IPv6 address of the CoAP server.
- `uri-path`: URI path of the resource.
- `type`:
  - `con`: Confirmable
  - `non-con`: Non-confirmable (default).

### Examples

    coap observe fdde:ad00:beef:0:2780:9423:166c:1aac test-resource
    Done

### CLI and API References

- No associated API

## coap parameters(get,set)

Gets current CoAP parameter values if the command is run with no optional parameters.

Sets the CoAP parameters either to their default values or to the values you specify, depending on the syntax chosen.

### Parameters

```
coap parameters type [default | ack_timeout ack_random_factor_numerator ack_random_factor_denominator max_retransmit]
```

- `type`: `request` for CoAP requests, or `response` for CoAP responses. If no more parameters are given, the command prints the current configuration.
- `default`: Sets the transmission parameters to the following default values:
  - `ack_timeout`: 2000 milliseconds
  - `ack_random_factor_numerator`: 3
  - `ack_random_factor_denominator`: 2
  - `max_retransmit`: 4
- `ack_timeout`: The `ACK_TIMEOUT` (0-UINT32_MAX) in milliseconds. Refer to RFC7252.
- `ack_random_factor_numerator`: The `ACK_RANDOM_FACTOR` numerator, with possible values of 0-255. Refer to RFC7252.
- `ack_random_factor_denominator`: The `ACK_RANDOM_FACTOR` denominator, with possible values of 0-255. Refer to RFC7252.
- `max_retransmit`: The `MAX_RETRANSMIT` (0-255). Refer to RFC7252.

### Examples

    coap parameters request
    Transmission parameters for request:
    ACK_TIMEOUT=1000 ms, ACK_RANDOM_FACTOR=255/254, MAX_RETRANSMIT=2
    Done

    coap parameters request default
    Transmission parameters for request:
    default
    Done

    coap parameters request 1000 255 254 2
    Transmission parameters for request:
    ACK_TIMEOUT=1000 ms, ACK_RANDOM_FACTOR=255/254, MAX_RETRANSMIT=2
    Done

### CLI and API References

- No associated API

## coap post

Creates the specified CoAP resource. For more information, refer to [Test Connectivity to a Constrained Application Protocol (CoAP) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coap).

### Parameters

```
coap post address uri-path [type] [payload]
```

- `address`: IPv6 address of the CoAP server.
- `uri-path`: URI path of the resource.
- `type`:
  - `con`: Confirmable
  - `non-con`: Non-confirmable (default)
  - `block-`: Use this option, followed by the block-wise value, to send blocks with a randomly generated number of bytes for the payload. Valid values are: `block-16`, `block-32`, `block-64`, `block-128`, `block-256`, `block-512`, or `block-1024`.
- `payload`: CoAP payload request, which if used is either a string or an integer, depending on the `type`. If the `type` is `con` or `non-con`, the `payload` parameter is optional. If you leave out the `payload` parameter, an empty payload is sent. However, If you use the `payload` parameter, its value must be a string, such as `hellothere`. If the `type` is `block-`, the value of the`payload` parameter must be an integer that specifies the number of blocks to send. The `block-` type requires `OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE` to be set.

### Examples

    coap post fdde:ad00:beef:0:2780:9423:166c:1aac test-resource con hellothere
    Done

    coap post fdde:ad00:beef:0:2780:9423:166c:1aac test-resource block-1024 10
    Done

### CLI and API References

- No associated API

## coap put

Modifies the specified CoAP resource. For more information, refer to [Test Connectivity to a Constrained Application Protocol (CoAP) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coap).

### Parameters

```
coap put address uri-path [type] [payload]
```

- `address`: IPv6 address of the CoAP server.
- `uri-path`: URI path of the resource.
- `type`:
  - `con`: Confirmable
  - `non-con`: Non-confirmable (default)
  - `block-`: Use this option, followed by the block-wise value, to send blocks with a randomly generated number of bytes for the payload. Valid values are: `block-16`, `block-32`, `block-64`, `block-128`, `block-256`, `block-512`, or `block-1024`.
- `payload`: CoAP payload request, which if used is either a string or an integer, depending on the `type`. If the `type` is `con` or `non-con`, the `payload` parameter is optional. If you leave out the `payload` parameter, an empty payload is sent. However, If you use the `payload` parameter, its value must be a string, such as `hellothere`. If the `type` is `block-`, the value of the`payload` parameter must be an integer that specifies the number of blocks to send. The `block-` type requires `OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE` to be set.

### Examples

    coap put fdde:ad00:beef:0:2780:9423:166c:1aac test-resource con hellothere
    Done

    coap put fdde:ad00:beef:0:2780:9423:166c:1aac test-resource block-1024 10
    Done

### CLI and API References

- No associated API

## coap resource (get,set)

Gets or sets the URI path of the CoAP server resource.

### Parameters

```
coap resource [uri-path]
```

### Examples

    coap resource test-resource
    Done

    coap resource
    test-resource
    Done

### CLI and API References

- [otCoapAddResource](https://openthread.io/reference/group/api-coap#group__api-coap_1ga471a523886a4939948ccbf2d7e974a90)
- [otCoapAddBlockWiseResource](https://openthread.io/reference/group/api-coap#group__api-coap_1ga5e5f1fca47e4aaee4c69980d1634b92e)

## coap set

Sets the content sent by the resource on the CoAP server. If a CoAP client is observing the resource, a notification is sent to that client.

### Parameters

```
coap set new-content
```

### Examples

    coap set Testing123
    Done

### CLI and API References

- [coap observe](https://openthread.io/reference/cli/commands#coap_observe)
- [otCoapMessageInit](https://openthread.io/reference/group/api-coap#group__api-coap_1ga7098239d82616643f664a04bc17aa509)
- [otCoapNewMessage](https://openthread.io/reference/group/api-coap#group__api-coap_1ga448efdbadf8a2102e9d22f1f8dddde1f)

## coap start

Starts the CoAP server. For more information, refer to [Test Connectivity to a Constrained Application Protocol (CoAP) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coap).

### Parameters

No parameters.

### Examples

    coap start
    Done

### CLI and API References

- [otCoapStart](https://openthread.io/reference/group/api-coap#group__api-coap_1gaf1d39534c0c1ac4acf6af151dbd5788e)

## coap stop

Stops the CoAP server.

### Parameters

No parameters.

### Examples

    coap stop
    Done

### CLI and API References

- [otCoapStop](https://openthread.io/reference/group/api-coap#group__api-coap_1ga63f53a430194cc0ed60cb7687a779a1e)

## coaps connect

Initializes a Datagram Transport Layer Security (DTLS) session with a peer. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

```
coaps connect address
```

The `address` parameter is the IPv6 address of the peer.

### Examples

    coaps connect fdde:ad00:beef:0:9903:14b:27e0:5744
    Done
    coaps connected

### CLI and API References

- [otCoapSecureConnect](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1ga9319d2fbfd22822e6c41f7aea348fa35)

## coaps delete

The CoAPS payload string to delete.

### Parameters

```
coaps delete uri-path [type] [payload]
```

- `uri-path`: URI path of the resource.
- `type`:
  - `con`: Confirmable
  - `non-con`: Non-confirmable (default)
- `payload`: CoAPS payload request.

### Examples

    coaps delete test-resource con hellothere
    Done

### CLI and API References

- No associated API

## coaps disconnect

Stops the DTLS session.

### Parameters

No parameters.

### Examples

    coaps disconnect
    coaps disconnected
    Done

### CLI and API References

- [otCoapSecureDisconnect](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1ga120bb4ea498c3495cd409a1d6221ee6f)

## coaps get

Gets information about the specified CoAPS resource on the CoAPS server. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

```
coaps get uri-path [type]
```

- `uri-path`: URI path of the resource.
- `type`:
  - `con`: Confirmable
  - `non-con`: Non-confirmable (default)
  - `block-`: Use this option, followed by the block-wise value, if the response should be transferred block-wise. Valid values are: `block-16`, `block-32`, `block-64`, `block-128`, `block-256`, `block-512`, or `block-1024`.

### Examples

    coaps get test-resource
    Done

    coaps get test-resource block-1024
    Done

### CLI and API References

- No associated API

## coaps isclosed

Indicates if the CoAP Secure service is closed. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

No parameters.

### Examples

    coaps isclosed
    no
    Done

### CLI and API References

- [otCoapSecureIsClosed](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1gaf95c9ad1be0c02a2a53718c96b1c8926)

## coaps isconnactive

Indicates if the CoAP Secure service connection is active (either already connected or in the process of establishing a connection). For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

No parameters.

### Examples

    coaps isconnactive
    yes
    Done

### CLI and API References

- [otCoapSecureIsConnectionActive](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1ga12ee809d7363028f5bdf6e27811a0e79)

## coaps isconnected

Indicates if the CoAP Secure service is connected. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

No parameters.

### Examples

    coaps isconnected
    yes
    Done

### CLI and API References

- [otCoapSecureIsConnected](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1ga141c2451d0897088153d8bd1bd986367)

## coaps post

Creates the specified CoAPS resource. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

```
uri-path [type] [payload]
```

- `uri-path`: URI path of the resource.
- `type`:
  - `con`: Confirmable
  - `non-con`: Non-confirmable (default)
  - `block-`: Use this option, followed by the block-wise value, to send blocks with a randomly generated number of bytes for the payload. Valid values are: `block-16`, `block-32`, `block-64`, `block-128`, `block-256`, `block-512`, or `block-1024`.
- `payload`: CoAPS payload request, which if used is either a string or an integer, depending on the `type`. If the `type` is `con` or `non-con`, the payload parameter is optional. If you leave out the payload parameter, an empty payload is sent. However, If you use the payload parameter, its value must be a string, such as `hellothere`. If the `type` is `block-`, the value of the payload parameter must be an integer that specifies the number of blocks to send. The `block-` type requires `OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE` to be set.

### Examples

    coaps post test-resource con hellothere
    Done

    coaps post test-resource block-1024 10
    Done

### CLI and API References

- No associated API

## coaps psk

Sets the pre-shared key (PSK) and cipher suite DTLS_PSK_WITH_AES_128_CCM_8.

> [!NOTE]
> **Note:** This command requires the build-time feature `MBEDTLS_KEY_EXCHANGE_PSK_ENABLED` to be enabled.

### Parameters

```
coaps psk psk-value psk-id
```

- `psk-value`: The pre-shared key
- `psk-id`: The pre-shared key identifier.

### Examples

    coaps psk 1234 key1
    Done

### CLI and API References

- [otCoapSecureSetPsk](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1ga15ef5aed4eb2c52d24c107017e0b607f)

## coaps put

Modifies the specified CoAPS resource. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

```
uri-path [type] [payload]
```

- `uri-path`: URI path of the resource.
- `type`:
  - `con`: Confirmable
  - `non-con`: Non-confirmable (default)
  - `block-`: Use this option, followed by the block-wise value, to send blocks with a randomly generated number of bytes for the payload. Valid values are: `block-16`, `block-32`, `block-64`, `block-128`, `block-256`, `block-512`, or `block-1024`.
- `payload`: CoAPS payload request, which if used is either a string or an integer, depending on the `type`. If the `type` is `con` or `non-con`, the payload parameter is optional. If you leave out the payload parameter, an empty payload is sent. However, If you use the payload parameter, its value must be a string, such as `hellothere`. If the `type` is `block-`, the value of the payload parameter must be an integer that specifies the number of blocks to send. The `block-` type requires `OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE` to be set.

### Examples

    coaps put test-resource con hellothere
    Done

    coaps put test-resource block-1024 10
    Done

### CLI and API References

- No associated API

## coaps resource (get,set)

Gets or sets the URI path of the CoAPS server resource. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

```
coaps resource [uri-path]
```

### Examples

    coaps resource test-resource
    Done

    coaps resource
    test-resource
    Done

### CLI and API References

- [otCoapSecureAddBlockWiseResource](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1gabac36262398c2e937c5676e077428a6a)

## coaps set

Sets the content sent by the resource on the CoAPS server. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

```
coaps set new-content
```

### Examples

    coaps set Testing123
    Done

### CLI and API References

- No associated API

## coaps start

Starts the CoAP Secure service. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

```
coaps start [check-peer-cert | max-conn-attempts]
```

The `check-peer-cert` parameter determines if the peer-certificate check is enabled (default) or disabled. The `max-conn-attempts` parameter sets the maximum number of allowed attempts, successful or failed, to connect to the CoAP Secure server. The default value of this parameter is `0`, which means that there is no limit to the number of attempts. The `check-peer-cert` and `max-conn-attempts` parameters work together in the following combinations, even though you can only specify one argument:

- No argument specified: Defaults are used.
- Setting `check-peer-cert` to `true`: Has the same effect as omitting the argument, which is that the `check-peer-cert` value is `true`, and the `max-conn-attempts` value is 0.
- Setting `check-peer-cert` to `false`: `check-peer-cert` value is `false`, and the `max-conn-attempts` value is 0.
- Specifying a number: `check-peer-cert` is `true`, and the `max-conn-attempts` value is the number specified in the argument.

<br />

### Examples

    coaps start
    Done

    coaps start false
    Done

    coaps start 8
    Done

### CLI and API References

- [otCoapSecureStart](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1ga40e1bedcac22f1ea200a337b66d9876b)
- [otCoapSecureSetSslAuthMode](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1ga28d536c5a549d18569c3a3e2a2c6b15d)
- [otCoapSecureSetClientConnectEventCallback](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1ga7eaabd0b3882e699211bd7a08da18429)

## coaps stop

Stops the CoAP Secure service. For more information, refer to [Test Connectivity to a Constrained Application Protocol Secure (CoAPS) Resource Using the OT CLI](https://openthread.io/reference/cli/concepts/coaps).

### Parameters

No parameters.

### Examples

    coaps stop
    Done

### CLI and API References

- [otCoapSecureStop](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1gaccd552e37efd3125fe690055d2ad666a)

## coaps x509

Sets the X509 certificate of the local device with the corresponding private key for the DTLS session with `DTLS_ECDHE_ECDSA_WITH_AES_128_CCM_8`.

> [!NOTE]
> **Note:** This command requires `MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED=1` to be enabled. The X.509 certificate is stored in the location: `src/cli/x509_cert_key.hpp`.

### Parameters

No parameters.

### Examples

    coaps x509
    Done

### CLI and API References

- [otCoapSecureSetCertificate](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1ga9cbf06e3ec39343fa16dd08ebb172726)
- [otCoapSecureSetCaCertificateChain](https://openthread.io/reference/group/api-coap-secure#group__api-coap-secure_1gabde839cb00b9003037466b75061aed41)

## commissioner announce

Sends an Announce Begin message.

> [!NOTE]
> **Note:** Use this command only after successfully starting the Commissioner role with the `commissioner start` command.

### Parameters

```
commissioner announce mask count period destination
```

- `mask`: Bitmask that identifies channels for sending MLE `Announce` messages.
- `count`: Number of MLE `Announce` transmissions per channel.
- `period`: Number of milliseconds between successive MLE `Announce` transmissions.
- `destination`: Destination IPv6 address for the message. The message may be multicast.

### Examples

    commissioner announce 0x00050000 2 32 fdde:ad00:beef:0:0:ff:fe00:c00
    Done

### CLI and API References

- [commissioner start](https://openthread.io/reference/cli/commands#commissioner_start)
- [otCommissionerAnnounceBegin](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1gaa7a1c858a587e62f50404a07a70e048e)

## commissioner energy

Sends an Energy Scan Query message. Command output is printed as it is received.

> [!NOTE]
> **Note:** Use this command only after successfully starting the Commissioner role with the `commissioner start` command.

### Parameters

```
commissioner energy mask count period scanDuration destination
```

- `mask`: Bitmask that identifies channels for performing IEEE 802.15.4 energy scans.
- `count`: Number of IEEE 802.15.4 energy scans per channel.
- `period`: Number of milliseconds between successive IEEE 802.15.4 energy scans.
- `scanDuration`: Scan duration in milliseconds to use when performing an IEEE 802.15.4 energy scan.
- `destination`: Destination IPv6 address for the message. The message may be multicast.

### Examples

    commissioner energy 0x00050000 2 32 1000 fdde:ad00:beef:0:0:ff:fe00:c00
    Done
    Energy: 00050000 0 0 0 0

### CLI and API References

- [commissioner start](https://openthread.io/reference/cli/commands#commissioner_start)
- [otCommissionerEnergyScan](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga33ff11d401e46723b55c07327c23f275)

## commissioner id (get,set)

Gets or sets the OpenThread Commissioner ID name.

### Parameters

```
commissioner id name
```

### Examples

    commissioner id OpenThread Commissioner
    Done

    commissioner id
    OpenThread Commissioner
    Done

### CLI and API References

- [otCommissionerSetId](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga86843c59aeddad57c0f7c7c96b1a5c4f)

## commissioner joiner add

Adds a joiner entry.

> [!NOTE]
> **Note:** Use this command only after successfully starting the Commissioner role with the `commissioner start` command.

### Parameters

```
commissioner joiner add eui64|discerner pksd [timeout]
```

- `eui64`: IEEE EUI-64 of the Joiner. To match any joiner, use `*`.
- `discerner`: The Joiner discerner in the format `number/length`.
- `pksd`: Pre-Shared Key for the joiner.
- `timeout`: The Joiner timeout in seconds.

### Examples

    commissioner joiner add d45e64fa83f81cf7 J01NME
    Done

    commissioner joiner add 0xabc/12 J01NME
    Done

### CLI and API References

- [commissioner start](https://openthread.io/reference/cli/commands#commissioner_start)
- [otCommissionerAddJoiner](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga3c5bf9814289ed2c40cc6a8d1327f9c4)
- [otCommissionerAddJoinerWithDiscerner](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1gad4c35a7380842d0431e816fee9815bd4)

## commissioner joiner remove

Removes a Joiner entry.

> [!NOTE]
> **Note:** Use this command only after successfully starting the Commissioner role with the `commissioner start` command.

### Parameters

```
commissioner joiner remove eui64|discerner
```

- `eui64`: IEEE EUI-64 of the joiner. To match any joiner, use `*`.
- `discerner`: The joiner discerner in the format `number/length`.

### Examples

    commissioner joiner remove d45e64fa83f81cf7
    Done

    commissioner joiner remove 0xabc/12
    Done

### CLI and API References

- [commissioner start](https://openthread.io/reference/cli/commands#commissioner_start)
- [otCommissionerRemoveJoiner](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga0683357c7078c0ecf1a462c8a4ab9092)
- [otCommissionerRemoveJoinerWithDiscerner](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga6527980f9c4f53ccc762b344231911e3)

## commissioner joiner table

Lists all Joiner entries in table format.

### Parameters

No parameters.

### Examples

    commissioner joiner table
    | ID                    | PSKd                             | Expiration |
    +---+---+---+
    |                     * |                           J01NME |      81015 |
    |      d45e64fa83f81cf7 |                           J01NME |     101204 |
    | 0x0000000000000abc/12 |                           J01NME |     114360 |
    Done

### CLI and API References

- No associated API

## commissioner mgmtget

Sends a `MGMT_GET` (Management Get) message to the Leader. Variable values that have been set using the `commissioner mgmtset` command are returned.

### Parameters

```
commissioner mgmtget [locator] [sessionid] [steeringdata] [joinerudpport] [-x TLVs]
```

- `locator`: Border Router RLOC16.
- `sessionid`: Session ID of the Commissioner.
- `steeringdata`: Steering data.
- `joinerudpport`: Joiner UDP port.
- `TLVs`: The set of TLVs to be retrieved.

### Examples

    commissioner mgmtget locator sessionid
    Done

### CLI and API References

- [otCommissionerSendMgmtGet](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1gaa91e4598e78be7391ab180a15e239553)

## commissioner mgmtset

Sends a `MGMT_SET` (Management Set) message to the Leader, and sets the variables to the values specified.

### Parameters

```
commissioner mgmtset [locator locator] [sessionid sessionid] [steeringdata steeringdata] [joinerudpport joinerudpport] [-x TLVs]
```

- `locator`: Border Router RLOC16.
- `sessionid`: Session ID of the Commissioner.
- `steeringdata`: Steering data.
- `joinerudpport`: Joiner UDP port.
- `TLVs`: The set of TLVs to be retrieved.

### Examples

    commissioner mgmtset joinerudpport 9988
    Done

### CLI and API References

- [otCommissionerSendMgmtSet](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga64323e25aef5baedad2550fb9907d9a6)

## commissioner panid

Sends a PAN ID query. Command output is returned as it is received.

> [!NOTE]
> **Note:** Use this command only after successfully starting the Commissioner role with the `commissioner start` command.

### Parameters

```
commissioner panid panid mask destination
```

- `paind`: PAN ID to use to check for conflicts.
- `mask`; Bitmask that identifies channels to perform IEEE 802.15.4 Active Scans.
- `destination`: IPv6 destination address for the message. The message may be multicast.

### Examples

    commissioner panid 0xdead 0x7fff800 fdde:ad00:beef:0:0:ff:fe00:c00
    Done
    Conflict: dead, 00000800

### CLI and API References

- [commissioner start](https://openthread.io/reference/cli/commands#commissioner_start)
- [otCommissionerPanIdQuery](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga37e4c517ae343cbbe23422c3031062d3)

## commissioner provisioningurl

Sets the Commissioner provisioning URL.

### Parameters

```
commissioner provisioningurl provisioningurl
```

### Examples

    commissioner provisioningurl http://github.com/openthread/openthread
    Done

### CLI and API References

- [otCommissionerSetProvisioningUrl](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga4a8e7a0413d4b206a49014b2dd2124ba)

## commissioner sessionid

Gets the current Commissioner session ID.

### Parameters

No parameters.

### Examples

    commissioner sessionid
    0
    Done

### CLI and API References

- [otCommissionerGetSessionId](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga30fb4478fc93ecf9254490d879118579)

## commissioner start

Starts the Thread Commissioner role.

> [!NOTE]
> **Note:** The `commissioner` commands are available only when `OPENTHREAD_CONFIG_COMMISSIONER_ENABLE` and `OPENTHREAD_FTD` are set.

### Parameters

No parameters.

### Examples

    commissioner start
    Commissioner: petitioning
    Done
    Commissioner: active

### CLI and API References

- [otCommissionerStart](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1gae1865376814eb0549b8c64de3d1c0415)

## commissioner state

Returns the current state of the Commissioner. Possible values are `active`, `disabled`, or `petition` (petitioning to become Commissioner).

### Parameters

No parameters.

### Examples

    commissioner state
    active
    Done

### CLI and API References

- [otCommissionerState](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga4604ba53f4819c570294e3d5a9267b6f)

## commissioner stop

Stops the Thread Commissioner role.

### Parameters

No parameters.

### Examples

    commissioner stop
    Done

### CLI and API References

- [otCommissionerStop](https://openthread.io/reference/group/api-commissioner#group__api-commissioner_1ga60fe57713b31ee007c6351b0e7d533f5)

## contextreusedelay (get,set)

Gets or sets the `CONTEXT_ID_REUSE_DELAY` value.

### Parameters

```
contextreusedelay delay
```

Use the optional `delay` argument to set the `CONTEXT_ID_REUSE_DELAY`.

### Examples

    contextreusedelay
    11
    Done

    contextreusedelay 11
    Done

### CLI and API References

- [otThreadGetContextIdReuseDelay](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gabf4a270b2b3d18f569c9113599df7a10)
- [otThreadSetContextIdReuseDelay](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga46fc8338032037d06685557dfd1fae22)

## counters (mac)

Get the MAC layer counters.

### Parameters

```
counters mac
```

### Examples

    counters mac
    TxTotal: 10
       TxUnicast: 3
       TxBroadcast: 7
       TxAckRequested: 3
       TxAcked: 3
       TxNoAckRequested: 7
       TxData: 10
       TxDataPoll: 0
       TxBeacon: 0
       TxBeaconRequest: 0
       TxOther: 0
       TxRetry: 0
       TxErrCca: 0
       TxErrBusyChannel: 0
    RxTotal: 2
       RxUnicast: 1
       RxBroadcast: 1
       RxData: 2
       RxDataPoll: 0
       RxBeacon: 0
       RxBeaconRequest: 0
       RxOther: 0
       RxAddressFiltered: 0
       RxDestAddrFiltered: 0
       RxDuplicated: 0
       RxErrNoFrame: 0
       RxErrNoUnknownNeighbor: 0
       RxErrInvalidSrcAddr: 0
       RxErrSec: 0
       RxErrFcs: 0
       RxErrOther: 0
    Done

### CLI and API References

- [otLinkGetCounters](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gaf2a954eb3c39f2826e78cc6b0fd2c49c)

## counters (mle)

Gets the Thread MLE counters.

### Parameters

```
counters mle
```

### Examples

    counters mle
    Role Disabled: 0
    Role Detached: 1
    Role Child: 0
    Role Router: 0
    Role Leader: 1
    Attach Attempts: 1
    Partition Id Changes: 1
    Better Partition Attach Attempts: 0
    Better Parent Attach Attempts: 0
    Parent Changes: 0
    Done

### CLI and API References

- [otThreadGetMleCounters](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga6bf32aaf2e08af395a6210cbfe95b2e0)

## counters

Gets the supported counter names.

### Parameters

No parameters.

### Examples

    counters
    ip
    mac
    mle
    Done

### CLI and API References

- No associated API

## counters ip

Gets the IPv6 counters.

### Parameters

```
counters ip
```

### Examples

    counters ip
    TxSuccess: 10
    TxFailed: 0
    RxSuccess: 5
    RxFailed: 0
    Done

### CLI and API References

- [otThreadGetIp6Counters](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga63c33a0f89ac23df098fc4fa8c808d33)

## counters ip reset

Resets the IPv6 counters.

### Parameters

```
counters ip reset
```

### Examples

    counters ip reset
    Done

### CLI and API References

- [otThreadResetIp6Counters](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga4f285ce52a497eb62f222968ad55f8b9)

## counters mac reset

Resets the MAC layer counters.

### Parameters

```
counters mac reset
```

### Examples

    counters mac reset
    Done

### CLI and API References

- [otLinkResetCounters](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga60b8817be7d3c3acb242e77a889a1914)

## counters mle reset

Resets the Thread MLE counters.

### Parameters

```
counters mle reset
```

### Examples

    counters mle reset
    Done

### CLI and API References

- [otThreadResetMleCounters](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gad872eb77b20d4ac40cda1cffc3249398)

## csl accuracy

Gets the CSL Accuracy in units of PPM.

`OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE` or `OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE` is required.

### Parameters

No parameters.

### Examples

    csl accuracy
    20
    Done

### CLI and API References

- [otPlatRadioGetCslAccuracy](https://openthread.io/reference/group/radio-operation#group__radio-operation_1ga05ebbb326c9ac2b60921a1a2a0c3b8f8)

## csl channel

Sets the CSL channel.

`OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE` is required.

### Parameters

```
csl channel channel
```

### Examples

    csl channel 20
    Done

### CLI and API References

- [otLinkSetCslChannel](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga1b1df375c93ff5b49f576dd6b2fb33f4)

## csl

Gets the CSL configuration.

`OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE` is required.

### Parameters

No parameters.

### Examples

    csl
    channel: 11
    period: 160000us
    timeout: 1000s
    Done

### CLI and API References

- [otLinkGetCslChannel](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gac22608115bd8f365c2ad5fec7d831ecb)
- [otLinkGetCslPeriod](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga2b602884b0390023cd9b74ba815887c3)
- [otLinkGetCslTimeout](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga21350d322375f1fb614fe73dd621f304)

## csl period

Sets the CSL period in microseconds.

Disable CSL by setting this parameter to `0`.

The CSL period MUST be a multiple of `OT_LINK_CSL_PERIOD_TEN_SYMBOLS_UNIT_IN_USEC`, otherwise `OT_ERROR_INVALID_ARGS` is returned.

`OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE` is required.

### Parameters

```
csl period period
```

### Examples

    csl period 3000000
    Done

### CLI and API References

- [otLinkSetCslPeriod](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gab8171d8fa17456e9759740e889942fd4)

## csl timeout

Sets the CSL timeout in seconds.

`OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE` is required.

### Parameters

```
csl timeout timeout
```

### Examples

    csl timeout 10
    Done

### CLI and API References

- [otLinkSetCslTimeout](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gac6fe8a3a2c7ca73bfdab74954a46f27a)

## csl uncertainty

Gets the CSL Uncertainty in units of 10 us.

`OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE` or `OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE` is required.

### Parameters

No parameters.

### Examples

    csl uncertainty
    10
    Done

### CLI and API References

- [otPlatRadioGetCslUncertainty](https://openthread.io/reference/group/radio-operation#group__radio-operation_1gadfb52c77d3ecda3536d5bc220979d532)

## dataset active

Gets the Active Operational Dataset.

OT CLI uses [otOperationalDataset](https://openthread.io/reference/struct/ot-operational-dataset) members to return dataset values to the console.

### Parameters

```
dataset active [-x|-ns]
```

- The optional `-x` argument prints the Active Operational [Dataset](https://openthread.io/reference/class/ot/cli/dataset) values as hex-encoded TLVs.
- The optional `-ns` argument prints the Active Operational [Dataset](https://openthread.io/reference/class/ot/cli/dataset) values and redact the sensitive values, including the network key and PSKc fields.

### Examples

    dataset active
    Active Timestamp: 1
    Channel: 13
    Channel Mask: 0x07fff800
    Ext PAN ID: d63e8e3e495ebbc3
    Mesh Local Prefix: fd3d:b50b:f96d:722d::/64
    Network Key: dfd34f0f05cad978ec4e32b0413038ff
    Network Name: OpenThread-8f28
    PAN ID: 0x8f28
    PSKc: c23a76e98f1a6483639b1ac1271e2e27
    Security Policy: 0, onrcb
    Done

    dataset active -x
    0e08000000000001000000030000103506000...3023d82c841eff0e68db86f35740c030000ff
    Done

    dataset active -ns
    Active Timestamp: 1
    Channel: 13
    Channel Mask: 0x07fff800
    Ext PAN ID: d63e8e3e495ebbc3
    Mesh Local Prefix: fd3d:b50b:f96d:722d::/64
    Network Key: [Redacted]
    Network Name: OpenThread-8f28
    PAN ID: 0x8f28
    PSKc: [Redacted]
    Security Policy: 0, onrcb
    Done

### CLI and API References

- [otDatasetGetActive](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga0273fe238a465679a9dbed997d8f601b)

## dataset activetimestamp (get, set)

Gets or sets [otOperationalDataset::mActiveTimestamp](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1ab5b078c9705e0e8f38a46e62a61c51ab).

### Parameters

```
dataset activetimestamp [timestamp]
```

Pass the optional `timestamp` argument to set the active timestamp.

### Examples

    dataset activetimestamp
    123456789
    Done

    dataset activetimestamp 123456789
    Done

### CLI and API References

- No associated API

## dataset channel (get,set)

Gets or sets [otOperationalDataset::mChannel](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1aab6258c1a117bc4c4bd7c0fac0bd577a).

### Parameters

```
dataset channel [channel-num]
```

Use the optional `channel-num` argument to set the channel.

### Examples

    dataset channel
    12
    Done

    dataset channel 12
    Done

### CLI and API References

- No associated API

## dataset channelmask (get,set)

Gets or sets [otOperationalDataset::mChannelMask](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1ade5afcd15ab99c99857554a272de9033)

### Parameters

```
dataset channelmask [channel-mask]
```

Use the optional `channel-mask` argument to set the channel mask.

### Examples

    dataset channelmask
    0x07fff800
    Done

    dataset channelmask 0x07fff800
    Done

### CLI and API References

- No associated API

## dataset clear

Reset the Operational Dataset buffer.

### Parameters

No parameters.

### Examples

    dataset clear
    Done

### CLI and API References

- No associated API

## dataset commit active

Commit the Operational Dataset buffer to Active Operational Dataset.

### Parameters

No parameters.

### Examples

    dataset commit active
    Done

### CLI and API References

- [dataset commit pending](https://openthread.io/reference/cli/commands#dataset_commit_pending)
- [otDatasetSetPending](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gad687b08eea39b4fa06f4bd72c148c4f7)

## dataset commit pending

Commit the Operational Dataset buffer to Pending Operational Dataset.

### Parameters

No parameters.

### Examples

    dataset commit pending
    Done

### CLI and API References

- [dataset commit active](https://openthread.io/reference/cli/commands#dataset_commit_active)
- [otDatasetSetActive](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gacb2902b17bf805951792b139ba3a24ac)

## dataset delay (get,set)

Gets or sets [otOperationalDataset::mDelay](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1a36d2dd5b146d8af6971c41c13d8fe3aa).

### Parameters

```
dataset delay [delay]
```

Use the optional `delay` argument to set the delay timer value.

### Examples

    dataset delay
    1000
    Done

    dataset delay 1000
    Done

### CLI and API References

- [otDatasetSetDelayTimerMinimal](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga317689138ad599c1df47fd7317db576b)

## dataset extpanid (get,set)

Gets or sets [otOperationalDataset::mExtendedPanId](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1afe29b5a7ad4991fedda85dc7f0d0a9ba).

> [!NOTE]
> **Note:** The commissioning credential in the dataset buffer becomes stale after changing this value. Use `dataset pskc` to reset.

### Parameters

```
dataset extpanid [extpanid]
```

Use the optional `extpanid` argument to set the Extended Personal Area Network ID.

### Examples

    dataset extpanid
    000db80123456789
    Done

    dataset extpanid 000db80123456789
    Done

### CLI and API References

- [dataset pskc (get,set)](https://openthread.io/reference/cli/commands#dataset_pskc_getset)

## dataset help

Gets a list of `dataset` CLI commands. For more information, refer to [Display and Manage Datasets with OT CLI](https://openthread.io/reference/cli/concepts/dataset).

### Parameters

No parameters.

### Examples

    dataset help
    help
    active
    activetimestamp
    channel
    channelmask
    clear
    commit
    delay
    extpanid
    init
    meshlocalprefix
    mgmtgetcommand
    mgmtsetcommand
    networkkey
    networkname
    panid
    pending
    pendingtimestamp
    pskc
    securitypolicy
    set
    tlvs
    Done

### CLI and API References

- No associated API

## dataset init (active,new,pending,tlvs)

OT CLI checks for `active`, `pending`, or `tlvs` and returns the corresponding values. Otherwise, OT CLI creates a new, random network and returns a new dataset.

### Parameters

```
dataset init {active|new|pending|tlvs} [hex-encoded-tlvs]
```

Use `new` to initialize a new dataset, then enter the command `dataset commit active`. Use `tlvs` for hex-encoded TLVs.

### Examples

    dataset init new
    Done

### CLI and API References

- [dataset commit active](https://openthread.io/reference/cli/commands#dataset_commit_active)
- [dataset active](https://openthread.io/reference/cli/commands#dataset_active)

## dataset meshlocalprefix (get,set)

Gets or sets [otOperationalDataset::mMeshLocalPrefix](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1a106decaee164d7c68cb1025d137b5efb).

### Parameters

```
dataset meshlocalprefix [meshlocalprefix]
```

Use the optional `meshlocalprefix` argument to set the Mesh-Local Prefix.

### Examples

    dataset meshlocalprefix
    fd00:db8:0:0::/64
    Done

    dataset meshlocalprefix fd00:db8:0:0::
    Done

### CLI and API References

- No associated API

## dataset mgmtgetcommand active

Sends MGMT_ACTIVE_GET.

OT CLI sends a MGMT_ACTIVE_GET with the relevant arguments. To learn more about these parameters and argument mappings, refer to [Display and Manage Datasets with OT CLI](https://openthread.io/reference/cli/concepts/dataset).

> [!NOTE]
> **Note:** This command is primarily used for testing only.

### Parameters

```
dataset mgmtgetcommand active [address leader-address] [dataset-components] [-x tlv-list]
```

- Use `address` to specify the IPv6 destination; otherwise, the Leader ALOC is used as default.
- For `dataset-components`, you can pass any combination of [otOperationalDatasetComponents](https://openthread.io/reference/struct/ot-operational-dataset-components), for example `activetimestamp`, `pendingtimestamp`, or `networkkey`.
- The optional `-x` argument specifies raw TLVs to be requested.

### Examples

    dataset mgmtgetcommand active address fdde:ad00:beef:0:558:f56b:d688:799 activetimestamp securitypolicy
    Done

    dataset mgmtgetcommand active networkname
    Done

### CLI and API References

- [otDatasetSendMgmtActiveGet](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gae52cbe5d8bd771ceb248ce63f46dfc1d)
- [dataset mgmtgetcommand pending](https://openthread.io/reference/cli/commands#dataset_mgmtgetcommand_pending)
- [dataset mgmtsetcommand active](https://openthread.io/reference/cli/commands#dataset_mgmtsetcommand_active)
- [dataset mgmtsetcommand pending](https://openthread.io/reference/cli/commands#dataset_mgmtsetcommand_pending)

## dataset mgmtgetcommand pending

Sends MGMT_PENDING_GET.

> [!NOTE]
> **Note:** This command is primarily used for testing only.

### Parameters

```
dataset mgmtgetcommand pending [address leader-address] [dataset-components] [-x tlv-list]
```

To learn more about these parameters and argument mappings, refer to [Display and Manage Datasets with OT CLI](https://openthread.io/reference/cli/concepts/dataset).

### Examples

    dataset mgmtgetcommand pending address fdde:ad00:beef:0:558:f56b:d688:799 activetimestamp securitypolicy
    Done

    dataset mgmtgetcommand pending networkname
    Done

### CLI and API References

- [otDatasetSendMgmtPendingGet](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga989c557552772f233a7e30b931fa4b10)
- [dataset mgmtgetcommand active](https://openthread.io/reference/cli/commands#dataset_mgmtgetcommand_active)
- [dataset mgmtsetcommand active](https://openthread.io/reference/cli/commands#dataset_mgmtsetcommand_active)
- [dataset mgmtsetcommand pending](https://openthread.io/reference/cli/commands#dataset_mgmtsetcommand_pending)

## dataset mgmtsetcommand active

Sends MGMT_ACTIVE_SET.

> [!NOTE]
> **Note:** This command is primarily used for testing only.

### Parameters

```
dataset mgmtsetcommand active [dataset-components] [-x tlv-list]
```

To learn more about these parameters and argument mappings, refer to [Display and Manage Datasets with OT CLI](https://openthread.io/reference/cli/concepts/dataset).

### Examples

    dataset mgmtsetcommand active activetimestamp 123 securitypolicy 1 onrcb
    Done

### CLI and API References

- [otDatasetSendMgmtActiveSet](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga2fd530deaef7991fe1a663ded20db7f5)
- [dataset mgmtgetcommand active](https://openthread.io/reference/cli/commands#dataset_mgmtgetcommand_active)
- [dataset mgmtgetcommand pending](https://openthread.io/reference/cli/commands#dataset_mgmtgetcommand_pending)
- [dataset mgmtsetcommand pending](https://openthread.io/reference/cli/commands#dataset_mgmtsetcommand_pending)

## dataset mgmtsetcommand pending

Sends MGMT_PENDING_SET.

> [!NOTE]
> **Note:** This command is primarily used for testing only.

### Parameters

```
dataset mgmtsetcommand pending [dataset-components] [-x tlv-list]
```

To learn more about these parameters and argument mappings, refer to [Display and Manage Datasets with OT CLI](https://openthread.io/reference/cli/concepts/dataset).

### Examples

    dataset mgmtsetcommand pending activetimestamp 123 securitypolicy 1 onrcb
    Done

### CLI and API References

- [otDatasetSendMgmtPendingSet](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaefa3613065565f12f25791fbf0e8d144)
- [dataset mgmtgetcommand active](https://openthread.io/reference/cli/commands#dataset_mgmtgetcommand_active)
- [dataset mgmtgetcommand pending](https://openthread.io/reference/cli/commands#dataset_mgmtgetcommand_pending)
- [dataset mgmtsetcommand active](https://openthread.io/reference/cli/commands#dataset_mgmtsetcommand_active)

## dataset networkkey (get,set)

Gets or sets [otOperationalDataset::mNetworkKey](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1af45574fd12885bc9a9e7c340757182f7).

### Parameters

```
dataset networkkey [key]
```

Use the optional `key` argument to set the Network Key.

### Examples

    dataset networkkey
    00112233445566778899aabbccddeeff
    Done

    dataset networkkey 00112233445566778899aabbccddeeff
    Done

### CLI and API References

- No associated API

## dataset networkname (get,set)

Gets or sets [otOperationalDataset::mNetworkName](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1a16a2d0c0dd134ea0b568ae2e4442cca7).

> [!NOTE]
> **Note:** The Commissioning Credential in the dataset buffer becomes stale after changing this value. Use `dataset pskc` to reset.

### Parameters

```
dataset networkname [name]
```

Use the optional `name` argument to set the Network Name.

### Examples

    dataset networkname
    OpenThread
    Done

    dataset networkname OpenThread
    Done

### CLI and API References

- [dataset pskc (get,set)](https://openthread.io/reference/cli/commands#dataset_pskc_getset)

## dataset panid (get,set)

Gets or sets [otOperationalDataset::mPanId](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1ae9041fb788284181dd84b642da23e9d9).

### Parameters

```
dataset panid [panid]
```

Use the optional `panid` argument to set the PAN ID.

### Examples

    dataset panid
    0x1234
    Done

    dataset panid 0x1234
    Done

### CLI and API References

- No associated API

## dataset pendingtimestamp (get,set)

Gets or sets [otOperationalDataset::mPendingTimestamp](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1ab472d60d0a974ad3b5eed8e9b1fa4708).

### Parameters

```
dataset pendingtimestamp [timestamp]
```

Use the optional `timestamp` argument to set the pending timestamp seconds.

### Examples

    dataset pendingtimestamp
    123456789
    Done

    dataset pendingtimestamp 123456789
    Done

### CLI and API References

- No associated API

## dataset pskc (get,set)

Gets or sets [otOperationalDataset::mPskc](https://openthread.io/reference/struct/ot-operational-dataset#structot_operational_dataset_1a2bd443f5059dce4b82f9216674bd57bf).

### Parameters

```
dataset pskc [-p passphrase] | [key]
```

For FTD only, use `-p` with the `passphrase` argument. `-p` generates a pskc from the UTF-8 encoded `passphrase` that you provide, together with the network name and extended PAN ID. If set, `-p` uses the dataset buffer; otherwise, it uses the current stack. Alternatively, you can set pskc as `key` (hex format).

### Examples

    dataset pskc
    67c0c203aa0b042bfb5381c47aef4d9e
    Done

    dataset pskc -p 123456
    Done

    dataset pskc 67c0c203aa0b042bfb5381c47aef4d9e
    Done

### CLI and API References

- No associated API

## dataset securitypolicy (get,set)

Gets or sets the Dataset security policy.

### Parameters

```
dataset securitypolicy [rotationtime [onrcCepR]]
```

- Use `rotationtime` for `thrKeyRotation`, in units of hours.
- Security Policy commands use the `onrcCepR` argument mappings to get and set [otSecurityPolicy](https://openthread.io/reference/struct/ot-security-policy) members, for example `o` represents [otSecurityPolicy::mObtainNetworkKeyEnabled](https://openthread.io/reference/struct/ot-security-policy#structot_security_policy_1af67eadb7c899744e8d3758e13f3d93ff). For more information, refer to [Display and Manage Datasets with OT CLI](https://openthread.io/reference/cli/concepts/dataset).

### Examples

    dataset securitypolicy
    672 onrc
    Done

    dataset securitypolicy 672 onrc
    Done

### CLI and API References

- No associated API

## dataset set (active,pending)

Sets the Active Operational Dataset.

If the dataset does not include an Active Timestamp, the dataset is only partially complete.

If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. Only the Thread Network Key is needed to attach to a network.

If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels.

If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset.

This function consistently returns `OT_ERROR_NONE` and can effectively be treated as having a `void` return type. Previously, other errors (e.g., `OT_ERROR_NOT_IMPLEMENTED`) were allowed for legacy reasons. However, as non-volatile storage is now mandatory for Thread operation, any failure to save the dataset will trigger an assertion. The `otError` return type is retained for backward compatibility.

The CLI `dataset set` command sets the Active Operational Dataset using hex-encoded TLVs.

### Parameters

```
dataset set {active|pending} tlvs
```

### Examples

    dataset set active 0e08000000000001000000030000103506000...3023d82c841eff0e68db86f35740c030000ff
    Done

    dataset set pending 0e08000000000001000000030000103506000...3023d82c841eff0e68db86f35740c030000ff
    Done

### CLI and API References

- [otDatasetSetActive](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gacb2902b17bf805951792b139ba3a24ac)

## dataset tlvs

Converts a given Operational Dataset to `
https://openthread.io/reference/struct/ot-operational-dataset-tlvs
`.

### Parameters

No parameters.

### Examples

    dataset tlvs
    0e080000000000010000000300001635060004001fffe0020...f7f8
    Done

### CLI and API References

- [otDatasetConvertToTlvs](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gafff19960f2612b4a617ebd13587d5d8b)

## dataset updater cancel

Cancels an ongoing (if any) Operational Dataset update request.

Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    @dataset updater cancel
    Done

### CLI and API References

- [otDatasetUpdaterCancelUpdate](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gaa27b0145358fa1016afc62093f0047fc)

## dataset updater

Indicates whether there is an ongoing Operation Dataset update request.

Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    dataset updater
    Enabled
    Done

### CLI and API References

- [otDatasetUpdaterIsUpdateOngoing](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga715c528c3079b354172f2a8f69ddc2bf)

## dataset updater start

Requests an update to Operational Dataset.

Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.

`aDataset` should contain the fields to be updated and their new value. It must not contain Active or Pending Timestamp fields. The Delay field is optional, if not provided a default value (1000 ms) would be used.

### Parameters

No parameters.

### Examples

    channel
    19
    Done
    dataset clear
    Done
    dataset channel 15
    Done
    dataset
    Channel: 15
    Done
    dataset updater start
    Done
    dataset updater
    Enabled
    Done
    Dataset update complete: OK
    channel
    15
    Done

### CLI and API References

- [otDatasetUpdaterRequestUpdate](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga4902687297468c8a82073e2c650caf97)

## debug

Executes a series of CLI commands to gather information about the device and thread network. This is intended for debugging. The output will display each executed CLI command preceded by `$`, followed by the corresponding command's generated output. The generated output encompasses the following information:

- Version
- Current state
- Uptime and attach time
- Channel
- PAN IDs, extended MAC address, and RLOC16
- Unicast and multicast IPv6 address list
- Network Data
- Partition ID
- Leader Data
- Buffer info
- Network statistics
- IP, MAC, and MLE counters

<br />

If the device is operating as FTD:

- Child table, child IP addresses
- Neighbor table (including connection time)
- Router table
- EID cache

<br />

If the device supports and acts as an SRP client:

- SRP client state
- SRP client services and host info

<br />

If the device supports and acts as an SRP sever:

- SRP server state and address mode
- SRP server registered hosts and services

<br />

If the device supports and acts as a border router:

- BR state
- OMR prefixes
- On-link prefixes
- RDNSS table
- Discovered routers, and peer BRs
- DHCPv6 PD state and OMR prefix
- BR counters

<br />

If the device supports TREL:

- TREL status, peer table, and counters

<br />

If the device supports NAT64:

- NAT64 state, mappings, and counters

<br />

If the device supports [History](https://openthread.io/reference/class/ot/cli/history) Tracker:

- Network info, neighbor, router, prefix, and route history

<br />

### Parameters

No parameters.

### Examples

### CLI and API References

- No associated API

## delaytimermin (set)

Sets the minimal delay timer (in seconds).

### Parameters

```
delaytimermin delaytimermin
```

### Examples

    delaytimermin 60
    Done

### CLI and API References

- [otDatasetSetDelayTimerMinimal](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1ga317689138ad599c1df47fd7317db576b)

## delaytimermin

Get the minimal delay timer (in seconds).

### Parameters

No parameters.

### Examples

    delaytimermin
    30
    Done

### CLI and API References

- [otDatasetGetDelayTimerMinimal](https://openthread.io/reference/group/api-operational-dataset#group__api-operational-dataset_1gab2cc490b2e0ea6af733a579062b855ec)

## detach async

Start the graceful detach process similar to the `detach` command without blocking and waiting for the callback indicating that detach is finished.

### Parameters

No parameters.

### Examples

    detach async
    Done

### CLI and API References

- [detach](https://openthread.io/reference/cli/commands#detach)
- [otThreadDetachGracefully](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga3a73c474688be9ecddabfb977feb9ed6)

## detach

Start the graceful detach process by first notifying other nodes (sending Address Release if acting as a router, or setting Child Timeout value to zero on parent if acting as a child) and then stopping Thread protocol operation.

### Parameters

No parameters.

### Examples

    detach
    Finished detaching
    Done

### CLI and API References

- [otThreadDetachGracefully](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga3a73c474688be9ecddabfb977feb9ed6)

## deviceprops (set)

Sets the device properties.

### Parameters

```
deviceprops powerSupply isBr supportsCcm isUnstable weightAdjustment
```

`powerSupply`: should be 'battery', 'external', 'external-stable', 'external-unstable'.

### Examples

    deviceprops battery 0 0 0 -5
    Done

    deviceprops
    PowerSupply      : battery
    IsBorderRouter   : no
    SupportsCcm      : no
    IsUnstable       : no
    WeightAdjustment : -5
    Done

### CLI and API References

- [leaderweight](https://openthread.io/reference/cli/commands#leaderweight)
- [leaderweight (set)](https://openthread.io/reference/cli/commands#leaderweight_set)
- [otThreadSetDeviceProperties](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga38c997ceb4cc0dcda31f36fef6019b70)

## deviceprops

Get the current device properties.

Requires `OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE`.

### Parameters

No parameters.

### Examples

    deviceprops
    PowerSupply      : external
    IsBorderRouter   : yes
    SupportsCcm      : no
    IsUnstable       : no
    WeightAdjustment : 0
    Done

### CLI and API References

- [otThreadGetDeviceProperties](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga6a3d2eaa15123f82f421c1bd187b4ca3)

## discover

Perform an MLE Discovery operation.

### Parameters

```
discover [channel]
```

`channel`: The channel to discover on. If no channel is provided, the discovery will cover all valid channels.

### Examples

    discover
    | J | Network Name     | Extended PAN     | PAN  | MAC Address      | Ch | dBm | LQI |
    +---+---+---+---+---+---+---+---+
    | 0 | OpenThread       | dead00beef00cafe | ffff | f1d92a82c8d8fe43 | 11 | -20 |   0 |
    Done

### CLI and API References

- [otThreadDiscover](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gae679d41af515900cb4d0a576d2bbbad8)

## dns browse

Send a browse (service instance enumeration) DNS query to get the list of services for given service-name

The parameters after `service-name` are optional. Any unspecified (or zero or "def") value for these optional parameters is replaced by the value from the current default config (`dns config`).

> [!NOTE]
> **Note:** The DNS server IP can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. The command will return `InvalidState` when the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable. When testing DNS-SD discovery proxy, the zone is not `local` and instead should be `default.service.arpa`. `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is required.

### Parameters

```
dns browse service-name [dns-server-IP] [dns-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean]
```

### Examples

    dns browse _service._udp.example.com
    DNS browse response for _service._udp.example.com.
    inst1
        Port:1234, Priority:1, Weight:2, TTL:7200
        Host:host.example.com.
        HostAddress:fd00:0:0:0:0:0:0:abcd TTL:7200
        TXT:[a=6531, b=6c12] TTL:7300
    instance2
        Port:1234, Priority:1, Weight:2, TTL:7200
        Host:host.example.com.
        HostAddress:fd00:0:0:0:0:0:0:abcd TTL:7200
        TXT:[a=1234] TTL:7300
    Done

    dns browse _airplay._tcp.default.service.arpa
    DNS browse response for _airplay._tcp.default.service.arpa.
    Mac mini
        Port:7000, Priority:0, Weight:0, TTL:10
        Host:Mac-mini.default.service.arpa.
        HostAddress:fd97:739d:386a:1:1c2e:d83c:fcbe:9cf4 TTL:10
    Done

### CLI and API References

- [otDnsClientBrowse](https://openthread.io/reference/group/api-dns#group__api-dns_1ga51ac6bec622be91262b2e3a2f570b484)

## dns compression

Gets or sets the "DNS name compression" mode.

This is intended for testing only and requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`.

By default, DNS name compression is enabled. When disabled, DNS names are appended in full and are never compressed. This applies to OpenThread's DNS and SRP client/server modules.

DNS name compression cannot be disabled if the OpenThread mDNS module is enabled. Enabling the mDNS module will automatically enable name compression if it was previously disabled. Attempting to disable compression while the mDNS module is active will return an error.

### Parameters

```
dns compression [enable|disable]
```

### Examples

    dns compression
    Enabled

    dns compression enable
    Enabled

    dns compression disable
    Done
    dns compression
    Disabled
    Done

### CLI and API References

- [otDnsIsNameCompressionEnabled](https://openthread.io/reference/group/api-dns#group__api-dns_1ga3cd21a39ce4e2ebb478e594b5731bc64)
- [otDnsSetNameCompressionEnabled](https://openthread.io/reference/group/api-dns#group__api-dns_1gab593cb1c1eacca646bae01baf3936f1c)

## dns config (set)

Sets the default query config on DNS client.

> [!NOTE]
> **Note:** Any ongoing query will continue to use the config from when it was started. The new default config will be used for any future DNS queries.

In a non-NULL `aConfig`, caller can choose to leave some of the fields in `
https://openthread.io/reference/struct/ot-dns-query-config
` instance unspecified (value zero). The unspecified fields are replaced by the corresponding OT config option definitions `OPENTHREAD_CONFIG_DNS_CLIENTDEFAULT{}` to form the default query config.

When `OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_SERVER_ADDRESS_AUTO_SET_ENABLE` is enabled, the server's IPv6 address in the default config is automatically set and updated by DNS client. This is done only when user does not explicitly set or specify it. This behavior requires SRP client and its auto-start feature to be enabled. SRP client will then monitor the Thread Network Data for DNS/SRP Service entries to select an SRP server. The selected SRP server address is also set as the DNS server address in the default config.

You can leave some of the fields as unspecified (or use value zero or "def"). This includes the DNS server IP address itself. Since an address has no "zero" form, use "def" (or, equivalently, the unspecified address "::") to select the default server address. The unspecified fields are replaced by the corresponding OT config option definitions `OPENTHREAD_CONFIG_DNS_CLIENTDEFAULT` to form the default query config. Note that specifying zero for a boolean argument means disabled. Use "def" to select the default value. `OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE` is required.

### Parameters

```
dns config [dns-server-IP] [dns-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean] [service-mode] [protocol]
```

### Examples

    dns config fd00::1 1234 5000 2 0
    Done

    dns config
    Server: [fd00:0:0:0:0:0:0:1]:1234
    ResponseTimeout: 5000 ms
    MaxTxAttempts: 2
    RecursionDesired: no
    ServiceMode: srv_txt_opt
    Nat64Mode: allow
    TransportProtocol: udp
    Done

    dns config fd00::2
    Done

    dns config
    Server: [fd00:0:0:0:0:0:0:2]:53
    ResponseTimeout: 6000 ms
    MaxTxAttempts: 3
    RecursionDesired: yes
    ServiceMode: srv_txt_opt
    Nat64Mode: allow
    TransportProtocol: udp
    Done

    dns config def def def def def srv_txt_sep udp
    Done

    dns config
    Server: [2001:4860:4860:0:0:0:0:8888]:53
    ResponseTimeout: 7000 ms
    MaxTxAttempts: 3
    RecursionDesired: yes
    ServiceMode: srv_txt_sep
    Nat64Mode: allow
    TransportProtocol: udp
    Done

### CLI and API References

- [otDnsClientSetDefaultConfig](https://openthread.io/reference/group/api-dns#group__api-dns_1gae6a6a5393d135f0f8104dfc515f7b136)

## dns config

Gets the current default query config used by DNS client.

When OpenThread stack starts, the default DNS query config is determined from a set of OT config options such as `OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_SERVER_IP6_ADDRESS`, `_DEFAULT_SERVER_PORT`, `_DEFAULT_RESPONSE_TIMEOUT`, etc. (see `config/dns_client.h` for all related config options).

The config includes the server IPv6 address and port, response timeout in msec (wait time to rx response), maximum tx attempts before reporting failure, boolean flag to indicate whether the server can resolve the query recursively or not. `OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE` is required.

### Parameters

No parameters.

### Examples

    dns config
    Server: [fd00:0:0:0:0:0:0:1]:1234
    ResponseTimeout: 5000 ms
    MaxTxAttempts: 2
    RecursionDesired: no
    ServiceMode: srv
    Nat64Mode: allow
    Done

### CLI and API References

- [otDnsClientGetDefaultConfig](https://openthread.io/reference/group/api-dns#group__api-dns_1ga506d2d7531ae0fe7785f0f575812c4fc)

## dns query

Send a DNS query for a given record type and DNS name. DNS name is provided as a first label, followed by the next labels which are dot '.' separated. Note that the first label can itself contain the dot '.' character.

The parameters after `next-labels` are optional. Any unspecified (or zero or "def") value for these optional parameters is replaced by the value from the current default config (`dns config`).

`OPENTHREAD_CONFIG_DNS_CLIENT_ARBITRARY_RECORD_QUERY_ENABLE` is required.

### Parameters

```
dns query record-type first-label next-labels [DNS-server-IP] [DNS-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean]
```

```
dns query 25 myhost default.service.arpa.
DNS query response for myhost.default.service.arpa.
0)
    RecordType:25, RecordLength: 32, TTL:7108, Section:answer
    Name:myhost.default.service.arpa.
    RecordData:[001900010000e02d00440201030d4983605c0406803deb2d672cc42224773977]
Done
```

### Examples

### CLI and API References

- No associated API

## dns resolve

Sends an address resolution DNS query for AAAA (IPv6) record(s) for a given host name.

The `aConfig` can be NULL. In this case the default config (from `
https://openthread.io/reference/group/api-dns#group__api-dns_1ga506d2d7531ae0fe7785f0f575812c4fc
`) will be used as the config for this query. In a non-NULL `aConfig`, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.

Send DNS Query to obtain IPv6 address for given hostname.

The parameters after hostname are optional. Any unspecified (or zero or "def") value for these optional parameters is replaced by the value from the current default config (dns config). This includes the DNS server IP address itself. Use "def" (or, equivalently, the unspecified address "::") to select the server address from the current default config while still overriding later parameters explicitly.

The DNS server IP can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data.

> [!NOTE]
> **Note:** The command will return InvalidState when the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable. `OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE` is required.

### Parameters

```
dns resolve hostname [dns-server-IP] [dns-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean]
```

### Examples

    dns resolve ipv6.google.com
    DNS response for ipv6.google.com - 2a00:1450:401b:801:0:0:0:200e TTL: 300

    dns resolve example.com 8.8.8.8
    Synthesized IPv6 DNS server address: fdde:ad00:beef:2:0:0:808:808
    DNS response for example.com. - fd4c:9574:3720:2:0:0:5db8:d822 TTL:20456
    Done

    dns resolve example.com def 53
    DNS response for example.com. - fd4c:9574:3720:2:0:0:5db8:d822 TTL:20456
    Done

### CLI and API References

- [otDnsClientResolveAddress](https://openthread.io/reference/group/api-dns#group__api-dns_1ga4b736138305f5c034fb62c1d14c8b78d)

## dns service

Starts a DNS service instance resolution for a given service instance.

Is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled.

The `aConfig` can be NULL. In this case the default config (from `
https://openthread.io/reference/group/api-dns#group__api-dns_1ga506d2d7531ae0fe7785f0f575812c4fc
`) will be used as the config for this query. In a non-NULL `aConfig`, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.

The function sends queries for SRV and/or TXT records for the given service instance. The `mServiceMode` field in `
https://openthread.io/reference/struct/ot-dns-query-config
` determines which records to query (SRV only, TXT only, or both SRV and TXT) and how to perform the query (together in the same message, separately in parallel, or in optimized mode where client will try in the same message first and then separately if it fails to get a response).

The SRV record provides information about service port, priority, and weight along with the host name associated with the service instance. This function DOES NOT perform address resolution for the host name discovered from SRV record. The server/resolver may provide AAAA/A record(s) for the host name in the Additional Data section of the response to SRV/TXT query and this information can be retrieved using `
https://openthread.io/reference/group/api-dns#group__api-dns_1ga105c49e04bdccda32821676b68220583
` in `otDnsServiceCallback`. Users of this API MUST NOT assume that host address will always be available from `
https://openthread.io/reference/group/api-dns#group__api-dns_1ga105c49e04bdccda32821676b68220583
`.

Send a service instance resolution DNS query for a given service instance. Service instance label is provided first, followed by the service name (note that service instance label can contain dot '.' character).

The parameters after `service-name` are optional. Any unspecified (or zero or "def") value for these optional parameters is replaced by the value from the current default config (`dns config`).

> [!NOTE]
> **Note:** The DNS server IP can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. The command will return `InvalidState` when the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable. `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is required.

### Parameters

```
dns service service-instance-label service-name [DNS-server-IP] [DNS-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean]
```

### Examples

### CLI and API References

- [otDnsClientResolveService](https://openthread.io/reference/group/api-dns#group__api-dns_1ga37875e2aa21b199dc0206099d60540eb)

## dns servicehost

Starts a DNS service instance resolution for a given service instance, with a potential follow-up address resolution for the host name discovered for the service instance.

Is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled.

The `aConfig` can be NULL. In this case the default config (from `
https://openthread.io/reference/group/api-dns#group__api-dns_1ga506d2d7531ae0fe7785f0f575812c4fc
`) will be used as the config for this query. In a non-NULL `aConfig`, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config. This function cannot be used with `mServiceMode` in DNS config set to `OT_DNS_SERVICE_MODE_TXT` (i.e., querying for TXT record only) and will return `OT_ERROR_INVALID_ARGS`.

Behaves similarly to `
https://openthread.io/reference/group/api-dns#group__api-dns_1ga37875e2aa21b199dc0206099d60540eb
` sending queries for SRV and TXT records. However, if the server/resolver does not provide AAAA/A records for the host name in the response to SRV query (in the Additional Data section), it will perform host name resolution (sending an AAAA query) for the discovered host name from the SRV record. The callback `aCallback` is invoked when responses for all queries are received (i.e., both service and host address resolutions are finished).

Send a service instance resolution DNS query for a given service instance with potential follow-up host name resolution. Service instance label is provided first, followed by the service name (note that service instance label can contain dot '.' character).

The parameters after `service-name` are optional. Any unspecified (or zero or "def") value for these optional parameters is replaced by the value from the current default config (`dns config`).

> [!NOTE]
> **Note:** The DNS server IP can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. The command will return `InvalidState` when the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable. `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is required.

### Parameters

```
dns servicehost service-instance-label service-name [DNS-server-IP] [DNS-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean]
```

### Examples

### CLI and API References

- [otDnsClientResolveServiceAndHostAddress](https://openthread.io/reference/group/api-dns#group__api-dns_1ga698f8f3418d81760bbcbd39f29773cd9)

## domainname (set)

Sets the Thread Domain Name.

Only succeeds when Thread protocols are disabled.

> [!NOTE]
> **Note:** Available since Thread 1.2.

### Parameters

```
domainname name
```

Use a `backslash` to escape spaces.

### Examples

    domainname Test\ Thread
    Done

### CLI and API References

- [otThreadSetDomainName](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga707829f290512c14a533d98eb8c11998)

## domainname

Gets the Thread Domain Name.

> [!NOTE]
> **Note:** Available since Thread 1.2.

### Parameters

No parameters.

### Examples

    domainname
    Thread
    Done

### CLI and API References

- [otThreadGetDomainName](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaf8a1d07cd4028ee2722f828f1a406d23)

## eidcache clear

Clears the EID cache.

Intended for testing only.

### Parameters

No parameters.

### Examples

    eidcache clear
    Done

### CLI and API References

- [otThreadClearEidCache](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga6f5b706ec2a8a387dc55a7049b50f1b2)

## eidcache

Returns the EID-to-RLOC cache entries.

### Parameters

No parameters.

### Examples

    eidcache
    fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7d 2000 cache canEvict=1 transTime=0
    eid=fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7d fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7f fffe retry
    canEvict=1 timeout=10 retryDelay=30 Done

### CLI and API References

- [otThreadGetNextCacheEntry](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga52930b3360e1ef377d058a0d7f8ef170)

## eui64

Gets the factory-assigned IEEE EUI-64 for this interface.

### Parameters

No parameters.

### Examples

    eui64
    0615aae900124b00
    Done

### CLI and API References

- [otPlatRadioGetIeeeEui64](https://openthread.io/reference/group/radio-config#group__radio-config_1ga6940d730c862fae890f3a2912000002d)

## extaddr (set)

Sets the IEEE 802.15.4 Extended Address.

> [!NOTE]
> **Note:** Only succeeds when Thread protocols are disabled.

### Parameters

```
extaddr extaddr
```

### Examples

    extaddr dead00beef00cafe
    dead00beef00cafe
    Done

### CLI and API References

- [otLinkSetExtendedAddress](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga22402ed8289917e803783989a7070ae1)

## extaddr

Gets the IEEE 802.15.4 Extended Address.

### Parameters

No parameters.

### Examples

    extaddr
    dead00beef00cafe
    Done

### CLI and API References

- [otLinkGetExtendedAddress](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gac2ee0f3dfa79f664e0787eaf97a9e1c8)

## extpanid (set)

Sets the IEEE 802.15.4 Extended PAN ID.

> [!NOTE]
> **Note:** Can only be called while Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.

> [!NOTE]
> **Note:** The current commissioning credential becomes stale after changing this value. Use `pskc` to reset.

### Parameters

```
extpanid extpanid
```

### Examples

    extpanid dead00beef00cafe
    Done

### CLI and API References

- [otThreadSetExtendedPanId](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga4c89cc9bd207df86a9d7e029e61e1d82)

## extpanid

Gets the IEEE 802.15.4 Extended PAN ID.

### Parameters

No parameters.

### Examples

    extpanid
    dead00beef00cafe
    Done

### CLI and API References

- [otThreadGetExtendedPanId](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gad9fd1dbbe8ce2f3a3958ba7c78bf8af8)

## factoryreset

Deletes all the settings stored on non-volatile memory, and then triggers a platform reset.

### Parameters

No parameters.

### Examples

    factoryreset

### CLI and API References

- [otInstanceFactoryReset](https://openthread.io/reference/group/api-instance#group__api-instance_1ga20530f180bc1dc8500145fc2bde9de57)

## fake (a,an)

Sends fake Thread messages.

Available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.

### Parameters

```
fake /a/an dst-ipaddr target meshLocalIid
```

### Examples

    fake /a/an fdde:ad00:beef:0:0:ff:fe00:a800 fd00:7d03:7d03:7d03:55f2:bb6a:7a43:a03b 1111222233334444
    Done

### CLI and API References

- [otThreadSendAddressNotification](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga5c30bb04cb19d8b0f4a19d2369ca19fa)

## fem

Gets external FEM parameters.

### Parameters

No parameters.

### Examples

    fem
    LNA gain 11 dBm
    Done

### CLI and API References

- [otPlatRadioGetFemLnaGain](https://openthread.io/reference/group/radio-config#group__radio-config_1ga897992724c766f886ce28bcea642b5d2)

## fem lnagain (get)

Gets the external FEM's Rx LNA gain in dBm.

### Parameters

No parameters.

### Examples

    fem lnagain
    11
    Done

### CLI and API References

- [otPlatRadioGetFemLnaGain](https://openthread.io/reference/group/radio-config#group__radio-config_1ga897992724c766f886ce28bcea642b5d2)

## fem lnagain (set)

Sets the external FEM's Rx LNA gain in dBm.

### Parameters

No parameters.

### Examples

    fem lnagain 8
    Done

### CLI and API References

- [otPlatRadioSetFemLnaGain](https://openthread.io/reference/group/radio-config#group__radio-config_1ga09c208ac7ad818ce3461b1aad367805e)

## history ailrouters

Displays the AIL routers history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- The event, possible values are `Added`, `Changed`, `Removed`.
- The IPv6 address of the AIL router.
- Flags
  - `R`: Indicates whether or not this router is reachable.
  - `M`: The Managed Address Config flag (from the Router Advertisement (RA) header).
  - `O`: The Other Config flag (from the RA header).
  - `S`: The SNAC Router flag (from the RA header).
  - `L`: Indicates whether or not this router is the local device (this BR).
  - `P`: Indicates whether or not this router is a peer BR connected to same Thread mesh.
  - `D`: Indicates whether or not this router provides a default route.
- The default route preference (`high`, `med`, `low`) if this router provides a default route, otherwise `-`.
- The favored on-link prefix advertised by this router if any. If none, `-` is shown.

<br />

### Parameters

```
history ailrouters [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history ailrouters
    | Age                  | Event   | IPv6 Address                             |R|M|O|S|L|P|D|RtPrf |
    +---+---+---+-+-+-+-+-+-+-+---+
    |                      | Favored on-link prefix                             | | | | | | | |      |
    +---+---+-+-+-+-+-+-+-+---+
    |         00:01:35.107 | Changed | fe80:0:0:0:0:0:0:2                       |N|N|N|Y|N|Y|N|      |
    |                      | -                                                  | | | | | | | |      |
    |         00:05:01.115 | Changed | fe80:0:0:0:0:0:0:2                       |Y|N|N|Y|N|Y|N|      |
    |                      | -                                                  | | | | | | | |      |
    |         00:08:01.804 | Added   | fe80:0:0:0:0:0:0:2                       |Y|N|N|Y|N|Y|N|      |
    |                      | fd99:4cdc:3b3d:56ef::/64                           | | | | | | | |      |
    Done

    history ailrouters list
    00:01:35.161 -> event:Changed address:fe80:0:0:0:0:0:0:2 reachable:N M:N O:N S:Y local:N peer:Y def-route:N prf:
       favored-on-link-prefix:-
    00:05:01.169 -> event:Changed address:fe80:0:0:0:0:0:0:2 reachable:Y M:N O:N S:Y local:N peer:Y def-route:N prf:
       favored-on-link-prefix:-
    00:08:01.858 -> event:Added address:fe80:0:0:0:0:0:0:2 reachable:Y M:N O:N S:Y local:N peer:Y def-route:N prf:
       favored-on-link-prefix:fd99:4cdc:3b3d:56ef::/64
    Done

### CLI and API References

- [otHistoryTrackerIterateAilRoutersHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga0607d99fe742e0c8260d3c48afcc0627)

## history dhcp6pd

Displays the DHCPv6-PD history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- State: Possible states are `disabled`, `stopped`, `running`, `idle`.
- Prefix: The delegated prefix if any. If none `-` is outputted.

<br />

### Parameters

```
history dhcp6pd [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history dhcp6pd
    | Age                  | State    | Prefix                                        |
    +---+---+---+
    |         00:03:20.128 | running  | 2001:dc78:510b:1::/64                         |
    |         00:03:30.152 | running  | -                                             |
    |         00:03:47.038 | disabled | -                                             |
    Done

    history dhcp6pd list
    00:03:38.172 -> state:running prefix:2001:dc78:510b:1::/64
    00:03:48.191 -> state:running prefix:-
    00:04:05.077 -> state:disabled prefix:-
    00:05:02.857 -> state:running prefix:-
    Done

### CLI and API References

- [otHistoryTrackerIterateDhcp6PdHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga9213d013815cbdb8ed33eea9a1c90a6d)

## history dnssrpaddr

Displays the network data DNS/SRP address history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Event: Possible values are `Added` or `Removed`.
- Address of DNS/SRP server.
- Address type: `uni-local` unicast address local (address in server data) or `uni-infra` infrastructure server (address in service data), or `anycast`.
- Port or SeqNumber: Port if address is unicast, seq number for anycast address type.
- Version number.
- RLOC16 of the BR adding/removing this entry in Network Data.

<br />

### Parameters

```
history dnssrpaddr [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history dnssrpaddr
    | Age                  | Event   | Address                                 | Type      |Port/Seq| Ver | RLOC16 |
    +---+---+---+---+---+---+---+
    |         00:00:07.150 | Added   | fd4f:59ae:348a:aa48:74a4:6de9:7a30:5dfb | uni-local |   1234 |   0 | 0x0000 |
    |         00:00:09.351 | Removed | fd00:0:0:0:0:0:0:1234                   | uni-infra |  51525 |   1 | 0x0000 |
    |         00:00:28.479 | Added   | fd00:0:0:0:0:0:0:1234                   | uni-infra |  51525 |   1 | 0x0000 |
    |         00:00:30.133 | Removed | fd4f:59ae:348a:aa48:0:ff:fe00:fc10      |   anycast |      1 |   2 | 0x0000 |
    |         00:01:02.609 | Added   | fd4f:59ae:348a:aa48:0:ff:fe00:fc10      |   anycast |      1 |   2 | 0x0000 |
    |         00:01:03.574 | Removed | fd4f:59ae:348a:aa48:74a4:6de9:7a30:5dfb | uni-local |  50152 |   2 | 0x0000 |
    |         00:01:33.631 | Added   | fd4f:59ae:348a:aa48:74a4:6de9:7a30:5dfb | uni-local |  50152 |   2 | 0x0000 |
    Done

    history dnssrpaddr list
    00:00:19.646 -> event:Added addr:fd4f:59ae:348a:aa48:74a4:6de9:7a30:5dfb type:uni-local port:1234 ver:0 rloc16:0x0000
    00:00:21.847 -> event:Removed addr:fd00:0:0:0:0:0:0:1234 type:uni-infra port:51525 ver:1 rloc16:0x0000
    00:00:40.975 -> event:Added addr:fd00:0:0:0:0:0:0:1234 type:uni-infra port:51525 ver:1 rloc16:0x0000
    00:00:42.629 -> event:Removed addr:fd4f:59ae:348a:aa48:0:ff:fe00:fc10 type:anycast seqno:1 ver:2 rloc16:0x0000
    00:01:15.105 -> event:Added addr:fd4f:59ae:348a:aa48:0:ff:fe00:fc10 type:anycast seqno:1 ver:2 rloc16:0x0000
    00:01:16.070 -> event:Removed addr:fd4f:59ae:348a:aa48:74a4:6de9:7a30:5dfb type:uni-local port:50152 ver:2 rloc16:0x0000
    00:01:46.127 -> event:Added addr:fd4f:59ae:348a:aa48:74a4:6de9:7a30:5dfb type:uni-local port:50152 ver:2 rloc16:0x0000
    Done

### CLI and API References

- [otHistoryTrackerIterateDnsSrpAddrHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga620263e19f819f25321b39f5393e9be1)

## history ipaddr

Displays the unicast IPv6 address history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Event: Possible values are `Added` or `Removed`.
- Address/Prefix Length: Unicast address with its prefix length (in bits).
- Origin: Possible value are `thread`, `slaac`, `dhcp6`, or `manual`.
- Scope: IPv6 address scope.
- P: Preferred flag.
- V: Valid flag.
- RLOC (R): This flag indicates if the IPv6 address is a routing locator.

<br />

> [!NOTE]
> **Note:** All commands under `history` require the `OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE` feature to be enabled.

### Parameters

```
history ipaddr [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history ipaddr
    | Age                  | Event   | Address / Prefix Length                     | Origin |Scope| P | V | R |
    +---+---+---+---+---+---+---+---+
    |         00:00:04.991 | Removed | 2001:dead:beef:cafe:c4cb:caba:8d55:e30b/64  | slaac  |  14 | Y | Y | N |
    |         00:00:44.647 | Added   | 2001:dead:beef:cafe:c4cb:caba:8d55:e30b/64  | slaac  |  14 | Y | Y | N |
    |         00:01:07.199 | Added   | fd00:0:0:0:0:0:0:1/64                       | manual |  14 | Y | Y | N |
    |         00:02:17.885 | Added   | fdde:ad00:beef:0:0:ff:fe00:fc00/64          | thread |   3 | N | Y | N |
    |         00:02:17.885 | Added   | fdde:ad00:beef:0:0:ff:fe00:5400/64          | thread |   3 | N | Y | Y |
    |         00:02:20.107 | Removed | fdde:ad00:beef:0:0:ff:fe00:5400/64          | thread |   3 | N | Y | Y |
    |         00:02:21.575 | Added   | fdde:ad00:beef:0:0:ff:fe00:5400/64          | thread |   3 | N | Y | Y |
    |         00:02:21.575 | Added   | fdde:ad00:beef:0:ecea:c4fc:ad96:4655/64     | thread |   3 | N | Y | N |
    |         00:02:23.904 | Added   | fe80:0:0:0:3c12:a4d2:fbe0:31ad/64           | thread |   2 | Y | Y | N |
    Done

    history ipaddr list 5
    00:00:20.327 -> event:Removed address:2001:dead:beef:cafe:c4cb:caba:8d55:e30b prefixlen:64 origin:slaac scope:14 preferred:yes valid:yes rloc:no
    00:00:59.983 -> event:Added address:2001:dead:beef:cafe:c4cb:caba:8d55:e30b prefixlen:64 origin:slaac scope:14 preferred:yes valid:yes rloc:no
    00:01:22.535 -> event:Added address:fd00:0:0:0:0:0:0:1 prefixlen:64 origin:manual scope:14 preferred:yes valid:yes rloc:no
    00:02:33.221 -> event:Added address:fdde:ad00:beef:0:0:ff:fe00:fc00 prefixlen:64 origin:thread scope:3 preferred:no valid:yes rloc:no
    00:02:33.221 -> event:Added address:fdde:ad00:beef:0:0:ff:fe00:5400 prefixlen:64 origin:thread scope:3 preferred:no valid:yes rloc:yes
    Done

### CLI and API References

- [otHistoryTrackerEntryAgeToString](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga1f045c3cde042908e874d762e8141cfb)
- [otHistoryTrackerIterateUnicastAddressHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1gaa7807ba275991051720425eae86a40c7)

## history ipmaddr

Displays the multicast IPv6 address history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Event: Possible values are `Subscribed` or `Unsubscribed`.
- Multicast Address
- Origin: Possible values are `Thread` or `Manual`.

<br />

### Parameters

```
history ipmaddr [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history ipmaddr
    | Age                  | Event        | Multicast Address                       | Origin |
    +---+---+---+---+
    |         00:00:08.592 | Unsubscribed | ff05:0:0:0:0:0:0:1                      | Manual |
    |         00:01:25.353 | Subscribed   | ff05:0:0:0:0:0:0:1                      | Manual |
    |         00:01:54.953 | Subscribed   | ff03:0:0:0:0:0:0:2                      | Thread |
    |         00:01:54.953 | Subscribed   | ff02:0:0:0:0:0:0:2                      | Thread |
    |         00:01:59.329 | Subscribed   | ff33:40:fdde:ad00:beef:0:0:1            | Thread |
    |         00:01:59.329 | Subscribed   | ff32:40:fdde:ad00:beef:0:0:1            | Thread |
    |         00:02:01.129 | Subscribed   | ff03:0:0:0:0:0:0:fc                     | Thread |
    |         00:02:01.129 | Subscribed   | ff03:0:0:0:0:0:0:1                      | Thread |
    |         00:02:01.129 | Subscribed   | ff02:0:0:0:0:0:0:1                      | Thread |
    Done

    history ipmaddr list
    00:00:25.447 -> event:Unsubscribed address:ff05:0:0:0:0:0:0:1 origin:Manual
    00:01:42.208 -> event:Subscribed address:ff05:0:0:0:0:0:0:1 origin:Manual
    00:02:11.808 -> event:Subscribed address:ff03:0:0:0:0:0:0:2 origin:Thread
    00:02:11.808 -> event:Subscribed address:ff02:0:0:0:0:0:0:2 origin:Thread
    00:02:16.184 -> event:Subscribed address:ff33:40:fdde:ad00:beef:0:0:1 origin:Thread
    00:02:16.184 -> event:Subscribed address:ff32:40:fdde:ad00:beef:0:0:1 origin:Thread
    00:02:17.984 -> event:Subscribed address:ff03:0:0:0:0:0:0:fc origin:Thread
    00:02:17.984 -> event:Subscribed address:ff03:0:0:0:0:0:0:1 origin:Thread
    00:02:17.984 -> event:Subscribed address:ff02:0:0:0:0:0:0:1 origin:Thread
    Done

### CLI and API References

- [otHistoryTrackerEntryAgeToString](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga1f045c3cde042908e874d762e8141cfb)
- [otHistoryTrackerIterateMulticastAddressHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1gac6eddd7dd030228042ed74bfadf2196a)

## history neighbor

Displays the neighbor history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Type: `Child` or `Router`.
- Event: Possible values are `Added`, `Removed`, or `Changed`.
- Extended Address
- RLOC16
- Mode: MLE link mode. Possible values:
  - `-`: no flags set (rx-off-when-idle, minimal Thread device, stable network data).
  - `r`: rx-on-when-idle
  - `d`: Full Thread Device.
  - `n`: Full Network Data
- Ave RSS: Average number of frames (in dBm) received from the neighbor at the time the entry was recorded.

<br />

### Parameters

```
history neighbor [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history neighbor
    | Age                  | Type   | Event     | Extended Address | RLOC16 | Mode | Ave RSS |
    +---+---+---+---+---+---+---+
    |         00:00:29.233 | Child  | Added     | ae5105292f0b9169 | 0x8404 | -    |     -20 |
    |         00:01:38.368 | Child  | Removed   | ae5105292f0b9169 | 0x8401 | -    |     -20 |
    |         00:04:27.181 | Child  | Changed   | ae5105292f0b9169 | 0x8401 | -    |     -20 |
    |         00:04:51.236 | Router | Added     | 865c7ca38a5fa960 | 0x9400 | rdn  |     -20 |
    |         00:04:51.587 | Child  | Removed   | 865c7ca38a5fa960 | 0x8402 | rdn  |     -20 |
    |         00:05:22.764 | Child  | Changed   | ae5105292f0b9169 | 0x8401 | rn   |     -20 |
    |         00:06:40.764 | Child  | Added     | 4ec99efc874a1841 | 0x8403 | r    |     -20 |
    |         00:06:44.060 | Child  | Added     | 865c7ca38a5fa960 | 0x8402 | rdn  |     -20 |
    |         00:06:49.515 | Child  | Added     | ae5105292f0b9169 | 0x8401 | -    |     -20 |
    Done

    history neighbor list
    00:00:34.753 -> type:Child event:Added extaddr:ae5105292f0b9169 rloc16:0x8404 mode:- rss:-20
    00:01:43.888 -> type:Child event:Removed extaddr:ae5105292f0b9169 rloc16:0x8401 mode:- rss:-20
    00:04:32.701 -> type:Child event:Changed extaddr:ae5105292f0b9169 rloc16:0x8401 mode:- rss:-20
    00:04:56.756 -> type:Router event:Added extaddr:865c7ca38a5fa960 rloc16:0x9400 mode:rdn rss:-20
    00:04:57.107 -> type:Child event:Removed extaddr:865c7ca38a5fa960 rloc16:0x8402 mode:rdn rss:-20
    00:05:28.284 -> type:Child event:Changed extaddr:ae5105292f0b9169 rloc16:0x8401 mode:rn rss:-20
    00:06:46.284 -> type:Child event:Added extaddr:4ec99efc874a1841 rloc16:0x8403 mode:r rss:-20
    00:06:49.580 -> type:Child event:Added extaddr:865c7ca38a5fa960 rloc16:0x8402 mode:rdn rss:-20
    00:06:55.035 -> type:Child event:Added extaddr:ae5105292f0b9169 rloc16:0x8401 mode:- rss:-20
    Done

### CLI and API References

- [otHistoryTrackerIterateNeighborHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga7f7b77402dcea3788262def7ef68647e)

## history netinfo

Displays the network info history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Role: Device role. Possible values are `router`, `child`, `detached`, or `disabled`.
- Mode: MLE link mode. Possible values:
  - `-`: no flags set (rx-off-when-idle, minimal Thread device, stable network data).
  - `r`: rx-on-when-idle
  - `d`: Full Thread Device.
  - `n`: Full Network Data
- RLOC16
- Partition ID.

<br />

### Parameters

```
history netinfo [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history netinfo
    | Age                  | Role     | Mode | RLOC16 | Partition ID |
    +---+---+---+---+---+
    |         00:00:10.069 | router   | rdn  | 0x6000 |    151029327 |
    |         00:02:09.337 | child    | rdn  | 0x2001 |    151029327 |
    |         00:02:09.338 | child    | rdn  | 0x2001 |    151029327 |
    |         00:07:40.806 | child    | -    | 0x2001 |    151029327 |
    |         00:07:42.297 | detached | -    | 0x6000 |            0 |
    |         00:07:42.968 | disabled | -    | 0x6000 |            0 |
    Done

    history netinfo list
    00:00:59.467 -> role:router mode:rdn rloc16:0x6000 partition-id:151029327
    00:02:58.735 -> role:child mode:rdn rloc16:0x2001 partition-id:151029327
    00:02:58.736 -> role:child mode:rdn rloc16:0x2001 partition-id:151029327
    00:08:30.204 -> role:child mode:- rloc16:0x2001 partition-id:151029327
    00:08:31.695 -> role:detached mode:- rloc16:0x6000 partition-id:0
    00:08:32.366 -> role:disabled mode:- rloc16:0x6000 partition-id:0
    Done

    history netinfo 2
    | Age                  | Role     | Mode | RLOC16 | Partition ID |
    +---+---+---+---+---+
    |         00:02:05.451 | router   | rdn  | 0x6000 |    151029327 |
    |         00:04:04.719 | child    | rdn  | 0x2001 |    151029327 |
    Done

### CLI and API References

- [otHistoryTrackerIterateNetInfoHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1gaf5edfdefe128a9a37c5b5690b2ae46c3)

## history omrprefix

Displays the favored OMR prefix history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- OMR Prefix: The favored OMR prefix.
- Preference: The prefix preference associated with the OMR prefix (`low`, `med`, `high`).
- IsLocal: Indicates whether the favored OMR prefix is the same as the local one maintained by this BR.

<br />

### Parameters

```
history omrprefix [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history omrprefix
    | Age                  | OMR Prefix                                       | Pref   |IsLocal |
    +---+---+---+---+
    |         00:00:10.110 | fd44:dc78:510b:1::/64                            | low    | yes    |
    |         00:06:17.604 | 2001:1a:12d5:23ae::/64                           | med    | no     |
    |         00:13:11.235 | fd44:dc78:510b:1::/64                            | low    | yes    |
    Done

    history omrprefix list
    00:03:20.379 -> omr-prefix:fd44:dc78:510b:1::/64 prf:low is-local:yes
    00:09:27.873 -> omr-prefix:2001:1a:12d5:23ae::/64 prf:med is-local:no
    00:16:21.504 -> omr-prefix:fd44:dc78:510b:1::/64 prf:low is-local:yes
    Done

### CLI and API References

- [otHistoryTrackerIterateFavoredOmrPrefixHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1gabdcfc0473059a9fb86ff42272f92eb67)

## history onlinkprefix

Displays the favored on-link prefix history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- On-link Prefix: The favored on-link prefix on AIL.
- IsLocal: Indicates whether the favored on-link prefix is the same as the local one maintained by this BR.

<br />

### Parameters

```
history onlinkprefix [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history onlinkprefix
    | Age                  | On-link Prefix                                   |IsLocal |
    +---+---+---+
    |         00:00:50.600 | 2001:efc6:75a8:efee::/64                         | no     |
    |         00:11:04.327 | fd74:fe69:9f21:437::/64                          | yes    |
    Done

    history onlinkprefix list
    00:00:50.600 -> on-link-prefix:2001:efc6:75a8:efee::/64 is-local:no
    00:11:04.327 -> on-link-prefix:fd74:fe69:9f21:437::/64 is-local:yes
    Done

### CLI and API References

- [otHistoryTrackerIterateFavoredOnLinkPrefixHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga2dc86340d5c0a8e73ddf602a05d70db3)

## history prefix

Displays the network data for the mesh prefix history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Event: Possible values are `Added` or `Removed`.
- Prefix
- Flags/meaning:
  - `p`: Preferred flag
  - `a`: Stateless IPv6 address auto-configuration flag.
  - `d`: DHCPv6 IPv6 address configuration flag.
  - `c`: DHCPv6 other-configuration flag.
  - `r`: Default route flag.
  - `o`: On mesh flag.
  - `s`: Stable flag.
  - `n`: Nd [Dns](https://openthread.io/reference/class/ot/cli/dns) flag.
- Pref: Preference. Values can be either `high`, `med`, or `low`.
- RLOC16

<br />

### Parameters

```
history prefix [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history prefix
    | Age                  | Event   | Prefix                                      | Flags     | Pref | RLOC16 |
    +---+---+---+---+---+---+
    |         00:00:10.663 | Added   | fd00:1111:2222:3333::/64                    | paro      | med  | 0x5400 |
    |         00:01:02.054 | Removed | fd00:dead:beef:1::/64                       | paros     | high | 0x5400 |
    |         00:01:21.136 | Added   | fd00:abba:cddd:0::/64                       | paos      | med  | 0x5400 |
    |         00:01:45.144 | Added   | fd00:dead:beef:1::/64                       | paros     | high | 0x3c00 |
    |         00:01:50.944 | Added   | fd00:dead:beef:1::/64                       | paros     | high | 0x5400 |
    |         00:01:59.887 | Added   | fd00:dead:beef:1::/64                       | paros     | med  | 0x8800 |
    Done

    history prefix list
    00:04:12.487 -> event:Added prefix:fd00:1111:2222:3333::/64 flags:paro pref:med rloc16:0x5400
    00:05:03.878 -> event:Removed prefix:fd00:dead:beef:1::/64 flags:paros pref:high rloc16:0x5400
    00:05:22.960 -> event:Added prefix:fd00:abba:cddd:0::/64 flags:paos pref:med rloc16:0x5400
    00:05:46.968 -> event:Added prefix:fd00:dead:beef:1::/64 flags:paros pref:high rloc16:0x3c00
    00:05:52.768 -> event:Added prefix:fd00:dead:beef:1::/64 flags:paros pref:high rloc16:0x5400
    00:06:01.711 -> event:Added prefix:fd00:dead:beef:1::/64 flags:paros pref:med rloc16:0x8800
    Done

### CLI and API References

- [otHistoryTrackerIterateOnMeshPrefixHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga06eebd5ab28fd79164999bb6d9e29d80)

## history query netinfo

Queries the "netinfo" history entries from another device and outputs them in a table or list format. For details on the table format and its entries, please refer to the `history netinfo` command.

### Parameters

```
history query netinfo [list] rloc16 [num-entries] [max-entry-age]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- The `rloc16` indicates the RLOC16 of the device to query.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used or set to zero, all stored entries are shown in the output.
- Use the `max-entry-age` option to limit maximum age of entries. If this option is not used or set to zero, all stored entries are shown in the output.

### Examples

    history query netinfo 0xac00
    | Age                  | Role     | Mode | RLOC16 | Partition ID |
    +---+---+---+---+---+
    |         00:00:36.786 | detached | rdn  | 0xac00 |    807291876 |
    |         00:00:43.966 | detached | rdn  | 0xfffe |            0 |
    Done

### CLI and API References

- [otHistoryTrackerQueryNetInfo](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga86f5347ce156c7f788a8b835f466f008)

## history route

Displays the network data external-route history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Event: Possible values are `Added` or `Removed`.
- Route
- Flags/meaning:
  - `s`: Stable flag.
  - `n`: NAT64 flag.
- Pref: Preference. Values can be either `high`, `med`, or `low`.
- RLOC16

<br />

### Parameters

```
history route [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history route
    | Age                  | Event   | Route                                       | Flags     | Pref | RLOC16 |
    +---+---+---+---+---+---+
    |         00:00:05.456 | Removed | fd00:1111:0::/48                            | s         | med  | 0x3c00 |
    |         00:00:29.310 | Added   | fd00:1111:0::/48                            | s         | med  | 0x3c00 |
    |         00:00:42.822 | Added   | fd00:1111:0::/48                            | s         | med  | 0x5400 |
    |         00:01:27.688 | Added   | fd00:aaaa:bbbb:cccc::/64                    | s         | med  | 0x8800 |
    Done

    history route list 2
    00:00:48.704 -> event:Removed route:fd00:1111:0::/48 flags:s pref:med rloc16:0x3c00
    00:01:12.558 -> event:Added route:fd00:1111:0::/48 flags:s pref:med rloc16:0x3c00
    Done

### CLI and API References

- [otHistoryTrackerIterateExternalRouteHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1gab658e8b7a1b0dbe6f43152220404c3b3)

## history router

Displays the route-table history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Event: Possible values are `Added`, `Removed`, `NextHopChanged`, or `CostChanged`.
- ID (RLOC16): Router ID and RLOC16 of the router.
- Next Hop: Router ID and RLOC16 of the next hop. If there is no next hop, `none` is shown.
- Path Cost: old cost `->` new cost. A value of `inf` indicates an infinite path cost.

<br />

### Parameters

```
history router [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history router
    | Age                  | Event          | ID (RLOC16) | Next Hop    | Path Cost  |
    +---+---+---+---+---+
    |         00:00:05.258 | NextHopChanged |  7 (0x1c00) | 34 (0x8800) | inf ->   3 |
    |         00:00:08.604 | NextHopChanged | 34 (0x8800) | 34 (0x8800) | inf ->   2 |
    |         00:00:08.604 | Added          |  7 (0x1c00) |        none | inf -> inf |
    |         00:00:11.931 | Added          | 34 (0x8800) |        none | inf -> inf |
    |         00:00:14.948 | Removed        | 59 (0xec00) |        none | inf -> inf |
    |         00:00:14.948 | Removed        | 54 (0xd800) |        none | inf -> inf |
    |         00:00:14.948 | Removed        | 34 (0x8800) |        none | inf -> inf |
    |         00:00:14.948 | Removed        |  7 (0x1c00) |        none | inf -> inf |
    |         00:00:54.795 | NextHopChanged | 59 (0xec00) | 34 (0x8800) |   1 ->   5 |
    |         00:02:33.735 | NextHopChanged | 54 (0xd800) |        none |  15 -> inf |
    |         00:03:10.915 | CostChanged    | 54 (0xd800) | 34 (0x8800) |  13 ->  15 |
    |         00:03:45.716 | NextHopChanged | 54 (0xd800) | 34 (0x8800) |  15 ->  13 |
    |         00:03:46.188 | CostChanged    | 54 (0xd800) | 59 (0xec00) |  13 ->  15 |
    |         00:04:19.124 | CostChanged    | 54 (0xd800) | 59 (0xec00) |  11 ->  13 |
    |         00:04:52.008 | CostChanged    | 54 (0xd800) | 59 (0xec00) |   9 ->  11 |
    |         00:05:23.176 | CostChanged    | 54 (0xd800) | 59 (0xec00) |   7 ->   9 |
    |         00:05:51.081 | CostChanged    | 54 (0xd800) | 59 (0xec00) |   5 ->   7 |
    |         00:06:48.721 | CostChanged    | 54 (0xd800) | 59 (0xec00) |   3 ->   5 |
    |         00:07:13.792 | NextHopChanged | 54 (0xd800) | 59 (0xec00) |   1 ->   3 |
    |         00:09:28.681 | NextHopChanged |  7 (0x1c00) | 34 (0x8800) | inf ->   3 |
    |         00:09:31.882 | Added          |  7 (0x1c00) |        none | inf -> inf |
    |         00:09:51.240 | NextHopChanged | 54 (0xd800) | 54 (0xd800) | inf ->   1 |
    |         00:09:54.204 | Added          | 54 (0xd800) |        none | inf -> inf |
    |         00:10:20.645 | NextHopChanged | 34 (0x8800) | 34 (0x8800) | inf ->   2 |
    |         00:10:24.242 | NextHopChanged | 59 (0xec00) | 59 (0xec00) | inf ->   1 |
    |         00:10:24.242 | Added          | 34 (0x8800) |        none | inf -> inf |
    |         00:10:41.900 | NextHopChanged | 59 (0xec00) |        none |   1 -> inf |
    |         00:10:42.480 | Added          |  3 (0x0c00) |  3 (0x0c00) | inf -> inf |
    |         00:10:43.614 | Added          | 59 (0xec00) | 59 (0xec00) | inf ->   1 |
    Done

    history router list 20
    00:00:06.959 -> event:NextHopChanged router:7(0x1c00) nexthop:34(0x8800) old-cost:inf new-cost:3
    00:00:10.305 -> event:NextHopChanged router:34(0x8800) nexthop:34(0x8800) old-cost:inf new-cost:2
    00:00:10.305 -> event:Added router:7(0x1c00) nexthop:none old-cost:inf new-cost:inf
    00:00:13.632 -> event:Added router:34(0x8800) nexthop:none old-cost:inf new-cost:inf
    00:00:16.649 -> event:Removed router:59(0xec00) nexthop:none old-cost:inf new-cost:inf
    00:00:16.649 -> event:Removed router:54(0xd800) nexthop:none old-cost:inf new-cost:inf
    00:00:16.649 -> event:Removed router:34(0x8800) nexthop:none old-cost:inf new-cost:inf
    00:00:16.649 -> event:Removed router:7(0x1c00) nexthop:none old-cost:inf new-cost:inf
    00:00:56.496 -> event:NextHopChanged router:59(0xec00) nexthop:34(0x8800) old-cost:1 new-cost:5
    00:02:35.436 -> event:NextHopChanged router:54(0xd800) nexthop:none old-cost:15 new-cost:inf
    00:03:12.616 -> event:CostChanged router:54(0xd800) nexthop:34(0x8800) old-cost:13 new-cost:15
    00:03:47.417 -> event:NextHopChanged router:54(0xd800) nexthop:34(0x8800) old-cost:15 new-cost:13
    00:03:47.889 -> event:CostChanged router:54(0xd800) nexthop:59(0xec00) old-cost:13 new-cost:15
    00:04:20.825 -> event:CostChanged router:54(0xd800) nexthop:59(0xec00) old-cost:11 new-cost:13
    00:04:53.709 -> event:CostChanged router:54(0xd800) nexthop:59(0xec00) old-cost:9 new-cost:11
    00:05:24.877 -> event:CostChanged router:54(0xd800) nexthop:59(0xec00) old-cost:7 new-cost:9
    00:05:52.782 -> event:CostChanged router:54(0xd800) nexthop:59(0xec00) old-cost:5 new-cost:7
    00:06:50.422 -> event:CostChanged router:54(0xd800) nexthop:59(0xec00) old-cost:3 new-cost:5
    00:07:15.493 -> event:NextHopChanged router:54(0xd800) nexthop:59(0xec00) old-cost:1 new-cost:3
    00:09:30.382 -> event:NextHopChanged router:7(0x1c00) nexthop:34(0x8800) old-cost:inf new-cost:3
    Done

### CLI and API References

- [otHistoryTrackerIterateRouterHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1gabb4a52d7f6e60e6d841de9fcf88c6c71)

## history rx

Displays the IPv6 message RX history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Type:
  - IPv6 message type, such as `UDP`, `TCP`, `HopOpts`, and `ICMP6` (and its subtype).
  - `src`: Source IPv6 address and port number.
  - `dst`: Destination IPv6 address and port number (port number is valid for UDP/TCP, otherwise it is 0).
- Len: IPv6 payload length (excluding the IPv6 header).
- Chksum: Message checksum (valid for UDP, TCP, or ICMP6 messages).
- Sec: Indicates if link-layer security was used.
- Prio: Message priority. Possible values are `low`, `norm`, `high`, or `net` (for Thread control messages).
- RSS: Received Signal Strength (in dBm), averaged over all received fragment frames that formed the message. For TX history, `NA` (not applicable) is displayed.
- Dir: Shows whether the message was sent (`TX`) or received (`RX`). A failed transmission is indicated with `TX-F` in table format or `tx-success:no` in list format. Examples of a failed transmission include a `tx`getting aborted and no `ack` getting sent from the peer for any of the message fragments.
- Neighb: Short address (RLOC16) of the neighbor with whom the message was sent/received. If the frame was broadcast, it is shown as `bcast` in table format or `0xffff` in list format. If the short address of the neighbor is not available, it is shown as `unknwn` in table format or `0xfffe` in list format.
- Radio: Radio link on which the message was sent/received (useful when `OPENTHREAD_CONFIG_MULTI_RADIO` is enabled). Can be `15.4`, `trel`, or `all` (if sent on all radio links).

<br />

### Parameters

```
history rx [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history rx
    | Age                  | Type             | Len   | Chksum | Sec | Prio | RSS  |Dir | Neighb | Radio |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    50 | 0xbd26 |  no |  net |  -20 | RX | 0x4800 |  15.4 |
    |         00:00:07.640 | src: [fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788                                 |
    |                      | dst: [ff02:0:0:0:0:0:0:1]:19788                                             |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | HopOpts          |    44 | 0x0000 | yes | norm |  -20 | RX | 0x4800 |  15.4 |
    |         00:00:09.263 | src: [fdde:ad00:beef:0:0:ff:fe00:4800]:0                                    |
    |                      | dst: [ff03:0:0:0:0:0:0:2]:0                                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    12 | 0x3f7d | yes |  net |  -20 | RX | 0x4800 |  15.4 |
    |         00:00:09.302 | src: [fdde:ad00:beef:0:0:ff:fe00:4800]:61631                                |
    |                      | dst: [fdde:ad00:beef:0:0:ff:fe00:4801]:61631                                |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | ICMP6(EchoReqst) |    16 | 0x942c | yes | norm |  -20 | RX | 0x4800 |  15.4 |
    |         00:00:09.304 | src: [fdde:ad00:beef:0:ac09:a16b:3204:dc09]:0                               |
    |                      | dst: [fdde:ad00:beef:0:dc0e:d6b3:f180:b75b]:0                               |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | HopOpts          |    44 | 0x0000 | yes | norm |  -20 | RX | 0x4800 |  15.4 |
    |         00:00:09.304 | src: [fdde:ad00:beef:0:0:ff:fe00:4800]:0                                    |
    |                      | dst: [ff03:0:0:0:0:0:0:2]:0                                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    50 | 0x2e37 |  no |  net |  -20 | RX | 0x4800 |  15.4 |
    |         00:00:21.622 | src: [fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788                                 |
    |                      | dst: [ff02:0:0:0:0:0:0:1]:19788                                             |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    50 | 0xe177 |  no |  net |  -20 | RX | 0x4800 |  15.4 |
    |         00:00:26.640 | src: [fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788                                 |
    |                      | dst: [ff02:0:0:0:0:0:0:1]:19788                                             |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |   165 | 0x82ee | yes |  net |  -20 | RX | 0x4800 |  15.4 |
    |         00:00:30.000 | src: [fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788                                 |
    |                      | dst: [fe80:0:0:0:a4a5:bbac:a8e:bd07]:19788                                  |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    93 | 0x52df |  no |  net |  -20 | RX | unknwn |  15.4 |
    |         00:00:30.480 | src: [fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788                                 |
    |                      | dst: [fe80:0:0:0:a4a5:bbac:a8e:bd07]:19788                                  |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    50 | 0x5ccf |  no |  net |  -20 | RX | unknwn |  15.4 |
    |         00:00:30.772 | src: [fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788                                 |
    |                      | dst: [ff02:0:0:0:0:0:0:1]:19788                                             |
    Done

    history rx list 4
    00:00:13.368
        type:UDP len:50 checksum:0xbd26 sec:no prio:net rss:-20 from:0x4800 radio:15.4
        src:[fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788
        dst:[ff02:0:0:0:0:0:0:1]:19788
    00:00:14.991
        type:HopOpts len:44 checksum:0x0000 sec:yes prio:norm rss:-20 from:0x4800 radio:15.4
        src:[fdde:ad00:beef:0:0:ff:fe00:4800]:0
        dst:[ff03:0:0:0:0:0:0:2]:0
    00:00:15.030
        type:UDP len:12 checksum:0x3f7d sec:yes prio:net rss:-20 from:0x4800 radio:15.4
        src:[fdde:ad00:beef:0:0:ff:fe00:4800]:61631
        dst:[fdde:ad00:beef:0:0:ff:fe00:4801]:61631
    00:00:15.032
        type:ICMP6(EchoReqst) len:16 checksum:0x942c sec:yes prio:norm rss:-20 from:0x4800 radio:15.4
        src:[fdde:ad00:beef:0:ac09:a16b:3204:dc09]:0
        dst:[fdde:ad00:beef:0:dc0e:d6b3:f180:b75b]:0
    Done

### CLI and API References

- [otHistoryTrackerIterateRxHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga547778323fd8c08d52986c1bf2134b20)

## history rxtx

Displays the combined IPv6 message RX and TX history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Type:
  - IPv6 message type, such as `UDP`, `TCP`, `HopOpts`, and `ICMP6` (and its subtype).
  - `src`: Source IPv6 address and port number.
  - `dst`: Destination IPv6 address and port number (port number is valid for UDP/TCP, otherwise it is 0).
- Len: IPv6 payload length (excluding the IPv6 header).
- Chksum: Message checksum (valid for UDP, TCP, or ICMP6 messages).
- Sec: Indicates if link-layer security was used.
- Prio: Message priority. Possible values are `low`, `norm`, `high`, or `net` (for Thread control messages).
- RSS: Received Signal Strength (in dBm), averaged over all received fragment frames that formed the message. For TX history, `NA` (not applicable) is displayed.
- Dir: Shows whether the message was sent (`TX`) or received (`RX`). A failed transmission is indicated with `TX-F` in table format or `tx-success:no` in list format. Examples of a failed transmission include a `tx`getting aborted and no `ack` getting sent from the peer for any of the message fragments.
- Neighb: Short address (RLOC16) of the neighbor with whom the message was sent/received. If the frame was broadcast, it is shown as `bcast` in table format or `0xffff` in list format. If the short address of the neighbor is not available, it is shown as `unknwn` in table format or `0xfffe` in list format.
- Radio: Radio link on which the message was sent/received (useful when `OPENTHREAD_CONFIG_MULTI_RADIO` is enabled). Can be `15.4`, `trel`, or `all` (if sent on all radio links).

<br />

### Parameters

```
history rxtx [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history rxtx
    | Age                  | Type             | Len   | Chksum | Sec | Prio | RSS  |Dir | Neighb | Radio |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | HopOpts          |    44 | 0x0000 | yes | norm |  -20 | RX | 0x0800 |  15.4 |
    |         00:00:09.267 | src: [fdde:ad00:beef:0:0:ff:fe00:800]:0                                     |
    |                      | dst: [ff03:0:0:0:0:0:0:2]:0                                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    12 | 0x6c6b | yes |  net |  -20 | RX | 0x0800 |  15.4 |
    |         00:00:09.290 | src: [fdde:ad00:beef:0:0:ff:fe00:800]:61631                                 |
    |                      | dst: [fdde:ad00:beef:0:0:ff:fe00:801]:61631                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | ICMP6(EchoReqst) |    16 | 0xc6a2 | yes | norm |  -20 | RX | 0x0800 |  15.4 |
    |         00:00:09.292 | src: [fdde:ad00:beef:0:efe8:4910:cf95:dee9]:0                               |
    |                      | dst: [fdde:ad00:beef:0:af4c:3644:882a:3698]:0                               |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | ICMP6(EchoReply) |    16 | 0xc5a2 | yes | norm |  NA  | TX | 0x0800 |  15.4 |
    |         00:00:09.292 | src: [fdde:ad00:beef:0:af4c:3644:882a:3698]:0                               |
    |                      | dst: [fdde:ad00:beef:0:efe8:4910:cf95:dee9]:0                               |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    50 | 0xaa0d | yes |  net |  NA  | TX | 0x0800 |  15.4 |
    |         00:00:09.294 | src: [fdde:ad00:beef:0:0:ff:fe00:801]:61631                                 |
    |                      | dst: [fdde:ad00:beef:0:0:ff:fe00:800]:61631                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | HopOpts          |    44 | 0x0000 | yes | norm |  -20 | RX | 0x0800 |  15.4 |
    |         00:00:09.296 | src: [fdde:ad00:beef:0:0:ff:fe00:800]:0                                     |
    |                      | dst: [ff03:0:0:0:0:0:0:2]:0                                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    50 | 0xc1d8 |  no |  net |  -20 | RX | 0x0800 |  15.4 |
    |         00:00:09.569 | src: [fe80:0:0:0:54d9:5153:ffc6:df26]:19788                                 |
    |                      | dst: [ff02:0:0:0:0:0:0:1]:19788                                             |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    50 | 0x3cb1 |  no |  net |  -20 | RX | 0x0800 |  15.4 |
    |         00:00:16.519 | src: [fe80:0:0:0:54d9:5153:ffc6:df26]:19788                                 |
    |                      | dst: [ff02:0:0:0:0:0:0:1]:19788                                             |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    50 | 0xeda0 |  no |  net |  -20 | RX | 0x0800 |  15.4 |
    |         00:00:20.599 | src: [fe80:0:0:0:54d9:5153:ffc6:df26]:19788                                 |
    |                      | dst: [ff02:0:0:0:0:0:0:1]:19788                                             |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |   165 | 0xbdfa | yes |  net |  -20 | RX | 0x0800 |  15.4 |
    |         00:00:21.059 | src: [fe80:0:0:0:54d9:5153:ffc6:df26]:19788                                 |
    |                      | dst: [fe80:0:0:0:8893:c2cc:d983:1e1c]:19788                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    64 | 0x1c11 |  no |  net |  NA  | TX | 0x0800 |  15.4 |
    |         00:00:21.062 | src: [fe80:0:0:0:8893:c2cc:d983:1e1c]:19788                                 |
    |                      | dst: [fe80:0:0:0:54d9:5153:ffc6:df26]:19788                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    93 | 0xedff |  no |  net |  -20 | RX | unknwn |  15.4 |
    |         00:00:21.474 | src: [fe80:0:0:0:54d9:5153:ffc6:df26]:19788                                 |
    |                      | dst: [fe80:0:0:0:8893:c2cc:d983:1e1c]:19788                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    44 | 0xd383 |  no |  net |  NA  | TX | bcast  |  15.4 |
    |         00:00:21.811 | src: [fe80:0:0:0:8893:c2cc:d983:1e1c]:19788                                 |
    |                      | dst: [ff02:0:0:0:0:0:0:2]:19788                                             |
    Done

    history rxtx list 5
    00:00:02.100
        type:UDP len:50 checksum:0xd843 sec:no prio:net rss:-20 from:0x0800 radio:15.4
        src:[fe80:0:0:0:54d9:5153:ffc6:df26]:19788
        dst:[ff02:0:0:0:0:0:0:1]:19788
    00:00:15.331
        type:HopOpts len:44 checksum:0x0000 sec:yes prio:norm rss:-20 from:0x0800 radio:15.4
        src:[fdde:ad00:beef:0:0:ff:fe00:800]:0
        dst:[ff03:0:0:0:0:0:0:2]:0
    00:00:15.354
        type:UDP len:12 checksum:0x6c6b sec:yes prio:net rss:-20 from:0x0800 radio:15.4
        src:[fdde:ad00:beef:0:0:ff:fe00:800]:61631
        dst:[fdde:ad00:beef:0:0:ff:fe00:801]:61631
    00:00:15.356
        type:ICMP6(EchoReqst) len:16 checksum:0xc6a2 sec:yes prio:norm rss:-20 from:0x0800 radio:15.4
        src:[fdde:ad00:beef:0:efe8:4910:cf95:dee9]:0
        dst:[fdde:ad00:beef:0:af4c:3644:882a:3698]:0
    00:00:15.356
        type:ICMP6(EchoReply) len:16 checksum:0xc5a2 sec:yes prio:norm tx-success:yes to:0x0800 radio:15.4
        src:[fdde:ad00:beef:0:af4c:3644:882a:3698]:0
        dst:[fdde:ad00:beef:0:efe8:4910:cf95:dee9]:0
    Done

### CLI and API References

- [otHistoryTrackerIterateRxHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga547778323fd8c08d52986c1bf2134b20)
- [otHistoryTrackerIterateTxHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga6593cf8bbb31f637db9ca366923b819b)

## history tx

Displays the IPv6 message TX history in table or list format.

Each table or list entry provides:

- Age: Time elapsed since the command was issued, and given in the format: `hours`:`minutes`:`seconds`.`milliseconds`
- Type:
  - IPv6 message type, such as `UDP`, `TCP`, `HopOpts`, and `ICMP6` (and its subtype).
  - `src`: Source IPv6 address and port number.
  - `dst`: Destination IPv6 address and port number (port number is valid for UDP/TCP, otherwise it is 0).
- Len: IPv6 payload length (excluding the IPv6 header).
- Chksum: Message checksum (valid for UDP, TCP, or ICMP6 messages).
- Sec: Indicates if link-layer security was used.
- Prio: Message priority. Possible values are `low`, `norm`, `high`, or `net` (for Thread control messages).
- RSS: Received Signal Strength (in dBm), averaged over all received fragment frames that formed the message. For TX history, `NA` (not applicable) is displayed.
- Dir: Shows whether the message was sent (`TX`) or received (`RX`). A failed transmission is indicated with `TX-F` in table format or `tx-success:no` in list format. Examples of a failed transmission include a `tx`getting aborted and no `ack` getting sent from the peer for any of the message fragments.
- Neighb: Short address (RLOC16) of the neighbor with whom the message was sent/received. If the frame was broadcast, it is shown as `bcast` in table format or `0xffff` in list format. If the short address of the neighbor is not available, it is shown as `unknwn` in table format or `0xfffe` in list format.
- Radio: Radio link on which the message was sent/received (useful when `OPENTHREAD_CONFIG_MULTI_RADIO` is enabled). Can be `15.4`, `trel`, or `all` (if sent on all radio links).

<br />

### Parameters

```
history tx [list] [num-entries]
```

- Use the `list` option to display the output in list format. Otherwise, the output is shown in table format.
- Use the `num-entries` option to limit the output to the number of most-recent entries specified. If this option is not used, all stored entries are shown in the output.

### Examples

    history tx
    | Age                  | Type             | Len   | Chksum | Sec | Prio | RSS  |Dir | Neighb | Radio |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | ICMP6(EchoReply) |    16 | 0x932c | yes | norm |  NA  | TX | 0x4800 |  15.4 |
    |         00:00:18.798 | src: [fdde:ad00:beef:0:dc0e:d6b3:f180:b75b]:0                               |
    |                      | dst: [fdde:ad00:beef:0:ac09:a16b:3204:dc09]:0                               |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    50 | 0xce87 | yes |  net |  NA  | TX | 0x4800 |  15.4 |
    |         00:00:18.800 | src: [fdde:ad00:beef:0:0:ff:fe00:4801]:61631                                |
    |                      | dst: [fdde:ad00:beef:0:0:ff:fe00:4800]:61631                                |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    64 | 0xf7ba |  no |  net |  NA  | TX | 0x4800 |  15.4 |
    |         00:00:39.499 | src: [fe80:0:0:0:a4a5:bbac:a8e:bd07]:19788                                  |
    |                      | dst: [fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788                                 |
    +---+---+---+---+---+---+---+---+---+---+
    |                      | UDP              |    44 | 0x26d4 |  no |  net |  NA  | TX | bcast  |  15.4 |
    |         00:00:40.256 | src: [fe80:0:0:0:a4a5:bbac:a8e:bd07]:19788                                  |
    |                      | dst: [ff02:0:0:0:0:0:0:2]:19788                                             |
    Done

    history tx list
    00:00:23.957
        type:ICMP6(EchoReply) len:16 checksum:0x932c sec:yes prio:norm tx-success:yes to:0x4800 radio:15.4
        src:[fdde:ad00:beef:0:dc0e:d6b3:f180:b75b]:0
        dst:[fdde:ad00:beef:0:ac09:a16b:3204:dc09]:0
    00:00:23.959
        type:UDP len:50 checksum:0xce87 sec:yes prio:net tx-success:yes to:0x4800 radio:15.4
        src:[fdde:ad00:beef:0:0:ff:fe00:4801]:61631
        dst:[fdde:ad00:beef:0:0:ff:fe00:4800]:61631
    00:00:44.658
        type:UDP len:64 checksum:0xf7ba sec:no prio:net tx-success:yes to:0x4800 radio:15.4
        src:[fe80:0:0:0:a4a5:bbac:a8e:bd07]:19788
        dst:[fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788
    00:00:45.415
        type:UDP len:44 checksum:0x26d4 sec:no prio:net tx-success:yes to:0xffff radio:15.4
        src:[fe80:0:0:0:a4a5:bbac:a8e:bd07]:19788
        dst:[ff02:0:0:0:0:0:0:2]:19788
    Done

### CLI and API References

- [otHistoryTrackerIterateTxHistory](https://openthread.io/reference/group/api-history-tracker#group__api-history-tracker_1ga6593cf8bbb31f637db9ca366923b819b)

## ifconfig (up,down)

Brings the IPv6 interface up or down.

Call this to enable or disable IPv6 communication.

When `OPENTHREAD_CONFIG_IP6_INIT_EXT_ADDR_POOLENABLE`*is enabled, `
<a href="/reference/group/api-ip6.html#group`* `_api-ip6_1ga1267e60c738b2695c32c9fb2af2a552b">otIp6Init()
` MUST be called prior to calling this function. If it is not, this function will return `OT_ERROR_INVALID_STATE`.

### Parameters

```
ifconfig up|down
```

### Examples

    ifconfig up
    Done

    ifconfig down
    Done

### CLI and API References

- [otIp6SetEnabled](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga5c01df2121fb605fad92bb153302e6e2)

## ifconfig

Indicates whether or not the IPv6 interface is up.

### Parameters

No parameters.

### Examples

    ifconfig
    down
    Done

    ifconfig
    up
    Done

### CLI and API References

- [otIp6IsEnabled](https://openthread.io/reference/group/api-ip6#group__api-ip6_1gaaede0c1e8bebc7fb228727a650ac0f75)

## ifconfig init

Initializes the IPv6 interface and its external address pools.

Requires `OPENTHREAD_CONFIG_IP6_INIT_EXT_ADDR_POOL_ENABLE`.

It provides the memory buffers for the external unicast and multicast address pools and must be called before enabling the IPv6 interface.

The provided memory buffers MUST persist and remain valid as long as the OpenThread instance is initialized. OpenThread will use these provided buffers to manage the pools of externally added unicast and multicast addresses (i.e., those added via `
https://openthread.io/reference/group/api-ip6#group__api-ip6_1gafba5b6ff43be8ec8eeefadfb97beccb8
` and `
https://openthread.io/reference/group/api-ip6#group__api-ip6_1gaaad3f2b2e8bb16aaba23c811796852a0
`).

This function can only be called once. Subsequent calls will return `OT_ERROR_ALREADY`.

The `OPENTHREAD_CONFIG_IP6_INIT_EXT_ADDR_POOL_ENABLE` feature and this function allow the external unicast/multicast address pools to be configured at run-time after OpenThread instance initialization, rather than build-time. When this feature is disabled, the build-time configs `OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS` and `OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS` specify the pool sizes used by the OpenThread stack.

This feature allows the OpenThread stack to be compiled as a library without specifying the address pool sizes. It delegates the configuration of the pools to the next layer, allowing the OpenThread stack to be integrated into various projects without requiring a new OpenThread stack configuration to be built.

This command is intended for testing purposes only and requires `OPENTHREAD_CONFIG_CLI_IFCONFIG_INIT_ENABLE` and `OPENTHREAD_CONFIG_IP6_INIT_EXT_ADDR_POOL_ENABLE`.

### Parameters

```
ifconfig unicast-addr-pool-size multicast-addr-pool-size
```

### Examples

    ifconfig init 5 6
    Done

### CLI and API References

- [otIp6Init](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga1267e60c738b2695c32c9fb2af2a552b)

## instanceid

Gets the instance identifier.

The instance identifier is set to a random value when the instance is constructed, and then its value will not change after initialization.

### Parameters

No parameters.

### Examples

    instanceid
    468697314
    Done

### CLI and API References

- [otInstanceGetId](https://openthread.io/reference/group/api-instance#group__api-instance_1gab2dc6286f0697cfea9bf0b5ceb0091af)

## ipaddr add

Adds a Network Interface Address to the Thread interface.

The passed-in instance `aAddress` is copied by the Thread interface. The Thread interface only supports a fixed number of externally added unicast addresses. See `OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS` and `OPENTHREAD_CONFIG_IP6_INIT_EXT_ADDR_POOL_ENABLE`.

### Parameters

```
ipaddr add aAddress
```

### Examples

    ipaddr add 2001::dead:beef:cafe
    Done

### CLI and API References

- [otIp6AddUnicastAddress](https://openthread.io/reference/group/api-ip6#group__api-ip6_1gafba5b6ff43be8ec8eeefadfb97beccb8)

## ipaddr del

Removes a Network Interface Address from the Thread interface.

### Parameters

```
ipaddr del aAddress
```

### Examples

    ipaddr del 2001::dead:beef:cafe
    Done

### CLI and API References

- [otIp6RemoveUnicastAddress](https://openthread.io/reference/group/api-ip6#group__api-ip6_1gae736cfaad0c6f3fbbdfb489951e98703)

## ipaddr

Gets the list of IPv6 addresses assigned to the Thread interface.

### Parameters

```
ipaddr [-v]
```

Use `-v` to get more verbose information about the address:

- `origin`: can be `thread`, `slaac`, `dhcp6`, `manual` and indicates the origin of the address
- `plen`: prefix length
- `preferred`: preferred flag (boolean)
- `valid`: valid flag (boolean)

<br />

### Examples

    ipaddr
    fdde:ad00:beef:0:0:ff:fe00:0
    fdde:ad00:beef:0:558:f56b:d688:799
    fe80:0:0:0:f3d9:2a82:c8d8:fe43
    Done

    ipaddr -v
    fd5e:18fa:f4a5:b8:0:ff:fe00:fc00 origin:thread plen:64 preferred:0 valid:1
    fd5e:18fa:f4a5:b8:0:ff:fe00:dc00 origin:thread plen:64 preferred:0 valid:1
    fd5e:18fa:f4a5:b8:f8e:5d95:87a0:e82c origin:thread plen:64 preferred:0 valid:1
    fe80:0:0:0:4891:b191:e277:8826 origin:thread plen:64 preferred:1 valid:1
    Done

### CLI and API References

- [otIp6GetUnicastAddresses](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga1ea85353729e421a87ba0aa14cd00cdd)

## ipaddr linklocal

Gets the Thread link-local IPv6 address.

The Thread link local address is derived using IEEE802.15.4 Extended Address as Interface Identifier.

### Parameters

No parameters.

### Examples

    ipaddr linklocal
    fe80:0:0:0:f3d9:2a82:c8d8:fe43
    Done

### CLI and API References

- [otThreadGetLinkLocalIp6Address](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaab6772b6b4c5bccdff308c94bc92445e)

## ipaddr mleid

Gets the Mesh Local EID address.

### Parameters

No parameters.

### Examples

    ipaddr mleid
    fdde:ad00:beef:0:558:f56b:d688:799
    Done

### CLI and API References

- [otThreadGetMeshLocalEid](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaef1ca2374a8ef770b6754cfc2aaef913)

## ipaddr rloc

Gets the Thread Routing Locator (RLOC) address.

### Parameters

No parameters.

### Examples

    ipaddr rloc
    fdde:ad00:beef:0:0:ff:fe00:0
    Done

### CLI and API References

- [otThreadGetRloc](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga05e888e2cdaad32e23c663a87dcf1972)

## ipmaddr add

Subscribes the Thread interface to a Network Interface Multicast Address.

The passed in instance `aAddress` will be copied by the Thread interface. The Thread interface only supports a fixed number of externally added multicast addresses. See `OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS` and `OPENTHREAD_CONFIG_IP6_INIT_EXT_ADDR_POOL_ENABLE`.

### Parameters

```
ipmaddr add aAddress
```

### Examples

    ipmaddr add ff05::1
    Done

### CLI and API References

- [otIp6SubscribeMulticastAddress](https://openthread.io/reference/group/api-ip6#group__api-ip6_1gaaad3f2b2e8bb16aaba23c811796852a0)

## ipmaddr del

Unsubscribes the Thread interface to a Network Interface Multicast Address.

### Parameters

```
ipmaddr del aAddress
```

### Examples

    ipmaddr del ff05::1
    Done

### CLI and API References

- [otIp6UnsubscribeMulticastAddress](https://openthread.io/reference/group/api-ip6#group__api-ip6_1gaf6552c66cbcd0b88fb8efa139c22b22a)

## ipmaddr

Gets the list of IPv6 multicast addresses subscribed to the Thread interface.

### Parameters

No parameters.

### Examples

    ipmaddr
    ff05:0:0:0:0:0:0:1
    ff33:40:fdde:ad00:beef:0:0:1
    ff32:40:fdde:ad00:beef:0:0:1
    Done

### CLI and API References

- [otIp6GetMulticastAddresses](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga20125582448c6b3101808f726f469f61)

## ipmaddr llatn

Gets the Thread Link-Local All Thread Nodes multicast address.

The address is a link-local Unicast Prefix-Based Multicast Address \[RFC 3306\], with:

- flgs set to 3 (P = 1 and T = 1)
- scop set to 2
- plen set to 64
- network prefix set to the Mesh Local Prefix
- group ID set to 1

<br />

### Parameters

No parameters.

### Examples

    ipmaddr llatn
    ff32:40:fdde:ad00:beef:0:0:1
    Done

### CLI and API References

- [otThreadGetLinkLocalAllThreadNodesMulticastAddress](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga2e240d5d443560a31c5c2bb90adb67c4)

## ipmaddr rlatn

Gets the Thread Realm-Local All Thread Nodes multicast address.

The address is a realm-local Unicast Prefix-Based Multicast Address \[RFC 3306\], with:

- flgs set to 3 (P = 1 and T = 1)
- scop set to 3
- plen set to 64
- network prefix set to the Mesh Local Prefix
- group ID set to 1

<br />

### Parameters

No parameters.

### Examples

    ipmaddr rlatn
    ff33:40:fdde:ad00:beef:0:0:1
    Done

### CLI and API References

- [otThreadGetRealmLocalAllThreadNodesMulticastAddress](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaf33d044532611c0341fbcf6f96e5fdfb)

## joiner discerner (set)

Sets the Joiner Discerner.

> [!NOTE]
> **Note:** The Joiner Discerner takes the place of the Joiner EUI-64 during the joiner session of Thread Commissioning.

### Parameters

```
joiner discerner discerner
```

- Use `{number}/{length}` to set the `discerner`.
- `joiner discerner clear` sets `aDiscerner` to `nullptr`.

### Examples

    joiner discerner 0xabc/12
    Done

### CLI and API References

- [otJoinerSetDiscerner](https://openthread.io/reference/group/api-joiner#group__api-joiner_1ga91b50aed158aee79ca0101ea0034278e)

## joiner discerner clear

Clear the Joiner discerner.

### Parameters

No parameters.

### Examples

    joiner discerner clear
    Done

### CLI and API References

- No associated API

## joiner discerner

Gets the Joiner Discerner.

For more information, refer to [otJoinerSetDiscerner](https://openthread.io/reference/group/api-joiner#group__api-joiner_1ga91b50aed158aee79ca0101ea0034278e).

### Parameters

No parameters.

### Examples

    joiner discerner
    0xabc/12
    Done

### CLI and API References

- [otJoinerGetDiscerner](https://openthread.io/reference/group/api-joiner#group__api-joiner_1gadc775c31ae61dbb33f8fa0fc68db0925)

## joiner help

Print the `joiner` help menu.

### Parameters

No parameters.

### Examples

    joiner help
    help
    id
    start
    state
    stop
    Done

### CLI and API References

- No associated API

## joiner id

Gets the Joiner ID.

If a Joiner Discerner is not set, Joiner ID is the first 64 bits of the result of computing SHA-256 over factory-assigned IEEE EUI-64. Otherwise the Joiner ID is calculated from the Joiner Discerner value.

The Joiner ID is also used as the device's IEEE 802.15.4 Extended Address during the commissioning process.

### Parameters

No parameters.

### Examples

    joiner id
    d65e64fa83f81cf7
    Done

### CLI and API References

- [otJoinerGetId](https://openthread.io/reference/group/api-joiner#group__api-joiner_1ga29942ce6c3a2de02d64821cb86f717d9)

## joiner start

Enables the Thread Joiner role.

### Parameters

```
joiner start joining-device-credential [provisioning-url]
```

- `joining-device-credential`: Joiner Passphrase. Must be a string of all uppercase alphanumeric characters (0-9 and A-Y, excluding I, O, Q, and Z for readability), with a length between 6 and 32 characters.
- `provisioning-url`: Provisioning URL for the Joiner (optional).

### Examples

    joiner start J01NM3
    Done

### CLI and API References

- [otJoinerStart](https://openthread.io/reference/group/api-joiner#group__api-joiner_1ga788df6d2d36014dd9c8175449244e0e5)

## joiner state

Gets the Joiner State.

Returns one of the following states:

- `Idle`
- `Discover`
- `Connecting`
- `Connected`
- `Entrust`
- `Joined`

<br />

### Parameters

No parameters.

### Examples

    joiner state
    Idle
    Done

### CLI and API References

- [otJoinerGetState](https://openthread.io/reference/group/api-joiner#group__api-joiner_1ga07f9fc20f65ea45aeb0c41e2bfff7da5)

## joiner stop

Disables the Thread Joiner role.

### Parameters

No parameters.

### Examples

    joiner stop
    Done

### CLI and API References

- [otJoinerStop](https://openthread.io/reference/group/api-joiner#group__api-joiner_1ga97cda4f2ba3f8f923ad095a440a44c5c)

## joinerport (set)

Sets the Joiner UDP Port.

### Parameters

```
joinerport udp-port
```

### Examples

    joinerport 1000
    Done

### CLI and API References

- [otThreadSetJoinerUdpPort](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga83057db009c10d2915dee6de329e3aa6)

## joinerport

Gets the Joiner UDP Port.

### Parameters

No parameters.

### Examples

    joinerport
    1000
    Done

### CLI and API References

- [otThreadGetJoinerUdpPort](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga8540c6b25d0609ffb3acdf72baf32c43)

## keysequence counter (set)

Sets the thrKeySequenceCounter.

> [!NOTE]
> **Note:** This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.

### Parameters

```
keysequence counter counter
```

### Examples

    keysequence counter 10
    Done

### CLI and API References

- [otThreadSetKeySequenceCounter](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gadfb2f6ddd49b0694a1104694e8c1fbfa)

## keysequence counter

Gets the thrKeySequenceCounter.

### Parameters

No parameters.

### Examples

    keysequence counter
    10
    Done

### CLI and API References

- [otThreadGetKeySequenceCounter](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaa008a54002f4e337e3ad14db1da1de5f)

## keysequence guardtime (set)

Sets the thrKeySwitchGuardTime (in hours).

> [!NOTE]
> **Note:** This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.

### Parameters

```
keysequence guardtime guardtime-hours
```

Use `0` to `Thread Key Switch` immediately if there's a key index match.

### Examples

    keysequence guardtime 0
    Done

### CLI and API References

- [otThreadSetKeySwitchGuardTime](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gad383ddb17d1375fd2aed7f525769d68e)

## keysequence guardtime

Gets the thrKeySwitchGuardTime (in hours).

### Parameters

No parameters.

### Examples

    keysequence guardtime
    0
    Done

### CLI and API References

- [otThreadGetKeySwitchGuardTime](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaf48470d150108c1f2f6538d703b85761)

## leaderdata

Gets the Thread Leader Data.

### Parameters

No parameters.

### Examples

    leaderdata
    Partition ID: 1077744240
    Weighting: 64
    Data Version: 109
    Stable Data Version: 211
    Leader Router ID: 60
    Done

### CLI and API References

- [otThreadGetLeaderData](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga60dbcadfdbff6d8f03544d1e20bf6e9e)

## leaderweight (set)

Sets the Thread Leader Weight used when operating in the Leader role.

Directly sets the Leader Weight to the new value, replacing its previous value (which may have been determined from the current `
https://openthread.io/reference/struct/ot-device-properties
`).

### Parameters

```
leaderweight weight
```

### Examples

    leaderweight 128
    Done

### CLI and API References

- [otThreadSetLocalLeaderWeight](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga0392e445a417ff04f2289e5f7d8a23b3)

## leaderweight

Gets the Thread Leader Weight used when operating in the Leader role.

### Parameters

No parameters.

### Examples

    leaderweight
    128
    Done

### CLI and API References

- [otThreadGetLocalLeaderWeight](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gab5d0a4a74b5a02a09eec3315aad91bce)

## linkmetrics config enhanced-ack clear

Sends a Link Metrics Management Request to clear an Enhanced-ACK Based Probing.

### Parameters

```
linkmetrics config [async] peer-ipaddr enhanced-ack clear
```

- `async`: Use the non-blocking mode.
- `peer-ipaddr` should be the Link Local address of the neighboring device.

### Examples

    linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack clear
    Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
    Status: Success
    Done

### CLI and API References

- [otLinkMetricsConfigEnhAckProbing](https://openthread.io/reference/group/api-link-metrics#group__api-link-metrics_1gaf86783e1548420dcd77819c615313cdc)

## linkmetrics config enhanced-ack register

The additional `r` is optional and only used for reference devices. When this option is specified, Type/Average Enum of each Type Id Flags is set to reserved. This is used to verify that the Probing Subject correctly handles invalid Type Id Flags, and only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.

Sends a Link Metrics Management Request to register an Enhanced-ACK Based Probing.

### Parameters

```
linkmetrics config [async] peer-ipaddr enhanced-ack register [qmr][r]
```

- `async`: Use the non-blocking mode.
- \[`q`, `m`, and `r`\] map to [otLinkMetricsValues](https://openthread.io/reference/struct/ot-link-metrics-values). Per spec 4.11.3.4.4.6, you can only use a maximum of two options at once, for example `q`, or `qm`.
  - `q`: Layer 2 LQI.
  - `m`: Link Margin.
  - `r`: RSSI.

### Examples

    linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm
    Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
    Status: Success
    Done

    > linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm r
    Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
    Status: Cannot support new series
    Done

### CLI and API References

- [otLinkMetricsConfigEnhAckProbing](https://openthread.io/reference/group/api-link-metrics#group__api-link-metrics_1gaf86783e1548420dcd77819c615313cdc)

## linkmetrics config forward

Sends an MLE Link Metrics Management Request to configure or clear a Forward Tracking Series.

### Parameters

```
linkmetrics config [async] peer-ipaddr forward series-id [ldraX][pqmr]
```

- `async`: Use the non-blocking mode.
- `peer-ipaddr`: Peer address.
- `series-id`: The Series ID.
- \[`l`, `d`, `r`, and `a`\] map to [otLinkMetricsSeriesFlags](https://openthread.io/reference/struct/ot-link-metrics-series-flags). `X` represents none of the `https://openthread.io/reference/struct/ot-link-metrics-series-flags`, and stops the accounting and removes the series.
  - `l`: MLE Link Probe.
  - `d`: MAC Data.
  - `r`: MAC Data Request.
  - `a`: MAC Ack.
  - `X`: Can only be used without any other flags.
- \[`p`, `q`, `m`, and `r`\] map to [otLinkMetricsValues](https://openthread.io/reference/struct/ot-link-metrics-values).
  - `p`: Layer 2 Number of PDUs received.
  - `q`: Layer 2 LQI.
  - `m`: Link Margin.
  - `r`: RSSI.

### Examples

    linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 forward 1 dra pqmr
    Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
    Status: SUCCESS
    Done

### CLI and API References

- [otLinkMetricsConfigForwardTrackingSeries](https://openthread.io/reference/group/api-link-metrics#group__api-link-metrics_1gadbb127e677c4f131b6020ecbdb68d535)

## linkmetrics probe

Sends an MLE Link Probe message.

### Parameters

```
linkmetrics probe peer-ipaddr series-id length
```

- `peer-ipaddr`: Peer address.
- `series-id`: The Series ID for which this Probe message targets.
- `length`: The length of the Probe message. A valid range is \[0, 64\].

### Examples

    linkmetrics probe fe80:0:0:0:3092:f334:1455:1ad2 1 10
    Done

### CLI and API References

- [otLinkMetricsSendLinkProbe](https://openthread.io/reference/group/api-link-metrics#group__api-link-metrics_1ga69460ed6e31b72ff1109087ca794c918)

## linkmetrics request forward

Perform a Link Metrics query (Forward Tracking Series).

### Parameters

```
linkmetrics query [async] peer-ipaddr forward series-id
```

- `async`: Use the non-blocking mode.
- `peer-ipaddr`: Peer address.
- `series-id`: The Series ID.

### Examples

    linkmetrics request fe80:0:0:0:3092:f334:1455:1ad2 forward 1
    Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2
    - PDU Counter: 2 (Count/Summation)
    - LQI: 76 (Exponential Moving Average)
    - Margin: 82 (dB) (Exponential Moving Average)
    - RSSI: -18 (dBm) (Exponential Moving Average)
    Done

### CLI and API References

- [otLinkMetricsQuery](https://openthread.io/reference/group/api-link-metrics#group__api-link-metrics_1gaaa4fedad5a2046c0e1b7cdae701d8285)

## linkmetrics request single

Perform a Link Metrics query (Single Probe).

### Parameters

```
linkmetrics request [async] peer-ipaddr single [pqmr]
```

- `async`: Use the non-blocking mode.
- `peer-ipaddr`: Peer address.
- \[`p`, `q`, `m`, and `r`\] map to [otLinkMetrics](https://openthread.io/reference/struct/ot-link-metrics).
  - `p`: Layer 2 Number of PDUs received.
  - `q`: Layer 2 LQI.
  - `m`: Link Margin.
  - `r`: RSSI.

### Examples

    linkmetrics request fe80:0:0:0:3092:f334:1455:1ad2 single qmr
    Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2
    - LQI: 76 (Exponential Moving Average)
    - Margin: 82 (dB) (Exponential Moving Average)
    - RSSI: -18 (dBm) (Exponential Moving Average)
    Done

### CLI and API References

- [otLinkMetricsQuery](https://openthread.io/reference/group/api-link-metrics#group__api-link-metrics_1gaaa4fedad5a2046c0e1b7cdae701d8285)

## linkmetricsmgr (enable,disable)

Enable or disable Link Metrics Manager.

### Parameters

```
linkmetricsmgr enable|disable
```

### Examples

    linkmetricmgr enable
    Done

    linkmetricmgr disable
    Done

### CLI and API References

- [otLinkMetricsManagerSetEnabled](https://openthread.io/reference/group/api-link-metrics#group__api-link-metrics_1gad179dc4ac498a0d7dbeef765b0788ae3)

## linkmetricsmgr show

Get Link Metrics data of a neighbor by its extended address.

### Parameters

No parameters.

### Examples

    linkmetricsmgr show
    ExtAddr:827aa7f7f63e1234, LinkMargin:80, Rssi:-20
    Done

### CLI and API References

- [otLinkMetricsManagerGetMetricsValueByExtAddr](https://openthread.io/reference/group/api-link-metrics#group__api-link-metrics_1ga8a375dc3db7e2e3d3d00bb8b855b9cbf)

## locate (set)

Locate the closest destination of an anycast address (i.e., find the destination's mesh local EID and RLOC16).

The closest destination is determined based on the current routing table and path costs within the Thread mesh.

Available when `OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is enabled.

### Parameters

```
locate anycastaddr
```

### Examples

    locate fdde:ad00:beef:0:0:ff:fe00:fc00
    fdde:ad00:beef:0:d9d3:9000:16b:d03b 0xc800
    Done

### CLI and API References

- [otThreadLocateAnycastDestination](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaf73ae270c84f95a16af7978ced3792b6)

## locate

Gets the current state (`In Progress` or `Idle`) of anycast locator.

Available when `OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    locate
    Idle
    Done

    locate fdde:ad00:beef:0:0:ff:fe00:fc10

    locate
    In Progress
    Done

### CLI and API References

- [otThreadIsAnycastLocateInProgress](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga4410614ca31517e61bded8afd397fa29)

## log filename

Specifies filename to capture `
https://openthread.io/reference/group/plat-logging#group__plat-logging_1gada6f3e6235ef97eb169bccb45755fd5a
` messages, useful when debugging automated test scripts on Linux when logging disrupts the automated test scripts.

Requires `OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART` and `OPENTHREAD_POSIX`.

### Parameters

```
log filename filename
```

### Examples

### CLI and API References

- [otPlatDebugUart_logfile](https://openthread.io/reference/group/internal-debug-api#group__internal-debug-api_1gab0752030b8b2d8626acd48d59435e0d9)

## log level (set)

Sets the log level for a given OpenThread instance.

> [!NOTE]
> **Note:** This function requires `OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1`.

In a multi-instance configuration (`OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE`), if `OPENTHREAD_CONFIG_LOG_INSTANCE_AWARE_API_ENABLE` is not enabled, this function returns `OT_ERROR_NOTCAPABLE`*. When the log level is explicitly set on an instance, it overrides the global log level set using `
<a href="/reference/group/api-logging.html#group`* `_api-logging_1gad2468bc293c95479e21b449261e3c73b">otLoggingSetLevel()
`.

### Parameters

```
log level level
```

### Examples

    log level 4
    Done

### CLI and API References

- [otSetLogLevel](https://openthread.io/reference/group/api-logging#group__api-logging_1ga543ea6e4d0ccebbad6dddbcea361f500)

## log level

Get the log level.

### Parameters

No parameters.

### Examples

    log level
    1
    Done

### CLI and API References

- [otGetLogLevel](https://openthread.io/reference/group/api-logging#group__api-logging_1gaac60eb3f1f11e8e07e669fe3035e2697)

## mac altshortaddr

Get the IEEE 802.15.4 alternate short address.

### Parameters

No parameters.

### Examples

    mac altshortaddr
    0x4802
    Done

### CLI and API References

- [otLinkGetAlternateShortAddress](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga0389a2d2fc2a9be9249ac9e1464ebdce)

## mac retries direct (get,set)

Gets or sets the number of direct TX retries on the MAC layer.

### Parameters

```
mac retries direct [number]
```

Use the optional `number` argument to set the number of direct TX retries.

### Examples

    mac retries direct
    3
    Done

    mac retries direct 5
    Done

### CLI and API References

- [otLinkGetMaxFrameRetriesDirect](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gae2ac10b3d62bf28c9f0d60d1ec07fcf0)
- [otLinkSetMaxFrameRetriesDirect](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga800b9551537e863644b9187dc4a546bf)

## mac retries indirect (get,set)

Gets or sets the number of indirect TX retries on the MAC layer.

### Parameters

```
mac retries indirect [number]
```

Use the optional `number` argument to set the number of indirect Tx retries.

### Examples

    mac retries indirect
    3
    Done

     max retries indirect 5
    Done

### CLI and API References

- [otLinkGetMaxFrameRetriesIndirect](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga65073fc8070d4d1067b9489603425d90)
- [otLinkSetMaxFrameRetriesIndirect](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gaf815723ff6d2090cab834515c8726dfa)

## mac send

Instructs an `Rx-Off-When-Idle` device to send a MAC frame to its parent. This command is for certification, and can only be used when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.

### Parameters

```
mac send datarequest | emptydata
```

You must choose one of the following two arguments:

- `datarequest`: Enqueues an IEEE 802.15.4 Data Request message for transmission.
- `emptydata`: Instructs the device to send an empty IEEE 802.15.4 data frame.

<br />

### Examples

    mac send datarequest
    Done

    mac send emptydata
    Done

### CLI and API References

- [otLinkSendDataRequest](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga1974b75203f3732b28dceb414ac71004)
- [otLinkSendEmptyData](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga1e49c3896a00fb0eb7c1b8cafbfd062e)

## macfilter addr add

Is available only when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.

Adds an IEEE 802.15.4 Extended Address to the MAC filter list. If you specify the optional `rss` argument, this fixes the received signal strength for messages from the address. If you do not use the `rss` option, the address will use whatever default value you have set. If you have not set a default, the signal strength will be the over-air signal.

### Parameters

```
macfilter addr add extaddr [rss]
```

### Examples

    macfilter addr add 0f6127e33af6b403 -95
    Done

    macfilter addr add 0f6127e33af6b402
    Done

### CLI and API References

- [otLinkFilterAddAddress](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga4a63d28b035a5e8af7185169561c6b49)

## macfilter addr allowlist

Enables the `allowlist` MAC filter mode, which means that only the MAC addresses in the MAC filter list will be allowed access.

### Parameters

No parameters.

### Examples

    macfilter addr allowlist
    Done

### CLI and API References

- [otLinkFilterSetAddressMode](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga3955a3fda6cfc1d14854e8ea27fc5f37)

## macfilter addr clear

Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.

This command clears all the extended addresses from the MAC filter list.

> [!NOTE]
> **Note:** This command does not affect entries in the `RssIn` list. That list contains extended addresses where the `rss` has been set to a fixed value that differs from the default.

### Parameters

No parameters.

### Examples

    macfilter addr clear
    Done

### CLI and API References

- [otLinkFilterClearAddresses](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga94cc887de643f2f96e487ea0997815e8)

## macfilter addr denylist

Enables the `denylist` MAC filter mode, which means that all MAC addresses in the MAC filter list will be denied access.

### Parameters

No parameters.

### Examples

    macfilter addr denylist
    Done

### CLI and API References

- [otLinkFilterSetAddressMode](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga3955a3fda6cfc1d14854e8ea27fc5f37)

## macfilter addr disable

Disables MAC filter modes.

### Parameters

No parameters.

### Examples

    macfilter addr disable
    Done

### CLI and API References

- No associated API

## macfilter addr

Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.

Provides the following information:

- Current mode of the MAC filter list: Either `AllowList`, `DenyList,` or `Disabled`
- A list of all the extended addresses in the filter. The received signal strength (rss) and link quality indicator (lqi) are listed next to the address if these values have been set to be different from the default values.

<br />

### Parameters

No parameters.

### Examples

    macfilter addr
    Allowlist
    0f6127e33af6b403 : rss -95 (lqi 1)
    0f6127e33af6b402
    Done

### CLI and API References

- [otLinkFilterGetAddressMode](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga97c0c5f07e6b9da6c4eceb782d3a616f)

## macfilter addr remove

Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.

This command removes the specified extended address from the MAC filter list.

> [!NOTE]
> **Note:** No action is performed if the specified extended address does not match an entry in the MAC filter list.

### Parameters

```
macfilter addr remove extaddr
```

### Examples

    macfilter addr remove 0f6127e33af6b402
    Done

### CLI and API References

- [otLinkFilterRemoveAddress](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga2b551f52cd1219e05d67d50c6a818f65)

## macfilter

Provides the following information:

- `Address Mode`: Current mode of the MAC filter: Either `AllowList`, `DenyList,` or `Disabled`
- A list of all the extended addresses in the MAC filter list. The received signal strength (rss) and link quality indicator (lqi) are listed next to the address if these values have been set to be different from the default values.
- A separate list (`RssIn List`) that shows all the extended addresses where the `rss` has been set to be different from the default value.
- `Default rss`: Shows the default values, if applicable, for the `rss` and `lqi` settings.

<br />

> [!NOTE]
> **Note:** An extended address can be in the `RssIn` list without being in the MAC filter list.

### Parameters

No parameters.

### Examples

    macfilter
    Address Mode: Allowlist
    0f6127e33af6b403 : rss -95 (lqi 1)
    0f6127e33af6b402
    RssIn List:
    0f6127e33af6b403 : rss -95 (lqi 1)
    Default rss: -50 (lqi 3)
    Done

### CLI and API References

- [otLinkFilterSetAddressMode](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga3955a3fda6cfc1d14854e8ea27fc5f37)
- [otLinkFilterGetNextAddress](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga1945f71acd9ee1fba5d6d5dfda28acc6)
- [otLinkFilterGetNextRssIn](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gac93b29aa7295a10c2dfcbe56fafd56d9)

## macfilter rss add

Adds the specified Extended Address to the `RssIn` list (or modifies an existing address in the `RssIn` list) and sets the received signal strength (in dBm) entry for messages from that address.

> [!NOTE]
> **Note:** The `RssIn` list contains Extended Addresses whose `rss` or link quality indicator (`lqi`) values have been set to be different from the defaults.

### Parameters

```
macfilter rss add extaddr rss
```

To set a default value for the received signal strength for all received messages, use the `*` for the `extaddr` argument.

### Examples

    macfilter rss add * -50
    Done

    macfilter rss add 0f6127e33af6b404 -85
    Done

### CLI and API References

- [otLinkFilterAddRssIn](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga8a468b55fa1ec67070c98edbf49e5a27)

## macfilter rss add-lqi

Adds the specified Extended Address to the `RssIn` list (or modifies an existing address in the `RssIn` list) and sets the fixed link quality indicator for messages from that address. The Extended Address does not necessarily have to be in the `address allowlist/denylist` filter to set the `lqi`.

> [!NOTE]
> **Note:** The `RssIn` list contains Extended Addresses whose `lqi` or received signal strength (`rss`) values have been set to be different from the defaults. The `lqi` will automatically get converted to a corresponding `rss` value.

This is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.

### Parameters

```
macfilter rss add-lqi extaddr lqi
```

To set a default value for the link quality indicator for all received messages, use the `*` for the `extaddr` argument. The allowed range is 0 to 3.

### Examples

    macfilter rss add-lqi * 3
    Done

    macfilter rss add-lqi 0f6127e33af6b404 2
    Done

### CLI and API References

- [otLinkConvertLinkQualityToRss](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gaf54d5c6aebf638347644803e67f365e3)
- [otLinkFilterSetDefaultRssIn](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga76a85ce8690221fb1dbce6c98acdd3fe)

## macfilter rss clear

Clears all the received signal strength (`rss`) and link quality indicator (`lqi`) entries (including defaults) from the `RssIn` list.

Performing this action means that all Extended Addresses will use the on-air signal.

Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.

### Parameters

No parameters.

### Examples

    macfilter rss clear
    Done

### CLI and API References

- [otLinkFilterClearAllRssIn](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga13e8b2ddba9edeed876c222e6c2984fe)

## macfilter rss

Provides the following information:

- Listing of all the extended addresses where the received signal strength (`rss`) has been set to be different from the default value. The link quality indicator (`lqi`) is also shown. The `rss` and `lqi` settings map to each other. If you set one, the value of the other gets set automatically. This list of addresses is called the `RssIn List`. Setting either the `rsi` or the `lqi` adds the corresponding extended address to the `RssIn` list.
- `Default rss`: Shows the default values, if applicable, for the `rss` and `lqi` settings.

<br />

### Parameters

No parameters.

### Examples

    macfilter rss
    0f6127e33af6b403 : rss -95 (lqi 1)
    Default rss: -50 (lqi 3)
    Done

### CLI and API References

- [otLinkFilterGetNextRssIn](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gac93b29aa7295a10c2dfcbe56fafd56d9)

## macfilter rss remove

Removes the specified Extended Address from the `RssIn` list.

Once removed from the `RssIn` list, this MAC address will instead use the default `rss` and `lqi` settings, assuming defaults have been set. (If no defaults have been set, the over-air signal is used.)

Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.

No action is performed if there is no existing entry in the `RssIn` list matching the specified Extended Address.

### Parameters

```
macfilter rss remove extaddr
```

If you wish to remove the default received signal strength and link quality indicator settings, use the `*` as the `extaddr`. This unsets the defaults but does not remove entries from the `RssIn` list.

### Examples

    macfilter rss remove *
    Done

    macfilter rss remove 0f6127e33af6b404
    Done

### CLI and API References

- [otLinkFilterRemoveRssIn](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gaa815e16d469fedc544d9067c7263d77f)

## meshdiag childip6

Send a query to a parent to retrieve the IPv6 addresses of all its MTD children.

### Parameters

```
meshdiag childip6 parent-rloc16
```

### Examples

    meshdiag childip6 0xdc00
    child-rloc16: 0xdc02
        fdde:ad00:beef:0:ded8:cd58:b73:2c21
        fd00:2:0:0:c24a:456:3b6b:c597
        fd00:1:0:0:120b:95fe:3ecc:d238
    child-rloc16: 0xdc03
        fdde:ad00:beef:0:3aa6:b8bf:e7d6:eefe
        fd00:2:0:0:8ff8:a188:7436:6720
        fd00:1:0:0:1fcf:5495:790a:370f
    Done

### CLI and API References

- [otMeshDiagQueryChildrenIp6Addrs](https://openthread.io/reference/group/api-mesh-diag#group__api-mesh-diag_1ga0d1abaad22e01b6c1c59337e6b7c322b)

## meshdiag childtable

Start a query for child table of a router with a given RLOC16. Output lists all child entries. Information per child:

- RLOC16
- Extended MAC address
- Thread Version
- Timeout (in seconds)
- Age (seconds since last heard)
- Supervision interval (in seconds)
- Number of queued messages (in case child is sleepy)
- Device Mode
- RSS (average and last)
- Error rates: frame tx (at MAC layer), IPv6 message tx (above MAC)
- Connection time (seconds since link establishment `{dd}d.{hh}:{mm}:{ss}` format)
- CSL info:
  - If synchronized
  - Period (in unit of 10-symbols-time)
  - Timeout (in seconds)

<br />

### Parameters

No parameters.

### Examples

    meshdiag childtable 0x6400
    rloc16:0x6402 ext-addr:8e6f4d323bbed1fe ver:4
        timeout:120 age:36 supvn:129 q-msg:0
        rx-on:yes type:ftd full-net:yes
        rss - ave:-20 last:-20 margin:80
        err-rate - frame:11.51% msg:0.76%
        conn-time:00:11:07
        csl - sync:no period:0 timeout:0 channel:0
    rloc16:0x6403 ext-addr:ee24e64ecf8c079a ver:4
        timeout:120 age:19 supvn:129 q-msg:0
        rx-on:no type:mtd full-net:no
        rss - ave:-20 last:-20  margin:80
        err-rate - frame:0.73% msg:0.00%
        conn-time:01:08:53
        csl - sync:no period:0 timeout:0 channel:0
    Done

### CLI and API References

- No associated API

## meshdiag routerneighbortable

Start a query for router neighbor table of a router with a given RLOC16. Output lists all router neighbor entries. Information per entry:

- RLOC16
- Extended MAC address
- Thread Version
- RSS (average and last) and link margin
- Error rates, frame tx (at MAC layer), IPv6 message tx (above MAC)
- Connection time (seconds since link establishment `{dd}d.{hh}:{mm}:{ss}` format)

<br />

### Parameters

```
meshdiag routerneighbortable router-rloc16
```

### Examples

    meshdiag routerneighbortable 0x7400
    rloc16:0x9c00 ext-addr:764788cf6e57a4d2 ver:4
       rss - ave:-20 last:-20 margin:80
       err-rate - frame:1.38% msg:0.00%
       conn-time:01:54:02
    rloc16:0x7c00 ext-addr:4ed24fceec9bf6d3 ver:4
       rss - ave:-20 last:-20 margin:80
       err-rate - frame:0.72% msg:0.00%
       conn-time:00:11:27
    Done

### CLI and API References

- [otMeshDiagQueryRouterNeighborTable](https://openthread.io/reference/group/api-mesh-diag#group__api-mesh-diag_1gad7ccd5df782c0ae1f3cd58fc358fb567)

## meshdiag topology

Discover network topology (list of routers and their connections). Parameters are optional and indicate additional items to discover. Can be added in any order.

- `ip6-addrs` to discover the list of IPv6 addresses of every router.
- `children` to discover the child table of every router.

<br />

Information per router:

- Router ID
- RLOC16
- Extended MAC address
- Thread Version (if known)
- Whether the router is this device is itself (`me`)
- Whether the router is the parent of this device when device is a child (`parent`)
- Whether the router is `leader`
- Whether the router acts as a border router providing external connectivity (`br`)
- List of routers to which this router has a link:
  - `3-links`: Router IDs to which this router has a incoming link with link quality 3
  - `2-links`: Router IDs to which this router has a incoming link with link quality 2
  - `1-links`: Router IDs to which this router has a incoming link with link quality 1
  - If a list if empty, it is omitted in the out.
- If `ip6-addrs`, list of IPv6 addresses of the router
- If `children`, list of all children of the router. Information per child:
  - RLOC16
  - Incoming Link Quality from perspective of parent to child (zero indicates unknown)
  - Child Device mode (`r` rx-on-when-idle, `d` Full Thread Device, `n` Full Network Data, `-` no flags set)
  - Whether the child is this device itself (`me`)
  - Whether the child acts as a border router providing external connectivity (`br`)

<br />

### Parameters

```
meshdiag topology [ip6-addrs] [children]
```

### Examples

    meshdiag topology
    id:02 rloc16:0x0800 ext-addr:8aa57d2c603fe16c ver:4 - me - leader
       3-links:{ 46 }
    id:46 rloc16:0xb800 ext-addr:fe109d277e0175cc ver:4
       3-links:{ 02 51 57 }
    id:33 rloc16:0x8400 ext-addr:d2e511a146b9e54d ver:4
       3-links:{ 51 57 }
    id:51 rloc16:0xcc00 ext-addr:9aab43ababf05352 ver:4
       3-links:{ 33 57 }
       2-links:{ 46 }
    id:57 rloc16:0xe400 ext-addr:dae9c4c0e9da55ff ver:4
       3-links:{ 46 51 }
       1-links:{ 33 }
    Done

### CLI and API References

- [otMeshDiagDiscoverTopology](https://openthread.io/reference/group/api-mesh-diag#group__api-mesh-diag_1ga5a11838d4525fd78682d462c2cbbae7a)

## mleadvimax

Gets the current Interval Max value used by Advertisement trickle timer.

This API requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`, and is intended for testing only.

### Parameters

No parameters.

### Examples

    mleadvimax
    12000
    Done

### CLI and API References

- [otThreadGetAdvertisementTrickleIntervalMax](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gadfdd24c241d937d155bc5fd6d06b8027)

## mliid

Sets the Mesh Local IID (for test purpose).

Requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`.

It must be used before Thread stack is enabled.

Only for testing/reference device.

### Parameters

```
mliid iid
```

### Examples

    mliid 1122334455667788
    Done

### CLI and API References

- [otIp6SetMeshLocalIid](https://openthread.io/reference/group/api-ip6#group__api-ip6_1gaad753e4cabd04c63fc7b2c19c8333315)

## mlr reg

Registers Multicast Listeners to Primary Backbone Router.

`OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE` and `OPENTHREAD_CONFIG_COMMISSIONER_ENABLE` must be enabled.

Omit timeout to use the default MLR timeout on the Primary Backbone Router.

Use timeout = 0 to deregister Multicast Listeners.

### Parameters

```
mlr reg ipaddr [timeout]
```

### Examples

    mlr reg ff04::1
    status 0, 0 failed
    Done

    mlr reg ff04::1 ff04::2 ff02::1
    status 2, 1 failed
    ff02:0:0:0:0:0:0:1
    Done

    mlr reg ff04::1 ff04::2 1000
    status 0, 0 failed
    Done

    mlr reg ff04::1 ff04::2 0
    status 0, 0 failed
    Done

### CLI and API References

- [otIp6RegisterMulticastListeners](https://openthread.io/reference/group/api-ip6#group__api-ip6_1gaa723ddc99b7546ef8b78267122811b48)

## mode (get,set)

Set the MLE Link Mode configuration.

### Parameters

```
mode [rdn]
```

- `-`: no flags set (rx-off-when-idle, minimal Thread device, stable network data)
- `r`: rx-on-when-idle
- `d`: Full Thread Device
- `n`: Full Network Data

### Examples

    mode rdn
    Done

    mode -
    Done

### CLI and API References

- [otThreadSetLinkMode](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga55503224cce967140b9e137095671dbe)

## multiradio

Get the list of supported radio links by the device.

This command is always available, even when only a single radio is supported by the device.

### Parameters

No parameters.

### Examples

    multiradio
    [15.4, TREL]
    Done

### CLI and API References

- No associated API

## multiradio neighbor list

Gets the multi radio link information associated with a neighbor with a given Extended Address.

`OPENTHREAD_CONFIG_MULTI_RADIO` must be enabled.

### Parameters

No parameters.

### Examples

    multiradio neighbor list
    ExtAddr:3a65bc38dbe4a5be, RLOC16:0xcc00, Radios:[15.4(255), TREL(255)]
    ExtAddr:17df23452ee4a4be, RLOC16:0x1300, Radios:[15.4(255)]
    Done

### CLI and API References

- [otMultiRadioGetNeighborInfo](https://openthread.io/reference/group/api-multi-radio#group__api-multi-radio_1ga5ba13edaeaf56d1c268ceee95fd22cb5)

## multiradio neighbor

Gets the multi radio link information associated with a neighbor with a given Extended Address.

`OPENTHREAD_CONFIG_MULTI_RADIO` must be enabled.

### Parameters

```
multiradio neighbor ext-address
```

### Examples

    multiradio neighbor 3a65bc38dbe4a5be
    [15.4(255), TREL(255)]
    Done

### CLI and API References

- [otMultiRadioGetNeighborInfo](https://openthread.io/reference/group/api-multi-radio#group__api-multi-radio_1ga5ba13edaeaf56d1c268ceee95fd22cb5)

## nat64 (enable,disable)

Enable or disable NAT64 functions.

> [!NOTE]
> **Note:** This includes the NAT64 Translator (when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled) and the NAT64 Prefix Manager (when `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled).

When `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled, setting disabled to true resets the mapping table in the translator.

Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` or `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled.

### Parameters

```
nat64 enable|disable
```

### Examples

    nat64 enable
    Done

    nat64 disable
    Done

### CLI and API References

- [otNat64SetEnabled](https://openthread.io/reference/group/api-nat64#group__api-nat64_1ga090b96c16818082842bec7514977efea)

## nat64 cidr

### Parameters

No parameters.

### Examples

    nat64 cidr 192.168.255.0/24
    Done

### CLI and API References

## nat64 cidr

Gets the IPv4 CIDR configured in the NAT64 translator.

Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    nat64 cidr
    192.168.255.0/24
    Done

### CLI and API References

- [otNat64GetCidr](https://openthread.io/reference/group/api-nat64#group__api-nat64_1gaa9e2fecc83a9eda09ee29ce44c19b14a)

## nat64 counters

Gets the NAT64 translator packet and error counters.

Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    nat64 counters
    |               | 4 to 6                  | 6 to 4                  |
    +---+---+---+
    | Protocol      | Pkts     | Bytes        | Pkts     | Bytes        |
    +---+---+---+---+---+
    |         Total |       11 |          704 |       11 |          704 |
    |           TCP |        0 |            0 |        0 |            0 |
    |           UDP |        0 |            0 |        0 |            0 |
    |          ICMP |       11 |          704 |       11 |          704 |
    | Errors        | Pkts                    | Pkts                    |
    +---+---+---+
    |         Total |                       8 |                       4 |
    |   Illegal Pkt |                       0 |                       0 |
    |   Unsup Proto |                       0 |                       0 |
    |    No Mapping |                       2 |                       0 |
    Done

### CLI and API References

- [otNat64GetCounters](https://openthread.io/reference/group/api-nat64#group__api-nat64_1ga51f65def7773ec6c21c9faf43c56b3d1)
- [otNat64GetErrorCounters](https://openthread.io/reference/group/api-nat64#group__api-nat64_1ga6316a9b9cb570390a6af5cbd053da430)

## nat64 mappings

Gets the next AddressMapping info (using an iterator).

Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    nat64 mappings
    |          | Address                   | Ports or ICMP Ids |        | 4 to 6       | 6 to 4       |
    +---+---+---+---+---+---+
    | ID       | IPv6       | IPv4         |   v6    |   v4    | Expiry | Pkts | Bytes | Pkts | Bytes |
    +---+---+---+---+---+---+---+---+---+
    | 00021cb9 | fdc7::df79 | 192.168.64.2 |  65100  |  65200  |  7196s |    6 |   456 |   11 |  1928 |
    |                                                               TCP |    0 |     0 |    0 |     0 |
    |                                                               UDP |    1 |   136 |   16 |  1608 |
    |                                                              ICMP |    5 |   320 |    5 |   320 |

### CLI and API References

- [otNat64GetNextAddressMapping](https://openthread.io/reference/group/api-nat64#group__api-nat64_1ga241b4a01fdb1b32a142e1457aff69ea1)

## nat64 state

Gets the state of NAT64 functions.

`PrefixManager` state is available when `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled. `Translator` state is available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled.

When `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled, `PrefixManager` returns one of the following states:

- `Disabled`: NAT64 prefix manager is disabled.
- `NotRunning`: NAT64 prefix manager is enabled, but is not running. This could mean that the routing manager is disabled.
- `Idle`: NAT64 prefix manager is enabled and is running, but is not publishing a NAT64 prefix. This can happen when there is another border router publishing a NAT64 prefix with a higher priority.
- `Active`: NAT64 prefix manager is enabled, running, and publishing a NAT64 prefix.

<br />

When `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled, `Translator` returns one of the following states:

- `Disabled`: NAT64 translator is disabled.
- `NotRunning`: NAT64 translator is enabled, but is not translating packets. This could mean that the Translator is not configured with a NAT64 prefix or a CIDR for NAT64.
- `Active`: NAT64 translator is enabled and is translating packets.

<br />

### Parameters

No parameters.

### Examples

    nat64 state
    PrefixManager: Active
    Translator: Active
    Done

### CLI and API References

- [otNat64GetPrefixManagerState](https://openthread.io/reference/group/api-nat64#group__api-nat64_1ga0c0591588154cc0b1b3dee877430f679)
- [otNat64GetTranslatorState](https://openthread.io/reference/group/api-nat64#group__api-nat64_1ga0a53caf10c5d8dd85b26711c35f5db90)

## neighbor (rloc16)

Gets the neighbor information for a neighbor with a given RLOC16.

This is a direct lookup alternative to iterating the whole neighbor table with `
https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga92a74f751efa8e706e1098ce7d50ae51
` when the RLOC16 of the neighbor is already known (e.g., from the router table).

Only neighbors in a valid state are considered. On a router or leader, the lookup covers children and neighboring routers. On a child, it covers the parent. On an FTD child, it also covers neighboring routers with which the child has established a link.

Prints information about the neighbor with the given RLOC16.

For `Role`, the possible values are `C` (Child) or `R` (Router). `Age` and `Connection Time` are in seconds.

### Parameters

```
neighbor rloc16
```

### Examples

    neighbor 0xc800
    Role: R
    Rloc16: 0xc800
    Ext Addr: 9a91556102c39ddb
    Age: 2
    Connection Time: 644
    Avg RSSI: -29
    Last RSSI: -29
    Link Quality In: 3
    Frame Error: 0.00 %
    Msg Error: 0.00 %
    Mode: rdn
    Version: 5
    Done

### CLI and API References

- [otThreadGetNeighborInfoByRloc16](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga173515e81d7e4f0868f2e637a70269ab)

## neighbor conntime list

Prints the connection time and age of neighbors. This command is similar to `neighbor conntime`, but it displays the information in a list format. The age and connection time are both displayed in seconds.

### Parameters

No parameters.

### Examples

    neighbor conntime list
    0x8401 1a28be396a14a318 age:63 conn-time:644
    0x5c00 723ebf0d9eba3264 age:23 conn-time:852
    0xe800 ce53628a1e3f5b3c age:23 conn-time:180
    Done

### CLI and API References

- [neighbor conntime](https://openthread.io/reference/cli/commands#neighbor_conntime)

## neighbor conntime

Prints the connection time and age of neighbors. Information per neighbor:

- RLOC16
- Extended MAC
- Last Heard (Age): Number of seconds since last heard from neighbor.
- Connection Time: Number of seconds since link establishment with neighbor. Duration intervals are formatted as `{hh}:{mm}:{ss}` for hours, minutes, and seconds if the duration is less than one day. If the duration is longer than one day, the format is `{dd}d.{hh}:{mm}:{ss}`.

<br />

### Parameters

No parameters.

### Examples

    neighbor conntime
    | RLOC16 | Extended MAC     | Last Heard (Age) | Connection Time  |
    +---+---+---+---+
    | 0x8401 | 1a28be396a14a318 |         00:00:13 |         00:07:59 |
    | 0x5c00 | 723ebf0d9eba3264 |         00:00:03 |         00:11:27 |
    | 0xe800 | ce53628a1e3f5b3c |         00:00:02 |         00:00:15 |
    Done

### CLI and API References

- [neighbor conntime list](https://openthread.io/reference/cli/commands#neighbor_conntime_list)

## neighbor linkquality

Prints link quality information about all neighbors.

### Parameters

No parameters.

### Examples

    neighbor linkquality
    | RLOC16 | Extended MAC     | Frame Error | Msg Error | Avg RSS | Last RSS | Age   |
    +---+---+---+---+---+---+---+
    | 0xe800 | 9e2fa4e1b84f92db |      0.00 % |    0.00 % |     -46 |      -48 |     1 |
    | 0xc001 | 0ad7ed6beaa6016d |      4.67 % |    0.08 % |     -68 |      -72 |    10 |
    Done

### CLI and API References

- No associated API

## neighbor list

Lists the RLOC16 of each neighbor.

### Parameters

No parameters.

### Examples

    neighbor list
    0xcc01 0xc800 0xf000
    Done

### CLI and API References

- No associated API

## neighbor table

Prints information in table format about all neighbors.

For `Role`, the only possible values for this table are `C` (Child) or `R` (Router).

The following columns provide information about the device mode of neighbors. Each column has a value of `0` (off) or `1` (on).

- `R`: RX on when idle
- `D`: Full Thread device
- `N`: Full network data

<br />

### Parameters

No parameters.

### Examples

    neighbor table
    | Role | RLOC16 | Age | Avg RSSI | Last RSSI |R|D|N| Extended MAC     |
    +---+---+---+---+---+-+-+-+---+
    |   C  | 0xcc01 |  96 |      -46 |       -46 |1|1|1| 1eb9ba8a6522636b |
    |   R  | 0xc800 |   2 |      -29 |       -29 |1|1|1| 9a91556102c39ddb |
    |   R  | 0xf000 |   3 |      -28 |       -28 |1|1|1| 0ad7ed6beaa6016d |
    Done

### CLI and API References

- [otThreadGetNextNeighborInfo](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga92a74f751efa8e706e1098ce7d50ae51)

## netdata full

Print "yes" or "no" indicating whether or not the "net data full" callback has been invoked since start of Thread operation or since the last time `netdata full reset` was used to reset the flag. This command requires `OPENTHREAD_CONFIG_BORDER_ROUTER_SIGNAL_NETWORK_DATA_FULL`. The "net data full" callback is invoked whenever:

- The device is acting as a leader and receives a Network Data registration from a Border Router (BR) that it cannot add to Network Data (running out of space).
- The device is acting as a BR and new entries cannot be added to its local Network Data.
- The device is acting as a BR and tries to register its local Network Data entries with the leader, but determines that its local entries will not fit.

<br />

### Parameters

No parameters.

### Examples

    netdata full
    no
    Done

### CLI and API References

- [otBorderRouterSetNetDataFullCallback](https://openthread.io/reference/group/api-border-router#group__api-border-router_1gacb980010ba555472a8bbed2a9d7bdb9d)

## netdata full reset

Reset the flag tracking whether "net data full" callback was invoked.

### Parameters

No parameters.

### Examples

    netdata full reset
    Done

### CLI and API References

- No associated API

## netdata help

Gets a list of `netdata` CLI commands.

### Parameters

No parameters.

### Examples

    netdata help
    length
    maxlength
    publish
    register
    show
    steeringdata
    unpublish
    Done

### CLI and API References

- [Display and Manage Network Data with OT CLI](https://openthread.io/reference/cli/concepts/netdata)

## netdata length

Get the current length (number of bytes) of Partition's Thread Network Data.

### Parameters

No parameters.

### Examples

    netdata length
    23
    Done

### CLI and API References

- [otNetDataGetLength](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaa28cfb123878da53749b8c0f86fdb8c1)

## netdata maxlength

Get the maximum observed length of the Thread Network Data since OT stack initialization or since the last call to `
https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gac191b8360f4723b4753c861aad8ebb75
`.

### Parameters

No parameters.

### Examples

    netdata maxlength
    40
    Done

### CLI and API References

- [otNetDataGetMaxLength](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga4eea4238a3c3ff2139287d1710bf56f2)

## netdata maxlength reset

Reset the tracked maximum length of the Thread Network Data.

### Parameters

No parameters.

### Examples

    netdata maxlength reset
    Done

### CLI and API References

- [otNetDataResetMaxLength](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gac191b8360f4723b4753c861aad8ebb75)

## netdata publish dnssrp anycast

Publishes a DNS/SRP Service Anycast Address with a sequence number and version. Any current DNS/SRP Service entry being published from a previous `publish dnssrp {anycast|unicast}` command is removed and replaced with the new arguments.

`OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` must be enabled.

### Parameters

```
netdata publish dnssrp anycast seq-num [version]
```

### Examples

    netdata publish dnssrp anycast 1 1
    Done

### CLI and API References

- [netdata publish dnssrp unicast (addr,port,version)](https://openthread.io/reference/cli/commands#netdata_publish_dnssrp_unicast_addrportversion)
- [netdata publish dnssrp unicast (mle)](https://openthread.io/reference/cli/commands#netdata_publish_dnssrp_unicast_mle)
- [otNetDataPublishDnsSrpServiceAnycast](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaeaf8323ef74a8c927659c92057f7fafb)

## netdata publish dnssrp unicast (addr,port,version)

Publishes a DNS/SRP Service Unicast Address with an address and port and version number. The address, port, and version information is included in Service TLV data. Any current DNS/SRP Service entry being published from a previous `publish dnssrp {anycast|unicast}` command is removed and replaced with the new arguments.

`OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` must be enabled.

### Parameters

```
netdata publish dnssrp unicast address port [version]
```

### Examples

    netdata publish dnssrp unicast fd00::1234 51525 1
    Done

### CLI and API References

- [netdata publish dnssrp unicast (mle)](https://openthread.io/reference/cli/commands#netdata_publish_dnssrp_unicast_mle)
- [netdata publish dnssrp anycast](https://openthread.io/reference/cli/commands#netdata_publish_dnssrp_anycast)
- [otNetDataPublishDnsSrpServiceUnicast](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gae6b0ff0306407945531dee48765ec764)

## netdata publish dnssrp unicast (mle)

Publishes the device's Mesh-Local EID with a port number and given version. MLE, port and version information is included in the Server TLV data. To use a different Unicast address, use the `netdata publish dnssrp unicast (addr,port,version)` command.

Any current DNS/SRP Service entry being published from a previous `publish dnssrp {anycast|unicast}` command is removed and replaced with the new arguments.

`OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` must be enabled.

### Parameters

```
netdata publish dnssrp unicast port [version]
```

### Examples

    netdata publish dnssrp unicast 50152 1
    Done

### CLI and API References

- [netdata publish dnssrp unicast (addr,port,version)](https://openthread.io/reference/cli/commands#netdata_publish_dnssrp_unicast_addrportversion)
- [netdata publish dnssrp anycast](https://openthread.io/reference/cli/commands#netdata_publish_dnssrp_anycast)
- [otNetDataPublishDnsSrpServiceUnicastMeshLocalEid](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga073d93d23b0401928bcc8bdfe724b9d7)

## netdata publish prefix

Publish an on-mesh prefix entry. For more information, refer to [Display and Manage Network Data with OT CLI](https://openthread.io/reference/cli/concepts/netdata).

### Parameters

```
netdata publish prefix prefix [padcrosnD] [high|med|low]
```

OT CLI uses mapped arguments to configure [otBorderRouterConfig](https://openthread.io/reference/struct/ot-border-router-config) values. For more information, refer to the [OpenThread CLI Overview](https://openthread.io/reference/cli).

### Examples

    netdata publish prefix fd00:1234:5678::/64 paos med
    Done

### CLI and API References

- [otNetDataPublishOnMeshPrefix](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga077932af0654f6f1e9a025a67abd207a)

## netdata publish replace

Replaces a previously published external route entry. For more information, refer to [Display and Manage Network Data with OT CLI](https://openthread.io/reference/cli/concepts/netdata).

### Parameters

```
netdata publish replace oldprefix prefix [sn] [high|med|low]
```

OT CLI uses mapped arguments to configure [otExternalRouteConfig](https://openthread.io/reference/struct/ot-external-route-config) values. For more information, refer to the [OpenThread CLI Overview](https://openthread.io/reference/cli).

### Examples

    netdata publish replace ::/0 fd00:1234:5678::/64 s high
    Done

### CLI and API References

- [otNetDataReplacePublishedExternalRoute](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gac1efd7c6342afdacb97c3e0ba3564894)

## netdata publish route

Publish an external route entry. For more information, refer to [Display and Manage Network Data with OT CLI](https://openthread.io/reference/cli/concepts/netdata).

### Parameters

```
publish route prefix [sn] [high|med|low]
```

OT CLI uses mapped arguments to configure [otExternalRouteConfig](https://openthread.io/reference/struct/ot-external-route-config) values. For more information, refer to the [OpenThread CLI Overview](https://openthread.io/reference/cli).

### Examples

    netdata publish route fd00:1234:5678::/64 s high
    Done

### CLI and API References

- [otNetDataPublishExternalRoute](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga77140dd06f0693583c0e53487eb3ca68)

## netdata register

Register configured prefixes, routes, and services with the Leader.

OT CLI checks for `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE`. If OTBR is enabled, it registers local Network Data with the Leader. Otherwise, it calls the CLI function `otServerRegister`. For more information, refer to [Display and Manage Network Data with OT CLI](https://openthread.io/reference/cli/concepts/netdata).

### Parameters

No parameters.

### Examples

    netdata register
    Done

### CLI and API References

- [prefix add](https://openthread.io/reference/cli/commands#prefix_add)
- [otBorderRouterRegister](https://openthread.io/reference/group/api-border-router#group__api-border-router_1ga9bf67515e6170e67abf4d7cb57a80f42)
- [otServerAddService](https://openthread.io/reference/group/api-server#group__api-server_1gac871204d82331cde29a529e58cdbfe2f)

## netdata show local

Print local Network Data to sync with the Leader.

### Parameters

```
netdata show local [-x]
```

- The optional `-x` argument gets local Network Data as hex-encoded TLVs.

### Examples

    netdata show local
    Prefixes:
    fd00:dead:beef:cafe::/64 paros med dc00
    Routes:
    Services:
    Done

    netdata show local -x
    08040b02174703140040fd00deadbeefcafe0504dc00330007021140
    Done

### CLI and API References

- [netdata show](https://openthread.io/reference/cli/commands#netdata_show)

## netdata show

`netdata show` from OT CLI gets full Network Data received from the Leader. This command uses several API functions to combine prefixes, routes, and services, including [otNetDataGetNextOnMeshPrefix](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga82b43e6622792329d78556d0b09b5fad), [otNetDataGetNextRoute](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gae302dc8a6ed2e60f7e2782f56219ec57), [otNetDataGetNextService](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gac63dcc6d3242d69e8d6672d1df74f2fb) and [otNetDataGetNextLowpanContextInfo](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gab208692622ac19dc49f30f092b1ed83a).

On-mesh prefixes are listed under `Prefixes` header:

- The on-mesh prefix
- Flags
  - p: Preferred flag
  - a: Stateless IPv6 Address Autoconfiguration flag
  - d: DHCPv6 IPv6 Address Configuration flag
  - c: DHCPv6 Other Configuration flag
  - r: Default Route flag
  - o: On Mesh flag
  - s: Stable flag
  - n: Nd [Dns](https://openthread.io/reference/class/ot/cli/dns) flag
- Preference `high`, `med`, or `low`
- RLOC16 of device which added the on-mesh prefix

<br />

External Routes are listed under `Routes` header:

- The route prefix
- Flags
  - s: Stable flag
  - n: NAT64 flag
- Preference `high`, `med`, or `low`
- RLOC16 of device which added the route prefix

<br />

Service entries are listed under `Services` header:

- Enterprise number
- Service data (as hex bytes)
- Server data (as hex bytes)
- Flags
  - s: Stable flag
- RLOC16 of devices which added the service entry
- Service ID

<br />

6LoWPAN Context IDs are listed under `Contexts` header:

- The prefix
- Context ID
- Flags
  - s: Stable flag
  - c: Compress flag
  - -: If there are no flags

<br />

Commissioning [Dataset](https://openthread.io/reference/class/ot/cli/dataset) information is printed under `Commissioning` header:

- Session ID if present in [Dataset](https://openthread.io/reference/class/ot/cli/dataset) or `-` otherwise
- Border Agent RLOC16 (in hex) if present in [Dataset](https://openthread.io/reference/class/ot/cli/dataset) or `-` otherwise
- [Joiner](https://openthread.io/reference/class/ot/cli/joiner) UDP port number if present in [Dataset](https://openthread.io/reference/class/ot/cli/dataset) or `-` otherwise
- Steering Data (as hex bytes) if present in [Dataset](https://openthread.io/reference/class/ot/cli/dataset) or `-` otherwise
- Flags:
  - e: If [Dataset](https://openthread.io/reference/class/ot/cli/dataset) contains any extra unknown TLV

<br />

For more information, refer to [Display and Manage Network Data with OT CLI](https://openthread.io/reference/cli/concepts/netdata).

### Parameters

```
netdata show [-x|rloc16]
```

- The optional `-x` argument gets Network Data as hex-encoded TLVs.
- The optional `rloc16` argument gets all prefix/route/service entries associated with a given RLOC16.

### Examples

    netdata show
    Prefixes:
    fd00:dead:beef:cafe::/64 paros med dc00
    Routes:
    fd49:7770:7fc5:0::/64 s med 4000
    Services:
    44970 5d c000 s 4000 0
    44970 01 9a04b000000e10 s 4000 1
    Contexts:
    fd00:dead:beef:cafe::/64 1 sc
    Commissioning:
    1248 dc00 9988 00000000000120000000000000000000 e
    Done

    netdata show -x
    08040b02174703140040fd00deadbeefcafe0504dc00330007021140
    Done

    netdata show 0xdc00
    Prefixes:
    fd00:dead:beef:cafe::/64 paros med dc00
    Routes:
    Services:
    Done

### CLI and API References

- [br omrprefix](https://openthread.io/reference/cli/commands#br_omrprefix)
- [br onlinkprefix](https://openthread.io/reference/cli/commands#br_onlinkprefix)
- [otBorderRouterGetNetData](https://openthread.io/reference/group/api-border-router#group__api-border-router_1ga3d6d77e26df1c526ebcaa2c3026f3786)

## netdata steeringdata check (discerner)

Check if the steering data includes a Joiner with a given discerner value.

### Parameters

```
netdata steeringdata check discerner
```

- `discerner`: The Joiner discerner in format `{number}/{length}`.

### Examples

    netdata steeringdata check 0xabc/12
    Done

    netdata steeringdata check 0xdef/12
    Error 23: NotFound

### CLI and API References

- [otNetDataSteeringDataCheckJoinerWithDiscerner](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gae69bda4c4a657ab9f1b9814020a77bfd)
- [joiner discerner](https://openthread.io/reference/cli/commands#joiner_discerner)

## netdata steeringdata check (eui64)

Check if the steering data includes a Joiner.

### Parameters

```
netdata steeringdata check eui64
```

- `eui64`: The IEEE EUI-64 of the Joiner.

### Examples

    netdata steeringdata check d45e64fa83f81cf7
    Done

### CLI and API References

- [otNetDataSteeringDataCheckJoiner](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga11b0a0214db8ce6d0a4d9d8fe45aa894)
- [eui64](https://openthread.io/reference/cli/commands#eui64)

## netdata unpublish (prefix)

Unpublishes a previously published On-Mesh or External Route Prefix.

`OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` must be enabled.

For more information, refer to [Display and Manage Network Data with OT CLI](https://openthread.io/reference/cli/concepts/netdata).

### Parameters

```
netdata unpublish prefix
```

### Examples

    netdata unpublish fd00:1234:5678::/64
    Done

### CLI and API References

- [otNetDataUnpublishPrefix](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga12c10595a6a0f1118b9653dc17996b42)

## netdata unpublish dnssrp

Unpublishes any previously added DNS/SRP (Anycast or Unicast) Service entry from the Thread Network Data.

`OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` must be enabled.

### Parameters

No parameters.

### Examples

    netdata unpublish dnssrp
    Done

### CLI and API References

- [otNetDataUnpublishDnsSrpService](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga053242a04ee49884d90a5ab6b1917d58)

## netstat

Gets the head of linked list of UDP Sockets.

### Parameters

No parameters.

### Examples

    netstat
    | Local Address                                   | Peer Address                                    |
    +---+---+
    | [0:0:0:0:0:0:0:0]:49153                         | [0:0:0:0:0:0:0:0]:0                             |
    | [0:0:0:0:0:0:0:0]:49152                         | [0:0:0:0:0:0:0:0]:0                             |
    | [0:0:0:0:0:0:0:0]:61631                         | [0:0:0:0:0:0:0:0]:0                             |
    | [0:0:0:0:0:0:0:0]:19788                         | [0:0:0:0:0:0:0:0]:0                             |
    Done

### CLI and API References

- [otUdpGetSockets](https://openthread.io/reference/group/api-udp#group__api-udp_1ga68273525966cf9b04ad482d2a1942c21)

## networkdiagnostic get

### Parameters

```
networkdiagnostic get addr type(s)
```

For `addr`, a unicast address triggers a `Diagnostic Get`. A multicast address triggers a `Diagnostic Query`. TLV values you can specify (separated by a space if you specify more than one TLV):

- `0`: MAC Extended Address TLV
- `1`: Address16 TLV
- `2`: Mode TLV
- `3`: Timeout TLV (the maximum polling time period for SEDs)
- `4`: Connectivity TLV
- `5`: Route64 TLV
- `6`: Leader Data TLV
- `7`: Network Data TLV
- `8`: IPv6 Address List TLV
- `9`: MAC Counters TLV
- `14`: Battery Level TLV
- `15`: Supply Voltage TLV
- `16`: Child Table TLV
- `17`: Channel Pages TLV
- `19`: Max Child Timeout TLV
- `23`: EUI64 TLV
- `24`: Version TLV (version number for the protocols and features)
- `25`: Vendor Name TLV
- `26`: Vendor Model TLV
- `27`: Vendor SW Version TLV
- `28`: Thread Stack Version TLV (version identifier as UTF-8 string for Thread stack codebase/commit/version)
- `29`: Child TLV
- `34`: MLE Counters TLV
- `35`: Vendor App URL TLV
- `37`: Enhanced Route TLV
- `38`: Border Router State TLV
- `39`: Border Router Infra Interface Addresses TLV
- `40`: Border Router Local OMR Prefix TLV
- `41`: Border Router DHCPv6-PD OMR Prefix TLV
- `42`: Border Router Local On-link Prefix TLV
- `43`: Border Router Favored On-link Prefix TLV
- `44`: Vendor OUI TLV

<br />

### Examples

    networkdiagnostic get fdde:ad00:beef:0:0:ff:fe00:fc00 0 1 6 23
    DIAG_GET.rsp/ans: 00080e336e1c41494e1c01020c000608640b0f674074c503
    Ext Address: 0e336e1c41494e1c
    Rloc16: 0x0c00
    Leader Data:
        PartitionId: 0x640b0f67
        Weighting: 64
        DataVersion: 116
        StableDataVersion: 197
        LeaderRouterId: 0x03
    EUI64: 18b4300000000004
    Done

    networkdiagnostic get ff02::1 0 1
    DIAG_GET.rsp/ans: 00080e336e1c41494e1c01020c00
    Ext Address: 0e336e1c41494e1c
    Rloc16: 0x0c00
    Done
    DIAG_GET.rsp/ans: 00083efcdb7e3f9eb0f201021800
    Ext Address: 3efcdb7e3f9eb0f2
    Rloc16: 0x1800
    Done

### CLI and API References

- No associated API

## networkdiagnostic nonpreferredchannels (set)

Sets the non-preferred channels value for `OT_NETWORK_DIAGNOSTIC_TLV_NON_PREFERRED_CHANNELS` TLV.

This value is used to respond to a Network Diagnostic Get request for this TLV.

### Parameters

```
networkdiagnostic nonprfchannelmas mask
```

### Examples

    networkdiagnostic nonpreferredchannels 0x4000000
    Done

### CLI and API References

- [otThreadSetNonPreferredChannels](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gae61ebc19d48fb228144dfcef0f4a239f)

## networkdiagnostic nonpreferredchannels

Gets the non-preferred channels for `OT_NETWORK_DIAGNOSTIC_TLV_NON_PREFERRED_CHANNELS` TLV.

### Parameters

No parameters.

### Examples

    networkdiagnostic nonpreferredchannels
    0x4000000
    Done

### CLI and API References

- [otThreadGetNonPreferredChannels](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga4194444deb8e75d25793c047b9df164f)

## networkdiagnostic reset

Sends a network diagnostic request to reset the specified Type Length Values (TLVs) on the specified address(es). This command only supports the following TLV values: `9` (MAC Counters TLV) or `34` (MLE Counters TLV)

### Parameters

```
networkdiagnostic reset addr type(s)
```

### Examples

    networkdiagnostic reset fd00:db8::ff:fe00:0 9
    Done

### CLI and API References

- [otThreadSendDiagnosticReset](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga310d96d798c167911ad220eb1d4d3a3f)

## networkidtimeout (get,set)

Gets or sets the `NETWORK_ID_TIMEOUT` parameter.

> [!NOTE]
> **Note:** This command is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.

### Parameters

```
networkidtimeout [timeout]
```

Use the optional `timeout` argument to set the value of the `NETWORK_ID_TIMEOUT` parameter.

### Examples

    networkidtimeout 120
    Done

    networkidtimeout
    120
    Done

### CLI and API References

- [otThreadGetNetworkIdTimeout](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gaebc75d5fd282431f02b4d3d0210f818d)
- [otThreadSetNetworkIdTimeout](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gaea8561bac9648d40cb9267303d7b2400)

## networkkey (key)

Set the Thread Network Key.

Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.

### Parameters

```
networkkey key
```

### Examples

    networkkey 00112233445566778899aabbccddeeff
    Done

### CLI and API References

- [otThreadSetNetworkKey](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga792903b29b3c3a4edee799d0833f79de)

## networkkey

Get the Thread Network Key.

### Parameters

No parameters.

### Examples

    networkkey
    00112233445566778899aabbccddeeff
    Done

### CLI and API References

- [otThreadGetNetworkKey](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga66892041d2c2a267f37a427e5f7d1fdb)

## networkname (name)

Set the Thread Network Name.

Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.

> [!NOTE]
> **Note:** The current commissioning credential becomes stale after changing this value. Use `pskc` to reset.

### Parameters

```
networkname name
```

### Examples

    networkname OpenThread
    Done

### CLI and API References

- [otThreadSetNetworkName](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga37cfaf05729b3d7d6a4f5a0a3794f962)

## networkname

Get the Thread Network Name.

### Parameters

No parameters.

### Examples

    networkname
    OpenThread
    Done

### CLI and API References

- [otThreadGetNetworkName](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gac4e8ad0c332a142c823d2e3357a38f7d)

## networktime (set)

Sets the time sync parameters.

- `timesyncperiod`: The time synchronization period, in seconds.
- `xtalthreshold`: The XTAL accuracy threshold for a device to become Router-Capable device, in PPM.

<br />

### Parameters

```
networktime timesyncperiod xtalthreshold
```

### Examples

    networktime 100 300
    Done

### CLI and API References

- [otNetworkTimeSetSyncPeriod](https://openthread.io/reference/group/api-network-time#group__api-network-time_1gab61ef2558729a3ac59ea45ddd4872d18)
- [otNetworkTimeSetXtalThreshold](https://openthread.io/reference/group/api-network-time#group__api-network-time_1ga431de6ae4845803a84b1e440d6e40d4c)

## networktime

Gets the Thread network time and the time sync parameters.

### Parameters

No parameters.

### Examples

    networktime
    Network Time:     21084154us (synchronized)
    Time Sync Period: 100s
    XTAL Threshold:   300ppm
    Done

### CLI and API References

- [otNetworkTimeGet](https://openthread.io/reference/group/api-network-time#group__api-network-time_1gae354525bb35685b122644dea5b1b83de)
- [otNetworkTimeGetSyncPeriod](https://openthread.io/reference/group/api-network-time#group__api-network-time_1gab7d5b4f32a91513ecde9ddfa39f4113d)
- [otNetworkTimeGetXtalThreshold](https://openthread.io/reference/group/api-network-time#group__api-network-time_1ga906d642a8278cc00792856423bdd3935)

## nexthop (get)

Gets the next hop and path cost towards a given RLOC16 destination.

Can be used with either `aNextHopRloc16` or `aPathCost` being NULL indicating caller does not want to get the value.

### Parameters

```
nexthop rloc16
```

### Examples

    nexthop 0xc000
    0xc000 cost:0
    Done

    nexthop 0x8001
    0x2000 cost:3
    Done

### CLI and API References

- [otThreadGetNextHopAndPathCost](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga55c1ac0fc16b3b42cda70900c21e27fc)

## nexthop

Output table of allocated Router IDs and current next hop and path cost for each router.

### Parameters

No parameters.

### Examples

    nexthop
    | ID   |NxtHop| Cost |
    +---+---+---+
    |    9 |    9 |    1 |
    |   25 |   25 |    0 |
    |   30 |   30 |    1 |
    |   46 |    - |    - |
    |   50 |   30 |    3 |
    |   60 |   30 |    2 |
    Done

### CLI and API References

- [otThreadGetNextHopAndPathCost](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga55c1ac0fc16b3b42cda70900c21e27fc)
- [otThreadIsRouterIdAllocated](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gaca5366dc14d836cb37ddc2799a4111f1)

## panid (panid)

Set the IEEE 802.15.4 PAN ID.

Succeeds only when Thread protocols are disabled. A successful call to this function also invalidates the Active and Pending Operational Datasets in non-volatile memory.

### Parameters

```
panid panid
```

### Examples

    panid 0xdead
    Done

### CLI and API References

- [otLinkSetPanId](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gae15de55961ef148207289352111284e3)

## panid

Get the IEEE 802.15.4 PAN ID.

### Parameters

No parameters.

### Examples

    panid
    0xdead
    Done

### CLI and API References

- [otLinkGetPanId](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga14f390c08327924b23d00f4ab0a6fbe8)

## parent

Get the diagnostic information for a Thread Router as parent.

When operating as a Thread Router when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is enabled, this command will return the cached information from when the device was previously attached as a Thread Child. Returning cached information is necessary to support the Thread Test Harness - Test Scenario 8.2.x requests the former parent (i.e. Joiner Router's) MAC address even if the device has already promoted to a router.

> [!NOTE]
> **Note:** When OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE is enabled, this command will return two extra lines with information relevant for CSL Receiver operation.

### Parameters

No parameters.

### Examples

    parent
    Ext Addr: be1857c6c21dce55
    Rloc: 5c00
    Link Quality In: 3
    Link Quality Out: 3
    Age: 20
    Version: 4
    Done

### CLI and API References

- [otThreadGetParentInfo](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gae0243c7f6dc457b4cc746d124e6bd221)

## parent search

Starts the process for child to search for a better parent while staying attached to its current parent.

Must be used when device is attached as a child.

### Parameters

No parameters.

### Examples

    parent search
    Done

### CLI and API References

- [otThreadSearchForBetterParent](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga08ab809bc2a595eed08ef9bd2d5f170e)

## parentpriority (get,set)

Gets or sets the assigned parent priority value: 1, 0, -1 or -2. -2 means not assigned.

### Parameters

```
parentpriority [parentpriority]
```

### Examples

    parentpriority
    1
    Done

    parentpriority 1
    Done

### CLI and API References

- [otThreadGetParentPriority](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga6254d1e084f299c079dee522df2176fa)
- [otThreadSetParentPriority](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga6bac909027ba6d165860d3e30dcea397)

## partitionid

Get the Thread Network Partition ID.

### Parameters

No parameters.

### Examples

    partitionid
    4294967295
    Done

### CLI and API References

- [otThreadGetPartitionId](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga1d782f30f142d223c96c3ae064e2de1d)

## partitionid preferred (get,set)

`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required.

### Parameters

```
partitionid preferred partitionid
```

### Examples

    partitionid preferred
    4294967295
    Done

    partitionid preferred 0xffffffff
    Done

### CLI and API References

- [otThreadGetPreferredLeaderPartitionId](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga6565e5aace06b4e5a0e3fe358aad1d3b)
- [otThreadSetPreferredLeaderPartitionId](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gacae245c66cdcd9fbb9926fb72b93f025)

## platform

Print the current platform

### Parameters

No parameters.

### Examples

    platform
    NRF52840
    Done

### CLI and API References

- No associated API

## pollperiod (get,set)

Get or set the customized data poll period of sleepy end device (milliseconds). Only for certification test.

### Parameters

No parameters.

### Examples

    pollperiod
    0
    Done

    pollperiod 10
    Done

### CLI and API References

- [otLinkGetPollPeriod](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gac743cdaf2e36acbebc06b82a6251de80)
- [otLinkSetPollPeriod](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gaa09687ea0a560566ca095b7150364e56)

## preferrouterid

Specifies the preferred router ID that the leader should provide when solicited.

### Parameters

```
preferrouterid routerid
```

### Examples

    preferrouterid 16
    Done

### CLI and API References

- [otThreadSetPreferredRouterId](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga8a800e2c3d87e5b73044750ca6dc9b31)

## prefix add

Adds a valid prefix to the Network Data.

### Parameters

```
prefix add prefix [padcrosnD] [high|med|low]
```

OT CLI uses mapped arguments to configure [otBorderRouterConfig](https://openthread.io/reference/struct/ot-border-router-config) values. For more information, refer to the [OpenThread CLI Overview](https://openthread.io/reference/cli).

### Examples

    prefix add 2001:dead:beef:cafe::/64 paros med
    Done

    prefix add fd00:7d03:7d03:7d03::/64 prosD low
    Done

### CLI and API References

- [otBorderRouterAddOnMeshPrefix](https://openthread.io/reference/group/api-border-router#group__api-border-router_1ga477ec836f37da7aff55f71969f88ad38)

## prefix meshlocal

Get the mesh local prefix.

### Parameters

No parameters.

### Examples

    prefix meshlocal
    fdde:ad00:beef:0::/64
    Done

### CLI and API References

- No associated API

## prefix

Get the prefix list in the local Network Data.

For more information about [otBorderRouterConfig](https://openthread.io/reference/struct/ot-border-router-config) flags, refer to [OpenThread CLI Overview](https://openthread.io/reference/cli).

### Parameters

No parameters.

### Examples

    prefix
    2001:dead:beef:cafe::/64 paros med
    - fd00:7d03:7d03:7d03::/64 prosD med
    Done

### CLI and API References

- [otBorderRouterGetNextOnMeshPrefix](https://openthread.io/reference/group/api-border-router#group__api-border-router_1gaead412dd0ed6a471e2ef44e11d643563)

## prefix remove

Remove a border router configuration from the local network data.

### Parameters

No parameters.

### Examples

    prefix remove 2001:dead:beef:cafe::/64
    Done

### CLI and API References

- [otBorderRouterRemoveOnMeshPrefix](https://openthread.io/reference/group/api-border-router#group__api-border-router_1ga95ab1af21b65ec0de11f4295ae4c2084)

## promiscuous (enable,disable)

Enables or disables the link layer promiscuous mode.

> [!NOTE]
> **Note:** Promiscuous mode may only be enabled when the Thread interface is disabled.

### Parameters

```
promiscuous enable|disable
```

### Examples

    promiscuous enable
    Done

    promiscuous disable
    Done

### CLI and API References

- [otLinkSetPromiscuous](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gaba1d3c1dbc955ed7de2621208dd044bc)

## promiscuous

Indicates whether or not promiscuous mode is enabled at the link layer.

### Parameters

No parameters.

### Examples

    promiscuous
    Disabled
    Done

### CLI and API References

- [otLinkIsPromiscuous](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga77906737730c123f2db256cc77605c95)
- [otPlatRadioGetPromiscuous](https://openthread.io/reference/group/radio-config#group__radio-config_1gaef6191a2f5c0dd177dc009dae3796e8e)

## pskc (set)

Sets the pskc in hexadecimal format.

### Parameters

```
pskc key
```

### Examples

    pskc 67c0c203aa0b042bfb5381c47aef4d9e
    Done

### CLI and API References

- No associated API

## pskc -p

Generates the pskc from the passphrase (UTF-8 encoded), together with the current network name and extended PAN ID.

### Parameters

```
pskc -p passphrase
```

### Examples

    pskc -p 123456
    Done

### CLI and API References

- No associated API

## pskc

Get the Thread PSKc.

### Parameters

No parameters.

### Examples

    pskc
    67c0c203aa0b042bfb5381c47aef4d9e
    Done

### CLI and API References

- [otThreadGetPskc](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga1ae5ce889df8fc67f1e9f5591fe843ab)

## pskcref (set)

Set the Key Reference to the Thread PSKc.

Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled.

Will only succeed when Thread protocols are disabled. Upon success, this will also invalidate the Active and Pending Operational Datasets in non-volatile memory.

### Parameters

```
pskc keyref
```

### Examples

    pskc 0x20017
    Done

### CLI and API References

- [otThreadSetPskcRef](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga1c23256199f5faf349652783e110bb87)

## pskcref

Get Key Reference to Thread PSKc stored.

Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled.

### Parameters

No parameters.

### Examples

    pskcref
    0x80000000
    Done

### CLI and API References

- [otThreadGetPskcRef](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gae198f738af134e29427c3afa0ee96e88)

## radio (enable,disable)

Enables or disables the radio.

### Parameters

```
radio enable|disable
```

### Examples

    radio enable
    Done

    radio disable
    Done

### CLI and API References

- [otLinkSetEnabled](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga552c01e055761ff716b53d7223356bca)

## radio stats clear

Resets the radio statistics.

All times are reset to 0.

### Parameters

No parameters.

### Examples

    radio stats clear
    Done

### CLI and API References

- [otRadioTimeStatsReset](https://openthread.io/reference/group/api-radio#group__api-radio_1gaf8bc1eb86157a3894e8d0d608ca15f2d)

## radio stats

Gets the radio statistics.

The radio statistics include the time when the radio is in TX/RX/Sleep state. These times are in units of microseconds. All times are calculated from the last reset of radio statistics.

### Parameters

No parameters.

### Examples

    radio stats
    Radio Statistics:
    Total Time: 67.756s
    Tx Time: 0.022944s (0.03%)
    Rx Time: 1.482353s (2.18%)
    Sleep Time: 66.251128s (97.77%)
    Disabled Time: 0.000080s (0.00%)
    Done

### CLI and API References

- [otRadioTimeStatsGet](https://openthread.io/reference/group/api-radio#group__api-radio_1ga56e2a401d78c3013ec6b330949ff8ff7)

## rcp version

Get the radio version string.

### Parameters

No parameters.

### Examples

    rcp version
    OPENTHREAD/20191113-00825-g82053cc9d-dirty; SIMULATION; Jun  4 2020 17:53:16
    Done

### CLI and API References

- [otPlatRadioGetVersionString](https://openthread.io/reference/group/radio-config#group__radio-config_1gaa8e579d7776a38b169cc4ad097e2da65)

## region (set)

Sets the region code.

The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.

Changing this can affect the transmit power limit.

### Parameters

No parameters.

### Examples

    region US
    Done

### CLI and API References

- [otLinkSetRegion](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga54dab0964dad4881677154b9482a840b)

## region

Get the region code.

The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.

### Parameters

No parameters.

### Examples

    region
    US
    Done

### CLI and API References

- [otLinkGetRegion](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gad769c601f30c95f512a5708fd6820518)

## releaserouterid (routerid)

Release a Router ID that has been allocated by the device in the Leader role.

> [!NOTE]
> **Note:** This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.

### Parameters

```
releaserouterid [routerid]
```

### Examples

    releaserouterid 16
    Done

### CLI and API References

- [otThreadReleaseRouterId](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga9c38a5f640283ba70dfca5b8ceafe611)

## responsetimeout (set)

Sets the response timeout value to use for any future mesh diagnostic queries.

The default response timeout value is specified by `OPENTHREAD_CONFIG_MESH_DIAG_RESPONSE_TIMEOUT` configuration.

Changing the response timeout does not impact any ongoing query.

The provided `aTimeout` value will be clamped to stay between 50 milliseconds and 10 minutes.

### Parameters

```
responsetimeout timeout-msec
```

### Examples

    responsetimeout 7000
    Done

### CLI and API References

- [otMeshDiagSetResponseTimeout](https://openthread.io/reference/group/api-mesh-diag#group__api-mesh-diag_1gaf2de5b28b659b07e5eb05261ae8abdbc)

## responsetimeout

Gets the response timeout value.

### Parameters

No parameters.

### Examples

    responsetimeout
    5000
    Done

### CLI and API References

- [otMeshDiagGetResponseTimeout](https://openthread.io/reference/group/api-mesh-diag#group__api-mesh-diag_1ga2826d5b798d846cf49e885b98d7fe157)

## rloc16

Get the RLOC16.

### Parameters

No parameters.

### Examples

    rloc16
    0xdead
    Done

### CLI and API References

- [otThreadGetRloc16](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga6270041a9fd0a44e1644a33527014a97)

## route add

For parameters, use:

- s: Stable flag
- n: NAT64 flag
- prf: Default Router Preference, \[high, med, low\].

<br />

Add a valid external route to the Network Data.

### Parameters

```
route add prefix [sn] [high|med|low]
```

### Examples

    route add 2001:dead:beef:cafe::/64 s med
    Done

### CLI and API References

- [otExternalRouteConfig](https://openthread.io/reference/structot#structot_external_route_config)

## route remove

Remove an external route configuration from the local network data.

### Parameters

```
route remove [prefix]
```

### Examples

    route remove 2001:dead:beef:cafe::/64
    Done

### CLI and API References

- [otBorderRouterRemoveRoute](https://openthread.io/reference/group/api-border-router#group__api-border-router_1ga8f527ca56c96b028deb7693c7456b5df)

## route

Get the external route list in the local Network Data.

### Parameters

No parameters.

### Examples

    route
    2001:dead:beef:cafe::/64 s med
    Done

### CLI and API References

- [otBorderRouterGetNextRoute](https://openthread.io/reference/group/api-border-router#group__api-border-router_1gad07e7e4e3bfd97c56ce87701b8fe2870)

## router (id)

The function retains diagnostic information for a given Thread Router.

Print diagnostic information for a Thread Router. The id may be a Router ID or an RLOC16.

### Parameters

```
router [id]
```

### Examples

    router 50
    Alloc: 1
    Router ID: 50
    Rloc: c800
    Next Hop: c800
    Link: 1
    Ext Addr: e2b3540590b0fd87
    Cost: 0
    Link Quality In: 3
    Link Quality Out: 3
    Age: 3
    Done

    router 0xc800
    Alloc: 1
    Router ID: 50
    Rloc: c800
    Next Hop: c800
    Link: 1
    Ext Addr: e2b3540590b0fd87
    Cost: 0
    Link Quality In: 3
    Link Quality Out: 3
    Age: 7
    Done

### CLI and API References

- [otThreadGetRouterInfo](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gaaf9c969a76465923efd0ae4113d7bbf5)

## router list

List allocated Router IDs.

### Parameters

No parameters.

### Examples

    router list
    8 24 50
    Done

### CLI and API References

- [otThreadGetRouterInfo](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gaaf9c969a76465923efd0ae4113d7bbf5)

## router table

Prints a list of routers in a table format.

### Parameters

No parameters.

### Examples

    router table
    | ID | RLOC16 | Next Hop | Path Cost | LQ In | LQ Out | Age | Extended MAC     | Link |
    +---+---+---+---+---+---+---+---+---+
    | 22 | 0x5800 |       63 |         0 |     0 |      0 |   0 | 0aeb8196c9f61658 |    0 |
    | 49 | 0xc400 |       63 |         0 |     3 |      3 |   0 | faa1c03908e2dbf2 |    1 |
    Done

### CLI and API References

- [otThreadGetRouterInfo](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gaaf9c969a76465923efd0ae4113d7bbf5)

## routerdowngradethreshold (get,set)

Gets or sets the ROUTER_DOWNGRADE_THRESHOLD value.

### Parameters

```
routerdowngradethreshold [threshold]
```

### Examples

     routerdowngradethreshold
    23
    Done

     routerdowngradethreshold 23
    Done

### CLI and API References

- [otThreadGetRouterDowngradeThreshold](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gaa5e4304ecdcee727adf695358e8631f6)
- [otThreadSetRouterDowngradeThreshold](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga3f164a0dddd9e58122a9356efd8a679f)

## routereligible (enable,disable)

Enables or disables the router role.

### Parameters

```
routereligible [enable|disable]
```

### Examples

    routereligible enable
    Done

    routereligible disable
    Done

### CLI and API References

- [otThreadSetRouterEligible](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga82101affe91acd922af07a25fcc5a420)

## routereligible

Indicates whether the router role is enabled or disabled.

### Parameters

No parameters.

### Examples

    routereligible
    Enabled
    Done

### CLI and API References

- [otThreadIsRouterEligible](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga96cb4b5fb057bb46e0710a9a87d46936)

## routerselectionjitter

Gets or sets the ROUTER_SELECTION_JITTER value.

### Parameters

```
routerselectionjitter [jitter]
```

### Examples

    routerselectionjitter
    120
    Done

    routerselectionjitter 120
    Done

### CLI and API References

- [otThreadGetRouterSelectionJitter](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga269bb85940cb759004f161b10cb7dd6c)
- [otThreadSetRouterSelectionJitter](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gab791ab69b1ffe58a0acccd0fbd9892a4)

## routerupgradethreshold (get,set)

Gets or sets the ROUTER_UPGRADE_THRESHOLD value.

### Parameters

```
routerupgradethreshold [threshold]
```

### Examples

    routerupgradethreshold
    16
    Done

    routerupgradethreshold 16
    Done

### CLI and API References

- [otThreadGetRouterUpgradeThreshold](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga842370f58b93edcf40c23585bd0396af)
- [otThreadSetRouterUpgradeThreshold](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1gad6377e3fd63d2463ab84ecd5539706c7)

## scan energy

Performs an IEEE 802.15.4 energy scan, and displays the time in milliseconds to use for scanning each channel. All channels are shown unless you specify a certain channel by using the channel option.

### Parameters

```
scan energy [duration] [channel]
```

### Examples

    scan energy 10
    | Ch | RSSI |
    +---+---+
    | 11 |  -59 |
    | 12 |  -62 |
    | 13 |  -67 |
    | 14 |  -61 |
    | 15 |  -87 |
    | 16 |  -86 |
    | 17 |  -86 |
    | 18 |  -52 |
    | 19 |  -58 |
    | 20 |  -82 |
    | 21 |  -76 |
    | 22 |  -82 |
    | 23 |  -74 |
    | 24 |  -81 |
    | 25 |  -88 |
    | 26 |  -71 |
    Done

    scan energy 10 20
    | Ch | RSSI |
    +---+---+
    | 20 |  -82 |
    Done

### CLI and API References

- [otLinkEnergyScan](https://openthread.io/reference/group/api-link-link#group__api-link-link_1ga37e25234c6cdb677c3baf2c40d097d8f)

## scan

Performs an active IEEE 802.15.4 scan. The scan covers all channels if no channel is specified; otherwise the span covers only the channel specified.

### Parameters

```
scan [channel]
```

### Examples

    scan
    | PAN  | MAC Address      | Ch | dBm | LQI |
    +---+---+---+---+---+
    | ffff | f1d92a82c8d8fe43 | 11 | -20 |   0 |
    Done

### CLI and API References

- [otLinkActiveScan](https://openthread.io/reference/group/api-link-link#group__api-link-link_1gaf5c96f2ca6d2f597fb082cb795ffeefa)

## service add

Adds service to the network data.

- enterpriseNumber: IANA enterprise number
- serviceData: Hex-encoded binary service data
- serverData: Hex-encoded binary server data (empty if not provided)

> [!NOTE]
> **Note:** For each change in service registration to take effect, run the `netdata register` command after running the `service add` command to notify the leader.

### Parameters

```
service add enterpriseNumber serviceData [serverData]
```

### Examples

    service add 44970 112233 aabbcc
    Done

    netdata register
    Done

### CLI and API References

- [otServerAddService](https://openthread.io/reference/group/api-server#group__api-server_1gac871204d82331cde29a529e58cdbfe2f)
- [netdata register](https://openthread.io/reference/cli/commands#netdata_register)

## service remove

Removes service from the network data.

- enterpriseNumber: IANA enterprise number
- serviceData: Hex-encoded binary service data

> [!NOTE]
> **Note:** For each change in service registration to take effect, run the `netdata register` command after running the `service remove` command to notify the leader.

### Parameters

```
service remove enterpriseNumber serviceData
```

### Examples

    service remove 44970 112233
    Done

    netdata register
    Done

### CLI and API References

- [otServerRemoveService](https://openthread.io/reference/group/api-server#group__api-server_1gafff1abde637835a204e25b5648fef8d2)
- [netdata register](https://openthread.io/reference/cli/commands#netdata_register)

## singleton

Indicates whether a node is the only router on the network. Returns either `true` or `false`.

### Parameters

No parameters.

### Examples

    singleton
    true
    Done

### CLI and API References

- [otThreadIsSingleton](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaa14a442e6f7be4167e4b3ad892c1426c)

## sntp query

Sends an SNTP query to obtain the current unix epoch time (from January 1, 1970).

- SNTP server default IP address: `2001:4860:4806:8::` (Google IPv6 NTP Server)
- SNTP server default port: `123`

<br />

> [!NOTE]
> **Note:** This command is available only if OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE is enabled.

### Parameters

```
sntp query [SNTP server IP] [SNTP server port]
```

### Examples

    sntp query
    SNTP response - Unix time: 1540894725 (era: 0)
    Done

    sntp query 64:ff9b::d8ef:2308
    SNTP response - Unix time: 1540898611 (era: 0)
    Done

### CLI and API References

- [otSntpClientQuery](https://openthread.io/reference/group/api-sntp#group__api-sntp_1gaf59b2e17e5cfaa943f6550fed45720cf)

## srp client autostart (get)

Indicates the current state of auto-start mode (enabled or disabled). For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

No parameters.

### Examples

    srp client autostart
    Disabled
    Done

### CLI and API References

- [otSrpClientIsAutoStartModeEnabled](https://openthread.io/reference/group/api-srp#group__api-srp_1gaf2f12371a237f5030d753a294ad4bf95)

## srp client autostart disable

Disables the auto-start mode.

Disabling auto-start mode does not stop a running client. However, the SRP client stops monitoring Thread network data.

### Parameters

No parameters.

### Examples

    srp client autostart disable
    Done

### CLI and API References

- [otSrpClientDisableAutoStartMode](https://openthread.io/reference/group/api-srp#group__api-srp_1ga9e645eb90f7ec489e960f1f0c28d188a)

## srp client autostart enable

Enables auto-start mode.

When auto-start is enabled, the SRP client monitors Thread network data to discover SRP servers, to select the preferred server, and to automatically start and stop the client when an SRP server is detected.

Three categories of network data entries indicate the presence of an SRP sever, and are preferred in the following order:

1. Unicast entries in which the server address is included in the service data. If there are multiple options, the option with the lowest numerical IPv6 address is preferred.
2. Anycast entries that each have a sequence number. The largest sequence number as specified by Serial Number Arithmetic Logic in RFC-1982 is preferred.
3. Unicast entries in which the server address information is included with the server data. If there are multiple options, the option with the lowest numerical IPv6 address is preferred.

<br />

### Parameters

No parameters.

### Examples

    srp client autostart enable
    Done

### CLI and API References

- [otSrpClientEnableAutoStartMode](https://openthread.io/reference/group/api-srp#group__api-srp_1ga0170f9817bfc4ab92727c98f7e3c6845)

## srp client callback (get,enable,disable)

Gets or enables/disables printing callback events from the SRP client. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

```
srp client callback [enable|disable]
```

### Examples

    srp client callback enable
    Done

    srp client callback
    Enabled
    Done

### CLI and API References

- [otSrpClientSetCallback](https://openthread.io/reference/group/api-srp#group__api-srp_1ga77e1e309dc3498a9288d38fd1f194a01)

## srp client counters reset

Resets the SRP client counters.

Requires `OPENTHREAD_CONFIG_SRP_CLIENT_COUNTERS_ENABLE` to be enabled.

All event counters are cleared and the time-tracking accumulators are restarted.

### Parameters

No parameters.

### Examples

### CLI and API References

- [otSrpClientResetCounters](https://openthread.io/reference/group/api-srp#group__api-srp_1gaebcce893c8fcec8281f27905faf91aa0)

## srp client counters

Gets the SRP client counters.

Requires `OPENTHREAD_CONFIG_SRP_CLIENT_COUNTERS_ENABLE` to be enabled.

### Parameters

No parameters.

### Examples

    srp client counters
    Tx Updates: 12
    Update Attempts: 11
    Success: 11
    Rejected Duplicate: 0
    Rejected Security: 0
    Rejected Other: 0
    Timeouts: 1
    Host Address Changes: 0
    Server Changes: 1
    Service Adds: 1
    Service Removes: 0
    Service Clears: 0
    Host And Services Removes: 0
    Host And Services Clears: 0
    Tx Total Bytes: 4380
    Registered Time Milli: 845321
    Anycast Available Time Milli: 0
    Unicast Available Time Milli: 901002
    Tracked Time Milli: 901002
    Done

### CLI and API References

- [otSrpClientGetCounters](https://openthread.io/reference/group/api-srp#group__api-srp_1gaf0fcdfade5369794b8a9b19cdfac878c)

## srp client host address (get)

Indicates whether auto address mode is enabled. If auto address mode is not enabled, then the list of SRP client host addresses is returned. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

No parameters.

### Examples

    srp client host address
    auto
    Done

    srp client host address
    fd00:0:0:0:0:0:0:1234
    fd00:0:0:0:0:0:0:beef
    Done

### CLI and API References

- [otSrpClientGetHostInfo](https://openthread.io/reference/group/api-srp#group__api-srp_1ga4eec8d6bcf3e343e1092909349aae162)

## srp client host address (set)

Enable auto host address mode or explicitly set the list of host addresses. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

```
srp client host address [auto|address...]
```

- Use the `auto` parameter to enable auto host address mode. When enabled, the client automatically uses all preferred Thread `netif` unicast addresses except for link-local and mesh-local addresses. If there is no valid address, the mesh local EID address gets added. The SRP client automatically re-registers if addresses on the Thread `netif` are added or removed or marked as non-preferred.
- Explicitly specify the list of host addresses, separating each address by a space. You can set this list while the client is running. This will also disable auto host address mode.

### Examples

    srp client host address auto
    Done

    srp client host address fd00::cafe
    Done

### CLI and API References

- [otSrpClientEnableAutoHostAddress](https://openthread.io/reference/group/api-srp#group__api-srp_1gaaca08836819d126e2e98f4fd5fc6d505)
- [otSrpClientSetHostAddresses](https://openthread.io/reference/group/api-srp#group__api-srp_1ga5f94d5e95417fa19eb6dd8069c963701)

## srp client host clear

Clears all host information and all services.

### Parameters

No parameters.

### Examples

    srp client host clear
    Done

### CLI and API References

- [otSrpClientBuffersFreeAllServices](https://openthread.io/reference/group/api-srp#group__api-srp_1ga1205e626e162513f4a05740104d15e30)
- [otSrpClientClearHostAndServices](https://openthread.io/reference/group/api-srp#group__api-srp_1ga3c9f5f8b8b424c57f27ed06554a978c6)

## srp client host name (get,set)

Gets or sets the host name of the SRP client. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

```
srp client host name [name]
```

To set the client host name when the host has either been removed or not yet registered with the server, use the `name` parameter.

### Examples

    srp client host name dev4312
    Done

    srp client host name
    dev4312
    Done

### CLI and API References

- [otSrpClientSetHostName](https://openthread.io/reference/group/api-srp#group__api-srp_1gad00aa82af3a71e91ef2d8eb796099a64)

## srp client host remove

Removes SRP client host information and all services from the SRP server. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

```
srp client host remove [removekeylease] [sendunregtoserver]
```

- The parameter `removekeylease` is an optional boolean value that indicates whether the host key lease should also be removed (default is `false`).
- The parameter `sendunregtoserver` is an optional boolean value that indicates whether the client host should send an "update" message to the server even when the client host information has not yet been registered with the server (default is `false`). This parameter can be specified only if the `removekeylease` parameter is specified first in the command.

### Examples

    srp client host remove 1
    Done

### CLI and API References

- [otSrpClientRemoveHostAndServices](https://openthread.io/reference/group/api-srp#group__api-srp_1ga43324d90582bbb2f97b5bbaf31e97fe4)
- [otSrpClientSetHostName](https://openthread.io/reference/group/api-srp#group__api-srp_1gad00aa82af3a71e91ef2d8eb796099a64)

## srp client host

Gets the host info.

### Parameters

No parameters.

### Examples

    srp client host
    name:"dev4312", state:Registered, addrs:[fd00:0:0:0:0:0:0:1234, fd00:0:0:0:0:0:0:beef]
    Done

### CLI and API References

- [otSrpClientGetHostInfo](https://openthread.io/reference/group/api-srp#group__api-srp_1ga4eec8d6bcf3e343e1092909349aae162)

## srp client host state

Returns the state of the SRP client host. Possible states:

- `ToAdd`: Item to be added/registered.
- `Adding`: Item is being added/registered.
- `ToRefresh`: Item to be refreshed for lease renewal.
- `Refreshing`: Item is beig refreshed.
- `ToRemove`: Item to be removed.
- `Removing`: Item is being removed.
- `Registered`: Item is registered with server.
- `Removed`: Item has been removed.

<br />

### Parameters

No parameters.

### Examples

    srp client host state
    Registered
    Done

### CLI and API References

- No associated API

## srp client keyleaseinterval (get,set)

Gets or sets the key lease interval in seconds.

### Parameters

```
srp client keyleaseinterval [interval]
```

### Examples

    srp client keyleaseinterval 864000
    Done

    srp client keyleaseinterval
    864000
    Done

### CLI and API References

- [otSrpClientGetKeyLeaseInterval](https://openthread.io/reference/group/api-srp#group__api-srp_1ga8681cf238b71720601de4ac180dce12c)
- [otSrpClientSetKeyLeaseInterval](https://openthread.io/reference/group/api-srp#group__api-srp_1gaba8bfd01db6f1b7f0ce9ccf6fd7239de)

## srp client leaseinterval (get,set)

Gets or sets the lease interval in seconds.

### Parameters

```
srp client leaseinterval [interval]
```

### Examples

    srp client leaseinterval 3600
    Done

    srp client leaseinterval
    3600
    Done

### CLI and API References

- [otSrpClientGetLeaseInterval](https://openthread.io/reference/group/api-srp#group__api-srp_1ga13fdfe8a4dcc48973a453559796bd012)
- [otSrpClientSetLeaseInterval](https://openthread.io/reference/group/api-srp#group__api-srp_1ga534a2901026fa2af0ae9de2bcaf921c4)

## srp client server address

Returns the server's IPv6 address.

### Parameters

No parameters.

### Examples

    srp client server address
    fd00:0:0:0:d88a:618b:384d:e760
    Done

### CLI and API References

- No associated API

## srp client server port

Returns the server's port number.

### Parameters

No parameters.

### Examples

    srp client server port
    4724
    Done

### CLI and API References

- No associated API

## srp client server

Gets the socket address (IPv6 address and port number) of the SRP server that is being used by the SRP client. If the client is not running, the address is unspecified (all zeros) with a port number of 0. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

No parameters.

### Examples

    srp client server
    [fd00:0:0:0:d88a:618b:384d:e760]:4724
    Done

### CLI and API References

- [otSrpClientGetServerAddress](https://openthread.io/reference/group/api-srp#group__api-srp_1ga6f89f2d563b20ae7e1cb9eb7d72e192d)

## srp client service add

Adds a service with a given instance name, service name, and port number. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

```
srp client service add instancename servicename port [priority] [weight] [txt]
```

The `servicename` parameter can optionally include a list of service subtype labels that are separated by commas. The examples here use generic naming. The `priority` and `weight` (both are `uint16_t` values) parameters are optional, and if not provided zero is used. The optional `txt` parameter sets the TXT data associated with the service. The `txt` value must be in hex-string format and is treated as an already encoded TXT data byte sequence.

### Examples

    srp client service add ins1 _test1._udp 777
    Done

    srp client service add ins2 _test2._udp,_sub1,_sub2 111 1 1
    Done

### CLI and API References

- [otSrpClientAddService](https://openthread.io/reference/group/api-srp#group__api-srp_1ga0ebf5d6f14933c1811ef07ac46c943c6)

## srp client service key (get,set)

Gets or sets the service key record inclusion mode in the SRP client. This command is intended for testing only, and requires that `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` be enabled. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

No parameters.

### Examples

    srp client service key enable
    Done

    srp client service key
    Enabled
    Done

### CLI and API References

- [otSrpClientIsServiceKeyRecordEnabled](https://openthread.io/reference/group/api-srp#group__api-srp_1gae45aa350815267eee68ac0670f5366f3)

## srp client service name clear

Clears a service, immediately removing it from the client service list, with no interaction with the SRP server.

### Parameters

```
srp client service clear instancename servicename
```

### Examples

    srp client service clear ins2 _test2._udp
    Done

### CLI and API References

- [otSrpClientClearService](https://openthread.io/reference/group/api-srp#group__api-srp_1ga0391acc14d6a1b8be69cafd6c706aa03)

## srp client service remove

Requests a service to be unregistered with the SRP server.

### Parameters

```
srp client service remove instancename servicename
```

### Examples

    srp client service remove ins2 _test2._udp
    Done

### CLI and API References

- [otSrpClientRemoveService](https://openthread.io/reference/group/api-srp#group__api-srp_1ga38dfbe1202f775514a9be7ae3b18d568)

## srp client service

Gets the list of services being managed by client.

### Parameters

No parameters.

### Examples

    srp client service
    instance:"ins2", name:"_test2._udp,_sub1,_sub2", state:Registered, port:111, priority:1, weight:1
    instance:"ins1", name:"_test1._udp", state:Registered, port:777, priority:0, weight:0
    Done

### CLI and API References

- [otSrpClientGetServices](https://openthread.io/reference/group/api-srp#group__api-srp_1ga7b4c33b76b4088ba0e0a15af3c55508f)

## srp client start

Starts the SRP client operation. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

```
srp client start serveraddr serverport
```

### Examples

    srp client start fd00::d88a:618b:384d:e760 4724
    Done

### CLI and API References

- [otSrpClientStart](https://openthread.io/reference/group/api-srp#group__api-srp_1gafc3c0caa4ef2c20440850684746cffbc)

## srp client state

Indicates whether the SRP client is running or not.

### Parameters

No parameters.

### Examples

    srp client state
    Enabled
    Done

### CLI and API References

- [otSrpClientIsRunning](https://openthread.io/reference/group/api-srp#group__api-srp_1ga12b11d16fc4aab3b0db6ae393f6c8f9a)

## srp client stop

Stops the SRP client operation.

Stops any further interactions with the SRP server. Note that it does not remove or clear host info and/or list of services. It marks all services to be added/removed again once the client is (re)started.

### Parameters

No parameters.

### Examples

    srp client stop
    Done

### CLI and API References

- [otSrpClientStop](https://openthread.io/reference/group/api-srp#group__api-srp_1ga937241edaaf4bd9a2984f3d4bf165721)

## srp client ttl (get,set)

Gets or sets the `ttl`(time to live) value in seconds.

### Parameters

```
srp client ttl [value]
```

### Examples

    srp client ttl 3600
    Done

    srp client ttl
    3600
    Done

### CLI and API References

- [otSrpClientGetTtl](https://openthread.io/reference/group/api-srp#group__api-srp_1ga5d6432342538171ab81eb5adf5a11151)
- [otSrpClientSetTtl](https://openthread.io/reference/group/api-srp#group__api-srp_1gab8813ca9a5e7a08e4e854daffa32a481)

## srp server (enable,disable)

Enables or disables the SRP server. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

```
srp server [enable|disable]
```

### Examples

    srp server disable
    Done

### CLI and API References

- [otSrpServerSetEnabled](https://openthread.io/reference/group/api-srp#group__api-srp_1gabf2ae6a5695dc7aaef4e0c9c5ed01200)

## srp server addrmode (get,set)

Gets or sets the address mode used by the SRP server.

The address mode tells the SRP server how to determine its address and port number, which then get published in the Thread network data.

### Parameters

```
srp server addrmode [anycast|unicast|unicast-force-add]
```

### Examples

    srp server addrmode anycast
    Done

    srp server addrmode
    anycast
    Done

### CLI and API References

- [otSrpServerGetAddressMode](https://openthread.io/reference/group/api-srp#group__api-srp_1ga87676282c7353f464474481f34526dbf)
- [otSrpServerSetAddressMode](https://openthread.io/reference/group/api-srp#group__api-srp_1ga30ba6902c8dda9e581565b8281f5f67e)

## srp server auto (enable,disable)

Enables or disables the auto-enable mode on the SRP server.

When this mode is enabled, the Border Routing Manager controls if and when to enable or disable the SRP server.

This command requires that `OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE` be enabled. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

```
srp server auto [enable|disable]
```

### Examples

    srp server auto enable
    Done

    srp server auto
    Enabled
    Done

### CLI and API References

- [otSrpServerIsAutoEnableMode](https://openthread.io/reference/group/api-srp#group__api-srp_1ga1c690c6c846e5fb6c3030350eafd11b7)
- [otSrpServerSetAutoEnableMode](https://openthread.io/reference/group/api-srp#group__api-srp_1ga55ab7305434a195c063c033c33a76332)

## srp server domain (get,set)

Gets or sets the domain name of the SRP server.

### Parameters

```
srp server domain [domain-name]
```

### Examples

    srp server domain thread.service.arpa.
    Done

    srp server domain
    thread.service.arpa.
    Done

### CLI and API References

- [otSrpServerGetDomain](https://openthread.io/reference/group/api-srp#group__api-srp_1gaf895b1b9e02806f1bf050ca8c60b3054)
- [otSrpServerSetDomain](https://openthread.io/reference/group/api-srp#group__api-srp_1gafc3ecc2b528ee395cfbbd1b871bf2d97)

## srp server faststart (enable)

Enables the "Fast Start Mode" on the SRP server.

The Fast Start Mode is designed for scenarios where a device, often a mobile device, needs to act as a provisional SRP server (e.g., functioning as a temporary Border Router). The SRP server function is enabled only if no other Border Routers (BRs) are already providing the SRP service within the Thread network. Importantly, Fast Start Mode allows the device to quickly start its SRP server functionality upon joining the network, allowing other Thread devices to quickly connect and register their services without the typical delays associated with standard Border Router initialization (and SRP server startup).

The Fast Start Mode can be enabled when the device is in the detached or disabled state, the SRP server is currently disabled, and "auto-enable mode" is not in use.

After successfully enabling Fast Start Mode, it can be disabled by a direct command to enable/disable the SRP server, using `srp server [enable/disable]`.

This command requires that `OPENTHREAD_CONFIG_SRP_SERVER_FAST_START_MODE_ENABLE` be enabled. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

```
srp server faststart [enable]
```

### Examples

    srp server faststart enable
    Done

    srp server faststart
    Enabled
    Done

### CLI and API References

- [otSrpServerIsFastStartModeEnabled](https://openthread.io/reference/group/api-srp#group__api-srp_1ga3c3919afe284a52187c4860058d86a22)
- [otSrpServerEnableFastStartMode](https://openthread.io/reference/group/api-srp#group__api-srp_1gae553bc7f25eced828549268214f8e716)

## srp server host

Returns information about all registered hosts. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

No parameters.

### Examples

    srp server host
    srp-api-test-1.default.service.arpa.
        deleted: false
        addresses: [fdde:ad00:beef:0:0:ff:fe00:fc10]
    srp-api-test-0.default.service.arpa.
        deleted: false
        addresses: [fdde:ad00:beef:0:0:ff:fe00:fc10]
    Done

### CLI and API References

- [otSrpServerGetNextHost](https://openthread.io/reference/group/api-srp#group__api-srp_1gaf04c99dc74f496adc582edf898dc0051)
- [otSrpServerHostGetAddresses](https://openthread.io/reference/group/api-srp#group__api-srp_1ga143785e2ee682cf2aaaabc0b8ad34c9e)
- [otSrpServerHostGetFullName](https://openthread.io/reference/group/api-srp#group__api-srp_1ga5354be7a29f8c3c6b533d907245595ad)

## srp server lease (get,set)

Gets or sets the SRP server lease values in number of seconds.

### Parameters

```
srp server lease [min-lease max-lease min-key-lease max-key-lease]
```

### Examples

    srp server lease 1800 7200 86400 1209600
    Done

    srp server lease
    min lease: 1800
    max lease: 7200
    min key-lease: 86400
    max key-lease: 1209600
    Done

### CLI and API References

- [otSrpServerGetLeaseConfig](https://openthread.io/reference/group/api-srp#group__api-srp_1ga247c877759657514d69042bbf240b107)
- [otSrpServerSetLeaseConfig](https://openthread.io/reference/group/api-srp#group__api-srp_1gac4a00cf36e69fa964c01e9e15b643ce8)

## srp server port (get)

Returns the port the SRP server is listening to.

### Parameters

No parameters.

### Examples

    srp server port
    53536
    Done

### CLI and API References

- [otSrpServerGetPort](https://openthread.io/reference/group/api-srp#group__api-srp_1gaff5097a8776578ca3c7432cd7b9f0251)

## srp server seqnum (get,set)

Gets or sets the sequence number used with the anycast address mode. The sequence number is included in the "DNS/SRP Service Anycast Address" entry that is published in the Network Data.

### Parameters

```
srp server seqnum [seqnum]
```

### Examples

    srp server seqnum 20
    Done

    srp server seqnum
    20
    Done

### CLI and API References

- [otSrpServerGetAnycastModeSequenceNumber](https://openthread.io/reference/group/api-srp#group__api-srp_1ga9f23b0aabe265875025a941dddb730ba)
- [otSrpServerSetAnycastModeSequenceNumber](https://openthread.io/reference/group/api-srp#group__api-srp_1gae2f4abd02bf7b97299f183741b998b47)

## srp server service

Returns information about registered services.

The `TXT` record is displayed as an array of entries. If an entry contains a key, the key is printed in ASCII format. The value portion is printed in hexadecimal bytes. For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

No parameters.

### Examples

    srp server service
    srp-api-test-1._ipps._tcp.default.service.arpa.
        deleted: false
        subtypes: (null)
        port: 49152
        priority: 0
        weight: 0
        ttl: 7200
        lease: 7200
        key-lease: 1209600
        remaining lease: 6345.459
        remaining key-lease: 1208734.459
        TXT: [616263, xyz=585960]
        host: srp-api-test-1.default.service.arpa.
        addresses: [fdde:ad00:beef:0:0:ff:fe00:fc10]
    srp-api-test-0._ipps._tcp.default.service.arpa.
        deleted: false
        subtypes: _sub1,_sub2
        port: 49152
        priority: 0
        weight: 0
        ttl: 3600
        lease: 3600
        key-lease: 1209600
        remaining lease: 2600.012
        remaining key-lease: 1208600.012
        TXT: [616263, xyz=585960]
        host: srp-api-test-0.default.service.arpa.
        addresses: [fdde:ad00:beef:0:0:ff:fe00:fc10]
    Done

### CLI and API References

- [otSrpServerServiceGetInstanceName](https://openthread.io/reference/group/api-srp#group__api-srp_1ga6ecd83c08e0c51cf01feee25a8bb8426)
- [otSrpServerServiceGetServiceName](https://openthread.io/reference/group/api-srp#group__api-srp_1gaf376311ba5cd55e53ee64ead0ea553f4)
- [otSrpServerServiceGetSubTypeServiceNameAt](https://openthread.io/reference/group/api-srp#group__api-srp_1ga6efde284b10344008265c6cf1b83cd1d)

## srp server state

Returns one of the following possible states of the SRP server:

- `disabled`: The SRP server is not enabled.
- `stopped`: The SRP server is enabled but not active due to existing SRP servers that are already active in the Thread network. The SRP server may become active when the existing SRP servers are no longer active within the Thread network.
- `running`: The SRP server is active and can handle service registrations.

<br />

For more information, refer to [Set Up Service Registration Protocol (SRP) Server-Client Connectivity With OT CLI](https://openthread.io/reference/cli/concepts/srp).

### Parameters

No parameters.

### Examples

    srp server state
    running
    Done

### CLI and API References

- [otSrpServerGetState](https://openthread.io/reference/group/api-srp#group__api-srp_1ga3c54a2f0f96ca56d13ff7ae12d48d51a)

## state

Returns the current role of the Thread device, or changes the role as specified with one of the options. Possible values returned when inquiring about the device role:

- `child`: The device is currently operating as a Thread child.
- `router`: The device is currently operating as a Thread router.
- `leader`: The device is currently operating as a Thread leader.
- `detached`: The device is not currently participating in a Thread network/partition.
- `disabled`: The Thread stack is currently disabled.

<br />

Using one of the options allows you to change the current role of a device, with the exclusion of changing to or from a `disabled` state.

### Parameters

```
state [child|router|leader|detached]
```

### Examples

    state
    child
    Done

    state leader
    Done

### CLI and API References

- [otThreadGetDeviceRole](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaf25f6f93fbbc69549bc12444e49f9bc2)
- [otThreadBecomeChild](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gadb6ff4c47de43b90b9dd49cb600e418c)
- [otThreadBecomeRouter](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga80acf85ed7146397c518180009994eac)
- [otThreadBecomeLeader](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga6058f4c435d6ae0e939834ee659ebbf5)
- [otThreadBecomeDetached](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gafff60178c7e1567ffeb9b913d42edb8b)

## targetpower (set)

Sets the target power in the unit of 0.01 dBm.

### Parameters

```
targetpower channel targetpower
```

### Examples

    targetpower 12 2000
    Done

### CLI and API References

- [otPlatRadioSetChannelTargetPower](https://openthread.io/reference/group/radio-operation#group__radio-operation_1ga9b87f77c66eb512c675e7b61617149f6)

## tcat active

Sets TCAT operation to active.

### Parameters

```
tcat active [delay] [duration]
```

- The optional `delay` argument specifies the delay in milliseconds before activation.
- The optional `duration` argument specifies the duration in milliseconds to remain active. A duration of 0 (default) means the TCAT agent remains active indefinitely.

### Examples

    tcat active
    Done

    tcat active 5000
    Done

    tcat active 5000 10000
    Done

### CLI and API References

- [otBleSecureSetTcatAgentState](https://openthread.io/reference/group/api-ble-secure#group__api-ble-secure_1ga029ef3cacaa9f2040b255dfb315eb640)

## tcat advid

Sets/clears advertised ID type and value.

### Parameters

```
tcat advid [id_type] [value]
```

- The `id_type` has five possible values:
  - `clear` - removes all previously set advertised IDs.
  - `oui24` - sets OUI24 ID type.
  - `oui36` - sets OUI36 ID type.
  - `discriminator` - sets discriminator ID type.
  - `ianapen` - sets IANA PEN ID type.
- The `value` hexstring value of the ID.

### Examples

    tcat advid ianapen f378aabb
    Done

### CLI and API References

- No associated API

## tcat certid

Selects a predefined certificate.

### Parameters

```
tcat certid [value]
```

- The `value` int value of the ID.

### Examples

    tcat certid 0
    Done

### CLI and API References

- No associated API

## tcat devid

Sets/clears vendor specific device ID.

### Parameters

```
tcat devid [value|clear]
```

- The `value` hexstring value of the ID. `clear` is a special value to remove the previously set ID.

### Examples

    tcat devid f378aabb
    Done

    tcat devid
    f378aabb
    Done

### CLI and API References

- No associated API

## tcat standby

Sets TCAT operation to standby, keeping the agent enabled.

### Parameters

No parameters.

### Examples

    tcat standby
    Done

### CLI and API References

- [otBleSecureSetTcatAgentState](https://openthread.io/reference/group/api-ble-secure#group__api-ble-secure_1ga029ef3cacaa9f2040b255dfb315eb640)

## tcat start

Starts TCAT agent and enables TCAT operation.

### Parameters

No parameters.

### Examples

    tcat start
    Done

### CLI and API References

- [otBleSecureSetCertificate](https://openthread.io/reference/group/api-ble-secure#group__api-ble-secure_1ga9ec873a118b3e4bfbbfc7ea7b312903e)
- [otBleSecureSetCaCertificateChain](https://openthread.io/reference/group/api-ble-secure#group__api-ble-secure_1gaece24cd503bec0d459f79773dc61b2c8)
- [otBleSecureSetSslAuthMode](https://openthread.io/reference/group/api-ble-secure#group__api-ble-secure_1gaa21030867e154df6557f97fcd61e106d)
- [otBleSecureSetTcatVendorInfo](https://openthread.io/reference/group/api-ble-secure#group__api-ble-secure_1ga1967cca26399a4ef64095e42cdb3b369)
- [otBleSecureStart](https://openthread.io/reference/group/api-ble-secure#group__api-ble-secure_1gacd778687ff8f0c8d0f73ef9ef421512a)
- [otBleSecureTcatStart](https://openthread.io/reference/group/api-ble-secure#group__api-ble-secure_1gab56e4b2dd0c89c9a50f9b1217953c683)

## tcat stop

Stops TCAT agent and stops TCAT operation.

### Parameters

No parameters.

### Examples

    tcat stop
    Done

### CLI and API References

- [otBleSecureStop](https://openthread.io/reference/group/api-ble-secure#group__api-ble-secure_1ga20f5b8659c656e04ec77317790e8bb76)

## tcp abort

Unceremoniously ends the TCP connection associated with the example TCP endpoint, transitioning the TCP endpoint to the closed state.

### Parameters

No parameters.

### Examples

    tcp abort
    TCP: Connection reset
    Done

### CLI and API References

- [otTcpAbort](https://openthread.io/reference/group/api-tcp#group__api-tcp_1ga11edfbb1feaab02ba9e8cb65bfa39491)

## tcp benchmark result

Shows the latest result of the TCP benchmark test. Possible status values:

- Ongoing
- Completed
- Untested

<br />

This command is primarily intended for creating scripts that automate the TCP benchmark test.

### Parameters

No parameters.

### Examples

    tcp benchmark result
    TCP Benchmark Status: Ongoing
    Done

    tcp benchmark result
    TCP Benchmark Status: Completed
    TCP Benchmark Complete: Transferred 73728 bytes in 7056 milliseconds
    TCP Goodput: 83.592 kb/s

### CLI and API References

- No associated API

## tcp benchmark run

Transfers the specified number of bytes using the TCP connection currently associated with the example TCP endpoint provided by the `tcp` CLI.

> [!NOTE]
> **Note:** You must establish a TCP connection before you run this command.

### Parameters

```
tcp benchmark run [size]
```

Use the `size` parameter to specify the number of bytes to send for the benchmark. If you do not use the `size` parameter, the default value (`OPENTHREAD_CONFIG_CLI_TCP_DEFAULT_BENCHMARK_SIZE`) is used.

### Examples

    tcp benchmark run
    Done
    TCP Benchmark Complete: Transferred 73728 bytes in 7233 milliseconds
    TCP Goodput: 81.546 kb/s

### CLI and API References

- No associated API

## tcp bind

Associates an IPv6 address and a port to the example TCP endpoint provided by the `tcp` CLI. Associating the TCP endpoint to an IPv6 address and port is referred to as "naming the TCP endpoint." This binds the endpoint for communication. For more information, refer to [Test TCP Functionality With OT CLI](https://openthread.io/reference/cli/concepts/tcp).

### Parameters

```
tcp bind ip port
```

- `ip`: IPv6 address to bind to. If you wish to have the TCP/IPv6 stack assign the binding IPv6 address, use the unspecified IPv6 address: `::`.
- `port`: TCP port number to bind to.

### Examples

    tcp bind :: 30000
    Done

### CLI and API References

- [otTcpBind](https://openthread.io/reference/group/api-tcp#group__api-tcp_1ga5d0811860150c56632ad641a71100a5a)

## tcp connect

Establishes a connection with the specified peer.

If the connection establishment is successful, the resulting TCP connection is associated with the example TCP endpoint. For more information, refer to [Test TCP Functionality With OT CLI](https://openthread.io/reference/cli/concepts/tcp).

### Parameters

```
tcp connect ip port [fastopen]
```

- `ip`: IP address of the peer The address can be an IPv4 address, which gets synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. The command returns `InvalidState` when the preferred NAT64 prefix is unavailable.
- `port`: TCP port number of the peer.
- `fastopen`: This parameter is optional. If set to `fast`, TCP Fast Open is enabled for this connection. Otherwise, if this parameter is set to `slow` or not used, TCP Fast Open is disabled.

### Examples

    tcp connect fe80:0:0:0:a8df:580a:860:ffa4 30000
    Done
    TCP: Connection established

    tcp connect 172.17.0.1 1234
    Connecting to synthesized IPv6 address: fdde:ad00:beef:2:0:0:ac11:1
    Done

### CLI and API References

- [otTcpConnect](https://openthread.io/reference/group/api-tcp#group__api-tcp_1ga3bc39aeb3514e836dfb1d74e824e1cce)

## tcp deinit

Deinitializes this TCP endpoint.

This means that OpenThread no longer keeps track of this TCP endpoint and deallocates all resources it has internally allocated for this TCP endpoint. The application can reuse the memory backing the TCP endpoint as it sees fit.

If it corresponds to a live TCP connection, the connection is terminated unceremoniously (as in [otTcpAbort()](https://openthread.io/reference/group/api-tcp#group__api-tcp_1ga11edfbb1feaab02ba9e8cb65bfa39491)). All resources the application has provided for this TCP endpoint (linked buffers for the send buffer, memory for the receive buffer, the `aEndpoint` structure itself, etc.) are immediately returned to the application.

### Parameters

No parameters.

### Examples

    tcp deinit
    Done

### CLI and API References

- [otTcpEndpointDeinitialize](https://openthread.io/reference/group/api-tcp#group__api-tcp_1gac3d5c30636461e320a8fd77c8da49881)

## tcp init

Initializes the example TCP listener and the example TCP endpoint provided by the `tcp` CLI.

### Parameters

```
tcp init [mode] [size]
```

- The `mode` has three possible values:
  - `tls`: Specifies that the TCP connection between two nodes should also use the TLS protocol on top of TCP. When two nodes communicate over TCP, both nodes must either use TLS or neither node should use TLS because a non-TLS endpoint cannot communicate with a TLS endpoint.
  - `linked` or `circular`: Either one of these options means that TLS is not to be used, and the specified buffering type should be used for TCP buffering. The behavior of `linked` and `circular` is identical. Examine the code for the differences between these two buffering types. Two endpoints of a TCP connection are not required to use the same buffering type.
- The `size` parameter sets the size of the receive buffer to associate with the example TCP endpoint. If left unspecified, the maximum size is used. The maximum size is set in `OPENTHREAD_CONFIG_CLI_TCP_RECEIVE_BUFFER_SIZE`.

### Examples

    tcp init tls
    Done

### CLI and API References

- [otTcpListenerInitialize](https://openthread.io/reference/group/api-tcp#group__api-tcp_1ga1415bd34cc64f1745ca4b3364d7804bb)
- [otTcpEndpointInitialize](https://openthread.io/reference/group/api-tcp#group__api-tcp_1ga46ca008dbb9657f10692612f3051dd55)

## tcp listen

Uses the example TCP listener to listen for incoming connections on the specified IPv6 address and port. For more information, refer to [Test TCP Functionality With OT CLI](https://openthread.io/reference/cli/concepts/tcp).

### Parameters

```
tcp listen ip port
```

The following parameters are required:

- `ip`: IPv6 address or the unspecified IPv6 address (`::`) of the example TCP listener provided by the `tcp` CLI.
- `port`: TCP port of the example TCP listener. If no TCP connection is associated with the example TCP endpoint, then any incoming connections matching the specified IPv6 address and port are accepted and are associated with the example TCP endpoint.

<br />

### Examples

    tcp listen :: 30000
    Done

### CLI and API References

- [otTcpListen](https://openthread.io/reference/group/api-tcp#group__api-tcp_1ga51b2d66fc32d24aab66868383a089a1e)

## tcp send

Sends data over the TCP connection associated with the example TCP endpoint that is provided with the `tcp` CLI. For more information, refer to [Test TCP Functionality With OT CLI](https://openthread.io/reference/cli/concepts/tcp).

### Parameters

```
tcp send [type] message
```

The `message` parameter contains the message you want to send to the remote TCP endpoint. If `type` is `-x`, then binary data in hexadecimal representation is given in the `message` parameter.

### Examples

    tcp send hello
    Done

    tcp send -x 68656c6c6f
    Done

### CLI and API References

- No associated API

## tcp sendend

Sends the "end of stream" signal over the TCP connection associated with the example TCP endpoint provided by the `tcp` CLI. This alerts the peer that it will not receive any more data over this TCP connection.

### Parameters

No parameters.

### Examples

    tcp sendend
    Done

### CLI and API References

- [otTcpSendEndOfStream](https://openthread.io/reference/group/api-tcp#group__api-tcp_1ga9e928aa3c9957c5d5f636c6e4c9f6e6d)

## tcp stoplistening

Instructs the example TCP listener to stop listening for incoming TCP connections.

### Parameters

No parameters.

### Examples

    tcp stoplistening
    Done

### CLI and API References

- [otTcpStopListening](https://openthread.io/reference/group/api-tcp#group__api-tcp_1gaa1ec44353fa7f24229b772298863f198)

## test tmforiginfilter

Enables or disables the filter to drop TMF UDP messages from untrusted origin.

By default the filter that drops TMF UDP messages from untrusted origin is enabled. When disabled, UDP messages sent to the TMF port that originate from untrusted origin (such as host, CLI or an external IPv6 node) will be allowed.

> [!NOTE]
> **Note:** `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required.

### Parameters

```
test tmforiginfilter [enable|disable]
```

### Examples

    test tmforiginfilter
    Enabled

    test tmforiginfilter enable
    Done

    test tmforiginfilter disable
    Done

### CLI and API References

- No associated API

## thread start

Starts the Thread protocol operation.

> [!NOTE]
> **Note:** The interface must be up when running this command.

### Parameters

No parameters.

### Examples

    thread start
    Done

### CLI and API References

- [otThreadSetEnabled](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga20a68a51ce7299b1c74c81812a4854a3)

## thread stop

Stops the Thread protocol operation.

### Parameters

No parameters.

### Examples

    thread stop
    Done

### CLI and API References

- No associated API

## thread version

Gets the Thread protocol version.

The constants `OT_THREADVERSION*` define the numerical version values.

### Parameters

No parameters.

### Examples

     thread version
    2
    Done

### CLI and API References

- [otThreadGetVersion](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga3344415a297eb3e2ae56b02295d9256a)

## timeinqueue max

Gets the maximum time-in-queue for messages in the TX queue.

Requires `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE`.

The time-in-queue is tracked for direct transmissions only and is measured as the duration from when a message is added to the transmit queue until it is passed to the MAC layer for transmission or dropped.

The collected statistics can be reset by calling `
https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaa46968acc412f6ec71dfa036f8b3db36
`.

### Parameters

No parameters.

### Examples

    timeinqueue max
    281
    Done

### CLI and API References

- [otThreadGetMaxTimeInQueue](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaaadf64a5edef74cfc7537a78f9359544)
- [timeinqueue reset](https://openthread.io/reference/cli/commands#timeinqueue_reset)

## timeinqueue reset

Resets the TX queue time-in-queue statistics.

Requires `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE`.

### Parameters

No parameters.

### Examples

    timeinqueue reset
    Done

### CLI and API References

- [otThreadResetTimeInQueueStat](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaa46968acc412f6ec71dfa036f8b3db36)

## timeinqueue

Gets the time-in-queue histogram for messages in the TX queue.

Requires `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE`.

Histogram of the time-in-queue of messages in the transmit queue is collected. The time-in-queue is tracked for direct transmissions only and is measured as the duration from when a message is added to the transmit queue until it is passed to the MAC layer for transmission or dropped.

The histogram is returned as an array of `uint32_t` values with `aNumBins` entries. The first entry in the array (at index 0) represents the number of messages with a time-in-queue less than `aBinInterval`. The second entry represents the number of messages with a time-in-queue greater than or equal to `aBinInterval`, but less than `2 * aBinInterval`. And so on. The last entry represents the number of messages with time-in-queue greater than or equal to `(aNumBins - 1) * aBinInterval`.

The collected statistics can be reset by calling `
https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaa46968acc412f6ec71dfa036f8b3db36
`. The histogram information is collected since the OpenThread instance was initialized or since the last time statistics collection was reset by calling the `
https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gaa46968acc412f6ec71dfa036f8b3db36
`.

Pointers `aNumBins` and `aBinInterval` MUST NOT be NULL.

### Parameters

No parameters.

### Examples

    timeinqueue
    | Min  | Max  |Msg Count|
    +---+---+---+
    |    0 |    9 |    1537 |
    |   10 |   19 |     156 |
    |   20 |   29 |      57 |
    |   30 |   39 |     108 |
    |   40 |   49 |      60 |
    |   50 |   59 |      76 |
    |   60 |   69 |      88 |
    |   70 |   79 |      51 |
    |   80 |   89 |      86 |
    |   90 |   99 |      45 |
    |  100 |  109 |      43 |
    |  110 |  119 |      44 |
    |  120 |  129 |      38 |
    |  130 |  139 |      44 |
    |  140 |  149 |      35 |
    |  150 |  159 |      41 |
    |  160 |  169 |      34 |
    |  170 |  179 |      13 |
    |  180 |  189 |      24 |
    |  190 |  199 |       3 |
    |  200 |  209 |       0 |
    |  210 |  219 |       0 |
    |  220 |  229 |       2 |
    |  230 |  239 |       0 |
    |  240 |  249 |       0 |
    |  250 |  259 |       0 |
    |  260 |  269 |       0 |
    |  270 |  279 |       0 |
    |  280 |  289 |       0 |
    |  290 |  299 |       1 |
    |  300 |  309 |       0 |
    |  310 |  319 |       0 |
    |  320 |  329 |       0 |
    |  330 |  339 |       0 |
    |  340 |  349 |       0 |
    |  350 |  359 |       0 |
    |  360 |  369 |       0 |
    |  370 |  379 |       0 |
    |  380 |  389 |       0 |
    |  390 |  399 |       0 |
    |  400 |  409 |       0 |
    |  410 |  419 |       0 |
    |  420 |  429 |       0 |
    |  430 |  439 |       0 |
    |  440 |  449 |       0 |
    |  450 |  459 |       0 |
    |  460 |  469 |       0 |
    |  470 |  479 |       0 |
    |  480 |  489 |       0 |
    |  490 |  inf |       0 |
    Done

### CLI and API References

- [otThreadGetTimeInQueueHistogram](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gad6b8273e3d74fa27cc4a27c2c69ca6e6)
- [timeinqueue reset](https://openthread.io/reference/cli/commands#timeinqueue_reset)

## trel (enable,disable)

Enables or disables the TREL radio operation.

### Parameters

```
trel enable|disable
```

### Examples

    trel enable
    Done

    trel disable
    Done

### CLI and API References

- [otTrelSetEnabled](https://openthread.io/reference/group/api-trel#group__api-trel_1ga92b941e985fe2e14803d8e5a8acc7b3b)

## trel counters reset

Resets the TREL counters.

### Parameters

No parameters.

### Examples

    trel counters reset
    Done

### CLI and API References

- [otTrelResetCounters](https://openthread.io/reference/group/api-trel#group__api-trel_1gabf5acb581ed772a9efcabd2a1c3f843e)

## trel counters

Gets the TREL counters.

### Parameters

No parameters.

### Examples

    trel counters
    Inbound:  Packets 32 Bytes 4000
    Outbound: Packets 4 Bytes 320 Failures 1
    Done

### CLI and API References

- [otTrelGetCounters](https://openthread.io/reference/group/api-trel#group__api-trel_1ga6427b5c7b23e16647e5a851e33992f01)

## trel filter (enable,disable)

Enables or disables TREL filter mode.

### Parameters

```
trel filter enable|disable
```

### Examples

    trel filter enable
    Done

    trel filter disable
    Done

### CLI and API References

- [otTrelSetFilterEnabled](https://openthread.io/reference/group/api-trel#group__api-trel_1ga74ea7c348942eda1c7ba7a68cae0cb83)

## trel filter

Indicates whether TREL filter mode is enabled.

When filter mode is enabled, all Rx and Tx traffic sent through the TREL interface gets silently dropped.

> [!NOTE]
> **Note:** This mode is used mostly for testing.

### Parameters

No parameters.

### Examples

    trel filter
    Disabled
    Done

### CLI and API References

- [otTrelIsFilterEnabled](https://openthread.io/reference/group/api-trel#group__api-trel_1ga88d844c58924f3355dfd2507d86d843f)

## trel peers

Gets the TREL peer table in table or list format.

### Parameters

```
trel peers [list]
```

### Examples

    trel peers
    | No  | Ext MAC Address  | Ext PAN Id       | IPv6 Socket Address                              |
    +---+---+---+---+
    |   1 | 5e5785ba3a63adb9 | f0d9c001f00d2e43 | [fe80:0:0:0:cc79:2a29:d311:1aea]:9202            |
    |   2 | ce792a29d3111aea | dead00beef00cafe | [fe80:0:0:0:5c57:85ba:3a63:adb9]:9203            |
    Done

    trel peers list
    001 ExtAddr:5e5785ba3a63adb9 ExtPanId:f0d9c001f00d2e43 SockAddr:[fe80:0:0:0:cc79:2a29:d311:1aea]:9202
    002 ExtAddr:ce792a29d3111aea ExtPanId:dead00beef00cafe SockAddr:[fe80:0:0:0:5c57:85ba:3a63:adb9]:9203
    Done

### CLI and API References

- [otTrelGetNextPeer](https://openthread.io/reference/group/api-trel#group__api-trel_1ga5ccfef74cd4ec1930caad23c499e171c)

## trel port

Gets the UDP port of the TREL interface.

### Parameters

No parameters.

### Examples

    trel port
    49153
    Done

### CLI and API References

- [otTrelGetUdpPort](https://openthread.io/reference/group/api-trel#group__api-trel_1ga37fab774d6ed41a1c4606dc3ca160839)

## trel

Indicates whether the TREL operation is enabled.

The TREL operation is enabled if and only if it is enabled by both the user (see `
https://openthread.io/reference/group/api-trel#group__api-trel_1ga92b941e985fe2e14803d8e5a8acc7b3b
`) and the OpenThread stack.

> [!NOTE]
> **Note:** `OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE` is required for all `trel` sub-commands.

### Parameters

No parameters.

### Examples

    trel
    Enabled
    Done

### CLI and API References

- [otTrelIsEnabled](https://openthread.io/reference/group/api-trel#group__api-trel_1ga1fde90a5e911984fcc680eb43e9f2ecd)

## tvcheck (enable,disable)

Enables or disables the Thread version check when upgrading to router or leader. This check is enabled by default.

> [!NOTE]
> **Note:** `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required.

### Parameters

No parameters.

### Examples

    tvcheck enable
    Done

    tvcheck disable
    Done

### CLI and API References

- [otThreadSetThreadVersionCheckEnabled](https://openthread.io/reference/group/api-thread-router#group__api-thread-router_1ga545cbc892e6e4e764aead04e0a18c429)

## txpower (get,set)

Gets (or sets with the use of the optional `txpower` argument) the transmit power in dBm.

### Parameters

```
txpower [txpower]
```

### Examples

    txpower -10
    Done

    txpower
    -10 dBm
    Done

### CLI and API References

- [otPlatRadioGetTransmitPower](https://openthread.io/reference/group/radio-config#group__radio-config_1gadba7cca4c1176c4efeb789b1f90a5057)
- [otPlatRadioSetTransmitPower](https://openthread.io/reference/group/radio-config#group__radio-config_1gab310e61a0ab319236d71acb02804ba02)

## udp bind

Assigns an IPv6 address and a port to an open socket, which binds the socket for communication. Assigning the IPv6 address and port is referred to as naming the socket. For more information, refer to [Test UDP Functionality With OT CLI](https://openthread.io/reference/cli/concepts/udp).

### Parameters

```
udp bind [netif] ip port
```

- `netif`: The binding network interface, which is determined as follows:
  - No value (leaving out this parameter from the command): Thread stack network interface is used.
  - `-u`: Unspecified network interface, which means that the Host UDP/IPv6 stack determines which network interface to bind the socket to. Valid if OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE is set.
  - `-b`: Backbone network interface is used. Valid if OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE is set.
  - `-h`: Host Thread network interface is used. Valid if OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE is set.
- `ip`: Unicast IPv6 address to bind to. If you wish to have the UDP/IPv6 stack assign the binding IPv6 address, or if you wish to bind to multicast IPv6 addresses, then you can use the following value to use the unspecified IPv6 address: `::`. Each example uses the unspecified IPv6 address.
- `port`: UDP port number to bind to. Each of the examples is using port number 1234.

### Examples

    udp bind :: 1234
    Done

    udp bind -u :: 1234
    Done

    udp bind -b :: 1234
    Done

    udp bind -h :: 1234
    Done

### CLI and API References

- [otUdpBind](https://openthread.io/reference/group/api-udp#group__api-udp_1ga98ed16fc2e4aff157aba52a2a4369176)

## udp close

Close a UDP/IPv6 socket.

### Parameters

No parameters.

### Examples

    udp close
    Done

### CLI and API References

- [otUdpClose](https://openthread.io/reference/group/api-udp#group__api-udp_1ga884d74daea78d18e5364bd0d54f079a7)

## udp connect

Connect a UDP/IPv6 socket.

### Parameters

```
udp connect ip port
```

The following parameters are required:

- `ip`: IP address of the peer.
- `port`: UDP port number of the peer. The address can be an IPv4 address, which gets synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. The command returns `InvalidState` when the preferred NAT64 prefix is unavailable.

<br />

### Examples

    udp connect fdde:ad00:beef:0:bb1:ebd6:ad10:f33 1234
    Done

    udp connect 172.17.0.1 1234
    Connecting to synthesized IPv6 address: fdde:ad00:beef:2:0:0:ac11:1
    Done

### CLI and API References

- [otUdpConnect](https://openthread.io/reference/group/api-udp#group__api-udp_1ga80a9566a6afeada05b9c58e4286bdf84)

## udp linksecurity (enable,disable)

Enables or disables link security.

### Parameters

No parameters.

### Examples

    udp linksecurity enable
    Done

    udp linksecurity disable
    Done

### CLI and API References

- No associated API

## udp linksecurity

Indicates whether link security is enabled or disabled.

### Parameters

No parameters.

### Examples

    udp linksecurity
    Enabled
    Done

### CLI and API References

- No associated API

## udp open

Open a UDP/IPv6 socket.

### Parameters

No parameters.

### Examples

    udp open
    Done

### CLI and API References

- [otUdpOpen](https://openthread.io/reference/group/api-udp#group__api-udp_1gac3df0bb2b8e2feeb44094d2702423cc2)

## udp send

Sends a UDP message using the socket. For more information, refer to [Test UDP Functionality With OT CLI](https://openthread.io/reference/cli/concepts/udp).

### Parameters

```
udp send [ip port] [type] value
```

The `ip` and `port` are optional as a pair, but if you specify one you must specify the other. If `ip` and `port` are not specified, the socket peer address is used from `udp connect`.

- `ip`: Destination address. This address can be either an IPv4 or IPv6 address, An IPv4 address gets synthesized to an IPv6 address with the preferred NAT64 prefix from the network data. (If the preferred NAT64 prefix is unavailable, the command returns `InvalidState`).
- `port`: UDP destination port.
- `type`/`value` combinations:
  - `-t`: The payload in the `value` parameter is treated as text. If no `type` value is entered, the payload in the `value` parameter is also treated as text.
  - `-s`: Auto-generated payload with the specified length given in the `value` parameter.
  - `-x`: Binary data in hexadecimal representation given in the `value` parameter.

<br />

### Examples

    udp send hello
    Done

    udp send -t hello
    Done

    udp send -x 68656c6c6f
    Done

    udp send -s 800
    Done

    udp send fdde:ad00:beef:0:bb1:ebd6:ad10:f33 1234 hello
    Done

    udp send 172.17.0.1 1234 hello
    Sending to synthesized IPv6 address: fdde:ad00:beef:2:0:0:ac11:1
    Done

    udp send fdde:ad00:beef:0:bb1:ebd6:ad10:f33 1234 -t hello
    Done

    udp send fdde:ad00:beef:0:bb1:ebd6:ad10:f33 1234 -x 68656c6c6f
    Done

    udp send fdde:ad00:beef:0:bb1:ebd6:ad10:f33 1234 -s 800
    Done

### CLI and API References

- [udp open](https://openthread.io/reference/cli/commands#udp_open)
- [udp bind](https://openthread.io/reference/cli/commands#udp_bind)
- [udp connect](https://openthread.io/reference/cli/commands#udp_connect)
- [otUdpSend](https://openthread.io/reference/group/api-udp#group__api-udp_1gad69e602fb052467ae57c199c78cb4e49)

## unsecure get

Lists all ports from the allowed unsecured port list.

### Parameters

No parameters.

### Examples

    unsecure get
    1234
    Done

### CLI and API References

- [otIp6GetUnsecurePorts](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga27c2c884bee5ebca73748237f62187d7)

## unsecureport add

Adds a port to the allowed unsecured port list.

### Parameters

```
unsecureport add port
```

### Examples

    unsecureport add 1234
    Done

### CLI and API References

- [otIp6AddUnsecurePort](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga337396785b502c2d933fe9d8e84630e9)

## unsecureport allwhendisabled (enable, disable)

Sets whether to allow link-local unsecure IPv6 datagrams when the Thread role is disabled.

Available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. This is intended for testing. By default, this is disabled (i.e., unsecure traffic is always dropped regardless of the device's role).

### Parameters

```
unsecureport allwhendisabled enable|disable
```

### Examples

    unsecureport allwhendisabled enable
    Done

### CLI and API References

- [otIp6SetAllowUnsecureWhenDisabled](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga6938b2d0025c3820290b9c96e6fbf39c)

## unsecureport allwhendisabled

Indicates whether allowing link-local unsecure IPv6 datagrams when the Thread role is disabled is enabled.

Available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.

### Parameters

No parameters.

### Examples

    unsecureport allwhendisabled
    Disabled
    Done

### CLI and API References

- [otIp6IsUnsecureAllowedWhenDisabled](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga4bff725cf2b6a9198632480c8c5b2606)

## unsecureport remove

Removes a specified port or all ports from the allowed unsecured port list.

### Parameters

```
unsecureport remove port|all
```

### Examples

    unsecureport remove 1234
    Done

    unsecureport remove all
    Done

### CLI and API References

- [otIp6AddUnsecurePort](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga337396785b502c2d933fe9d8e84630e9)
- [otIp6RemoveAllUnsecurePorts](https://openthread.io/reference/group/api-ip6#group__api-ip6_1ga4e13970081f28575118184a9836d4c22)

## uptime ms

Returns the current instance uptime (in msec).

Requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled.

The uptime is given as number of milliseconds since OpenThread instance was initialized.

### Parameters

No parameters.

### Examples

    uptime ms
    426238
    Done

### CLI and API References

- [otInstanceGetUptime](https://openthread.io/reference/group/api-instance#group__api-instance_1gae0902e344a78e95dc1d7ba19de6af139)

## uptime

Returns the current instance uptime as a human-readable string.

Requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled.

The string follows the format "::." for hours, minutes, seconds and millisecond (if uptime is shorter than one day) or "
d.::." (if longer than a day).

<br />

If the resulting string does not fit in `aBuffer` (within its `aSize` characters), the string will be truncated but the outputted string is always null-terminated.

### Parameters

No parameters.

### Examples

    uptime
    12:46:35.469
    Done

### CLI and API References

- [otInstanceGetUptimeAsString](https://openthread.io/reference/group/api-instance#group__api-instance_1ga4109e5a9ea01ccc1fd53d0f55bfdaac8)

## vendor appurl (set)

Set the vendor app URL string.

Requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`.

`aVendorAppUrl` should be UTF8 with max length of 64 chars (`MAX_VENDOR_APPL_URL_TLV_LENGTH`). Maximum length does not include the null `\0` character.

### Parameters

```
vendor appurl url
```

### Examples

    vendor appurl http://www.example.com
    Done

### CLI and API References

- [otThreadSetVendorAppUrl](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gac07c8ff2adb313ecc00f8c63db483702)

## vendor appurl

Get the vendor app URL string.

### Parameters

No parameters.

### Examples

    vendor appurl
    http://www.example.com
    Done

### CLI and API References

- [otThreadGetVendorAppUrl](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga7bd0fb917a8b75ec9254dbc2fb02c5ad)

## vendor model (set)

Set the vendor model string.

Requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`.

`aVendorModel` should be UTF8 with max length of 32 chars (`MAX_VENDOR_MODEL_TLV_LENGTH`). Maximum length does not include the null `\0` character.

### Parameters

```
vendor model name
```

### Examples

    vendor model Hub\ Max
    Done

### CLI and API References

- [otThreadSetVendorModel](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga6cce70a5e238d8004d52959a30dcc4c2)

## vendor model

Get the vendor model string.

### Parameters

No parameters.

### Examples

    vendor model
    Hub Max
    Done

### CLI and API References

- [otThreadGetVendorModel](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga6b6da1ade8c01f6bf4e317d4f8dca56b)

## vendor name (set)

Set the vendor name string.

Requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`.

`aVendorName` should be UTF8 with max length of 32 chars (`MAX_VENDOR_NAME_TLV_LENGTH`). Maximum length does not include the null `\0` character.

If `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled, `aVendorName` must start with the "RD:" prefix. This is enforced to ensure reference devices are identifiable. If `aVendorName` does not follow this pattern, the name is rejected, and `OT_ERROR_INVALID_ARGS` is returned.

### Parameters

```
vendor name name
```

### Examples

    vendor name nest
    Done

### CLI and API References

- [otThreadSetVendorName](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga039bf81e51fc23bf0530db197e1d7d83)

## vendor name

Get the vendor name string.

### Parameters

No parameters.

### Examples

    vendor name
    nest
    Done

### CLI and API References

- [otThreadGetVendorName](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga7850fbe02d1b5e13e98c3a91f8598f83)

## vendor oui (set)

Sets the vendor OUI-24.

**[Deprecated.](https://openthread.io/reference/deprecated/deprecated)** This function is deprecated. Use `
https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga5b1317faad6cf6de3fc64dbb403a8466
` instead.

Requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`.

### Parameters

```
vendor oui oui
```

### Examples

    vendor oui 0xb4a661
    Done

### CLI and API References

- [otThreadSetVendorOui](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gab9d68209aa834b4f91fb676774e1250c)

## vendor oui

Gets the vendor OUI.

If no vendor OUI is yet set/configured on device, the `mBitLength` in `aOui` will be zero.

### Parameters

No parameters.

### Examples

    vendor oui
    B4-A6-61
    Done

### CLI and API References

- [otThreadGetVendorOuiInfo](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga31878c1dd1212a2b630528391ec63179)

## vendor swversion (set)

Set the vendor software version string.

Requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`.

`aVendorSwVersion` should be UTF8 with max length of 16 chars(`MAX_VENDOR_SW_VERSION_TLV_LENGTH`). Maximum length does not include the null `\0` character.

### Parameters

```
vendor swversion version
```

### Examples

    vendor swversion Marble3.5.1
    Done

### CLI and API References

- [otThreadSetVendorSwVersion](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1gab9ca12600c2a85ee0583da0438c52986)

## vendor swversion

Get the vendor software version string.

### Parameters

No parameters.

### Examples

    vendor swversion
    Marble3.5.1
    Done

### CLI and API References

- [otThreadGetVendorSwVersion](https://openthread.io/reference/group/api-thread-general#group__api-thread-general_1ga2533b7c73abcab2023d433d317faeb64)

## verhoeff calculate

Calculates the Verhoeff checksum for a given decimal string.

Requires `OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE`.

### Parameters

```
verhoeff calculate decimalstring
```

### Examples

    verhoeff calculate 30731842
    1
    Done

### CLI and API References

- [otVerhoeffChecksumCalculate](https://openthread.io/reference/group/api-verhoeff-checksum#group__api-verhoeff-checksum_1gada5e4f7124b6926b0db576e8bfa75e28)

## verhoeff validate

Validates the Verhoeff checksum for a given decimal string.

Requires `OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE`.

### Parameters

```
verhoeff validate decimalstring
```

### Examples

    verhoeff validate 307318421
    Done

### CLI and API References

- [otVerhoeffChecksumValidate](https://openthread.io/reference/group/api-verhoeff-checksum#group__api-verhoeff-checksum_1gaf968523db5ba29ef340033e36ddf2de1)

## version api

Prints the API version number.

### Parameters

No parameters.

### Examples

    version api
    28
    Done

### CLI and API References

- No associated API

## version

Gets the OpenThread version string.

### Parameters

No parameters.

### Examples

    version
    OPENTHREAD/gf4f2f04; Jul 1 2016 17:00:09
    Done

### CLI and API References

- [otGetVersionString](https://openthread.io/reference/group/api-instance#group__api-instance_1ga768af70c94547bf06bb42faf6448efe8)