| Please help improve this article by expanding it. Further information might be found on the talk page. (May 2008) |
| It has been suggested that this article or section be merged with Carrier_sense_multiple_access_with_collision_detection. (Discuss) |
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 transmission medium, such as an electrical bus, or a band of the 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 station waits for the transmission in progress to finish before initiating its own transmission.
"Multiple Access" describes the fact that multiple stations send and receive on the medium. Transmissions by one node are generally received by all other stations using the medium.
Contents |
Types of CSMA
- 1-persistent CSMA
When the sender (station) is ready to transmit data, it checks if the physical medium is busy. If so, it senses the medium continually until it becomes idle, and then it transmits a piece of data (a frame). In case of a collision, the sender waits for a random period of time and attempts to transmit again.
- p-persistent CSMA
This protocol is a generalization of 1-persistent CSMA. When the sender is ready to send data, it checks continually if the medium is busy. If the medium becomes idle, the sender transmits a frame with a probability p. In case the transmission did not happen (the probability of this event is 1-p) the sender waits until the next available time slot and transmits again with the same probability p. This process repeats until the frame is sent or some other sender starts transmitting. In the latter case the sender waits a random period of time, checks the channel, and if it is idle, transmits with a probability p, and so on.
- Nonpersistent CSMA
When the sender is ready to send data, it checks if the medium is busy. If so, it waits for a random amount of time and checks again. When the medium becomes idle, the sender starts transmitting. If collision occurs, the sender waits for a random amount of time, and checks the medium, repeating the process.
Carrier sense multiple access with collision detection
Carrier Sense Multiple Access With Collision Detection (CSMA/CD), in computer networking, is a network control protocol in which
- a carrier sensing scheme is used.
- a transmitting data station that detects another signal while transmitting a frame, stops transmitting that frame, transmits a jam signal, and then waits for a random time interval (known as "backoff delay" and determined using the truncated binary exponential backoff algorithm) before trying to send that frame again.
CSMA/CD is a modification of pure Carrier Sense Multiple Access (CSMA). Carrier Sense Multiple Access with Collision Detection is used to improve CSMA performance by terminating transmission as soon as a collision is detected, and reducing the probability of a second collision on retry.
Methods for collision detection are media dependent, but on an electrical bus such as Ethernet, collisions can be detected by comparing transmitted data with received data. If they differ, another transmitter is overlaying the first transmitter's signal (a collision), and transmission terminates immediately. A jam signal is sent which will cause all transmitters to back off by random intervals, reducing the probability of a collision when the first retry is attempted. CSMA/CD is a layer 2 protocol in the OSI model.
Even when it has nothing to transmit, the CSMA/CD MAC sublayer monitors the physical medium for traffic by watching the carrierSense signal provided by the PLS (Physical layer signals to MAC layer). Whenever the medium is busy, the CSMA/CD MAC defers to the passing frame by delaying any pending transmission of its own. After the last bit of the passing frame (that is, when carrierSense changes from true to false), the CSMA/CD MAC continues to proper transmission.
Collisions are detected by monitoring the collisionDetect signal provided by the Physical Layer. When a collision is detected during a frame transmission, the transmission is not terminated immediately. Instead, the transmission continues until additional bits specified by jamSize have been transmitted (counting from the time collisionDetect went on). This collision enforcement or jam guarantees that the duration of the collision is sufficient to ensure its detection by all transmitting stations on the network.
It shall be emphasized that the description of the MAC layer in a computer language is in no way intended to imply that procedures shall be implemented as a program executed by a computer. The implementation may consist of any appropriate technology including hardware, firmware, software, or any combination. For example a NIC (Network Interface card) may contain hardware for complete implementation of Physical and MAC layers, hence it takes layer three packets from the Operating System and performs the rest of activity described above on it own using its own hardware, or in another scenario the NIC can be a dumb device leaving the MAC layer intelligence to the operating system , Here NIC just gives the proper signal using its hardware to the operating system which does all the intelligent functions of MAC layer Reference [IEEE Std 802.3TM-2002 (Revision of IEEE Std 802.3, 2000 Edition Part 3)]
Ethernet is the classic CSMA/CD protocol. However, CSMA/CD is no longer used in the 10 Gigabit Ethernet specifications, due to the requirement of switches replacing all hubs and repeaters. Similarly, while CSMA/CD operation (half duplex) is defined in the Gigabit Ethernet specifications, few implementations support it and in practice it is nonexistent. Also, in Full Duplex Ethernet, collisions are impossible since data is transmitted and received on different wires, and each segment is connected directly to a switch. Therefore, CSMA/CD is not used on Full Duplex Ethernet networks.
Carrier sense multiple access with collision avoidance
In computer networking, 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.3, 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.
Details
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.
Usage
- GNET - an early proprietary LAN protocol
- Apple's LocalTalk implemented CSMA/CA on an electrical bus using a three-byte jamming signal.
- 802.11 RTS/CTS implements virtual carrier sensing using short Request to Send and Clear to Send messages for WLANs (802.11 mainly relies on physical carrier sensing though).
- IEEE 802.15 (Wireless PAN) uses CSMA/CA
- NCR WaveLAN - an early proprietary wireless network protocol
- HomePNA
- Bus networks
- The ITU-T G.hn standard, which provides a way to create a high-speed (up to 1 Gigabit/s) Local area network using existing home wiring (power lines, phone lines and coaxial cables), uses CSMA/CA as a Channel access method for flows that don't require guaranteed Quality of service, specifically the CSMA/CARP variant.
Sources
- Andrew S. Tanenbaum, Computer Networks. Prentice Hall, Upper Saddle River, NJ (2003). 892 pp. ISBN 0-13-066102-3
See also
- Carrier sense multiple access with collision detection
- Carrier sense multiple access with collision avoidance
- Local collision
- Remote collision
- jam signal
|
|||||||||||||||||||||||||||||||||||||||
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




