Professional Documents
Culture Documents
Unit 5 DCN Lecture Notes 55 67
Unit 5 DCN Lecture Notes 55 67
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.
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.
1. ALOHA
2. Slotted ALOHA
3. CSMA, CSMA/CD
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.
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.
Slotted ALOHA
We divide the time into slots and force the station to send only at the beginning of
the time slot.
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.
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.
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".
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.
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.
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.
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.
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.
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.
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.
Token – gives station right to access the channel; needs token management
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.
FDMA feature
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
CDMA feature