Type a branch, a subject or a topic — “round robin”, “paging”, “civil”.

What is a Computer Network?

Start here. Two machines, one wire, and the four problems that appear the moment you add a third.

Skip to the animation

A computer network is a set of independent machines connected by links so they can exchange data — and because the machines are independent, everything about how they cooperate has to be agreed in advance, in a protocol.

The three kinds of thing in the picture

Every network diagram you will ever draw is made of exactly these, and being strict about which is which saves a lot of confusion later.

Hosts (end systems)
The machines that run the programs anyone cares about — your laptop, a phone, a web server. A host is where data is produced and where it is finally consumed.
Links
Whatever carries bits from one point to another: copper, fibre, radio. A link has a bandwidth (bits per second it can push) and a propagation delay (how long a bit takes to cross it). These are independent, and confusing them causes most wrong answers about performance.
Switches and routers
Devices whose only job is to receive data on one link and send it out on another. They are not hosts: they never consume the data, and no application runs on them. A switch forwards within one network, a router forwards between networks.

The internet is not a big network. It is a network of networks — which is why the layer that joins them is literally called the internet layer.

Why a protocol is the real content

Getting a voltage from one end of a wire to the other is an electrical engineering problem, and it was solved a long time ago. The hard part is that the two ends are independent computers, built by different people, that have never met.

A protocol is the agreement that makes the bits mean something. Every protocol fixes three things:

  • Syntax — the format. Which bits are the header, how long each field is, where the payload starts.
  • Semantics — what each field means, and what the receiver is supposed to do about it.
  • Timing — when you may send, how long you wait, and what to do when nothing comes back.

This is why the subject is a list of protocol names. Ethernet, IP, TCP, DNS and HTTP are not five technologies — they are five agreements, stacked.

The four problems, in the order they appear

Nobody sat down and decided to teach these four things. They are what breaks, in this order, as you add machines to the picture — which is exactly the order the animation adds them.

  1. 1Addressing. With more than one possible destination, the data has to carry a name for where it is going. That name has to go somewhere the network can read without opening the payload — which is what a header is.
  2. 2Sharing. Links are shared, so two senders can want the same one at the same instant. Somebody queues, and if the queue overflows, somebody's data is dropped.
  3. 3Routing. The destination is usually several hops away and no single device can see the whole path. Each hop only knows the next one, and those tables have to be built with no central authority.
  4. 4Reliability. Bits get corrupted, queues drop packets, and different routes deliver out of order. The network promises none of this away, so anything that needs a guarantee has to build it on top.

Why the answers get stacked

No single mechanism solves all four. Addressing within one hop needs something quite different from addressing across the world, and reliability is pointless to attempt until routing works at all.

So each problem is solved at its own layer, and each layer treats the layer above as opaque payload. That is the single organising idea of the subject, and it is what the next module is entirely about.

ProblemSolved atExample
Signals on a mediumPhysicalEthernet cabling, Wi-Fi radio
Addressing one hop, error detectionData linkMAC addresses, CRC
Addressing and routing across hopsNetworkIP, Dijkstra, distance vector
Reliability, ordering, portsTransportTCP, UDP
What the bytes actually meanApplicationHTTP, DNS, SMTP

Sizes, and why the name matters less than you think

NameScaleTypically
LANa building or floorEthernet or Wi-Fi, one owner, low delay
MANa citya campus or municipal backbone
WANcountries, continentsleased links, many owners, high delay
PANa few metresBluetooth, a watch and a phone

These are descriptions of scale, not different technologies. The same four problems appear at every size — a WAN just has more hops, more owners and more time for things to go wrong.

Watch it work

loading visualisation…

Check yourself

question 1 / 4

One question at a time. Pick an answer to see why it is right or wrong, then move on — there is no score to keep and nothing is saved.

Connecting n machines with a direct link between every pair needs how many links, and why does nobody do it?
What distinguishes a host from a switch or router?
A protocol fixes three things. Which set?
Why does the network layer make no promise about delivering a packet?

0 / 4

4 still unanswered — the dots above jump straight to them.