The Internet is a global network of networks — billions of devices interconnected by standardized protocols. Every web request, email, and video call relies on these protocols working together.
The 7-layer OSI model is a framework for understanding how network communication works. Data travels down the stack on the sender and up the stack on the receiver — each layer adds or removes its own header.
Mnemonic (top→bottom): All People Seem To Need Data Processing
What it does: Provides the interface between the network and the software the user actually interacts with. This is where your web browser, email client, and DNS resolver live.
Real protocols:
What happens here: The application formats a request (e.g., "GET /index.html HTTP/1.1") and hands it to Layer 6 for processing.
What it does: Translates between the application\'s data format and a format suitable for network transmission. Handles encryption, compression, and encoding.
Real examples:
In practice: In modern TCP/IP implementations, Layers 5 and 6 are typically handled within the application layer (Layer 7). TLS, for example, sits between the app and TCP.
What it does: Manages the opening, maintaining, and closing of communication sessions between applications. Handles authentication and reconnection.
Real examples:
In practice: Like Layer 6, Layer 5 functionality is usually implemented within the application in TCP/IP networks. The concept is important even if the OSI boundaries aren\'t strictly observed.
What it does: Provides end-to-end communication between processes on different hosts. Handles segmentation (breaking data into chunks), reassembly, flow control, and error recovery.
TCP vs UDP:
Port numbers: Layer 4 introduces port numbers, which tell the receiving computer which application should get the data. HTTP = port 80, HTTPS = 443, DNS = 53, SSH = 22.
What it does: Routes packets from the source host to the destination host across multiple networks. This is where IP addresses live.
Key concepts:
Best-effort: IP is "best-effort" — it will try to deliver packets but makes no guarantees. Lost packets are handled by Layer 4 (TCP) or tolerated by the app (UDP).
What it does: Handles node-to-node delivery within a single network (one "hop"). Packages bits into frames and uses MAC addresses to identify devices on the local network.
Key concepts:
What it does: Transmits raw bits (1s and 0s) over a physical medium. This layer deals with voltage levels, light pulses, or radio frequencies — pure physics.
Physical media:
What Layer 1 doesn\'t know: The physical layer has no concept of addresses, errors, or meaning. It just converts bits to signals and back. All the intelligence lives in layers above.
TCP (Transmission Control Protocol): connection-oriented, guaranteed delivery, ordered, error-checked. Used for HTTP, email, file transfer.
UDP (User Datagram Protocol): connectionless, best-effort, low latency. Used for live video, gaming, DNS queries.
When you type okstem.org into a browser:
IP addresses: IPv4 uses 32-bit addresses (e.g., 192.168.1.1). We're running out — IPv6 uses 128-bit addresses, providing 3.4×10³⁸ unique addresses.
Which OSI layer is responsible for routing packets between networks?
TCP differs from UDP in that TCP
DNS is used to
HTTPS uses TLS to provide
IPv6 was introduced primarily because