Pearson Edexcel International GCSE Computer Science (4CP0) · 5.1, 5.3 Networks and the internet
Mini-Lesson
Networks and the internet
6 missions. Guess, learn, then check. Your place is saved.
Mission 1If networks spread viruses, why does every school connect its PCs?
Mission 2One box fails and a whole office goes offline. How?
Mission 3How do two computers that have never met agree how to talk?
Mission 4How does a video arrive in order if its pieces take different routes?
Mission 5Routers only use numbers. How does a typed web address find its site?
Mission 6How does your data find one computer among billions online?
The specification points and sources are listed under the lesson: see Sources.
Mission 1
If networks spread viruses, why does every school connect its PCs?
Make a guess: If networks spread viruses, why does every school connect its PCs?
Networks · why network and types of network
Why connect computers?
A computer network is two or more computers (or other devices) connected so they can share data and resources.
Joining them brings gains, and it brings costs and risks:
Gains
Costs and risks
Share files and data from any computer
Hardware (cables, switches, servers) costs money
Share printers and one internet connection
Needs skilled staff to set up and maintain
Communicate: email, messaging, shared documents
Malware can spread from one computer to others
Back up every computer from one place
Hackers can attack from anywhere on the network
Install software and updates centrally
If a central device or server fails, many users are hit
Quick check
?A small office has five stand-alone computers. Which change would a network bring?
Networks · why network and types of network
Types of network
A LAN (local area network) covers a small area, such as one school, and is usually owned and run by one organisation.
A WAN (wide area network) covers a wide geographical area and links LANs. It is often under collective or shared ownership.
The internet is the biggest WAN.
A PAN (personal area network) links one person's devices over a few metres, e.g. phone and earbuds, using Bluetooth.
Networks · why network and types of network
Client-server and peer-to-peer
On a client-server network, servers provide services and clients request and use them.
On a peer-to-peer network there is no server: every computer is equal and shares its own files.
Client-server
Peer-to-peer
Files and backups
Stored and backed up centrally
Spread across the computers
Security
Managed in one place
Set on each computer
Cost
Servers and staff are expensive
Cheap and simple to set up
Weak spot
If the server fails, its service stops
A computer's files vanish when it is off
Networks · why network and types of network
Wired or wireless?
Wired connections use cables; wireless connections use radio waves.
The main wired standard is Ethernet; common wireless ones are Wi-Fi and Bluetooth.
Wired
Wireless
Speed and bandwidth
Usually higher
Usually lower, shared by nearby devices
Range
Longer, especially with fibre
Limited; walls and interference weaken it
Latency (delay)
Lower
Higher
Mobility and set-up
Devices fixed; cabling costs
Devices can move; cheap to add
Security
Must plug in to tap it
Signals can be picked up nearby
Networks · why network and types of network
Measuring network performance
Bandwidth is the most data a connection can carry each second. Speeds are measured in bits per second (bps), not bytes.
Speeds are given in Mbps (million bits per second) or Gbps (billion bits per second).
Time (s) = file size in bits ÷ rate in bits per second. 1 MiB = 1,024 × 1,024 × 8 bits.
Calculate
?A 25 MiB video is sent over a 10 Mbps connection. How long does it take, to 1 decimal place?
seconds
Networks · why network and types of network
Mobile generations
Mobile phones connect to the internet through a mobile network of cell masts. Its rules are set by mobile communication standards, released as generations.
3G made mobile internet browsing, email and video calls practical.
4G is much faster, carrying all data, including voice, as internet traffic; streaming HD video became normal.
5G gives higher speeds, lower latency and room for far more connected devices, such as sensors and self-driving vehicles.
Mission check
?If networks spread viruses, why does every school connect its PCs?
A network lets a school share files, printers and one internet connection, and back up and manage every PC from one place. The risks, such as malware spreading, hardware costs and a central failure, are real, so networks are protected and maintained rather than avoided.
Mission 2
One box fails and a whole office goes offline. How?
Make a guess: One box fails and a whole office goes offline. How?
Networks · topologies
The star topology
A topology is the layout of how the devices on a network are connected.
In a star topology, every device has its own cable to one central device, usually a switch. All data passes through the centre, which sends it on to the right device.
Advantages
Disadvantages
If one cable fails, only that device is cut off
If the central switch fails, the whole network fails
Fast and reliable: few data collisions
Lots of cable, so it can be expensive
Easy to add devices and to find faults
The switch can become a bottleneck when traffic is heavy
Quick check
?On a star network of eight PCs, the cable to PC 3 is cut. What happens?
Networks · topologies
The mesh topology
In a mesh topology, devices connect directly to several others, so there are many paths between them.
In a full mesh every device connects to every other one. With 4 devices that is 6 links.
If a link fails, data is sent along another path: the network self-heals.
Advantages
Disadvantages
Very reliable: no single point of failure
A lot of cable and set-up: expensive
Data can take the fastest free path
Complex to set up and manage
Handles heavy traffic well
Many links are unused much of the time
Calculate
?A small office links 5 computers in a full mesh: every computer has its own cable to every other one. How many cables are needed?
cables
Networks · topologies
The bus topology
In a bus topology, every device connects to one shared main cable, the backbone, with a terminator at each end.
Data sent by one device travels along the whole backbone; only the device it is addressed to keeps it.
It is cheap and needs little cable, but if the backbone breaks the whole network fails, and it slows down as devices are added because of data collisions.
Networks · topologies
The ring topology
In a ring topology, each device connects to exactly two others, forming a closed loop.
Data travels round the ring in one direction, passing through each device until it reaches its destination.
There are no collisions, so it copes well with heavy traffic. But one broken link or device can stop the whole ring, and adding a device means breaking the loop.
Quick check
?Why does a bus network slow down as more devices are added?
Quick check
?A hospital's patient-monitoring network must keep working even if any one cable is cut. Which topology fits best?
Mission check
?One box fails and a whole office goes offline. How?
The office used a star topology, so every PC's only link ran to one central switch. When that switch failed, no data could move at all. A mesh avoids this by giving every device more than one path.
Mission 3
How do two computers that have never met agree how to talk?
Make a guess: How do two computers that have never met agree how to talk?
Networks · protocols and layers
Protocols
A protocol is a set of rules for transferring data between devices.
It sets things like how data is formatted, how devices are addressed and how errors are spotted.
Both devices must follow the same protocol, whoever made them. Different jobs use different protocols.
Networks · protocols and layers
Protocols for the web and email
HTTP: a browser requests web pages from a web server, which sends them.
HTTPS: HTTP with encryption, so intercepted data can't be read.
FTP: transfers files between computers.
SMTP: sends email from an app to a mail server, and between mail servers.
IMAP: reads email kept on the server, so every device shows the same inbox.
POP3: downloads email to one device, usually deleting it from the server.
Networks · protocols and layers
Protocols that move the data
TCP splits data into numbered packets, checks they all arrive, has missing ones resent and puts them back in order.
IP gives each packet its source and destination IP addresses and routes it across networks.
TCP and IP work together, so they are often named as one: TCP/IP.
Ethernet is the set of rules for wired LANs; Wi-Fi (802.11) for wireless LANs.
Quick check
?Ama clicks Send in her email app. Which protocol carries the message to her mail server?
Networks · protocols and layers
Why use layers?
Sending data is split into layers. Each layer does one part of the job and each protocol belongs to one layer.
Sent data passes down the layers, each adding its own information. Received data passes back up.
Benefits: each layer is a smaller problem; one layer can change without changing the others (swap a cable for Wi-Fi and the browser still works); makers can build for one layer.
Networks · protocols and layers
The 4-layer TCP/IP model
Layer
What it does
Protocols and parts
Application
Where network applications, such as web browsers and email programs, work
HTTP, HTTPS, FTP, SMTP, POP3, IMAP
Transport
Sets up communication between the two hosts, which agree settings such as packet size; splits data into packets
TCP
Network
Addresses and packages data; routes the packets across the network
IP
Data link
The network hardware, such as the NIC, and the operating system's device drivers
Ethernet, Wi-Fi
Quick check
?A router reads a packet's destination IP address to choose where to send it next. Which layer of the TCP/IP model is this?
Mission check
?How do two computers that have never met agree how to talk?
The two computers have never met, but they follow the same protocols, such as SMTP for email and TCP and IP for moving the data. The work is split into layers, each with its own protocols, so every device that follows the rules can talk to every other.
Mission 4
How does a video arrive in order if its pieces take different routes?
Make a guess: How does a video arrive in order if its pieces take different routes?
Networks · packets and packet switching
Splitting data into packets
Before data is sent across a network, it is broken into small pieces called packets.
Each packet is sent on its own and the receiving computer joins them back together.
Small packets share the network's links fairly: no single huge file blocks a link. If one packet is lost or damaged, only that packet needs to be sent again.
Networks · packets and packet switching
Inside a packet
The header holds the destination address, the source address (where it came from) and the packet number, used to put the data back in order.
The payload is the actual data being carried.
Quick check
?A web page is sent as 40 packets. Which part of each packet lets the receiving computer put the page back together in the right order?
Networks · packets and packet switching
Packet switching
In packet switching, each packet is sent across the network separately.
Routers read each packet's destination address and send it on towards its destination, one hop at a time.
Each packet may take a different route, depending on which links are free or working.
So packets can arrive out of order. Once the last packet arrives, the receiver uses the packet numbers to reorder them.
Your answer
?Four packets arrive in this order. Packet 3: "E GA" · Packet 1: "MEET" · Packet 4: "TE" · Packet 2: " AT TH". Type the original message.
Quick check
?A cable between two routers is cut while a file is being sent. What happens to the packets still to be sent?
Mission check
?How does a video arrive in order if its pieces take different routes?
The video is split into packets, and each header includes a packet number. Routers send each packet on whatever route works best, so they can arrive jumbled. When the last packet arrives, the receiving computer uses the numbers to put them back in order.
Mission 5
Routers only use numbers. How does a typed web address find its site?
Make a guess: Routers only use numbers. How does a typed web address find its site?
Networks · the internet and the web
Reading a web address
The internet is a worldwide collection of computer networks: the infrastructure.
The world wide web is the collection of websites and web pages you reach using the internet.
A URL (uniform resource locator) is the text address of a web page.
Its parts: the protocol (https), the domain name (www.example.org) and the web page / file name (/physics/waves.html).
Your answer
?In the URL https://shop.example.com/sale/shoes.html, what is the domain name?
Networks · the internet and the web
From name to number
Every device on the internet is found by its IP address, e.g. 203.0.113.25. Names are easier to remember.
The DNS (domain name service) matches domain names to IP addresses.
The browser sends the domain name to a DNS server, which returns the IP address.
If that server doesn't hold the name, it asks another DNS server. If none does, an error is returned.
Networks · the internet and the web
Fetching the page
A web server stores web pages and sends them to clients, such as your browser, that request them.
The browser sends an HTTP request to the server's IP address. The server replies with the page's HTML, which the browser renders into the page you see.
HTTPS is the secure version: data is encrypted, so intercepted data can't be read.
An ISP (internet service provider) connects users to the internet.
Quick check
?You type https://www.example.org into a browser for the first time. What must the browser get from a DNS server before it can request the page?
Mission check
?Routers only use numbers. How does a typed web address find its site?
The browser sends the domain name to a DNS server, which returns the web server's IP address (asking other DNS servers if it doesn't know). Routers then carry the HTTP or HTTPS request to that address, and the web server sends back the page for the browser to render.
Mission 6
How does your data find one computer among billions online?
Make a guess: How does your data find one computer among billions online?
Networks · hardware and addresses
IP addresses
An IP address identifies a device on a network, so data can be sent to it. Every packet carries a destination IP address.
An IPv4 address is 32 bits, written as four denary numbers from 0 to 255 separated by dots, e.g. 192.168.0.12. Each number is one byte (8 bits).
Quick check
?Which of these is a valid IPv4 address?
Networks · hardware and addresses
Routers
A router connects networks together, for example a home or school LAN to the internet.
The internet is a vast number of networks joined by routers.
A router reads each packet's destination IP address and sends it to the next router on a route towards it. Hop by hop, the packet reaches the right network.
Quick check
?A packet arrives at a router in the middle of the internet. What does the router use to decide where to send it next?
Your answer
?A computer stores an IPv4 address in binary: 11000000.10101000.00000001.00001010. Write it in the usual dotted denary form.
Networks · hardware and addresses
IPv6
IPv4 gives about 4.3 billion addresses (2³²): too few for every phone, laptop and smart device.
IPv6 was created to give far more. It is 128 bits, written as eight groups of four hexadecimal digits separated by colons, e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
IP addressing standards mean every device in the world uses the same formats, so any device can address any other.
IPv4
IPv6
Size
32 bits
128 bits
Written as
4 denary numbers, 0–255, with dots
8 groups of 4 hex digits, with colons
Number of addresses
About 4.3 billion
About 3.4 × 10³⁸
Networks · hardware and addresses
Devices that build a LAN
A switch connects the devices on a LAN. It reads where each packet is going and sends it only to that device.
A wireless access point (WAP) lets wireless devices join a wired network.
A modem converts the computer's digital data into signals that travel along the telephone or cable line to the internet, and back. A home "router" box usually combines a modem, router, switch and WAP.
Quick check
?A café wants customers' laptops to join its wired network without plugging in any cables. What should it add?
Mission check
?How does your data find one computer among billions online?
Every device online has an IP address, and every packet carries its destination IP address. The internet is many networks joined by routers; each router reads that address and forwards the packet one hop closer, until it reaches the right network and the right device.
Recap
Big ideas
A network connects devices so they can share data and resources. It brings gains (sharing, central backup and management) and costs (hardware, maintenance, security risks).
A LAN covers a small area and is owned by one organisation; a WAN covers a wide area and links LANs. The internet is the biggest WAN.
Client-server networks centralise files and security on servers; peer-to-peer networks share them between equal computers.
Speeds are measured in bits per second: time = file size in bits ÷ rate in bits per second.
A star links every device to a central switch: a cut cable affects one device, but if the switch fails the whole network fails.
A mesh gives devices many paths, so it self-heals, but it needs a lot of cable and is complex to set up.
A bus shares one backbone and a ring passes data round a loop: both are cheap, but one break can stop the whole network.
A protocol is a set of rules for transferring data. Both devices must follow the same one, and different jobs use different protocols.
In the 4-layer TCP/IP model, HTTP, HTTPS and SMTP work at the application layer, TCP at the transport layer and IP at the network layer.
Data is split into packets; each has a header (destination address, source address, packet number) and a payload.
In packet switching, routers send each packet separately, so packets may take different routes and arrive out of order; the receiver reorders them using the packet numbers.
A URL holds a domain name; a DNS server converts it into the web server's IP address.
The browser requests the page with HTTP or HTTPS (encrypted) and renders the HTML that comes back.
An IP address identifies a device on a network. Routers read each packet's destination IP address and forward it hop by hop.
IPv4 is 32 bits (four numbers, 0–255); IPv6 is 128 bits in hex, giving far more addresses.
Switches connect devices on a LAN, a WAP adds wireless devices, and a modem links the network to the internet line.
🏆
Mini-lesson complete!
⭐⭐⭐
You've worked through Networks and the internet for Pearson Edexcel International GCSE Computer Science (4CP0). 🎉
Mission 1If networks spread viruses, why does every school connect its PCs?
Mission 2One box fails and a whole office goes offline. How?
Mission 3How do two computers that have never met agree how to talk?
Mission 4How does a video arrive in order if its pieces take different routes?
Mission 5Routers only use numbers. How does a typed web address find its site?
Mission 6How does your data find one computer among billions online?