Professional Documents
Culture Documents
Computer Networks
Module 2: Access Control
● In multiple access we can also give priority to a device or decide who gets the
access to the link first and send data.
● Multiple access is a data link layer technique while multiplexing is a physical
layer technique.
Multiple access solves the access control problem for a multi-point or broadcast
connection.
Multiple-access protocols
Random Access
In random access or contention methods, no station is superior to another
station and none is assigned the control over another. No station permits, or does
not permit, another station to send.
At each instance, a station that has data to send uses a procedure defined by the
protocol to make a decision on whether or not to send and the decision depends
on the state of the medium (idle/busy).
Random Access
In random access or contention methods, no station is superior to another
station and none is assigned the control over another. No station permits, or does
not permit, another station to send.
At each instance, a station that has data to send uses a procedure defined by the
protocol to make a decision on whether or not to send and the decision depends
on the state of the medium (idle/busy).
Questions:
If two stations retry after time out, collision may occur again.
Each station waits for random amount of time before resending. This is known as
backoff time (T_B). Also, to prevent further congestion of retransmitted frames,
after a maximum no. of retransmission attempts (K_max) a station needs to give
up.
Pure Aloha parameters
Timeout period:
Backoff time:
Pure Aloha parameters
Timeout period: 2* T_p = Maximum possible round-trip propagation delay.
Solution:
In slotted Aloha, we divide time into slots of T_fr seconds and force the station sto
send only at the beginning of time slot. If a station misses out beginning it has to
wait for the next slot.
Slotted Aloha
Slotted Aloha - vulnerable time
Slotted Aloha - throughput
Example:
Example:
Example:
Aloha vs. Slotted Aloha: Throughput comparison
Aloha and slotted Aloha summary
CSMA - Carrier sense multiple access
Chances of collision can be reduced if a station senses the medium before trying
to use it.
CSMA requires every station should first listen to medium (or check the state of
medium before transmitting ⇒ Sense/listen before transmit
Collisions may
still exist as when
a station sends a
frame it takes
some time for first
bit to be received
by all stations.
Vulnerable time in CSMA
Persistent methods: What to do if the channel is
busy/idle?
Persistent methods
CSMA/CD - Carrier sense multiple access/Collision
detection
CSMA doesn’t specify the procedure to be followed after collision.
Stations monitor the medium after it sends a frame to see if the transmission is
successful. If so the transmission is finished or else if collision has occurred it has
to resend.
Collision of first-bit in CSMA/CD
Collision and abortion in CSMA/CD
Minimum frame size
Before sending the last bit of frame, sending station must detect a collision, if any
and abort its transmission, because once the entire frame is sent the station does
not keep a copy of frame and does not monitor line for collision detection.
T_fr>= ???
Minimum frame size
In CSMA/CD we need a restriction on frame size.
Before sending the last bit of frame, sending station must detect a collision, if any
and abort its transmission, because once the entire frame is sent the station does
not keep a copy of frame and does not monitor line for collision detection.
T_fr>= 2*T_p
Example:
Example:
CSMA/CD Flow diagram
Energy level of channel
Possible energy levels: Zero (idle), normal (a station has captured the channel) ,
abnormal (collision).
So, a station that has to send or is sending frames needs to monitor the energy
level to determine channel is busy, idle or a collision has occurred.
Performance of CSMA/CD
Throughput: Higher than slotted Aloha but depends on G and persistence method.
Performance of CSMA/CD
Throughput: Higher than slotted Aloha but depends on G and persistence method.
In wired networks, received signal has almost same energy as sent signal
because of repeaters or shorter length.
In wireless since much of the sent energy is lost in transmission, the received
signal has very little energy and collision may only add 5-10% of additional energy
which is not useful for collision detection. So, we need to avoid collisions as they
cannot be detected.
CSMA/CA- Carrier sense multiple access/Collision
Avoidance
Developed for Wireless Networks.
In wired networks, received signal has almost same energy as sent signal
because of repeaters or shorter length.
In wireless since much of the sent energy is lost in transmission, the received
signal has very little energy and collision may only add 5-10% of additional energy
which is not useful for collision detection. So, we need to avoid collisions as
they cannot be detected.
Collision avoidance strategies in CSMA/CA
Three strategies:
Working: Station needs to sense the channel after each time slot. If channel is
busy, it stops the timer and restarts it when the channel is idle.
Contention window
Contention window is amount of time divided into slots. A station that is ready to
send chooses a random number of slots as wait time. No. of slots change as per
the binary exponential backoff strategy, R=0 to 2^K -1.
Working: Station needs to sense the channel after each time slot. If channel is
busy, it stops the timer and restarts it when the channel is idle. Stations with
longest waiting time gets priority.
CSMA/CA Flow diagram
Hidden node problem
Exposed node problem
Solution: RTS-CTS
A station that needs to send data sends a RTS (request to send). If the receiver is
available it sends to clear to send (CTS).
How does that help in the hidden-node and exposed node problems?
Network allocation vector (NAV)
When a station sends RTS it also includes
duration of time it needs to occupy the
channel. Stations affected by this
transmission create a timer called
Network allocation vector (NAV) that
shows how much time must pass before
stations are allowed to check the channel.
CSMA/CA Flow diagram
Controlled Access
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. We discuss
three popular controlled-access methods.
Reservation access method
A station needs to make a reservation before sending data. Time is divided into
intervals. In each interval, a reservation frame precedes data frame. If there are N
stations in a system, there are N minislots in reservation frame.
Reservation access method
A station needs to make a reservation before sending data. Time is divided into
intervals. In each interval, a reservation frame precedes data frame. If there are N
stations in a system, there are N minislots in reservation frame.
Polling access method
It works with topologies in which one device is designated as primary station and
others devices are secondary stations. All data exchanges must be through
primary.
Polling access method
It works with topologies in which one device is designated as primary station and
others devices are secondary stations. All data exchanges must be through
primary.
Primary device controls the link, secondary device follows the instructions. Primary
is the initiator of session and uses poll and select functions to prevent collisions.
Drawback:
Polling access method
It works with topologies in which one device is designated as primary station and
others devices are secondary stations. All data exchanges must be through
primary.
Primary device controls the link, secondary device follows the instructions. Primary
is the initiator of session and uses poll and select functions to prevent collisions.
The right is passed in form of a special packet called token which circulates
through the logical ring. Possession of token gives right to access the channel and
send data.
Token-passing access method
Stations are organized in form of a logical ring, i.e., each station has a
predecessor and a successor. Current station is the one accessing the channel.
The right to access the channel is passed from predecessor to current station to
successor.
The right is passed in form of a special packet called token which circulates
through the logical ring. Possession of token gives right to access the channel and
send data.
A limited time must be given for possession of token. Token movement must be
monitored and prevented from lost/destruction. It can also be used to assign
priority to the stations.
Token-passing access method
Channelization
Channelization or channel partition is a multiple-access method in which the
available bandwidth of a link is shared in time, frequency, or through code,
between different stations.
Channelization
Channelization or channel partition is a multiple-access method in which the
available bandwidth of a link is shared in time, frequency, or through code,
between different stations.
Idea: Communication using codes. Let us assume we have 4 stations 1,2,3,4 with
data d1,d2,d3,d4 and codes c1,c2,c3,c4.
CDMA: Code division multiple access
CDMA differs from FDMA in that only one channel occupies entire bandwidth of
link. It differs from TDMA in that all stations send data simultaneously, there is no
time sharing.
Idea: Communication using codes. Let us assume we have 4 stations 1,2,3,4 with
data d1,d2,d3,d4 and codes c1,c2,c3,c4. Properties of codes: