6. a)
The Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) algorithm was designed for the wireless network technology [802.11]. It senses the transmission channel before transmitting a frame and also tries to avoid collisions by carefully tuning the timers used by CSMA/CA devices.
CSMA/CA uses acknowledgements after a frame is received. Each frame contains a sequence number and a CRC (Cyclic Redundancy Check). The CRC is used to detect transmission errors while the sequence number is used to avoid frame duplication. When a device receives a correct frame, it returns a special acknowledgement frame to the sender. CSMA/CA introduces a small delay, named Short Inter Frame Spacing (SIFS), between the reception of a frame and the transmission of the acknowledgement frame. This delay corresponds to the time that is required to switch the device between the reception and transmission modes.
CSMA/CA defines more precisely when a device is allowed to send a frame. First, CSMA/CA defines two delays : DIFS (the Distributed Coordination Function Inter Frame Space) and EIFS (the Extended Inter Frame Space). To send a frame, a device must first wait until the channel has been idle for at least (DIFS) if the previous frame was received correctly. However, if the previously received frame was corrupted, this indicates that there are collisions and the device must sense the channel idle for at least (EIFS), with SIFS < DIFS < EIFS. The exact values for SIFS, DIFS and EIFS depend on the underlying physical layer.
The figure a. below shows the basic operation of CSMA/CA devices. Before transmitting, host A verifies that the channel is empty for a long enough period. Then, its sends its data frame. After checking the validity of the received frame, the recipient sends an acknowledgement frame after a short SIFS delay. Host C, which does not participate in the frame exchange, senses the channel to be busy at the beginning of the data frame. Host C can use this information to determine how long the channel will be busy for. Note that as SIFS < DIFS < EIFS, even a device that would start to sense the channel immediately after the last bit of the data frame could not decide to transmit its own frame during the transmission of the acknowledgement frame.

Figure a. Operation of a CSMA/CA device
The main difficulty with CSMA/CA is when two or more devices transmit at the same time and cause collisions. This is illustrated in the figure b. below, assuming a fixed timeout after the transmission of a data frame. With CSMA/CA, the timeout after the transmission of a data frame is very small, since it corresponds to the SIFS plus the time required to transmit the acknowledgement frame.

Figure b. Collisions with CSMA/CA
To deal with this problem, CSMA/CA relies on a backoff timer. This backoff timer is a random delay that is chosen by each device in a range that depends on the number of retransmissions for the current frame. The range grows exponentially with the retransmissions. The minimum range for the backoff timer is [0, 7 ∗ slot Time] where the slotTime is a parameter that depends on the underlying physical layer.
The two reasons why collisions cannot be eliminated in a network, whose nodes perform carrier sensing before transmitting a packet are:-
![DIFS Backoff[0, 91 DIFS Backoff[0, 7] Dara frame Channel busy! 1 SIFS Busy Ack frame- Remaining Backoff Data frame](http://img.homeworklib.com/questions/59e9f960-4229-11eb-a8b2-f17fef682073.png?x-oss-process=image/resize,w_560)
Figure c. Detailed example with CSMA/CA
Problem 6 a) State two approaches of avoiding collision in a carrier sense multiple access with...