2.1 Networks – The Internet
Learning Objective
Explain the client‑server and peer‑to‑peer (P2P) models of networked computers, including their architecture, typical applications, advantages and disadvantages. In addition, describe the purpose and functions of networking devices, LAN/WAN characteristics, common topologies, thin‑client vs thick‑client concepts, cloud‑computing models, hardware components, Ethernet/CSMA‑CD (including modern switched Ethernet), IP addressing (IPv4 & IPv6), subnetting, DNS, basic network security, and the difference between packet‑ and circuit‑switching.
Key Terminology
- Client‑Server Model – Centralised architecture where dedicated servers provide resources or services to many clients.
- Peer‑to‑Peer (P2P) Model – Decentralised architecture where each node can act as both client and server.
- Thin Client – A lightweight device that relies on a server for most processing and storage.
- Thick (Fat) Client – A device that performs most processing locally and only uses the network for data exchange.
- Cloud Computing – Delivery of computing resources (IaaS, PaaS, SaaS) over the Internet, built on the client‑server paradigm.
- LAN – Local Area Network; covers a small geographical area (e.g., a building) and typically offers high bandwidth (100 Mbps‑10 Gbps).
- WAN – Wide Area Network; spans large distances (city, country, globe) and usually has lower bandwidth and higher latency than LANs.
- Topology – Physical or logical arrangement of network nodes (bus, star, mesh, hybrid).
- Router – Forwards packets between different networks; performs IP routing, NAT, DHCP, and can host firewall functions.
- Switch – Forwards Ethernet frames within the same LAN using MAC‑address learning; may support VLANs and QoS.
- Network Interface Card (NIC) – Provides the physical and data‑link interface (Ethernet, Wi‑Fi) for a computer.
- Hub – Simple repeater that broadcasts incoming signals to all ports; largely obsolete but part of the syllabus.
- Ethernet / CSMA‑CD – Dominant LAN technology; CSMA‑CD (Carrier Sense Multiple Access with Collision Detection) governs access to a shared medium. Modern switched Ethernet operates full‑duplex, eliminating collisions.
- IP Addressing – IPv4 (32‑bit) and IPv6 (128‑bit) schemes; includes subnet masks, public vs private, static vs dynamic allocation.
- Subnetting – Divides a larger network into smaller logical sub‑networks using a subnet mask (e.g., /24).
- DNS – Domain Name System; translates domain names to IP addresses.
- Packet Switching – Data divided into packets that may travel different routes.
- Circuit Switching – A dedicated communication path is established for the duration of a session (e.g., traditional telephone networks).
- Network Security Basics – Firewalls, authentication, and basic encryption protect data and control access.
1. Network Fundamentals
1.1 LAN vs WAN
- LAN
- Scope: single building or campus.
- Media: Ethernet (copper/fibre), Wi‑Fi.
- Typical bandwidth: 100 Mbps – 10 Gbps (or higher with fibre).
- Latency: a few milliseconds.
- Typical uses: office networking, university labs, home networking.
- WAN
- Scope: cities, countries, global.
- Media: leased lines, MPLS, satellite, broadband Internet.
- Typical bandwidth: 1 Mbps – 1 Gbps (often lower than LAN).
- Latency: tens to hundreds of milliseconds.
- Typical uses: corporate inter‑office links, Internet backbone, cloud access.
1.2 Common Network Topologies
| Topology |
Physical Layout |
Advantages |
Disadvantages |
| Bus |
All nodes share a single cable. |
Simple, inexpensive. |
Collision‑prone; a single cable failure disables the whole network. |
| Star |
Each node connects to a central hub or switch. |
Easy to manage; failure of one link does not affect others. |
Central device is a point of failure; more cabling required. |
| Mesh |
Every node (or many nodes) connects to several others. |
Highly reliable; multiple paths. |
Expensive and complex cabling. |
| Hybrid |
Combination of two or more basic topologies (e.g., star‑bus). |
Flexibility; can balance cost and reliability. |
Design and troubleshooting can be complex. |
1.3 Network Hardware Functions
- Router
- Routes IP packets between different networks (LAN ↔ WAN).
- Performs Network Address Translation (NAT) to allow multiple private‑address devices to share a single public IP.
- Can act as a DHCP server, assigning dynamic IP addresses.
- Often includes a built‑in firewall that filters traffic based on rules.
- Switch
- Operates at Layer 2 (Data Link); forwards frames based on destination MAC address.
- Maintains a MAC‑address table (learning table) to send frames only to the correct port.
- Supports VLANs (Virtual LANs) to segment traffic logically.
- Full‑duplex operation with modern switches removes collisions; CSMA‑CD is no longer needed on switched LANs.
- Hub
- Repeats incoming electrical signals to all ports – a physical layer device.
- Creates a single collision domain; all connected devices share the bandwidth.
- Used mainly for teaching purposes today.
- NIC (Network Interface Card)
- Provides the physical connector (RJ‑45, fibre, or Wi‑Fi antenna) and implements the MAC layer.
- Can be wired or wireless; supports speeds from 10 Mbps up to 10 Gbps or more.
1.4 Basic Network Security
- Firewall – Filters inbound and outbound traffic based on IP address, port, or protocol; can be hardware‑based (router) or software‑based.
- Authentication – Verifies user identity (e.g., passwords, certificates, two‑factor authentication) before granting network access.
- Encryption (basic) – TLS/SSL for web traffic (HTTPS), WPA2/WPA3 for Wi‑Fi, VPN tunnels for remote access.
- Least‑privilege principle – Users and devices are given only the permissions they need to perform their tasks.
1.5 Ethernet, CSMA‑CD and Modern Switched Ethernet
- Traditional Ethernet (shared‑medium) uses CSMA‑CD:
- Listen to the channel (carrier sense).
- If idle, transmit.
- If a collision occurs, stop, wait a random back‑off period, then retry.
- Modern Ethernet networks employ switches, providing a dedicated point‑to‑point link for each device (full‑duplex). Collisions are therefore eliminated, and CSMA‑CD is largely historical.
- Typical speeds: 10 Mbps, 100 Mbps, 1 Gbps, 10 Gbps, 40 Gbps and higher with fibre.
1.6 IP Addressing
- IPv4 – 32‑bit address written as four octets (e.g., 192.168.1.10). Supports ≈4.3 billion addresses.
- IPv6 – 128‑bit address written in hexadecimal groups (e.g., 2001:0db8:85a3::8a2e:0370:7334). Provides a virtually unlimited address space.
- Subnetting – Divides a network into smaller sub‑networks using a subnet mask (e.g., /24 = 255.255.255.0). Enables efficient use of address space and isolates traffic.
- Public vs Private
- Public addresses are routable on the Internet.
- Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16; require NAT to access the Internet.
- Static vs Dynamic allocation
- Static – Manually configured; used for servers, printers, routers.
- Dynamic – Assigned automatically by a DHCP server; simplifies management for end‑users.
1.7 Subnetting Example (AO2)
Given the network 192.168.10.0/24, create four equal sub‑nets.
- Determine the new prefix length:
/24 + 2 = /26 (because 2 bits are needed to create 4 sub‑nets).
- Subnet mask:
255.255.255.192.
- Sub‑net ranges:
- 192.168.10.0 – 192.168.10.63 (usable hosts 1‑62)
- 192.168.10.64 – 192.168.10.127 (usable hosts 65‑126)
- 192.168.10.128 – 192.168.10.191 (usable hosts 129‑190)
- 192.168.10.192 – 192.168.10.255 (usable hosts 193‑254)
1.8 Domain Name System (DNS)
DNS translates human‑readable domain names (e.g., www.example.com) into IP addresses. It is a hierarchical, distributed database consisting of:
- Root servers – top of the hierarchy.
- Top‑Level Domain (TLD) servers – .com, .org, .uk, etc.
- Authoritative name servers – store the actual records for a domain.
Typical record types:
- A – IPv4 address.
- AAAA – IPv6 address.
- MX – Mail exchange server.
- CNAME – Canonical name (alias).
1.9 Packet Switching vs Circuit Switching
- Packet Switching
- Data is broken into packets; each packet may take a different route.
- Efficient use of bandwidth; robust to failures.
- Used by the Internet, Ethernet, Wi‑Fi.
- Circuit Switching
- A dedicated path is reserved for the duration of a communication session.
- Predictable latency but inefficient for bursty traffic.
- Classic telephone networks are the primary example.
2. Client‑Server Model
2.1 Typical Architecture
- Clients run user‑oriented applications (web browsers, email clients, thin‑client terminals).
- Servers run service‑oriented software (HTTP server, database server, mail server, file server).
- Interaction follows a request‑response pattern:
- Client → request (e.g.,
GET /index.html HTTP/1.1)
- Server → processes request → response (e.g., HTML page, JSON data)
2.2 Common Protocols and a Cloud‑Service Example (AO2)
- HTTP / HTTPS – Web pages (HTTPS uses TLS encryption).
- SMTP, IMAP, POP3 – Email.
- FTP / SFTP – File transfer.
- SQL over TCP/IP – Database queries.
- RDP / VNC – Remote desktop.
Example: A user opens a web browser (client) and accesses a SaaS application such as Google Docs. The browser sends an HTTPS request to the Google data‑centre. The server authenticates the user, retrieves the requested document from a database, and returns the document encrypted over TLS. The underlying protocols are:
- TCP for reliable transport.
- HTTPS (HTTP over TLS) for the application layer.
2.3 Advantages
- Centralised management – Security policies, backups, and software updates are applied in one place.
- Scalability – Servers can be upgraded (vertical scaling) or additional servers added (horizontal scaling, load‑balancing).
- Reliability – Redundant hardware (clusters, fail‑over) can provide high availability.
- Resource optimisation – Powerful servers can host many services simultaneously.
2.4 Disadvantages
- Single point of failure – If a critical server crashes, all dependent clients are affected (mitigated by redundancy).
- Higher upfront cost – Expensive servers, storage arrays, licences, and data‑centre facilities.
- Potential bottleneck – All traffic passes through the server; network or CPU saturation can degrade performance.
- Latency for remote clients – Users far from the data centre may experience higher response times.
3. Peer‑to‑Peer (P2P) Model
3.1 Typical Architecture
- Every peer runs software that can both request and provide resources.
- Peers discover each other via a tracker, distributed hash table (DHT), or bootstrap nodes.
- Data is split into chunks; multiple peers can supply different chunks simultaneously, enabling parallel downloads.
3.2 Common Applications
- File‑sharing – BitTorrent, eMule.
- Voice‑over‑IP – Early Skype architecture.
- Distributed computing – SETI@home, BOINC, Folding@home.
- Blockchain networks – Bitcoin, Ethereum.
- Decentralised collaboration – Some peer‑based office suites.
3.3 Advantages
- No single point of failure – The network continues operating even if many peers leave.
- Efficient resource utilisation – Harnesses idle bandwidth, storage and CPU of many machines.
- Horizontal scalability – Adding more peers increases total capacity.
- Cost‑effective – No need for expensive central servers.
3.4 Disadvantages
- Security challenges – Peers may be untrusted; risks include malware, data tampering and privacy leaks.
- Variable performance – Transfer speed depends on the availability and bandwidth of participating peers.
- Management complexity – Harder to enforce policies, perform updates, or guarantee quality of service.
- Legal and ethical issues – Copyright infringement is a common concern for file‑sharing networks.
4. Comparison of Client‑Server and Peer‑to‑Peer
| Aspect |
Client‑Server |
Peer‑to‑Peer |
| Control |
Centralised – servers own resources and enforce policies. |
Decentralised – each peer controls its own resources. |
| Typical Use‑Case |
Web services, email, corporate databases, cloud SaaS. |
File sharing, distributed computing, blockchain, some VoIP. |
| Scalability |
Vertical (upgrade server) or horizontal (add server farms). |
Horizontal – each new peer adds bandwidth and storage. |
| Reliability |
Depends on server redundancy (clusters, fail‑over). |
High – network survives loss of many peers. |
| Security Management |
Centralised policies, firewalls, authentication. |
Distributed; security relies on trust models, encryption, and reputation systems. |
| Performance |
Predictable (subject to server load and network latency). |
Variable – depends on peer availability and bandwidth. |
5. Worked Numerical Example (AO2)
5.1 Bandwidth‑Transfer Calculation
Scenario: A 100 Mbps Ethernet LAN must transfer a 5 MB (megabyte) file from a server to a client. Assume the link operates at full capacity and there is no overhead.
- Convert the file size to bits:
5 MB × 8 bits/byte = 40 Mbits.
- Transfer time = file size ÷ bandwidth = 40 Mbits ÷ 100 Mbps = 0.4 seconds.
- Answer: The transfer would take approximately 0.4 seconds.
5.2 Subnetting Calculation (re‑visited)
Given the network 10.0.0.0/8, create a subnet that can support at least 2000 hosts.
- Find the smallest host‑bit count that gives ≥2000 hosts: 211 − 2 = 2046 (11 host bits).
- New prefix length = 32 − 11 = /21.
- Subnet mask:
255.255.248.0.
- First usable address:
10.0.0.1; last usable address: 10.0.7.254.
6. Summary
The client‑server model provides a centralised, manageable environment ideal for most business and cloud services, while the peer‑to‑peer model offers decentralised, scalable resource sharing suited to file distribution, distributed computing and emerging blockchain applications. Understanding the supporting hardware (router, switch, NIC, hub), networking concepts (LAN/WAN, topologies, Ethernet, IP addressing, DNS, subnetting), and basic security measures is essential for designing, analysing and troubleshooting modern networked systems as required by the Cambridge International AS & A Level Computer Science (9618) syllabus.