Start with the recap, study the fully worked examples, then use the practice problems to
check your understanding of Protocol.
This page combines explanation, solved examples, and follow-up practice so you can move
from recognition to confident problem-solving in CS Thinking.
Concept Recap
A set of rules that define how data is formatted, transmitted, and received over a network. Protocols specify message formats, sequencing, error handling, and authentication so that devices from different manufacturers can communicate reliably.
Protocols are like the rules of a language โ both sides must agree on how to communicate, or the message is meaningless.
Read the first worked example with the solution open so the structure is clear.
Try the practice problems before revealing each solution.
Use the related concepts and background knowledge badges if you feel stuck.
What to Focus On
Core idea:Protocols are layered โ higher-level protocols (HTTP) rely on lower-level ones (TCP, IP) to handle the details of delivery.
Common stuck point:A protocol is not software โ it's a specification (set of rules). Software implements protocols.
Sense of Study hint:When studying protocols, think in layers: at the bottom, physical signals travel over wires or radio; above that, IP handles addressing and routing; TCP handles reliable delivery; and at the top, HTTP handles web requests. Each layer uses the services of the layer below it.
Worked Examples
Example 1
easy
What is a network protocol? Why are protocols necessary for computers to communicate?
Answer
A protocol is a set of communication rules. Protocols ensure devices from different manufacturers can communicate by standardising data formats and procedures.
First step
1
Step 1: A protocol is a set of rules that defines how data is formatted, transmitted, and received between devices.
Full solution
2
Step 2: Without agreed protocols, devices from different manufacturers could not communicate โ like people speaking different languages with no translator.
3
Step 3: Protocols standardise communication. HTTP defines how web pages are requested. SMTP defines how emails are sent. TCP defines how data is reliably transmitted.
Protocols are fundamental to networking. They enable interoperability โ any device following the protocol can communicate with any other, regardless of manufacturer or operating system.
Example 2
medium
Describe what HTTP, HTTPS, TCP, and IP each do, and how they work together when you visit a website.
Example 3
easy
Trace one HTTPS web request: name the protocols involved at each step (name lookup, transport, security, application).
Example 4
medium
You visit https://example.com. Trace which protocol takes each step: (1) name lookup, (2) reliable connection, (3) encryption, (4) page request.
Example 5
challenge
Design question: a new app needs to stream live sensor data with very low latency but tolerates occasional dropped samples. Which transport protocol should it use, and why?
Practice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
medium
Explain why HTTPS is preferred over HTTP for websites that handle passwords or payment information. What does the 'S' add?
Example 2
hard
Explain the concept of protocol layers (the TCP/IP model). Why is layering beneficial for network design?
Example 3
easy
Which protocol is used to load web pages in a browser?
Example 4
easy
Which protocol handles addressing and routing packets between networks?IP routes packets hop-by-hop toward Device B's address
Example 5
easy
Which protocol provides reliable, ordered delivery and resends lost packets?TCP sends packets in sequence and receives ACKs to confirm reliable, ordered delivery
Example 6
easy
Which protocol translates a domain name like example.com into an IP address?DNS translates a domain name into an IP address before the browser can connect
Example 7
easy
A protocol is best described as: (a) a physical cable, (b) a set of rules for communication, (c) a brand of router?
Example 8
easy
Is a protocol the rules, or the program that implements the rules?
Example 9
easy
Which protocol is used to send email?
Example 10
easy
Do devices from different manufacturers need a shared protocol to communicate? Yes or no.
Example 11
medium
Order these layers from highest to lowest: IP, HTTP, TCP.
Example 12
medium
You type a domain name and a web page loads. Which two protocols (one for name lookup, one for the page) are involved?A page load uses two protocols: DNS for name lookup, HTTP for the page transfer
Example 13
medium
Match the job to the protocol: 'reliable in-order bytes' vs 'route packets by address'. Which is TCP and which is IP?TCP handles reliable in-order delivery; IP handles routing hop by hop
Example 14
medium
Why must HTTP rely on a lower-level protocol like TCP?
Example 15
medium
Which protocol does each use: (a) sending email, (b) transferring files, (c) loading a web page?
Example 16
medium
A new app from vendor A talks to a server from vendor B with no shared protocol. What is the predictable result?
Example 17
medium
In the layered stack, if IP delivers a packet to the wrong network, which layer's job failed: addressing/routing or reliable ordering?Packet delivered to wrong network โ which layer's job failed?
Example 18
medium
Which protocol's job is it to detect a missing packet and request it again: TCP or IP?TCP detects a missing packet via the absent ACK and retransmits it
Example 19
medium
Match: 'send email', 'resolve a domain name'. Which uses SMTP and which uses DNS?
Example 20
challenge
Explain why layering protocols (HTTP over TCP over IP) is better than one giant all-in-one protocol.
Example 21
challenge
A page loads slowly and DNS lookups are timing out, but once loaded the page is complete and correct. Which protocol is the bottleneck, and which is working fine?DNS times out (bottleneck); HTTP/TCP deliver the page correctly once DNS resolves
Example 22
challenge
Why can the same HTTP protocol work over a Wi-Fi link, a cellular link, and a fiber link without changes?
Example 23
easy
Which protocol secures web traffic with encryption?
Example 24
easy
Which protocol resolves a domain name like example.com to an IP address?
Example 25
easy
Which protocol provides reliable, ordered delivery of bytes between two hosts?
Example 26
easy
Which protocol handles addressing and routing packets between networks?
Example 27
easy
Which protocol is used to send email between mail servers?
Example 28
medium
Order from highest to lowest in the TCP/IP layered model: TCP, HTTP, IP, Ethernet.
Example 29
medium
Match: 'transfers files between hosts' vs 'transfers web pages'. Which is FTP and which is HTTP?
Example 30
medium
Why is HTTPS preferred for sites that handle passwords?
Example 31
medium
A laptop and a printer from different brands can print over Wi-Fi only if they share what?
Example 32
medium
A page loads but DNS lookup is timing out for some assets. Which layer is failing โ name resolution or transport?
Example 33
medium
Match jobs to protocols: 'reliable bytes in order' vs 'route a packet across networks'. Which is TCP and which is IP?
Example 34
medium
Which transport-layer protocol drops reliability for low latency and is preferred for live video and gaming?
Example 35
medium
Which protocol assigns an IP address to a device when it joins a local network?
Example 36
medium
Why must HTTP rely on a lower-level protocol like TCP?
Example 37
hard
Why is layering protocols (HTTP over TCP over IP) better than designing one large all-in-one protocol?
Example 38
hard
HTTP/3 replaces TCP+TLS with QUIC over UDP. Name one concrete benefit of this redesign.
Example 39
hard
A connection succeeds but the receiver keeps getting bytes out of order at the application layer. Which TCP/IP layer is broken or being bypassed?
Example 40
hard
Why can the same HTTP protocol work over Wi-Fi, cellular, and fiber without changes?
Example 41
hard
You can ping a server (ICMP works) but HTTPS to it hangs. Which higher-layer step is most likely failing โ TCP handshake or TLS handshake or DNS?
Example 42
hard
You replace IPv4 with IPv6 on your network. Do HTTP applications need to be rewritten?
Example 43
challenge
Why does HTTPS still leak the destination hostname (e.g., bank.com) to a network observer even though the page content is encrypted?