By the end of this lesson you will be able to
- Explain with an analogy why data is sent as small packets rather than one long stream.
- Describe a protocol as an agreed set of rules and give two examples.
- Tell bandwidth from latency and say which one matters for a video call and which for a big download.
- Convert a speed in megabits per second into a rough download time for a file.
- Trace a packet through several hops on its way across the internet.
When a video buffers or a game lags, people say “the internet is slow”. But there are at least two different kinds of slow, and they have different causes and cures. This lesson explains how data actually travels and gives you the two words, bandwidth and latency, that let you describe a speed problem precisely.
Data travels in packets
Imagine posting a long book to a friend, but the post office only accepts small envelopes. You tear the book into numbered pages, put a few pages in each envelope, address every envelope and post them. The envelopes may take different routes and arrive in a different order. Your friend uses the page numbers to put the book back together.
That is how networks work. A message, a photo or a web page is cut into small pieces called packets. Each packet carries a header, which is the label on the envelope, and a piece of the actual data, called the payload. The header holds where the packet came from, where it is going, and its position in the sequence.
192.168.1.23Fromsender's address203.0.113.50Todestination address3 of 8Orderplace in the message…a piece of your photo…Payloadthe data itselfRead this figure as text
A packet split into labelled parts: from address, to address, order number and payload.
One packet shown as four parts from left to right. Part 1, From: 192.168.1.23, the sender's address (a made-up home address). Part 2, To: 203.0.113.50, the destination's address (a made-up documentation address). Part 3, Number: 3 of 8, which place this packet has in the whole message. Part 4, Payload: a piece of the photo or page being sent. The first three parts are the header, like the writing on an envelope; the payload is the contents.
Why not send everything in one go? There are three good reasons. Small pieces share the roads fairly, so one large download cannot block everyone else. If a piece is lost or damaged, only that piece needs to be sent again, not the whole file. And pieces can take different routes, so one broken cable does not stop the message.
The journey across the internet
A packet does not go straight from your laptop to a website. It passes through a chain of routers, each of which looks at the destination address and passes the packet to the next router that is closer. Each hand-over is called a Hop. A website on the other side of the world may be fifteen or more hops away.
Read this figure as text
A network diagram showing a laptop, home router, provider router, an exchange and a web server joined in a chain with numbered links.
Left to right, five points joined by numbered links. Your laptop (192.168.1.23) sends to link 1 your home router. Link 2 goes to your provider's router. Link 3 goes to a regional exchange router where many providers meet. Link 4 goes to the web server's provider router. Link 5 reaches the web server (203.0.113.50). Each router reads the destination address and forwards the packet to the next router. Every link is a hop; the replies come back along a similar path in the opposite direction.
Protocols: rules everyone agrees on
For the post to work, everyone must follow the same rules: where to write the address, what size the envelope is, what to do if a letter is lost. In computing, a set of agreed rules for communicating is a Protocol. Without shared protocols, a laptop made in one country could not talk to a server made in another.
Different protocols do different jobs, and they work together in layers, like the stages of posting a letter: writing it, addressing it and the lorry that carries it. You will meet the main ones in this path.
| Protocol | Job | Everyday example |
|---|---|---|
| IP (Internet Protocol) | Addressing: gets packets to the right destination | Every packet on the internet |
| TCP | Makes sure all packets arrive and in order | Loading a web page or downloading a file |
| UDP | Sends packets quickly without checking | Video calls and online games |
| HTTP / HTTPS | Asking for and sending web pages | Opening a website |
| DNS | Turning names into addresses | Typing example.org |
Bandwidth and latency: two kinds of speed
Bandwidth is how much data a connection can carry per second. Think of the width of a pipe: a wide pipe moves more water per second. It is measured in bits per second, usually megabits per second (Mbps). Latency is how long one packet takes to get there and back, like how long the first drop of water takes to travel the length of the pipe. It is measured in milliseconds (ms), thousandths of a second.
- Like the width of a pipe
- Measured in Mbps
- Matters for downloads and streaming
- More does not make one packet arrive sooner
A wide road, not a fast car.
- Like the length of the pipe
- Measured in milliseconds (ms)
- Matters for calls, games, remote desktops
- Lower is better
The delay before anything starts.
Read this figure as text
Two columns explaining bandwidth with a wide pipe and latency with the delay for one packet.
Column 1, Bandwidth: how much data per second; like the width of a pipe; measured in megabits per second (Mbps); matters for large downloads, video streaming and uploading many photos; more bandwidth does not make a single packet arrive sooner. Column 2, Latency: how long one packet takes for a round trip; like the length of the pipe; measured in milliseconds (ms); matters for video calls, online games and anything interactive; low is better. A connection can have lots of bandwidth and high latency, or the reverse.
A real example: a satellite internet link might offer a wide pipe (good for downloading a film) but a long delay (poor for a fast game). A mobile signal in a crowded place might have plenty of bandwidth shared among too many users, so each person gets little.
| Connection | Typical round trip | Feels like |
|---|---|---|
| Your laptop to your own router | 1 to 5 ms | Instant |
| Same country by cable | 10 to 40 ms | Instant |
| Another continent | 100 to 250 ms | Slight delay in calls |
| Satellite link | 500 ms or more | Obvious pause in a conversation |
Speed adverts quote bandwidth in megabits (small b). File sizes are in megabytes (capital B). A byte is eight bits, so divide the megabits by eight to get megabytes per second. A 100 Mbps line moves at best about 12.5 megabytes per second, so a 500 MB file takes roughly 40 seconds at best. Real speeds are lower because many devices share the line, and overheads use some of it.
Read this figure as text
A bar chart comparing how long it takes to download a 500 megabyte file at 5, 20, 100 and 500 megabits per second.
Download times for a 500 megabyte file, best case, on a log scale. At 5 Mbps: about 800 seconds, nearly 13 and a half minutes. At 20 Mbps: about 200 seconds, over 3 minutes. At 100 Mbps: about 40 seconds. At 500 Mbps: about 8 seconds. Real downloads are slower than these because of sharing and overheads. Each fivefold rise in speed cuts the time by about five.
Common mistakes
✖ Instead of: Thinking more bandwidth always fixes lag in games and calls.
✔ Do this: Lag is mostly latency or lost packets. Extra bandwidth helps big downloads, not delay. Check Wi-Fi signal and distance first.
✖ Instead of: Mixing up Mb (megabit) and MB (megabyte).
✔ Do this: Small b is bits, capital B is bytes. Divide megabits by eight to get megabytes.
✖ Instead of: Believing the speed on the box is what you will always get.
✔ Do this: Advertised speeds are best case. Wi-Fi, other users, and the website's own server all lower what you see.
If something goes wrong
- My download seems far slower than the speed my provider sells.
- Check you are comparing the same unit: divide the advertised megabits by eight. Then test close to the router, with other devices paused. If it is still far lower on a cable, tell your provider the figures you measured.
- Video calls freeze but downloads are fast.
- That points at latency or lost packets rather than bandwidth. Move closer to the router or use a cable, close other streaming devices, and try again.
Key terms
- Packet
- A small piece of data sent across a network, labelled with where it came from and where it is going.
- Protocol
- A set of agreed rules that devices follow so they can understand each other.
- Hop
- One step of a packet's journey from one router to the next.
- Bandwidth
- The amount of data a connection can carry in a given time.
- Latency
- The time it takes for data to travel from one place to another and back.
- Megabit (Mb)
- A million bits; internet speeds are quoted in megabits per second, and eight bits make one byte.
- Packet loss
- When some packets never arrive, so data has to be sent again or is missing.
Practise it for real
Reading is not the same as being able to do it. Complete these on your own computer, then tick only what you have actually done. These ticks are your own honest record: nothing checks them for you.
Work out download times
Without a real network, calculate the best-case time to download a 2 GB film (2,000 MB) on a 50 Mbps connection. Steps: divide 50 by 8 to get megabytes per second, then divide 2,000 by that figure. Repeat for a 200 Mbps line. Explain why your result is an optimistic best case.
Challenge: explain bandwidth and latency to a friend
Think of your own analogy, not pipes or roads, for bandwidth and latency. Explain which of the two matters more for a video call and which for downloading a long film, and why. Check that your friend can say back the difference.
Knowledge check
6 questions. You need 80% to pass. Mistakes here are part of learning, and you can retry as often as you like.
Summary
- Data is cut into numbered packets, each with a header and a payload, and reassembled at the destination.
- Packets travel hop by hop through routers.
- A protocol is an agreed set of rules; IP, TCP, UDP, HTTP and DNS each do a job.
- Bandwidth is how much per second (Mbps); latency is how long a round trip takes (ms).
- Divide megabits by eight to get megabytes.
Checklist: can you do these?
Marking a lesson as read does not prove you can do it. Skills count as demonstrated when you pass the quiz (not yet) and complete the practical tasks (not yet).
Related lessons
References and further reading
Official sources for details that can change between versions.
- What is a packet? (Cloudflare)
- What is latency? (Cloudflare)