Protocols and the TCP/IP model
Rules for talking
- A protocol is a set of rules for how devices communicate — both ends must follow the same ones.
- Networking is split into layers, each with one focused job.
- The internet runs on the TCP/IP suite of four layers.
Why protocols and layers
- A protocol defines the format, order, meaning, timing and error handling of messages — without it, communication fails (like two people with no shared language).
- Layering splits the work so each layer talks only to the ones above and below. Benefits: modularity (swap Ethernet for Wi-Fi without touching the rest), standardisation, and abstraction.
A network protocol is:
A protocol defines the format, order, meaning, timing and error handling of messages — both ends must agree.
A benefit of splitting networking into layers is:
Each layer has one job and a clear interface, so (e.g.) Ethernet can be swapped for Wi-Fi without touching higher layers.
The TCP/IP layers
| Layer | Purpose | Examples |
|---|---|---|
| Application | what the user program does | HTTP, FTP, SMTP |
| Transport | end-to-end delivery between processes | TCP, UDP |
| Internet | routing packets between networks | IP |
| Link | sending bits over the physical medium | Ethernet, Wi-Fi |
Match each TCP/IP layer to its job.
Application = user protocols; Transport = TCP/UDP delivery; Internet = IP routing; Link = bits on the medium.
TCP vs UDP
- TCP is connection-oriented: it sets up a connection, ensures all data arrives in order, and retransmits lost packets — reliable, but with overhead. Used by HTTP, email, FTP.
- UDP is connectionless: send-and-forget, no acknowledgements or ordering — low overhead, no guarantees. Used for streaming, DNS and gaming, where speed beats reliability.
How does TCP differ from UDP?
TCP sets up a connection and ensures reliable, ordered delivery (with overhead); UDP is fire-and-forget.
UDP is preferred over TCP for:
UDP's low overhead suits real-time uses (streaming, DNS, gaming); TCP is used where every byte must arrive.
You've got it
- a protocol = agreed rules (format, order, meaning, timing, errors)
- layering gives modularity, standardisation and abstraction
- TCP/IP layers: Application → Transport → Internet → Link
- TCP = reliable, ordered, connection-oriented; UDP = fast, connectionless, no guarantees