Carrier sense multiple access

From Wikipedia, the free encyclopedia

Carrier Sense Multiple Access (CSMA) is a probabilistic Media Access Control (MAC) protocol in which a node verifies the absence of other traffic before transmitting on a shared physical medium, such as an electrical bus, or a band of electromagnetic spectrum.

"Carrier Sense" describes the fact that a transmitter listens for a carrier wave before trying to send. That is, it tries to detect the presence of an encoded signal from another station before attempting to transmit. If a carrier is sensed, the node waits for the transmission in progress to finish before initiating its own transmission.

"Multiple Access" describes the fact that multiple nodes send and receive on the medium. Transmissions by one node are generally received by all other nodes using the medium.

[edit] Collisions

Concurrent transmission by multiple nodes results in frame collisions. The multiple transmissions interfere with each other so that all are garbled and receivers are unable to distinguish the overlapping received signals from each other. It is impossible to entirely prevent collisions in CSMA networks, but there are three ways to address them :

  • In pure CSMA, only the carrier sense is used to avoid collisions. If two nodes try to send a frame at nearly the same time, neither detects a carrier so both begin transmitting. The transmitters do not detect collisions, so transmit the entire frame (thus wasting the bandwidth used). Receivers cannot distinguish between collisions and other sources of frame errors, so collision recovery relies on the ability of the communicating nodes to detect frame errors and invoke an error recovery procedure. For example, the receiver may not send a required ACK, causing transmitters to time out and retry.
  • In Carrier Sense Multiple Access With Collision Avoidance (CSMA/CA), each node must inform other nodes of an intent to transmit. When the other nodes have been notified, the information is transmitted. This arrangement prevents collision because all nodes are aware of a transmission before it occurs. However, collisions are still possible, and are not detected so have the same consequences as in pure CSMA.
  • In Carrier Sense Multiple Access With Collision Detection (CSMA/CD), sending nodes are able to detect when a collision occurs and stop transmitting immediately, backing off for a random amount of time before trying again. This results in much more efficient use of the media since the bandwidth of transmitting the entire frame is not wasted. However, it is not possible with all media (e.g., radio), and requires extra electronics (not really an issue with today's technology, but one reason Apple used CSMA/CA-based LocalTalk instead of the then much more expensive Ethernet).
  • In Carrier Sense Multiple Access with Bitwise Arbitration (CSMA/BA), all of the nodes on the bus are assigned an identification number or priority code. When a collision occurs, one of the nodes that are attempting to send at the same time will be given priority to transmit according to its identification number or priority code (as opposed to waiting a random amount of time and then retransmitting, as in CSMA/CD).
  • There is another newer technology called Carrier Sense Multiple Access with Collision Prevention (CSMA/CP).

There are three types of collisions

[edit] Protocols Using CSMA

[edit] See also