Layered Architecture of the OSI Reference Model: Functions, Data Units, and Responsibilities
The OSI Reference Model (Open Systems Interconnection) describes network communication as a stack of seven layers. Each layer provides services to the layer above it and uses services from the layer below it, enabling modular design and standardized interoperability.
A common way to visualize the stack is to group layers into:
- Upper layers (7–5): application-oriented (user-facing protocols and semantics)
- Middle layers (4–3): end-to-end transport and network delivery
- Lower layers (2–1): local link and physical transmission
Key definitions used below:
- OSI Reference Model
- Encapsulation
- Decapsulation
- Service
- Protocol
Note: In real-world networks (e.g., the Internet), TCP/IP is often used rather than OSI directly, but OSI remains a widely used teaching framework.
Footnotes
-
Wikipedia: "OSI model" https://en.wikipedia.org/wiki/OSI_model - Overview of the OSI reference model and roles of the seven layers. ↩ ↩2
OSI Layers Overview: Primary Role + Typical Data Unit
A quick comparison of each layer’s primary function and common data unit naming used in OSI discussions.
Below, each layer’s primary functions, data unit, and responsibilities are described. The “data unit” names are the standard conceptual terms commonly associated with OSI: PDU (Protocol Data Unit) varies by layer (e.g., message, segment, packet, frame, bits).
Layer 1 — Physical
- Primary functions: transmit raw bits over a physical medium.
- Data unit: Bit (individual bits)
- Responsibilities:
- Define electrical/optical/radio signaling characteristics
- Manage physical line characteristics (timing, voltage/encoding, connectors)
- Ensure reliable bit delivery as a physical transmission problem
Conceptual keywords: Physical layer Bit Signaling Medium Transmission
The physical layer is concerned with “how to send bits,” not “what the bits mean.”
Footnotes
-
Wikipedia: "OSI model" https://en.wikipedia.org/wiki/OSI_model - Overview of the OSI reference model and roles of the seven layers. ↩ ↩2
Layer 2 — Data Link
- Primary functions: move data across a local link (hop) reliably.
- Data unit: Frame
- Responsibilities:
- Framing to define where each unit begins/ends
- Error detection (and sometimes correction)
- Media access control (e.g., controlling access to the medium)
- Addressing on the local segment using link-layer identifiers (commonly MAC addressing in Ethernet)
Conceptual keywords: Data link layer Frame MAC address CRC Framing
Data link layer protocols are responsible for the hop-by-hop delivery reliability and local addressing, not end-to-end application semantics.
Footnotes
-
Wikipedia: "OSI model" https://en.wikipedia.org/wiki/OSI_model - Overview of the OSI reference model and roles of the seven layers. ↩
Layer 3 — Network
- Primary functions: deliver data between end systems across multiple networks (routing/forwarding).
- Data unit: Packet
- Responsibilities:
- Define logical addressing (commonly IP addressing in practice)
- Perform routing and forwarding based on routing decisions
- Handle fragmentation/reassembly (conceptually; details vary by protocol)
Conceptual keywords: Network layer Packet Routing Next hop MTU
Layer 3 is where “which route should the data take?” is addressed.
Footnotes
-
Wikipedia: "OSI model" https://en.wikipedia.org/wiki/OSI_model - Overview of the OSI reference model and roles of the seven layers. ↩
Layer 4 — Transport
- Primary functions: end-to-end delivery, segmentation, and reliability controls between hosts.
- Data unit: Segment
- Responsibilities:
- Segmentation and reassembly
- Process-to-process delivery
- End-to-end reliability mechanisms (conceptually: acknowledgments, retransmissions, ordering)
- Flow control and congestion control (conceptually; actual strategies depend on protocol)
Conceptual keywords: Transport layer Segment Port Flow control Congestion control
Transport layer turns an unreliable network into an end-to-end communication abstraction for applications.
Footnotes
-
Wikipedia: "OSI model" https://en.wikipedia.org/wiki/OSI_model - Overview of the OSI reference model and roles of the seven layers. ↩
Layer 5 — Session
- Primary functions: establish, manage, and terminate communication sessions between applications.
- Data unit: PDU / Session data (commonly discussed as session data/message)
- Responsibilities:
- Session establishment
- Synchronization and checkpointing (conceptually) to support recovery
- Session management: maintaining and closing sessions
Conceptual keywords: Session layer Synchronization Session management Checkpointing Dialog control
Layer 6 — Presentation
- Primary functions: translate data formats and ensure consistent representation.
- Data unit: Presentation data (often treated as encoded message content)
- Responsibilities:
- Data translation (e.g., character encodings)
- Encryption and compression (conceptually)
- Format negotiation and representation consistency
Conceptual keywords: Presentation layer Encoding Compression Encryption Serialization
Layer 7 — Application
- Primary functions: provide network services to applications and define application-level protocols.
- Data unit: Message
- Responsibilities:
- Specify how applications access network services (e.g., web/transfer/remote access)
- Define semantics of communication (requests, responses, operations)
- Present protocol interactions in an application-friendly way
Conceptual keywords: Application layer Message Service interface Protocol semantics API/protocol
Encapsulation mental model
As data moves down the OSI stack, each layer encapsulates it with its own header/trailer, producing new PDUs (message → segment → packet → frame → bits). When receiving, the reverse happens via decapsulation.
Quick Layer-by-Layer Summary (Functions · Data Units · Responsibilities)
How Data Moves Through OSI (Sender → Receiver)
Create message semantics
1) ApplicationApplication-layer message is created from the application’s intent."
Encode/transform
2) PresentationRepresentation and format changes (e.g., encoding, compression/encryption)."
Manage session context
3) SessionSession setup and control for synchronization/lifecycle."
Segment & end-to-end transport
4) TransportBreak data into segments and handle end-to-end transport abstraction."
Packetize & route
5) NetworkAdd network addressing and select routes via forwarding."
Frame & local delivery
6) Data LinkFrame the packet, add link-level headers, perform error checks and media access."
Transmit bits
7) PhysicalConvert frames into signals and transmit as raw bits."
Responsibilities as interfaces (why layering works)
Layering exists so that each layer can be implemented with clear boundaries: the upper layer depends on the service definition, while the lower layers encapsulate implementation details. This reduces complexity by isolating concerns such as routing, framing, encoding, and physical signaling.
Mermaid view of responsibility boundaries:
Footnotes
-
Wikipedia: "OSI model" https://en.wikipedia.org/wiki/OSI_model - Overview of the OSI reference model and roles of the seven layers. ↩
Knowledge Check
In the OSI model, which layer is primarily responsible for routing packets between networks?