IB Computer Science2027 syllabus
Level view
A2.1.4

Network protocols used for transport and application

SL & HL30 min readLesson

In one sentence: Transport protocols (TCP and UDP) deliver data to specific applications reliably or with minimal delay, while application protocols (HTTP, HTTPS, and DHCP) handle web requests, encrypted web sessions, and automatic IP configuration.

What you will learn

By the end of this lesson, you should be able to:

  • Explain how TCP and UDP operate at the transport level, including the role of port numbers and trade-offs between reliability and latency.
  • Describe how HTTP and HTTPS transmit web content, why HTTP is stateless, and what three protections HTTPS adds.
  • Trace how DHCP automatically leases IP addresses and network settings when a device joins a network.
  • Connect binary header fields and hexadecimal addresses to how network communications operate.

Before you begin

Review A2.1.3: The function of network devices to recall how routers forward packets between networks and how hardware firewalls filter traffic by IP address and port number.

Key words

TermSimple meaning
ProtocolA shared set of rules and formats defining how data is packaged, transmitted, and interpreted across a network.
Port numberA 16-bit numerical identifier distinguishing which application program on a host computer should receive incoming network data.
Transmission Control Protocol (TCP)A connection-oriented transport protocol guaranteeing complete, ordered, error-checked delivery through acknowledgements and retransmission.
User Datagram Protocol (UDP)A connectionless transport protocol prioritizing low latency and minimal overhead without guaranteeing delivery or packet order.
Hypertext Transfer Protocol (HTTP)A stateless application protocol transmitting plain-text web requests and hypermedia responses (HTML, CSS, JavaScript, images).
Hypertext Transfer Protocol Secure (HTTPS)The encrypted extension of HTTP adding SSL/TLS encryption, server digital-certificate authentication, and data integrity.
Dynamic Host Configuration Protocol (DHCP)A network-management protocol that automatically assigns temporary IP address leases and settings to joining devices.

The idea, step by step

Why ports matter alongside IP addresses

While the IP layer moves packets from one physical computer to another, a single server might run a web service, an email service, and remote administration at the same time. Transport protocols solve this by attaching a port number to identify the exact sending and receiving application, much like flat numbers inside an apartment building. Standardized well-known ports let clients locate common services predictably:

  • HTTP: port 80
  • HTTPS: port 443
  • SMTP (mail submission): port 587
  • SSH (secure shell): port 22

1. Transport protocols: TCP and UDP

Transmission Control Protocol (TCP)

TCP is a connection-oriented protocol. Before exchanging application data, the client and server establish an active connection and keep it open until communication ends. Every TCP segment carries a 20-byte standard header supporting reliability checks:

  • Sequence numbers: Label outgoing segments so the receiving device reassembles packets in their exact original order, even if packets arrive along different paths out of order.
  • Acknowledgements and retransmission: The recipient sends confirmation when valid segments arrive; if a packet is lost or damaged, the sender detects the missing acknowledgement and transmits it again.
  • Checksums: Calculated values allow the receiver to spot data corruption introduced during transit.

Because reliability and order come first, TCP suits file transfers, software updates, web page loading, and email.

User Datagram Protocol (UDP)

UDP is a connectionless protocol with a compact 8-byte header containing source port, destination port, length, and checksum. It sends datagrams straight out without opening a persistent connection, waiting for acknowledgements, or retransmitting lost packets. Although individual packets can be dropped or arrive out of order, skipping connection setup and retransmission delays keeps latency very low. UDP suits live video conferencing, live video streaming, online multiplayer gaming, and voice calls, where staying current in real time matters more than replaying a missed frame moments later.

Comparing TCP and UDP

FeatureTCPUDP
Connection modelConnection-oriented (explicit setup and teardown)Connectionless (sends immediately)
Delivery guaranteeGuaranteed complete delivery via acknowledgements and retransmissionBest-effort only; lost packets are not resent
OrderingSequence numbers keep segments in exact orderNo ordering guarantee
Standard header size20 bytes (higher overhead)8 bytes (lightweight overhead)
Typical applicationsWeb browsing, file downloads, email, bankingLive video streaming, VoIP calls, real-time gaming

2. Application protocols: HTTP, HTTPS, and DHCP

Hypertext Transfer Protocol (HTTP)

HTTP underpins the World Wide Web by transferring hypermedia documents such as HTML pages along with linked JavaScript, CSS stylesheets, and binary media files.

  • Stateless operation: HTTP treats each request and response independently without retaining memory of prior commands; browsers and web servers add mechanisms such as cookies or tokens when user sessions are needed.
  • Readable text format: Requests and responses pass as readable Unicode text lines containing a request method (such as GET or POST), target resource path, headers, and numeric status codes (such as 200 OK when fulfilled or 404 Not Found when missing):
GET /index.html HTTP/1.1
Host: www.example.com
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 1456

Hypertext Transfer Protocol Secure (HTTPS)

Standard HTTP travels unencrypted in readable text, meaning anyone inspecting traffic along the route can read passwords or alter web pages. HTTPS wraps HTTP inside SSL/TLS protection and adds three core security guarantees:

  • Encryption: Scrambles traffic between client and server via SSL or TLS so eavesdroppers and man-in-the-middle attackers cannot read contents.
  • Authentication: The server presents a digitally signed certificate so the client verifies it is truly communicating with the authentic website rather than an imposter.
  • Data integrity: Cryptographic checks confirm that data was not modified or tampered with while travelling across the network.

Dynamic Host Configuration Protocol (DHCP)

DHCP automates network setup whenever a device boots up or joins a wired or Wi-Fi network, saving administrators from configuring every host manually. In most homes and small offices, the local router runs a DHCP service that dynamically allocates addresses through a four-step exchange:

  1. DHCPDISCOVER (broadcast): The newly joined device broadcasts a request containing its hardware MAC address and configuration preferences.
  2. DHCPOFFER (unicast or broadcast): A DHCP server offers an available IP address from its managed pool alongside the subnet mask, default gateway, DNS server address, and lease duration.
  3. DHCPREQUEST (broadcast): The client accepts and formally requests that offered IP configuration.
  4. DHCPACK (unicast or broadcast): The DHCP server confirms the assignment and marks the address active.

Instead of assigning IP addresses permanently, DHCP issues time-limited leases. Before a lease expires, the device requests renewal; when a device leaves the network, its unrenewed IP address returns cleanly to the pool for reuse by other devices. Internal networks running DHCP commonly assign addresses from three reserved private ranges (not routable across the public internet):

  • 10.0.0.0–10.255.255.255
  • 172.16.0.0–172.31.255.255
  • 192.168.0.0–192.168.255.255

Summary of the five protocols

ProtocolPrimary roleKey operational details
TCPReliable, ordered application transportConnection-oriented; sequence numbers, acknowledgements, retransmission, 20-byte header
UDPLow-latency application transportConnectionless; no retransmission or ordering, 8-byte header
HTTPPlain-text hypermedia transfer for web resourcesStateless client-server request/response, status codes (200, 404), default port 80
HTTPSSecured web communicationAdds SSL/TLS encryption, server digital certificates (authentication), and data integrity; default port 443
DHCPAutomated IP configuration on joining a networkDiscover-Offer-Request-Ack exchange issuing renewable IP leases, subnet, gateway, and DNS

Connecting binary and hexadecimal data to networking (link to B2 / A1.2)

Network protocols pack every control instruction into compact binary fields inside packet headers: for instance, a 16-bit binary port field fits inside 2^16 = 65,536 port numbers (0–65535), single-bit flags toggle TCP states cleanly in one bit each, and fixed 20-byte (TCP) or 8-byte (UDP) layouts keep header parsing fast. When engineers inspect raw packets, MAC addresses, or IPv6 headers, long 8-bit binary bytes are commonly written in hexadecimal (two hex digits per byte) so values stay compact and readable without changing the underlying binary bits.

Worked example

Follow how all five protocols work together during a university student's morning routine on campus:

  1. Opening her laptop on campus Wi-Fi triggers DHCP (Discover, Offer, Request, Ack), leasing an internal private IP address (192.168.42.18), subnet mask, default router, and DNS address for 8 hours.
  2. Checking a public open-course syllabus page uses HTTP over TCP (port 80) so every section of HTML arrives reliably and in sequence.
  3. Signing into the university grade and finance portal switches to HTTPS over TCP (port 443), adding TLS encryption, digital certificate authentication verifying the real university server, and data integrity protection.
  4. Joining a live seminar video call runs audio and camera streams over UDP, sacrificing rare dropped packets so conversation stays synchronized in real time without retransmission stalls.

Check your understanding

  1. Why do transport protocols attach source and destination port numbers in addition to IP addresses?
  2. State two mechanisms TCP uses to deliver complete, uncorrupted, ordered data, and explain why a live video stream often avoids TCP in favour of UDP.
  3. What does it mean to describe HTTP as a stateless protocol, and how do 200 OK and 404 Not Found differ?
  4. Outline the four messages exchanged during a DHCP assignment and explain why IP addresses are leased rather than permanent.

Common mix-up

It is easy to think: UDP is unreliable because it is poorly designed, and HTTPS simply sends an ordinary password header over HTTP port 80.

Instead, remember: UDP omits acknowledgements and retransmission intentionally so real-time audio, video, and gaming avoid stalls waiting for lost packets. And HTTPS runs over a separate secure layer (SSL/TLS, default port 443) providing encryption, server certificate authentication, and integrity checks rather than plain readable HTTP text.

Quick recap

  • Port numbers match network traffic to the specific running application on a host (HTTP 80, HTTPS 443, SMTP 587, SSH 22).
  • TCP guarantees reliable, in-order, error-checked delivery (20-byte header) at higher latency cost, whereas UDP offers lightweight (8-byte header), low-latency delivery without guarantees.
  • HTTP transfers hypermedia statelessly in readable text; HTTPS adds encryption, digital-certificate authentication, and data integrity via SSL/TLS.
  • DHCP uses Discover, Offer, Request, and Ack messages to lease IP addresses and network parameters automatically so addresses can be reclaimed and reused.

Textbook reading

  • Computer Science (Baumgarten, Ganea, Turland, 2025), A2 Networks > A2.1 Network fundamentals > A2.1.4 Network protocols used for transport and application, Book pp. 119–125 (PDF pp. 129–135; private internal IP ranges conclude top of Book p. 125 / PDF p. 135).
  • Read these pages alongside this note; this lesson is an original summary and does not replace the textbook.

Sources and further learning

  • IB Computer Science Guide (first assessment 2027), A2.1.4: Describe the network protocols used for transport and application (Guide p. 31; PDF p. 37) and Topic A2 linking question on binary and hexadecimal data structures in network communications (B2, Guide p. 33; PDF p. 39).
  • Computer Science (Baumgarten, Ganea, Turland, 2025), A2.1.4 Network protocols used for transport and application, Book pp. 119–125 (PDF pp. 129–135).
Check your understanding5 questions · 10 marks · 12 min
Take the lesson check
End of A2.1Finished this subtopic? Take the A2.1 review5 questions · 20 marks · 35 min
Take subtopic review
Something not right?