What is a computer network?
A computer network is two or more computers or devices joined by cables or wireless signals so they can share data, files, printers and the Internet. Each device on a network is called a node. Data travels in small pieces called packets.
Types of networks: PAN, LAN, MAN, WAN
| Type | Full form | Area | Example |
|---|---|---|---|
| PAN | Personal Area Network | about 10 m, around one person | phone + smartwatch by Bluetooth |
| LAN | Local Area Network | a room, building or campus (up to about 1 km) | school computer lab, office |
| MAN | Metropolitan Area Network | a city (up to about 30–50 km) | city cable TV network, city-wide Wi-Fi |
| WAN | Wide Area Network | states, countries, the world | the Internet, a bank's network across India |
As the area grows, the cost and the number of devices grow, and the speed of the full link usually falls. A LAN is usually owned by one organisation; a WAN often uses lines from many companies.
Network devices: modem, repeater, hub
- Modem (MOdulator–DEModulator): changes the computer's digital signal into an analog signal for a phone or cable line (modulation), and back again at the other end (demodulation).
- Repeater: a signal becomes weak over a long cable (about 100 m for common LAN cable). A repeater receives it, makes it strong again and sends it on.
- Hub: joins many computers in a LAN. Whatever comes in on one port is copied to all other ports. Simple and cheap, but it wastes bandwidth and can cause collisions.
Network devices: switch, router, gateway
- Switch: looks like a hub, but it reads the destination (MAC) address and sends the packet only to that one port. Less traffic, more secure. Most LANs today use switches.
- Router: joins two or more different networks (for example your home LAN and your Internet provider's network). It reads the IP address and chooses the best path for each packet.
- Gateway: the entry and exit point of a network. It joins networks that use different protocols (rules) and translates between them. Your home Wi-Fi box often acts as modem, router and gateway together.
Hub vs switch
| Hub | Switch |
|---|---|
| sends to all ports | sends only to the right port |
| does not read addresses | reads MAC addresses |
| more traffic, less secure | less traffic, more secure |
Network topologies: star, bus, tree, mesh
Topology is the arrangement (layout) of nodes and the links between them.
Star
Every node has its own cable to a central hub or switch. Easy to add nodes and find faults; one broken cable affects only one node. But if the centre fails, everything stops, and it needs more cable than bus.
Bus
All nodes connect to one main cable called the backbone, with a terminator at each end. Cheap and uses little cable. But a break in the backbone stops the whole network, and faults are hard to find; only one node can send at a time.
Tree
Star networks joined to each other in levels, like the branches of a tree (a hierarchy). Easy to grow, good for large schools or offices. If a main branch or the root fails, everything below it is cut off.
Mesh
Nodes are linked directly to many (in a full mesh, all) other nodes. If one link fails, data takes another path, so it is very reliable. But it needs many cables: n nodes need n(n − 1)/2 links in a full mesh, so it is costly.
Try it: map your home network
Draw every device at home that uses Wi-Fi or Bluetooth. Mark the Wi-Fi box in the middle. Which topology does it look like? (Usually star.) Which devices form a PAN? Look at the Wi-Fi box's label: does it say modem, router or both? In the 3D, step 6, break a cable in each topology and count how many computers still work.
Key formulas and definitions
- Size: PAN < LAN < MAN < WAN
- Hub → all ports · Switch → one port (MAC) · Router → between networks (IP)
- Full mesh cables = n(n − 1)/2
- Star cable break → 1 node down · Bus backbone break → all down
Worked examples
1. Name the network: (a) laptop + wireless mouse, (b) 40 PCs in a school lab, (c) branches of a bank across India.
(a) PAN, (b) LAN, (c) WAN.
2. A lab of 30 computers is slow because every packet reaches every computer. Which device should replace the hub, and why?
A switch. It sends each packet only to the computer it is meant for, so traffic drops.
3. Two buildings of a school are 180 m apart and the LAN signal becomes weak. What device helps?
A repeater placed in between, to regenerate (boost) the signal.
4. How many cables are needed for a full mesh of 6 computers?
6 × 5 ÷ 2 = 15 cables.
5. In a bus topology with 8 computers, the backbone breaks. How many computers can still talk to the others?
None across the break; the backbone is shared, so the network stops working (0 of 8 normal).
6. A company has 4 floors; each floor has a switch joined to a main switch. Which topology is this, and which device joins the office LAN to the Internet?
Tree topology (stars in levels). A router (with a modem/gateway) joins it to the Internet.
Common mistakes
- Saying a hub and a switch work the same; a hub sends to all ports, a switch only to the right one.
- Mixing up router and modem; a modem converts signals, a router chooses paths between networks.
- Thinking a broken cable in a star network stops everything; only the central device failing does that.
- Thinking the Internet is a LAN; it is the world's largest WAN.