Module 04

The Rules of the Road

Protocols are the shared languages and procedures that let billions of different devices communicate seamlessly.

TCP/IP Stack
4
Application
HTTP, HTTPS, DNS, FTP
3
Transport
TCP, UDP
2
Internet
IP, ICMP
1
Link
Ethernet, Wi-Fi
Interactive

Encapsulation Stepper

Step 1 / 4 · 220 bytes on the wire
Layer 4 — Application · Protocol Data Unit: Data
HTTP Header
GET /index.html HTTP/1.1

Your browser builds a plain request. At this point there is no addressing, no ports, no error checking — just the message itself.

HTTP Request Line + Headers
MethodGETWhat the client wants to do
Path/index.htmlResource being requested
Hostexample.comWhich site on this server
User-AgentMozilla/5.0Client identification
Interactive

TCP Three-Way Handshake

Step 1 / 3
Client · SYN-SENTServer · LISTEN
SYN →
← SYN-ACK
ACK →

The client opens the connection by picking a random initial sequence number and sending a segment with only the SYN flag set. No application data travels yet.

TCP Header · ClientServer
Source Port51544Ephemeral client port
Dest Port443HTTPS listener
Seq1829371002Random client ISN
Ack0Nothing to acknowledge yet
FlagsSYNRequest to synchronize
Window64240Client receive buffer
OptionsMSS=1460, SACK, WS=8Capabilities offered

IP: The Addressing Layer

The Internet Protocol (IP) is responsible for addressing and routing packets. Every device connected to the internet has an IP address, and every packet header contains a source and destination IP. IP's job is to get packets as close to the destination as possible, but it doesn't guarantee delivery.

TCP: The Reliable Delivery Layer

The Transmission Control Protocol (TCP) sits on top of IP and adds reliability. It breaks data into segments, numbers them, acknowledges receipt, and retransmits anything that gets lost. It also manages flow control so a fast sender doesn't overwhelm a slow receiver.

HTTP: The Web Layer

HyperText Transfer Protocol (HTTP) is the language web browsers and servers use to request and deliver web pages, images, and APIs. When you visit a URL, your browser sends an HTTP request; the server replies with an HTTP response containing the requested resource.

Key Term

Protocol Stack

A layered architecture where each layer handles a specific job and relies on the layers below it. This modularity is why the internet can evolve one layer at a time.