Network Protocols and Layers
Network Protocols and Layers
A protocol is a set of rules that governs how data is transmitted across a network. Protocols ensure devices from different manufacturers can communicate. This note covers key protocols and the TCP/IP layered model.
---
The TCP/IP Model
The TCP/IP model organises network communication into four layers. Each layer has a specific role and uses particular protocols. Data passes down through the layers when sending and up through them when receiving.
| Layer | Name | Role | Protocols |
|---|---|---|---|
| 4 | Application | Provides network services to the user (web, email, file transfer) | HTTP, HTTPS, FTP, SMTP, IMAP, POP3 |
| 3 | Transport | Splits data into packets, ensures reliable delivery, manages connections | TCP, UDP |
| 2 | Internet | Addresses packets and routes them across networks | IP |
| 1 | Network Interface | Handles the physical transmission of data | Ethernet, Wi-Fi |
Why Use Layers?
- Modularity — each layer can be developed and updated independently
- Standardisation — manufacturers follow the same rules, ensuring compatibility
- Troubleshooting — problems can be isolated to a specific layer
- Interoperability — devices from different vendors work together
---
Key Protocols
HTTP and HTTPS (Application Layer)
| Protocol | Full Name | Port | Purpose |
|---|---|---|---|
| HTTP | HyperText Transfer Protocol | 80 | Transfers web pages between browser and server |
| HTTPS | HTTP Secure | 443 | Same as HTTP but with encryption (TLS/SSL) |
- HTTPS encrypts data so it cannot be read if intercepted
- Shown by a padlock icon in the browser
- Essential for online banking, shopping, and login pages
FTP (Application Layer)
- File Transfer Protocol — used to upload/download files to/from a server
- Uses port 21
- Common for website management (uploading files to a web server)
- Can be authenticated (username/password) or anonymous
Email Protocols (Application Layer)
| Protocol | Purpose | Direction |
|---|---|---|
| SMTP (Simple Mail Transfer Protocol) | Sending emails | Client → server, server → server |
| IMAP (Internet Message Access Protocol) | Retrieving emails, stored on server | Server → client |
| POP3 (Post Office Protocol v3) | Downloading emails, removed from server | Server → client |
SMTP vs IMAP vs POP3
| Feature | SMTP | IMAP | POP3 |
|---|---|---|---|
| Direction | Sending | Receiving | Receiving |
| Emails stored | N/A | On server | Downloaded to device |
| Multiple devices | N/A | Yes (synced) | No (one copy) |
| Internet needed | To send | To access | Only to download |
TCP and UDP (Transport Layer)
| Feature | TCP | UDP |
|---|---|---|
| Full name | Transmission Control Protocol | User Datagram Protocol |
| Connection | Connection-oriented (handshake) | Connectionless |
| Reliability | Reliable — checks delivery, resends lost packets | Unreliable — no delivery check |
| Speed | Slower (overhead) | Faster (no overhead) |
| Order | Guarantees correct order | No ordering guarantee |
| Use cases | Web pages, email, file transfer | Video streaming, online gaming, VoIP |
IP (Internet Layer)
- Internet Protocol — responsible for addressing and routing packets
- Every device has a unique IP address
- IPv4: 32-bit address (e.g. 192.168.1.1) — about 4.3 billion addresses
- IPv6: 128-bit address (e.g. 2001:0db8:85a3::8a2e:0370:7334) — virtually unlimited
---
Packet Switching
Data is broken into packets for transmission. Each packet contains:
| Component | Purpose |
|---|---|
| Header | Source IP, destination IP, packet number, total packets |
| Payload | The actual data being sent |
| Trailer | Error-checking data (checksum) |
How Packet Switching Works
1. Data is split into packets, each numbered
2. Packets are sent independently and may take different routes
3. Routers direct each packet along the best available path
4. Packets arrive at the destination (possibly out of order)
5. Packets are reassembled in the correct order using packet numbers
6. Missing packets are re-requested
Advantages of Packet Switching
- If a route is congested or broken, packets take alternative routes
- Multiple communications can share the same network lines
- More resilient — no single path needs to stay open
---
MAC Addresses vs IP Addresses
| Feature | MAC Address | IP Address |
|---|---|---|
| Stands for | Media Access Control | Internet Protocol |
| Assigned by | Manufacturer (burned in) | Network (can change) |
| Format | 48-bit (e.g. A1:B2:C3:D4:E5:F6) | 32-bit IPv4 or 128-bit IPv6 |
| Scope | Local network (LAN) | Global (across networks) |
| Uniqueness | Globally unique to hardware | Unique on the network |
| Layer | Network Interface | Internet |
---
Domain Name System (DNS)
- Translates domain names (e.g. brightrevision.co.uk) into IP addresses (e.g. 104.21.32.1)
- Humans remember names; computers use numbers
- DNS server stores a database of domain-to-IP mappings
- Process: browser → DNS server → returns IP → browser connects to web server
---
Exam Tips
- Know which layer each protocol belongs to in the TCP/IP model
- Be clear on TCP vs UDP — TCP for reliability, UDP for speed
- SMTP sends, IMAP and POP3 receive — a common exam question
- Understand why HTTPS is preferred over HTTP (encryption prevents interception)
- Know that packets can take different routes and are reassembled at the destination
- Be able to explain why layering is beneficial (modularity, standardisation, troubleshooting)