You are on page 1of 27

Module 2:

Medium Access Control


Sublayer
Medium Access Control Sublayer

 Networks can be divided into two categories:


i. those using point-to-point connections
ii. those using broadcast channels.

 In any broadcast network the key issue is how to determine who


gets to access the channel when more than one station is
competing for it.

 Broadcast channel is also known as multiaccess channel or


random access channel.

 The protocol used to determine who goes next on a multiaccess


channel belong to the sublayer of the data link layer is called
Medium Access Control (MAC) sublayer.
Medium Access Control Sublayer

 Data link layer is divided into two sublayers as:-


i. Medium Access (MAC) Sublayer
ii. Logical Link Control (LLC) Sublayer

 The LLC layer for LANs is concerned with the transmission of a link-level
protocol data unit between two stations on point-to-point links.

 The MAC sublayer is the bottom part of the data link layer and is used
particularly for broadcast or shared channel networks.
Medium
Medium Access
Access Control Sublayer
Protocol (1)
 Some means of controlling access to the transmission medium is
needed for efficient use of that capacity. This is the function of a
Medium Access Control (MAC) Protocol.

 MAC protocols enable two stations (or nodes) using a shared


communication resource to establish, maintain and terminate a
connection. Examples: Satellite, Ethernet, Cellular

 Their control info is exercised either in centralized or distributed


fashion.
 Centralized: a controller has the authority to grant access to the
network.

 Distributed: the stations collectively perform a MAC function to


determine dynamically the order in which stations transmit.
Static Channel Allocation

 Traditional way to allocate a single channel among multiple


competing users is to have static or fixed number of subchannels
that is known as Static Channel Allocation scheme.

 FDM and TDM are simple and efficient allocation mechanism for
analog and digital transmission, respectively.

 However if the number of users is large (say N) then the


transmission capacity per channel will be reduced N times.

 Conversely if the number of users is continuously varying that


also leads to wastage of resources when some of the users are idle.
Dynamic Channel Allocation

 To solve the problems of static allocation another technique with


Dynamic Channel Allocation in mostly used in LANs and MANs.

 Basic assumption are :-


 Station model : N independent stations. Once a frame has been
generated, the station is blocked, does nothing until the frame has
been successfully transmitted
 Single Channel : All stations can transmit on it and all can receive
from it.
 Collisions : When more than one station try to transmit a frame
and they overlap in time, and thus a collision has occurred. Both
the frames will be garbled and data of both the frames must be
transmitted again.
 There are no errors other than collision.
Contention Systems

 Systems in which multiple users share a common channel in a way that


can lead to conflicts are called contention systems.

 In random access or contention methods, no station is superior to


another station and none is assigned the control over another i.e no
station permits, or does not permit, another station to send.

 At each instance, a station that has data uses a procedure defined by


the protocol to decide whether to send the data on channel or not.

 Various Random Access or Multiple Access Protocols are :-


 ALOHA(by Norman Abramson in 1970)
 Carrier Sense Multiple Access Protocols
 Collision-Free Protocols
Pure ALOHA

 A station transmits a frame whenever it has data to send.


 When the frame collides with other frame(s), retransmit it by
waiting a random amount of time. The node immediately
transmits its frame completely.
 If the frame is collided it retransmits the frame again (after
completely transmitting its collided frame) with the probability p
Pure ALOHA

 What is the throughput (or efficiency) of an ALOHA channel?

 According to Poisson distribution


 if N be average number of frames created per frame time.
 G is the offered load or actual traffic density = the average number of
frames transmitted (new frames + retransmission due to collision) per
frame time.

 The System throughput (S) is calculated as average number of frames


transmitted multiplied by the probability that it will not suffer a
collision.

 If P0 is the probability that it will not suffer a collision.

 Then S= GP0 where P0 = e-2G


Pure ALOHA

 Maximum throughput occurs at G=0.5 hence S=1/2e = 0.184

 Here the channel utilization for the pure ALOHA comes out to be 18%
which is very low. That means out of 100 frames transmitted per unit
time only 18 frames will reach successfully.

 Throughput versus offered traffic for ALOHA systems.


Slotted ALOHA

 Transmission time is divided into slots.

 Stations with data to transmit will wait until the starting time of a
slot.

 Time of vulnerable period is reduced to 1 frame (slot) time.

 S is calculated as GP0 where P0 = e-G for slotted ALOHA.


Therefore S =Ge–G.

 Maximum throughput occurs at 1 and S=1/e = 0.368.

 Here the channel utilization for the slotted ALOHA comes out to
be 36% which is double that of pure ALOHA.
Slotted ALOHA

 Require synchronization devices, e.g., a central station broadcasts


the clock signal to all stations for synchronizing the slots.)
 Wasting slots nodes may be able to detect collision in less than
time to transmit packet
Slotted ALOHA

 Transmission time is divided into slots.

 Stations with data to transmit will wait until the starting time of a
slot.

 Time of vulnerable period is reduced to 1 frame per (slot) time.

 S is calculated as GP0 where P0 = e-G for slotted ALOHA.


Hence S =Ge–G.

 Maximum throughput occurs at 1 and S=1/e = 0.368.

 Hence the channel utilization for the slotted ALOHA comes out to
be 18% which is double that of pure ALOHA.
Carrier Sense Multiple Access protocols

 Carrier Sense multiple Access (CSMA) Protocols were


invented to minimize collisions and increase the performance
in which stations listen for a carrier or a transmission medium
and act accordingly i.e a node should not send if another node
is already sending data.
Carrier Sense Multiple Access protocols

 Several versions of Carrier Sense Protocols are:


1) 1-Persistent CSMA:
 When a station has data to sent, it listens to the channel and if the
channel is busy, the station continually sense the channel for the purpose
of seizing it.
 If a collision occurs, the station then waits for random period then starts
sensing the channel again.
 This protocol is also known as 1-Persistent CSMA because
whenever the channel is idle, it transmits a frame (with probability = 1).

2) Non- persistent CSMA


 When a station has data to send, it listens to the channel and if the
channel is busy, it waits for random period and then sense the channel
again.
 Better channel utilization but longer delays than 1-persistent CSMA.
Carrier Sense Multiple Access protocols

 Several versions of Carrier Sense Protocols are:

3) p-Persistent CSMA:

 It applies to slotted channel.


 When a station becomes ready to sent data, it senses the channel and if
the channel is idle, it transmits with probability p (with probability
q=1-p, it defers until next slot).
 If the next slot is idle again, it either transmits or defers again with
probability p and q respectively.

 This process is repeated until the frame is transmitted or another station


has begun transmitting.
Carrier Sense Multiple Access protocols

 Comparison of the channel utilization versus load for various random


access protocols.
CSMA with Collison Detection (CSMA/CD)protocol

 In CSMA/CD protocol if two stations sense the channel to be idle and


begin transmitting simultaneously, they both will detect the collision
almost immediately.

 Rather than finish transmitting their frames, they should stop


transmitting as soon as the collision is detected.

 This protocol is known as CSMA/CD Protocol and is widely used in the


MAC sublayer of the LANs.

 Thus after a station detects a collision occurs, it aborts its transmission


then waits for random period (using certain algorithms) and then tries
again assuming as if no other station has started transmitting in the
meantime.
CSMA/CD Model

 Model of CSMA/CD Protocol consists of three states as contention,


transmission, or idle.

 There should be no collision once a station has unambiguously


captured the channel.

 The collision can still occur during the contention period.


Collision Free Protocols

 Collision free protocols: Protocols that resolve the contention before


actual transmission i.e nodes will not collide at all.

 Some mechanism is followed to avoid collision during the contention


period of CSMA hence they are also known as CSMA- collision
Avoidance or CSMA/CA Protocol

 Mainly two protocol are to be studied under the category of CSMA/CA


Protocol
a) A Bit-Map Protocol
b) Binary Count Down Protocol
Collision Free Protocols

 In some application however contention needs to be resolved before


actual transmission and such protocols are known as collision free
protocols.

 Some mechanism is followed to avoid collision even during the


contention period of CSMA hence they are also known as CSMA-
collision Avoidance or CSMA/CA Protocol

 Following protocols are to be studied under the category of CSMA/CA.


a) A Bit-Map Protocol
b) Binary Count Down Protocol

 In these protocols N stations are considered with a unique address from


0 to N-1 wired into it.
A Bit-Map Protocol

 In the bit-map protocol the contention period is divided into exactly N


slots (here N=8 ) with zero as its default value.

 Before actual transmission, every station will be provided with the slot
and any station (say j) can announce if it has any frame to be send by
inserting a bit 1 in its j slot.

 After all N slots have passed there will be complete knowledge of all
stations those wish to transmit, and they can transmit in numerical order.
A Bit-Map Protocol

 After the last ready station has transmitted its frame another N bit
contention period will begin.

 Such category of protocols in which the desire to transmit is broadcasted


before the actual transmission are called reservation protocols.

 A problem with such a protocol is the overhead of 1 bit per station and
for a network with thousands of stations a lot of time is wasted to resolve
such contentions.

 To solve this problem another protocol known as Binary countdown


make use of the binary addresses of the stations connected to the
network.
Binary countdown Protocol

 In the binary countdown protocol every station wanting to use


the channel broadcasts its address as a binary bit string.

 To resolve contention all the addresses are compared, starting


from high order bit the station with bit 1 has priority over bit 0
hence all the stations with bit 0 will give up.
Binary countdown Protocol

 To contention is resolved as the highest-ordered station will get


the chance to transmit the data.

 Binary countdown protocol is a simple and efficient protocol but


with a property that high-numbered station have higher priority
than lower-numbered station.

 To resolve this problem a variation to this protocol includes


concept of virtual station numbers that can be circularly rotated
after every successful transmission.
Binary Exponential Backoff Algorithm

 This algorithm decides about the random amount of time a station


should wait after a collision occurs.

 The time is divided into discrete slots whose length is equal to a


worst case round-trip propagation time

 After the first collision each station waits either 0 or 1 slot times
before trying again.

 If two stations collide and each picks the same random number
they will collide again.

 After the second collision each station picks either 0,1,2 or 3 at


random and wait that number of slot times before trying again.
Binary Exponential Backoff Algorithm

 If the third collision occurs then the next time each station can
choose at random from the interval 0 to 23 -1, number of slot
times it will wait before trying again.

 In general after i collisions, a random number between the


interval 0 to 2i -1 is chosen.

 However after ten collisions have been reached, the


randomization interval is frozen at a maximum of 1023 slots.

 After 16 collisions the controller report failure back to the


computer for further recovery up to higher layer.

You might also like