CN-Unit - 2-DLL-Multiple Access Protocols
CN-Unit - 2-DLL-Multiple Access Protocols
11/06/202 1
4
UNIT 1:
11/06/202 3
4
Multiple Access Protocols
When a sender and receiver have a dedicated link to transmit data
packets, the data link control is enough to handle the channel.
Suppose there is no dedicated path to communicate or transfer the data
between two devices. In that case, multiple stations access the channel and
simultaneously transmits the data over the channel.
It may create collision and cross talk. Hence, the multiple access protocol
is required to reduce the collision and avoid crosstalk between the
channels.
11/06/202 4
4
Multiple Access Protocols
For example, suppose that there is a classroom full of students. When a
teacher asks a question, all the students (small channels) in the class start
answering the question at the same time (transferring the data
simultaneously).
All the students respond at the same time due to which data is overlap or
data lost. Therefore it is the responsibility of a teacher (multiple access
protocol) to manage the students and make them one answer.
11/06/202 5
4
Random Access Protocol:
All stations in the random access protocol have equal superiority, which
means that no station has higher priority than any other station. Depending
on the status of the medium, any station may send data ( idle or busy).
In a Random access method, each station has the right to the medium
without being controlled by any other station.
If more than one station tries to send, there is an access conflict means
collision and the frames will be either destroyed or modified.
11/06/202 6
4
Random Access Protocol:
It has two attributes:
There is no set timing for data transmission.
The order of the stations delivering data is not fixed.
11/06/202 7
4
ALOHA Random Access Protocol:
It is designed for wireless LAN (Local Area Network) but can also be
used in a shared medium to transmit data.
Using this method, any station can transmit data across a network
simultaneously when a data frameset is available for transmission.
Rules:
Any station can transmit data to a channel at any time.
It does not require any carrier sensing.
Collision and data frames may be lost during the transmission of data
through multiple stations.
Acknowledgment of the frames exists in Aloha. Hence, there is no
collision detection.
It requires the retransmission of data after some random amount of time.
11/06/202 8
4
ALOHA Random Access Protocol:
11/06/202 9
4
Pure ALOHA:
Whenever data is available for sending over a channel at stations, we use
Pure Aloha.
In pure Aloha, when each station transmits data to a channel without
checking whether the channel is idle or not, the chances of collision may
occur, and the data frame can be lost.
When any station transmits the data frame to a channel, the pure Aloha
waits for the receiver's acknowledgment.
If it does not acknowledge the receiver end within the specified time, the
station waits for a random amount of time, called the backoff time (Tb).
11/06/202 10
4
Pure ALOHA:
And the station may assume the frame has been lost or destroyed.
Therefore, it retransmits the frame until all the data are successfully
transmitted to the receiver.
Since different stations wait for a different amount of time, the
probability of further collision decreases.
The throughput of pure aloha is maximized when frames are of uniform
length.
11/06/202 11
4
Pure ALOHA:
11/06/202 12
4
Pure ALOHA:
11/06/202 13
4
Pure ALOHA:
Whenever two frames try to occupy the channel at the same time, there
will be a collision and both will be garbled.
If the first bit of a new frame overlaps with just the last bit of a frame
almost finished, both frames will be totally destroyed and both will have to
be retransmitted later.
The total vulnerable time of pure Aloha is 2 * Tfr.
Throughput =
Where ‘G’ is the no: of stations wish to transmit at the same time.
The maximum throughput occurs at G = 0.5, with S = 1/2e, which is
about 0.184.
11/06/202 14
4
Pure ALOHA:
11/06/202 15
4
Pure ALOHA:
11/06/202 16
4
Slotted ALOHA:
The slotted Aloha is designed to overcome the pure Aloha's efficiency
because pure Aloha has a very high possibility of frame hitting.
In slotted Aloha, the shared channel is divided into a fixed time interval
called slots. So, if a station wants to send a frame to a shared channel, the
frame can only be sent at the beginning of the slot, and only one frame is
allowed to be sent to each slot.
And if the stations are unable to send data to the beginning of the slot,
the station will have to wait until the beginning of the slot for the next
time.
However, the possibility of a collision remains when trying to send a
frame at the beginning of two or more station time slots.
11/06/202 17
4
Slotted ALOHA:
Vulnerable Time = Frame Transmission Time.
Throughput =
Where ‘G’ is the no: of stations wish to transmit at the same time.
Maximum throughput = 0.368 for G = 1 means
Slotted ALOHA peaks at G = 1, with a throughput of S = 1/e or about
0.368, twice that of pure ALOHA.
11/06/202 18
4
Slotted ALOHA:
11/06/202 19
4
Slotted ALOHA:
11/06/202 20
4
Slotted ALOHA:
11/06/202 21
4
CSMA (Carrier Sense Multiple Access):
To minimize the chance of collision and therefore, increase the
performance, the CSMA method was developed.
Principle of CSMA: "sense before transmit" or "listen before talk".
It is based on media access protocol to sense the traffic on a channel
(idle or busy) before transmitting the data.
It means that if the channel is idle, the station can send data to the
channel. Otherwise, it must wait until the channel becomes idle. Hence, it
reduces the chances of a collision on a transmission medium.
11/06/202 22
4
CSMA (Carrier Sense Multiple Access):
To minimize the chance of collision and therefore, increase the
performance, the CSMA method was developed.
The possibility of collision still exists because of propagation delay; a
station may sense the medium and find it idle, only because the first bit
sent by another station has not yet been received.
11/06/202 23
4
Types of CSMA:
1. 1-Persistent CSMA
2. P-Persistent CSMA
3. Non-Persistent CSMA
4. O-Persistent CSMA
11/06/202 24
4
1-Persistent CSMA :
Before sending the data, the station first listens to the channel to see if
anyone else is transmitting the data at that moment.
If the channel is idle, the station transmits a frame.
If busy, it senses the transmission medium continuously until it
becomes idle.
Since the station transmits the frame with the probability of 1 when the
carrier or channel is idle, this scheme of CSMA is called a 1-persistent
CSMA.
11/06/202 25
4
1-Persistent CSMA :
The propagation delay has an important effect on
the performance of the protocol.
The longer the propagation delay, the more important
this effect becomes, and the worse the performance of
the protocol.
11/06/202 26
4
N-Persistent CSMA:
11/06/202 27
4
P-Persistent CSMA:
11/06/202 28
4
P-Persistent CSMA:
If that slot is also idle, it either transmits or defers again, with
probabilities P and Q.
This process is repeated until either the frame has been transmitted or
another station has begun transmitting.
In the latter case, the unlucky station acts as if there had been a collision
(i.e., it waits a random time and starts again).
If the station initially senses the channel busy, it waits until the next slot
and applies the above algorithm.
11/06/202 29
4
P-Persistent CSMA:
11/06/202 30
4
O-Persistent CSMA:
of nodes. The node waits because of its time slot in order to send data if
11/06/202 31
4
CSMA/CD:
Carrier Sense Multiple Access with Collision Detection
If two stations sense the channel to be idle and begin transmitting
simultaneously, they will both detect the collision almost immediately.
Rather than finish transmitting their frames, which are irretrievably
garbled anyway, they should abruptly stop transmitting as soon as the
collision detected.
Quickly terminating damaged frames saves time and bandwidth.
This protocol, known as CSMA/CD is widely used on LANs in the
MAC sublayer.
11/06/202 32
4
CSMA/CD:
CSMA/CD can be in contention, transmission, or idle state
11/06/202 33
4
CSMA/CD:
At the point marked t0, a station has finished transmitting its frame.
Any other station having a frame to send may now attempt to do so. If
two or more stations decide to transmit simultaneously, there will be a
collision.
If a station detects a collision, it aborts its transmission, waits a random
period of time, and then tries again assuming that no other station has
started transmitting in the meantime.
Therefore, our model for CSMA/CD will consist of alternating
contention and transmission periods, with idle periods occurring when all
stations are quiet.
11/06/202 34
4
The algorithm of CSMA/CD:
1. When a frame is ready, the transmitting station checks whether the
channel is idle or busy.
2. If the channel is busy, the station waits until the channel becomes idle.
3. If the channel is idle, the station starts transmitting and continually
monitors the channel to detect collision.
4. If a collision is detected, the station starts the collision resolution
algorithm.
5. The station resets the retransmission counters and completes frame
transmission.
11/06/202 35
4
Collision Resolution Algorithm:
11/06/202 36
4
CSMA/CD Flowchart:
11/06/202 37
4
The algorithm of CSMA/CD:
According Text Book
11/06/202 38
4
CSMA/CA:
CSMA/CA is a network multiple access method in which carrier sensing
is used, but nodes attempt to avoid collisions by beginning transmission
only after the channel is sensed to be "idle".
It is particularly important for wireless networks, where the collision
detection of the alternative CSMA/CD is not possible due to wireless
transmitters desensing their receivers during packet transmission.
11/06/202 39
4
CSMA/CA:
11/06/202 40
4
CSMA/CA:
11/06/202 41
4
CSMA/CA:
Interframe space (IFS) :
When an idle channel is found, the station does not send immediately. It
waits for a period of time called the interframe space or IFS.
Even though the channel may appear idle when it is sensed, a distant
station may have already started transmitting. The distant station’s signal
has not yet reached this station.
11/06/202 42
4
CSMA/CA:
Interframe space (IFS) :
The purpose of IFS time is to allow this transmitted signal to reach other
stations.
After waiting an IFS time, if the channel is still idle, the station can
send, but it still needs to wait a time equal to the contention time.
The IFS variable can also be used to prioritize stations or frame types.
11/06/202 43
4
CSMA/CA:
Contention Window:
The contention 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 backoff strategy. This means that it is set of one slot the first
time and then doubles each time the station cannot detect an idle channel
after the IFS time.
11/06/202 44
4
CSMA/CA:
Contention Window:
This is very similar to the p-persistent method except that a random
outcome defines the number of slots taken by the waiting station.
One interesting point about the contention window is that the station
needs to sense the channel after each time slot.
However, 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.
11/06/202 45
4
CSMA/CA:
Contention Window:
11/06/202 46
4
Controlled-access Protocols:
Acknowledgment:
11/06/202 47
4
Controlled-access Protocols:
In controlled access, the stations seek information from one another to
find which station has the right to send. It allows only one node to send at
a time, to avoid collision of messages on shared medium.
The three controlled-access methods are:
1. Reservation
2. Polling
3. Token Passing
11/06/202 48
4
Controlled-access Protocols:
Reservation :
In this method, a station needs to make a reservation before sending the
data.
Time is mainly divided into intervals.
Also, in each interval, a reservation frame precedes the data frame that
is sent in that interval.
Suppose if there are 'N' stations in the system in that case there are
exactly 'N' reservation minislots in the reservation frame; where each
minislot belongs to a station.
Whenever a station needs to send the data frame, then the station makes
a reservation in its own minislot.
Then the stations that have made reservations can send their data after
the reservation frame.
11/06/202 49
4
Controlled-access Protocols:
Reservation :
Eg: 5 stations and a 5-minislot reservation frame. In the first
interval, the station 2,3 and 5 have made the reservations. While in the
second interval only station 2 has made the reservations.
11/06/202 50
4
Controlled-access Protocols:
Polling:
The polling method mainly works with those topologies
where one device is designated as the primary station and the
other device is designated as the secondary station.
All the exchange of data must be made through the primary
device even though the final destination is the secondary
device.
Thus to impose order on a network that is of independent
users, and in order to establish one station in the network that
will act as a controller and periodically polls all other stations is
simply referred to as polling.
11/06/202 51
4
Controlled-access Protocols:
Polling:
The Primary device mainly controls the link while the secondary device
follows the instructions of the primary device.
The responsibility is on the primary device in order to determine which
device is allowed to use the channel at a given time.
Therefore the primary device is always an initiator of the session.
11/06/202 52
4
Controlled-access Protocols:
Polling Function:
In case if primary devices want to receive the data, then it usually asks
the secondary devices if they have anything to send. This is commonly
known as Poll Function.
11/06/202 53
4
Controlled-access Protocols:
Polling Function contd…
If the secondary device has data to transmit then it sends the data frame,
otherwise, it sends a negative acknowledgment (NAK).
After that in case of the negative response, the primary then polls the
next secondary, in the same manner until it finds the one with the data to
send. When the primary device received a positive response that means (a
data frame), then the primary devices reads the frame and then returns an
acknowledgment (ACK )frame.
11/06/202 54
4
Controlled-access Protocols:
Polling Function contd…
11/06/202 55
4
Controlled-access Protocols:
Select Function:
In case, if the primary device wants to send the data then it tells the
secondary devices in order to get ready to receive the data. This is
commonly known as the Select function.
Thus the select function is used by the primary device when it has
something to send.
We know that the primary device always controls the link.
Before sending the data frame, a select (SEL ) frame is created and
transmitted by the primary device, and one field of the SEL frame includes
the address of the intended secondary.
The primary device alerts the secondary devices for the upcoming
transmission and after that wait for an acknowledgment (ACK) of the
secondary devices.
11/06/202 56
4
Controlled-access Protocols:
Select Function:
11/06/202 57
4
Controlled-access Protocols:
Token Passing :
A station is authorized to send data when it receives a special frame
called a token.
Here there is no master node.
A small, special-purpose frame known as a token is exchanged among
the nodes in some fixed order.
When a node receives a token, it holds onto the token only if it has some
frames to transmit; otherwise, it immediately forwards the token to the
next node.
11/06/202 58
4
Controlled-access Protocols:
Token Passing :
If a node does have frames to transmit when it receives the token, it
sends up to a maximum number of frames and then forwards the token to
the next node.
Token passing is decentralized and highly efficient. But it has problems
as well.
For example, the failure of one node can crash the entire channel. Or if a
node if a node accidentally neglects to release the token, then some
recovery procedure must be invoked to get the token back in circulation.
11/06/202 59
4
Controlled-access Protocols:
Token Passing :
11/06/202 60
4
Controlled-access Protocols:
Token Passing :
Token Passing :
The performance of a token ring is governed by 2 parameters, which are
delay and throughput.
Delay is a measure of the time; it is the time difference between a packet
ready for transmission and when it is transmitted. Hence, the average time
required to send a token to the next station is a/N.
Throughput is a measure of the successful traffic in the communication
channel.
Throughput, S = 1/ (1 + a/N) for a<1
S = 1/[a(1+1/N)] for a>1, here N = number of stations & a = Tp/Tt
Tp = propagation delay &Tt = transmission delay.
11/06/202 61
4
Channelization Protocols:
Channelization is a multiple-access method, in which the available
bandwidth of the link is shared in time, frequency, or through the code in
between the different stations.
11/06/202 62
4
Channelization Protocols:
11/06/202 63
4
FDMA:
In FDMA, the available bandwidth of the common channel is divided into
bands that are separated by guard bands.
11/06/202 64
4
FDMA:
11/06/202 65
4
FDMA:
11/06/202 66
4
TDMA:
In TDMA, the bandwidth is just one
channel that is time-shared between
different stations.
11/06/202 67
4
TDMA:
11/06/202 68
4
TDMA:
The main problem with TDMA lies in achieving
synchronization between the different stations.
Each station needs to know the beginning of its slot and the
location of its slot.
This is difficult because of propagation delays introduced in
the system if the stations are spread over large data.
To compensate this we insert guard times.
11/06/202 69
4
TDMA:
In CDMA, one channel carries all
transmissions simultaneously.
11/06/202 70
4
TDMA:
11/06/202 71
4
TDMA:
11/06/202 72
4