You type a web address on your phone at school. In under a second your request crosses the school Wi-Fi, a router, your internet provider and several…
English narration · English and 中文 subtitles you can switch
2.1
Scope and prerequisites
This handout teaches Theme A2, Networks, for the course first assessed in 2027: network types and devices, protocols and layers, addressing, data transmission and network security. All of it is taught here as SL and HL content.
Prerequisites: bits and bytes from A1 (1 byte = 8 bits).
2.2
Network fundamentals
What happens when you open a web page?
You type a web address on your phone at school. In under a second your request crosses the school Wi-Fi, a router, your internet provider and several countries, reaches a server, and the page comes back in hundreds of small pieces that are put together on your screen. Each step follows agreed rules. This handout explains them.
A home Wi-Fi router: it forwards packets between your devices and the internet
Types of network
A network 网络 is two or more devices joined to share data and resources.
Type
Covers
Example
LAN 局域网 (local area network)
one site
a school or office
WAN 广域网 (wide area network)
a large area, joining LANs
the internet; a bank's branches
PAN (personal area network)
one person's devices
a phone and earbuds over Bluetooth
VPN 虚拟专用网 (virtual private network)
a private, encrypted link over a public network
working from home on the school network
Network devices
Device
Job
network interface card (NIC)
connects a device to the network; has a unique MAC address 物理地址
switch 交换机
joins devices in a LAN and forwards known unicast frames towards the destination port; broadcasts and unknown destinations may be flooded
router 路由器
joins networks and forwards packets between them, choosing a route
wireless access point (WAP)
lets wireless devices join a wired LAN
modem
converts digital data to a signal for the provider's line, and back
firewall 防火墙
checks traffic against rules and blocks what is not allowed
server
provides a service to other devices: files, web pages, e-mail
Client–server and peer-to-peer
Client–server 客户机-服务器
Peer-to-peer 对等网络
roles
servers provide services; clients request them
every device is equal and can share
control
central: security, backups, updates in one place
none: each user manages their own device
weakness
the server is a single point of failure; costly
hard to secure and back up
example
school log-ins, a web server
file sharing between two laptops
Topologies
A topology 拓扑结构 is the layout of the connections.
Star: everything through the centre. Mesh: many alternative paths
Star: easy to add devices; one broken cable affects one device; but if the central switch fails, the whole network fails.
Mesh: many paths, so data can route round a failure; the internet's core is a partial mesh. Needs more cables and is costly.
Data travels over wired links (copper or fibre-optic cable: fast, reliable, secure) or wireless links (Wi-Fi, mobile: convenient, but slower, more interference and easier to intercept).
A protocol 协议 is an agreed set of rules for communication: the format of the data, how errors are handled, and the order of messages. Devices from different makers can talk only because they follow the same protocols.
The TCP/IP model
Networking is split into layers 层; each layer does one job and uses the layer below.
Encapsulation: each layer wraps the data from the layer above in its own header
Layer
Job
Protocols
application
the service the user sees
HTTP, HTTPS, DNS, SMTP
transport
splits data into segments; checks delivery and order
TCP, UDP
internet
addresses packets and routes them between networks
IP
link
sends frames over the physical connection
Ethernet, Wi-Fi
Layers let each part change on its own: a web browser works the same over Wi-Fi or cable, because only the link layer differs. Going down, protocols wrap data with control information such as headers and sometimes trailers (encapsulation 封装); the receiver removes the relevant information going up.
for a 12 MB file on an 8 Mbit/s link, before latency and overhead are added. Note the units: file sizes are usually in bytes, link speeds in bits per second.
Explore
A faster rate can still leave a wait
Compare two links for the same payload and separate transmission time from fixed one-way delay.
harmful software, such as a virus or ransomware, damages or locks data
phishing
a fake message tricks a user into giving away a password
interception
data is read as it travels, for example on open Wi-Fi
unauthorised access
an attacker uses a weak or stolen password
denial of service
a server is flooded with requests until real users cannot reach it
A fingerprint reader checks "something you are" — a feature of the person, not a password
Countermeasures
Firewalls check each packet against rules: allowed addresses, ports and protocols.
Authentication 身份验证 checks who a user is: something they know (password), have (phone) or are (fingerprint). Multi-factor authentication uses two or more. Authorization 授权 then decides what that user may do.
Software updates close known weaknesses; backups allow recovery from ransomware; user training reduces phishing.
Encryption 加密 makes intercepted data unreadable without the key.
Encryption
Symmetric encryption 对称加密
Asymmetric encryption 非对称加密
keys
one shared secret key
a public key and a private key
speed
fast
slower
problem
the key must be shared safely
the public key must be authenticated and the private key protected
Anyone can lock with the public key; only the private key unlocks
HTTPS uses both: asymmetric encryption to agree a secret key safely, then fast symmetric encryption for the rest of the session. A digital certificate 数字证书, signed by a trusted authority, binds a domain or identity to a public key; the browser checks the trusted signature chain, domain and validity. This authenticates the connection but does not guarantee that a site is honest.
Explore
Verified identity, separate permission
Separate the identity check from the permission check in a fictional booking policy. Encryption does not change either decision.
State the difference between a LAN and a WAN, with an example of each.
State the job of (a) a switch; (b) a router; (c) a DHCP server.
Give one advantage and one disadvantage of a star topology.
Explain why a school uses a client–server network rather than peer-to-peer.
Explain why networking is organised in layers.
State whether TCP or UDP suits (a) downloading an app; (b) an online multiplayer game. Explain (b).
Describe what DNS does when you visit a website.
Explain why IPv6 was introduced.
Describe how a file is sent across the internet by packet switching.
A 30 MB video is sent over a 20 Mbit/s link. Calculate the ideal transmission time, and state why the real time is longer.
Explain the difference between symmetric and asymmetric encryption.
A user receives an e-mail asking them to "confirm your password" at a link. Name the threat and give two ways to reduce it.
Answers.
A LAN covers one site, such as a school; a WAN covers a large area and joins LANs, such as the internet.
(a) joins devices in a LAN and sends data only to the device it is for; (b) forwards packets between networks along a route; (c) gives each device an IP address when it joins.
Advantage: e.g. one cable failure affects only one device; easy to add devices. Disadvantage: if the central switch fails, the whole network fails.
Security, backups and software updates are managed centrally on the server; users can log in from any computer and find their files.
Each layer does one job with its own protocols, so one layer can change, such as cable to Wi-Fi, without changing the others; makers can build to one layer's standard.
(a) TCP; (b) UDP: it is fast with no resends, and a late game update is useless, so it is better to drop it than wait.
The browser asks a DNS server for the IP address of the domain name; if needed, other DNS servers are asked; the IP address is returned and the browser connects to it.
IPv4's 32 bits give only about 4.3 billion addresses, too few for every device; IPv6's 128 bits give far more.
The file is split into packets with headers (source, destination, sequence number); routers forward each packet by the best route; packets may arrive out of order and are reassembled by sequence number; missing ones are resent.
$30 \times 10^6 \times 8 = 240 \times 10^6$ bits; $240 \times 10^6 \div 20 \times 10^6 = 12$ s. Latency, other traffic, headers and resends lower the throughput.
Symmetric uses one shared key to encrypt and decrypt, which must be passed on safely; asymmetric encrypts with a public key and decrypts with a different, private key.
Phishing. E.g. train users to check links and senders; spam filters; multi-factor authentication so a stolen password alone is not enough.
2.8
Exam tips
Name each device by its job, not just its name: "a router forwards packets between networks".
In TCP/UDP answers, link the choice to the scenario: reliability for files, speed for live data.