783 Network Topologies: Design Analysis
This chapter focuses on analyzing network topology designs:
- We examine network diameter and its impact on latency
- You will learn protocol-topology matching for IoT systems
- We analyze physical vs logical topology differences
Review Topology Comparison and Trade-offs first if needed.
783.1 Learning Objectives
By the end of this chapter, you will be able to:
- Calculate Network Diameter: Understand how diameter affects latency and performance
- Match Protocols to Topologies: Identify which protocols use which topology types
- Distinguish Physical from Logical: Understand when these differ and why it matters
- Analyze Failure Scenarios: Evaluate how different topologies respond to node failures
783.2 Prerequisites
Required Chapters: - Topologies Comparison - Topology trade-offs - Topologies Fundamentals - Core concepts
Estimated Time: 25 minutes
783.3 Network Diameter Analysis
Two topologies both have 20 nodes. Topology A (star) has diameter=2, Topology B (line) has diameter=19. How does this affect IoT performance?
A) No significant difference B) Topology A has better latency (fewer hops) C) Topology B has better scalability D) Topology A has more redundancy
Show Answer
Answer: B) Topology A has better latency (fewer hops)
Network Diameter Explained: - Diameter = Maximum shortest path between any two nodes - Topology A (Star): Diameter = 2 - Any device -> Central hub -> Any other device - Maximum 2 hops for any communication - Topology B (Line): Diameter = 19 - Node1 to Node20 requires 19 hops - Messages traverse entire line
Latency Impact:
# Assume 10ms latency per hop
latency_per_hop = 10 # ms
# Topology A (Star)
max_latency_A = 2 * latency_per_hop = 20ms
# Topology B (Line)
max_latency_B = 19 * latency_per_hop = 190ms
# Topology A is 9.5x faster!IoT Implications: - Low diameter = Fast communication (critical for real-time control) - High diameter = Slow propagation (problematic for time-sensitive data) - Battery impact: More hops = more energy consumption - Reliability: Longer paths = more failure points
Topology selection: - Real-time control -> Low diameter (star, partial mesh) - Periodic sensing -> Diameter less critical (line, tree acceptable)783.4 Protocol-Topology Matching
Which IoT protocol automatically forms a mesh topology and self-heals when nodes fail?
A) Wi-Fi B) Bluetooth Classic C) Zigbee D) LoRaWAN (Class A)
Show Answer
Answer: C) Zigbee
Zigbee Mesh Features:
# Zigbee network formation
class ZigbeeNode:
def __init__(self, node_type):
# Router nodes can relay
# End devices cannot relay
self.can_route = (node_type in ['coordinator', 'router'])
def form_mesh(self):
"""
Zigbee automatically:
1. Discovers neighbors
2. Forms mesh connections
3. Calculates routing tables
4. Self-heals when nodes fail
"""
pass
# Example Zigbee network
# Coordinator creates network
# Routers join and form mesh
# End devices connect to nearest router
# If router fails, devices rejoin via alternate pathWhy others don’t:
Wi-Fi: - Star topology (all devices -> Access Point) - No mesh in standard Wi-Fi (Wi-Fi Mesh is separate standard)
Bluetooth Classic: - Piconet topology (1 master, up to 7 slaves) - No mesh (Bluetooth Mesh is separate specification)
LoRaWAN Class A: - Star-of-stars topology - Devices -> Gateway -> Network Server - No mesh routing between devices
Zigbee advantages: - Automatic mesh formation - Self-healing (nodes reroute around failures) - Range extension (messages hop through routers) - No infrastructure (unlike Wi-Fi AP)
Use cases: - Smart home lighting (devices relay for each other) - Industrial sensors (redundant paths) - Building automation (self-healing network)783.5 Physical vs Logical Topology
783.5.1 Knowledge Check
Test your understanding of network topology concepts with these scenario-based questions:
Question 3: A smart factory has 50 temperature sensors physically distributed across the factory floor in a grid pattern, all connecting wirelessly to a central gateway. What are the physical and logical topologies?
Explanation: Physical topology shows actual device placement - sensors are physically distributed in a grid pattern across the factory floor. Logical topology shows communication paths - all sensors connect directly to the central gateway (star pattern). This is a common scenario where physical and logical topologies differ: - Physical: Grid/distributed (based on sensor locations for coverage) - Logical: Star (all communication flows through gateway hub)
Key insight: Physical topology is about “where devices are,” logical topology is about “how devices communicate.” In wireless IoT, physical layout often differs from logical connectivity. The same network could have physical topology showing sensor locations on a floor plan, while logical topology shows simplified star diagram with gateway at center.
783.6 Mesh Self-Healing Analysis
Question 4: A smart building has 100 Zigbee devices forming a mesh network with 20 routers (mains-powered) and 80 end devices (battery-powered sensors). One router fails. What happens?
Explanation: Mesh topology’s key advantage is redundancy and self-healing:
- Before failure: End devices connected to Router A
- Router A fails: Devices detect missing beacons/ACKs
- Self-healing: Devices perform neighbor discovery, find Router B as alternate parent
- Automatic recovery: Route update messages propagate through mesh
- Network continues: No manual intervention needed
Mesh resilience: - Multiple paths: Each device can reach coordinator via multiple routers - No single point of failure (except coordinator, which should be highly reliable) - Recovery time: Typically 10-60 seconds depending on protocol (Zigbee, Thread, etc.)
Comparison to star: In star topology, hub failure = total network failure. Mesh distributes routing responsibility across multiple routers, so single router failure affects only its direct children temporarily.
Practical impact: Smart buildings with 20 routers can tolerate 2-3 simultaneous router failures and maintain connectivity.
783.7 Switch vs Hub Topology
Question 5: An industrial facility uses wired Ethernet in a physical star topology with all devices connecting to a central switch. The switch forwards data between devices. What is the logical topology?
Explanation: Modern Ethernet switches create logical star topology:
Physical topology: Star (all cables radiate from central switch)
Logical topology: Also star because: - Switch maintains MAC address table (knows which device on which port) - Unicast traffic: Switch forwards packets only to destination port (point-to-point) - No shared medium: Device A -> Switch -> Device B (isolated communication) - Switch acts as intelligent hub (layer 2 forwarding)
Historical note: Old Ethernet hubs created: - Physical: Star (cables to hub) - Logical: Bus (hub broadcasts to all ports, shared collision domain)
Key difference: - Hub (logical bus): Packet to Device A seen by all devices (security/performance issue) - Switch (logical star): Packet to Device A only goes to A’s port (isolated)
IoT impact: Industrial IoT uses switched Ethernet for deterministic, collision-free communication. Each sensor gets dedicated bandwidth. Star topology also simplifies troubleshooting - unplug one device without affecting others.
783.8 LoRaWAN Star Architecture
Question 6: A parking lot has 200 parking spot sensors connected via LoRaWAN. Sensors transmit parking status to a single gateway 500 meters away. What topology is this, and what is the main limitation?
Explanation: LoRaWAN uses star topology (also called hub-and-spoke):
Architecture: - All 200 sensors communicate directly with gateway (no peer-to-peer) - Long range (500m+) enables single-hop communication - Gateway forwards data to network server (cloud)
Main limitation - Gateway as bottleneck: 1. Single point of failure: Gateway down = all 200 sensors offline 2. Scalability: Gateway has limited capacity (duty cycle, processing power) - LoRa duty cycle restrictions: ~1% (36s per hour) - With 200 sensors sending every 10 min: 200 x 6 messages/hour = 1200 messages - Each message ~2s airtime = 2400s required, but only 2160s allowed (60 min) 3. No redundancy: Can’t route around gateway failure
Solutions: - Multiple gateways for redundancy (sensors can reach multiple gateways) - Careful duty cycle planning: Reduce update frequency or stagger transmissions - Gateway load balancing: Distribute sensors across multiple gateways
Why not mesh: LoRaWAN uses star because: - Long range makes direct gateway connectivity feasible - Battery life: No routing overhead (don’t relay others’ messages) - Simplicity: No routing protocol complexity
Comparison: Zigbee mesh (short range, multi-hop) vs LoRaWAN star (long range, single-hop).
783.9 Bus Topology Failure Analysis
Question 7: A bus topology network has 30 devices sharing a single coaxial cable. What happens if the cable is cut in the middle?
Explanation: Bus topology requires proper termination at both ends to prevent signal reflections:
Normal operation:
[Terminator]--[Device A]--[Device B]--[Device C]--[Terminator]
| | | | |
Absorbs Taps Taps Taps Absorbs
signal signal signal signal signal
Cable cut scenario:
[Terminator]--[Device A]--[Device B]--X BREAK X--[Device C]--[Terminator]
Result: Both segments fail because: 1. Left segment: Has terminator on left, but open circuit on right -> signal reflects back 2. Right segment: Open circuit on left, terminator on right -> signal reflects back 3. Signal reflections: Corrupt data, cause collisions, prevent communication 4. Total failure: Neither segment can communicate (even devices on same segment)
Recovery: Requires: - Repair cable break, OR - Add terminators at both break points to create two separate bus networks
Why bus topology is rare in modern IoT: - Single point of failure (any cable break kills network) - Difficult troubleshooting (where is the break?) - No redundancy - Limited scalability
Modern alternative: Star topology with switch (cable break only affects one device).
Historical use: Ethernet 10BASE-2 (coaxial bus) replaced by 10BASE-T (twisted pair star).
783.10 Token Ring Latency
Question 8: A ring topology network uses token passing for media access control. 10 devices need to transmit. What is the average wait time if token circulation takes 10ms?
Explanation: Token ring uses sequential access:
Token circulation: - Token travels around ring: Device 1 -> 2 -> 3 -> … -> 10 -> 1 - Full circulation time: 10ms (given) - Only device with token can transmit
Wait time calculation: - Best case: Device just received token = 0ms wait - Worst case: Token just passed by = must wait full 10ms circulation - Average case: Token is halfway around ring = 10ms / 2 = 5ms
With 10 devices and 10ms full circulation: - Per-device time: 10ms / 10 = 1ms each - Device 1: Gets token immediately = 0ms wait - Device 5: Waits for token to pass devices 1-4 = 4ms - Device 10: Waits for devices 1-9 = 9ms - Average: (0 + 1 + 2 + … + 9) / 10 = 45/10 = 4.5ms ~ 5ms
When “10 devices all need to transmit”: - Each must wait for token to reach them - Average wait: 10ms / 2 = 5ms per device - If all want to transmit, they queue up - Average device is at position 5 out of 10 - Wait time: (10 devices x 10ms/round) / 2 = 50ms
This assumes 10ms is the circulation time when devices are transmitting, not idle circulation.
783.11 Star vs Mesh Selection
Question 9: When would you choose star topology over mesh topology for an IoT deployment?
Explanation: Star vs Mesh trade-offs:
Star topology advantages (when to choose): - Direct range: All devices within 1-hop of gateway (Wi-Fi, LoRaWAN) - Simplicity: No routing protocol, easier troubleshooting - Low cost: Devices don’t need routing capability (cheaper hardware) - Many-to-one traffic: Sensors -> Gateway is natural flow - Battery life: No routing overhead (don’t relay others’ messages)
Mesh topology advantages (when to choose): - Extended range: Multi-hop routing covers large areas (Zigbee, Thread) - Redundancy: Multiple paths, survives node failures - Peer-to-peer: Direct device-to-device communication - Scalability: Add nodes incrementally, extend coverage
Decision matrix: | Requirement | Star | Mesh | |————-|——|——| | All devices <100m from gateway | Yes | No (unnecessary) | | Area >500m, need multi-hop | No | Yes | | Primarily sensor -> cloud | Yes | Overkill | | Frequent sensor <-> sensor | No | Yes | | Maximize battery life | Yes | No (routing drains) | | Survive node failures | No (gateway SPOF) | Yes | | Minimize cost | Yes | No (routers cost more) |
Real-world examples: - Star: LoRaWAN parking sensors, Wi-Fi smart home (gateway range sufficient) - Mesh: Zigbee building automation, Thread smart home (need multi-hop coverage)
783.12 Summary
- Network diameter directly impacts latency - star topology (diameter 2) is 9.5x faster than line topology (diameter 19) for 20 nodes
- Zigbee automatically forms self-healing mesh networks, while Wi-Fi, Bluetooth Classic, and LoRaWAN use star topologies
- Physical vs logical topology often differ - sensors physically distributed in grid can logically form star to central gateway
- Mesh self-healing allows automatic recovery within 10-60 seconds when routers fail
- Ethernet switches create logical star (isolated ports), unlike hubs which create logical bus (shared medium)
- LoRaWAN star topology has gateway as single point of failure and scalability bottleneck
- Bus topology fails completely when cable is cut due to signal reflection issues
- Token ring provides deterministic access but adds latency proportional to ring size
783.13 What’s Next
Continue your topology review with:
- Network Topologies: Scenario-Based Review: Comprehensive scenario-based assessment covering hybrid topologies, fault tolerance categorization, and large-scale deployment planning
Continue to: Network Topologies: Scenario-Based Review