AlgoPlusAlgoPlus
Learn/Networking
Lesson

Network Topologies

Bus, star, ring, and mesh — the shape of the wiring trades cabling cost against fault tolerance.

7 min read Watch it move Build it

A topology is the shape in which machines (nodes) are wired together. The wiring decides the journey every message takes — and the central trade-off is always the same: more links buy fault tolerance, but cost more cabling and complexity.

The four classic shapes

  1. 1Bus — every node taps one shared backbone cable. A signal is a broadcast: all nodes hear it, but only the addressee keeps the frame. Cheap, but the shared medium causes collisions and a break in the backbone can split the network.
  2. 2Star — every node connects to a central hub (or switch). Easy to wire and add to, but the hub is a single point of failure: if it dies, the whole network goes with it.
  3. 3Ring — each node links to two neighbours, forming a loop; messages pass hop by hop around it. A single break can sever the ring unless it's a dual ring.
  4. 4Mesh — in a full mesh every node links directly to every other. Maximum fault tolerance from redundant paths, but the cabling explodes.
Count the links
For *n* nodes: a bus needs roughly n − 1 taps, a star needs n links (one per node to the hub), a ring needs n links, and a full mesh needs n(n − 1) / 2. Mesh growth is quadratic — 10 nodes already need 45 links.

How to choose

If cost dominates and a central device is acceptable, a star wins — it's why almost every office LAN is a star around a switch. If survivability dominates and money doesn't, a mesh wins, which is why network backbones and the internet's core are heavily meshed. Bus and pure ring are mostly historical, undone by their shared-medium and single-break weaknesses.

Watch the single point of failure
A star concentrates all risk in the hub. The convenience is real, but so is the blast radius — one hub failure takes down every attached node at once.
OperationTimeSpace
Bus · cheap; collisions, fragile backbone~n − 1 links1 shared cable
Star · easy; hub is a single point of failuren links1 hub
Ring · hop-by-hop; a break severs itn linksloop
Mesh · most fault tolerant; most cablingn(n−1)/2 linksfull
Check yourself
Which topology gives the most fault tolerance, and at what cost?