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

lOMoARcPSD|3732987

Unit-5 DCN - Lecture notes 55-67

Data communications & Networks (Bangalore University)

StuDocu is not sponsored or endorsed by any college or university


Downloaded by Yatish Dadu (yatishdadu@gmail.com)
lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 1 of 18

5. Medium Access Control Protocols

Multiple Access Communications


In Multiple access communication, number of user station share a common
transmission medium. The transmission medium is broad cast in nature, and so all
other stations that are attached to this medium can hear transmission from any
given station. When two stations transmits the data simultaneously, their signal will
collide with each other.

Sharing of transmission medium can be categorized into two schemes first category
involves a static and collision free sharing of medium known as channelization
schemes. Since they involve the partitioning of medium into separate channels and
are dedicated to a particular user.
The second category involves a dynamic sharing of medium as per frame basis that is
better matched to situations in which the user traffic is busy and is known as MAC
schemes. This scheme eliminates the incidence of collisions to achieve a reasonable
utilization of medium. The two basic approaches to medium access control are random
access and scheduling. Channel sharing technique is used both in wired and wireless
communications.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 2 of 18

Random Access Protocols

In Random access protocol the channel is not divided but, the complete
bandwidth is given to all the users. If there are more than one node
transmitting at the same time then there is bound to be collision in the
network. The moment a node has something to transmit it sends it on the
channel at full data rate R. There is no ‘a priori’ coordination among the
nodes. This means that the nodes do not inform each other before
transmitting their data on the channel. At a particular time when there are two
or more transmission nodes collision will take place in the channel.

The random access MAC protocol is used in this case to monitor the collision. It
specifies two major things; one it detects collision, second it finds the way of
recovery from that collision. If there are two collisions which take place then
the protocol will detect them and find the way to recover the data that is lost
in these collisions.

Some of the random access MAC protocols are:

1. ALOHA
2. Slotted ALOHA
3. CSMA, CSMA/CD

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 3 of 18

ALOHA
ALOHA, the earliest random access method, was developed at the University of
Hawaii in early 1970. It was designed for a radio (wireless) LAN, but it can be used on
any shared medium.
The basic idea is let users transmit whenever they have data to be sent.
If two or more users send their packets at the same time, a collision occurs and
the packets are destroyed.
If there is a collision, the sender waits a random amount of time and sends it again.
The waiting time must be random. Otherwise, the same packets will collide again.

Pure ALOHA
The original ALOHA protocol is called pure ALOHA.
 Pure ALOHA Protocol Description
 All frames from any station are of fixed length.
 Stations transmit at equal transmission time (all stations produce frames
with equal frame lengths).
 A station that has data can transmit at any time
 After transmitting a frame, the sender waits for an acknowledgment for an
amount of time (time out) equal to the maximum round-trip propagation
delay = 2* tprop(see next slide)
 If no ACK was received, sender assumes that the frame or ACK has been
destroyed and resends that frame after it waits for a random amount of time
 If station fails to receive an ACK after repeated transmissions, it gives up.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 4 of 18

There are four stations (unrealistic assumption) that contend with one another for
access to 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 for the shared channel. The above fig shows
that only two frames survive: frame 1.1 from station 1 and frame 3.2 from station 3.
We need to mention that even if one bit of a frame coexists on the channel with one
bit from another frame, there is a collision and both will be destroyed.

It is obvious that we need to resend the frames that have been destroyed during
transmission. The pure ALOHA protocol relies on acknowledgments from the receiver.
When a station sends a frame, it expects the receiver to send an acknowledgment. If
the acknowledgment does not arrive after a time-out period, the station assumes
that the frame (or the acknowledgment) has been destroyed and resends the frame.

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. Pure ALOHA dictates that
when the time-out period passes, each station waits a random amount of time before
resending its frame. The randomness will help avoid more collisions. We call this
time the back-off time TB.
Pure ALOHA has a second method to prevent congesting the channel with
retransmitted frames. After a maximum number of retransmission attempts a station
must give up and try later. The below Fig shows the procedure for pure ALOHA based
on the above strategy.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 5 of 18

Slotted ALOHA

We divide the time into slots and force the station to send only at the beginning of
the time slot.

 Time is divided into slots equal to a frame transmission time (Tfr)

 A station can transmit at the beginning of a slot only

 If a station misses the beginning of a slot, it has to wait until the beginning
of the next time slot.

 A central clock or station informs all stations about the start of a each slot.

 Maximum channel utilization is 37%

In Roberts' method, which has come to be known as slotted ALOHA, a computer is


not permitted to send whenever a carriage return is typed. Instead, it is required to
wait for the beginning of the next slot. Since the vulnerable period is now halved,

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 6 of 18

the probability of no other traffic during the same slot as our test frame is e-
G which leads to
−G
S=G×e
where G is the average number of frames requested per frame-time The maximum
throughput Smax = 0.368, when G= 1.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 7 of 18

CSMA (Carrier Sense Multiple Access)

In many situations, stations can tell if the channel is in use before trying to use it.
If the channel is sensed as busy, no station will attempt to use it until it goes idle.
This is the basic idea of the Carrier Sense Multiple Access (CSMA) protocol. Just like
"Listen before talk".

There are three different types of CSMA protocols


(i) 1-Persistent CSMA
(ii) Non-Persistent CSMA
(iii) P-Persistent CSMA

1-Persistent CSMA
In this method, station that wants to transmit data continuously sense the Channel
to check whether the channel is idle or busy. If the channel is busy, the station waits
until it becomes idle. When the station detects an idle channel, it immediately
transmits the frame with probability 1. Hence it is called 1-persistent CSMA.

This method has the highest chance of collision because two or more station may find
channel to be idle at the same time and transmit their frames.
When the collision occurs, the stations wait a random amount of time and start all
over again.

Non-Persistent CSMA
A station that has a frame to send senses the channel. If the channel is idle, it sense
immediately. If the channel is busy, it waits a random amount of time and then
senses the channel again.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 8 of 18

P-Persistent CSMA
Time is divided to slots where each Time unit (slot) typically equals maximum
propagation delay.
Station wishing to transmit listens to the medium:
1. If medium idle,
 transmit with probability (p), OR
 wait one time unit (slot) with probability (1 – p), then repeat 1.
2. If medium busy, continuously listen until idle and repeat step 1
It reduces the chances of collision and improve the efficiency of the network.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 9 of 18

CSMA/CD (Carrier Sense Multiple Access with Collision Detection)

If two stations transmit simultaneously, they will both detect the collision almost
immediately. The stations should stop transmitting as soon as the collision is
detected. This protocol is called CSMA with collision detection (CSMA/CD).
After a random time interval, the stations that collided attempt to transmit again. If
another collision occurs, the time intervals from which the random waiting time is
selected are increased step by step. This is known as exponential backoff(wait) for a
random amount of time, then transmit the frame again.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 10 of 18

Collision detected procedure

1. Continue transmission until minimum packet time is reached to ensure that


all receivers detect the collision.
2. Increment retransmission counter.
3. Was the maximum number of transmission attempts reached? If so, abort
transmission.
4. Calculate and wait random backoff period based on number of collisions.
5. Re-enter main procedure at stage 1.

This can be likened to what happens at a dinner party, where all the guests talk to
each other through a common medium (the air). Before speaking, each guest
politely waits for the current speaker to finish. If two guests start speaking at the
same time, both stop and wait for short, random periods of time (in Ethernet, this
time is measured in microseconds). The hope is that by each choosing a random
period of time, both guests will not choose the same time to try to speak again, thus
avoiding another collision.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 11 of 18

Controlled Access Protocols

In controlled access, the stations consult one another to find which station has the
right to send. A station cannot send unless it has been authorized by other stations.
The three popular controlled-access methods are
 Reservation
 Polling
 Token Passing

Reservation

In the reservation method, a station needs to make a reservation before sending data.
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 minislots in the
reservation frame. Each minislot belongs to a station. When a station needs to send
a data frame, it makes a reservation in its own minislot. The stations that have made
reservations can send their data frames after the reservation frame.

The above fig shows a situation with five stations and a five-minislot 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.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 12 of 18

Polling

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 (as
shown in below fig).

If the primary device wants to receive data, it asks the secondary device if they
have anything to send; this is called poll function.
If the primary wants to send data, it tells the secondary to get ready to receive; this
is called select function.

Select
The select function is used whenever the primary device has something to send.
Remember that the primary device controls the link. If the primary is neither
sending nor receiving data, it knows the link is available.
If it has something to send, the primary device sends it. Before sending, it checks
whether the target device is prepared to receive. For that, the primary creates and
transmits a select (SEL) frame, once the primary receives the ACK, then it sends the
Data to target device.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 13 of 18

Poll
When the primary is ready to receive data it send a Poll frame for each device to ask if
it has data to send or not. If yes, data will be transmitted otherwise NAK(negative
ACK) is sent.
If the response is yes, the primary reads the frame and returns an acknowledgment
(ACK frame), verifying its receipt.

Token Passing

In the token-passing method, the stations in a network are organized in a logical ring.
In other words, for each station, there is a predecessor and a successor. The
predecessor is the station which is logically before the station in the ring; the
successor is the station which is after the station in the ring.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 14 of 18

Token passing – stations in network organized in a logical ring – predecessor and


successor.

Token – gives station right to access the channel; needs token management

Physical ring – station sends the token to successor.

Dual ring – uses second ring which operates in reverse direction.

Bus ring (token bus) - stations are connected to single cable called bus, but
make logical ring.

Star ring - physical topology star, wiring inside hub makes the ring.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 15 of 18

Channelization: FDMA, TDMA, CDMA

Channelization is a multiple-access method in which the available bandwidth of a link


is shared in time, frequency, or through code, between different stations. The three
channelization protocols are:

FDMA.

TDMA.

CDMA.
Frequency Division Multiple Access (FDMA)

In frequency-division multiple access (FDMA), the available bandwidth is divided into


frequency bands. Each station is allocated a band to send its data. In other words,
each band is reserved for a specific station, and it belongs to the station all the time.
Each station also uses a bandpass filter to confine the transmitter frequencies.
Guard bands are frequencies introduced between used bands to separate channels
to prevent interference. Used in Analog Cellular phone networks and Terrestrial &
Satellite broadcast radio & TV.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 16 of 18

FDMA feature

In FDMA all users share the satellite transponder or frequency channel


simultaneously but each user transmits at single frequency. FDMA can
be used with both analog and digital signal.
FDMA requires high-performing filters in the radio hardware, in contrast to TDMA
and CDMA.
FDMA is not vulnerable to the timing problems that TDMA has. Since a
predetermined frequency band is available for the entire period of
communication, stream data (a continuous flow of data that may not
be packetized) can easily be used with FDMA.
Due to the frequency filtering, FDMA is not sensitive to near-far problem
which is pronounced for CDMA.
Each user transmits and receives at different frequencies as each user gets a
unique frequency slot

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 17 of 18

Time-Division Multiple Access (TDMA)

In time-division multiple access (TDMA), the stations share the bandwidth of the
channel in time. Each station is allocated a time slot during which it can send data.
Each station transmits its data in is assigned time slot. The process of dividing the
channels into different slots makes it possible to increase the amount of data that
can be transferred at the same time using the same amount of resources.

TDMA feature

Shares single carrier frequency with multiple users.


Non-continuous transmission makes handoff simpler.
Slots can be assigned on demand in dynamic TDMA.
Less stringent power control than CDMA due to reduced intra cell interference.
Higher synchronization overhead than CDMA.
Advanced equalization may be necessary for high data rates if the channel
is "frequency selective" and creates Intersymbol interference.
Cell breathing (borrowing resources from adjacent cells) is more
complicated than in CDMA.
Frequency/slot allocation complexity.
Pulsating power envelope: Interference with other devices.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)


lOMoARcPSD|3732987

BCA404T- Data Communications and Networks Page 18 of 18

Code Division Multiple Access (CDMA)

CDMA is a wireless communication technology that allows multiple people to use a


single radio channel at the same time with little interference and very high security.
Conventional communication systems transmit and receive on one constant
frequency; CDMA "spreads" a radio signal over a large frequency range, using a
unique code to identify each transmitter/receiver pair. This allows many users to
communicate on the same channel while making each transmission largely immune to
natural interference, eavesdropping, and jamming.

CDMA feature

Many user of CDMA shore the same frequency.

CDMA has soft capacity limit.

Channel data rates are very high in CDMA systems.

Downloaded by Yatish Dadu (yatishdadu@gmail.com)

You might also like