Fundamentals 18 min read

Understanding the OSI Model: A Layer‑by‑Layer Guide

This article provides a comprehensive overview of the OSI model, detailing each of its seven layers—from the physical and data link layers up to the application layer—explaining their functions, protocols, and how they interact to enable network communication.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Understanding the OSI Model: A Layer‑by‑Layer Guide

Overview

One of the purposes of the OSI standard is to facilitate data transmission between different hosts. The OSI model consists of seven layers, divided into two groups.

The top three layers define how applications on end systems communicate with each other and with users.

The bottom four layers define how end‑to‑end data transfer is performed.

The upper three layers are unaware of network addresses; that responsibility belongs to the lower four layers.

Application Layer

The application layer is where users interact with computers. It is only invoked when network access is required, e.g., when a browser retrieves an HTML document via HTTP or downloads a file via FTP. The layer provides an interface between applications and the lower protocol stack.

It also determines the availability of the destination and whether sufficient resources exist for the desired communication, supporting tasks such as file transfer, email, remote access, network management, and information retrieval.

Applications like Microsoft Word do not reside in the application layer; they interact with application‑layer protocols when needed.

Presentation Layer

The presentation layer supplies data to the application layer and handles data conversion and formatting. It acts as a translator, converting data into a standard format for transmission and then back into a host‑specific format.

It defines protocols for data compression, decompression, encryption, decryption, and multimedia handling.

Session Layer

The session layer establishes, manages, and terminates sessions between presentation‑layer entities, providing three modes of communication: simplex, half‑duplex, and full‑duplex. It separates data streams from different applications.

Transport Layer

The transport layer segments data into streams and reassembles them, offering end‑to‑end transport services and establishing logical connections between sending and receiving hosts.

TCP and UDP both operate at this layer; TCP provides reliable service, while UDP is unreliable, giving developers a choice of protocols.

Key mechanisms include multiplexing, session establishment, virtual circuit teardown, and transparent data transfer that hides network differences.

Connection‑Oriented (Reliable) Transport

Flow Control

Flow control prevents the sender from overwhelming the receiver’s buffer, ensuring data integrity.

Connection‑Oriented Communication

Reliable transmission uses a three‑handshake process to establish a virtual circuit, then transfers data, and finally terminates the connection.

Window Technique

The window size controls how many unacknowledged bytes the sender may transmit, improving efficiency.

Acknowledgment

Reliable transport relies on acknowledgments and retransmissions: the receiver sends an ACK for received data, and the sender retransmits any segment that is not acknowledged within a timeout.

Network Layer

The network layer handles device addressing, path selection, and routing. Routers operate at this layer, using routing tables to forward packets toward their destination IP address.

Two types of packets are used: data packets for user data and routing update packets that convey topology information. Common routing protocols include RIP, RIPv2, EIGRP, and OSPF.

Routing tables contain network addresses, outgoing interfaces, and metrics such as hop count or bandwidth.

Data Link Layer

The data link layer provides physical transmission of frames, error notification, topology awareness, and flow control. It encapsulates network‑layer packets into frames with source and destination MAC addresses.

Ethernet’s two sublayers are MAC (media access control) and LLC (logical link control). Switches and bridges operate at this layer, using MAC address filtering to forward frames.

Layer‑2 switches use ASIC hardware for fast forwarding, while bridges build filtering tables to track device locations and perform transparent bridging.

Physical Layer

The physical layer transmits and receives bits (0 or 1) over various media, defining electrical, mechanical, and functional specifications. It also defines the interfaces between DTE (Data Terminal Equipment) and DCE (Data Communication Equipment).

Hubs operate at this layer as multi‑port repeaters, forwarding electrical signals to all ports without examining the data.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

TCPUDPOSI modelnetwork layers
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.