DexterLab

🚨 New downloadable modules coming soon📘 Electrical Signaling & PHY Interfaces — new overview📘 Electrical I/O Standards — new overview📘 Integration between Theory and Design Library in progress

Protocol Layering — Architecture & Fundamentals

Introduction

Modern digital protocols are organized into layers, each with clearly defined responsibilities and well‑specified interfaces. This layered structure enables modularity, scalability, interoperability, and clean separation of concerns.
From the physical transmission of bits to the reliable delivery of packets, each layer contributes a specific function within the communication pipeline.

This page introduces the architecture of protocol layering, the role of each layer, the concept of encapsulation, and the interfaces that connect layers together. It forms the conceptual foundation for the entire Protocol Layers & Packet Processing domain.

Layered Architecture

Purpose of Layering

Layering exists to:

  • isolate functions into independent modules
  • allow each layer to evolve without impacting others
  • enable interoperability across vendors and implementations
  • simplify design, verification, and maintenance
  • promote reuse of architectural blocks

Key Properties

A well‑designed layered architecture provides:

  • clear responsibilities for each layer
  • stable interfaces between adjacent layers
  • encapsulation of internal details
  • modular composition without circular dependencies

Main Protocol Layers

PHY — Physical Layer

Responsible for the physical transmission of bits:

  • serialization
  • equalization
  • clock recovery
  • physical line coding
  • synchronization

The PHY does not understand packets, headers, or addresses. It deals only with signals and bits.

PCS — Physical Coding Sublayer

A bridge between PHY and MAC, responsible for:

  • physical framing
  • symbol delimitation
  • scrambling and descrambling
  • control codes
  • lane alignment and bonding

The PCS introduces the first structured representation of data.

MAC — Media Access Control

Responsible for packet‑level operations:

  • frame construction and interpretation
  • addressing
  • medium access control (for shared media)
  • metadata handling
  • protocol‑level flow control

The MAC is the first layer that sees packets as logical entities.

Transport / Transaction Layer

Responsible for reliability and ordering:

  • packet numbering
  • retransmissions (ARQ)
  • sliding windows
  • credit‑based flow control
  • segmentation and reassembly
  • protocol‑level error handling

This layer ensures that packets arrive correctly and in order.

Encapsulation

Concept

Each layer adds its own information (headers, metadata, control fields) to the data received from the upper layer.
This process is known as encapsulation.

Generic Example

  • The Transport layer adds sequence numbers and reliability controls
  • The MAC layer adds addresses and protocol fields
  • The PCS layer adds delimiters and control codes
  • The PHY converts everything into symbols and electrical/optical signals

Each layer sees only its own header and payload, without needing to understand the internals of other layers.

Interfaces Between Layers

Requirements

Interfaces between layers must be:

  • stable across protocol revisions
  • minimal (only what is necessary)
  • abstract (no implementation details)
  • deterministic in behavior

Typical Interfaces

  • MAC ↔ PCS: frames, metadata, control signals
  • PCS ↔ PHY: symbols, delimiters, control codes
  • Transport ↔ MAC: packets, sequence information, credits, error notifications

These interfaces define how data and control information flow through the protocol stack.

Layering and Packet Processing

Layering is tightly connected to packet processing:

  • the MAC constructs and interprets frames
  • the Transport layer manages ordering and reliability
  • the PCS prepares data for physical transmission
  • the PHY transmits and receives bits

Together, these layers transform logical packets into physical signals and back.

Layering and Scalability

Advantages

  • layers can be replaced or upgraded independently
  • multiple protocols can coexist on the same infrastructure
  • layers evolve at different speeds (e.g., PHY vs. MAC)
  • interoperability across vendors is preserved

Real‑World Examples

  • Ethernet evolved from 10 Mbps to 800 Gbps with the same MAC
  • PCIe introduced PAM4 in Gen6 without changing the Transaction Layer
  • USB4 uses a completely different PHY/PCS from USB2, while retaining similar MAC concepts

Relationship to Other Domains

This domain connects directly to:

  • SERDES & High‑Speed Interfaces (PHY and PCS)
  • Flow Control & Data Path (micro‑architectural data path)
  • Line Coding & Data Integrity (scrambling, control codes)
  • Clocking & Synchronization (timing and alignment across layers)

Layering is the bridge between the world of bits and the world of packets.

Related Pages

Summary

Protocol layering is the foundation of modern digital communication. Each layer has a well‑defined role, a stable interface, and a specific responsibility in constructing, processing, and delivering packets.
Understanding layering is essential for understanding how digital systems transform raw bits into reliable, interoperable, and scalable packet‑based communication.