A network topology is the arrangement of the links between devices: which device is connected to which, and how many paths exist between any two of them. It answers one question: to get from A to B, what does the data have to pass through?
Two networks can use the same cable, the same switch and the same protocol and still behave differently when something breaks. The difference is the shape, so naming it is the first thing to do with a network you have not seen before.
Physical topology and logical topology
A network has two topologies, and they are not always the same. The physical topology is where the cables run. The logical topology is the path the data takes, which the physical wiring does not have to match. Classic Ethernet is the standard example: it was wired as a star into a hub, and behaved as a bus, because the hub repeated every signal to every port.
Everything below is the physical arrangement unless it says otherwise.
The topologies compared
| Topology | How it is wired | Paths between two devices | Where you meet it |
|---|---|---|---|
| Bus | Every device taps one shared backbone cable | One | Early Ethernet, now obsolete |
| Star | Every device has its own link to a central device | One, through the centre | Every modern office and home network |
| Ring | Each device links to exactly two neighbours, closing a loop | Two, one each way round | Metropolitan fibre rings, older token networks |
| Mesh | Devices link to many or all of the others | Many | Internet backbones, wireless mesh, military links |
| Tree | Stars connected into a hierarchy | One, through the branch above | Campus and multi-floor networks |
| Hybrid | Two or more of the above joined together | Depends on the join | Almost every real network of any size |
| Point-to-point | One dedicated link between exactly two devices | One | Leased lines, switch uplinks, radio links |
Bus topology
A bus topology connects every device to a single shared cable, called the backbone. A signal put on the backbone by one device travels along it and reaches all the others.
Only one device can transmit usefully at a time. When two transmit at once, the signals overlap on the shared wire and both are lost. That is a collision, and the whole shared segment is one collision domain.
The backbone is also a single point of failure along its whole length: a break anywhere splits the network in two. So bus is now a historical topology rather than a design choice.
Star topology
A star topology connects every device by its own cable to one central device, normally a switch. All traffic between two devices passes through the centre.
Almost every network you will touch is a star. A cable fault takes out one device instead of the network, and a device can be added or removed without disturbing the others.
The cost is the central device, a single point of failure for everything attached to it, so real networks give it redundant power, redundant uplinks, or a second switch.
What every device on the star still hears
A star gives each device its own cable to the centre, so one dead cable takes out one device. That does not make traffic private between a device and the centre.
This capture is one machine asking for twenty addresses in turn, filtered to Address Resolution Protocol (ARP) traffic:
for n in $(seq 2 21); do ping -c 1 -W 1 "192.0.2.$n" & done
termshark -r arp-sweep-only.pcapng
The Dest column reads Broadcast on every row, and the expanded Ethernet header gives the address it means: ff:ff:ff:ff:ff:ff.
A frame sent there is delivered to every device on the segment, because the sender does not yet know which one it wants.
A star describes the cabling, not who hears the conversation. Each device has one link, but the broadcast domain is still shared: every machine on the segment received every one of those requests and discarded the ones that were not about it. So a diagram of a star says little about what a device on it can overhear.
The lab uses ranges reserved for documentation, so no address in the picture belongs to anyone: 192.0.2.0/24 from RFC 5737, and hardware addresses from the RFC 7042 documentation block.
Ring topology
A ring topology connects each device to exactly two neighbours, so the links close into a loop. Data travels around the ring from device to device until it reaches its destination.
Because the loop closes, there are two paths between any two devices, one in each direction. That is the appeal: a ring can be built to survive a single break by sending everything the other way round, so fibre rings are used across cities.
A plain ring without that protection stops at one break.
Mesh topology
A mesh topology connects devices to many of the others, and in a full mesh every device has a direct link to every other one.
A full mesh is the most resilient arrangement and the most expensive.
A full mesh of n devices needs n(n-1)/2 links, so ten devices need forty-five cables and twenty need one hundred and ninety.
Because of that growth, full mesh is used only where a link failure cannot be survived, and real deployments are usually a partial mesh instead.
The internet's backbone is a partial mesh, so traffic can reroute around a cut cable.
Tree topology
A tree topology arranges stars into a hierarchy: a device at the top, branches below it, devices at the leaves. It combines the star's per-device wiring with a backbone connecting the branches.
This is how a building is usually wired: one switch per floor, each connected up to a distribution switch, which connects up to the core. Losing a leaf costs one device, and losing a branch costs everything under it.
Hybrid topology
A hybrid topology is two or more different topologies joined into one network, and almost every real network of any size is one.
A campus is stars inside buildings, a ring or a partial mesh between them, and point-to-point links out to the provider. Naming the whole network says little, so name the topology of the part you are looking at.
Point-to-point and point-to-multipoint
A point-to-point topology is a single dedicated link between exactly two devices, with nothing shared and nothing in between. A switch-to-switch uplink, a leased circuit between two offices, and a microwave link across a valley are all point-to-point.
A point-to-multipoint topology has one central device communicating with several others over a shared medium. A Wi-Fi access point serving the laptops in a room is an everyday example: one radio at the centre, many clients, one shared channel between them.
Client-server and peer-to-peer architecture
Topology is the wiring. Architecture is which device asks and which device answers, and the two are independent: the same star network runs either.
In a client-server architecture, clients send requests to a central server, and the server does the work and replies. A browser asking a web server for a page is the canonical case. Everything is in one place, which makes it easier to secure and back up, and also a single point of failure.
In a peer-to-peer (P2P) architecture, devices talk directly to one another and each is both client and server. A file-sharing peer downloads a piece of a file from one machine while uploading another piece to a second. There is no centre to lose, and no centre to control, log or patch.
What a single link failure does in each
A topology's failure behaviour is fixed by its shape, so the same break produces the same outcome every time. Name the shape before troubleshooting anything.
| Topology | One link fails | The central device fails |
|---|---|---|
| Bus | The backbone splits and the segment stops | No central device |
| Star | One device is isolated | Everything attached stops |
| Ring, unprotected | The loop opens and the ring stops | No central device |
| Ring, protected | Traffic reverses direction and continues | No central device |
| Full mesh | Traffic takes another of the many paths | No central device |
| Tree | Everything below the failed link is isolated | Everything below it stops |
"Three machines on one floor lost the network at the same moment" points at a tree, and at the branch above them, before anyone tests a cable.
You can see the shape of your own connection with one command:
ip -c route get 8.8.8.8
via 192.168.0.1 is the centre of the star this machine sits in.
Every packet it sends outside the local network goes through that one device first, so when nothing works, that address is the first thing to check.
What that device reads when it decides where to send a packet is covered in the Open Systems Interconnection (OSI) and TCP/IP models.
