CSMA NETWORKING

Preview:

Citation preview

Collision Sense Multiple Access

Saurabh Kumar Gupta1120739

CO4

Data link layer divided into two functionality-oriented sublayers

12.3

Type of multiple-access protocols

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??

Topic Will be Discussed

1. Carrier Sense Multiple Access2. Carrier Sense Multiple Access with Collision Detection3. Carrier Sense Multiple Access with Collision Avoidance

• 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

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

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

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

Behavior of three persistence methods

Flow diagram for three persistence methods

Vulnerable time in CSMA

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

Flow diagram for the CSMA/CD

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.

Timing in CSMA/CA

Flow diagram for CSMA/CA

Any Question??

Recommended