SLIDE 1 / 10
CSZone.co.uk
Click anywhere to advance · Arrow keys also work
AQA 7517 · Paper 2 · 4.9.3b

TCP/IP Model
TCP vs UDP

The 4-layer TCP/IP stack · protocols at each layer · TCP vs UDP

WHAT YOU'LL LEARN
TCP/IP 4-layer model · protocols · TCP vs UDP · encapsulation
AQA SPEC LINK
4.9.3 — TCP/IP, layers, TCP vs UDP, HTTP, FTP, SMTP, IMAP, SSH
TCP/IP Model

The 4-Layer TCP/IP Model

APPLICATION LAYER
HTTP, HTTPS, FTP, SMTP, IMAP, SSH, DNS
Layer 4
TRANSPORT LAYER
TCP, UDP — end-to-end communication, ports
Layer 3
INTERNET LAYER
IP — addressing and routing packets across networks
Layer 2
LINK LAYER
Ethernet, WiFi — physical transmission on local network
Layer 1
Application Layer

Application Layer Protocols

HTTP/HTTPS — HyperText Transfer Protocol; web pages; HTTPS = encrypted with TLS
FTP — File Transfer Protocol; transferring files between client and server
SMTP — Simple Mail Transfer Protocol; sending emails from client to mail server
IMAP — Internet Message Access Protocol; reading emails stored on mail server (emails stay on server)
SSH — Secure Shell; encrypted remote access to servers/devices via command line
DNS — Domain Name System; translates hostnames to IP addresses (operates at application layer)
TCP

TCP — Transmission Control Protocol

TCP is a connection-oriented protocol. It guarantees that all packets arrive, in order, without errors.
Three-way handshake: SYN → SYN-ACK → ACK establishes connection before data transfer
Receiver sends acknowledgements (ACKs); sender retransmits any unacknowledged packets
Flow control (window size) prevents sender overwhelming receiver
Used for: HTTP/HTTPS, FTP, SMTP, IMAP — anything where data integrity matters
UDP

UDP — User Datagram Protocol

UDP is a connectionless protocol. It sends packets without establishing a connection, without ACKs, and without guaranteeing delivery or order.
Much faster than TCP — no handshake, no ACKs, no retransmission overhead
Used for: video streaming, online gaming, VoIP, DNS queries, live broadcast
A dropped frame in a video call is preferable to waiting for retransmission (which would cause worse lag)
Application layer can implement its own error handling if needed
TCP vs UDP

TCP vs UDP Comparison

FeatureTCPUDP
ConnectionConnection-oriented (handshake)Connectionless
DeliveryGuaranteed, in orderNot guaranteed
SpeedSlower (overhead)Faster (low overhead)
Use casesWeb, email, file transferStreaming, gaming, VoIP
Encapsulation

Encapsulation & Decapsulation

As data passes down the TCP/IP layers, each layer adds its own header (encapsulation). As data passes up at the receiver, headers are stripped off (decapsulation).
Application creates message (e.g. HTTP request)
Transport adds TCP/UDP header (source/dest port, sequence no.)
Internet adds IP header (source/dest IP)
Link adds frame header/trailer (MAC addresses) for local delivery
Port Numbers

Port Numbers

Ports identify which application on a host should receive data. An IP address gets the data to the right machine; a port gets it to the right application.
ProtocolPortUse
HTTP80Web (unencrypted)
HTTPS443Web (encrypted)
FTP21File transfer
SMTP25/587Send email
SSH22Secure remote access
AQA Exam Style

Practice Question

AQA 7517 — Paper 2 Style
(a) State the FOUR layers of the TCP/IP model and name ONE protocol at each layer. [4]
(b) Explain why UDP is used for video conferencing rather than TCP. [3]
(c) What is meant by encapsulation? [2]
[9 marks]
4 marks
(a) Application — HTTP/FTP/SMTP/SSH [1]; Transport — TCP/UDP [1]; Internet — IP [1]; Link — Ethernet/WiFi [1]
3 marks
(b) UDP has no connection overhead so is faster [1]; dropped packets cause a brief glitch which is acceptable [1]; waiting for TCP retransmission would cause significant delay/freezing which is worse than a dropped frame [1]
2 marks
(c) Each layer adds its own header to the data as it passes down the stack [1]; creating a layered structure that allows each layer at the receiver to strip and read its own header [1]
Summary

Key Points to Remember

TCP/IP has 4 layers: Application, Transport, Internet, Link
TCP — reliable, ordered, connection-oriented; used for HTTP, FTP, email
UDP — fast, connectionless, no guaranteed delivery; used for streaming, gaming, VoIP
Encapsulation — headers added going down stack; stripped going up (decapsulation)
Know key port numbers: HTTP=80, HTTPS=443, FTP=21, SMTP=25, SSH=22
🎉 Lesson complete — move to the quiz!