0% found this document useful (0 votes)
13 views

Csma Csmacd

computer networking sem5

Uploaded by

Abhishek T
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Csma Csmacd

computer networking sem5

Uploaded by

Abhishek T
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

COMPUTER NETWORKS

Academic Year 2020-2021


Class-TE Sem-V

Session:19
Unit-III Data Link Layer

Contents-
1.CSMA
2.CSMA/CD
Channel Allocation Problem
Multiple Access Protocol
Carrier Sense Multiple Access(CSMA)
• Sense before transmit
• At time T1 station A senses the medium and finds it idle, so it sends a frame. At
time T2 (T2> T1) station C senses the medium and finds it idle because the first bit
from station A has not reached station C yet. Station C also sends a frame. The
two signals collide and both frames are destroyed.
Vulnerable Time
• The vulnerable time for CSMA is the propagation time Tp. The propagation time is
needed for a signal to propagate from one end of the medium to other ends.
When two stations try to send respective frames simultaneously a collision will
result. But if the first bit of the frame reaches the end of the medium, every station
must have already heard the bit and will refrain from sending them.
• There are basically three persistence methods:

1. 1-Persistent

2. Non-Persistent

3. p-Persistent

• 1) 1-Persistent

• The 1-persistent method is simple and straightforward. When a station finds the channel idle, it sends its frame immediately (with probability 1).

• This method has the highest chance of collision because two or more stations may find the channel idle at the same time and send their frames immediately.

• 2) Non-persistent method

• In the non-persistent method, a station that has a frame ready to be sent senses the line first. If the channel is idle, it sends immediately. If the channel is not idle, it waits a random
amount of time(quite like Aloha) and then senses the line again.

• The non-persistent method reduces the chance of collision because it is unlikely that two or more stations will wait for the same amount of time since it’s random and retry to send
simultaneously.

• 3) p-persistent method

• The p-persistent method is used if the channel is slotted in time slots with a slot duration equal to or greater than the maximum propagation time. the p-persistent method reduces the
chance of collision and improves efficiency. In this method, after the station finds the channel idle it follows these following steps:

1. With probability p, the station sends its frame.

2. With probability q = 1 -p, the station waits for the beginning of the next time slot and checks the line again.
1. If the line is idle, it goes to step 1.
2. If the line is busy, it acts as though a collision has occurred and uses the back-off procedure like Aloha.
CSMA with Collision Detection
(CSMA/CD)
• The collision detection technology detects collisions by sensing transmissions
from other stations. On detection of a collision, the station stops transmitting,
sends a jam signal, and then waits for a random time interval before
retransmission.
Algorithms
The algorithm of CSMA/CD is:
•When a frame is ready, the transmitting station checks
whether the channel is idle or busy.
•If the channel is busy, the station waits until the channel
becomes idle.
•If the channel is idle, the station starts transmitting and
continually monitors the channel to detect collision.
•If a collision is detected, the station starts the collision
resolution algorithm.
•The station resets the retransmission counters and completes
frame transmission.
The algorithm of Collision Resolution is:
•The station continues transmission of the current frame for a
specified time along with a jam signal, to ensure that all the
other stations detect collision.
•The station increments the retransmission counter.
•If the maximum number of retransmission attempts is
reached, then the station aborts transmission.
•Otherwise, the station waits for a backoff period which is
generally a function of the number of collisions and restart
main algorithm.
Post your questions in chat box

You might also like