online posts 15
networking 101: how computers talk

lesson 2.2 · chapter 2 of 5: connecting hosts · 20 min

Collision domains and broadcast domains

objective

Draw the collision domains and broadcast domains on any small network, and say which box (hub, switch or router) makes each boundary.

1 explain

Who bumps into whom, and who hears the shouting

In lesson 2.1 you saw two things happen:

  1. On a hub, two PCs talking at the same time collided, and both messages were ruined.
  2. A message to everyone went to every host, until it reached a router, which stopped it.

This lesson gives each of those a name, so you can draw them on any network. First, one word: a domain is the area something reaches, like a kingdom is the land a king rules.

in one sentence A domain is the area something reaches; this lesson is about two of them.

Collisions: talking at the same time

Think of a classroom with one rule: only one person can speak at a time. If two people start at once, nobody understands either of them, so both stop, wait a moment and try again.

On a network, when two hosts send at the same moment on a shared line, their signals crash into each other. That’s a collision. A collision domain is the group of devices that can collide with each other: the whole classroom.

  • A hub shares one line between everything plugged into it, so the whole hub is one collision domain.
  • A switch gives each port its own private line, so every switch port is its own collision domain. (Modern switch ports can even send and receive at the same moment, like a road with a lane each way. That’s called full duplex, and it means no collisions at all. The port is still where the boundary goes.)
  • A router port is a boundary too.

in one sentence A collision domain is everyone who has to take turns on one shared line: a whole hub, but just one port on a switch.

Broadcasts: an announcement to everyone

Think of the speakers in a school’s corridors. An announcement reaches every classroom in the building, but not the school down the road.

On a network, a message to everyone is called a broadcast. It has a special to address that means all of you: the MAC address FF:FF:FF:FF:FF:FF. A broadcast domain is the group of hosts that all hear each other’s broadcasts: the whole school building.

  • Hubs and switches pass broadcasts to everyone, so they don’t split broadcast domains.
  • A router stops broadcasts, like the school gate. Every router port is the edge of a broadcast domain.

in one sentence A broadcast domain is everyone who hears a message sent to all; only a router stops it.

The whole picture

BoxCollision domainsBroadcast domains
Hubone for the whole hubdoesn’t split them
Switchone per portdoesn’t split them
Routerone per portone per port

Why care? Collisions slow a network down, because everyone waits. Broadcasts make every host stop and read them, so a broadcast domain with thousands of hosts is like a school with announcements every few seconds. Network engineers keep broadcast domains small on purpose.

in one sentence Switches and routers split collision domains; only routers split broadcast domains.

2 show

One network, both kinds of domain

This network has a hub, two switches and a router. Step through: first the collision domains light up as red boxes (CD is short for collision domain), then the broadcast domains, and the messages show why each boundary is where it is.

in one sentence This network has 7 collision domains (red boxes) and 2 broadcast domains, split by the router.

3 follow along

Count them with a rule

You don’t have to light things up to count domains. Two rules do it:

  1. Collision domains: count every cable, but skip the cables plugged into a hub. Then add one for each hub.
  2. Broadcast domains: count the router ports in use. With no router at all, the whole network is one broadcast domain.

Let’s try it on the network above, together.

Collision domains. The cables are: PC 1 to the hub, PC 2 to the hub, the hub to switch 1, switch 1 to PC 3, switch 1 to PC 4, switch 1 to the router, the router to switch 2, switch 2 to PC 5 and switch 2 to PC 6. That’s 9.

  • Skip the three cables plugged into the hub: 9 − 3 = 6.
  • Add one for the hub: 6 + 1 = 7 collision domains. ✓

Broadcast domains. The router uses 2 ports: 2 broadcast domains. ✓

Now step back to step 4 and step 7 of the animation and check each one matches.

in one sentence Count the cables (skipping hub cables) and add one per hub for collision domains; count router ports for broadcast domains.

4 challenge

Count the domains

A router has three ports in use:

  • port 1 goes to a switch with four PCs;
  • port 2 goes to a hub with three PCs;
  • port 3 goes straight to a server, no switch in between.

How many collision domains, and how many broadcast domains?

hint

List every cable first. There are 10.

hint

Four of those cables are plugged into the hub (three PCs and the router). Skip them, then add one for the hub.

hint

For broadcast domains, count the router ports in use.

show the solution

7 collision domains and 3 broadcast domains.

  • Cables: 4 from the PCs to the switch, the switch to the router, the router to the hub, 3 from the hub to its PCs, and the router to the server. That’s 10.
  • Skip the 4 plugged into the hub: 10 − 4 = 6. Add one for the hub: 7.
  • Router ports in use: 3, so 3 broadcast domains.

5 check: test yourself

Pick an answer for each question. You'll see straight away whether it's right, and why. Questions marked what happens next? are about the animations.

  1. Five PCs plugged into one hub. How many collision domains?

  2. Five PCs plugged into one switch. How many collision domains?

  3. what happens next?In the animation, PC 1 and PC 2 are both on the hub, and they send at exactly the same moment. What happens next?

  4. what happens next?PC 1 sends a broadcast. It reaches switch 1 and then the router. What happens next?

  5. Why do people split big networks into smaller broadcast domains?