---
title: "Lab: Following a Web Page on Its Journey"
domain: networking
level: foundations
duration: "30 min"
cost: "free"
environment: "your own computer with a web browser (Chrome, Edge, Firefox or Safari); Part B optional, uses the terminal"
---

# Lab: Following a Web Page on Its Journey

## Goal
See with your own eyes how many pieces a single web page is made of, and then, if you like, watch the hops that your data takes to reach a website. You only observe and think: nothing is changed on your computer.

## Objectives
- Describe a web page as many requests from a client to servers.
- Recognise packets hopping from router to router, and the role of your ISP in the first hops.

## Prerequisites
- A computer with a web browser and an Internet connection. A phone is enough for the thinking exercises, but the developer tools need a computer.
- Part B only: a terminal. Steps tell you how to open it, and every command is ready to paste.
- The lesson [How the Internet Works](lesson.md).

> [!WARNING]
> Everything here is safe and free. The traceroute command only sends a few small test packets towards `example.com`, a site reserved for examples. Don't point it at other people's computers.

## Architecture
![Lab overview. Two areas. Part A, your browser: the developer tools, opened with F12 on the Network tab, show a list of requests; one page makes many requests. Part B, your terminal, which is optional: tracert on Windows or traceroute on macOS and Linux shows the hops, one line per router between you and the site.](../../../assets/diagrams/inet-lab-architecture.svg)

*Figure 1. Part A shows what your browser asks for; Part B shows the path the packets take.*

## Steps

### Step 1 — Open the browser's developer tools (5 min)
Every browser has a hidden panel, made for people who build websites, that shows what the browser is doing. It is safe to open and you can't break anything with it.

1. Open a new browser tab and go to `https://example.com`.
2. Open the developer tools:

| Browser | How to open the Network panel |
|---|---|
| Chrome or Edge | Press `F12` (or `Ctrl`+`Shift`+`I`; on a Mac `Cmd`+`Option`+`I`), then click the **Network** tab |
| Firefox | Press `F12` (or `Ctrl`+`Shift`+`E`; on a Mac `Cmd`+`Option`+`E`) and it opens on **Network** |
| Safari | First enable the menu: **Safari > Settings > Advanced**, tick **Show features for web developers**. Then **Develop > Show Web Inspector** (`Cmd`+`Option`+`I`) and click **Network** |

3. With the panel open, reload the page (`F5`, or `Cmd`+`R` on a Mac).

You will see a table with a row for each thing the browser asked for. Each row is one **request**: your browser (client) asking a server for one item.

> [!NOTE]
> Menu names can change slightly between browser versions. If you don't find an option, search the browser's help for "developer tools network".

### Step 2 — Count the requests on a very simple page (5 min)
Look at the table for `example.com`. Look for the summary line at the bottom of the panel (Chrome, Edge, Firefox) or in the panel's footer (Safari): it shows how many requests were made and how much data came back.

Answer before opening the hint:
1. How many requests did the page make?
2. Is any of them an image?

<details>
<summary>Show the answer</summary>

`example.com` is a deliberately tiny page, so it makes very few requests: typically one for the page text itself, sometimes one more (for example a small icon the browser asks for). The exact number depends on your browser. There are no images. This is the simplest example of the journey in the lesson: one request, one answer.

</details>

### Step 3 — Count the requests on a busy page (8 min)
Now try a page you use every day, such as a news website or a shop (any site you normally visit). With the Network panel still open:

1. Type the address in the same tab and press Enter.
2. Wait until the page stops loading.
3. Write down the number of requests shown in the summary line.
4. Click one or two rows. Look at the **Name** (what was asked for) and the **Type** or **Domain** column.
5. If your browser has a **Domain** or **Host** column, count how many different domains the page used. In Chrome and Edge you can right-click the table header and tick **Domain**; Firefox shows a Domain column by default.

Questions:
1. Roughly how many requests did one page make?
2. Did all the requests go to the same server?
3. What kinds of things were asked for (look at the Type column)?

<details>
<summary>Show the answers</summary>

1. A typical news or shop page makes dozens, often well over a hundred, requests. The number varies by site and changes each time (for example with adverts).
2. No. A page's text may come from the site's own servers while pictures, fonts, videos or adverts come from other servers, sometimes run by other companies. Your browser talks to all of them.
3. Types such as `document` (the page text), `stylesheet` (colours and layout), `script` (small programs), `image`, `font` and `fetch`/`xhr` (data loaded after the page appears).

This is what the lesson meant by "steps 3 to 5 repeat many times": one page is many small requests and answers, each travelling as packets.

</details>

### Step 4 — Optional: watch the hops with traceroute (8 min)
A **traceroute** tool shows the routers your packets pass through on the way to a site. It works by sending small test packets and noting each router that answers.

Open a terminal:

| System | How to open it |
|---|---|
| Windows | Press the Windows key, type `cmd`, press Enter |
| macOS | Press `Cmd`+`Space`, type `Terminal`, press Enter |
| Linux | Press `Ctrl`+`Alt`+`T`, or search for "Terminal" |

Then paste the command for your system and press Enter. It can take up to a minute.

**Windows**
```bash
tracert example.com
```

**macOS and Linux**
```bash
traceroute example.com
```

> [!NOTE]
> On some Linux systems `traceroute` is not installed and the shell says `command not found`. Install it with your system's package manager (for example `sudo apt install traceroute` on Debian or Ubuntu, `sudo dnf install traceroute` on Fedora; you may need an administrator's password), or skip this step and read the example output below. macOS and Windows include the tool.

Example output from a Linux computer (yours will be different: the addresses, the number of lines and the times all vary). The public addresses have been replaced with addresses reserved for documentation, so you won't see these exact numbers:

```text
traceroute to example.com (192.0.2.243), 30 hops max, 60 byte packets
 1  _gateway (192.168.1.1)  0.460 ms  0.468 ms  0.492 ms
 2  10.0.26.88 (10.0.26.88)  1.630 ms  1.663 ms  1.624 ms
 3  172.16.64.1 (172.16.64.1)  24.444 ms  24.469 ms  24.454 ms
 4  10.221.198.223 (10.221.198.223)  2.660 ms  2.621 ms  2.205 ms
 5  10.221.196.240 (10.221.196.240)  1.806 ms  1.817 ms  3.768 ms
 6  10.220.107.104 (10.220.107.104)  9.772 ms  9.609 ms 10.221.240.35 (10.221.240.35)  13.676 ms
 7  198.51.100.124 (198.51.100.124)  9.600 ms 198.51.100.122 (198.51.100.122)  14.182 ms  17.964 ms
 8  203.0.113.10 (203.0.113.10)  10.410 ms  29.214 ms  10.356 ms
 9  203.0.113.21 (203.0.113.21)  10.776 ms  10.790 ms  10.776 ms
10  192.0.2.243 (192.0.2.243)  14.703 ms  14.650 ms  14.611 ms
```

How to read it:

- The first line says where we are going: the name, its IP address and the limits of the test (up to 30 hops).
- Each numbered line is **one hop**: one router that your packets passed.
- Line 1 is your own home router (`192.168.1.1` is a typical home address, and a private one that only works inside a home network).
- Lines 2 to 6 are probably the inner network of the ISP, with private-looking addresses beginning `10.` or `172.16.`. Private addresses are only used inside one network.
- Line 7 onwards are public addresses: networks further away. The last line is the site's own server, `192.0.2.243`, the address on the first line.
- Each line shows three times, in milliseconds (ms), one per test packet. A millisecond is one thousandth of a second. Small numbers mean a fast hop. A time can jump up and down (see line 3), because routers are sometimes busy answering test packets.
- A line with two addresses means that two routers answered, because packets can take different routes, as in the lesson.

> [!NOTE]
> On Windows, `tracert` prints a similar table (a number, three times and an address per line, and the message `Trace complete.` at the end). We did not capture a Windows run for this lab, so your screen will not look exactly like the example above.

Some lines may look like this:

```text
10  * * *
11  * * *
```

Asterisks (`*`) mean that a router did not answer the test packets in time. This is normal. Many routers are set to ignore test packets, for safety or because they are busy, yet they still forward your real data. If the last line is also asterisks, the site itself may ignore tests; the tool eventually stops.

### Step 5 — Think about what you saw (4 min)
1. In Step 4, which line was your home router? Which lines were probably your ISP?
2. The packets went through about ten hops. Why is that a good example of "a network of networks"?
3. If you ran traceroute twice, would you expect the exact same list? Why?

<details>
<summary>Show the answers</summary>

1. Line 1 is your home router, the first hop. The next few lines, often with addresses starting `10.`, `100.` or `172.16.`, are usually your ISP's routers.
2. Your packets crossed your home network, your ISP's network and then one or more other networks before reaching the server. Each is separate, and they pass packets to each other.
3. Not always. Routers can choose different next hops depending on how busy links are, so the route and the times can change between runs.

</details>

## Verification
You have completed the lab if you can say:
- One web page makes many requests (more than one), often to several servers (Part A).
- Each line of traceroute output is one router your data passed (Part B, if you did it).

## Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| No Network tab or panel appears | A different shortcut on your system, or on Safari the developer menu is not enabled | Use the browser's menu (**More tools > Developer tools** in Chrome/Edge, **Web Developer > Network** in Firefox); on Safari enable the Develop menu as in Step 1 |
| The Network table is empty | The page was loaded before the panel was opened | Keep the panel open and reload the page |
| `traceroute: command not found` (Linux) | The tool is not installed | Install it as in the note in Step 4, or skip the step |
| Many lines of `* * *` right from line 1 or 2 | A network that blocks test packets, such as some work or school networks | Normal; try from another network, or read the example output |
| Different numbers than in the example | Every network and every moment is different | Expected: this is the point of the exercise |

## Challenge (optional)
Run the traceroute again for a site hosted in another country (use a well-known public site you already visit). Compare the number of hops and the times with `example.com`. Does a farther site always show more hops or higher times? Write down your guess before you look.

## Cleanup
Nothing to clean up: close the developer tools panel (`F12` again) and the terminal window. You changed no settings and created no files.

## What you learned
- A web page is not one thing: it is many requests from your browser (client) to one or more servers.
- Your data passes through many routers, hop by hop, starting with your home router and your ISP.
- Asterisks and changing times in traceroute are normal, because routers differ in how they answer and routes can change.
