1. Introduction
- Definition: A conceptual framework used to describe the functions of a networking system.
- Developer: International Organization for Standardization (ISO).
- Year: Published in 1984.
- Purpose: To guide product implementers so their products will work with other products (Interoperability). It standardizes how different computer systems communicate.
2. The Structure (7 Layers)
The model divides network communication into seven layers.
* Control Flow: Data moves down the layers at the sender (Encapsulation) and up the layers at the receiver (Decapsulation).
Mnemonic to remember order (Bottom-up):
> Please Do Not Throw Sausage Pizza Away
> (Physical, Data Link, Network, Transport, Session, Presentation, Application)
3. Layer-by-Layer Breakdown
Layer 7: Application Layer
- Function: The "User Interface" layer. It creates the data and interacts directly with the software application (like a web browser or email client).
- Key Actions: Network access for applications, resource sharing.
- Protocols: HTTP, HTTPS, FTP, SMTP, DNS, Telnet.
- PDU (Protocol Data Unit): Data.
Layer 6: Presentation Layer
- Function: The "Translator." Ensures data is in a usable format for the receiver.
- Key Actions:
- Translation: (e.g., ASCII to EBCDIC).
- Encryption/Decryption: (SSL/TLS happens here).
- Compression: Reduces data size.
- PDU: Data.
Layer 5: Session Layer
- Function: The "Manager." Controls the conversation between two computers.
- Key Actions:
- Establishing, maintaining, and terminating connections (Sessions).
- Synchronization (checkpoints) to prevent data loss.
- PDU: Data.
Layer 4: Transport Layer
- Function: "End-to-End Delivery." Ensures data is transferred reliably and without errors.
- Key Actions:
- Segmentation: Breaking data into chunks.
- Flow Control: Managing data speed.
- Error Control: Retransmitting lost data.
- Protocols: TCP (Reliable), UDP (Fast/Unreliable).
- PDU: Segment (TCP) or Datagram (UDP).
Layer 3: Network Layer
- Function: "Path Determination." Decides the physical path the data will take (Routing).
- Key Actions:
- Logical Addressing: Assigning Sender/Receiver IP addresses.
- Routing: Moving packets across different networks.
- Hardware: Routers, Layer 3 Switches.
- Protocols: IP (IPv4, IPv6), ICMP.
- PDU: Packet.
Layer 2: Data Link Layer
- Function: "Node-to-Node Transfer." Defines how data is formatted for transmission over the physical medium.
- Key Actions:
- Physical Addressing: MAC Addresses.
- Error Detection: Adds a Trailer (FCS) to check for corruption.
- Sub-layers:
- LLC (Logical Link Control): Talks to Network Layer.
- MAC (Media Access Control): Talks to Physical Layer.
- Hardware: Switches, Bridges, NIC (Network Interface Card).
- PDU: Frame.
Layer 1: Physical Layer
- Function: "Transmission." The actual hardware connection.
- Key Actions: Transmitting raw bitstreams (0s and 1s) over a physical medium.
- Components: Cables (Ethernet, Fiber), Voltage, Radio frequencies (Wi-Fi), Hubs, Repeaters.
- PDU: Bit.
4. Summary Table
| Layer # | Layer Name | Main Responsibility | PDU (Unit) | Devices/Protocols |
| :--- | :--- | :--- | :--- | :--- |
| 7 | Application | Network Process to Application | Data | Chrome, Outlook, HTTP |
| 6 | Presentation | Encryption & Formatting | Data | JPEG, MP3, SSL |
| 5 | Session | Inter-host Communication | Data | NetBIOS, RPC |
| 4 | Transport | End-to-End Connections | Segment | TCP, UDP, Firewalls |
| 3 | Network | Routing & Logical Addressing | Packet | Routers, IP |
| 2 | Data Link | Physical Addressing (MAC) | Frame | Switches, Ethernet |
| 1 | Physical | Media, Signal, and Binary | Bit | Cables, Hubs |
5. Key Concepts
- Encapsulation:
As data moves down from Layer 7 to Layer 1, each layer adds a "Header" (and sometimes a "Trailer" at Layer 2) to the data. This is like putting a letter inside an envelope, then inside a box, then on a shipping truck.
- Decapsulation:
As data moves up from Layer 1 to Layer 7 at the receiving end, the headers are stripped off layer by layer until only the original data remains.
6. Why use the OSI Model?
- Troubleshooting: It helps isolate problems. (e.g., "Is this a physical cable issue (Layer 1) or an IP address issue (Layer 3)?")
- Standardization: Allows hardware from different vendors (e.g., Cisco and Juniper) to work together.
- Modular Engineering: A change in one layer (upgrading from IPv4 to IPv6) doesn't require changing the other layers (like your cables or applications).