43  Thread Architecture & Roles

In 60 Seconds

Thread networks use a hierarchical mesh architecture with six device roles: Border Router (internet gateway), Leader (network coordinator), Router (mesh backbone), REED (flexible backup), FED (always-listening), and MED/SED (battery-powered sleepers). This chapter covers each role in detail with an interactive network visualization demo, enabling you to design Thread networks with proper router placement for reliable coverage.

Sammy the Sensor just moved into a Thread neighborhood! Max the Microcontroller introduced everyone: “The Border Router is like the town’s post office – it connects us to the outside world through Wi-Fi. The Leader is like the mayor who keeps everything organized. Routers are the mail carriers who are always awake, delivering messages around the neighborhood.” Bella the Battery yawned: “And I am a Sleepy End Device – I only wake up once a minute to check if anyone sent me a letter, so I can last 10 years on my tiny coin battery!” Lila the LED added: “Our neighborhood can have up to 250 residents and 32 mail carriers. If a mail carrier moves away, another neighbor can step up to take their place – that is what REED means!”

43.1 Thread Network Architecture

Learning Objectives

By the end of this section, you will be able to:

  • Diagram Thread’s mesh network architecture and explain its hierarchical topology
  • Differentiate all Thread device roles (Border Router, Leader, Router, REED, FED, MED, SED) by function, power requirements, and routing capability
  • Design Thread networks with proper router placement for reliable coverage
  • Analyze the Border Router’s gateway functions including NAT64/DNS64 translation
  • Evaluate Thread network behavior using interactive visualization to predict failover outcomes

Thread networks consist of different device types, each with specific roles:

Diagram illustrating Thread Arch1
Figure 43.1: Complete Thread network architecture with Border Router, routers, REED, and end devices

Thread networks use a mesh architecture where devices cooperate to relay messages. Different devices play different roles: routers forward traffic, end devices sleep to save power, and border routers connect the Thread mesh to the wider internet. Understanding these roles helps you design efficient, reliable smart home networks.

Modern visualization of Thread network architecture showing the hierarchical relationship between Border Router connecting to cloud services, mesh routers forming the backbone, and various end device types including sleepy devices, emphasizing the self-healing mesh topology and IPv6-based addressing.

Thread Network Architecture
Figure 43.2: Thread network architecture with IPv6 mesh backbone

The Thread network architecture enables seamless connectivity from constrained IoT devices all the way to cloud services. The Border Router bridges between the Thread mesh (802.15.4 radio) and IP infrastructure (Wi-Fi/Ethernet), translating between the compact Thread packets and standard IPv6 traffic while maintaining end-to-end addressing.

Geometric representation of Thread mesh network topology showing interconnected router nodes with multiple redundant paths, demonstrating the self-healing capability where traffic automatically re-routes around failed nodes.

Thread Mesh Network
Figure 43.3: Thread mesh network with redundant routing paths

The mesh topology provides inherent reliability through path redundancy. If any router fails, the network automatically discovers alternative routes through neighboring routers, maintaining connectivity without manual intervention. This self-healing behavior is critical for smart home reliability.

43.2 Border Router (Thread-Wi-Fi Gateway)

Role: Connects Thread network to other IP networks (Wi-Fi, Ethernet, Internet)

Functions:

  • Routing: Routes packets between Thread network and external networks
  • NAT64: Translates IPv6 (Thread) ↔︎ IPv4 (Internet)
  • DNS64: DNS service for Thread devices
  • Service Discovery: Advertises network services
  • Firewall: Secures Thread network from external threats

Examples:

  • Google Nest Hub (2nd gen)
  • Apple HomePod mini
  • Amazon Echo (4th gen)
  • Dedicated Thread border routers

Requirements:

  • Two radios: Thread (802.15.4) + Wi-Fi/Ethernet
  • Always powered on (mains power)
  • Sufficient CPU/memory for routing

Geometric visualization of Thread Border Router architecture showing dual network interfaces (Thread radio and Wi-Fi/Ethernet), NAT64/DNS64 translation for IPv4 connectivity, multicast forwarding, and connection to cloud services through standard internet protocols

Thread Border Router
Figure 43.4: The Thread Border Router bridges Thread mesh networks to IP infrastructure. Multiple Border Routers can exist in one network for redundancy, each providing NAT64 translation for IPv4 cloud services and forwarding multicast discovery messages between Thread and Wi-Fi networks to enable seamless Matter commissioning.

43.3 Leader (Network Manager)

Role: Manages router ID assignment and network partition merging

Functions:

  • Router ID Assignment: Assigns 16-bit router IDs
  • Partition Management: Merges network partitions
  • Network Data Distribution: Maintains network configuration
  • Automatic Failover: If leader fails, new leader elected

Characteristics:

  • One per partition: Only one leader in connected network
  • Elected automatically: From routers using distributed algorithm
  • Transparent to applications: Leadership is invisible to apps
  • Dynamic: Leader can change if network topology changes

Important: Applications don’t need to know which device is leader

43.4 Router (Always-On Routing Devices)

Router (Always-On Routing Devices)

Role: Forward packets and provide routing services

Functions:

  • Packet Routing: Route packets between devices
  • End Device Parent: Serve as parent for end devices
  • Network Stability: Always on to maintain mesh
  • Leader Eligible: Can become leader if needed

Characteristics:

  • Always On: Never sleep (mains powered or large battery)
  • Limit: Maximum 32 routers per network
  • Automatic: Devices automatically promote/demote to maintain optimal count

Examples:

  • Smart light bulbs (mains powered)
  • Smart plugs
  • HVAC controllers
  • Mains-powered sensors

43.5 REED (Router-Eligible End Device)

REED (Router-Eligible End Device)

Role: End device that can be promoted to router if needed

Functions:

  • Normal Operation: Acts as end device
  • Automatic Promotion: Becomes router if network needs more routers
  • Network Optimization: Helps maintain optimal router count

Characteristics:

  • Conditional: Promoted only when needed
  • Flexible: Can be router or end device
  • Typically: Mains-powered devices

Example Scenario:

  • Start as REED (11 active routers in network)
  • If routers drop to < 16, REED promotes to router
  • If routers reach 32, router may demote to REED

43.6 FED (Full End Device)

FED (Full End Device)

Role: End device with full rx-on-when-idle capability

Functions:

  • Always Listening: Receiver always on (low latency)
  • Direct Communication: Can send/receive anytime
  • No Routing: Doesn’t forward packets for others

Characteristics:

  • Always On: Receiver enabled continuously
  • Higher Power: More power than sleepy devices
  • Faster Response: Low latency communication

Examples:

  • Mains-powered sensors requiring fast response
  • Security keypads
  • Smart displays

43.7 MED (Minimal End Device) & SED (Sleepy End Device)

MED (Minimal End Device) & SED (Sleepy End Device)

Role: Battery-powered devices that sleep to conserve power

Functions:

  • Poll for Messages: Wake periodically to poll parent router
  • Transmit When Needed: Wake, send data, return to sleep
  • Years on Battery: Ultra-low power consumption

Characteristics:

  • Sleep Cycle: Sleep 99%+ of time
  • Parent Router: Must have router parent to hold messages
  • Low Power: Optimized for battery life

Polling Intervals:

  • MED: Poll every few seconds (moderate latency)
  • SED: Poll every tens of seconds to minutes (higher latency)

Examples:

  • Door/window sensors
  • Motion sensors
  • Temperature sensors
  • Smart locks (battery powered)

43.8 Device Type Comparison

Type Always On Can Route Can Be Leader Power Use Case
Border Router Yes Yes Yes Mains Gateway to internet
Leader Yes Yes Yes Mains One per network (auto)
Router Yes Yes Yes Mains Mesh backbone
REED Yes If promoted If promoted Mains Flexible role
FED Yes No No Mains/Battery Low latency
MED/SED No (sleeps) No No Battery Ultra-low power

43.9 Interactive Thread Network Demo

Explore how Thread networks self-organize with different device roles. Adjust network size to see how routers form the mesh backbone, end devices attach to parents, and the leader coordinates the network. Simulate leader failure to watch automatic failover in action.

How to Use This Demo:

  1. Adjust Network Size: Slide to add/remove devices. Watch how routers form the mesh backbone.
  2. Change Router Ratio: Higher ratios mean more mains-powered devices that can route traffic.
  3. Simulate Leader Failure: Toggle to see automatic leader election.
  4. Show Link Quality: Toggle to see simulated link quality percentages.

Key Observations:

  • Orange node (Border Router) connects Thread mesh to Internet
  • Purple node (Leader) manages network state - any router can become leader
  • Teal nodes (Routers) form always-on mesh backbone
  • Blue nodes (REED) can become routers if needed
  • Dark/Gray nodes (SED/MED) are battery-powered end devices
  • Dashed circles indicate sleeping devices (power saving)

43.10 Knowledge Check

Q1: Which Thread device role serves as the gateway between the Thread mesh network and Wi-Fi/Internet?

  1. Leader
  2. Router
  3. Border Router
  4. REED

C) Border Router – The Border Router connects the Thread mesh (802.15.4 radio) to other IP networks (Wi-Fi or Ethernet), providing NAT64/DNS64 translation, service discovery, and firewall protection. It requires two radios: Thread and Wi-Fi/Ethernet.

43.11 Knowledge Check

Q2: What happens when a Thread Router that is parent to several SEDs loses power?

  1. The SEDs must be factory reset and re-commissioned
  2. The SEDs automatically search for and attach to a nearby router within 1-2 minutes
  3. The Leader reassigns the SEDs to new parents instantly
  4. The SEDs store all messages locally until the router returns

B) The SEDs automatically search for and attach to a nearby router within 1-2 minutes – When SEDs detect their parent is gone (polls fail), they enter orphan mode and scan for router advertisements (sent every ~32 seconds). They attach to the strongest available router autonomously, with no re-commissioning needed.

43.12 Worked Example: Designing a Thread Network for a Smart Home

Worked Example: Thread Network for a 3-Bedroom Apartment

Scenario: A homeowner wants to deploy Thread-based smart devices in a 90 m2 apartment: 12 light switches, 4 door/window sensors, 2 motion sensors, 3 temperature sensors, 1 smart lock, and 1 thermostat. They have a Google Nest Hub (Thread Border Router) in the living room.

Question: How many routers are needed, and how should devices be assigned roles?


Step 1: Categorize devices by power source

Device Count Power Source Best Thread Role
Light switches 12 Mains (wall wired) Router
Thermostat 1 Mains (24V HVAC) Router
Smart lock 1 4x AA batteries SED (1s poll)
Door/window sensors 4 CR2032 coin cell SED (10s poll)
Motion sensors 2 2x AA batteries SED (1s poll)
Temperature sensors 3 CR2032 coin cell SED (60s poll)
Total 23

Step 2: Determine router count

Thread recommends 1 router per ~5 end devices and ~8-10 meter spacing for reliable indoor mesh coverage. With 10 sleepy end devices and 13 mains-powered devices (all router-capable):

  • Needed routers: 10 SEDs / 5 = 2 minimum for child hosting
  • Available routers: 13 mains-powered devices (12 switches + 1 thermostat)
  • Active routers: Thread will self-select ~4-6 routers based on network needs
  • Remaining mains devices: Become REEDs (backup routers)

With 12 wall switches distributed across rooms, Thread will promote ~4-6 to Router status to provide mesh coverage. The rest remain as REEDs, ready to be promoted if a Router fails.

Step 3: Map the network topology

Living Room:              Bedroom 1:           Bedroom 2:          Kitchen:
  Nest Hub (BR)            Switch-B1 (R)        Switch-B2 (R)       Switch-K (REED)
  Switch-L1 (Router)       Door sensor (SED)    Door sensor (SED)   Temp sensor (SED)
  Switch-L2 (REED)         Motion (SED)         Temp sensor (SED)
  Temp sensor (SED)        Temp sensor (SED)
  Thermostat (Router)

Bathroom:                 Hallway:
  Switch-Ba (REED)         Switch-H (Router)
                           Lock (SED)
                           Motion (SED)
                           Door sensor x2 (SED)

Step 4: Verify coverage

With Routers in the living room, both bedrooms, and hallway, the maximum hop count from any SED to the Border Router is 2 hops. Thread supports up to 16 hops, so this is well within limits.

Step 5: Battery life estimates

Device Role Poll Interval Estimated Battery Life
Door/window sensor SED 10 seconds 3-5 years (CR2032)
Motion sensor SED 1 second 2-3 years (2x AA)
Temperature sensor SED 60 seconds 5-7 years (CR2032)
Smart lock SED 1 second 1-2 years (4x AA)

Key design decisions:

  1. Lock uses 1s poll interval: The smart lock needs to respond to unlock commands within ~1 second, requiring more frequent polling (shorter battery life trade-off)
  2. Temperature sensors use 60s poll: Temperature changes slowly – 60-second latency is acceptable, maximizing battery life
  3. Border Router placement: Central living room location minimizes hop count to all rooms
  4. Router distribution: At least one Router per room ensures every SED has a nearby parent
Connection: Thread Mesh meets Zigbee Mesh – Same Problem, Different Solutions

Thread and Zigbee both create 802.15.4 mesh networks, but their architectures differ fundamentally. Zigbee uses application-layer profiles (ZCL) with a proprietary network layer, requiring a Zigbee-specific hub. Thread uses IPv6 natively, meaning Thread devices have real IP addresses and can communicate directly with cloud services through a Border Router – no protocol translation needed. For new smart home deployments, Thread’s IP-native approach is simpler to integrate with modern cloud platforms. However, Zigbee’s 20+ years of deployed devices and mature ecosystem means many existing products remain Zigbee-only. Matter solves this by supporting both Thread and Wi-Fi as transport layers with a unified application layer. See Matter Overview for how Matter bridges these ecosystems.

43.13 How It Works: Thread Device Role Selection and Promotion

How It Works: Automatic Role Assignment

Thread devices automatically determine their role in the network based on capabilities and network needs:

Role Selection Criteria (Device Join Process):

  1. Device Capabilities (configured in firmware):
    • mRxOnWhenIdle = true → Can be Router/FED (receiver always on)
    • mRxOnWhenIdle = false → Must be MED/SED (sleeps to save battery)
    • mDeviceMode flags specify router-eligible, secure, full/minimal network data
  2. Power Source (primary factor):
    • Mains-powered: Device marks itself as Router-capable
    • Battery-powered: Device marks itself as End Device (SED/MED)
  3. Network State (Leader decides):
    • Current router count < 32 → Promote capable device to Router
    • Router count = 32 → Capable device becomes REED (reserve)
    • Network stressed (high hop counts) → Promote REEDs to Routers
    • Network stable (good coverage) → Keep REEDs as End Devices

Router Promotion Sequence:

Step 1: Mains-powered device joins as child (End Device)

Device → MLE Parent Request
Router → MLE Parent Response (you're my child, Child ID = 0x05)
Device receives RLOC16: 0x2005 (Router 0x20, Child 0x05)

Step 2: Device announces router capability

Device → MLE Child Update Request (includes router-capable flag)
Parent → Forwards to Leader

Step 3: Leader evaluates network needs

Leader checks:
- Current router count: 18/32 (slots available)
- Average hop count: 2.8 (acceptable)
- Parent router child count: 15 (high, could use more routers)
Decision: Promote device to Router

Thread’s router density calculation balances area coverage with child device capacity. The minimum router count formula combines geometric coverage with the child-per-router ratio:

\[ \text{Min Routers} = \max\left(\left\lceil \frac{\text{Area}}{\pi r^2} \right\rceil, \left\lceil \frac{N_{\text{devices}}}{C_{\text{max}}} \right\rceil\right) \]

For a 200 m² home with 15m router range and 60 end devices (child capacity \(C_{\text{max}} = 8\)):

\[ \text{Coverage:} \quad \left\lceil \frac{200}{\pi \times 15^2} \right\rceil = \left\lceil \frac{200}{706.9} \right\rceil = 1 \text{ router} \] \[ \text{Capacity:} \quad \left\lceil \frac{60}{8} \right\rceil = 8 \text{ routers} \] \[ \text{Min Routers} = \max(1, 8) = 8 \text{ routers (capacity-limited)} \]

Add 2× redundancy factor for reliability: \(8 \times 2 = 16\) routers recommended. This ensures no single router failure leaves devices orphaned.

Step 4: Leader sends promotion

Leader → MLE Router Promotion (to device)
Message includes: New Router ID (0x14, available slot)

Step 5: Device becomes Router

Device updates RLOC16: 0x2005 → 0x5000 (Router 0x14, now a parent not child)
Device sends MLE Advertisement (announces router status to network)
Other devices can now select this device as parent

REED Holding Pattern (Router Count = 32): - Device joins as REED (Router-Eligible End Device) - Acts like End Device but monitors network health - If any Router fails/leaves → REED automatically promoted - No user intervention needed (self-healing)

Demotion (Rare): - If router has zero children and network is over-populated (>24 routers) - Leader may demote router to REED to reduce routing overhead - Router gracefully transitions children to other routers first

43.14 Try It Yourself: Thread Network Role Planning Exercise

Scenario: You’re planning a Thread network for a 3-bedroom apartment with these devices:

Mains-Powered Devices (Always-on power source): - 12 smart light bulbs (living room, bedrooms, kitchen, bathrooms) - 6 smart plugs (TV, coffee maker, lamp, desk, fan, charger) - 1 HomePod Mini (Border Router + potential Leader)

Battery-Powered Devices:

  • 8 door/window sensors (front, back, bedrooms, windows) - CR2032 batteries
  • 4 motion sensors (hallways, bathrooms) - 2× AA batteries
  • 3 temperature sensors (living room, bedrooms) - 2× AA batteries
  • 2 leak detectors (bathroom, kitchen) - CR2450 batteries
  • 1 smart lock (front door) - 4× AA batteries

Your Tasks:

  1. Assign Initial Roles:
    • How many devices can be Routers? (Hint: only mains-powered devices)
    • Mains-powered count: 12 bulbs + 6 plugs + 1 HomePod = 19 devices
    • Can all 19 be Routers simultaneously? (Hint: Thread router limit is 32)
    • Answer: Yes, 19 < 32, all can be Routers
  2. Determine REED Status:
    • Do any mains-powered devices become REEDs initially?
    • Answer: No, because 19 < 32, all join as Routers
    • If you add 15 more smart bulbs (total 34 mains devices), what happens?
    • Answer: First 32 become Routers, 2 become REEDs (reserve pool)
  3. Battery Device Configuration:
    • Which battery devices should be SEDs (Sleepy, long poll intervals)?
    • Answer: Door sensors (wake on open + 60s poll), leak detectors (wake on water + 120s poll), temperature sensors (300s poll)
    • Which should be MEDs (Medium, shorter polls)?
    • Answer: Motion sensors (10-30s poll for timely light automation)
    • Which should be FEDs (Full, always-listening)?
    • Answer: Smart lock (instant response required, can tolerate battery drain with 4× AA)
  4. Calculate Network Capacity:
    • Total devices: 19 mains + 18 battery = 37 devices
    • Thread limit: 250 devices
    • Remaining capacity: 250 - 37 = 213 devices (585% growth possible)
    • Can you expand to 100 devices without hitting limits?
    • Answer: Yes, well within 250-device limit
  5. Mesh Coverage Analysis:
    • Assume 40-foot (12m) range per Router
    • 19 Routers distributed across 1,200 sq ft apartment
    • Coverage calculation: 1,200 / 19 = 63 sq ft per Router (very dense)
    • Maximum hop count estimate: 2-3 hops (excellent coverage)
    • Do you need all 19 Routers for coverage?
    • Answer: No, 10-12 would suffice, but excess routers provide redundancy

Design Output Template:

Thread Network Plan:
├── Border Router: HomePod Mini (Leader candidate, high weighting)
├── Routers (18 devices):
│   ├── Smart Bulbs (12): Always-on mesh backbone
│   └── Smart Plugs (6): Strategic placement for coverage
├── FEDs (1 device):
│   └── Smart Lock: Always-listening for instant response
├── MEDs (4 devices):
│   └── Motion Sensors: 10-30s poll for timely automation
├── SEDs (13 devices):
│   ├── Door/Window Sensors: 60s poll + wake-on-open
│   ├── Temperature Sensors: 300s poll (low latency needs)
│   └── Leak Detectors: 120s poll + wake-on-water
└── REEDs (0 devices):
    └── None (router count <32)

Network Metrics:
- Total devices: 37
- Routers: 19/32 (59% of limit, 13 slots free for expansion)
- Average hop count: 2-3 (estimated)
- Coverage: Excellent (19 routers for 1,200 sq ft)
- Battery life: SEDs 7-10 years, MEDs 1-2 years, FED 6-12 months

What to Observe:

  • Only mains-powered devices can be Routers
  • Battery devices choose SED/MED/FED based on latency needs
  • 32-router limit rarely reached in homes (typical: 10-20 routers)
  • Dense router distribution provides redundancy, not just coverage

43.15 Concept Check

43.16 Concept Relationships

Concept Relationship Connected Concept
Border Router Also Acts As Router and potential Leader (dual role)
Leader Election Based On Weighting formula (prefers Border Router for internet access)
REED (Router Eligible) Promotes To Router when vacancy occurs (automatic failover)
SED Poll Interval Balances Battery life (longer poll) vs latency (shorter poll)
Router Count Limit (32) Constrains Network topology and mesh density

43.17 See Also

43.18 Summary

This chapter covered Thread network architecture and device roles:

  • Border Router: Gateway between Thread mesh and Wi-Fi/Internet, provides NAT64/DNS64
  • Leader: Network coordinator elected from routers, manages partition state
  • Router: Always-on mesh backbone, forwards packets, can host end devices
  • REED: Can be promoted to router when network needs more routing capacity
  • FED: Always-listening end device for low-latency applications
  • MED/SED: Battery-powered devices that sleep to conserve power

::

::

Key Concepts

  • Thread Router: A full-function Thread device that can relay messages between other nodes; always-on, not battery-powered; participates in routing table management.
  • Thread End Device: A minimal Thread device that communicates only with its parent router; can be sleepy (SED) for battery conservation.
  • Leader: The Thread device responsible for managing router assignments, network data distribution, and partitioning decisions; elected automatically.
  • Border Router: A Thread device with two network interfaces (Thread mesh + IP backbone) that bridges the Thread mesh to Wi-Fi/Ethernet infrastructure.
  • REED (Router-Eligible End Device): An end device capable of becoming a router if the network needs more routing capacity; upgrades when there are fewer than 16 routers.
  • SED (Sleepy End Device): A Thread end device that powers down its radio most of the time and wakes periodically to poll its parent for queued messages; maximizes battery life.

43.19 Knowledge Check

43.20 What’s Next

Next Topic Description
Thread Operation and Implementation Network formation, MLE protocol, and how devices join and maintain the mesh
Thread Deployment Guide Real-world deployment examples, common pitfalls, and best practices
Thread Security and Matter Secure commissioning, network credentials, and Matter integration
Thread Review: Topology and Roles Detailed role selection decision tree and topology review exercises
Matter Overview How Matter uses Thread as a transport layer with a unified application protocol