Computer Networks Essentials / Network Models

OSI Model (7 layers- Detailed)

πŸ€” What is the OSI Model?

The OSI Model stands for Open Systems Interconnection Model.

πŸ“Œ It is a conceptual (theoretical) model that explains:

How data travels from one computer to another over a network

Instead of handling networking as one big complex task, OSI divides it into 7 smaller layers, where each layer has a specific job.


🧠 Why Do We Need the OSI Model?

Without a model:

  • Networking becomes confusing ❌

  • Troubleshooting is difficult ❌

  • No standard structure ❌

With OSI Model:

  • Easy understanding βœ…

  • Easy troubleshooting βœ…

  • Standardized communication βœ…

  • Vendor-independent design βœ…


🧱 The 7 Layers of the OSI Model

From top to bottom:

Layer No

Layer Name

7️⃣

Application

6️⃣

Presentation

5️⃣

Session

4️⃣

Transport

3️⃣

Network

2️⃣

Data Link

1️⃣

Physical

🧠 Mnemonic (Easy to Remember):

All People Seem To Need Data Processing


🧭 How Data Moves in OSI Model

  • πŸ”½ Sender side β†’ Data moves top to bottom (Layer 7 β†’ 1)

  • πŸ”Ό Receiver side β†’ Data moves bottom to top (Layer 1 β†’ 7)


πŸ” Layer 7: Application Layer

Provides network services directly to the user.

πŸ“Œ This is the closest layer to the user.

  • Allows users to access network

  • Interface between user and network

  • Does NOT provide services to applications, but provides network access

  • Web browsing 🌐

  • Email πŸ“§

  • File transfer πŸ“‚

  • HTTP

  • FTP

  • SMTP

  • DNS

🧠 Real-Life Example

Using Chrome browser to open a website.


🧩 Layer 6: Presentation Layer

Responsible for data format and representation.

πŸ“Œ It ensures that data sent by sender is understood by receiver.

  • Data translation

  • Encryption πŸ”

  • Decryption

  • Compression πŸ“¦

  • Converting data into readable format

  • Encrypting data before sending

ZIP file compression or HTTPS encryption.


πŸ”— Layer 5: Session Layer

Manages sessions (connections) between devices.

πŸ“Œ It controls start, maintain, and end of communication.

  • Session establishment

  • Session maintenance

  • Session termination

  • Synchronization

  • Video call session

  • Login session

Logging into Zoom β†’ staying connected β†’ logging out.


🚚 Layer 4: Transport Layer

Ensures reliable data delivery between sender and receiver.

πŸ“Œ This is a very important layer.

  • Segmentation

  • Error control

  • Flow control

  • Data reassembly

  • TCP (Reliable)

  • UDP (Fast but unreliable)

Courier service ensuring parcel reaches correct person.


🧭 Layer 3: Network Layer

Handles logical addressing and routing.

πŸ“Œ It decides best path for data.

  • IP addressing

  • Routing

  • Packet forwarding

  • IP

  • ICMP

  • Routing protocols

Google Maps choosing best route.


πŸ”€ Layer 2: Data Link Layer

Provides node-to-node delivery.

πŸ“Œ It ensures data reaches correct device in same network.

  • Framing

  • MAC addressing

  • Error detection

  • Flow control

  • Switch

  • Bridge

Delivering parcel to correct house in a street.


⚑ Layer 1: Physical Layer

Responsible for physical transmission of data.

πŸ“Œ Deals with bits (0s and 1s).

  • Transmission of raw bits

  • Voltage levels

  • Cable types

  • Data rates

  • Cables

  • Hub

  • Repeater

Roads used to transport vehicles.


πŸ“Š Summary Table

Layer

Name

Key Function

7

Application

User interaction

6

Presentation

Format & encryption

5

Session

Connection management

4

Transport

Reliable delivery

3

Network

Routing

2

Data Link

MAC & framing

1

Physical

Bit transmission


⭐ Advantages of OSI Model

  • Easy troubleshooting

  • Standard reference model

  • Layer independence

  • Vendor-neutral


✍️ Definition

πŸ“Œ OSI Model is a 7-layer reference model that explains how data communication occurs in a computer network.


⭐ One-Line Summary

πŸ”Ή The OSI Model divides network communication into 7 layers, each with a specific responsibility.