6  IoT Protocol Layers and Selection

networking-core
fund
protocols

6.1 Start With the Job of Each Protocol

A protocol choice is easier when you stop asking which name is fashionable and start asking what job must be done at each layer. One rule moves bits on a link, another identifies endpoints, another keeps a session reliable, and another gives the application a vocabulary.

Follow one IoT message down and back up the stack. The useful answer is not a protocol list; it is a reasoned selection that explains where each protocol adds evidence, overhead, security, or a gateway handoff.

Overview: Protocols Work as a Stack

IoT devices rarely use one protocol by itself. A useful design combines several agreements: how bits move on the medium, how frames share the link, how packets are addressed, how delivery is handled, and how application messages keep their meaning.

The point of a layered stack is separation of responsibility. Each layer should solve its own problem while preserving enough information for the next layer to do its job.

That separation prevents vague decisions such as "use MQTT" or "use LoRaWAN" from hiding missing work. MQTT describes an application messaging pattern, but it still depends on transport behavior, IP reachability, broker identity, credentials, payload schema, and operations. LoRaWAN describes a long-range low-power network service, but the application still has to decide payload format, freshness rules, acknowledgement needs, gateway visibility, and cloud handoff. CoAP, HTTP, BLE GATT, 6LoWPAN, IPv6, TCP, UDP, TLS, DTLS, Wi-Fi, Ethernet, and IEEE 802.15.4 each answer different questions.

A stack review therefore reads upward and downward. Upward means asking whether a lower layer preserves what the application needs: timestamp accuracy, command identity, duplicate handling, ordering, and stale-data behavior. Downward means asking whether an application choice fits the path below it: payload size, frame overhead, fragmentation, retry cost, sleep windows, radio duty cycle, gateway buffering, and backhaul reliability.

Gateways make the stack visible. A gateway may translate a local sensor frame into MQTT, convert CoAP resources into HTTP, compress or expand payloads, add timestamps, map identities, buffer during outages, or change security context. The gateway is not just a cable; it is a protocol boundary that needs its own evidence record.

Layered IoT protocol stack from physical links to data link, network, transport, and application protocols.
A protocol stack is a set of layer agreements, not a single product choice.

Application

Defines message meaning: telemetry fields, commands, topics, resources, payload format, idempotency, and response expectations.

Transport

Defines delivery behavior: ports, streams, ordering, acknowledgements, congestion behavior, and when the application must handle loss itself.

Network and Adaptation

Defines addressing, routing, path scope, compression, fragmentation, and gateway boundaries for constrained links.

Link and Physical

Defines frame size, medium access, radio band or wire, reachability, duty cycle, interference, retries, and local diagnostics.

Review rule:

Do not compare MQTT, IPv6, Wi-Fi, and LoRaWAN as if they all solve the same problem. First identify the layer responsibility, then ask whether that layer's behavior fits the device and deployment.

Practitioner: Select the Stack from Constraints

Protocol selection should start with the system behavior, not a favorite protocol name. A practitioner asks what the device must send, how often, how far, under what power budget, through which gateway or service, and with what failure behavior.

The result is a short stack record: application protocol, payload format, transport behavior, network or adaptation layer, link technology, security wrapper, gateway handoff, and the evidence that proves the choices fit.

Protocol stack architecture layer map showing application, transport, network and adaptation, link, and physical responsibilities.
Choose each layer for a reason and record the handoff between layers.

Selection Flow

1. Message meaning Name telemetry fields, commands, payload format, topic or resource path, and receiver expectation.
2. Delivery behavior Decide whether loss, duplicates, ordering, stale data, retries, and acknowledgements are handled by the app, transport, or link.
3. Path and gateway Identify addressing scope, routing, compression, fragmentation, translation, buffering, and identity mapping.
4. Medium fit Check range, power, channel sharing, mobility, installation environment, interference, and diagnostics.
5. Evidence gate Keep traces, packet sizes, loss behavior, coverage notes, power observations, and owners for unresolved risk.
Scenario Signal
Stack Pressure
Weak Review
Evidence to Keep
Sparse battery telemetry
Small payloads, long sleep time, minimal radio airtime, and tolerant freshness rules.
Choosing a verbose web stack because it is familiar.
Payload ledger, retry rule, coverage check, battery observation, and receiver stale-data behavior.
Operator commands
Clear acknowledgement, authorization, timeout, duplicate handling, and rollback behavior.
Assuming a dashboard click means the device changed state.
Command id, approval path, transport behavior, device acknowledgement, and final observation.
Gateway translation
Identity, timestamp, quality, buffer, protocol mapping, and ownership across both sides of the gateway.
Treating the gateway as an invisible cable.
Mapping table, timestamp policy, loss policy, credential owner, and monitoring owner.
High-rate media or diagnostics
Throughput, latency, congestion behavior, power source, storage, and backhaul capacity.
Using a low-power telemetry link for traffic it cannot carry.
Rate measurements, congestion test, storage plan, and backhaul evidence.

Under the Hood: Boundaries Create Failure Modes

The hard part of a protocol stack is often not the protocol syntax. It is the boundary behavior: where payloads are wrapped, where reliability is added, where packets are compressed or fragmented, where identity changes, and where operators can see failure.

Under the hood, every layer adds context and cost. Headers, acknowledgements, retransmissions, security wrappers, and gateway buffers are useful when they serve the requirement; they are waste when they hide responsibility or exceed the link budget.

Detailed IoT protocol stack across five layers, each with representative protocols, data units, and example roles: application with CoAP, MQTT, HTTP/2, and AMQP; transport with UDP, TCP, DTLS, TLS, and QUIC; network with IPv6 addressing and routing; data link; and physical.
Layer-aware review asks what each boundary adds, removes, preserves, or translates.

Boundary Evidence Record

Boundary
What Can Go Wrong
Evidence Needed
Review Question
Application to transport
The message looks delivered, but command meaning, duplicate handling, or freshness is unclear.
Payload schema, topic or resource path, idempotency rule, acknowledgement rule, and retry owner.
Who decides whether a message is safe to retry?
Transport to network
Reliability assumptions break when paths are lossy, sleepy, buffered, or translated.
Connection model, ordering expectation, duplicate handling, security wrapper, route, and fragmentation risk.
Does reliability belong to the app, transport, constrained network, or gateway?
Network to link
Address mapping, compression, fragmentation, or retries hide where packets are actually dropped.
Address plan, adaptation context, frame fit, link acknowledgement, retry count, and channel evidence.
Can the chosen link carry the packets without fragile fragmentation?
Gateway to cloud
Translation changes identity, time, quality, credentials, or failure visibility.
Identity mapping, timestamp source, buffer policy, stale marker, credential owner, and monitoring owner.
Can another engineer audit what the gateway changed?
Common pitfall:

A protocol family name is not a deployed contract. Check the exact profile, feature set, security mode, payload limits, gateway behavior, and operational owner before treating two devices or services as interoperable.

Protocol Stack Review Checklist

  • Name the physical event, payload, receiver, and action the stack supports.
  • Record payload size and how headers, security, retries, and fragmentation affect the constrained link.
  • Decide where loss, duplicate messages, ordering, stale data, and command confirmation are handled.
  • Identify every gateway or bridge that changes identity, timestamp, topic, path, credential, or quality marker.
  • Keep packet traces, coverage evidence, power observations, and monitoring ownership with the decision record.

6.2 Summary

  • IoT communication is a stack of agreements, not one protocol name.
  • Application, transport, network/adaptation, link, and physical layers each carry a different responsibility.
  • Protocol selection should start from payload meaning, freshness, delivery behavior, range, power, gateway handoff, and operational ownership.
  • Header overhead, retransmissions, security wrappers, and fragmentation are design costs that should be visible in the decision record.
  • Gateways are protocol boundaries: they need evidence for identity, timestamps, quality, buffering, credentials, and monitoring.

6.3 Key Takeaway

Choose IoT protocol stacks by matching each layer to a real constraint and recording the handoffs. A stack is credible when another engineer can see what each layer proves, what it hides, and who owns the failure cases.

6.4 See Also