ALOHA
1 Pure ALOHA
The original ALOHA protocol is called pure ALOHA. This is a simple, but elegant
protocol. The idea is that each station sends a frame whenever it has a frame to send.
However, since there is only one channel to share, there is the possibility of collision
between frames from different stations. Below Figure
shows an example of frame collisions in pure ALOHA.
In pure ALOHA, the stations transmit frames whenever they have data to send.
When two or more stations transmit simultaneously, there is collision and the
frames are destroyed.
In pure ALOHA, whenever any station transmits a frame, it expects the
acknowledgement from the receiver.
If acknowledgement is not received within specified time, the station assumes that
the frame (or acknowledgement) has been destroyed.
If the frame is destroyed because of collision the station waits for a random amount
of time and sends it again. This waiting time must be random otherwise same frames
will collide again and again.
Therefore pure ALOHA dictates that when time-out period passes, each station
must wait for a random amount of time before resending its frame. This randomness
will help avoid more collisions.
Vulnerable time Let us find the length of time, the vulnerable time, in which there is a
possibility of collision. We assume that the stations send fixed - length frames with
each frame taking Tfr S to send.
2 Slotted ALOHA
Pure ALOHA has a vulnerable time of 2 x Tfr . This is so because there is no rule that
defines when the station can send. A station may send soon after another station has
started or soon before another station has finished. Slotted ALOHA was invented to
improve the efficiency of pure ALOHA.
Carrier Sense Multiple Access (CSMA)
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 before trying to use it. Carrier sense multiple access (CSMA)
requires that each station first listen to the medium (or check the state of the medium)
before sending. In other words, CSMA is based on the principle "sense before
transmit" or "listen before talk."
CSMA can reduce the possibility of collision, but it cannot eliminate it. The reason for
this is shown in below Figure. Stations are connected to a shared channel (usually a
dedicated medium).
The possibility of collision still exists because of propagation delay; station may sense
the medium and find it idle, only because the first bit sent by another station has not
yet been received.
At time tI' station B senses the medium and finds it idle, so it sends a frame. At time
t2 (t2> tI)' station C senses the medium and finds it idle because, at this time, the first
bits from station B have not reached station C. Station C also sends a frame. The two
signals
collide and both frames are destroyed.
Vulnerable Time
The vulnerable time for CSMA is the propagation time Tp . This is the time needed
for a signal to propagate from one end of the medium to the other.
When a station sends a frame, and any other station tries to send a frame during this
time, a collision will result. But if the first bit of the frame reaches the end of the
medium, every station will already have heard the bit and will refrain from sending
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:
the 1-persistent method, the non-persistent method, and the p-persistent method
1-Persistent: In this method, after the station finds the line idle, it sends its 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: 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. This 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: This is used if the channel has time slots with a slot duration equal to or
greater than the maximum propagation time. The p-persistent approach combines the
advantages of the other two strategies. It reduces the chance of collision and improves
efficiency.
In this method, after the station finds the line idle it follows these steps:
1. With probability p, the station sends itsframe.
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
backoff procedure.
Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
The CSMA method does not specify the procedure following a collision.
Carrier sense multiple access with collision detection (CSMA/CD) augments the
algorithm to handle the collision.
In this method, a station monitors the medium after it sends a frame to see if the
transmission was successful. If so, the station is finished. If, however, there is a
collision, the frame is sent again.
To better understand CSMA/CD, let us look at the first bits transmitted by the two
stations involved in the collision. Although each station continues to send bits in the
frame until it detects the collision, we show what happens as the first bits collide. In
below Figure, stations A and C are involved in the collision.
Collision of the first bit in CSMA/CD
At time t 1, station A has executed its persistence procedure and starts sending the bits
of its frame. At time t2, station C has not yet sensed the first bit sent by A. Station C
executes its persistence procedure and starts sending the bits in its frame, which
propagate both to the left and to the right. The collision occurs sometime after time
t2.Station C detects a collision at time t3 when it receives the first bit of A's frame.
Station C immediately (or after a short time, but we assume immediately) aborts
transmission.
Minimum Frame Size
For CSMAlCD to work, we need a restriction on the frame size. Before sending the
last bit of the frame, the sending station must detect a collision, if any, and abort the
transmission. This is so because the station, once the entire frame is sent, does not
keep a copy of the frame and does not monitor the line for collision detection.
Therefore, the frame transmission time Tfr must be at least two times the maximum
propagation time Tp. To understand the reason, let us think about the worst-case
scenario. If the two stations involved in a collision are the maximum distance apart,
the signal from the first takes time Tp to reach the second, and the effect of the
collision takes another time Tp to reach the first. So the requirement is that the first
station must still be transmitting after 2Tp .
DIFFERENCES BETWEEN ALOHA & CSMA/CD
The first difference is the addition of the persistence process. We need to sense the
channel before we start sending the frame by using one of the persistence processes
The second difference is the frame transmission. In ALOHA, we first transmit the
entire frame and then wait for an acknowledgment. In CSMA/CD, transmission and
collision detection is a continuous process. We do not send the entire frame and then
look for a collision. The station transmits and receives continuously and
simultaneously The third difference is the sending of a short jamming signal that
enforces the collision in case other stations have not yet sensed the collision.
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 (CSMAlCA) 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.
Timing in CSMA/CA
Inter frame Space (IFS)
First, collisions are avoided by deferring transmission even if the channel is found
idle. When an idle channel is found, the station does not send 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. The distant station's signal has not yet reached this
station. The IFS time allows the front of the transmitted signal by the distant station to
reach this station. 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
shorter IFS has a higher priority.
In CSMA/CA, the IFS can also be used to define the priority of a station or a
frame.
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 back-off strategy. This means
that it is set to one slot the first time and then doubles 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. 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. This gives priority to
the station with the longest waiting time.
In CSMA/CA, if the station finds the channel busy, it does not restart the timer of the
contention window; it stops the timer and restarts it when the channel becomes idle.
Acknowledgment
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.
This is the CSMA protocol with collision avoidance.
The station ready to transmit, senses the line by using one of the persistent
strategies.
As soon as it finds the line to be idle, the station waits for an IFS (Inter frame
space) amount of time.
If then waits for some random time and sends the frame.
After sending the frame, it sets a timer and waits for the acknowledgement
from the receiver.
If the acknowledgement is received before expiry of the timer, then the
transmission is successful.
But if the transmitting station does not receive the expected
acknowledgement before the timer expiry then it increments the back off
parameter, waits for the back off time and re senses the line
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
Reservation
In the reservation method, a station needs to make a reservation before
sending data.
The time line has two kinds of periods:
1. Reservation interval of fixed time length
2. Data transmission period of variable frames.
If there are M stations, the reservation interval is divided into M slots, and
each station has one slot.
Suppose if station 1 has a frame to send, it transmits 1 bit during the slot
1. No other station is allowed to transmit during this slot.
In general, i th station may announce that it has a frame to send by
inserting a 1 bit into i th slot. After all N slots have been checked, each station
knows which stations wish to transmit.
The stations which have reserved their slots transfer their frames in that order.
After data transmission period, next reservation interval begins.
Since everyone agrees on who goes next, there will never be any collisions.