Router Selection

View source on GitHub

Connected Dominating Set

OT Connected Dominating Set
Example of a Connected Dominating Set

Routers must form a Connected Dominating Set (CDS), which means:

  1. There is a Router-only path between any two Routers.
  2. Any one Router in a Thread network can reach any other Router by staying entirely within the set of Routers.
  3. Every End Device in a Thread network is directly connected to a Router.

A distributed algorithm maintains the CDS, which ensures a minimum level of redundancy. Every device initially attaches to the network as an End Device (Child). As the state of the Thread network changes, the algorithm adds or removes Routers to maintain the CDS.

Thread adds Routers to:

  • Increase coverage if the network is below the Router threshold of 16
  • Increase path diversity
  • Maintain a minimum level of redundancy
  • Extend connectivity and support more Children

Thread removes Routers to:

  • Reduce the Routing state below the maximum of 32 Routers
  • Allow new Routers in other parts of the network when needed

Upgrade to a Router

After attaching to a Thread network, the Child device may elect to become a Router. Before initiating the MLE Link Request process, the Child sends an Address Solicit message to the Leader, asking for a Router ID. If the Leader accepts, it responds with a Router ID and the Child upgrades itself to a Router.

The MLE Link Request process is then used to establish bi-directional Router-Router links with neighboring Routers.

  1. The new Router sends a multicast Link Request to neighboring Routers.
  2. Routers respond with Link Accept and Request messages.
  3. The new Router responds to each Router with a unicast Link Accept to establish the Router-Router link.

A Link Request is a request from the Router to all other Routers in the Thread network. When first becoming a Router, the device sends a multicast Link Request to ff02::2. Later, after discovering the other Routers via MLE Advertisements, the devices send unicast Link Requests.

OT MLE Link Request
Link Request Message Contents
Version Thread protocol version
Challenge Tests the timeliness of the Link Response to prevent replay attacks
Source Address RLOC16 of the sender
Leader Data Information about the Router's Leader, as stored on the sender (RLOC, Partition ID, Partition weight)

A Link Accept and Request is a combination of the Link Accept and Link Request messages. Thread uses this optimization in the MLE Link Request process to reduce the number of messages from four to three.

OT MLE Link Accept and Request

A Link Accept is a unicast response to a Link Request from a neighboring Router that provides information about itself and accepts the link to the neighboring Router.

OT MLE Link Accept
Link Accept Message Contents
Version Thread protocol version
Response Tests the timeliness of the Link Response to prevent replay attacks
Link Frame Counter 802.15.4 Frame Counter on the sender
MLE Frame Counter MLE Frame Counter on the sender
Source Address RLOC16 of the sender
Leader Data Information about the Router's Leader, as stored on the sender (RLOC, Partition ID, Partition weight)

Downgrade to a REED

When a Router downgrades to a REED, its Router-Router links are disconnected, and the device initiates the MLE Attach process to establish a Child-Parent link.

See Join an existing network for more information on the MLE Attach process.

In some scenarios, it may be necessary to establish a one-way receive link.

After a Router reset, neighboring Routers may still have a valid receive link with the reset Router. In this case, the reset Router sends a Link Request message to re-establish the Router-Router link.

An End Device may also wish to establish a receive link with neighboring non-Parent Routers to improve multicast reliability. We'll learn more about this when we get to Multicast Routing.

Recap

What you've learned:

  • Routers in a Thread network must form a Connected Dominating Set (CDS)
  • Thread devices are upgraded to Routers or downgraded to End Devices to maintain the CDS
  • The MLE Link Request process is used to establish Router-Router links

Check your understanding

Which of these rules are not enforced by a Connected Dominating Set (CDS)?
There is a Router-only path between any two Routers.
Incorrect.
Any one Router in a Thread network can reach any other Router by staying entirely within the set of Routers.
Incorrect.
Every End Device in a Thread network is directly connected to a Router.
Incorrect.
Only one Router in a Thread network may be a Border Router.
Correct. A Thread network may have multiple Border Routers.
Why might a Router be removed from a Thread network?
To reduce the Routing state below the maximum of 32 Routers.
Correct. Thread networks strive to maintain an optimal number of Routers. The most Routers that any Thread network should have is 32.
To free up channels.
Incorrect. The number of routers has no relation to channel usage or capacity.
To allow the election of new Routers in other parts of the network when needed.
Correct. Reducing the number of active Routers in one part of a Thread network increases its ability to ramp up routing capacity elsewhere.
What must happen before a REED that is attempting to become a Router can establish direct links with the other Routers?
The REED must send an Address Solicit message to the network Leader.
Correct.
The Leader must grant a Router ID to the REED.
Correct. Without a Router ID, the REED remains a Child device.
The REED must send an MLE Link Request.
Wrong. The MLE Link Request is how the device establishes links to other Routers once it has become a Router.
Which of the following statements accurately describes what happens when a Router downgrades?
The device automatically remains on the network but as a Child (REED).
Wrong. There are more steps involved when a Router downgrades.
The device must initiate the MLE Attach process to establish a new connection to the network.
Correct. A device that downgrades from Router to REED is disconnected and must renegotiate its connection to the network.
What process is used to establish Router-Router links?
The MLE Link Request process.
Correct.
The Link Accept and Request process.
Incorrect. There's no such thing as a Link Accept and Request process. Link Accept and Request messages are sent by Routers in response to Link Request messages as part of the MLE Link Request process.
The MLE Attach process.
Incorrect. The MLE Attach process is the process by which a device joins an existing Thread network.