Network protocols and the TCP/IP stack

Cambridge A-Level Computer Science (9618) · lesson 7 of 15 · 30 min

The TCP/IP Model

TCP vs UDP

TCP Three-Way Handshake

Before TCP data transfer, a connection is established:

  • SYN: Client sends SYN (synchronise) packet with initial sequence number.
  • SYN-ACK: Server responds with SYN-ACK, acknowledging client’s SYN and sending its own sequence number.
  • ACK: Client acknowledges server’s SYN. Connection established.

Port Numbers

Port numbers identify specific services on a host. Well-known ports (0–1023) are assigned by IANA:

Which protocol provides reliable, ordered delivery of data?

  • UDP
  • IP
  • TCP
  • DNS

Answer: TCP
TCP provides guaranteed, ordered delivery with error checking and retransmission.

Which port does HTTPS use?

  • 80
  • 21
  • 443
  • 25

Answer: 443
HTTPS uses port 443.

UDP is preferred over TCP for video streaming because:

  • UDP is more reliable
  • UDP has lower overhead and latency; occasional packet loss is acceptable
  • UDP supports more connections
  • UDP encrypts data automatically
  • Answer: 1

For real-time video, low latency matters more than perfect reliability — a dropped frame is better than a stall.


Previous lesson: Transmission media and bandwidth
Back to Cambridge A-Level Computer Science (9618)
Next lesson: Circuit switching vs packet switching