What are Collision Domain and Broadcast Domain, Difference between Collision Domain and Broadcast Domain
Collision Domain
A term collision is described as an event that usually happens on an Ethernet network when we use a "Shared Media" to connect the devices in an Ethenrnet network. A "Shared Media" is a type of connecting media which is used to connect different network devices, where every device share the same media. Example: 1) Ethernet Hubs, 2) Bus Topology
In a "Shared Media" there are no separate channels for sending and recieving the data signals, but only one channel to send and recieve the data signals.
We call the media as shared media when the devices are connected together using Bus topology, or by using an Ethernet Hub. Both are half-duplex, means that the devices can Send OR Recieve data signals at same time. Sending and recieving data signals at same time is not supported.
Collisions will happen in an Ethernet Network when two devices simultaneously try to send data on the Shared Media, since Shared Media is half-duplex and sending and recieving is not supported at same time. Please refer CSMA/CD to learn how Ethernet avoid Collision.
Collisions are a normal part of life in an Ethernet network when Ethernet operates in Half-duplex and under most circumstances should not be considered as a problem.
A Collision Domain is any network segment in which collisions can happen (usually in Ethernet networks). In other words, a Collision Domain consists of all the devices connected using a Shared Media (Bus Topolgy or using Ethernet Hubs) where a Collision can happen between any device at any time.
For Example, if "Computer A" send a data signal to "Computer X" and "Computer B" send a data signal to "Computer Y", at same instance, a Collision will happen.
As the number of devices in a collision domain increases, chances of collisions are also more. If there is more traffic in a collision domain, the chances of collisions are also more. More collisions will normally happen with a large number of network devices in a Collision domain.
Increased collisions will result in low quality network where hosts spending more and more time for packet retransmission and packet processing. Usually switches are used to segment (divide) a big Collision domain to many small collision domains. Each port of an Ethernet Switch is operating in a separate Collision domain.
In other words, Collision cannot happen between two devices which are connected to different ports of a Switch.
No need to worry much about collision and related network problems now because we are not using Network Hubs to connect our devices. Ethernet Network Hubs are replaced with Ethernet Network Switches long way back.
Broadcast Domain
Broadcast is a type of communication, where the sending device send a single copy of data and that copy of data will be delivered to every device in the network segment. Brodcast is a required type of communication and we cannot avoid Broadcasts, because many protocols (Example: ARP and DHCP) and applications are dependent on Broadcast to function.
A Broadcast Domain consists of all the devices that will receive any broadcast packet originating from any device within the network segment.
In above picture, "Computer A" is sending a broadcast and switch will forward it to every ports and all the switchs will get a copy of broadcast packet. Every switch will flood the broadcast packet to all the ports. Router also will get a copy of broadcast packet, but the Router will not forward the packet to the next network segment.
As the number of devices in the Broadcast Domain increases, number of Broadcasts also increases and the quality of the network will come down because of the following reasons.
1) Decrease in available Bandwidth: Large number of Broadcasts will reduce the available bandwidth of network links for normal traffic because the broadcast traffic is forwarded to all the ports in a switch.
2) Decrease in processing power of computers: Since the computers need to process all the broadcast packets it recieve, a portion of the computer CPU power is spent on processing the broadcast packets. Normally a Broadcast packet is relevent to a particular computer and for other computers that broadcast packet is irrelevant (For example, DHCPDISCOVER message is relevent only for a DHCP Server. For other computers DHCPDISCOVER is irrelevant and they will drop the packet after processing). This will reduce the processing power of computers in a Broadcast domain.
By design, Routers will not allow broadcasts from one of its connected network segment to cross the router and reach another network segment. The primary function of a Router is to segment (divide) a big broadcast domain in to multiple smaller broadcast domains.