33  Layered Models: Review

In 60 Seconds

This review consolidates your understanding of the OSI (7-layer) and TCP/IP (4-layer) network models, covering encapsulation, addressing at different layers (MAC, IP, port), ARP resolution, and how these traditional models map to IoT-specific reference architectures. It is organized into two focused companion chapters: model comparison and supplementary resources.

33.1 Overview

Network layering models are the foundation for all networking knowledge. They define how data moves from an application on one device to an application on another, passing through well-defined layers of abstraction. This review brings together the key concepts you have studied – OSI layers, TCP/IP mapping, encapsulation, addressing, and IoT-specific reference models – so you can see the complete picture before moving on to protocol-specific chapters.

Chapter Navigation

This review has two companion chapters for deeper study:

  1. OSI and TCP/IP Comparison – Model fundamentals, key concepts, and detailed summary
  2. Resources and Visual Gallery – Videos, tools, and diagrams

33.2 Learning Objectives

By the end of this review, you will be able to:

  • Compare OSI and TCP/IP: Differentiate the 7-layer OSI model from the 4-layer TCP/IP model, mapping each OSI layer to its TCP/IP equivalent
  • Apply Encapsulation: Trace data flow through network layers, demonstrating how each layer adds its own header during transmission and strips it upon receipt
  • Explain Addressing: Distinguish MAC (Layer 2), IP (Layer 3), and port (Layer 4) addressing and explain the role each plays in delivering data across networks
  • Analyze ARP: Explain how ARP resolves IP addresses to MAC addresses and predict the behavior of ARP in broadcast and unicast scenarios
  • Evaluate IoT Models: Compare traditional OSI/TCP/IP models with IoT-specific reference architectures (Cisco 7-level, ITU-T, IEEE 2413) and select the appropriate model for a given analysis task
  • Calculate Protocol Overhead: Apply the packet size formula to calculate payload efficiency for different IoT protocol stacks and compare results to justify protocol selection

33.3 Prerequisites

Required Chapters:

Technical Background:

  • OSI model layers
  • TCP/IP model
  • Encapsulation concepts

Estimated Time: 30 minutes (all sections)

33.4 Quick Reference

Layer OSI TCP/IP IoT Example
7 Application Application MQTT, CoAP
6 Presentation Application JSON, CBOR
5 Session Application
4 Transport Transport UDP, TCP
3 Network Internet IPv6, 6LoWPAN
2 Data Link Link 802.15.4, BLE
1 Physical Link Radio, Ethernet PHY

Note that the TCP/IP model merges OSI layers 5-7 into a single Application layer and OSI layers 1-2 into a single Link layer, resulting in four layers instead of seven.

Layering decisions directly change packet size, airtime, and battery drain.

\[ \text{Total packet size} = P + H_{\text{L2}} + H_{\text{IP}} + H_{\text{transport}} + H_{\text{app}} \]

Worked example: Compare a 12-byte telemetry message on two stacks.

For CoAP over UDP over 6LoWPAN (with IPHC/NHC header compression on an 802.15.4 link):

Component Header Size
802.15.4 MAC (short addresses) 11 bytes
6LoWPAN IPHC (compressed IPv6) 7 bytes
NHC-compressed UDP 4 bytes
CoAP (minimal, NON message) 4 bytes
Total overhead 26 bytes
Total packet 38 bytes

For MQTT over TCP over full IPv6 on 802.15.4:

Component Header Size
802.15.4 MAC 11 bytes
Full IPv6 40 bytes
TCP (no options) 20 bytes
MQTT PUBLISH (minimal) 4 bytes
Total overhead 75 bytes
Total packet 87 bytes

Payload efficiency is \(12/38 \approx 31.6\%\) for CoAP/UDP/6LoWPAN versus \(12/87 \approx 13.8\%\) for MQTT/TCP/IPv6. For the same 12 bytes of sensor data, the uncompressed stack transmits about \(87/38 \approx 2.3\times\) more bytes – directly impacting battery life for constrained IoT devices.

Try It: Protocol Stack Overhead Calculator

What is this chapter? This is a consolidation chapter that ties together everything you have learned about network layering models. Think of it as a map showing how all the pieces connect.

When to use this chapter:

  • After studying OSI and TCP/IP models
  • Before diving into specific protocols (MQTT, CoAP, etc.)
  • When you need to understand where protocols fit in the stack

Key Models to Know:

Model Layers Use
OSI 7 layers Reference model for understanding
TCP/IP 4 layers Practical internet protocol suite
IoT Stack Varies Application-specific combinations

Why This Matters for IoT: Understanding layers helps you choose the right protocol for each part of your IoT system – from physical connections to application messaging. For example, a battery-powered sensor needs lightweight protocols (CoAP over UDP) while a cloud dashboard can afford heavier ones (MQTT over TCP).

Recommended Path:

  1. Start with OSI and TCP/IP Comparison
  2. Explore Resources and Visual Gallery

Deep Dives:

Layer Implementations:

IoT Protocol Mapping:

Comparisons:

Learning:

33.5 Chapter Contents

33.5.1 Part 1: OSI and TCP/IP Comparison

Read the full chapter

Covers:

  • Layer functions as questions (WHAT, HOW reliably, WHERE, HOW to transmit)
  • Key concepts: encapsulation, decapsulation, addressing
  • OSI 7-layer vs TCP/IP 4-layer mapping
  • IoT reference models (Cisco 7-level, ITU-T, IEEE 2413)
  • Common misconception: “More layers = better security”

33.6 Review Activities

33.6.1 Match Protocols to Layers

33.6.2 Order the Encapsulation Steps

Common Pitfalls

Reading about OSI layers is passive. Fix: close the notes and draw both OSI and TCP/IP models from memory, labelling each layer with one protocol and one function.

Reviewing abstract layer definitions without connecting them to concrete IoT examples (e.g., “6LoWPAN adapts IPv6 at the Network layer for IEEE 802.15.4 links”) leaves knowledge fragile. Fix: for each review topic, write one sentence connecting it to a real IoT protocol or product.

Students often spend most review time on layers they already understand (Application, Transport) and neglect the Data Link and Physical layers. Fix: allocate review time proportionally to how well you understand each layer, spending more on weaker areas.

33.7 Summary

This review consolidated layered network models and their practical application to IoT systems:

  • OSI (7-layer) and TCP/IP (4-layer) models provide theoretical and practical frameworks for organizing network protocols
  • Encapsulation proceeds top-down during transmission, with each layer adding its own header around the payload from the layer above
  • Addressing operates at multiple layers: MAC at Layer 2 for local hop-by-hop delivery, IP at Layer 3 for end-to-end routing, and port numbers at Layer 4 for process demultiplexing
  • ARP resolves IP to MAC using broadcast requests and unicast replies on the local network segment
  • IoT reference models extend beyond traditional networking with edge computing, analytics, and business layers
  • Protocol stack overhead varies significantly – compressed stacks like CoAP/UDP/6LoWPAN achieve roughly 2x better payload efficiency than uncompressed alternatives

33.8 What’s Next

Topic Chapter Description
OSI and TCP/IP Comparison OSI and TCP/IP Comparison Detailed model fundamentals, key concepts, encapsulation, and ARP
Visual Gallery and Resources Resources and Visual Gallery Videos, tools, and AI-generated diagrams for all learning styles
Encapsulation and PDUs Encapsulation and PDUs Deep dive into protocol data units and header structure
Layer 3 Routing in IoT Routing Fundamentals How RPL and IPv6 routing operate in constrained IoT networks
Layer 4 Transport Transport Fundamentals TCP vs UDP trade-offs and their impact on IoT protocol design
Application-Layer Protocols Application Protocols MQTT, CoAP, and HTTP mapped to the application layer