Network topologies

AS · 12 min

A topology is the arrangement of the devices and links in a network: which device is connected to which, and so which path data takes. The syllabus requires four topologies (bus, star, mesh and hybrid), how packets travel between two hosts in each, and how to justify a topology for a given situation. Paper 1 questions usually ask you to describe a topology, explain how a packet reaches its destination, or recommend one for a scenario.

Packets, hosts and addresses

Data sent across a network is split into packets. Each packet carries a header, which includes the address of the sender and the address of the destination, and a payload of the actual data. A host is any device on the network that sends or receives data (a computer, server, printer and so on). On a LAN, each host's network interface card has a unique MAC address, and LAN devices use this to decide whether a packet is meant for them.

How a packet gets from one host to another depends on the topology.

A B C D backbone cable T T Switch A B C D A B C D Bus (T = terminator) Star Full mesh
Bus, star and full mesh topologies with four hosts A to D. In the bus, every host shares one backbone cable with a terminator at each end; in the star, every host has its own cable to a central switch; in the full mesh, every host is linked directly to every other host.

Bus topology

In a bus topology every device is connected to a single shared cable, the backbone. A terminator at each end absorbs signals so they do not reflect back along the cable.

How a packet is transmitted. When host A sends a packet to host C, the signal travels along the backbone in both directions and reaches every host. Each host reads the destination address in the header: hosts B and D see that it is not for them and ignore it; host C recognises its own address and accepts it. Because all hosts share one cable, only one can transmit successfully at a time. If two transmit together, the signals collide and both must be resent, which is why bus networks use CSMA/CD (see network media and hardware).

Benefits:

  • cheap and easy to install: it needs the least cable and no central device;
  • easy to add a device by connecting it to the backbone;
  • a failure of one host does not affect the others.

Drawbacks:

  • if the backbone cable fails or a terminator is missing, the whole network stops;
  • performance falls as traffic and the number of devices increase, because every packet occupies the whole cable and collisions become more frequent;
  • every host receives every packet, so it is less secure;
  • faults are hard to locate.

Bus networks are now rare for LANs but suit small, temporary networks with light traffic.

Star topology

In a star topology every device has its own cable to a central device, normally a switch (historically a hub).

How a packet is transmitted. Host A sends the packet along its own cable to the switch. The switch reads the destination MAC address and looks it up in its table of which address is connected to which port. It then forwards the packet only along the cable to host C. Other hosts never see it. (A hub, by contrast, would broadcast the packet out of every port, like a bus.) Because each host has its own link, several pairs of hosts can communicate at the same time, and there are no collisions on the individual links.

Benefits:

  • if one cable or device fails, only that device is affected;
  • high performance: the switch sends packets only to their destination, so there is little unnecessary traffic and no collisions between hosts;
  • more secure, because packets are not sent to every device;
  • easy to add or remove devices and to find faults, since each device has its own link;
  • the switch can be connected to a router for internet access.

Drawbacks:

  • the central switch is a single point of failure: if it fails, the whole star stops;
  • needs more cable than a bus, and the switch adds cost.

Star is the standard topology for wired LANs in homes, schools and offices; a WiFi network is also logically a star around its wireless access point.

Mesh topology

In a mesh topology devices are connected to several other devices, so there is more than one route between most pairs. In a full mesh, every device is connected directly to every other; in a partial mesh, only some are.

How a packet is transmitted. A packet from A to D may travel directly if there is a link, or be relayed through intermediate nodes. Each node that receives a packet not addressed to it forwards it along a suitable link towards the destination. If a link is broken or congested, the packet takes another route. Different packets of the same message may take different routes and must be reassembled at the destination. This is exactly how the internet's routers forward packets.

Key result

In a full mesh of nn devices, the number of links is

n(n−1)2\frac{n(n - 1)}{2}

Each device needs n−1n - 1 connections. For 6 devices: 6×52=15\dfrac{6 \times 5}{2} = 15 links.

Benefits:

  • very reliable: if one link or node fails, data is rerouted along another path;
  • no central device to fail;
  • high capacity, as traffic is spread over many links, and data can travel by the most direct route;
  • easy to extend in wireless meshes (smart home devices, mesh WiFi).

Drawbacks:

  • a wired full mesh needs a great deal of cable and many connections per device, so it is expensive and complex to install and manage;
  • many links are rarely used, so much of the cost may be wasted.

Mesh topologies are used where reliability is critical: the backbone of the internet, WANs connecting important sites, and wireless mesh networks.

Hybrid topology

A hybrid topology combines two or more topologies. The most common example is a star of stars (a tree, or star-bus): each department has its own star around a switch, and the switches are connected together by a backbone cable or to a central switch. Large networks also join star LANs together through a partial mesh of routers.

How a packet is transmitted. Within one part, it moves according to that topology: for example, from host to department switch. To reach another part, it is passed across the connecting backbone to the other switch, and from there to the destination.

Benefits: flexible, as each part can use the topology that suits it; scalable, as new star segments can be added; a fault in one segment is contained to that segment.

Drawbacks: more complex to design, install and manage; the devices or backbone linking the segments are critical points of failure; usually more expensive.

Key result
BusStarMeshHybrid
LayoutAll devices on one backboneEvery device linked to a central switchDevices linked to several othersCombination
Packet deliveryBroadcast along backbone; each host checks addressSwitch forwards to destination onlyRelayed along any available routeDepends on segment
Failure of one linkBackbone failure stops everythingOnly that device affectedReroutedContained to segment
Single point of failureBackboneCentral switchNoneLinking devices
CollisionsYes, shared mediumNot with a switchNoDepends on segment
CostLowestModerateHighest (wired)Moderate to high
Describing packet transmission in a star

A school network uses a star topology with a switch. Describe how a packet is transmitted from a computer in room 4 to the print server.

Solution
  1. The computer splits the print job into packets; each header contains the source and destination (print server's) MAC address.
  2. The packet is sent along the computer's own cable to the central switch.
  3. The switch reads the destination address and looks it up in its table of addresses and ports.
  4. The switch forwards the packet only through the port connected to the print server; no other device receives it.
  5. The print server accepts the packet because the destination address matches its own.
Calculating mesh links

A company wants to connect its 8 regional data centres in a full mesh using leased lines. Calculate the number of lines needed, and explain why the company might choose a partial mesh instead.

Solution8×72=28 leased lines\frac{8 \times 7}{2} = 28 \ \text{leased lines}

Each data centre needs 7 connections. Leased lines are expensive, so a partial mesh (for example, each centre linked to three others) gives most of the reliability, since there is still more than one route between any two centres, for a fraction of the cost.

Justifying a topology

A small business has 20 computers in one office and expects to add more. Data is often sent between computers. Justify the use of a star topology rather than a bus.

Solution
  • Each computer has its own cable to the switch, so a cable fault affects only one computer; in a bus, a fault in the backbone would stop the whole office.
  • The switch forwards each packet only to its destination, so there are no collisions between computers and performance stays good as traffic grows; on a bus, all 20 computers share one cable, so collisions increase with traffic.
  • New computers are added by plugging another cable into the switch, without disturbing the others.
  • Faults are easy to identify because each link is separate.

The business must accept that the switch is a single point of failure, and buy enough switch ports for expansion.

Why the internet is a mesh

Explain why the core of the internet uses a mesh topology of routers.

Solution

The internet must keep working when individual links or routers fail, are overloaded or are being maintained. In a mesh, there are many possible routes between any two points, so routers can forward packets around a failed or congested link. There is no central device whose failure would stop the whole network. The high cost of many links is justified because the network is shared by billions of users.

Watch out

"In a star, the central device sends data to all computers." That is true of a hub, not a switch. With a switch, packets go only to the destination. Read the question to see which device is used.

"In a bus, data goes from one computer to the next." That describes a ring. In a bus, the signal is broadcast along the whole backbone and every host sees it.

Forgetting the single point of failure. Star: the central switch. Bus: the backbone. Mesh: none.

Calling mesh "cheap because there is no central device". A wired mesh is the most expensive topology because of the number of links.

Exam tip

"Describe how a packet is transmitted" questions are marked step by step, so write numbered steps: what the packet contains (destination address), where it goes first, what the central device or other hosts do with it, how the destination recognises it. Name the device (switch) and the address used (MAC address within a LAN).

For justification, give a feature of the topology and the benefit in the scenario. "If one cable fails only that computer is affected, so the rest of the office keeps working" is a full point; "star is more reliable" is not.

Summary
  • Topology: the physical or logical arrangement of devices and links.
  • Bus: one backbone with terminators; packets broadcast to all; collisions; backbone failure stops everything; cheap.
  • Star: each device to a central switch; switch forwards to destination only; one failure affects one device; switch is a single point of failure.
  • Mesh: multiple routes; packets relayed and rerouted; very reliable; full mesh needs n(n−1)/2n(n-1)/2 links and is expensive.
  • Hybrid: combination, for example star segments joined by a backbone; flexible and scalable.
  • Use the scenario to justify a topology.

Practice

Question
  1. Describe a bus topology.
  2. State the purpose of a terminator in a bus network.
  3. Explain why collisions occur in a bus network but not in a star network with a switch.
  4. Describe how a packet is transmitted from one host to another in a bus network.
  5. Calculate the number of links in a full mesh of 10 devices.
  6. Give two benefits and one drawback of a mesh topology.
  7. A star network uses a hub instead of a switch. Explain how this affects the way packets are transmitted and the performance of the network.
  8. Describe a hybrid topology that would suit a school with three buildings, each containing two computer rooms.
  9. A hospital's monitoring network must keep running even if a cable is cut. Recommend a topology and justify your answer.
  10. A company's star network stops working completely, though every cable tests as working. (a) Suggest the most likely cause. (b) Explain how the network could be redesigned to reduce the impact of this failure, and state one cost of doing so.
Answers
  1. All devices are connected to a single shared cable (the backbone), with a terminator at each end. Data sent by any device travels along the backbone to all devices.
  2. To absorb the signal at the end of the cable so it does not reflect back and interfere with other signals.
  3. In a bus, all devices share one cable, so if two transmit at the same time their signals meet on the cable. In a star with a switch, each device has its own link to the switch, which forwards each packet only to its destination, so signals from different devices do not share a link.
  4. The sending host puts the destination address in the packet header and transmits it on the backbone (after checking the line is free). The signal travels in both directions to every host. Each host compares the destination address with its own; hosts whose address does not match ignore the packet; the destination host accepts it. The terminators absorb the signal at the ends.
  5. 10×92=45\dfrac{10 \times 9}{2} = 45.
  6. Benefits: if a link fails, data can be rerouted; no central point of failure; traffic is spread over many links. Drawback: a wired mesh needs a lot of cabling and connections, so it is expensive and complex.
  7. A hub broadcasts every packet to every port, so all devices receive all packets and each must check the address. This creates unnecessary traffic, allows collisions, and reduces performance and security compared with a switch, which sends packets only to the destination port.
  8. Each computer room is a star around its own switch. The two switches in each building connect to a building switch, and the three building switches connect to a central switch or backbone (perhaps fibre between buildings) that also connects to the servers and the router. Each part is a star, and the whole is a hybrid (tree) topology.
  9. A mesh (at least a partial mesh) topology. There is more than one route between devices, so if a cable is cut, data is rerouted along another path and monitoring continues; there is no single central device whose failure would stop the network. The extra cost is justified because patient safety depends on it.
  10. (a) The central switch has failed: it is a single point of failure for the star. (b) Use two switches with each switch connected to the other and the critical devices (servers) connected to both, or a partial mesh between switches, so a failure of one switch does not stop the network. Cost: extra switches, ports and cabling, and more complex configuration.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action