The OSI model is one of the most frequently asked topics in Computer Networks and Data Communication exams. This guide explains all 7 layers with their functions, protocols and devices, compares OSI with the TCP/IP model, and gives an easy trick to remember the layers.
What Is the OSI Model?
The Open Systems Interconnection (OSI) model, published by the International Organization for Standardization (ISO), is a conceptual framework that divides network communication into 7 layers. Each layer has a specific job and serves the layer above it. It helps engineers design, understand and troubleshoot networks.
The 7 Layers (Top to Bottom)
| # | Layer | Main job | Data unit | Examples |
|---|---|---|---|---|
| 7 | Application | Network services for user applications | Data | HTTP, HTTPS, FTP, SMTP, DNS |
| 6 | Presentation | Translation, encryption, compression | Data | SSL/TLS, JPEG, ASCII |
| 5 | Session | Opens, manages and closes sessions | Data | NetBIOS, RPC |
| 4 | Transport | End-to-end delivery, error and flow control | Segment | TCP, UDP |
| 3 | Network | Logical addressing and routing | Packet | IP, ICMP; router |
| 2 | Data Link | Physical (MAC) addressing, framing, error detection | Frame | Ethernet, Wi-Fi; switch |
| 1 | Physical | Sends raw bits over the medium | Bits | Cables, hubs, signals |
Easy Trick to Remember the Layers
From layer 1 to 7: "Please Do Not Throw Sausage Pizza Away" = Physical, Data Link, Network, Transport, Session, Presentation, Application.
Encapsulation: How Data Travels
When you send a message, each layer on the sender side adds its own header (the data link layer also adds a trailer). This is called encapsulation. On the receiving side each layer removes its header (de-encapsulation) and passes the data up until it reaches the application.
TCP vs UDP (Transport Layer)
| TCP | UDP |
|---|---|
| Connection-oriented (3-way handshake) | Connectionless |
| Reliable: acknowledgements and retransmission | No guarantee of delivery |
| Delivers data in order | Packets may arrive out of order |
| Slower, more overhead | Faster, less overhead |
| Web pages, email, file transfer | Video calls, live streaming, online games, DNS queries |
OSI Model vs TCP/IP Model
The TCP/IP model is the practical model used on the Internet. It is usually described with 4 layers:
- Application = OSI Application + Presentation + Session
- Transport = OSI Transport
- Internet = OSI Network
- Network Access (Link) = OSI Data Link + Physical
OSI is a reference model mainly used for teaching and troubleshooting; TCP/IP is the model actual Internet protocols are built on.
Network Devices and Their Layers
- Hub / repeater: Physical layer – repeats signals to all ports.
- Switch / bridge: Data Link layer – forwards frames using MAC addresses.
- Router: Network layer – forwards packets between networks using IP addresses.
- Gateway / firewall: can work at several layers, up to the Application layer.
Common Port Numbers
HTTP 80, HTTPS 443, FTP 20/21, SSH 22, SMTP 25, DNS 53.
FAQ
Which OSI layer does a router work on?
The Network layer (layer 3), because it routes packets using IP addresses.
What is the difference between a MAC address and an IP address?
A MAC address is a fixed hardware address used at the Data Link layer inside a local network. An IP address is a logical address used at the Network layer to reach devices across networks.
Practise with the free computer basics MCQ test and explore more study guides.
0 comments:
Post a Comment