Understanding the OSI Model: A Layer‑by‑Layer Guide
This article provides a comprehensive overview of the OSI model, explaining the purpose of each of its seven layers, their responsibilities, typical devices and protocols involved, and how data moves from the physical medium up to the application level.
Overview
The OSI standard helps transmit data between different hosts by defining a seven‑layer model that is divided into two groups.
The top three layers specify how applications communicate with each other and with users, while the lower four layers handle end‑to‑end data transmission.
Application Layer
The application layer is where users and computers interact; it is only used when network access is required, such as HTTP or FTP. It enables applications to pass information down the protocol stack and determines the availability of communication partners and resource sufficiency.
Presentation Layer
This layer provides data conversion and formatting for the application layer, acting as a translator that encodes data into a standard format and decodes it back into a format the receiving application can understand.
Session Layer
The session layer establishes, manages, and terminates sessions between presentation‑layer entities, supporting three modes: simplex, half‑duplex, and full‑duplex, and separates data from different applications.
Transport Layer
The transport layer segments data into streams, providing end‑to‑end transmission services and establishing logical connections between sending and receiving hosts.
Connection‑Oriented (Reliable) Transport
Flow Control
Flow control ensures data integrity by preventing buffer overflow at the receiver, confirming receipt, retransmitting unacknowledged segments, ordering segments correctly, and avoiding congestion.
Connection‑Oriented Communication
Reliable transmission establishes a virtual circuit via a three‑way handshake, then transmits data and finally tears down the connection.
Window Technique
The window controls how many unacknowledged bytes a sender may transmit, allowing the sender to continue sending data while awaiting acknowledgments.
Acknowledgment
Reliable data transfer relies on acknowledgments and retransmissions; the sender records each segment, waits for confirmation, and retransmits if a timeout occurs.
Network Layer
The network layer manages device addressing, tracks device locations, and determines optimal data paths, using routers to provide routing services.
Routers examine packet destination IPs, consult routing tables, forward packets to the appropriate outbound interface, or discard them if no route exists.
Two types of packets are used: data packets for user data and routing update packets for disseminating network topology information (e.g., RIP, RIPv2, EIGRP, OSPF).
Data Link Layer
The data link layer provides physical transmission of data, handles error notification, topology, and flow control, and encapsulates packets into frames with hardware addresses.
It includes two sublayers: Media Access Control (MAC) which defines how frames are transmitted over the medium, and Logical Link Control (LLC) which identifies network‑layer protocols and can provide flow control.
Physical Layer
The physical layer transmits and receives bits (0 or 1) over various media, defining electrical, mechanical, and procedural requirements for establishing, maintaining, and terminating physical links.
Devices such as hubs operate at this layer, acting as multi‑port repeaters that forward signals without examining them, placing all connected devices in the same collision and broadcast domain.
Raymond Ops
Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.