written 8.5 years ago by |
CSMA Protocols stands for Carrier Sense Multiple Access Protocols. CSMA is a network access method used on shared network topologies such as Ethernet to control access to the network. Devices attached to the network cable listen (carrier sense) before transmitting. If the channel is in use, devices wait before transmitting. MA (Multiple Access) indicates that many devices can connect to and share the same network. All devices have equal access to use the network when it is clear.
Types of CSMA Protocols:
1.Persistent CSMA
In this method, station that wants to transmit data continuously senses the channel to check whether the channel is idle or busy.
If the channel is busy, the station waits until it becomes idle.
When the station detects an idle-channel, it immediately transmits the frame with probability 1. Hence it is called I-persistent CSMA.
This method has the highest chance of collision because two or more stations may find channel to be idle at the same time and transmit their frames.
When the collision occurs, the stations wait a random amount of time and start all over again.
Advantages:
- Due to carrier sense property 1-persistent CSMA gives better performance than the ALOHA systems.
Disadvantages:
- Propagation Delay
2.Non-Persistent CSMA
In this scheme, if a station wants to transmit a frame and it finds that the channel is busy (some other station is transmitting) then it will wait for fixed interval of time.
After this time, it again checks the status of the channel and if the channel is free it will transmit.
A station that has a frame to send senses the channel.
If the channel is idle, it sends immediately.
If the channel is busy, it waits a random amount of time and then senses the channel again.
In non-persistent CSMA the station does not continuously sense the channel for the purpose of capturing it when it detects the end of previous transmission.
Advantages:
- It reduces the chance of collision and leads to better channel utilization,
Disadvantages:
- It reduces the efficiency of network because the channel remains idle and it leads to longer delays than 1-persistent CSMA.
3.P-Persistent CSMA
Used for slotted channels.
When a station becomes ready to send, it senses the channel.
In this method after the station finds the line idle, it may or may not send.
If a station senses an idle channel it transmits with a probability p and refrains from sending by probability (1-p).
4.CSMA/CD
Ethernet (IEEE 802.3) sends data using CSMA/CD (CSMA with Collision Detection). CSMA was an improvement over ALOHA as the channel was sensed before transmission begins. Now a further improvised CSMA, in the form of CSMA/CD has been brought about. In this stations abort their transmission as soon as they detect a collision.
Working:
- If two stations sense the channel to be idle they begin transmitting simultaneously and cause a collision.
-A collision is indicated by a high voltage.
Both the stations monitor the channel for a collision and stop transmitting as soon as a collision is detected.
Now the stations wait for a random amount of time and check if channel is free.
The process continues.
How long will it take a station to realize that a collision has taken place?
Let the time for a signal to propagate between the two farthest stations be $τ$.
Assume that at time t0, one station begins transmitting.
Let’s call the most distant station B.
At time $τ$ – ε, which is an instant before the signal arrives at B, B itself senses an idle channel and begins transmitting. A collision occurs one instant later at time$τ$.
B detects the collision almost instantly and stops, but little noise burst caused by the collision does not get back to the original station until time$τ$ + $τ$ = 2$τ$.
In other words, in the worst case a station cannot be sure that it has seized the channel until it has transmitted for 2 $τ$ without hearing a collision.