CSMA CD vs CSMA CA – What’s the difference?
The ability of multiple network computers to transmit data to each other without experiencing significant packet collisions is truly remarkable. One could expect various issues due to the vast number of data packets transmitted across a typical network. However, it is important to note that the majority of modern computer networks display a high level of stability and reliability. Data collisions can occur in computer networks; however, the Carrier Sense Multiple Access (CSMA) method effectively reduces this issue through the implementation of two very different protocols: Collision Avoidance (CA) and Collision Detection (CD). In this blog, we will focus on the basic working of both these protocols as well as covering the CSMA CD vs CSMA CA. Let’s Begin with understanding CSMA first. CSMA stands for Carrier Sense Multiple Access; it is a protocol that helps transmit and reception data across a network. In order to ensure optimal transmission of data packets, it is necessary to minimize the possibility of packet loss and protect the integrity of the data on the network. Without CSMA, each computer trying to transfer data must first find whether or not any other computers are actively sending data across the network. If the computer detects a transmission already in progress, it will wait its turn before sending it. CSMA allows for simultaneous transmission and reception from several computers or nodes on a network. Each computer on a network receives the same data when one computer sends it out. We now have a basic understanding of CSMA; let’s move on to the difference between CSMA CD and CSMA CA in a tabular form. Below we have explained some of the basic differences between the two i.e., CSMA CD and CSMA CA. To understand the difference between CSMA CD and CSMA CA better. Let’s now understand what CSMA CD really is. CSMA CD stands for Carrier Sense Multiple Access – Collison Detection. It is a media access control method used in Ethernet networks to ensure that only one device can transmit data on the network at a time. When a device wants to send data, it first listens to the network to check if it is idle or busy. If the network is idle, the device can start transmitting else it waits. Only one network interface card (NIC) may transmit a frame in a single collision domain. However, the frame on the wire may be monitored simultaneously by all NICs. A NIC will check for the presence of other frames on the cable before sending its own. If the wire is made of copper, the NIC can tell whether or not a frame is there simply by measuring the voltage across it. If it’s an optical fiber cable, the detecting frame may be found by analyzing the light frequencies on the cable. This whole process is known as carrier sense. A NIC will wait for a frame to be sent if it finds one on the wire. When no other frame is present on the cable, a NIC will transmit the frame. It is possible for two or more NICs to simultaneously detect no frame. Consider the case when, for some reason, no frame is present on the wire, but two NICs are eager to send one. Due to the absence of a preceding frame, both NICs transmit their data packets simultaneously. This situation is known as multiple access. A collision occurs when two or more NICs detect the cable at the same time but see no frame, and then both or all of them transmit their frames. Copper wire voltage and fiber optic light frequency are both affected in this situation. The situation is known as collision detection. Let’s take an example to understand how collision detection works. As we can see from the figure that there are 4 devices on a single collision domain. Device d1 is trying to transmit data to device d3. Device d2 is also trying to send data to device d3. As both devices, d1 and d2, send data at the same time; a collision will occur, as shown above. Now, the question arises what will happen after the collision? Let’s understand. The NICs must resend the frames if they detect a collision for the frames they have sent. Each NIC that was sending a frame at the time of the collision sends out a unique signal on the network line known as a jam signal. After a short amount of time, it re-senses the wire. In the absence of any more frames, the NIC will retransmit the one it originally sent. A user would not be able to notice the microsecond-long delay caused by the NIC. The duration they wait is likewise random to ensure that a collision doesn’t happen again when these NICs retransmit their frames. More devices on an Ethernet segment mean more possibilities for collisions. If there are fewer nodes on the link, the throughput will improve as a result of collisions. As a result, keeping tabs on the frequency with which collisions occur throughout your whole network is essential. The throughput will decrease as the number of collisions increases. We have already studied the working of CSMA CD; now let’s discuss its advantages and disadvantages. Some of the advantages of CSMA/CD are: CSMA CD was commonly used in Ethernet Networks. However, with modernization, new Ethernet networks comes with its own connection to the switch which reduces the possibility of collisions. So, the need of CSMA CD has become obsolete. We have explained CSMA CD in detail; now, let’s understand what CSMA CA is and how it works with its advantages and disadvantages. CSMA CA stands for Carrier Sense Multiple Access – Collison Avoidance. It is a network protocol that operates in the data link layer of the OSI model. It uses carrier sensing to check if the channel is idle before transmitting data. It also uses collision avoidance techniques such as interframe spacing, contention windows, and acknowledgments to reduce the chances of collisions. CSMA/CA is mainly used in wireless networks, where collision detection is difficult or impossible. Wireless local area networks use a protocol called Carrier Sense, Multiple Access/Collision Avoidance (CSMA/CA). Collisions cannot be detected in wireless media as they can in Ethernet. In a WLAN, a device cannot simultaneously transmit or receive data. It either does one thing or it doesn’t. As a result, it is unable to recognize when two frames collide. Below we have shown a figure that helps you understand how it works. To prevent a collision, devices rely on signals called “Ready to Send” (RTS) and “Clear to Send” (CTS). A device will scan the airwaves for a signal when it is ready to send. If there isn’t already one, it will create a request to transmit (RTS) signal. It then delivers its own data and concludes with a CTS signal, which lets other wireless devices know it’s their turn to communicate. CSMA/CA is widely used in Wi-Fi networks as they are more prone to signal degradation and interference. So, CSMA/CA is employed to avoid any collisions and data is transmitted reliably. Now, let’s compare CSMA CD vs CSMA CA in detail. Below we have explained the difference between the two in detail with some of the important factors. The main difference between CSMA CD and CSMA CA is how they handle collisions. CSMA/CD: CSMA CD detects collisions after they occur and tries to recover from them. CSMA/CA: CSMA CA avoids collisions before they occur by using a handshake mechanism. CSMA/CD: The network type that uses CSMA CD is Ethernet, which is a wired network. CSMA/CA: The network type that uses CSMA CA is wireless LAN (WLAN), which is a wireless network. CSMA/CD: The efficiency of CSMA CD depends on the network load and the propagation delay. As the network load increases, the probability of collisions increases, reducing efficiency. As the propagation delay increases, the time to detect collisions increases, which also reduces the efficiency. CSMA/CA: The efficiency of CSMA CA depends on the network load and the overhead of RTS/CTS/ACK frames. As the network load increases, the contention probability increases, reducing efficiency. As the overhead of RTS/CTS/ACK frames increases, the time to transmit data decreases, which also reduces efficiency. CSMA/CD: The data frame transmission in CSMA CD is binary exponential backoff, which means that after each collision, the device doubles its waiting time before trying again. CSMA/CA: The data frame transmission in CSMA CA is uniform backoff, which means that after each contention, the device chooses a random waiting time from a fixed range before trying again. CSMA/CD: The IEEE standard that defines CSMA CD is 802.3, which is also known as Ethernet. CSMA/CA: The IEEE standard that defines CSMA CA is 802.11, which is also known as WLAN. These are the difference between CSMA CA and CSMA CD. The main difference between CSMA CA and CSMA CD is that in the case of CSMA CA, it avoids the collision, which means if two devices try to send frames at once, it will first send the request, i.e., RTS and CTS. In the case of CSMA CD, it only detects the collision after the frame gets collides within a network and retransmits the frame afterwards. When it comes to detecting collisions, CSMA CD is better than CSMA. Also, in terms of efficiency and latency, CSMA CD is better. Ethernet employs CSMA/CD as its MAC protocol because it is better able to handle collisions. The three states of CSMA CD are contention, transmission, or idle. With this blog, we now have a basic understanding of CSMA CD vs CSMA CA. In simple words, Collision Detection looks for collisions after they have already occurred so that frames can be transmitted again. Collision Avoidance functions as the traffic controller of the network, preventing conflicts from ever occurring. Both CSMA/CD and CSMA/CA played an important role in the evolution of networking technology.Introduction
What is CSMA in Computer Networks?
Difference between CSMA CD and CSMA CA
Factors CSMA CD CSMA CA Collison Handling Detects collisions after they occur and stops transmission. Avoids collisions before they occur by sensing the channel. Network Type Used mostly in wired networks where collision detection is possible. Used mostly in wireless networks where collision detection is not possible. Efficiency Reduces the recovery time after a collision and is more efficient than CSMA CA. Minimizes the possibility of collision and is less efficient than CSMA CD. Data Frame Transmission Resends the data frame whenever a conflict occurs. Sends an intent to transmit before data transmission. IEEE Standard Used in 802.3 standard (Ethernet) Used in 802.11 standard (Wi-Fi) Similarity to simple CSMA More efficient than simple CSMA. Similar to simple CSMA. What is CSMA CD?
How Does CSMA CD Work?
Advantages of CSMA CD
Disadvantages of CSMA CD
Real World Applications of CSMA CD
What is CSMA CA?
How Does CSMA CA Work?
Advantages of CSMA CA
Disadvantages of CSMA CA
Real World Application of CSMA CA
CSMA CD vs CSMA CA
Collison Handling
Network type
Efficiency
Data frame transmission
IEEE Standard
Frequently Asked Questions
Q1 – What is the difference between CSMA CA and CSMA CD?
Q2 – Which is better, CSMA CA or CD?
Q3 – Where are CSMA CDs used?
Q4 – What are the three states of CSMA CD?
Conclusion