csma networking
TRANSCRIPT
![Page 1: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/1.jpg)
Collision Sense Multiple Access
Saurabh Kumar Gupta1120739
CO4
![Page 2: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/2.jpg)
Data link layer divided into two functionality-oriented sublayers
![Page 3: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/3.jpg)
12.3
Type of multiple-access protocols
![Page 4: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/4.jpg)
1.In 1.In randomrandom access access or or contention contention methods, no station is superior methods, no station is superior to another station and none is assigned the control over another.to another station and none is assigned the control over another. 2. No station permits, or does not permit, another station to send.2. No station permits, or does not permit, another station to send.
3.At each instance, a station that has data to send uses a 3.At each instance, a station that has data to send uses a procedure defined by the protocol to make a decision on whether procedure defined by the protocol to make a decision on whether or not to send. or not to send.
What is Random Access??
![Page 5: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/5.jpg)
Topic Will be Discussed
1. Carrier Sense Multiple Access2. Carrier Sense Multiple Access with Collision Detection3. Carrier Sense Multiple Access with Collision Avoidance
![Page 6: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/6.jpg)
• CSMA: Its concept is simply listen before talk (LBT)
• If channel is sensed idle : transmit entire frame
• If channel is sensed busy : defer transmission
• We could achieve better throughput if we could listen to the channel before
transmitting a packet
• This way, we would stop avoidable collisions
• To do this, we need CSMA protocols
CSMA
![Page 7: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/7.jpg)
Type of CSMA
1 Persistent-
• Sense the channel
– If busy, keep listening to the channel and transmit
immediately when the channel becomes idle
– If idle, transmit a packet immediately
• If collision occurs
– Wait a random amount of time and start over again
This protocol is called 1-persistent because the host transmits with a probability of 1 whenever it finds the
channel idle
![Page 8: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/8.jpg)
Type of CSMA
Non Persistent-
• Sense the channel
– If busy, wait a random amount of time and sense
the channel again
– If idle, transmit a packet immediately
• If collision occurs
– wait a random amount of time and start all over
again
Merits:
• Better channel utilization
• Longer delays
• Reduces chances of collision
• Reduces efficiency
![Page 9: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/9.jpg)
Type of CSMA
P Persistent-
• Applicable to slotted channels
• When a station becomes ready to send, it senses the
channel
– if it is idle, station transmits with a probability of p
– it defers until next slot with a probability of q = 1-p
• If the slot is also idle
– either station transmits or it defers with
probabilities of p & q
• This is repeated until either the frame has been transmitted
or another station begun transmitting
![Page 10: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/10.jpg)
Behavior of three persistence methods
![Page 11: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/11.jpg)
Flow diagram for three persistence methods
![Page 12: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/12.jpg)
Vulnerable time in CSMA
![Page 13: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/13.jpg)
CSMA/Collision Detection
2 steps
-Carrier Sense
-Detection
Sending nodes are able to detect collisions while transmitting
• If medium is idle , transmits
• If busy, listens for idle then transmits
• While transmitting node continues to listen to see if a
collision has occurred
• If collision detected stops transmission, generates a
jamming signal on the bus to indicate all nodes about
collision
• Waits for random time and repeats the procedure
![Page 14: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/14.jpg)
Flow diagram for the CSMA/CD
![Page 15: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/15.jpg)
CSMA/Collision Avoidance
1-In CSMA/CA, if the station finds the channel busy, it does not restart the timer of the contention window.
2-it stops the timer and restarts it when the channel becomes idle.
3-CSMA/CA is a protocol for carrier transmission in 802.11
4-Unlike CSMA/CD,CSMA/CA acts to prevent collision before they happen.
5-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.
6-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 nodetransmits 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.
![Page 16: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/16.jpg)
Timing in CSMA/CA
![Page 17: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/17.jpg)
Flow diagram for CSMA/CA
![Page 18: CSMA NETWORKING](https://reader033.vdocuments.us/reader033/viewer/2022051202/58ad9fe91a28abde5e8b5aff/html5/thumbnails/18.jpg)
Any Question??