Skip to content
Free, no sign-up, right in your browser

OSI model: learn the 7 layers interactively

Explore the interactive OSI model: each of its 7 layers shows its purpose, data unit (PDU), addressing, devices and protocols, alongside the TCP/IP model. Enter a term such as switch, ARP or 443 to see which layer it belongs to and why. Plus step-by-step encapsulation, a quiz and a PDF or PNG cheat sheet for training, study and exams.

Built by Justin Schuessler

Want to try out ports, firewalls and services yourself? Get your own VPS with root access.

Cheat sheet:

The matching layer lights up in both models, with a brief explanation.

Examples:

OSI model

TCP/IP model

The application is at the top, the cable at the bottom. The same height means the same role in both models.

Assignment

Enter a term, protocol, device, or port number above, or click an example. You'll see which layer it belongs to and why.

  • Filled: layer matching the search term
  • Outlined: the layer whose details appear below
  • Edge case: textbooks assign it to different layers; both interpretations are explained

OSI model, layer 7

Application layer

Application Layer

Provides the interface to applications and network services such as web access, email, name resolution, and file transfer.

Data unit (PDU)
Data
Addressing
no separate layer
In the TCP/IP model

Typical devices

Protocols and formats

Edge case: textbooks assign it to different layers. Click to see both interpretations.

Example result

How the OSI model classifies a term

Enter a term, protocol, device, or port number, and the tool shows the matching layer in both models and explains why. This is an example; your search will return an answer for your term.

Example · Input: ARP

Ambiguous case

Input

Search term
ARP

Output

Matches
ARP
OSI model
2 Data link layer / 3 Network layer
TCP/IP model
Network access layer / Internet layer
Reason
ARP finds the MAC address (layer 2) associated with an IP address (layer 3). Its messages travel directly in Ethernet frames, not IP packets. That's why some textbooks place it at layer 2, others at layer 3 or “layer 2.5.” In the TCP/IP model, RFC 1122 places ARP in the network access layer, while many textbooks place it in the internet layer alongside IP.

Why this tool

More than a table to memorize

You know the OSI model when you can apply it. Every feature is built to help you do that.

Both models side by side

The 7 OSI layers alongside the 4 TCP/IP layers, aligned to show you at a glance which ones correspond.

Layer mapping with explanations

Find the layer for protocols, devices, data units, and port numbers, each with a brief explanation.

Borderline cases explained clearly

ARP, TLS, ICMP, firewalls, and Layer 3 switches show both perspectives rather than forcing a misleading single answer.

Follow the encapsulation process

An HTTPS request and a DNS query pass through every layer: header by header, at both sender and receiver.

Practice mode with quiz

Order the layers, match protocols and devices, and learn standard ports. Each round is shuffled, with a short explanation for each match.

Printable cheat sheet

One page with both models, data units, devices, protocols, ports, and mnemonics, as a PDF or PNG.

How it works

Understand the OSI model in six steps

No account or download needed—use it right in your browser.

Step 1

Click a layer

Click one of the 7 layers to reveal its purpose, data unit, addressing, devices and protocols. The corresponding TCP/IP layer lights up too.

Step 2

Match a term

Enter a term, protocol, device or port number, such as switch, ARP, TLS or 443. The layer lights up in both models, and a short explanation tells you why it belongs there.

Step 3

Follow encapsulation

Switch to the “Encapsulation” view and follow an HTTPS request or DNS query through all the layers, header by header, step by step or as an animation.

Step 4

Practice in practice mode

Order the layers, match protocols and devices, and learn the standard ports. Each round is shuffled, and a short explanation tells you why each match is correct.

Step 5

Download cheat sheet

Download the one-page cheat sheet with both models, data units, devices, protocols, ports and mnemonics as a PDF or PNG.

Step 6

Share match

Your search term, selected layer and open view appear in the address bar. Copy the link so others can see the same match.

Basics

The OSI model explained simply

What the OSI model is

The OSI model (Open Systems Interconnection) is an ISO reference model, now published as ISO/IEC 7498-1. It divides communication between two systems into seven layers. Each layer has a clearly defined task and uses only the services of the layer below it.

Transport and application layers

Layers 1 to 4 focus on transport: they get data from the cable to the right program on the destination computer. Layers 5 to 7 focus on applications and handle session, presentation and application functions.

Encapsulation: header by header

When sending, each layer passes the data down and adds its header. Layer 2 also adds a trailer with a checksum. At the receiving end, each layer removes its part, from bottom to top. That's exactly what the tool's “Encapsulation” view shows.

OSI model and TCP/IP in practice

The internet uses the TCP/IP model and its four layers. The OSI model is mainly used for learning and troubleshooting, though terms like “Layer 2 switch” and “Layer 7 firewall” still come from it.

Explore the TCP/IP model and its 4 layers

Overview

The 7 layers of the OSI model

From top to bottom: what each layer does, what its data unit is called, how it addresses data, and which devices and protocols belong to it.

LayerFunctionData unitAddressingDevicesProtocols and formatsTCP/IP model
7 Application layerApplication LayerProvides the interface to applications and network services such as web access, email, name resolution, and file transfer.Data–Proxy, Gateway, Firewall, Load BalancerHTTP, HTTPS, DNS, DHCP, SSH, FTP, SMTP, IMAP, POP3, Telnet, SNMP, NTP, LDAP, SMB, RDP, TFTP, Syslog, MySQLApplication layer
6 Presentation layerPresentation LayerPuts data into a format both sides understand: character encoding, compression, and encryption.Data––TLS (SSL), Character encoding (ASCII, UTF-8), MIME, Data formats (JPEG, PNG, MPEG)Application layer
5 Session layerSession LayerEstablishes, maintains, and ends a session between two applications, for example by using checkpoints to resume after an interruption.Data––RPC, NetBIOS, TLS (SSL)Application layer
4 Transport layerTransport LayerConnects applications on both ends through ports: TCP transfers data reliably and in order, while UDP is fast and does not acknowledge receipt.Segment (TCP) / datagram (UDP)PortFirewall, Load BalancerTCP, UDPTransport layer
3 Network layerNetwork LayerLogically addresses devices using IP addresses and determines the route packets take across multiple networks (routing).PackageIP addressRouter, Layer 3 switch, Firewall, GatewayIP (IPv4, IPv6), ICMP, IPsec, ARPInternet layer
2 Data link layerData Link LayerGroups bits into frames, delivers them within the local network using MAC addresses, and detects transmission errors with a checksum. It also controls access to the shared medium.FrameMAC addressSwitch, Bridge, Access Point, Network card, Layer 3 switchEthernet, WLAN, PPP, VLAN, STP, ARPNetwork access layer
1 Physical layerPhysical LayerTransmits individual bits as electrical, optical, or radio signals and defines cables, connectors, frequencies, and transmission rates.Bits–Repeater, Hub, Modem, Network card, Network cableEthernet, WLAN, DSLNetwork access layer

Comparison

Difference between the OSI and TCP/IP models

Both models describe the same communication. The OSI model breaks it down in more detail and helps with learning and troubleshooting. The TCP/IP model describes how the internet is actually built.

FeatureOSI modelTCP/IP model
Layers74
SourceISO standard, published in 1984 as ISO 7498; now ISO/IEC 7498-1Originated from the US Department of Defense (DoD) ARPANET; described in RFC 1122 (1989)
PurposeVendor-neutral reference model, now used mainly for learning and troubleshootingDescribes the protocols the internet actually uses
Session and presentationSeparate layers 5 and 6Part of the application layer, handled by TLS or the application itself, for example
Lowest layerSplit into physical (1) and data link (2)One network access layer for cables, wireless connections, and MAC addresses
In practiceTerms such as “Layer 2 switch” or “Layer 7 firewall”The protocols themselves: IP, TCP, UDP, HTTP, DNS

Exam prep

Ambiguous cases: When the classification isn't clear-cut

Textbooks classify these terms differently. For open-ended exam questions, your reasoning matters; for multiple-choice questions, use the classification taught in your course. Knowing both views prepares you for either.

ARPOSI 2/3

ARP finds the MAC address (layer 2) associated with an IP address (layer 3). Its messages travel directly in Ethernet frames, not IP packets. That's why some textbooks place it at layer 2, others at layer 3 or “layer 2.5.” In the TCP/IP model, RFC 1122 places ARP in the network access layer, while many textbooks place it in the internet layer alongside IP.

TLS (SSL)OSI 5/6

TLS (formerly SSL) establishes a secure session and encrypts data. Those focused on session establishment place it in layer 5; those focused on encryption place it in layer 6. Despite the name “Transport Layer Security,” TLS runs above TCP, not at layer 4. In the TCP/IP model, it belongs to the application layer.

ICMPOSI 3

ICMP reports IP errors and status information, such as “destination unreachable,” and is used by ping and traceroute. Because ICMP messages are themselves carried in IP packets, it appears to sit one layer above IP. But as a supporting protocol for IP, it belongs to the network layer, or the internet layer in the TCP/IP model.

Layer 3 switchOSI 2/3

A layer 3 switch forwards frames like a switch (layer 2) and also routes between VLANs using IP addresses (layer 3). It therefore operates at both layers.

FirewallOSI 3/4/7

That depends on the type: a packet filter checks IP addresses (layer 3) and ports (layer 4), while a stateful firewall also checks connection state (layer 4). A web application firewall or application-level gateway checks content such as HTTP requests at layer 7.

From model to practice

Try out ports, firewalls, and services yourself

The best way to learn the layers is to work with them: install a service, open a port in the firewall, and check connectivity. These tools show you what happens at each layer.

A server of your own with root access is ideal for experimenting with SSH, web servers, DNS, or firewall rules. View VPS

Discover more

More network tools for learning and testing

Subnet Calculator

Calculate the network address, broadcast address, subnet mask, and usable host range from a CIDR address, and convert between CIDR and IP ranges (IPv4 and IPv6).

Built by Jakub Martyniak

Subnetting exercises

New

Practice subnetting with random exercises at three levels: determine the network address, broadcast address, host range and number of hosts, check your answers and view the solution step by step.

Built by Luca Stanek

TCP/IP model

New

Interactively learn the 4 layers of the TCP/IP model (DoD model) according to RFC 1122, with OSI model mapping, animated encapsulation, a port quiz, and a cheat sheet.

Built by Justin Schuessler

What is my IP?

Display the public IP address, IPv4/IPv6 version, reverse DNS record, and approximate country.

Built by Jakub Martyniak

Port Checker

Check whether specific ports are open on an IP or hostname—select a protocol or game instead of scanning all ports at once.

Built by Sebastian Rademacher

Common Ports & firewall commands

New

Enter a port or service to learn what it does and copy ready-to-use firewall commands for ufw, iptables, nftables, firewalld and Windows. Includes the complete IANA port list and a port check.

Built by Justin Schuessler

MAC Address Lookup

Identify the manufacturer/vendor of a MAC address using its OUI against a locally bundled IEEE registry snapshot, without sharing data with third parties.

Built by Rugile Rutkauskaite

Traceroute

New

Trace the route from our locations to you (and back), with packet loss at each hop and a plain-language analysis.

Built by Julian Alker

Ping Test

Measure ping, jitter, and packet loss to all Game Server locations and get a recommendation for the best one.

Built by Marvin Kluck

FAQ

Frequently asked questions about the OSI model

Quick answers about the OSI model, its layers, and related exam questions.

The OSI model is an ISO reference model (ISO/IEC 7498-1). OSI stands for Open Systems Interconnection. It divides communication between two computers into seven layers, from transmitting bits over a cable to the application. Each layer has a clear task and uses only the services of the layer below it. This helps you understand and plan networks and pinpoint faults.

The OSI model has seven layers. From bottom to top: 1 Physical, 2 Data Link, 3 Network, 4 Transport, 5 Session, 6 Presentation, and 7 Application. Layers 1 to 4 are transport-oriented; layers 5 to 7 are application-oriented.

The OSI model has seven layers. It is a vendor-neutral ISO reference model now used mainly for learning and troubleshooting. The TCP/IP model has four layers and describes the protocols the internet uses: network access (OSI 1 and 2), internet (OSI 3), transport (OSI 4) and application (OSI 5 to 7). Session and presentation are part of the application layer in this model. The tool shows both models side by side with their layers aligned.

A switch operates at layer 2 because it forwards frames based on MAC addresses. A router operates at layer 3 and determines the route based on IP addresses. Hubs and repeaters operate at layer 1; they only relay signals. A Layer 3 switch can do both: it switches at layer 2 and routes at layer 3. VLANs (IEEE 802.1Q) belong to layer 2 because the VLAN ID is a tag in the Ethernet frame.

Layer 1 transmits bits, Layer 2 frames, Layer 3 packets, and Layer 4 segments for TCP or datagrams for UDP. At Layers 5 to 7, they are simply called data. When sending, layers add their headers to the front; Layer 2 also adds a checksum (FCS) as a trailer. This is called encapsulation.

Both are borderline cases. ARP links an IP address (Layer 3) to a MAC address (Layer 2), but travels directly in an Ethernet frame, so textbooks place it at Layer 2, 3, or “2.5”. TLS establishes a session (Layer 5) and encrypts data (Layer 6), but despite its name, it is not on the transport layer. For open-ended questions, your reasoning matters; for multiple-choice questions, use the classification taught in your course.

Yes. Two common mnemonics use words beginning with the same letters as the layers. For the English layer names from layer 1 to 7: “Please Do Not Throw Sausage Pizza Away” for Physical, Data Link, Network, Transport, Session, Presentation and Application. For the German names from layer 7 to 1: “Alle Deutschen Schüler Trinken Verschiedene Sorten Bier” for Application, Presentation, Session, Transport, Network, Data Link and Physical. Both mnemonics appear in practice mode and on the cheat sheet.

For each term, the corresponding layer in both models and an explanation. Search for ARP to see 2 Data link layer / 3 Network layer in the OSI model and Network access layer / Internet layer in the TCP/IP model, plus why textbooks classify it differently. Click a layer to see its function, data unit, addressing, devices and protocols.

Mainly for troubleshooting, working up through the layers from the bottom: Is the cable connected and is the network card's light on (1)? Can the computer see other devices on the local network, such as in the ARP table (2)? Does the gateway respond to ping (3)? Is the port open (4)? Is the service running (7)? Traceroute and the port checker help with Layers 3 and 4.

The tool is free and requires no sign-up. It runs entirely in your browser; your input is not sent to a server. Only your search term appears in the address bar so you can share a match, and your browser stores your quiz high scores locally.

Any more questions?

Contact Support
Learned the theory?

Put it into practice: try your own VPS

With a ZAP-Hosting VPS, you can set up services, ports and firewall rules yourself and see how the layers work together.

4.4/5 Trustpilot32,000+ Active serversSince 2010

No setup. No risk. Online in seconds.

Flexible TermCancel anytimeOnline in 60 seconds

Looking for more tools? View all network tools