How the internet works (overview)
Computer Science · Networking
Question 1 of 10
0A packet header typically contains:
Stuck? Read the explanation
Unlocks at a streak of 5 correct answers in a row.
Embed this practice on your site or class page
Paste this HTML into your page. Students practise right there; it is free and needs no account.
How the internet works (overview) explained
The internet is a worldwide network of networks that lets computers exchange data. Information is not sent as one block. It is cut into small packets, and each packet is routed separately across the network to its destination.
Every device on the internet has an IP address, which identifies it. Routers read the destination address on each packet and pass it on towards its destination. Packets can take different routes and arrive out of order, so the receiving computer puts them back together.
Protocols are agreed sets of rules for different jobs. IP handles addressing and routing. TCP makes sure the data arrives completely and in order by resending any lost packets. HTTP is the protocol used to request and send web pages. The Domain Name System (DNS) translates a name such as example.com into an IP address.
A common mistake is to think the internet and the World Wide Web are the same thing. The web is one service that runs on the internet, alongside email, video calls and many others.
Worked example
A file of 10,000 bytes is sent in packets that each carry up to 1,500 bytes of data. How many packets are needed?
- Dividing gives , so at least 7 packets are needed.
- Six full packets carry bytes.
- The seventh packet carries the remaining 1,000 bytes, so 7 packets are sent in total.
Key facts
- Packet switching: data is cut into packets. Each packet carries a header (addresses and a sequence number) plus a chunk of the data. Many users can share the same links because packets from different conversations are mixed together.
- Routers read the destination address on each packet and forward it towards the next router. No router sees the whole message.
- TCP numbers the packets, puts them back in order and asks for any missing packet again. IP addresses the packets and routes them. HTTP carries the web page request and reply.
- The round-trip time (as measured by ping) is the time for a packet to go out and its reply to come back.
- A home router using NAT lets many devices share one public IP address.
Worked example 2
In this simplified model a packet can be at most 1,500 bytes long, and each packet has a 40-byte header. The rest is data. A file of 25,000 bytes is sent. How many packets are needed, and how many bytes cross the network in total?
- Data per packet: bytes.
- Packets needed: , so round up to 18 packets.
- Seventeen full packets carry bytes of data.
- The last packet carries bytes of data.
- Total headers: bytes.
- Total sent: bytes.
You must round up, never down. 17 packets would leave 180 bytes behind. Headers are extra work for the network, which is why very small packets waste capacity.
Worked example 3
A 5,000-byte message is sent in packets that each carry up to 1,200 bytes of data. Trace what happens when packet 3 is lost on the way.
- Packets needed: , so 5 packets. Packets 1 to 4 carry 1,200 bytes each () and packet 5 carries 200 bytes.
- The packets take different routes. They arrive in the order 2, 1, 5, 4. Packet 3 never arrives.
- The receiver sorts by sequence number. It holds 1, 2, 4 and 5, so it can see that number 3 is missing.
- TCP asks the sender to send packet 3 again. The sender resends it and it arrives.
- The receiver now has all five packets and joins them in order 1, 2, 3, 4, 5. The data is bytes, the same as the original.
The application using the data never sees the loss or the wrong order. TCP hides both.
Worked example 4
Describe, step by step, what happens when you type https://example.org/page into a browser.
- The part before :// is the protocol, here HTTPS. Then comes the domain name example.org and the path /page.
- DNS translates the domain name into an IP address.
- TCP sets up a connection with a three-step handshake (SYN, SYN-ACK, ACK). For HTTPS, the browser and server then also agree encryption keys (see the encryption topic).
- The browser sends an HTTP request for /page, cut into packets by TCP.
- Routers forward each packet using the destination IP address.
- The server replies with the page, also as packets. TCP puts them in order and the browser displays the page.
Common mistakes
- Saying the internet and the web are the same thing. The web is one service that uses the internet.
- Saying that all packets of one message take the same route.
- Saying that routers store websites. They only forward packets.
- Rounding the packet count down instead of up.
- Forgetting the header when a question gives a packet size limit.
- Confusing DNS (names to addresses) with IP (addressing and routing).
Exam tips
- Name the protocol and its job. "TCP puts packets in order and resends lost ones" earns more than "TCP sends the data".
- Packet-count questions: divide, then round up, and say that the last packet is smaller.
- Explain why packet switching helps: shared links, different routes, and only the lost packet is resent.
- In a "what happens when" question, keep the order: DNS, connection, request, reply.
What you will practise
105 multiple-choice questions (Easy, Medium, Hard). Each answer is followed by an explanation.
Example questions
- The internet is:
- Data travels in:
- Routers:
- The internet backbone consists of:
- IP is responsible for:
- The World Wide Web is:
- The Domain Name System (DNS) mainly translates:
- HTTP is the protocol used for:
…and 97 more.