Collision Domains and Broadcast Domains = Apples and Oranges
Date: May 5, 2015
When someone is first learning networking, a number of concepts can be quite hard to grasp without having any actual hands-on experience to help in visualizing the concept. This article's task is to clarify the concepts of collision domains and broadcast domains for readers who are entering into fields related to computer networking.
Collision: Smashup on a Single-Lane Highway
Let's start by examining the concept of collisions. The term collision comes from the world of half-duplex Ethernet networking. With half-duplex Ethernet implemented, all of the senders on a network share the Ethernet media freely.
A good analogy for this type of network is a typical automotive roadway. For the sake of clarity, assume that we're talking about a divided U.S. interstate highway. When attempting to enter the highway, drivers must become aware of existing cars on the road and use this information to merge with the flow of traffic.
In this case, only a single driver (device) is able to use the highway (network) at any given time. Because of this restriction, the first thing that the driver must do before attempting to use the highway is check to see whether anyone else is currently using the highway (carrier sense). If no one else is using the highway, the driver will attempt to enter the highway (the device will send the traffic). Like drivers on a multi-access highway, all of the devices on a multi-access network are treated equally.
For this discussion, we'll use the popular term "wire" in reference to the traffic lane (network) provided by Ethernet.
Getting away from the analogy, a problem occurs when more than one device checks the wire at the same time, views it as available, and attempts to send traffic; just as in a highway situation, the result is a collision. In response to a collision, a device automatically sends a jam signal onto the wire, notifying all other devices that a collision has occurred (collision detection). In response, all the listening devices will stop sending traffic, and not send traffic for a random amount of time; this is called a backoff timer. After the backoff timer has expired, each device restarts the process by listening to the wire and repeating the process. When a device successfully sends a transmission, no collision has occurred.
This media-access control method is called Carrier Sense Multiple Access/Collision Detect (CSMA/CD). CSMA/CD is used on shared Ethernet networks. How do you know which Ethernet networks are shared and which aren't? Shared Ethernet is used on old-school hubs and on half-duplex switch ports. Full-duplex switch ports are dedicated between two devices, sharing only the media between these two. As the name suggests, full-duplex links allow for double the amount of potential bandwidth between the two devices, because the traffic channel is bidirectional. So if two devices are connected to a 100 Mbps Ethernet line and operating in full-duplex mode, the amount of potential bandwidth doubles to 200 Mbps (100 Mbps in each direction).
Still with me? Good. The next big question is, what is a collision domain?
Collision Domain: Interstate Highway System
To visualize a collision domain, you need to know the type of equipment involved. When using a hub, all of the ports connected to it are considered to be within the same collision domain. Because a hub is basically a condensed signal-repeater, it increases the signal's strength (and possibly cleans it up a bit). If a hub connects to another hub, all of the devices connected to both hubs are in the same collision domain. When hubs were used regularly, this configuration was frowned upon, as it doubles the number of potential devices wanting to use the same shared media. These days, the concept of a hub is used for learning and basic network conceptualization, but hubs are not physically deployed on a wide scale.
A switch must be visualized differently. Each port on a switch is isolated from the other ports, which means that collision domains stop at a switch port. For example, if a shared device uses port 1 of a switch and it wants to talk to a device connected to port 2, the two devices can't possibly collide, because each of the ports is in a separate collision domain. However, it's possible for each device to collide with the switch, if operating in half-duplex mode; a collision occurs when the switch is trying to send traffic out to a port at the same time that a device on that port is attempting to send traffic to the switch.
Broadcast: Intercom System
The basic idea behind a broadcast is rather simple; it provides a mechanism to speak to all of the devices on a common Layer 2 (data link) network at the same time. The important part to understand here is that the broadcast has a boundary, it isn't carried out from the local network to all other connected networks. An easy analogy would be an office intercom system; it allows someone to speak to all of the individuals inside that particular building, but not to all of the buildings within a specific company.
It's important to notice that there are both Layer 2 and Layer 3 broadcasts that operate under the same general broadcast rules discussed above. A Layer 2 broadcast (FF.FF.FF.FF.FF.FF) is intended to be received by all of the devices on the same shared Ethernet network. A Layer 3 broadcast is a little different; it's intended to be sent to all devices on the same shared segment and in the same IP subnet.
Broadcast Domain: Distance Reached by Intercom Sound
While these types of broadcast are different, they share the same boundary—a routed interface. This interface can exist on a typical router, or it can be a Layer 3 (routed) interface of a multilayer switch. The devices connected to each routed interface share the same broadcast domain. The device with the Layer 3 interface automatically stops the flow of any broadcasts through it and out to other interfaces.
Summary
While these concepts seem to be quite different, they're constantly taught and tested alongside each other, making the concepts blur together. I think that the concepts would be better taught separately and simply tested together on occasion, to ensure an understanding of one "domain" concept versus another—but certainly not to the degree that it has been tested for the last 15–20 years.
I hope this article has made the concepts a bit clearer, so that you can understand each concept individually before dealing with them together.