Collision in Computer Networks | CBSE Class 12
Transmitting over a shared communication medium requires that at a time, only one sender and one receiver use the communication medium. If multiple nodes in the same network transmit data at the same time, it leads to a condition called collision and data gets lost. In a computer network, Collision is a specific condition that occurs when two or more nodes on a network transmit data at the same time. Wireless networks use methods to ensure that collisions are avoided. But still, if collision in computer networks occurs, the nodes wait for a random amount of time and retransmit data packet.
In this section “Collision in Computer Networks“, we will provide a comprehensive introduction to all collision incidents in Computer Networks with examples including the following topics
- What collision in Computer Networks.
- Collision in wireless networks.
- How CSMA/CA works.
- CSMA/CA with RTS/CTS method.
And, by the end of this tutorial, you will have a solid understanding of all about Collision in Computer Networks and will be able to use this knowledge in their own network projects.
Also this tutorial covers all necessary topics/concepts required to complete your exams preparations in CBSE schools / classes 11th and 12th.
Also , you can Sign Up our free Computer Science Courses for classes 11th and 12th.
As we know that a wireless network means its nodes are connected to one another through a wireless communication medium, such as radio-waves. This means that if a wireless network has, four nodes (A, B, C and D) then its nodes will communication to one another using that common, shared wireless medium as depicted in that figure here.
Real Life Example of Collision of Computer Networks:
To understand this concept, imagine when a group of people is conversing. If one person wants to speak and if nobody else is talking, the person simply begins to speak. If someone else is talking, the person waits for him/her to finish. However, it is possible that two people, both noting that nobody is talking, begin to speak at the same time (this is collision). They would both realize immediately that they are interfering with each other, would stop talking and wait for a random period before starting again. Eventually, one person would begin speaking again, before the other, and gain the floor.
In the example above, the two persons who persons who spoke simultaneously were able to detect collision as they could speak as well as listen at the same time. Such type of two-way communication where sending and receiving takes place simultaneously is called FULL DUPLEX communication. But in wireless networks, if collision occurs, the transmitting nodes cannot detect it. This is because the nodes in a wireless network, cannot listen while transmitting (such type of communication is called HALF-DUPLEX). Thus, for wireless networks, strategies are adopted that avoid collision rather than detecting it. Wireless networks implement it using a special protocol (i.e. set of specific rules) called CSMA/CA (carrier sense multiple access/collision avoidance). Wired networks used collision detection methods such as CSMA/CD (carrier sense multiple access/collision detection) as wired networks are FULL DUPLEX and hence can receive/listen while transmitting. But CSMA/CD is not suitable for wireless networks hence CSMA/CD is used for wireless networks.
How CSMA/CA works in collision of wireless networks
The basic working principle of CSMA/CA is described in following lines:
- Node ready to transmit/talk.
- Listen for other nodes, if any transmission is taking place. One of the two possibilities are:
Busy. A transmission is taking place. Now do the following:
-
- increase back off or wait time (called BEB (Binary exponential back off))
- sleep as per BEB
- Wake up and go to step 1
Free. No transmission is taking place. Now do the following:
-
- Send message
- Verify it proper transmission has taken place using one of the following two methods :
- ACK (Acknowledgement) method
- Request to send/clear to send (RTS/CTS) methods.
Thus, you can say that there are two versions of CSMA/ CA :
CSMA/CA with ACK (acknowledgement) method
In this method, as soon as a node transmits data to another node, the receiving node must send an acknowledgement signal called ACK, once it has received the data. The ACK signal must reach to the sender node within a specific time-frame.
If the sender node does not receive ACK in specified time, it considers it as a failed transmission and retransmits the data (see fig. 11.4).
CSMA/CA with RTS/CTS (send/clear to send) method
In this method, the sender node first sends an RTS signal to its receiver. Receiver confirms its readiness to receive by sending a CTS signal to the sender as well as all other nodes.
- Other nodes upon receiving a CTS will now not transmit (will wait) as they now know that some transmission is taking place and communication channel is BUSY.
- The sender node upon receiving A CTS goes ahead with transmission. Once the transmission ends, the receiver nodes send ACK signal to all nodes :
- The sender node takes it (ACK) as confirmation of successful transmission.
- Other nodes take ACK signal as end of transmission. Now they can transmit, if they need to as now communication cannel is FREE.
Following figure shows the working of CSMA/CA with RTS/CTS.
A wants to send data to B
A listens.
Channel is FREE.
A is ready to transmit.
A sends RTS to B stating time, it will take to send.
RTS(1O) : I want to send for 10 microseconds
B sends CTS to A and other nodes
For A : CTS(1O) means : go ahead, send for 10 microseconds.
For C,D : CTS(10) means: be quiet for 10 microseconds
A sends data to B for 10 microseconds.
B sends ACK to all nodes.
For A : transmission successfully done.
For C,D : transmission is OVER, communication channel FREE now.