OSI Model Explanation
Overview
The OSI (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 system into seven distinct layers, each
with a specific function.
1. Physical Layer
Function: Transmits raw bits (0s and 1s) over a physical medium.
Examples: Ethernet cables, fiber optics, radio frequencies.
Key Devices: Hubs, Repeaters, Cables.
Working: Converts digital data into electrical/optical signals and transmits them. No interpretation of data.
2. Data Link Layer
Function: Provides error detection, flow control, and framing.
Divided into:
- MAC (Media Access Control): Controls how devices access the medium.
- LLC (Logical Link Control): Error and frame synchronization.
Examples: Ethernet (IEEE 802.3), PPP, Switches.
Working: Ensures a reliable link between two directly connected nodes by packaging bits into frames.
3. Network Layer
Function: Handles logical addressing and path selection (routing).
Key Concepts: IP addressing, routing, fragmentation.
Examples: IP (IPv4, IPv6), ICMP, Routers.
Working: Determines the best path for data from source to destination and forwards packets accordingly.
4. Transport Layer
Function: Ensures reliable delivery of messages between devices.
Key Protocols:
OSI Model Explanation
- TCP (Reliable, connection-oriented)
- UDP (Unreliable, connectionless)
Responsibilities: Segmentation, reassembly, error recovery, and flow control.
Working: Breaks data into segments, assigns sequence numbers, manages retransmission of lost packets.
5. Session Layer
Function: Manages sessions or connections between applications.
Examples: APIs, RPC, NetBIOS.
Responsibilities: Session establishment, maintenance, and termination.
Working: Coordinates dialogue between two systems; ensures the session is maintained and synchronized.
6. Presentation Layer
Function: Translates data between the application and the network.
Key Roles:
- Data translation (syntax/semantics)
- Data compression
- Encryption/decryption
Examples: SSL/TLS, JPEG, MPEG, ASCII.
Working: Converts data into a format understandable by the application (e.g., encoding/decoding).
7. Application Layer
Function: Provides network services directly to the user or application.
Examples: HTTP, FTP, SMTP, DNS, POP3.
Responsibilities: File transfers, email, remote login, etc.
Working: The user interacts with applications that make use of protocols defined in this layer.
OSI Model Working Example
Example: Sending an Email
1. Application Layer: You write and send an email (via SMTP).
OSI Model Explanation
2. Presentation Layer: The email text is converted into ASCII, encrypted if needed.
3. Session Layer: A session is created between your email client and the server.
4. Transport Layer: Data is broken into segments, TCP ensures reliable delivery.
5. Network Layer: IP adds logical addressing and routes packets.
6. Data Link Layer: Frames are created with MAC addresses and error checking.
7. Physical Layer: Bits are sent over the wire or air to the destination.
When received, the layers work in reverse (from Physical up to Application).
Summary Table
Layer | Function | Protocols/Examples
7 - Application | End-user services | HTTP, FTP, SMTP
6 - Presentation | Data format, encryption | SSL/TLS, JPEG
5 - Session | Session management | NetBIOS, RPC
4 - Transport | Reliable transmission | TCP, UDP
3 - Network | Logical addressing, routing | IP, ICMP
2 - Data Link | Framing, MAC addressing | Ethernet, PPP
1 - Physical | Transmission of bits | Cables, Hubs