CLICK HERE FOR THOUSANDS OF FREE BLOGGER TEMPLATES »

Friday, November 23, 2007

The Difference between CSMA/CD and CSMA/CA

CSMA/CA belongs to a class of protocols called multiple access methods. CSMA/CA stands for: Carrier Sense Multiple Access With Collision Avoidance. In CSMA, a station wishing to transmit has to first listen to the channel for a predetermined amount of time so as to check for any activity on the channel. If the channel is sensed "idle" then the station is permitted to transmit. If the channel is sensed as "busy" the station has to defer its transmission. This is the essence of both CSMA/CA and CSMA/CD. In CSMA/CA (LocalTalk), once the channel is clear, a station sends a signal telling all other stations not to transmit, and then sends its packet. In Ethernet 802.11, the station continues to wait for a time, and checks to see if the channel is still free. If it is free, the station transmits, and waits for an acknowledgment signal that the packet was received.

CSMA/CA is a modification of pure Carrier Sense Multiple Access (CSMA). Collision avoidance is used to improve the performance of CSMA by attempting to be less "greedy" on the channel. If the channel is sensed busy before transmission then the transmission is deferred for a "random" interval. This reduces the probability of collisions on the channel.

CSMA/CA is used where CSMA/CD cannot be implemented due to the nature of the channel. CSMA/CA is used in 802.11 based wireless LANs. One of the problems of wireless LANs is that it is not possible to listen while sending, therefore collision detection is not possible. Another reason is the hidden terminal problem, whereby a node A, in range of the receiver R, is not in range of the sender S, and therefore cannot know that S is transmitting to R.

CSMA/CA can optionally be supplemented by the exchange of a Request to Send (RTS) packet sent by the sender S, and a Clear to Send (CTS) packet sent by the intended receiver R, alerting all nodes within range of the sender, the receiver, or both, to keep quiet for the duration of the main packet. This is known as the IEEE 802.11 RTS/CTS exchange.


CSMA/CA

















CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance) is a protocol for carrier transmission in 802.11 networks. Unlike CSMA/CD (Carrier Sense Multiple Access/Collision Detect) which deals with transmissions after a collision has occurred, CSMA/CA acts to prevent collisions before they happen.

In CSMA/CA, as soon as a node receives a packet that is to be sent, it checks to be sure the channel is clear (no other node is transmitting at the time). If the channel is clear, then the packet is sent. If the channel is not clear, the node waits for a randomly chosen period of time, and then checks again to see if the channel is clear. This period of time is called the backoff factor, and is counted down by a backoff counter. If the channel is clear when the backoff counter reaches zero, the node transmits the packet. If the channel is not clear when the backoff counter reaches zero, the backoff factor is set again, and the process is repeated.

How Collisions Occur under CSMA/CD

Each node, independently, decides to send an Ethernet frame to the other node.

Both nodes listen to the Ethernet wire and sense that no carrier is present.

Both nodes transmit simultaneously, causing a collision.

Both nodes detect the collision and each node waits a random amount of time before transmitting again.

Collisions are normal on an Ethernet network. A small amount of collisions are expected in the protocol design.

If too many nodes are transmitting on an Ethernet network the number of collisions can rise to an unacceptable level. This can reduce the amount of available bandwidth on an Ethernet network because so much bandwidth is lost in retransmission.

Ethernet switches greatly reduce the already minor difficulties experienced with the CSMA/CD protocol.

CSMA/CD

CSMA/CD (Carrier Sense Multiple Access / Collision Detection) is the protocol used in Ethernet networks to ensure that only one network node is transmitting on the network wire at any one time.

Carrier Sense means that every Ethernet device listens to the Ethernet wire before it attempts to transmit. If the Ethernet device senses that another device is transmitting, it will wait to transmit.

Multiple Access means that more than one Ethernet device can be sensing (listening and waiting to transmit) at a time.