Medium Access Control
Medium Access Control
Protocols
Data link layer divided into two functionality-oriented sublayers
Pure ALOHA:
1. Each station sends a frame whenever is has a frame to send
2. One channel to share, possibility of collision between frames from different stations
There are four stations that contend with one
another for access to shared channel.
The above figure that each station sends two
frames there are a total of eight frames on the
shared medium . Some of these frames are in
contention for the shared channel.
The pure Aloha protocol relies on ack from the
receiver when a user sends a frame it expects the
receiver to send an ack.If the ack does not arrive
after a time out period the station assume that the
frame has been destroyed and resends the frame.
Whenever two frames try to occupy the channel at the
same time there will be a collision and both will be
garbled. If the first bit of new frame overlaps with just
the last bit of a frame almost finished both frames will
be totally destroyed and both will have to retransmitted
later.
If all users try to resend their frames after the time-out
the frames will collide again. Pure ALOHA dictate that
when the time-out period passes each user waits a
random amount of time before resending its frame. The
randomness will help to avoid more collision.This time
is called as back-off time(tb)
Procedure for pure ALOHA protocol
The procedure for pure aloha
The time out period is equal to the maximum
possible round trip propagation delay which is
twice the amount of time required to send a
frame between the two most widely separated
station (2* Tp)
Let all the packets have the same length and
each require one time unit for transmission (tp)
consider any user to send packet A at time t0
and t0+tp the end of packet B will collide with
the beginning of packets A since in pure
ALOHA packets a station does not listen to the
channel before transmitting its has no way of
knowing that above frame was already under
way.
2.CSMA(Carrier Sense Multiple Access )
CSMA requires that each station first listen to
the medium before sending.
CSMA is based on the principle “sense before
transmit” or listen before talk.
CSMA can reduce the possibility of collison
but it cannot eliminate it .
A space and time model of a CSMA network
stations are connected to a shared channel.
Space/time model of the collision in CSMA
1-Persistent-after station
finds the line idle, send
its frame
Nonpersistent-senses the
line; idle: sends
immediately; not idle:
waits random amount of
time and senses again
p-Persistent-the channel
has time slots with
duration equal to or
greater than max
propagation time
Flow diagram for three persistence methods
3.CSMA/CD:
CSMA/CD is the most commonly used protocol for
LANs CSMA/CD specification were developed jointly
by Digital Equipment Corporation (DEC), Intel and
Xerox . This network is called as Ethernet The IEEE
802.3 CSMA/CD standard for LAN is based on Ethernet
specification.
The basic protocol is that a station is sending with a
message to send must monitor the channel to see if any
other station is sending if another station is sending the
second station must wait, until the sending has finished.
Then it may send its message immediately. The term
“carrier sense “ indicates this “ listening before
transmitting “ behaviour
If two or more stations have messages to send
at the same time and they are separated by
significant distance on the bus/channel each
may begin transmitting at roughly the same
time without
Collision of the first bit in CSMA/CD
IFS- In CSMA/CA, the IFS can also be used to define the priority of a station or a frame.
Acknowledgment- Positive acknowledgment and time out timer guarantee receiver has
received the frame
Inter-frame space: Collision 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.
In csma/cd the ifs can also be used to define the
priority of a station of a frame . A station that is
assigned shorter IFS has a higher priority
Contention Window: Contention window are an
amount of time divided into slots . A station that is
ready to send choose a random number of slots as
its wait time.
Station set one slot for the first time and then
double each time the station cannot detect an idle
channel after the IFS time.
In this method the station needs to senses the
channel after each time slots
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 method gives the priority to the station
with the longest waiting time.
Acknowledgements: The data may be
corrupted during the transmission . The
positive acknowledgement and the out can help
guarantee that the receiver the frame
Flow diagram for CSMA/CA
2 CONTROLLED ACCESS
Polling – one device as primary station and the other device as secondary station
Select – primary device wants to send data to secondary device, secondary device
gets ready to receive
Poll – primary device solicits (ask) transmissions from secondary devices
3. Token passing – stations in network organized in a logical ring –
predecessor and successor
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
Logical ring and physical topology in token-passing access method
III. CHANNELIZATION