Collision and Broadcast Domains
What is a Collision Domain
A collision domain is restricted to a single physical link or circuit. If two devices on the same link try to send frames to a third device simultaneously, then the frames (which are carried as electrical signals) will collide. If frames collide then when they reach the intended recipient on the network, the data will be corrupted. Consequently, there is a protocol defined to help prevent these collisions: Carrier Sense Multiple Access with Collision Detection (CSMA/CD).
When a host using CSMA/CD wants to transmit an Ethernet frame, it follows the following procedure:
- Monitor the link to see if any other device is transmitting. If another device is transmitting, then wait until that device has finished.
- Start transmitting data. Keep listening to see if anyone else starts.
- If another device starts transmitting, stop and send a 'jam' signal.
- Both devices stop transmitting and wait for a random length of time (determined by a backoff algorithm)
- Try again.
CSMA/CD helps to prevent collisions. However, within a single collision domain, or on a single physical circuit, the bandwidth is shared between all of the hosts which can significantly reduce data speeds.
Hubs and Bridges
On old computer networks, network devices called hubs were used to connect multiple hosts. Hubs are physical layer devices with multiple ports that take a signal in on one port and repeat it out of all of the other ports. Consequently, devices connected by an Ethernet hub were effectively on a single physical circuit and in the same collision domain. Any two devices transmitting at the same time would have to use CSMA/CD to prevent collisions, and the bandwidth of the physical link was shared between all devices connected to the hub.
A new device called a 'bridge' was introduced to help solve the problems of connecting devices using hubs. Bridges connect multiple hubs and give them each a separate collision domain. A bridge understands CDMA/CD and only forwards frames when it is safe to do so.
Ethernet switches effectively combine the functionality of hubs and bridges – as well as many other additional features. Each port on a switch is a separate collision domain. Therefore each link can be used to full capacity. Hubs and bridges are rarely used today, so switchports will have a single device connected such as a host or another switch. Therefore, links can be used to their full capacity by the two connected devices.
Full-Duplex vs Half-Duplex
With two devices on a link, there can still be a situation in which both devices are transmitting data at the same time. Originally, Ethernet was a half-duplex standard which meant that only one device could send data at a time. With half-duplex Ethernet, we need to use CSMA/CD to make sure that both devices don't transmit at the same time and cause collisions. Consequently, both devices share the bandwidth on the link. Support for full-duplex communication was introduced into the Ethernet standard to allow maximum bandwidth utilisation in both directions. On a full-duplex connection, separate wires within the cable allow both devices to transmit and receive data simultaneously on different physical media. Therefore, collisions cannot occur, and we no longer need to use CSMA/CD. Furthermore, the bandwidth on the link can be fully utilised by both devices at the same time. For example, on a 100Mbit/s link, both devices could send 100Mbit/s simultaneously.
A broadcast domain is a group of Ethernet devices which will receive an Ethernet broadcast frame sent by another machine in the group. Network switches will flood Ethernet broadcasts out of all ports associated with a given LAN. Therefore, devices connected to a switch are typically in the same broadcast domain. The exception to this is when a switch has different Virtual LANs (VLANs) configured – in this instance, each VLAN is a separate broadcast domain.
Routers act at Layer 3, the IP layer, and therefore do not forward broadcast Ethernet frames which reach them. Therefore, routers in a network act as boundaries between different broadcast domains.
In networks, broadcast domains can contain many hosts which means they can all communicate at layer two. Having a lot of devices in a single broadcast domain can result in a lot of broadcast frames flying around the network. Each frame must each be processed by every other device in the broadcast domain, which can cause some congestion.
Collision Domains vs Broadcast Domains
- A collision domain is a layer one property grouping devices on the same physical circuit. A broadcast domain is a layer two property, grouping devices which can send broadcast frames to each other.
- Collision domain boundaries are typically switches whereas broadcast domain boundaries are usually routers.
- It is common to have multiple collision domains within each broadcast domain.
- In modern Ethernet networks, we always want to minimise collisions by having lots of small collision domains. The number of hosts we want in a broadcast domain is a more complex design decision.
What is a collision domain within an Ethernet network?
What is an Ethernet broadcast domain?
What is CSMA/CD?