Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

Communication network

Nitin S Thakare
Department of Electronics & Telecommunication Engineering
PRMIT&R, Badnera
Unit-3. Multiple Access Control Protocols:

Random Access Techniques / Contention Techniques:

• ALOHA, Slotted ALOHA, CSMA, CSMA/ CD (IEEE 802.3), CSMA/CA.

Controlled Access Techniques:

• Polling, Token Passing.

Medium Access Control Protocols:

• Token Bus (IEEE 802.4), Token Ring (IEEE802.5).


Need of Multiple Access Control Protocols

• Multiple access protocols are a set of protocols operating in the Medium Access Control
sub-layer (MAC sub-layer) of the Open Systems Interconnection (OSI) model.
• The Data Link Layer is responsible for transmission of data between two nodes. Its main
functions are-
1. Data Link Control
2. Multiple Access Control
• The data link control is responsible for reliable transmission of message over
transmission channel by using techniques framing, error control and flow control for ex.
S&W ARQ, Sliding window ARQ etc.
• 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 between stations, then multiple stations
can access the channel simultaneously.
• In that scenario, numerous stations access the channel and broadcast data over it at the
same time.
• It may result in collisions and crosstalk.
• Hence multiple access control protocols are required to

 allow number of nodes or users to access a shared network channel

 to decrease the collision

 avoid crosstalk and

 optimized the transmission time.

• For example, students in a classroom or parliament.

• Thus, protocols are required for sharing data on non dedicated channels.

• That protocols are called as Multiple access protocols which can be classified as
shown below
Fig. Multiple-access protocols
What is Random Access or Contention Techniques :
• Any station can transmit data at any (random) instant of time i.e. any
station/system can access the channel/medium randomly known as RA.

• There are no rules that specifies which station should send data and whose next.

• Because of this, the Stations compete with one another to access the medium,
that’s why these methods are also called as contention methods.

• In random access or contention methods, no station is superior to another station


and none is assigned to control the another station.

• No one is permitting to send or not to send the data to other.


1. ALOHA
• ALOHA is an acronym for Advocates of Linux Open-source Hawaii Association.

• ALOHA is a earliest random access method, was developed by Norman Abramson and
his associates at the University of Hawaii in early 1970.

• It is a multiple access protocol that allows data to be transmitted over a public network
channel.

• It is a data-link layer protocol that describes how multiple terminals can access the
medium without interfering or conflicting.

• Basically it was designed for a radio (wireless) LAN, but it can be used on any shared
medium.

ALOHA Rules:-

1. It does not require any carrier sensing.

2. Hence collision may occurs and data frames can lost during the transmission of data
through multiple stations.

3. Acknowledgment of the frames exists in Aloha. Hence, there is no collision


detection.
3. It requires retransmission of data after some random amount of time.
4. However, since there is only one channel to share the data, hence there is the
possibility of collision between frames from different stations on channel.

Fig. ALOHA network


• There are two types of ALOHA network

I. Pure ALOHA

II. Slotted ALOHA

I. Pure ALOHA

• Pure ALOHA allows to station to transmit data whenever they have data to be sent.

• In pure ALOHA when two frames try to occupy the channel at same time, without
checking whether the channel is idle or not idle then there will be collision between
frames and get damaged or lost.

• When any station sends data, it will wait for acknowledgement from receiver.

• If sender does not acknowledged by receiver within the timeout period, then station
waits for a random amount of time, called as back off time (Tb) . 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.

• Consider example of frame collisions in pure ALOHA.


Fig. Frames in a pure ALOHA network
• There are four stations that compete/contend with one another to access the shared
channel.
• The figure shows that each station sends two frames.
• There are a total of eight frames on the shared medium.
• Some of these frames collide because multiple frames are in contention to share the
channel.
• Only two frames survive: frame 1.1 from station 1 and frame 3.2 from station 3.
• If first bit of new frame get collide with last bit of another frame which almost finished
the transmission, both frame will totally or partially destroyed.
• After collision obviously ACK not receive within allotted time then station waits for
random amount of time called as back-off time (Tb) & resends the data.
• A collision involves two or more stations. If all these stations try to resend their frames
after the time-out, the frames will collide again also increases the congestion on
channel (flood of frames) .
• Time required to send the frame between two widely separated station is 2Tp.

• The vulnerable time, during which a collision may occur in pure ALOHA, is
2 times the frame transmission time

Pure ALOHA vulnerable time = 2 x 𝑻𝒇𝒓

Where,

𝑻𝒑 = maximum propagation time

𝑻𝒇𝒓 = Average frame transmission time

• The throughput for pure ALOHA

𝑺 = 𝑮 𝒆−𝟐𝑮

Where G the average number of frames generated by the system during


one frame transmission time
• Efficiency

𝑺 = 𝑮 𝒆−𝟐𝑮

• For max throughput or efficiency can be obtain by using differentiation of


S w.r.t. G and equating to zero.

• Then for G =1/2

• Then maximum throughput will be


𝟏
𝑺𝒎𝒂𝒙 = 𝟏
𝟐 𝒆𝟐( 𝟐)

𝑆𝑚𝑎𝑥 = 𝟎. 𝟏𝟖𝟒 = 𝟏𝟖. 𝟒% , when G =1/2


Fig. Vulnerable Time in a pure ALOHA network
• To prevent the congestion on the channel with retransmitted frames, pure
ALOHA has a second method.

• After a maximum number of retransmission attempts ‘Kmax’, the station


must give up and try later.

• Next figure shows the procedure for pure ALOHA based on Kmax strategy.
fig. Procedure for pure ALOHA protocol
• A pure ALOHA network transmits S =G x e^-2G
200-bit frames on a shared channel
S =0.135
of 200 kbps. What is the throughput
if the system (all stations together) S= 13.5 %
produces
a. 1000 frames per second This means that the throughput is
b. 500 frames per second 1000 X 0.135 =135 frames.
c. 250 frames per second

Only 135 frames out of 1000 will


Solution:-
Frame size = 200 bits
probably survive.
Channel BW = 200 Kbps
TT = frame size/BW = 200/200 Kbps 1000 frames x 200 bits = 200000 bits
TT = 1 ms has to be transmitted
a. If all the system produces 1000 But actually 135 x 200 = 27000 bits
frames per second then in 1ms transmitted only
1ms x 1000 = 1 frame is generated
hence G = 1
Slotted ALOHA

• Slotted ALOHA was invented to improve the efficiency of pure ALOHA as the
chances of collision of pure ALOHA is high.

• In slotted ALOHA the time is divided into slots of Average frame transmission
time Tfr and force the station to send the frame only at the beginning of the
time slot.

• If station missed out to send frame in allotted time slot, then station must wait
for next slot.

• This reduces the probability of collision.

• However, the possibility of a collision remains when trying to send a frame at


the beginning of two or more station time slot.

• Consider the following example


Fig. Frames in a slotted ALOHA network
Fig. Vulnerable Time in a Slotted ALOHA network
• Slotted ALOHA vulnerable time = Tfr

• Throughput or Efficiency for slotted ALOHA is

S = G x e^-G

• For max throughput or efficiency can be obtain by using differentiation of S


w.r.t. G and equating to zero.

• Then for G =1

• Then maximum throughput will be

Smax =1xe^-1 = 0.368 = 36.8 % , when G =1


• A Slotted ALOHA network transmits S =G x e^-G
200-bit frames on a shared channel
S =0.368
of 200 kbps. What is the throughput
if the system (all stations together) S= 36.8 %
produces
a. 1000 frames per second This means that the throughput is
b. 500 frames per second 1000 X 0.368 = 368 frames.
c. 250 frames per second

Only 368 frames out of 1000 will


Solution:-
Frame size = 200 bits
probably survive.
Channel BW = 200 Kbps
TT = Frame size/BW = 200/200 Kbps 1000 frames x 200 bits = 200000 bits
TT = 1 ms has to be transmitted
a. If the all system produces 1000 But actually 368 x 200 = 73600 bits
frames per second then in 1ms transmitted only
1ms x 1000 = 1 frame is generated
hence G = 1
NOTE:-

• In a random access method, each station has the right to access the medium
without being controlled by any other station.

• However, if more than one station tries to send, there is a collision and the
frames will be either destroyed or modified.

• To avoid collision or to resolve this , each station must follows the some sort of
procedure that answers the following questions:

i. When can the station access the medium?

ii. What can the station do if the medium is busy?

iii. How can the station determine the success or failure of the transmission?

iv. What can the station do if there is an access conflict?

• Multiple Access method is evolved to answer these questions.


CSMA - Carrier Sense Multiple Access

• To minimize the chance of collision and, therefore, increase the performance,


the CSMA method was developed.

• The chance of collision can be reduced if a station senses the medium whether
it is busy of idle.

• CSMA is based on the principle "sense before transmit"

• CSMA can reduce the possibility of collision, but it cannot eliminate it.

• Because the possibility of collision still exists because of propagation delay


Fig. Space/time model of the collision in CSMA
• The vulnerable time for CSMA is the propagation time Tp.

• This is the time needed for a signal to propagate.

• When a station sends a frame, and any other station tries to send a frame during
this time, a collision will occurs.

• The station A sends a frame at time t1 which reaches the station D at time t1 + Tp.
The gray area shows the vulnerable area in time and space.

Fig. Vulnerable Time in CSMA


Persistence Methods
• What should a station do if the channel is busy?

• What should a station do if the channel is idle?

• Three methods have been devised to answer these questions

i. 1-persistent method

ii. Non-persistent method

iii. p-persistent method.


1-Persistent

• The 1-persistent method is simple and straightforward.

• In this method, the station continuously sense the channel as soon as station
finds the line idle, it sends frame immediately (with probability 1).

• This method has the highest chance of collision because two or more stations
may find the line idle and send their frames immediately.
Non-persistent Method

• In the non-persistent method, a station that has a frame to send senses the line.

• If the line is idle, it sends immediately.

• If the line is not idle, it waits a random amount of time and then senses the line again.

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

• However, this method reduces the efficiency of the network because the medium
remains idle when there may be stations with frames to send.
p-Persistent
• The p-persistent method senses the channel continuously.

• If channel is idle, station allow to send data over channel in time slot.

• Channel has time slots with a slot duration equal to or greater than the maximum propagation time.

• Station has to send the data over channel only at the beginning of time slot.

• If station misses the time slot, it can not send data on the channel and has to wait for its time slot.

• In this method, after the station finds the line idle it follows below 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.

a. If the line is idle, it goes to step 1.

b. If the line is busy, it acts as though a collision has occurred and uses the back-off
procedure.

• The p-persistent approach combines the advantages of the other two strategies.

• It reduces the chance of collision and improves efficiency.


Persistence Methods
Flow diagram for three persistence methods
CSMA - Carrier Sense Multiple Access

• CSMA/CD- Carrier Sense Multiple access with collision detection

i. CSMA/CA - Carrier Sense multiple Access with collision avoidance.

• CSMA/CD tells the station what to do when a collision is detected.

• CSMA/CA tries to avoid the collision.


Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
• In this method, a station monitors the medium after it sends a frame to see, is the
transmission was successful. If not successful the frame is sent again.

Fig. Collision of the first bit in CSMA/CD


• In the diagram, A starts sending the first bit of its frame at t1 and since C sees the
channel idle at t2, starts sending its frame at t2.

• C detects A’s frame at t3 and aborts transmission.

• A detects C’s frame at t4 and aborts its transmission.

• Transmission time for C’s frame is, therefore,t3 –t2 and for A’s frame ist4 –t1

• So, the frame transmission time (Tfr) should be at least twice the maximum
propagation time (Tp). This can be deduced when the two stations involved in a
collision are a maximum distance apart.
Fig. Flow diagram for the CSMA/CD
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
• We need to avoid collisions on wireless networks because they cannot be
detected.

• Carrier sense multiple access with collision avoidance (CSMA/CA) was invented for
wireless network.

• Collisions are avoided through the use of CSMA/CA's three strategies: the inter-
frame space, the contention window, and acknowledgments, as shown below

Fig. Timing in CSMA/CA


Inter-frame Space (IFS):

• First, collisions are avoided by holding transmission even if the channel is


found idle.

• When an idle channel is found, the station does not send data immediately. It
waits for a period of time called the inter-frame space or IFS.

• Even though the channel may appear idle when it is sensed, a distant station
may have already started transmitting, so ISF provides advantage of collision
avoidance.

• If after the IFS time 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. For
example, a station that is assigned a shorter IFS has a higher priority.
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 waiting
time.
• The number of slots in the window changes according to the binary
exponential back-off strategy.

• The channel needs to be sensed before and after the IFS. The channel also
needs to be sensed during the contention time.
• For each time slot of the contention window, the channel is sensed.
• If it is found idle, the timer continues.
• if the channel is found busy, the timer is stopped and continues after the
timer becomes idle again.
• This gives priority to the station with the longest waiting time.
• With all these precautions, there still may be a collision resulting in destroyed
data.

• In addition, the data may be corrupted during the transmission.

• The positive acknowledgment and the time-out timer can help guarantee that
the receiver has received the frame.
Fig. Flow diagram for CSMA/CA
Controlled Access Techniques:
• In controlled access, the stations consult one another to find which station has
the right to send the data.

• A station cannot send unless it has been authorized by other stations.

• There are three controlled-access methods.

1. Reservation

2. Polling

3. Token Passing
1. Reservation

• In the reservation method, a station needs to make a reservation before


sending data.

• Time is divided into intervals.

• 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 reservations can send their data frames after
the reservation frame.
• Fig. below shows a situation with five stations and a five-mini-slot reservation
frame.

• In the first interval, only stations 1, 3, and 4 have made reservations.

• In the second interval, only station 1 has made a reservation.

Fig. Reservation access method


2. Polling

Fig. Select and poll functions in polling access method


• Polling works with topologies in which one device is designated as a primary
station and the other devices are secondary stations.

• All data exchanges must be made through the primary device even when the
ultimate destination is a secondary device.

• The primary device controls the link; the secondary devices follow its instructions.

• It is up to the primary device to determine which device is allowed to use the


channel at a given time.

• The primary device, therefore, is always the initiator of a session

• If the primary wants to send data, it tells the secondary to get ready to receive;
this is called select function.

• If the primary wants to receive data, it asks the secondary if they have anything to
send; this is called poll function.
Select function:-
• The select function is used whenever the primary device has something to
send.
• If the primary is neither sending nor receiving data, it indicates that the link is
available.
• If primary has something to send then primary can not directly send the data
because whether the destination is prepared or not to receive the data is not
known to primary.
• So the primary must alert to the secondary (i.e. destination) about the
upcoming transmission and wait for an acknowledgment of the secondary's
ready status.
• Before sending data, the primary creates and transmits a select (SEL) frame,
which also includes the address of the intended secondary.
Poll:-
• The poll function is used by the primary device for asking to the secondary devices
about transmissions of data.
• When the primary is ready to receive data, it must ask (poll) each device is you
have a data to send or not.
• If any secondary does not have data to send, then it responds with a NAK frame
• If the response is negative (a NAK frame), then the primary polls the next
secondary in the same manner until it finds one of the secondary with data to
send.
• If any secondary has data to send then the primary reads the frame and returns
an acknowledgment (ACK frame) & verifying its receipt.
Efficiency:

Let Tpoll be the time for polling and Tt be the time required for transmission of data.
Then,
Efficiency = Tt/ (Tt+ Tpoll)
3. Token Passing
• A station is authorized to send the data whenever it receives special frame called
token.
• So token get passed to every station in some fixed order.
• When node/station receives the token, then it holds token if that station has data
to transmit otherwise it will immediately forward the token to next station.
• If station has data and it holds the token, then station set ups the frames to
transmit it and forward the token to next node.
• In token there is no master node that means it follows the decentralized
approached in sequence hence it is highly efficient in terms of collision.
• But it has problem of failure of node.
• That means if node get fails or neglects to passed the token to another node then
entire channel get crashed.
• Then some recovery procedures must be used to get back the token into
circulation.
fig. Logical ring and physical topology in token-passing access method
Performance of token ring can be concluded by 2 parameters:-

1. Delay, which is a measure of time between when a packet is ready and when it is

delivered.

So, the average time (delay) required to send a token to the next station = a/N.

2. Throughput, which is a measure of the successful traffic.

Throughput:-

S = 1 / (1 + a/N) when a<1

S = 1 / {a(1 + 1/N)} when a>1

a = Tp/Tt

Where,

N = number of stations

Tp = propagation delay

Tt = transmission delay

You might also like