Master the OSI & TCP/IP Models: Layer‑by‑Layer Networking Essentials
This article explains the OSI and TCP/IP reference models, describes each layer’s function, highlights key networking devices and protocols, clarifies protocol data units (PDUs) across layers, and illustrates data encapsulation and decapsulation in modern networks.
OSI Reference Model
Application layer – provides an interface to applications. Presentation layer – converts data formats to ensure interoperability. Session layer – establishes, manages, and terminates sessions. Transport layer – establishes, maintains, and terminates end‑to‑end data transfer, controlling flow and ordering. Network layer – defines logical addresses and forwards packets. Data link layer – encapsulates packets into frames for point‑to‑point or point‑to‑multipoint communication and performs error detection. Physical layer – transmits bit streams over the medium.
TCP/IP Reference Model
Because the OSI stack is complex and TCP/IP protocols are widely used, the TCP/IP model has become the mainstream reference for the Internet.
Key Devices
Switch – a Layer‑2 device that learns and forwards MAC addresses. Router – a Layer‑3 device that forwards packets based on IP addresses. Host – a Layer‑5 device that runs applications. Firewall – a multi‑layer device whose operation depends on its implementation.
Network‑layer firewall (Layer 3) – filters IP packets.
Application‑layer firewall (Layer 7) – inspects application‑level protocols.
TCP/IP Protocol Suite
The suite defines a series of standard protocols.
Application‑Layer Protocols
HTTP – transfers web pages and files.
FTP – transfers files.
SMTP – transfers email.
DNS – resolves domain names to IP addresses.
SNMP – monitors and manages network devices.
SSH – provides encrypted terminal access.
Telnet – remote terminal login.
DHCP – automatically assigns IP configuration.
TFTP – simple UDP‑based file transfer.
Transport‑Layer Protocols
TCP – reliable, connection‑oriented data transfer.
UDP – connectionless, low‑latency transfer.
Network‑Layer Protocols
IP – routes packets between hosts.
ICMP – error reporting and diagnostics.
IGMP – multicast group management.
Data‑Link‑Layer Protocols
PPPoE – encapsulates PPP over Ethernet for broadband access. Components: PPP part (authentication, link control, compression) and Ethernet part (physical transmission).
Ethernet – common LAN technology.
PPP – point‑to‑point protocol for direct links.
Physical Layer
Converts digital signals to optical, electrical, or electromagnetic signals depending on the transmission medium.
Physical‑layer PDU is a bit stream.
Common Transmission Media
PDU Overview
Protocol Data Unit (PDU) is the data unit exchanged between layers. In the OSI model:
Layer 1 (Physical) – Bit.
Layer 2 (Data Link) – Frame.
Layer 3 (Network) – Packet or Datagram.
Layer 4 (Transport) – Segment or UDP Datagram.
Layers 5‑7 – Session, Presentation, and Application data.
In the TCP/IP model, PDUs are similarly defined: Frame at the link layer, Packet at the network layer, Segment at the transport layer.
Data Encapsulation and Decapsulation
The sender encapsulates data layer by layer, intermediate networks forward the encapsulated packets, and the receiver decapsulates to retrieve the original application data.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
