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.
Sensor Squad: Meet the Thread Neighborhood
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:
Figure 43.1: Complete Thread network architecture with Border Router, routers, REED, and end devices
For Beginners: Thread Network Architecture
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.
Alternative Views: Thread Network Architecture Visualizations
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.
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
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
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
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
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.
Q1: Which Thread device role serves as the gateway between the Thread mesh network and Wi-Fi/Internet?
Leader
Router
Border Router
REED
Answer
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?
The SEDs must be factory reset and re-commissioned
The SEDs automatically search for and attach to a nearby router within 1-2 minutes
The Leader reassigns the SEDs to new parents instantly
The SEDs store all messages locally until the router returns
Answer
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.
Interactive: Thread DODAG Construction with RPL Animation
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):
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.
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:
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)
Temperature sensors use 60s poll: Temperature changes slowly – 60-second latency is acceptable, maximizing battery life
Border Router placement: Central living room location minimizes hop count to all rooms
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):
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
Power Source (primary factor):
Mains-powered: Device marks itself as Router-capable
Battery-powered: Device marks itself as End Device (SED/MED)
Network State (Leader decides):
Current router count < 32 → Promote capable device to Router
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
Putting Numbers to It
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:
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
Try It Yourself: Design Device Role Distribution
Scenario: You’re planning a Thread network for a 3-bedroom apartment with these devices:
Thread Security - Secure commissioning and network credentials
Zigbee Architecture - Comparison with Zigbee coordinator/router/end device roles
🏷️ Label the Diagram
Code Challenge
Order the Steps
Match the Concepts
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.