OSI model and TCP/IP explained for students

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)

#LayerMain jobData unitExamples
7ApplicationNetwork services for user applicationsDataHTTP, HTTPS, FTP, SMTP, DNS
6PresentationTranslation, encryption, compressionDataSSL/TLS, JPEG, ASCII
5SessionOpens, manages and closes sessionsDataNetBIOS, RPC
4TransportEnd-to-end delivery, error and flow controlSegmentTCP, UDP
3NetworkLogical addressing and routingPacketIP, ICMP; router
2Data LinkPhysical (MAC) addressing, framing, error detectionFrameEthernet, Wi-Fi; switch
1PhysicalSends raw bits over the mediumBitsCables, 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)

TCPUDP
Connection-oriented (3-way handshake)Connectionless
Reliable: acknowledgements and retransmissionNo guarantee of delivery
Delivers data in orderPackets may arrive out of order
Slower, more overheadFaster, less overhead
Web pages, email, file transferVideo 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

 
Top