Computer Science (2210)
Topic 3 of 10Cambridge O Levels

Networks & the Internet

How devices connect and communicate over local networks and the global internet.

What You'll Learn
LAN = small area, WAN = large area. Internet = biggest WANRouter connects networks, Switch connects devices in LANFibre optic > Copper cables for speedDNS converts domain names to IP addresses

Introduction to Computer Networks


A computer network is a collection of two or more computing devices connected together for the purpose of sharing resources and data. The primary advantages of networking include sharing hardware (like printers), sharing software and files, and enabling communication (like email and video calls). However, networks also introduce challenges such as increased security risks and the cost of setup and maintenance.


Types of Networks


1. Local Area Network (LAN):

  • A LAN connects devices over a small geographical area, such as a single building, a school campus, or a home.
  • Key Characteristics:
  • Ownership: The infrastructure (cables, switches) is typically owned and managed by the organisation itself.
  • Speed: Data transmission speeds are very high as the distances are short.
  • Example: The computer lab in a Pakistani school, where all PCs are connected to a central server and a shared printer.
  • A Wireless Local Area Network (WLAN) is a type of LAN that uses wireless communication (Wi-Fi) instead of cables.

2. Wide Area Network (WAN):

  • A WAN connects devices over a large geographical area, spanning cities, countries, or even continents. It is essentially a network of connected LANs.
  • Key Characteristics:
  • Ownership: The infrastructure (like undersea fibre optic cables or satellite links) is usually rented from telecommunication companies, such as **PTCL** or a private provider like **StormFiber** in Pakistan.
  • Speed: Transmission speeds are generally slower than on a LAN due to the vast distances involved.
  • Example: The **Internet** is the largest public WAN. A private WAN example is the network used by a bank like HBL to connect all its branches across Pakistan.

Essential Network Hardware


  • Router: A device that directs data packets **between different networks**. Your home Wi-Fi router's main job is to connect your private home LAN to your Internet Service Provider's (ISP) public WAN.
  • Switch: A device that connects multiple devices together **within a single LAN**. It's more intelligent than an old 'hub' because it reads the destination **MAC address** of each data packet and forwards it only to the intended recipient device, reducing network traffic.
  • Network Interface Card (NIC): A hardware component, built into a computer's motherboard or added as an expansion card, that allows the device to connect to a network. Each NIC has a unique, globally assigned **MAC address**.
  • Wireless Access Point (WAP): A device that allows wireless-capable devices (like smartphones and laptops) to connect to a wired network using Wi-Fi. WAPs are common in public places like cafes, airports, and university campuses.

Transmission Media


This is the physical path through which data travels.


Wired Media:

  • Twisted Pair (Copper Cables): Most common type used in LANs (e.g., Ethernet cables). They are cheap and easy to install but are susceptible to electromagnetic interference and have lower bandwidth compared to fibre optics.
  • Fibre Optic Cables: Transmit data as pulses of light through thin strands of glass. They offer extremely high **bandwidth** (data transfer rate, measured in Gbps - Gigabits per second), are immune to interference, and are very secure as they are difficult to tap. However, they are expensive and require specialist installation.

Wireless Media:

  • Wi-Fi: Uses radio waves to connect devices over a medium range (typically within a building). It's convenient but can be affected by physical obstructions and interference from other devices.
  • Bluetooth: Uses radio waves for short-range communication (up to 10 metres) between devices like a phone and wireless headphones. It has lower bandwidth than Wi-Fi.

The Internet and How It Works


The Internet is a global WAN connecting millions of private, public, academic, business, and government networks. Access is provided by an Internet Service Provider (ISP).


Addressing:

  • IP Address (Internet Protocol Address): A unique logical address assigned to every device on a network. It's like a house address; it identifies the device's location on the network and can change if the device moves to a new network.
  • IPv4: The older format (e.g., `192.168.1.1`). It uses 32 bits and is running out of unique addresses.
  • IPv6: The new 128-bit format, created to solve the address shortage. It looks much more complex (e.g., `2001:0db8:85a3:0000:0000:8a2e:0370:7334`).
  • MAC Address (Media Access Control Address): A unique physical address hard-coded into a device's NIC by the manufacturer. It never changes and is used for communication within a single LAN. It's like a person's CNIC number – unique and permanent.

★ Exam Trap: Do not confuse IP and MAC addresses. An IP address is logical and identifies a device's *location* on a network. A MAC address is physical and identifies the *device itself*.


DNS (Domain Name System):

The Internet's phonebook. Humans remember names like `google.com`, but computers need IP addresses. DNS translates human-readable domain names into computer-readable IP addresses.

Step-by-step process:

  1. You type `www.pitb.gov.pk` into your browser.
  2. Your browser sends a request to a local DNS server (often run by your ISP).
  3. If the DNS server knows the IP address, it sends it back. If not, it forwards the request to other DNS servers until the IP address is found.
  4. The IP address is returned to your browser.
  5. Your browser now uses this IP address to request the website's content from the web server.

Protocols:

A protocol is a set of rules that govern how data is transmitted and received over a network.

  • TCP/IP (Transmission Control Protocol/Internet Protocol): The fundamental suite of protocols for the internet. TCP breaks data into packets and ensures they are reassembled correctly and reliably at the destination. IP handles the addressing and routing of these packets.
  • HTTP (Hypertext Transfer Protocol): The protocol for viewing web pages. It is 'stateless' and unencrypted.
  • HTTPS (HTTP Secure): A secure version of HTTP that encrypts data between your browser and the web server, essential for online banking and e-commerce.
  • FTP (File Transfer Protocol): Used for transferring files between computers.
  • Email Protocols: **SMTP** (Simple Mail Transfer Protocol) is used for *sending* emails. **POP3** and **IMAP** are used for *receiving* emails.

Key Points to Remember

  • 1LAN = small area, WAN = large area. Internet = biggest WAN
  • 2Router connects networks, Switch connects devices in LAN
  • 3Fibre optic > Copper cables for speed
  • 4DNS converts domain names to IP addresses

Pakistan Example

PTCL Fibre & 4G Networks

PTCL's fiber optic network connects Pakistani cities — light pulses travel through glass cables at near light-speed! When you open YouTube on your Jazz 4G phone: your phone connects via wireless to the nearest cell tower (WAP), which connects via fiber to Jazz's network (LAN), which connects via submarine cable (WAN) to Google's servers. DNS converts 'youtube.com' to an IP address. Data travels thousands of kilometers in milliseconds. Pakistan's 7 submarine cables landing at Karachi connect us to the global internet — if they all break, Pakistan goes offline!

Quick Revision Infographic

Computer Science — Quick Revision

Networks & the Internet

Key Concepts

1LAN = small area, WAN = large area. Internet = biggest WAN
2Router connects networks, Switch connects devices in LAN
3Fibre optic > Copper cables for speed
4DNS converts domain names to IP addresses

Formulas to Know

AN = small area, WAN = large area. Internet = biggest WAN
Pakistan Example

PTCL Fibre & 4G Networks

PTCL's fiber optic network connects Pakistani cities — light pulses travel through glass cables at near light-speed! When you open YouTube on your Jazz 4G phone: your phone connects via wireless to the nearest cell tower (WAP), which connects via fiber to Jazz's network (LAN), which connects via submarine cable (WAN) to Google's servers. DNS converts 'youtube.com' to an IP address. Data travels thousands of kilometers in milliseconds. Pakistan's 7 submarine cables landing at Karachi connect us to the global internet — if they all break, Pakistan goes offline!

SeekhoAsaan.com — Free RevisionNetworks & the Internet Infographic

Test Your Knowledge!

10 Beginner10 Intermediate10 Advanced
Start 30-Question Quiz