NextGen Sarkari

Study material for government exam preparation across Punjab and India.

Home/Study Material/Networking & Technical/OSI Model Explained
Fundamentals study guide

OSI Model Explained

Build a practical understanding of all seven OSI layers, how data is encapsulated and how the model guides real incident troubleshooting.

FundamentalsBeginner18 min readUpdated 2026-08-06

Why the OSI model matters

The OSI model is a seven-layer reference framework used to describe how applications communicate over networks. Real protocols do not always fit perfectly into one layer, but the model gives engineers a shared troubleshooting language.

Best interview use: Do not only recite layer names. Explain what each layer contributes and how you would test it during an outage.

The seven layers

LayerMain responsibilityExamples / devicesPDU
7 ApplicationNetwork services used by applications.HTTP, DNS, SMTP, SSHData
6 PresentationFormat, encoding, encryption and compression.TLS concepts, JSON, character encodingData
5 SessionEstablishes, maintains and ends logical conversations.Session checkpoints, RPC/session controlData
4 TransportEnd-to-end delivery, reliability, segmentation and ports.TCP, UDP, load balancersSegment / datagram
3 NetworkLogical addressing and routing between networks.IPv4/IPv6, ICMP, routersPacket
2 Data LinkFrames, MAC addressing and local-segment delivery.Ethernet, 802.1Q, switchesFrame
1 PhysicalSignals, media, connectors and bit transmission.Fibre, copper, radio, transceiversBits

Encapsulation and de-encapsulation

Application data
TCP/UDP header
IP header
Ethernet header + trailer

The sender adds control information as data moves down the stack. The receiver removes and validates it as data moves upward. A packet capture lets you inspect several layers at once.

Layer-by-layer troubleshooting

SymptomLikely starting layerChecks
Interface is down / no lightLayer 1Cable, transceiver, speed, duplex, signal, interface state.
Same VLAN hosts cannot communicateLayer 2VLAN membership, MAC table, STP state, trunk allowance.
Remote subnet unreachableLayer 3IP, mask, gateway, ARP/ND, route, ACL.
Ping works but application failsLayer 4–7Port listening, firewall, TLS, DNS, application logs.
Name fails but IP worksLayer 7DNS resolver, record, cache and reachability to DNS service.

Interview explanation example

Question: A user cannot open an HTTPS application. How do you troubleshoot?

  1. Check link/Wi-Fi and interface status.
  2. Verify VLAN, address, mask and default gateway.
  3. Test gateway and remote-IP reachability.
  4. Test DNS resolution.
  5. Test TCP/443 and inspect firewall/load-balancer path.
  6. Check TLS certificate, SNI and application response.
  7. Use packet captures and logs to identify the exact failure.

Quick self-check

1. Which layer handles logical IP addressing?
Answer: Layer 3, the Network layer.
2. Which layer uses ports?
Answer: Layer 4, the Transport layer.
3. At which layer does a switch primarily forward Ethernet frames?
Answer: Layer 2.
4. What is the PDU at Layer 2?
Answer: Frame.
5. Why is the OSI model useful even though the Internet uses TCP/IP?
Answer: It provides a structured vocabulary and troubleshooting method.

Frequently asked questions

1. Is the OSI model an actual protocol suite?
Answer: No. It is primarily a reference model. The TCP/IP suite is what the Internet uses operationally.
2. Where does TLS belong?
Answer: It is often associated with the presentation/session area, but real implementations cross model boundaries. Explain the function instead of forcing a perfect layer label.
3. Is a firewall Layer 3 or Layer 7?
Answer: It depends on its capabilities. Basic filtering uses network and transport information; next-generation firewalls can inspect application-layer traffic.

Standards and further reading

Editorial note: Vendor commands and best-path tie-breakers can differ by platform and software release. Always verify production configuration against the device vendor documentation.

Continue learning