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.
Who bumps into whom, and who hears the shouting
In lesson 2.1 you saw two things happen:
- On a hub, two PCs talking at the same time collided, and both messages were ruined.
- 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
| Box | Collision domains | Broadcast domains |
|---|---|---|
| Hub | one for the whole hub | doesn’t split them |
| Switch | one per port | doesn’t split them |
| Router | one per port | one 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.
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.
Count them with a rule
You don’t have to light things up to count domains. Two rules do it:
- Collision domains: count every cable, but skip the cables plugged into a hub. Then add one for each hub.
- 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.
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.
Five PCs plugged into one hub. How many collision domains?
A hub is one shared line, like one classroom: all five PCs take turns, so it’s one collision domain.
Five PCs plugged into one switch. How many collision domains?
Every switch port is its own private line, so each PC gets its own: five in all.
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?
A hub is one shared line, so two at once collide and both messages are ruined.
what happens next?PC 1 sends a broadcast. It reaches switch 1 and then the router. What happens next?
Routers don’t pass broadcasts on. That’s why every router port is the edge of a broadcast domain.
Why do people split big networks into smaller broadcast domains?
Every host has to stop and read every broadcast. Fewer hosts per broadcast domain means less interruption.