A2.1.4 · Network fundamentals
Protocols
By the end you can
Explain what a protocol is, and describe TCP, UDP, HTTP, HTTPS and DHCP: how they work, where they differ and when each is used.
A is a set of rules for how data is structured, sent, received and checked. Two devices can only understand each other if they follow the same rules, the way two people need a shared language. Protocols decide the format of a message, the timing, the order, and what to do when something goes wrong.
Some protocols are stateful (they remember the conversation so far, as TCP does for a connection) and some stateless (every message stands alone, as with HTTP). This section covers the two that carry data between applications (TCP and UDP, at the transport layer) and the ones applications themselves use (HTTP, HTTPS and DHCP).
Ports: which application gets the data?#
An IP address gets data to the right computer. A gets it to the right program on that computer, like a flat number inside a building. A server can run a web server and a mail server at once, and port numbers tell the operating system which is which. Common ones: HTTP 80, HTTPS 443, SSH 22, SMTP (email sending) 25 or 587, DNS 53.
TCP and UDP#
(Transmission Control Protocol) is connection-oriented. First comes a three-way handshake: the client sends SYN (“want to talk?”), the server answers SYN-ACK (“yes, ready”), the client sends ACK (“then here we go”). After that every segment carries a sequence number so the receiver can reorder them, and a checksum to spot damage. The receiver acknowledges what arrived, and the sender re-sends anything not acknowledged. TCP also controls the flow so it does not swamp a slow receiver, and closes the connection politely at the end (each side sends a FIN and gets an ACK). The result is a reliable, ordered stream, at the cost of extra messages and delay.
(User Datagram Protocol) is connectionless. It just sends each datagram and moves on: no handshake, no acknowledgement, no re-sending, and a tiny header. Packets can be lost or arrive out of order, and UDP does not care. That sounds worse, but for a live video call a re-sent packet would arrive too late to be any use, so speed beats perfection. UDP can also send to many receivers at once (multicast).
UDP
Send and forget. No handshake, no acknowledgements.
- 1lost
- 2ok
- 3ok
- 4ok
- 5lost
- 6ok
- 7ok
- 8lost
- 9lost
- 10ok
- 11ok
- 12ok
Arrived
8/12
Re-sent
0
Messages
12
TCP
Handshake first, acknowledge each packet, send lost ones again.
SYN → ← SYN-ACK ACK →
- 1sent 2×
- 2ok
- 3ok
- 4sent 2×
- 5ok
- 6sent 3×
- 7ok
- 8ok
- 9ok
- 10ok
- 11ok
- 12ok
Arrived
12/12
Re-sent
4
Messages
31
UDP lost 4 of 12 packets and never knew. TCP lost 4 transmissions, sent 4 again, and delivered all 12, at the cost of 31 messages on the wire against UDP's 12.
A browser loads a page over an encrypted connection.
An administrator logs in to a server remotely and securely from the command line.
A mail program sends a message to a mail server.
A device turns www.example.com into an IP address.
A browser fetches an old site that does not encrypt anything.
0 of 5 matched
HTTP and HTTPS#
(Hypertext Transfer Protocol) carries the web. It works by request and response: a client such as a browser sends a request (a method like GET to fetch or POST to send data, a header with details such as the file wanted, sometimes a body), and the server replies with a status code, headers and usually the content. A request is plain readable text, such as GET /index.html HTTP/1.1 followed by Host: www.example.com, and the reply starts HTTP/1.1 200 OK. Common codes: 200 OK, 301 moved permanently, 403 forbidden, 404 not found, 500 server error.
HTTP is : the server treats every request as brand new, so it cannot tell that two requests came from the same person. Websites add memory on top: a is a small piece of data the server asks your browser to store and send back with each request, and a server-side session uses it to recognise you. That is how a shop remembers your basket.
is HTTP carried inside encryption (TLS, the successor to SSL), on port 443. It gives three things: encryption (nobody on the path can read it), authentication (a digital certificate proves the server is who it says), and integrity (tampering is detected). It defeats eavesdropping and man-in-the-middle attacks (A2.4.4 shows how).
DHCP#
Every device on a network needs an IP address. (Dynamic Host Configuration Protocol) hands them out automatically, so nobody has to type them in. Four messages, remembered as DORA:
- Discover: the new device broadcasts “is there a DHCP server? I need an address.”
- Offer: a server replies with an address from its pool.
- Request: the device says “yes, I will take that one.”
- Acknowledge: the server confirms, and the device may now use it.
The address is leased for a set time, then renewed or given to someone else. DHCP also supplies the subnet mask, the default gateway (the router to use for other networks) and the DNS server address. A server can also be told to always give the same address to a particular MAC address, which suits printers and servers.
Check yourself
Protocols, ports and DHCP
Quick questions, made fresh every time and marked here. Do a few until they feel easy.
Exam practice
Paper 1-style questions
5 questions · 21 marks
Write your answer as you would in the exam, then show the mark points and tick each one your answer made. These are our own questions in the style of the exam, not past-paper questions.
1.Describe the features of TCP that make data transmission reliable.
[4]Describe: A detailed account: say what happens, step by step if it is a process.
2.Distinguish between TCP and UDP in terms of how they manage connections, reliability and typical uses.
[6]Distinguish: Make the differences between two things clear.
3.Describe how HTTPS improves the security of web communication compared with HTTP.
[4]Describe: A detailed account: say what happens, step by step if it is a process.
4.Describe the role of DHCP in a network.
[4]Describe: A detailed account: say what happens, step by step if it is a process.
5.Outline what it means for HTTP to be a stateless protocol, and how websites cope with this.
[3]Outline: A brief account: the main points, without much detail.
Past papers
Old exam questions on this topic
From HL Paper 1, May 2014 to November 2025. These papers were set on the previous syllabus, so the wording may differ from today's exam, but the topic is the same. Find the questions and markschemes in your school's past-paper pack.
| Paper | Question | Marks | About |
|---|---|---|---|
| November 2024 | 11(e) | 6 | Why standard protocols matter for different devices |
| May 2023 TZ1 | 1 | 2 | What a browser requests with HTTP and HTTPS (same in TZ2) |
| May 2019 | 10(a) | 2 | Why devices need common rules |
| November 2019 | 10(c) | 2 | Why protocols are necessary |
| November 2017 | 11(d) | 1 | What a protocol is |
| November 2016 | 8(c) | 2 | What network protocols are |
| May 2015 | 10(b) | 3 | What a communication protocol is |
| November 2014 | 9(a) | 1 | What a network protocol is |
| November 2014 | 9(b) | 2 | Why protocols are needed |
In a nutshell
- A protocol is a set of rules for formatting, sending, ordering and checking data, so devices from different makers can understand each other.
- TCP is connection-oriented and reliable: handshake, sequence numbers, acknowledgements, re-sending. UDP is connectionless and fast but gives no guarantees.
- Port numbers say which application on a device should get the data: HTTP 80, HTTPS 443, SSH 22, SMTP 25 or 587, DNS 53.
- HTTP is a stateless request and response protocol (status codes such as 200, 404); HTTPS adds encryption, authentication and integrity using TLS.
- DHCP leases an IP address and the network settings to a device that joins (discover, offer, request, acknowledge).
