CSMA/CD and CSMA/CA

CSMA/CD and CSMA/CA

Have you ever wondered how computers communicate information over a network without affecting other computers' data? especially if a large number of computers on the network are simultaneously sending and receiving data. You would anticipate that there would be several crashes. In all that network activity, data packets ought to be continuously colliding with one another. However, despite the fact that collisions can occasionally occur, particularly on older networks, a system has been created to not only help prevent collisions but also to respond appropriately if a collision does occur. CSMA/CD, which stands for carrier sense multiple access collision detection, is the name of the technology in question. And on early Ethernet networks—I mean half duplex networks using coaxial cable and earlier iterations of twisted pair cable—this is the access technique that is employed.

CSMA/CD and CSMA/CA
Fig 1: CSMA/CD and CSMA/CA

CSMA/CD

In essence, CSMA/CD avoids collisions by having each computer detect whether the cable is idle before sending its data. However, a collision will occur if two computers are attempting to transfer data at the same moment. Additionally, if a collision occurs, the computers will wait an undetermined period of time before attempting to transfer the data again. Using this network of four computers as an example, we can see how they share a cable as a common transmission channel. And this cable needs to be controlled so that no computers send data simultaneously and cause a collision. Additionally, a collision results in data loss or corruption.

Let's imagine that one machine wants to communicate some data. Therefore, it will first detect or listen to see if there is any cable traffic. Additionally, if the computer detects traffic, it will hold off on sending data until the cable is empty. However, as soon as it detects that there is no traffic, it will proceed to transfer its data while listening for collisions. And if it detects no collision, it understands that the data was transmitted successfully. In a different case, if two computers are prepared to transfer data and they both notice that the cable is unplugged, they will both proceed to send data simultaneously. But when this occurs, a collision takes place, and as soon as the computers sending the data see the collision, they stop sending the data and instead broadcast a jamming signal across the network. The fact that a collision has occurred is broadcast to all other computers on the network by this jamming signal. The two computers that collided will wait a random period of time after the computers receive this jamming signal before sending their data once more. In order to prevent further collisions, each computer's wait time must be random. So, as previously mentioned, CSMA/CD was employed on early Ethernet networks, but given the improvement in network technology, it isn't as relevant anymore.  Only the older half-duplex networks, where data travels in both ways but not simultaneously, were significant. Today, we employ full duplex networks, which enable simultaneous data communication in both directions.

CSMA/CA

CSMA/CA, which stands for carrier sense multiple access with collision avoidance, was also present. This access technique is now employed in wireless networks for carrier transmission. Because wireless networks must also avoid collisions, just like conventional networks. This is how it functions, and since there is no cable present when a computer tries to communicate data over a wireless network, it is unable to detect or hear any network collisions. Instead, it makes every effort to avoid colliding in the first place. Therefore, with this way, whenever a computer wishes to send data, it first checks to see if any other transmissions are occurring. If it does, it will wait a brief while before checking the channel again. And after checking the channel once more, if it detects no transmission, it will wait an arbitrary amount of time before sending its data. The destination device will then react to the transmitting computer with an acknowledgement when it has received the data, letting the sender know that it has done so. But the sending computer will believe it did not get the data and will repeat the process if it does not receive an acknowledgement from the destination. RTS/CTS, or "ready to send clear to send," is an additional technique that CSMA/CA employs to prevent collisions. Now, for wireless networks, this is an optional protocol used with CSMA/CA. With the use of this protocol, a computer can ask for permission to communicate data by sending an RTS, or "ready to send," signal to the wireless access point. And if the wireless access point accedes to this request, it will momentarily halt all other network traffic before returning to the computer with a CTS, or "Clear to send," signal informing it to start sending data. Therefore, in this protocol, the wireless access point serves as the wireless network's traffic controller.

Post a Comment

0 Comments