Interactive OSI Model
Click any layer to expand its protocols, PDU name, devices, and a plain-English analogy. Use this as a quick reference while studying or troubleshooting — the seven layers are the skeleton of every networking conversation.
The Application layer is the closest to the end user. It provides the interface between the applications running on a computer and the network. Protocols here define how applications request and receive data — a web browser uses HTTP, an email client uses SMTP, and a name lookup uses DNS. Layer 7 firewalls and load balancers inspect the actual content of the traffic to make forwarding or filtering decisions.
Think of this as the language two people speak. You and a colleague both understand English, so you can exchange ideas. The Application layer is the shared language that lets two programs understand each other.
The Presentation layer translates data between the format the network uses and the format the application expects. It handles character encoding (ASCII vs. UTF-8), data compression, and encryption/decryption. When your browser shows a padlock icon, the TLS encryption negotiated at this layer is at work.
Imagine a translator at a conference who converts between languages so each party hears their own. The Presentation layer converts data formats so both ends understand the same content.
The Session layer sets up, coordinates, and tears down conversations (sessions) between applications. It handles authentication, reconnection, and checkpointing so a long transfer can resume after a failure rather than starting over. It also manages simplex, half-duplex, or full-duplex communication modes.
This is like a moderator in a meeting who decides whose turn it is to speak, keeps track of the agenda, and adjourns the meeting when it is done.
The Transport layer provides end-to-end communication between processes on different hosts, identified by port numbers. TCP guarantees delivery with sequencing, error correction, and flow control. UDP skips that overhead for speed — ideal for real-time voice or video. This is where the concept of a "connection" lives.
Imagine choosing between registered mail (TCP) and a postcard (UDP). Registered mail is tracked and confirmed; the postcard is faster and cheaper but offers no delivery guarantee.
The Network layer handles logical addressing (IP addresses) and determines the best path for data across interconnected networks. Routers operate here, reading destination IP addresses and forwarding packets hop by hop toward their target. Routing protocols like OSPF and BGP build the road maps routers follow.
Think of the postal system deciding which sorting centres and trucks move a letter from one city to another. The Network layer is the route-planning engine that gets packets from source network to destination network.
The Data Link layer packages raw bits into frames and handles node-to-node delivery on the same local network using MAC (hardware) addresses. Switches operate here, reading the destination MAC to forward frames only to the correct port. Error detection (CRC) catches corrupted frames, and protocols like STP prevent loops.
If the Network layer is the GPS that plans city-to-city routes, the Data Link layer is the street signs and traffic lights that move you from one intersection to the next within a single neighbourhood.
The Physical layer transmits raw bits — ones and zeros — over a physical medium: copper cable, fibre-optic light pulses, or wireless radio waves. It defines voltages, pin layouts, cable lengths, and signalling rates. Hubs and repeaters operate here, amplifying or regenerating signals without understanding what the bits mean.
This is the road itself: the asphalt, the lanes, the width of the highway. Without the physical road, no vehicle (data) can travel anywhere.
In the NetForge-AI lab you can build a topology, fire a ping, and watch the packet animate through each OSI layer as it is encapsulated, routed, switched, and delivered — the fastest way to see the model in action.
Open the simulator and watch a pingWhy the OSI model matters
The Open Systems Interconnection model, published by ISO in 1984, splits network communication into seven layers, each with a single responsibility. That separation lets vendors build a Wi-Fi card (Layer 1) without worrying about how TCP retransmits lost data (Layer 4), and lets you swap Ethernet for fibre without touching a single firewall rule.
For troubleshooting, the model gives you a checklist: start at Layer 1 (is the cable plugged in?), move to Layer 2 (does the switch see a MAC?), then Layer 3 (can you ping the gateway?), and so on. Most real-world outages resolve by Layer 3 or 4 — but without the model, engineers waste time jumping randomly between configuration screens.
Every CCNA, CompTIA Network+, and university networking course tests the OSI model because it is the shared vocabulary the industry uses to describe where a problem lives and which team should fix it.
OSI model FAQ
What are the 7 layers of the OSI model?
From top to bottom: Layer 7 Application (end-user protocols like HTTP and DNS), Layer 6 Presentation (encryption, compression, encoding), Layer 5 Session (connection management and checkpointing), Layer 4 Transport (TCP/UDP, port numbers, reliable delivery), Layer 3 Network (IP addressing, routing), Layer 2 Data Link (MAC addresses, switching, framing), and Layer 1 Physical (cables, signals, bit transmission).
What is the difference between the OSI model and TCP/IP model?
The OSI model has 7 layers while TCP/IP has 4. TCP/IP's Application layer maps to OSI layers 5-7. TCP/IP's Transport layer matches OSI layer 4. TCP/IP's Internet layer corresponds to OSI layer 3. TCP/IP's Network Access (Link) layer covers OSI layers 1-2. In practice, the internet runs on TCP/IP, but the OSI model's finer granularity makes it the standard framework for teaching and troubleshooting.
Why do networking exams test the OSI model?
The OSI model gives you a systematic troubleshooting framework. When something breaks, you work layer by layer: Is the cable plugged in (L1)? Do you see the MAC address (L2)? Can you ping the gateway (L3)? Is the port open (L4)? Each layer isolates a category of problems, which makes diagnosis faster and more methodical than guessing.
Which OSI layers do switches and routers operate at?
Traditional switches operate at Layer 2 (Data Link) — they read MAC addresses and forward frames within a LAN. Routers operate at Layer 3 (Network) — they read IP addresses and forward packets between networks. Layer 3 switches combine both: they can route between VLANs at wire speed. Firewalls can operate at Layer 3-4 (packet filtering) or up to Layer 7 (deep packet inspection of application data).
More free tools: Subnet Calculator · CIDR Converter · VLSM Planner · Wildcard Mask Converter