Protocol Stacks and OSI: How Network Jobs Fit Together
A laptop can say it's connected to Wi-Fi while a webpage refuses to load. Both can be true. Joining a local network, such as the connected devices in your home, is only one of the jobs needed to reach a website.
Networking divides those jobs among cooperating parts. A protocol is a set of rules for exchanging information. A protocol stack is a group of protocols working together to carry out the exchange.
The OSI model, short for Open Systems Interconnection, provides a seven-layer map of the work involved. Each layer describes a kind of responsibility, from carrying physical signals to supporting an application's communication.
That map is useful for explaining and investigating a connection. The software handling an internet request doesn't have to be arranged as seven separate programs, though. OSI is a reference model; the actual protocol stack is what carries the data.
The Seven Layers Behind Every Network Message
The Seven Jobs on the Map
OSI numbers its layers from 1 at the bottom to 7 at the top. Starting with the work closest to an application, the model looks like this:
| Layer | Name | Job it describes |
|---|---|---|
| 7 | Application | Supplies communication functions used by applications, such as exchanging requests and replies. |
| 6 | Presentation | Puts shared data in a form that both sides can interpret. |
| 5 | Session | Organizes and coordinates an ongoing exchange between applications. |
| 4 | Transport | Provides communication between the devices at the two ends, with features determined by the protocol. |
| 3 | Network | Addresses data and directs it through networks. |
| 2 | Data link | Organizes the transfer of data over a local connection. |
| 1 | Physical | Carries bits—the ones and zeros of digital data—as electrical, light or radio signals. |
The official OSI reference model describes these responsibilities in much more detail. Its purpose is to provide a shared framework, rather than prescribe every detail of a working system.
The application layer, for example, describes communication functions used by a program. It doesn't mean everything a person does inside a browser belongs to the networking stack. Typing a note in a box and sending that note to a website are different activities.
The transport layer doesn't automatically promise perfect delivery. Different transport protocols provide different services.
Follow One Web Request
Imagine a browser requesting a page over HTTPS, the protected form of web communication. For this example, we'll follow one common arrangement that uses TCP. The request depends on several protocols doing different jobs.
HTTP, or Hypertext Transfer Protocol, supplies rules for the request and the website's response. HTTPS adds protection for that exchange, as the HTTP specification explains. The website runs on a server, a computer that provides a service to other computers.
- Keep work, guest and smart-home gear apart with up to 32 VLANs on one small switch.
- Copy any port's traffic to your laptop with port mirroring and see what is on the wire.
- Set it up from a web page instead of learning a command line.
TLS, or Transport Layer Security, protects the communication. It uses encryption, which scrambles data so someone without the necessary secret information can't readily read it, and checks for tampering. The TLS 1.3 specification describes the protected channel it provides.
TCP, or Transmission Control Protocol, carries the data in order and has mechanisms to send missing pieces again. These are among the core services TCP provides. The browser and server can use that service without making HTTP itself manage every lost piece.
Below that, IP, the Internet Protocol, supplies addressing and carries data in packets: units containing data and information needed to deliver it. An IP address identifies a network destination. A router uses addressing information to pass packets between networks.
For the laptop's local connection, Ethernet provides wired networking and Wi-Fi provides wireless networking. Either can carry the packet inside a frame, the unit of data used on that link. Ethernet and Wi-Fi involve both data-link rules and physical signals; they don't fit neatly into just one of the two bottom boxes.
As the data moves through the stack, protocols add headers, sections of delivery or control information placed before the data they carry. Wrapping one protocol's data inside another protocol's unit is called encapsulation.
For example, a local frame can carry an IP packet, which in turn carries TCP data. The receiving equipment reads the information relevant to its job. A router can forward a packet without interpreting the webpage it helps carry.
At the destination, the cooperating protocols process the received data so the server can interpret the request. This is a simplified journey through a stack, not seven identical wrapping steps performed by every device along the route.
TCP or UDP: Which One Carries Your Data?
The Internet Uses a Different Grouping
The internet's architecture is commonly described with four layers: application, transport, internet and link. The official Internet host requirements describe this arrangement, often called the TCP/IP model.
As a rough comparison, OSI separates some jobs that the internet's architecture groups under its application layer. Transport corresponds broadly to OSI Layer 4, internet to Layer 3, and link to the two lower layers.
Those are useful comparisons, not exact borders for every protocol. TLS performs several related jobs, so labeling it simply “Layer 6” hides more than it explains.
There are also different ways to build a working stack. UDP, or User Datagram Protocol, carries individual messages between programs without itself guaranteeing delivery or protection against duplicate messages.
QUIC is a transport protocol that builds on UDP and adds its own transport features. It also integrates the TLS handshake, the opening exchange used to set up a protected connection. The QUIC specification shows why real protocol arrangements don't always resemble a tidy seven-box diagram.
These differences have practical consequences. A UDP scan, a check for reachable services using UDP, can leave a tester uncertain when no reply comes back. Understanding the protocol's behavior is more useful than knowing its layer number alone.
- Give a desktop, console or TV a steadier connection than Wi-Fi.
- Tell your cables apart at a glance with five different colors.
- Stay ready for faster internet with support for speeds up to 10 Gbps.
Use the Map When Something Breaks
Return to the laptop with the Wi-Fi connection and the stalled page. A working local connection doesn't establish that the laptop has the right addressing information, that packets can reach the destination, or that the requested service will answer.
Separating those jobs helps narrow an investigation. A physical connection problem points toward the signal or equipment. An addressing or routing problem concerns where data can travel. A service can also receive a request and reject it because the user lacks permission.
If the website sends back a message denying access to a page, some communication has succeeded. That's evidence to investigate the service and its permissions, rather than treating the incident as an unexplained loss of connectivity.
A useful diagnosis names what worked and what failed. “Wi-Fi connected, website denying access” gives the next person much more to work with than “the internet is broken.”
Encapsulation: Why It Means Different Things in Code and Networks

Headers: The Hidden Instructions Traveling With Your Data

Decapsulation: How a Computer Unpacks a Network Message

QUOTE:
"Amateurs hack systems, professionals hack people."

