---
title: "Networks and the Internet: A First Look"
book: "Primary & Middle School Computer Science"
subject: computer-science
language: en
chapter: 13
exercises: 11
source: https://one-course.com/books/computer-science/1/en/chapter/13-networks-and-the-internet-a-first-look
license: CC-BY-NC-SA-4.0
credit: "One Computer Science Book, One Course (one-course.com)"
---

# Chapter 13 — Networks and the Internet: A First Look

Noor has drawn a cat for her grandmother, who lives two countries away. She takes a photo of the drawing with the family tablet and sends it. One second later, her grandmother’s phone rings with a small sound, and there is the cat. The photo crossed hundreds of kilometres, through cables under the ground and perhaps under the sea, and through many [computers](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) on the way. How did it find its way?

**You already know.**

Everything a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) keeps, text, pictures or sound, is numbers, and so [bits](https://one-course.com/books/computer-science/1/en/chapter/11-bits-and-bytes-counting-in-binary#def-g5-bits-and-bytes-bit) ([Chapter 12](https://one-course.com/books/computer-science/1/en/chapter/12-text-pictures-and-sound-as-numbers#ch-g5-text-pictures-sound-as-numbers)); a [file](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) holds one piece of work ([Chapter 7](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#ch-g3-files-and-folders)); an [application](https://one-course.com/books/computer-science/1/en/chapter/9-programs-and-the-operating-system#def-g4-programs-and-operating-system-application) is a [program](https://one-course.com/books/computer-science/1/en/chapter/9-programs-and-the-operating-system#def-g4-programs-and-operating-system-program) made for one task ([Chapter 9](https://one-course.com/books/computer-science/1/en/chapter/9-programs-and-the-operating-system#ch-g4-programs-and-operating-system)).

## 13.1 A network

**Definition 13.1 (Network).**

A *network* is a group of [computers](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) and [devices](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device) linked together, by cables or by radio, so that they can send data to each other.

At home, the laptop, the tablet, the phones and the printer usually form a small [network](#def-g5-networks-first-look-network). They are linked to a small box, often on a shelf, which passes the data from one [device](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device) to another and [links](#def-g5-networks-first-look-web) the home [network](#def-g5-networks-first-look-network) to the outside world. Some [devices](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device) are linked to the box by a cable; others by radio, without a cable: this is called *wi-fi*. The school has its own [network](#def-g5-networks-first-look-network) too, with many more [computers](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer).

![A home network: a laptop, a phone and a tablet, all linked by radio to the small box on the shelf by the window.](https://one-course.com/images/onecourse/chapters/computer-science-1/g5-networks-first-look/img-2152a51fcc07.jpg)

*A home [network](#def-g5-networks-first-look-network): a laptop, a phone and a tablet, all linked by radio to the small box on the shelf by the window.*

![A home network. Every device is linked to the home box, by cable (solid lines) or by radio (dashed lines); the box links the home to the Internet.](https://one-course.com/images/onecourse/chapters/computer-science-1/g5-networks-first-look/fig-dbe57000e456.svg)

*A home [network](#def-g5-networks-first-look-network). Every [device](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device) is linked to the home box, by cable (solid lines) or by radio (dashed lines); the box [links](#def-g5-networks-first-look-web) the home to the [Internet](#def-g5-networks-first-look-internet).*

## 13.2 The Internet is a network of networks

**Definition 13.2 (Internet).**

The *Internet* is the worldwide [network](#def-g5-networks-first-look-network) made of millions of [networks](#def-g5-networks-first-look-network) linked to each other: home [networks](#def-g5-networks-first-look-network), school [networks](#def-g5-networks-first-look-network), the [networks](#def-g5-networks-first-look-network) of companies, and the large [networks](#def-g5-networks-first-look-network) that join them across countries and under the seas.

No single [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) is the [Internet](#def-g5-networks-first-look-internet), and nobody owns all of it. Noor’s photo leaves her home [network](#def-g5-networks-first-look-network), goes through the [network](#def-g5-networks-first-look-network) of the company that brings the [Internet](#def-g5-networks-first-look-internet) to her street, then through large [networks](#def-g5-networks-first-look-network) that cross the countries, then through the [network](#def-g5-networks-first-look-network) that serves her grandmother’s town, and at last into her grandmother’s phone. At each step, a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) reads where the data must go and passes it on.

![The Internet as networks joined to networks. The red arrows show one path that Noor’s photo can take; the data could also go another way.](https://one-course.com/images/onecourse/chapters/computer-science-1/g5-networks-first-look/fig-40fd50171242.svg)

*The [Internet](#def-g5-networks-first-look-internet) as [networks](#def-g5-networks-first-look-network) joined to [networks](#def-g5-networks-first-look-network). The red arrows show one path that Noor’s photo can take; the data could also go another way.*

## 13.3 The web

**Definition 13.3 (Server).**

A *server* is a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer), linked to the [Internet](#def-g5-networks-first-look-internet), that keeps [files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) and [programs](https://one-course.com/books/computer-science/1/en/chapter/9-programs-and-the-operating-system#def-g4-programs-and-operating-system-program) and sends them to the other [computers](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) that ask for them.

**Definition 13.4 (Web page and browser).**

A *web page* is a [file](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) kept on a [server](#def-g5-networks-first-look-server), made to be shown on a screen: text, pictures, and [links](#def-g5-networks-first-look-web) to other pages. A *browser* is the [application](https://one-course.com/books/computer-science/1/en/chapter/9-programs-and-the-operating-system#def-g4-programs-and-operating-system-application) that asks a [server](#def-g5-networks-first-look-server) for a web page and shows it.

**Definition 13.5 (Web address).**

The *web address* of a page tells the [browser](#def-g5-networks-first-look-page) which [server](#def-g5-networks-first-look-server) to ask and which [file](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) to ask for. It is typed in the address bar of the [browser](#def-g5-networks-first-look-page).

Take the address

`https://www.example.com/animals/cat.html`

The part `www.example.com` names the [server](#def-g5-networks-first-look-server), and `/animals/cat.html` is the path of the [file](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) on that [server](#def-g5-networks-first-look-server), written like a path on our own [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) ([Chapter 7](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#ch-g3-files-and-folders)). (The name `example.com` is kept free for examples like this one: it belongs to nobody.)

![The browser asks the server for a page, the server sends the file back, and the browser shows it. The underlined words are links to other pages.](https://one-course.com/images/onecourse/chapters/computer-science-1/g5-networks-first-look/fig-4ef146fe8b67.svg)

*The [browser](#def-g5-networks-first-look-page) asks the [server](#def-g5-networks-first-look-server) for a page, the [server](#def-g5-networks-first-look-server) sends the [file](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) back, and the [browser](#def-g5-networks-first-look-page) shows it. The underlined words are [links](#def-g5-networks-first-look-web) to other pages.*

**Definition 13.6 (Link and World Wide Web).**

A *link* is a word or a picture on a [web page](#def-g5-networks-first-look-page) that holds the address of another page: clicking it makes the [browser](#def-g5-networks-first-look-page) ask for that page. The *World Wide Web* is all the [web pages](#def-g5-networks-first-look-page) of all the [servers](#def-g5-networks-first-look-server) of the [Internet](#def-g5-networks-first-look-internet), joined by their links.

![Four pages and their links. An arrow from one page to another is a link on the first page that leads to the second.](https://one-course.com/images/onecourse/chapters/computer-science-1/g5-networks-first-look/fig-3c813e61fa82.svg)

*Four pages and their [links](#def-g5-networks-first-look-web). An arrow from one page to another is a [link](#def-g5-networks-first-look-web) on the first page that leads to the second.*

**History — The web was born in a laboratory.**

In March 1989, Tim Berners-Lee, who worked at CERN, a large physics laboratory near Geneva, wrote a first proposal for a way of linking documents across [computers](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer). By the end of 1990, the first web [server](#def-g5-networks-first-look-server) and the first [browser](#def-g5-networks-first-look-page) were running at CERN, on a NeXT [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer). On 30 April 1993, CERN made the web software free for everyone to use, and the web spread across the world.

![The first web server, a NeXT computer, kept at CERN. The paper label asks that nobody switch it off. Photograph: Coolcaesar, CC BY-SA 3.0.](https://one-course.com/images/onecourse/chapters/computer-science-1/g5-networks-first-look/img-1655dab2adc8.jpg)

*The first web [server](#def-g5-networks-first-look-server), a NeXT [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer), kept at CERN. The paper label asks that nobody switch it off. Photograph: Coolcaesar, CC BY-SA 3.0.*

## 13.4 Search engines

How do we find a page when we do not know its address? We ask a search engine, a website that answers a few words with a list of pages. It does not read the whole web when we ask: that would take far too long. Long before, its [programs](https://one-course.com/books/computer-science/1/en/chapter/9-programs-and-the-operating-system#def-g4-programs-and-operating-system-program) visited billions of pages, following their [links](#def-g5-networks-first-look-web) one after another, and noted which words appear on which page. When we search, it looks in that list and answers at once. The order of the answers is chosen by the search engine, with its own rules: the first answer is not always the best one.

![Servers in a data centre: rows of cabinets, each full of computers. Search engines and large websites run on thousands of them.](https://one-course.com/images/onecourse/chapters/computer-science-1/g5-networks-first-look/img-adf256621a58.jpg)

*[Servers](#def-g5-networks-first-look-server) in a data centre: rows of cabinets, each full of [computers](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer). Search engines and large websites run on thousands of them.*

## 13.5 A password is a key

Our messages, photos and accounts are kept on [servers](#def-g5-networks-first-look-server), which anybody on the [Internet](#def-g5-networks-first-look-internet) can try to reach. How does a [server](#def-g5-networks-first-look-server) know that it is really Noor who asks for Noor’s photos?

**Definition 13.7 (Password and authentication).**

*Authentication* is proving to a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) who we are. A *password* is a secret word or phrase used for it: whoever knows the password can open the account, as whoever has the key can open the door.

A [password](#def-g5-networks-first-look-password) is strong if it is hard to guess, even by a [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) that tries millions of [passwords](#def-g5-networks-first-look-password). Let us count. A code of 4 digits has 10 choices for the first digit, 10 for the second, and so on: $10 \times 10 \times 10 \times 10 =
10\,000$ codes. A [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) tries them all in a moment. A [password](#def-g5-networks-first-look-password) of 12 characters, each a small letter or a digit, has 36 choices for each character: 36 multiplied by itself, 12 times over, makes more than four billion billion [passwords](#def-g5-networks-first-look-password). Each extra character multiplies the number of possibilities, so a long [password](#def-g5-networks-first-look-password) is much stronger than a short one.

**Safe use.**

Make your [passwords](#def-g5-networks-first-look-password) long: three random words put together, like “kettle-giraffe-snowstorm”, are long, easy to remember and hard to guess. Never use your name, your birthday or “1234”. Use a different [password](#def-g5-networks-first-look-password) for each important account. Never tell a [password](#def-g5-networks-first-look-password) to anyone, even a friend; only a parent or a teacher may help you with it.

## 13.6 Exercises

**Exercise 13.1 ★.**

Name three [devices](https://one-course.com/books/computer-science/1/en/chapter/6-inside-the-computer#def-g3-inside-the-computer-device) of a home [network](#def-g5-networks-first-look-network). How is each one linked to the home box?

**Solution of Exercise 13.1.**

For example: a laptop (by cable or by radio), a phone (by radio, wi-fi), a printer (by cable or by radio).

**Exercise 13.2 ★.**

Sami says: “The [Internet](#def-g5-networks-first-look-internet) is a very big [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) somewhere.” Is he right?

**Solution of Exercise 13.2.**

No. The [Internet](#def-g5-networks-first-look-internet) is millions of [networks](#def-g5-networks-first-look-network) joined together, each with its own [computers](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer); no single [computer](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) is the [Internet](#def-g5-networks-first-look-internet).

**Exercise 13.3 ★.**

What does a [browser](#def-g5-networks-first-look-page) do?

**Solution of Exercise 13.3.**

It asks a [server](#def-g5-networks-first-look-server) for a [web page](#def-g5-networks-first-look-page), using the page’s address, and shows the page it receives; when we [click](https://one-course.com/books/computer-science/1/en/chapter/3-the-keyboard-and-the-mouse#def-g2-keyboard-and-mouse-click) a [link](#def-g5-networks-first-look-web), it asks for the next page.

**Exercise 13.4 ★.**

What does a [server](#def-g5-networks-first-look-server) keep, and what does it do with it?

**Solution of Exercise 13.4.**

[Files](https://one-course.com/books/computer-science/1/en/chapter/7-files-and-folders#def-g3-files-and-folders-file) and [programs](https://one-course.com/books/computer-science/1/en/chapter/9-programs-and-the-operating-system#def-g4-programs-and-operating-system-program), such as [web pages](#def-g5-networks-first-look-page), photos and messages. It sends them to the [computers](https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer#def-g1-what-is-a-computer-computer) that ask for them.

**Exercise 13.5 ★.**

In the drawing of the four pages, find a way to go from page A to page D by clicking [links](#def-g5-networks-first-look-web). Can you then go from D back to A?

**Solution of Exercise 13.5.**

A, then B, then D (two [clicks](https://one-course.com/books/computer-science/1/en/chapter/3-the-keyboard-and-the-mouse#def-g2-keyboard-and-mouse-click)). From D, the only [link](#def-g5-networks-first-look-web) leads to B, and from B the only [link](#def-g5-networks-first-look-web) leads to D: there is no way back to A.

**Exercise 13.6 ★.**

Strong or weak? “1234”, “anna”, “purple-tractor-moonlight”, “qwerty”, “Tom2015”, “giraffe kettle snowstorm”.

**Solution of Exercise 13.6.**

Weak: “1234”, “anna”, “qwerty” (a row of the keyboard) and “Tom2015” (a name and a year). Strong: “purple-tractor-moonlight” and “giraffe kettle snowstorm” (long, three random words).

**Exercise 13.7 ★.**

How many different codes of 3 digits are there?

**Solution of Exercise 13.7.**

$10 \times 10 \times 10 = 1000$ codes, from 000 to 999.

**Exercise 13.8 ★.**

How many different [passwords](#def-g5-networks-first-look-password) of 4 small letters are there? Write the multiplication, then compute it.

**Solution of Exercise 13.8.**

$26 \times 26 \times 26 \times 26$: $26 \times 26 = 676$, $676 \times 26 =
17\,576$, and $17\,576 \times 26 = 456\,976$ [passwords](#def-g5-networks-first-look-password).

**Exercise 13.9 ★★.**

Why should you use a different [password](#def-g5-networks-first-look-password) for each important account?

**Solution of Exercise 13.9.**

If one website loses its [passwords](#def-g5-networks-first-look-password), or someone sees one of them, that person could open all the accounts that use the same [password](#def-g5-networks-first-look-password). With a different [password](#def-g5-networks-first-look-password) for each, only one account is in danger.

**Exercise 13.10 ★★.**

Adding one character to a [password](#def-g5-networks-first-look-password) multiplies the number of possible [passwords](#def-g5-networks-first-look-password). By how much, if the characters are digits? If they are small letters?

**Solution of Exercise 13.10.**

By 10 for digits (each new place has 10 choices), and by 26 for small letters.

**Exercise 13.11 ★★.**

A search engine answers in less than a second. What has it done before you searched, so that it can answer so fast?

**Solution of Exercise 13.11.**

Its [programs](https://one-course.com/books/computer-science/1/en/chapter/9-programs-and-the-operating-system#def-g4-programs-and-operating-system-program) visited a huge number of [web pages](#def-g5-networks-first-look-page) in advance, following their [links](#def-g5-networks-first-look-web), and made a list of which words appear on which page. When you search, it only looks up your words in that list.
