In hub-based Ethernet segments, network devices contribute to getting the medium, because devices must take turns when transmitting. The segment of the network that shares the same bandwidth between devices is known as collision domains, in other words, a collision domain is the element of a network where collisions of packets can occur. A collision can occur when two or more devices send a packet at the same time on the shared segment. When the packets collide, both devices must send the packets again, which reduces network efficiency. Usually, collisions occur in a hub environment, as each port on a hub is in the same collision domain. But each port on a bridge, switch and a router is in separate collision domains.
However, the switch can divide a network into segments and which reduce the number of devices that contribute to bandwidth. Each port of the switch represents a new segment and each new segment is a new collision domain. Which give more bandwidth to the devices on the segment, and one collision domain does not interfere with other collision domain. The figure below illustrates the collision and broadcast domain.
A broadcast domain is a domain where the sending device sends a single copy of data and that copy of data will be delivered to every device in the network segment. A broadcast domain consists of devices that can reach each other at the data link layer by using broadcast. Each port on a hub and switch are by default in the same broadcast domain. Although, switches filter frames based on MAC addresses, they do not filter broadcast frames. Switch forward must flood broadcast to all ports for other switches. If a collection of two or more switches forms as a single broadcast domain. Network layer devices, such as a router, can feature to divide a Layer 2 broadcast domain, so each port of the router are used to segment both collision and broadcast domains.
Layer 2 Broadcast
When the device sends layer 2 broadcast, the destination MAC address in the frame should be all F,s. A frame containing all F in the destination field is received by all devices in the broadcast domain.
When a switch in the network segment receives a broadcast frame, it floods the frame out to each of its ports, except the ingress port. All devices connected to the switch receive a copy of the broadcast frame and processes it. Broadcasts are an important part of the network, therefore we can’t avoid it. Broadcasts are used to initially find other devices and network services. Many protocols like ARP and DHCP are dependent on Broadcast to work.
The broadcasts reduce the network efficiency because network bandwidth is used to propagate the broadcast traffic. A lot of broadcasts and a heavy traffic load on a network can cause in congestion: a slow-down in the network performance. When two or more switches are connected together, the broadcast domain is increased. The figure below illustrates the broadcast domains.