OSI Model Reference

The OSI (Open Systems Interconnection) model is the foundational framework for understanding how network communication works. Click on any layer below to explore its protocols, data units, devices, and real-world examples.

Interactive OSI Model

OSI Model Reference
Figure 1 — OSI Model Reference

What Is the OSI Model?

The OSI (Open Systems Interconnection) model is a conceptual framework created by the International Organization for Standardization (ISO) in 1984. It divides network communication into seven distinct layers, each with specific responsibilities. Understanding the OSI model is fundamental to networking — it's the vocabulary used by network engineers to describe and troubleshoot communication problems.

When you visit a website, your request passes through all seven layers on its way out and back again. Each layer adds its own headers and processing. For example, the Application layer handles DNS resolution, the Transport layer manages TCP ports, and the Network layer handles IP addressing.

The Seven Layers at a Glance

#LayerPDUKey FunctionKey Protocol
7ApplicationDataUser interface to networkHTTP, DNS, SMTP
6PresentationDataData format, encryptionSSL/TLS, JPEG
5SessionDataSession managementNetBIOS, RPC
4TransportSegmentEnd-to-end deliveryTCP, UDP
3NetworkPacketRouting, IP addressingIP, ICMP, OSPF
2Data LinkFrameMAC addressing, switchingEthernet, Wi-Fi
1PhysicalBitPhysical transmissionCables, signals

Pro Tip: A common mnemonic to remember the layers (top to bottom) is "All People Seem To Need Data Processing" — Application, Presentation, Session, Transport, Network, Data Link, Physical. For bottom-to-top, try "Please Do Not Throw Sausage Pizza Away." Understanding which layer a problem exists at is the key to efficient network troubleshooting.

Layer 7: Application

The Application layer is the closest to the end user. It provides the interface between the user's applications and the network. When you type a URL in your browser, you're interacting with Layer 7 protocols like HTTP and DNS.

Common Layer 7 operations include:

  • DNS resolution — Translating domain names to IP addresses
  • HTTP/HTTPS — Web browsing and API communication
  • SMTP/IMAP/POP3 — Email sending and retrieval
  • DHCP — Automatic IP address assignment
  • SSH — Secure remote access

Layer 3: Network — The Routing Layer

Layer 3 is where IP addressing and routing happen. Your router is primarily a Layer 3 device — it reads the destination IP address in each packet and forwards it toward the correct network.

ProtocolFunctionRelated Tool
IPv4/IPv6Logical addressingSubnet Calculator
ICMPError reporting, pingPing Test
ARPIP to MAC resolutionMAC Lookup
OSPF/BGP/RIPRouting protocols
NATAddress translationWhat Is NAT?

OSI Model vs TCP/IP Model

In practice, the internet uses the TCP/IP model (4 layers) rather than the OSI model (7 layers). The OSI model is used primarily as an educational and reference framework:

OSI LayerTCP/IP LayerProtocols
7 - ApplicationApplicationHTTP, DNS, SMTP, FTP
6 - PresentationSSL/TLS, encoding
5 - SessionSession management
4 - TransportTransportTCP, UDP
3 - NetworkInternetIP, ICMP
2 - Data LinkNetwork AccessEthernet, Wi-Fi
1 - PhysicalCables, signals

For a detailed look at the TCP/IP model, see our TCP/IP Layer Reference.

Note: While the OSI model has 7 distinct layers, real-world protocols don't always map neatly to a single layer. For example, TLS operates between the Transport and Application layers, and ARP works at both Layer 2 and Layer 3. The model is best used as a conceptual guide for understanding network communication, not as a rigid classification system.

Troubleshooting with the OSI Model

When diagnosing network problems, work through the layers systematically:

  1. Layer 1 (Physical) — Check cables, lights, and physical connections. Is the link light on?
  2. Layer 2 (Data Link) — Check MAC addresses, switch ports, and VLAN configuration. Can the device reach the local switch?
  3. Layer 3 (Network) — Check IP configuration, subnet masks, and gateway settings. Can you ping the router?
  4. Layer 4 (Transport) — Check port accessibility and firewall rules. Are the right ports open?
  5. Layer 7 (Application) — Check DNS resolution, application config, and service status. Does the service respond correctly?

This bottom-up approach (or top-down, starting from Layer 7) ensures you systematically eliminate possible failure points. If you're having DNS issues, you know the problem is at Layer 7. If you can't ping the gateway, the issue is at Layer 3 or below.

Data Encapsulation Process

As data moves down the OSI layers, each layer adds its own header (and sometimes trailer) to the data. This process is called encapsulation:

  1. Application data — The original user data (e.g., an HTTP request)
  2. Transport segment — TCP/UDP header added (source/destination ports, sequence numbers)
  3. Network packet — IP header added (source/destination IP addresses)
  4. Data Link frame — Ethernet header and trailer added (MAC addresses, FCS)
  5. Physical bits — Converted to electrical signals, light pulses, or radio waves

At the receiving end, this process is reversed (de-encapsulation), with each layer stripping its header and passing the data up.

Key Takeaways
  • The OSI model divides network communication into 7 layers, each with specific responsibilities.
  • PDUs change names at each layer: Data → Segment → Packet → Frame → Bit.
  • The TCP/IP model (4 layers) is what the internet actually uses; OSI is the educational reference.
  • Troubleshooting by layer (bottom-up or top-down) systematically eliminates failure points.
  • Routers operate at Layer 3, switches at Layer 2, and web applications at Layer 7.
  • Encapsulation adds headers at each layer; de-encapsulation removes them on the receiving end.

Video: OSI Model Explained

Related Tools and Guides

Frequently Asked Questions

What is the OSI model used for?

The OSI model is used as a conceptual framework for understanding and troubleshooting network communication. Network engineers use it to describe where problems occur ("the issue is at Layer 3"), design network architectures, and communicate about networking concepts. While the internet uses the TCP/IP model, OSI remains the standard teaching and reference framework.

How many layers does the OSI model have?

The OSI model has seven layers: Physical (1), Data Link (2), Network (3), Transport (4), Session (5), Presentation (6), and Application (7). Data flows down from Layer 7 to Layer 1 when sending, and up from Layer 1 to Layer 7 when receiving.

What layer does a router operate at?

Routers primarily operate at Layer 3 (Network layer) because they make forwarding decisions based on IP addresses. However, modern routers often include functionality at other layers — NAT firewalls operate at Layer 4, and application-aware routers can inspect Layer 7 traffic for QoS and security.

What is the difference between OSI and TCP/IP models?

The OSI model has 7 layers and is a theoretical framework. The TCP/IP model has 4 layers (Application, Transport, Internet, Network Access) and describes how the internet actually works. The TCP/IP model combines OSI Layers 5-7 into a single Application layer and Layers 1-2 into Network Access.

What layer is DNS on?

DNS operates at Layer 7 (Application layer) of the OSI model. It uses UDP port 53 (Layer 4 Transport) for most queries and TCP port 53 for zone transfers and large responses. DNS over HTTPS (DoH) adds Layer 6 encryption via TLS.

What is a PDU in networking?

A PDU (Protocol Data Unit) is the name for data at each OSI layer. At Layer 7 it's simply "data," at Layer 4 it's a "segment" (TCP) or "datagram" (UDP), at Layer 3 it's a "packet," at Layer 2 it's a "frame," and at Layer 1 it's "bits." Each PDU includes the previous layer's PDU plus its own header.

How do I use the OSI model for troubleshooting?

Start from Layer 1 and work up (bottom-up approach): check physical connections first, then verify MAC/switch connectivity (Layer 2), then IP/routing (Layer 3), then port access (Layer 4), and finally application services (Layer 7). This systematic approach ensures you identify the root cause rather than just symptoms.

About Tommy N.

Tommy is the founder of RouterHax and a network engineer with 10+ years of experience in home and enterprise networking. He specializes in router configuration, WiFi optimization, and network security. When not writing guides, he's testing the latest mesh WiFi systems and helping readers troubleshoot their home networks.

Promotion for FREE Gifts. Moreover, Free Items here. Disable Ad Blocker to get them all.

Once done, hit any button as below