The OSI Model (Open Systems Interconnection Model) is a conceptual framework used to
understand and standardize how different networking protocols interact in a network. It divides
the communication process into 7 layers, each with specific functions and protocols.
The 7 Layers of the OSI Model
1. Physical Layer (Layer 1)
o Function: Deals with the physical connection between devices and the
transmission of raw binary data (bits) over a medium.
o Responsibilities:
Defines cables, connectors, and signals.
Manages data transmission rate and synchronization.
o Examples: Ethernet cables, fiber optics, hubs, repeaters.
2. Data Link Layer (Layer 2)
o Function: Responsible for node-to-node data transfer and error
detection/correction.
o Responsibilities:
Organizes data into frames.
Handles MAC addresses (physical addressing).
o Sub-layers:
MAC (Media Access Control): Controls access to the physical medium.
LLC (Logical Link Control): Provides error detection and flow control.
o Examples: Switches, Wi-Fi (802.11), Ethernet (802.3).
3. Network Layer (Layer 3)
o Function: Manages data routing, addressing, and packet forwarding across
networks.
o Responsibilities:
Logical addressing (IP addresses).
Determines the best path for data transmission.
o Examples: Routers, IP (IPv4/IPv6), ICMP (ping).
4. Transport Layer (Layer 4)
o Function: Ensures reliable data transfer between devices.
o Responsibilities:
Segmentation and reassembly of data.
Error recovery and flow control.
Uses protocols like TCP (reliable, connection-oriented) and UDP (faster,
connectionless).
o Examples: TCP, UDP.
5. Session Layer (Layer 5)
o Function: Establishes, manages, and terminates communication sessions between
applications.
o Responsibilities:
Synchronizes data exchange.
Maintains session state.
o Examples: NetBIOS, Remote Procedure Call (RPC).
6. Presentation Layer (Layer 6)
o Function: Ensures that data is in a usable format for the application layer.
Handles encryption, decryption, compression, and translation.
o Responsibilities:
Data encoding/decoding.
Data compression and encryption.
o Examples: JPEG, PNG, ASCII, SSL/TLS.
7. Application Layer (Layer 7)
o Function: Serves as the interface between the user and the network, providing
access to network services.
o Responsibilities:
Supports software applications like web browsers and email clients.
o Examples: HTTP, FTP, DNS, SMTP, POP3.
Key Points about the OSI Model
Encapsulation: As data moves down the layers, each layer adds its own header (and
sometimes a footer).
Decapsulation: At the receiving end, the layers remove their headers in reverse order.
Real-world Usage: While the OSI model is theoretical, the TCP/IP model is more
commonly used in practice.