Protocols
CIE A-Level Computer ScienceΒ· Unit 2: Communication, Topic 2: ProtocolsΒ· 15 min read
1. Core Principles of Network Protocolsβ β ββββ± 5 min
Networks connect heterogeneous devices from different manufacturers, running different operating systems and software. Without shared standard rules, devices cannot interpret data received from each other. Protocols solve this by standardizing all aspects of network communication.
Network Protocol
A formal, vendor-agreed set of rules that govern all stages of data communication: data formatting, transmission order, error checking, connection setup/teardown, and interpretation of received data.
A home router receives a data frame from a new laptop, but cannot recognize the frame's format. How do protocols prevent this issue from occurring in functional networks?
- 1
This error occurs because the sending laptop and receiving router are not following the same rules for structuring data. Without a standard, the router cannot extract the destination address or payload from the frame.
- 2
Protocols prevent this by enforcing vendor-independent common standards. Both devices implement the same agreed protocol, so the router knows where to find the destination address, what type of payload it carries, and how to check for corruption.
Exam tip:
Never forget to mention that protocols enable interoperability between different devices and vendors.
2. Transport Layer Protocols: TCP vs UDPβ β β βββ± 6 min
The transport layer provides end-to-end communication between applications on different hosts. The two core transport protocols in TCP/IP are TCP (Transmission Control Protocol) and UDP (User Datagram Protocol), with very different properties and use cases.
Comparison of core properties:
TCP
Connection-oriented, performs three-way handshake to establish a connection, guarantees delivery of all data, retransmits lost packets, reorders out-of-sequence packets, provides flow control.
+ Pros: Full reliability, ordered delivery, built-in error correction
β Cons: Higher overhead, higher latency due to handshake and retransmissions
UDP
Connectionless, no handshake required, sends independent datagrams, no guarantee of delivery, no reordering or retransmission of lost packets.
+ Pros: Very low overhead, minimal latency, no connection setup delay
β Cons: No reliability, packets may be lost or arrive out of order
A developer is building a live interactive video call application. Should they use TCP or UDP for the video stream? Justify your answer.
- 1
Live video calls require very low latency to maintain real-time interaction. A small amount of lost video data is acceptable, as lost frames can be skipped without breaking the user experience.
- 2
TCP is unsuitable here because it will retransmit lost packets, causing delays and buffering that disrupt the call. The three-way handshake also adds unnecessary overhead.
- 3
UDP is the correct choice. It has very low latency and minimal overhead, which meets the core requirements of a live real-time application.
Exam tip:
You will almost always be asked to compare TCP and UDP in Paper 1, so memorize their properties and common use cases.
3. Common Application Layer Protocolsβ β β βββ± 5 min
Application layer protocols define rules for communication between end-user applications. Each uses a specific well-known port number to identify itself to the transport layer. The table below lists the most common protocols you need to know for CIE 9618:
Protocol Name | Full Name | Well-Known Port | Primary Use Case |
|---|---|---|---|
HTTP | Hypertext Transfer Protocol | 80 | Unencrypted web page transfer |
HTTPS | HTTP Secure | 443 | Encrypted secure web communication |
FTP | File Transfer Protocol | 21 | Transferring files between hosts |
DNS | Domain Name System | 53 | Translate domain names to IP addresses |
SMTP | Simple Mail Transfer Protocol | 25 | Sending email between mail servers |
Explain why HTTPS is required for online banking transactions instead of plain HTTP.
- 1
Plain HTTP sends all data (including usernames, passwords, and payment details) as unencrypted plain text. Any third party intercepting the network traffic can read this sensitive data easily.
- 2
HTTPS uses TLS encryption to scramble data in transit. Only the client device and the bank's server can decrypt the data, preventing third-party eavesdropping and tampering with transaction details.
- 3
This ensures that sensitive financial information remains confidential and cannot be modified in transit, making HTTPS essential for secure online banking.
4. Layered Operation and Encapsulationβ β β β ββ± 7 min
Protocols operate in a layered stack, where each layer only interacts with the layer directly above and below it. When sending data from a source host to a destination host, data passes down the stack from application to physical layer, with each layer adding its own control header in a process called encapsulation. At the destination, data passes up the stack, with each layer removing the corresponding header (decapsulation) to access the payload.
Encapsulation
The process of adding layer-specific control information (a header) to data as it passes down the protocol stack before transmission to the lower layer.
Describe how an email message is encapsulated as it passes down the TCP/IP stack from your device to the network.
- 1
- Application layer: The email client formats the message according to SMTP rules, and passes the raw message data down to the transport layer.
- 2
- Transport layer: The message is split into smaller segments. A TCP header is added, containing source/destination port numbers, sequence number, and checksum for error checking.
- 3
- Internet layer: Each TCP segment is encapsulated into an IP packet. An IP header is added, containing the source IP address of your device and the destination IP address of the mail server.
- 4
- Link layer: Each IP packet is encapsulated into a network frame. A link layer header is added containing the MAC address of your default gateway and your device's MAC address, before transmission over the physical network.
5. Common Pitfalls
Wrong move:
Claiming UDP is connection-oriented and TCP is connectionless
Why:
This is the reverse of the correct definition: TCP requires a handshake to establish a connection, while UDP has no connection state
Correct move:
TCP = connection-oriented, UDP = connectionless
Wrong move:
Stating HTTPS is a transport layer protocol, rather than an application layer protocol
Why:
HTTPS is encrypted HTTP, which operates at the application layer, running over TCP
Correct move:
HTTPS is an application layer protocol that provides encrypted web communication
Wrong move:
Memorizing incorrect well-known ports for common protocols e.g. 80 for HTTPS
Why:
CIE examiners regularly test knowledge of common ports in 1-mark multiple choice or short answer questions
Correct move:
Learn the core ports: 80 (HTTP), 443 (HTTPS), 21 (FTP), 53 (DNS), 25 (SMTP)
Wrong move:
Claiming encapsulation occurs when data moves up the protocol stack at the destination
Why:
Encapsulation is the addition of headers when moving down the stack at the source. Header removal (decapsulation) occurs when moving up the stack
Correct move:
Encapsulation = add headers moving down the sender's stack, decapsulation = remove headers moving up the receiver's stack
Wrong move:
Claiming TCP is always superior to UDP for all applications
Why:
TCP's reliability comes with significant overhead and latency that makes it unsuitable for real-time use cases
Correct move:
Choose the protocol based on requirements: TCP for reliability-critical use cases, UDP for low-latency real-time applications
6. Quick Reference Cheatsheet
Protocol Type | Name | Key Properties | Port |
|---|---|---|---|
Transport | TCP | Connection-oriented, reliable, ordered | |
Transport | UDP | Connectionless, unreliable, low latency | |
Application | HTTP | Unencrypted web transfer | 80 |
Application | HTTPS | Encrypted web transfer | 443 |
Application | FTP | File transfer between hosts | 21 |
Application | DNS | Domain β IP translation | 53 |
Application | SMTP | Sending email | 25 |
7. Frequently Asked
Do I need to memorize well-known port numbers for the exam?
CIE 9618 expects you to know ports for major common protocols: 80 (HTTP), 443 (HTTPS), 21 (FTP), 53 (DNS), 25 (SMTP). Obscure ports are almost never asked.
What is the difference between a protocol and a protocol stack?
A single protocol defines rules for one specific communication function. A protocol stack is a layered set of protocols that work together to enable end-to-end network communication, such as the TCP/IP stack.
When this came up on past exams
AI-estimated based on syllabus patterns β cross-check with official past papers for accuracy. Use only as revision-focus signals.
- 2022 Β· 12
Compare features of TCP and UDP
- 2023 Β· 11
Describe function of HTTP and HTTPS
- 2024 Β· 22
Explain purpose of network protocols
Going deeper
What's Next
Understanding protocols is the foundation of all network communication topics in CIE 9618. Protocols underpin every aspect of networking, from local area networks to the global internet, so a solid grasp of their purpose, properties and common examples will help you tackle all subsequent advanced topics. Next, you will explore how IP addressing works, how data is routed between different networks, and how network security relies on correctly implemented protocols. The knowledge of TCP/IP protocols you gained here is also essential for understanding common network security threats and how to mitigate them, a key topic for both Paper 1 and Paper 2.
