Você está na página 1de 12

A Report on CSMA protocols CSMA/CD & CSMA/CA


Utkarsh Hathi BTACS 08025

COMP 327 Ms. Pooja Mishra 12th December, 2011

A Report on CSMA protocols CSMA/CD & CSMA/CA

CSMA (Carrier Sense Multiple Access): Carrier Control (MAC) Sense protocol Multiple in Access (CSMA) which a node is a probabilistic Media verifies the Access 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 uses feedback from a receiver that detects 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 Protocol Modifications: Carrier sense multiple access with collision detection (CSMA/CD) is a modification of CSMA. CSMA/CD 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. Carrier sense multiple access with collision avoidance (CSMA/CA) is a modification of 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.

A Report on CSMA protocols CSMA/CD & CSMA/CA

CSMA access modes

1-persistent 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. 1-persistent CSMA is used in CSMA/CD systems including Ethernet. P-persistent 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. If the station chooses not to transmit (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 stops transmitting. In the latter case the sender monitors the channel, and when idle, transmits with a probability p, and so on. p-persistent CSMA is used in CSMA/CA systems including Wi-Fi and other packet radio systems. O-persistent Each station is assigned a transmission order by a supervisor station. When medium goes idle, stations wait for their time slot in accordance with their assigned transmission order. The station assigned to transmit first transmits immediately. The station assigned to transmit second waits one time slot (but by that time the first station has already started transmitting). Stations monitor the medium for transmissions from

A Report on CSMA protocols CSMA/CD & CSMA/CA

other stations and update their assigned order with each detected transmission (i.e. they move one position closer to the front of the queue). O-persistent CSMA is used by CobraNet, LonWorks and the controller area network.

CSMA/CD (Carrier Sense Multiple Access with Collision Detection): CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is the method Ethernet uses to deal with collisions. When a host wants to transmit, it first listens to the wire if anyone else is transmitting at the moment. If its clear, it can transmit; if not, it will wait for the host that is transmitting to stop. Sometimes, two hosts decide at the same instant that the wire is clear, and collide with each other. When this happens, the hosts that were involved with the collision send a special JAM signal that advises everyone on that segment of the collision. Then all the hosts wait for a random period of time before they check the wire and try transmitting again. This wait time is tiny- a few millionths of a second- and is determined y the backoff algorithm. (The backoff algorithm is the mathematical equation a host runs to come with the random number.) The theory is that if each host waits a different amount of time, the wire should be clear for all of them when they decide to transmit again. Any Ethernet segment that uses coaxial cable (10-BASE 2, 10-BASE 5) or a hub with twisted-pair cabling is a collision environment.

A Report on CSMA protocols CSMA/CD & CSMA/CA

Algorithm When a station wants to send some information, it uses the following algorithm: Main procedure 1. Frame ready for transmission. 2. Is medium idle? If not, wait until it becomes ready 3. Start transmitting. 4. Did a collision occur? If so, go to collision detected procedure. 5. Reset retransmission counters and end frame transmission.

Collision detected procedure

1. Continue transmission until minimum packet time is reached to ensure that all receivers detect the collision. 2. Increment retransmission counter. 3. Was the maximum number of transmission attempts reached? If so, abort transmission. 4. Calculate and wait random backoff period based on number of collisions. 5. Re-enter main procedure at stage 1. This can be likened to what happens at a dinner party, where all the guests talk to each other through a common medium (the air). Before speaking, each guest politely waits for the current speaker to finish. If two guests start speaking at the same time, both stop and wait for short, random periods of time (in Ethernet, this time is measured in microseconds). The hope is that by each choosing a random period of time, both guests will not choose the same time to try to speak again, thus avoiding another collision.

A Report on CSMA protocols CSMA/CD & CSMA/CA

Methods for collision detection are media dependent, but on an electrical bus such as 10BASE5 or 10BASE-2, collisions can be detected by comparing transmitted data with received data or by recognizing a higher than normal signal amplitude on the bus.

Figure 1.1:

A Report on CSMA protocols CSMA/CD & CSMA/CA

Jam signal
The jam signal is a signal that carries a 32-bit binary pattern sent by a data station to inform the other stations that they must not transmit. The maximum jam-time is calculated as follows: The maximum allowed diameter of an Ethernet installation is limited to 232 bits. This makes a round-trip-time of 464 bits. As the slot time in Ethernet is 512 bits, the difference between slot time and round-trip-time is 48 bits (6 bytes), which is the maximum "jam-time". This in turn means: A station noting a collision has occurred is sending a 4 to 6 byte long pattern composed of 16 1-0 bit combinations. Note: The size of this jam signal is clearly beyond the minimum allowed frame-size of 64 bytes. The purpose of this is to ensure that any other node which may currently be receiving a frame will receive the jam signal in place of the correct 32-bit MAC CRC, this causes the other receivers to discard the frame due to a CRC error.

Applications CSMA/CD was used in now obsolete shared media Ethernet variants

(10BASE5, 10BASE2) and in the early versions of twisted-pair Ethernet which used repeater hubs. Modern Ethernet networks built with switches and full-duplex connections no longer utilize CSMA/CD though it is still supported for backwards compatibility. IEEE Std 802.3, which defines all Ethernet variants, for historical reasons still bears the title "Carrier sense

A Report on CSMA protocols CSMA/CD & CSMA/CA

multiple access with collision detection (CSMA/CD) access method and physical layer specifications". Variations of the concept are used in radio frequency systems that rely on frequency sharing, including Automatic Packet Reporting System.

CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance): Carrier sense multiple access with collision avoidance (CSMA/CA), in computer networking, is a wireless network multiple access method in which:

A carrier sensing scheme is used. A node wishing to transmit data has to first listen to the channel for a predetermined amount of time to determine whether or not another node is transmitting on the channel within the wireless range. If the channel is sensed "idle," then the node is permitted to begin the transmission process. If the channel is sensed as "busy," the node defers its transmission for a random period of time. Once the transmission process begins, it is still possible for the actual transmission of application data to not occur.

Details The use of collision avoidance is used to improve the performance of CSMA by attempting to divide the wireless channel somewhat equally among all transmitting nodes within the collision domain. CSMA/CA differs from CSMA/CD due to the nature of the medium, the radio frequency spectrum. Collisions cannot be detected while occurring at the sending node,

A Report on CSMA protocols CSMA/CD & CSMA/CA

thus it is vital for CSMA/CA or another access method to be implemented. CSMA/CA is used in 802.11 based wireless LANs and other wired and wireless communication systems. One of the problems of wireless data communications 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.

IEEE 802.11 RTS/CTS Exchange 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. Thus alerting all nodes within range of the sender, receiver or both, to not transmit for the duration of the main transmission. This is known as the IEEE 802.11 RTS/CTSexchange. Implementation of RTS/CTS helps to solve the hidden node problem that is often found in wireless networking.

A Report on CSMA protocols CSMA/CD & CSMA/CA

Figure 1.2:


A Report on CSMA protocols CSMA/CD & CSMA/CA

Performance CSMA/CA performance is based largely upon the modulation technique used to transmit the data between nodes. Studies show that under ideal propagation conditions

(simulations),Direct Sequence Spread Spectrum (DSSS) provides the highest throughput for all nodes on a network when used in conjunction with CSMA/CA and the IEEE 802.11 RTS/CTS exchange under light network load conditions. Frequency Hopping Spread Spectrum (FHSS) follows distantly behind DSSS with regard to throughput with a greater throughput once network load becomes substantially heavy. However, the throughput is generally the same under real world conditions due to radio propagation factors.


A Report on CSMA protocols CSMA/CD & CSMA/CA

Bibliography: 1. http://en.wikipedia.org/wiki/Carrier_sense_multiple_access 2. http://en.wikipedia.org/wiki/Carrier_sense_multiple_access_with_collision_avoidance 3. http://en.wikipedia.org/wiki/Carrier_sense_multiple_access_with_collision_detection 4. Ethernet, LAN Technologies, Page no. 17, Michael Valentine & Andrew Whitaker, CCNA, Third Edition (EXAM CRAM)