Network mechanisms are the building blocks of all IoT communication: how data is represented (bits and bytes), packaged into datagrams (headers + payloads), switched across networks (packet switching with multiplexing), and delivered over converged infrastructure (shared IP networks with QoS). This index chapter links to four focused sub-chapters covering each mechanism in depth and includes a worked example comparing protocol overhead costs for a smart meter deployment.
37.1 Learning Objectives
By the end of this series, you will be able to:
Explain data representation in networks including bits, bytes, and data rates for IoT constraints
Describe datagram structure with headers, payloads, and protocol encapsulation across layers
Differentiate packet switching from circuit switching and explain why packet switching dominates IoT
Analyze network performance metrics including bandwidth, throughput, and goodput
Explain CSMA/CA and QoS mechanisms for wireless channel coordination in converged networks
Calculate protocol overhead and its cost impact for real-world IoT deployments
For Beginners: Network Mechanisms
Network mechanisms are the behind-the-scenes processes that make communication work. They include things like how data gets split into packets, how those packets find their way through the network, and how errors get detected and corrected. Think of them as the plumbing and wiring inside the walls that keep everything running smoothly.
Sensor Squad: The Behind-the-Scenes Crew!
“You know how a movie has actors on screen and a huge crew behind the scenes?” said Max the Microcontroller. “Network mechanisms are the behind-the-scenes crew. Data representation, packet structure, switching, and channel sharing – these are the invisible processes that make everything work.”
“First, everything starts as bits – ones and zeros,” explained Sammy the Sensor. “My temperature reading of 23.5 degrees gets converted to binary. Then those bits get organized into datagrams with headers and payloads, like putting a letter in an envelope with an address.”
Lila the LED continued, “Next comes packet switching – instead of reserving a whole phone line like the old days, the network breaks your data into small packets and routes each one independently. They might take different paths, but they all arrive at the destination and get reassembled!”
“And finally,” said Bella the Battery, “converged networks let voice, video, and sensor data all share the same infrastructure. Quality of Service rules make sure my critical alarm packet gets priority over someone streaming a video. These mechanisms are invisible to users, but understanding them helps engineers build reliable IoT systems.”
37.2 Overview
Network mechanisms are the fundamental building blocks that make the Internet and IoT communication possible. This chapter series covers how data is represented, packaged, switched, and delivered across networks – essential knowledge for building reliable IoT systems. Every IoT device communicates over networks, so understanding how data is packaged, addressed, and transmitted is fundamental whether you are connecting sensors to gateways or devices to cloud platforms.
37.3 Chapter Series
This topic has been organized into four focused chapters:
Implement modern network architectures and configure wireless channel coordination:
Converged networks - Single infrastructure for voice, video, data, and IoT
CSMA/CA - How wireless devices share radio channels
Quality of Service - Prioritizing critical IoT traffic
Interactive simulation - Visualize channel access in action
Estimated time: 25 minutes
37.4 Learning Path
Recommended Order
For the best learning experience, complete the chapters in order:
Data Representation - Build foundation with bits and bytes
Datagrams - Understand packet structure
Packet Switching - Learn how packets traverse networks
Converged Networks - Implement and evaluate modern architectures
Each chapter builds on concepts from the previous one.
37.5 Prerequisites
Before starting this series, you should be familiar with:
Networking Basics - Fundamental networking concepts, protocols, and the OSI model
Layered Network Models - Understanding where these mechanisms fit within the networking stack
37.6 Key Concepts Covered
Topic
Description
Binary/Bytes
Digital representation of data
Datagrams
Self-contained packets with headers and payloads
Encapsulation
How protocol layers wrap data
Packet Switching
Independent routing of each packet
Multiplexing
Sharing links among multiple streams
Bandwidth
Theoretical network capacity
Throughput
Actual measured data rate
Goodput
Usable application data delivered to the application
Converged Networks
Single infrastructure for all services
CSMA/CA
Wireless collision avoidance
QoS
Traffic prioritization for critical IoT data
Quick Check: QoS and Traffic Prioritization
37.7 Worked Example: Calculating Protocol Overhead for a Smart Meter Deployment
Scenario: A utility deploys 20,000 smart electricity meters that transmit a 32-byte usage reading every 15 minutes over a cellular NB-IoT connection using CoAP over UDP over IPv6. The utility wants to understand how much of their network bandwidth is spent on actual meter data versus protocol overhead, and whether switching to MQTT over TCP would be justified for reliability.
Step 1: Calculate encapsulation overhead for UDP/CoAP (current design)
Each protocol layer wraps the payload with its own header:
Layer
Protocol
Header Size
Running Total
Application
CoAP (compact)
4 bytes
36 bytes
Transport
UDP
8 bytes
44 bytes
Network
IPv6 (6LoWPAN compressed)
20 bytes
64 bytes
Link
NB-IoT MAC
14 bytes
78 bytes
Goodput = 32 / 78 = 41% efficiency (32 bytes useful out of 78 total).
Step 2: Calculate encapsulation overhead for TCP/MQTT (alternative)
Layer
Protocol
Header Size
Running Total
Application
MQTT PUBLISH (QoS 1)
12 bytes
44 bytes
Transport
TCP (minimum)
20 bytes
64 bytes
Network
IPv6 (6LoWPAN compressed)
20 bytes
84 bytes
Link
NB-IoT MAC
14 bytes
98 bytes
But TCP requires additional exchange packets for connection management:
Phase
Packets
Bytes
TCP 3-way handshake
3
3 x 54 = 162 bytes
MQTT CONNECT + CONNACK
2
~140 bytes
MQTT PUBLISH + PUBACK
2
98 + 66 = 164 bytes
TCP ACKs (2 data packets)
2
2 x 54 = 108 bytes
MQTT DISCONNECT
1
56 bytes
TCP 4-way teardown
4
4 x 54 = 216 bytes
Total
14 packets
846 bytes
Goodput = 32 / 846 = 3.8% efficiency for a single reading with full TCP lifecycle.
Step 3: Calculate daily network load for 20,000 meters
Metric
CoAP/UDP
MQTT/TCP (per-reading connection)
Bytes per reading
78
846
Readings per day (per meter)
96
96
Bytes per meter per day
7,488
81,216
Total daily network (20,000 meters)
143 MB
1,550 MB
Monthly network
4.3 GB
46.5 GB
Step 4: Cost impact at NB-IoT data rates
At a typical NB-IoT rate of EUR 0.50 per MB:
Protocol
Monthly Data
Monthly Cost
Annual Cost
CoAP/UDP
4.3 GB
EUR 2,150
EUR 25,800
MQTT/TCP
46.5 GB
EUR 23,250
EUR 279,000
Key insight: Protocol overhead is not just a technical curiosity – for this deployment, TCP/MQTT would cost EUR 253,000 more per year than UDP/CoAP, with 10.8x more network traffic. The 41% goodput of UDP/CoAP is already significant overhead for a 32-byte payload, but TCP’s connection management inflates it to under 4%.
This is why IoT protocols like CoAP exist: they were designed from the ground up to minimize encapsulation overhead for small, frequent messages. MQTT/TCP becomes competitive only when connections are kept open across many readings (persistent connections), reducing per-reading overhead to approximately 164 bytes (about 20% efficiency).
Try It: Protocol Overhead Calculator
Adjust the parameters below to explore how payload size, fleet size, and data costs affect protocol overhead for your own IoT deployment.
Show code
viewof payload_bytes = Inputs.range([1,512], {value:32,step:1,label:"Payload size (bytes)"})viewof num_devices = Inputs.range([100,100000], {value:20000,step:100,label:"Number of devices"})viewof readings_per_day = Inputs.range([1,1440], {value:96,step:1,label:"Readings per day"})viewof cost_per_mb = Inputs.range([0.01,5.0], {value:0.50,step:0.01,label:"Cost per MB (EUR)"})
A mechanism is a capability (e.g., priority queuing). A policy is a rule applied to the mechanism (e.g., “route alarm traffic to the high-priority queue”). Confusing them leads to systems that have the right mechanisms but wrong policies. Fix: document the mechanism and the policy separately, and test both.
2. Not Considering How Mechanisms Interact
Enabling QoS without also enabling traffic shaping can cause starvation of lower-priority flows when high-priority traffic monopolises the link. Fix: test all configured network mechanisms together under realistic mixed-traffic load, not individually in isolation.
3. Over-Engineering With Mechanisms the Network Does Not Need
Adding MPLS, traffic shaping, and network slicing to a 10-node IoT deployment with 1 kbps of traffic adds administrative complexity without benefit. Fix: apply the simplest mechanism that meets the stated requirement; add complexity only when simpler approaches have been proven insufficient.
37.10 What’s Next
After completing this series, continue with the following related chapters: