The collision domain is a term that is not so obvious for most people that are new to networking. It is something that we had to deal with a long time ago, a time where we used older Ethernet standards and hubs instead of switches.
To understand what a collision domain is, we’ll have to jump into the past…
The 10BASE-T standard was a big change for Ethernet. Before 10BASE-T, we had older Ethernet standards like 10BASE2 and 10BASE5.
Below you can see a picture of the coax cable that was used for 10BASE2 networks:
All computers were connected to one long coax cable.
10BASE-T introduced the UTP cables that we still use nowadays and it has a central device in the middle, creating a star topology. Back then, this central device was an Ethernet hub:
The hub is a simple device; it’s basically nothing more but a repeater. When it receives an electrical signal, it will repeat it on all interfaces except the one where it received the signal on. This logic works fine in the following situation:
Above we see that H3 sends an Ethernet frame. Let’s say that this frame is destined for H1. When the hub receives this frame, it will replicate it on the interfaces towards H1 and H2.
H1 wants to receive it, H2 doesn’t care about so it will discard the frame. No problem! Our goal to send a frame from H3 to H1 is accomplished.
We do have a problem when H1 and H2 both send a frame at the same time, like the following situation:
When H1 and H2 send a frame at the same time, our hub will replicate them on the interface that is connected to H3. In this case, a collision will occur and H3 will receive nothing.
To deal with these collisions, we use a collision detection protocol called CSMA/CD which I explained in my introduction to Ethernet.
CSMA/CD is a simple protocol. All computers to the network will listen to see if someone is transmitting. When we want to send something and nobody is transmitting, we can transmit a frame. This is half duplex; we can’t transmit and receive at the same time. When two computers decide they can transmit, we still get a collision. CSMA/CD also describes how we can re-transmit a frame.
CSMA/CD is done by our computers but not by the hub; it’s only a dumb physical repeater.
Since we can get collisions with a hub, we call this a collision domain:
We can get collisions on every interface that is connected to the hub, this all belongs to the same collision domain.
10BASE-T with its UTP cabling and central hub were a big improvement compared to the old coax networks but there were still issues. The more network devices you had, the more collisions you had. The CSMA/CD logic where devices had to wait before they could (re)transmit impacts performance.
If network devices could somehow transmit and receive at the same time (full duplex) without causing collisions, we could get a nice performance improvement.
That’s when the Ethernet bridge was introduced. This predecessor of the switch was able to learn MAC addresses and only forward Ethernet frames when it was required. It was also able to store Ethernet frames in memory to prevent collisions from happening. These bridges were placed in between our hubs:
The bridge would break our collision domain in two. On each side of the bridge, collisions can still occur because of our hubs. Collisions can’t occur from one side of our bridge to the other side of our bridge.
Our switch that we still use nowadays still has the same logic of the bridge. It learns MAC addresses, stores Ethernet frames and only forwards them when needed. The difference is that it is much faster, uses specialized hardware and has a lot of interfaces.
When we use a switch, we can transmit/receive at the same time (full duplex) so each interface on the switch is considered a separate collision domain:
When you use a switch, all interfaces can transmit/receive at the same time so we use full duplex. Since we can’t get collisions, CSMA/CD is disabled on these interfaces.
Since we use switches and collisions don’t occur anymore on modern networks, why do we still care about these collision domains?
One thing to consider is that if you connect a hub to your switch, you will still have collisions. Here’s an example:
Collisions could still occur in the segment where we have our hub. The switch interface that connects to the hub will have to use half duplex and CSMA/CD. Another reason why you might see collisions is when you have a defective network card or defective interface on your switch. When the interface sends trash, you could get collisions.
You have now learned what a collision domain is:
- The hub is a simple repeater, we can get collisions when it attempts to send two frames to one interface.
- Everything that is connected to a hub is a single collision domain.
- Because of these collisions, we have to use half duplex. We can’t send and transmit at the same time. CSMA/CD is the protocol that is used to detect collisions and to re-transmit frames.
- The bridge, a predecessor of our switch breaks up the collision domain since it has some intelligence. It learns MAC addresses and only forwards Ethernet frames to interfaces where we need them. It is also able to store Ethernet frames in memory so that it can queue them.
- The switch is our bridge on steroids. It has more interfaces and is faster. Each interface on a switch is considered a collision domain.
- Switch interfaces run in full duplex, we can transmit and receive at the same time. No collisions occur in a switched network unless you have defective interfaces or network cards.
- Because we can’t get collisions in a switched network, CSMA/CD is disabled by default.