OSI model

On this page 7

The OSI model (Open Systems Interconnection reference model) is a seven-layer conceptual framework that divides network communication into distinct functions, from the transmission of bits over a physical medium up to the services that applications use. In networking fundamentals, it is the shared vocabulary engineers use to describe where a protocol, device or fault belongs.

The model was published by the International Organization for Standardization as ISO/IEC 7498-1, with the first edition in 1984. The protocol suite designed around it never displaced TCP/IP, but the layer numbers and terms remain the standard way to discuss network architecture and troubleshooting.

The seven layers of the OSI model

Each OSI layer provides services to the layer above and uses the services of the layer below. Layers 1 to 4 are often called the lower or transport-oriented layers, while layers 5 to 7 deal with the application side of communication.

The table lists the layers from the bottom up, with their responsibility, the name of the data unit they handle and typical protocols or devices.

LayerMain responsibilityData unitTypical examples
1 PhysicalBits as electrical, optical or radio signalsBitCabling, transceivers, hubs
2 Data linkFraming and local delivery by MAC addressFrameEthernet, Wi-Fi, switches
3 NetworkLogical addressing and routingPacketIPv4, IPv6, routers
4 TransportEnd-to-end delivery, ports, reliabilitySegment or datagramTCP, UDP
5 SessionDialogue setup and synchronizationDataRPC sessions, NetBIOS
6 PresentationData representation and encodingDataCharacter encoding, compression
7 ApplicationNetwork services for applicationsDataHTTP, DNS, SMTP
The OSI layers with functions and examples

Neighboring networking concepts map onto these layers. A MAC address and a VLAN are layer 2 concepts, LAN and WLAN technologies span layers 1 and 2, and a WAN connection may involve several layers depending on the service. Placing a term on the right layer is often the fastest way to understand what it can and cannot do.

How encapsulation moves data through the layers

OSI communication relies on encapsulation. On the sending host, each layer adds its own header, and sometimes a trailer, to the data received from the layer above, and the receiving host removes them in reverse order.

This creates peer communication between equal layers: the transport layer on one host effectively talks to the transport layer on the other, even though the data physically passes down and up the full stack. Intermediate devices only process the layers they need, so a router inspects up to layer 3 while a switch normally works at layer 2.

The model uses formal terms for these interactions. A layer’s information exchanged with its peer is a protocol data unit (PDU), and the interface between adjacent layers is a service access point, a concept that clarifies why layers can change independently.

OSI model compared with the TCP/IP model

The internet actually runs on the TCP/IP model, which has four or five layers depending on the textbook. OSI is a reference model, whereas TCP/IP grew from working protocols, so the mapping between them is approximate.

OSI layersTCP/IP layerProtocols at that level
7, 6, 5 Application, presentation, sessionApplicationHTTP, TLS, DNS, SMTP
4 TransportTransportTCP, UDP, QUIC
3 NetworkInternetIP, ICMP
2, 1 Data link, physicalLink or network accessEthernet, Wi-Fi, ARP
Approximate mapping between OSI and TCP/IP layers

Real protocols often do not fit one layer cleanly. TLS handles encryption, a presentation-like task, but also session state; ARP links layer 3 addresses to layer 2 addresses; QUIC runs over UDP yet provides reliable transport and encryption. Experienced engineers treat the layers as a guide, not a strict law.

Using the OSI model in practice

The most frequent practical use of the OSI model is structured troubleshooting. Engineers test layer by layer, either bottom-up from the cable or top-down from the application, so that no possible cause is skipped.

LayerTypical symptomCommon check
PhysicalNo link light, high error countersCable test, port status, signal level
Data linkLink up but no local reachabilityMAC table, VLAN membership, duplex
NetworkLocal works, remote does notIP settings, default gateway, routes
TransportHost reachable but service refusedPort state, firewall rules
ApplicationService responds with errorsLogs, DNS resolution, certificates
Troubleshooting by OSI layer

Layer numbers also appear in product and job terminology. A layer 2 switch forwards frames by MAC address, a layer 3 switch also routes between VLANs, a layer 4 load balancer distributes connections by port, and a layer 7 firewall inspects application content. Vendors use these labels to signal how deeply a device inspects traffic.

Limitations and common misconceptions

The OSI model is a teaching and design abstraction, and several misunderstandings arise when it is treated as a description of real protocol stacks.

  • The internet does not run OSI protocols; it runs TCP/IP, which merges layers 5 to 7.
  • Session and presentation layers rarely exist as separate software; their functions live inside applications or TLS.
  • Devices are not limited to one layer; modern switches, firewalls and routers operate across several.
  • Layer 8 is a joke, used informally for user or organizational problems, not part of the standard.
  • Memorizing the layers is not understanding; the value lies in separating responsibilities.

Understanding it simply

Sending data across a network is like sending a parcel through a postal system. Someone writes the letter, someone packs it, someone addresses it, a sorting center routes it, and trucks carry it on roads.

The OSI model gives each of those jobs its own numbered step, seven in total. When something goes wrong, the steps tell you where to look: a broken road, a wrong address or a badly written letter are very different problems.

Applied in practice

A help desk at a university receives a complaint that a lecturer’s laptop cannot open the course portal from one lecture hall. The network technician works bottom-up through the layers. The link light is on and the switch port shows no errors, so layers 1 and 2 look healthy.

The laptop has an IP address, but in the wrong subnet. The technician finds that the wall port was moved into a guest VLAN during a recent change, which gives the laptop an address without access to internal servers, a layer 2 configuration causing a layer 3 symptom.

After the port is reassigned to the staff VLAN, the laptop receives the correct address and the portal loads. The ticket records the cause by layer, which helps the team spot repeated VLAN errors in later reviews.