When data is sent across a network, it must be transferred in a way that matches the needs of the application. In IB Computer Science, this is explained using two transport-layer protocols: TCP and UDP.
Students are expected to understand how TCP and UDP differ, why both exist, and when each one should be used. Simply stating that one is “reliable” and the other is “faster” is not enough for high marks.
Where TCP and UDP Fit in Networking
TCP and UDP both operate at the Transport layer of the TCP/IP model.
Their role is to:
- Control how data is sent between devices
- Manage communication between applications
- Decide how reliability and speed are handled
They sit above the Internet layer (IP) and below the Application layer.
What Is TCP?
Transmission Control Protocol (TCP) is a reliable, connection-based protocol.
Key features of TCP include:
- Establishes a connection before data is sent
- Ensures data arrives in the correct order
- Detects and retransmits lost data
- Uses acknowledgements to confirm delivery
Because of this, TCP prioritises accuracy and reliability over speed.
Real Examples of TCP
TCP is used when:
- Data must arrive completely and correctly
- Errors cannot be tolerated
Common uses include:
- Web browsing (HTTP/HTTPS)
- Email transfer
- File downloads
In these cases, missing or corrupted data would cause serious problems.
What Is UDP?
User Datagram Protocol (UDP) is a connectionless protocol.
Key features of UDP include:
- No connection setup
- No guarantee of delivery
- No error correction
- No reordering of packets
UDP prioritises speed and efficiency rather than reliability.
Real Examples of UDP
UDP is used when:
- Speed is more important than accuracy
- Small data losses are acceptable
Common uses include:
- Video streaming
- Online gaming
- Voice and video calls
In these situations, waiting for retransmission would cause noticeable delays.
Why TCP and UDP Both Exist
The key idea for IB Computer Science is trade-off.
- TCP trades speed for reliability
- UDP trades reliability for speed
Different applications have different needs, so one protocol cannot suit every situation.
IB examiners expect students to explain why a protocol is chosen, not just what it does.
Comparing TCP and UDP Clearly
Strong IB answers compare protocols directly:
- TCP
- Reliable delivery
- Slower due to error checking
- Ordered data
- UDP
- Fast transmission
- No delivery guarantee
- Minimal overhead
Using real-world examples strengthens explanations.
Common Student Mistakes
Students often:
- Say UDP is “bad” or “unsafe”
- Forget that TCP adds overhead
- Fail to justify protocol choice
- Mix up transport and application layers
Balanced explanations score higher.
How TCP and UDP Appear in IB Exams
Students may be asked to:
- Compare TCP and UDP
- Choose an appropriate protocol for a scenario
- Explain performance differences
- Link protocols to application needs
Clear reasoning is essential.
Final Thoughts
TCP and UDP exist because network communication requires different priorities. TCP ensures accurate delivery, while UDP enables fast, real-time communication. Neither is better overall — each is better for specific tasks.
Understanding this trade-off allows IB Computer Science students to explain network behaviour clearly and confidently, exactly as examiners expect.
