Network topology defines both the physical arrangement of devices and the logical flow of data between them — and these two views often differ. Topology choice directly determines fault tolerance, scalability, latency, and cost: star topologies offer simplicity with a single point of failure, while mesh topologies provide resilience at the cost of complexity. Most real-world IoT deployments use hybrid approaches.
4.1 Learning Objectives
By the end of this chapter series, you will be able to:
Differentiate Physical and Logical Topologies: Distinguish between physical device layout and logical data flow in a network
Classify Topology Types: Categorize star, bus, ring, mesh, and tree configurations by their structural properties
Interpret Network Diagrams: Analyze logical topology symbols and conventions to extract connectivity information
Design IoT Networks: Construct topology plans that meet specific IoT deployment requirements
Create Network Documentation: Produce physical and logical network diagrams following industry conventions
Evaluate Topology Trade-offs: Justify topology selection based on fault tolerance, cost, and scalability criteria
For Beginners: Network Topologies
A topology is simply the map of how devices in a network are connected to each other. Just like roads connecting cities, the pattern of connections determines how quickly data can travel, what happens when a link breaks, and how easy it is to add new devices. This chapter introduces the fundamental patterns used in IoT.
4.2 Prerequisites
Before diving into this chapter, you should be familiar with:
Networking Basics: Understanding fundamental networking concepts including network devices (routers, switches, hubs), connection types, and basic network design principles provides the foundation for topology concepts
Layered Network Models: Knowledge of the OSI model helps you understand how topologies relate to different network layers and why physical and logical topologies can differ
Basic IoT device types: Familiarity with sensors, actuators, gateways, and their communication needs helps you appreciate which topologies work best for different IoT deployment scenarios
Cross-Hub Connections
This chapter connects to multiple learning hubs for deeper exploration:
Simulations Hub: Try the Interactive Network Topology Visualizer (included in this chapter) to experiment with star, mesh, tree, and hybrid topologies. Compare metrics like latency, fault tolerance, and cost trade-offs in real-time.
Videos Hub: Watch visual explanations of physical vs logical topologies, mesh self-healing demonstrations, and real-world IoT topology deployments in smart cities and industrial environments.
Quizzes Hub: Test your understanding with scenario-based questions on topology selection for different IoT applications (smart homes, factories, campuses). Includes Understanding Checks for smart factory and smart city streetlight scenarios.
Knowledge Gaps Hub: Address common misconceptions about mesh complexity, star reliability, and the physical vs logical topology confusion that causes deployment failures.
MVU: Minimum Viable Understanding
Core concept: Network topology defines both the physical arrangement of devices and cables AND the logical flow of data between nodes — and these two views often differ.
Why it matters: Topology choice determines fault tolerance, scalability, latency, and cost. A star topology is simple but has a single point of failure; a mesh topology is resilient but complex to manage.
Key takeaway: For most IoT deployments, choose star topology for simplicity (WiFi, LoRaWAN) or mesh topology for reliability (Zigbee, Thread). Understand failure modes before deployment.
4.3 Chapter Overview
This chapter has been organized into focused sections for easier learning. Work through them in order, or jump to the topic most relevant to your current needs:
Learn the fundamentals of network topology, including the critical distinction between physical and logical views. This section includes kid-friendly Sensor Squad explanations and beginner-level analogies.
Understand the subtle but critical differences between physical cable layout and logical data flow. Includes the Smart Office example showing how physical star can be logical bus.
Interactive OJS-based network topology visualizer. Build star, mesh, tree, and hybrid networks and see real-time metrics for latency, fault tolerance, and cost.
Build and compare network topologies using ESP32 microcontrollers in the Wokwi simulator. Implement star, mesh, and hybrid topologies with working code.
ESP32 topology simulator setup
Star topology implementation
Mesh topology implementation
Challenge exercises
4.4 Quick Reference: Topology Selection
Topology
Best For
Fault Tolerance
Cost
Scalability
Star
Simple deployments, WiFi, LoRaWAN
Low (hub failure = all down)
Low
Medium
Mesh
Smart homes, Zigbee, Thread
High (self-healing)
Medium
High
Tree
Multi-floor buildings, campuses
Medium
Medium
High
Ring
Legacy industrial, fiber backbone
Low (dual-ring improves)
Medium
Low
Bus
CAN bus, legacy Ethernet
Low
Very Low
Low
Putting Numbers to It
Network diameter determines worst-case latency between any two nodes.
For a star topology with \(n\) devices: \[\text{Diameter} = 2 \text{ hops}\]
Any device-to-device communication goes through the hub: Device A → Hub → Device B. This is constant regardless of \(n\).
For a bidirectional ring topology (packets can travel either direction): \[\text{Diameter} = \left\lfloor \frac{n}{2} \right\rfloor \text{ hops}\]
With 20 nodes in a bidirectional ring, the maximum path length is 10 hops (halfway around the circle). A unidirectional ring has diameter \(n-1\) hops (worst case traverses almost the full ring).
For a binary tree of height \(h\) (where \(h\) is the number of edges from root to deepest leaf): \[\text{Diameter} = 2h\]
A tree of height 4 (5 levels: root at level 0 through leaves at level 4) has diameter \(2 \times 4 = 8\) hops (leaf to root to opposite leaf). This explains why deep tree topologies introduce latency — every hop adds ~5-10 ms in typical low-power IoT networks.
Try It: Network Diameter Calculator
Show code
viewof topoType = Inputs.select( ["Star","Bidirectional Ring","Unidirectional Ring","Binary Tree"], { label:"Topology type",value:"Star" })viewof nodeCount = Inputs.range([3,100], {label:"Number of nodes (n)",step:1,value:20})viewof treeHeight = Inputs.range([1,8], {label:"Tree height h (for Binary Tree only)",step:1,value:4})
Show code
{const n = nodeCount;const h = treeHeight;let diameter, formula, explanation;if (topoType ==="Star") { diameter =2; formula ="Diameter = 2 hops (constant, regardless of n)"; explanation =`With ${n} devices, any communication goes: Device → Hub → Device. Always 2 hops.`; } elseif (topoType ==="Bidirectional Ring") { diameter =Math.floor(n /2); formula =`Diameter = ⌊n/2⌋ = ⌊${n}/2⌋ = ${diameter} hops`; explanation =`With ${n} nodes, the worst-case path is halfway around the ring (${diameter} hops).`; } elseif (topoType ==="Unidirectional Ring") { diameter = n -1; formula =`Diameter = n − 1 = ${n} − 1 = ${diameter} hops`; explanation =`With ${n} nodes and one-way traffic, the worst case traverses almost the full ring (${diameter} hops).`; } else {// Binary Tree diameter =2* h;const levels = h +1;const maxNodes =Math.pow(2, h +1) -1; formula =`Diameter = 2h = 2 × ${h} = ${diameter} hops`; explanation =`A tree of height ${h} (${levels} levels, up to ${maxNodes} nodes) has a worst-case path of ${diameter} hops from one leaf, up to the root, and down to the opposite leaf.`; }const latencyLow = diameter *5;const latencyHigh = diameter *10;const colors = {"Star":"#16A085","Bidirectional Ring":"#E67E22","Unidirectional Ring":"#E74C3C","Binary Tree":"#3498DB" };const barColor = colors[topoType];return htl.html` <div style="font-family: Arial, sans-serif; padding: 16px; border-left: 4px solid ${barColor}; background: #f8f9fa; border-radius: 4px; margin-top: 8px;"> <div style="font-size: 1.1em; font-weight: bold; color: #2C3E50; margin-bottom: 8px;">${topoType} — Diameter Result </div> <div style="font-size: 1.6em; color: ${barColor}; font-weight: bold; margin-bottom: 6px;">${diameter} hop${diameter !==1?"s":""} </div> <div style="color: #555; font-size: 0.95em; margin-bottom: 6px;"> <strong>Formula:</strong> ${formula} </div> <div style="color: #555; font-size: 0.9em; margin-bottom: 10px;">${explanation} </div> <div style="color: #7F8C8D; font-size: 0.88em; border-top: 1px solid #ddd; padding-top: 8px;"> <strong>Estimated worst-case latency</strong> (at ~5–10 ms/hop for low-power IoT): <strong style="color: #2C3E50;">${latencyLow}–${latencyHigh} ms</strong> </div> </div> `;}
Key Concepts
Physical Topology: The actual physical arrangement of network devices, cables, and connection points - like a floor plan showing where equipment is located
Logical Topology: How data flows through the network, regardless of physical layout - like an org chart showing communication paths
Star Topology: All devices connect to a central hub; easy to manage but hub failure disables entire network
Mesh Topology: Devices connect to multiple neighbors; self-healing but more complex and expensive
Hybrid Topology: Combination of multiple topology types (e.g., star-mesh) to balance trade-offs
Single Point of Failure: A component whose failure causes the entire network to fail (e.g., hub in star topology)
4.5 Knowledge Check
Quiz: Network Topologies Fundamentals
Decision Framework: Topology Selection for Battery-Powered IoT
When choosing a topology for battery-powered IoT sensors, use this decision framework to balance battery life, range, and reliability:
Decision Factor
Star Topology
Mesh Topology
Recommendation
Device Count
Scales to thousands (LoRaWAN) or ~50 (Wi-Fi AP)
10-500 routing nodes per cluster
Star scales with gateway capacity; mesh limited by routing table size
Coverage Area
Within gateway range (100m Wi-Fi; up to 15km LoRaWAN)
Beyond single-hop range of any single gateway
Star if one gateway reaches all; mesh otherwise
Battery Life Priority
5-10 years possible
1-3 years typical
Star: no routing overhead extends battery life 3-5x
Routing Overhead
Minimal (direct to gateway; no relay)
10-30% bandwidth for route discovery + always-on listening for routers
Star eliminates relay routing; mesh routers cannot sleep
Reliability Requirement
Hub SPOF acceptable
Self-healing required
Mesh if gateway downtime unacceptable
Installation Complexity
Very low
Moderate to high
Star: plug-and-play; Mesh: routing config needed
Cost per Node
$15-30 (simple radio)
$40-80 (routing capable)
Star: 50-60% lower hardware cost
Failure Impact
Gateway down = all down
Node down = self-heals
Star acceptable for non-critical; mesh for critical
Bandwidth Efficiency
High (no relay overhead)
60-80% (routing overhead consumes 20-40%)
Star: each node’s channel used only for its own data
Zigbee building automation (2-year battery, multi-hop coverage)
Match protocol to requirement
Decision Rules:
If battery life > 3 years is required: Choose star topology (e.g., LoRaWAN). Mesh routing overhead typically reduces battery life from 5-10 years to 1-3 years.
If single gateway cannot reach all devices: Choose mesh topology. Multi-hop routing extends coverage 5-10x beyond single-hop range.
If network must survive node failures: Choose mesh topology with at least 3 connections per node. Star’s gateway SPOF means zero fault tolerance.
If minimizing cost is priority: Choose star topology. Simpler hardware ($15-30/node vs $40-80/node for mesh-capable) and no routing protocol license fees.
If rapid deployment needed: Choose star topology. Mesh requires site survey, neighbor discovery tuning, and routing protocol configuration.
Example Application: Smart agriculture soil moisture monitoring across 100-acre farm - Requirement: 200 sensors, 10-year battery life, $50/sensor budget - Coverage: ~640m × 640m area (0.4 km²) - Decision: Star topology with 2-3 LoRaWAN gateways - Reasoning: Battery life requirement eliminates mesh (routing overhead). LoRaWAN’s 2-15km range covers farm with 2-3 gateways. Total cost: 200 sensors × $25 + 3 gateways × $500 = $6,500 (vs $16,000 for mesh-capable sensors).
Try It: Star vs. Mesh Cost and Battery Life Estimator
Order: Steps to Select and Deploy an IoT Network Topology
4.6 Concept Relationships
Understanding network topologies connects to several key IoT concepts:
Foundation Concepts (what you need first): - Networking Basics - Switches, routers, and hubs form the building blocks of topology implementations - Layered Network Models - Physical topology maps to Layer 1, logical topology spans Layers 2-3
Related Concepts (concepts at the same level): - Network Mechanisms - Packet switching behavior differs by topology (broadcast in bus vs switched in star) - Routing Fundamentals - Routing protocols adapt to topology type (reactive/proactive in mesh, centralized in star)
Advanced Concepts (where this leads): - Zigbee Architecture - Implements mesh topology with AODVjr (simplified AODV) routing - RPL Fundamentals - Routing protocol for low-power lossy networks that builds a directed acyclic graph (DODAG) resembling a tree - WSN Architectures - Wireless sensor network topologies combine multiple patterns
Cross-Cutting Concepts:
Power Management: Star topology enables sensor sleep (no routing), mesh requires always-listening routers
Fault Tolerance: Mesh provides self-healing, star creates single point of failure
1. Skipping Topology Planning for “Small” Deployments
A 10-node deployment that starts with an ad-hoc wiring plan becomes a maintenance nightmare when it grows to 100 nodes. Fix: always document the topology design even for small deployments; it costs nothing and saves hours later.
2. Not Documenting the Difference Between Planned and Actual Topology
Planned: star with 5 nodes. Actual after 6 months: star with 23 nodes and 3 rogue access points. Fix: maintain a living topology diagram updated whenever devices are added, moved, or removed.
3. Choosing Topology Based on What Was Taught, Not What Is Required
Beginners often default to star because it is the first topology covered in coursework. Fix: systematically evaluate at least two topology options before selecting one.