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

CSMA - Controlled Access Protocols

Csma notes

Uploaded by

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

CSMA - Controlled Access Protocols

Csma notes

Uploaded by

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

CSMA/CD, CSMA/CA &

CONTROLLED ACCESS PROTOCOLS


IN
COMPUTER NETWORKS

Ms. Nidhi Dawar


Assistant Professor
Computer science
Department
GCG Ludhiana
Multiple Access Protocols :- If there is a dedicated link between the sender and
the receiver then data link control layer is sufficient, however if there is no dedicated link
present then multiple stations can access the channel simultaneously. Hence multiple
access protocols are required to decrease collision and avoid crosstalk. For example, in a
classroom full of students, when a teacher asks a question and all the students (or stations)
start answering simultaneously (send data at same time) then a lot of chaos is created( data
overlap or data lost) then it is the job of the teacher (multiple access protocols) to manage
the students and make them answer one at a time.
Thus, protocols are required for sharing data on non dedicated channels. Multiple access
protocols can be subdivided further as –

1. Random Access Protocols.


2. Controlled Access Protocols.
3. Channelization Protocols.

Random Access Protocols:- In this, all stations have same superiority that is
no station has more priority than another station. Any station can send data depending on
medium’s state( idle or busy). It has two features:
1. There is no fixed time for sending data
2. There is no fixed sequence of stations sending data
WHAT IS CSMA/CD?

CSMA/CD
CSMA/CD – INTRODUCTION:
CSMA/CD – CONCEPT:
RULES FOR CSMA/CD:-

If the medium is idle, then start transmitting; otherwise, go to


step 2.
If the medium is busy, continue to listen until the channel is
idle, then start transmitting immediately.
If during transmission a collision is detected, transmit a brief
jamming signal to assure that all stations know that there has
been a collision and then cease transmission.
After transmitting the jamming signal, wait a random amount
of time, referred to as the back-off, then attempt to transmit
again(start repeating from step1).
HOW TO CSMA/CD PROTOCOL
WORKS?
FRAME FORMAT OF CSMA/CD

• Preamble:- A 7-octets pattern of alternating 0s and 1s are used


to establish bit synchronization by the receiver.
• Start Frame Delimiter(SFD):- The sequence 10101011, which
indicates the actual start of the frame and enables the receiver to
identify the first bit of the rest of the frame content.
• Destination Address(DA):- Specifies the stations for which the
frame is intended.
• Source Address(SA):- Specifies target station’s address.
• Length/Type:- Length of LLC data field in octets format.
• LLC Data:- The LLC Data unit.
• Pad:- Octets added to ensure proper CD operation.
• Frame Check Sequences(FCS):- Used for error detection, a 32
bit cyclic redundancy check, based on all fields except preamble,
SFD and FCS.
COLLISION DETECTION PROCEDURE :
COLLISION DETECTION METHOD :
ADVANTAGES OF CSMA/CD :
DISADVANTAGES OF CSMA/CD :
WHAT IS CSMA/CA ?

 CARRIER SENSE MULTIPLE ACCESS WITH


COLLISION AVOIDANCE (CSMA/CA) protocol is
used in wireless networks because they cannot detect
the collision so the only solution is collision avoidance.

 CSMA/CA avoids the collisions using three basic


technique.
1. Interframe Space
2. Contension window
3. Acknowledgements
1. Interframe Space(IFS)

• Whenever the channel is found idle, the station does


not transmit immediately. It waits for a period of
time called interframe space(IFS).
• When channel is sensed to be idle, it may be
possible that same distant station may have
already started transmitting and the signal of
that distant station has not yet reached other
stations.
• Therefore the purpose of IFS time is to allow
this transmitted signal to reach other stations.
• If after this IFS time, the channel is still idle,
the station can send, but it still needs to wait a
time equal to contention time.
• IFS variable can also be used to define the
priority of a station or a frame.
Contension Window :

• Contension window is an amount of time divided into slots.


• A station that is ready to send chooses a random number of slots as its wait
time.
• The number of slots in the window changes according to the binary
exponential back-off strategy. It means that is set of one slot the first time
and then double each time the station cannot detect an idle channel after the
IFS time.
• This is very similar to the p-persistent method except that a random
outcome defines the number of slots taken by the waiting station.
• In contension window the station needs to sense the channel after each item
slot.
• If the station finds the channel busy, it does not restart the process. It just
stops the timer and restarts it when the channel is sensed as idle.
Acknowledgement
• Despite all the precautions, collisions may occur and destroy the data.
• The positive acknowledgement and the time-out timer can help guarantee
that receiver has received the frame.
CONTROLLED ACCESS PROTOCOLS :
• In this method, the stations consult each other to find which station has a
right to send.
• A station cannot send unless it has been authorized by other stations.
• The different controlled access methods are:
1. Reservation
2. Polling
3. Token Passing

Reservation :
• In reservation method, a station needs to make a reservation before sending
data.
• The time is divided into intervals. In each interval, a reservation frame
precedes the data frames sent in that interval.
• If there are N stations in the system, there are exactly N reservation mini slots
in the reservation frame.
• Each mini slot belongs to a station.
• When a station needs to send a data frame, it makes a reservation in its own
mini slot.
• The stations that have made reservation can send their data frames after the
reservation frame.
• A diagram shows a situation with five stations and a
reservation frame with five mini-slots.
• In the first interval, only stations 1,3 and 4 have
made reservations. In second interval onlt station 1
has made a reservation.
Polling :

• Polling method work in those networks where primary


and secondary stations exit.
• All data exchanges are made through primary device
even when the final destination is a secondary device.
• Primary device controls the link and secondary device
follows the instructions.
• Polling method has two different modes, Poll and
select.
Token Passing :

• Token passing method is used in those networks where the stations


are organized in a logical ring.
• In ring network, each station has a predecessor(station which is
logically before other station) and a successor(station which is
after the other station).
• In such networks, a special packet called token is circulated
through the ring.
• Station that possesses the taken has the right to access the channel
and transmit its data.
• Whenever any station has some data to sent , it waits for the token.
It transmits data only after it get the possession of the token.
• After transmitting the data, the station releases the token and
passes it to the next station in the ring.
• If any of the station that receives the token has no data to send, it
passes the token to next station in the ring.

You might also like