codingstuff.io
ExploreTutorialsProblemsCS Subjects
Get Started
ExploreTutorialsProblemsCS Subjects
Get Started
codingstuff.io

Master the art of building software through interactive tutorials, real-world problems, and guided projects.

Pune, Maharashtra, India

codingstuffmail@gmail.com

Product

  • Explore
  • Tutorials
  • Problems
  • CS Subjects

Company

  • About
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 codingstuff.io. All rights reserved.

Built with ❤️ for developers everywhere

/
/
All Subjects
🌐

Computer Networks

26 chapters

1Network Topologies & LAN/WAN2Network Devices (Hub, Switch, Router)3OSI Reference Model4OSI Model & TCP/IP Suite5TCP/IP Protocol Suite6Switching Techniques (Circuit, Packet)7Data Link: Framing & Error Detection8Error Correction (Hamming Code)9Flow Control (Stop-and-Wait, Sliding Window)10MAC: CSMA/CD & CSMA/CA11Network Layer & Routing12IP Addressing (IPv4, IPv6)13Subnetting & CIDR14Routing Algorithms (Distance Vector, Link State)15ARP, ICMP, and NAT16DHCP Protocol17Transport Layer Services18Transport Layer: UDP19Transport Layer: TCP & 3-Way Handshake20TCP Congestion Control21Application Layer: DNS & HTTP22Application Layer: SMTP & FTP23Socket Programming Basics24Wireless Networks & Wi-Fi Standards25VLANs & Spanning Tree Protocol26Network Security & Cryptography
SubjectsComputer Networks

OSI Model & TCP/IP Suite

Updated 2026-04-30
3 min read

OSI Model & TCP/IP Suite

To deal with the massive complexity of network communications, the network architecture is organized into layers. Each layer provides a specific service to the layer above it and relies on the services of the layer below it. This layered architecture allows hardware and software from vastly different vendors to communicate seamlessly.

There are two primary models used to describe network architecture: the OSI Reference Model (theoretical) and the TCP/IP Protocol Suite (practical, used by the modern Internet).


1. The OSI Reference Model

The Open Systems Interconnection (OSI) model was developed by the ISO in the late 1970s. It consists of 7 layers.

Layer 7: Application Layer

The application layer is responsible for providing services to the user. It enables the user (human or software) to access the network. Protocols: HTTP, FTP, SMTP, DNS.

Layer 6: Presentation Layer

The presentation layer is concerned with the syntax and semantics of the information exchanged between two systems. It handles data translation, encryption/decryption, and compression.

Layer 5: Session Layer

The session layer is the network dialog controller. It establishes, maintains, and synchronizes the interaction between communicating systems.

Layer 4: Transport Layer

The transport layer is responsible for process-to-process delivery of the entire message. It ensures that the whole message arrives intact and in order, overseeing both error control and flow control at the source-to-destination level. Protocols: TCP, UDP.

Layer 3: Network Layer

The network layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links). If two systems are connected to the same link, there is usually no need for a network layer. However, if the two systems are attached to different networks with connecting devices (routers) between them, the network layer accomplishes logical addressing (IP addresses) and routing. Protocols: IPv4, IPv6, ICMP.

Layer 2: Data Link Layer

The data link layer transforms the physical layer (a raw transmission facility) into a reliable link. It makes the physical layer appear error-free to the upper layer. It frames data and provides physical addressing (MAC addresses). Protocols: Ethernet, Wi-Fi (802.11).

Layer 1: Physical Layer

The physical layer coordinates the functions required to carry a bit stream over a physical medium. It deals with the mechanical and electrical specifications of the interface and transmission medium (voltage levels, cable types, fiber optics).


2. The TCP/IP Protocol Suite

While the OSI model is a fantastic theoretical tool for learning, the actual Internet does not strictly follow it. Instead, the Internet runs on the TCP/IP Protocol Suite, which was developed prior to the OSI model by the Department of Defense (DoD).

The TCP/IP model condenses the 7 OSI layers into 4 simpler layers:

  1. Application Layer: Encompasses OSI Layers 5, 6, and 7. Represents all high-level protocols like HTTP and SSH.
  2. Transport Layer: Directly maps to the OSI Transport Layer (TCP and UDP).
  3. Internet Layer: Directly maps to the OSI Network Layer (IP Protocol).
  4. Network Access Layer (Link Layer): Combines the OSI Data Link and Physical layers. Deals with the physical hardware (Ethernet cables, Wi-Fi radios) and MAC addressing.

Encapsulation: When you send an email, the message travels down the TCP/IP stack. At each layer, the protocol adds its own "Header" to the data. By the time it reaches the physical layer, your email text is wrapped in an HTTP header, a TCP header, an IP header, and an Ethernet frame header!



PreviousOSI Reference ModelNextTCP/IP Protocol Suite

Recommended Gear

OSI Reference ModelTCP/IP Protocol Suite