Computer Networks
A computer network is two or more computers connected together to share resources and communicate. Networks allow computers to share files, printers, and internet access, and to send messages and data to each other. Without networks, every computer would be an island — isolated and unable to communicate with the world.
Why Networks Exist
Before networks, if an office had 20 computers and one printer, each computer needed its own printer, or people had to physically walk files on floppy disks between computers. Networks solved this by letting every computer share one printer and transfer files instantly over cables.
Today, networks enable video calls, online shopping, cloud storage, streaming services, online banking, and the entire internet.
Types of Networks by Size
┌──────────────────────────────────────────────────┐ │ Network Scale Diagram │ │ │ │ PAN: Your Phone ↔ Smartwatch (metres) │ │ │ │ LAN: Home/Office (one building or campus) │ │ │ │ MAN: City-wide network (kilometres) │ │ │ │ WAN: Country or global (unlimited distance) │ │ The Internet is the largest WAN. │ └──────────────────────────────────────────────────┘
PAN (Personal Area Network)
A PAN connects devices within a few metres of a single person. Bluetooth is the primary technology — it links your phone to your earbuds, smartwatch, keyboard, or car's audio system.
LAN (Local Area Network)
A LAN covers a single building or campus — your home Wi-Fi network or your school or office network. Devices on the same LAN can share printers, access a shared file server, and communicate at high speed.
MAN (Metropolitan Area Network)
A MAN covers a city or large region. Internet service providers and city governments use MANs to connect multiple buildings and neighborhoods together. A university that connects multiple campuses across a city uses a MAN.
WAN (Wide Area Network)
A WAN spans large geographic distances — countries or even continents. The internet is the largest WAN in existence. Companies with offices in different countries use private WANs to connect them securely.
Network Topologies
A topology is the physical or logical arrangement of how devices connect in a network.
Star Topology (most common today):
[Switch/Router]
/ │ │ │ │ \
PC PC PC PC PC
All devices connect to a central hub. If the hub fails, the whole network stops.
Bus Topology (historical):
PC ─ PC ─ PC ─ PC ─ PC
All on one cable. Simple but one break stops the whole network.
Ring Topology:
PC → PC → PC → PC → (back to first)
Data travels in a circle. One break breaks the loop.
Mesh Topology:
Every device connects to every other device. Highly resilient — if one path fails, data reroutes.
Used in military and critical infrastructure networks.
Wired vs Wireless Networks
Feature │ Wired (Ethernet) │ Wireless (Wi-Fi) ────────────────┼──────────────────────┼──────────────────────── Speed │ Up to 10 Gbps │ Up to ~9.6 Gbps (Wi-Fi 6) Reliability │ Very stable │ Can suffer interference Security │ More secure │ Signal can be intercepted Mobility │ Fixed location only │ Move freely in range Setup │ Cables needed │ No cables required Common use │ Desktops, servers │ Laptops, phones, tablets
Key Network Devices
Router
A router connects two or more networks and directs data packets between them. Your home router connects your local network (LAN) to the internet (WAN). It assigns IP addresses to your devices and acts as the gatekeeper for all internet traffic in and out of your home.
Switch
A switch connects multiple devices within the same network. Unlike an old-style hub (which sent data to all devices), a switch is intelligent — it learns each device's address and sends data only to the correct destination device, reducing unnecessary traffic.
Access Point (Wi-Fi)
A wireless access point transmits a Wi-Fi signal that allows devices to connect to the network without cables. Most home routers include a built-in access point. Large offices and schools use multiple access points to cover wide areas.
Modem
A modem (modulator-demodulator) converts the signal from your internet service provider (ISP) — which might come through telephone lines, cable TV lines, or fibre optic cables — into the digital signals your router and devices understand.
Internet → Fibre/Cable Line → Modem → Router → Your Devices (ISP) (external signal) (converts) (distributes)
IP Addresses
Every device on a network has a unique identifier called an IP (Internet Protocol) address. An IP address lets routers know where to send data — like a postal address for your computer.
IPv4 Address example: 192.168.1.25 Four groups of numbers, each 0–255, separated by dots. Total possible IPv4 addresses: about 4.3 billion. IPv6 Address example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 Eight groups of four hexadecimal digits. Total possible IPv6 addresses: 340 undecillion (3.4 × 10³⁸).
IPv4 addresses ran out because of the explosion of internet-connected devices. IPv6 was created to provide essentially unlimited addresses for the future.
MAC Address
A MAC (Media Access Control) address is a permanent hardware identifier burned into a network card at the factory. It identifies a specific network adapter, not a location. Switches use MAC addresses to direct traffic within a LAN. MAC addresses look like: A4:C3:F0:85:AC:12.
How Data Travels: Packets
Networks do not send large files as one solid chunk. The network breaks data into small pieces called packets. Each packet contains part of the data, the sender's address, the destination address, and a sequence number.
Sending a 3 MB file: ┌────────────────────────────────────┐ │ File broken into thousands of │ │ small packets │ │ │ │ Packet 1 → Route A → Destination │ │ Packet 2 → Route B → Destination │ (different routes allowed) │ Packet 3 → Route A → Destination │ │ │ │ Destination reassembles packets │ │ back into the complete file │ └────────────────────────────────────┘
If any packet is lost or corrupted along the way, the receiving computer requests that specific packet again. This makes data transmission reliable even over imperfect connections.
Protocols
A protocol is a set of rules that define how devices on a network communicate. Without common protocols, devices from different manufacturers could not talk to each other.
Protocol │ Purpose ───────────┼────────────────────────────────────────── TCP/IP │ Core internet communication (packet delivery) HTTP/HTTPS │ Web page transfer (S = secure/encrypted) FTP │ File transfers between computers SMTP/POP3 │ Sending and receiving email DNS │ Translating domain names to IP addresses DHCP │ Automatically assigning IP addresses to devices
TCP/IP is the foundational protocol suite of the internet. TCP (Transmission Control Protocol) ensures packets arrive correctly and in order. IP (Internet Protocol) routes packets across networks to reach their destination.
