Medium Access Control

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

MEDIUM ACCESS CONTROL

Data Link Layer:


This layer is the second layer of OSI System, it is a protocol layer that transfers between
adjacent network nodes in a WAN (or) between nodes on the same local area network (LAN)
segment.

Medium Access Control:

1) It is a sublayer of the data link layer (DLL) in the 7 layer OSI Network reference Model.

2) MAC is responsible for the transmission of data packets to and from the network interface
card and to from another remotely shared channel.

3) Generally, The Network lines can be divided into two categories.

(a) Point-to-Point Connection


(b) Broadcast Channels

4) The MAC Sub layer deals with the Broadcast channel links and their protocols.

5) In Broadcast network, the main (or) key issue is how to determine who gets to use the
channel, when there is competition for it.

Consider a scenario, at a meeting a people raise their hands to request permission to speak, but
when only a single channel is available, it is harder to determine who should go next.

For solving the above scenario, we are having the protocols to solve it.

a) Broadcast Channels are also called as Multi-access Channels (or) Random access channels.
b) The protocols used to determine who goes next on a multi-access channel which is belong to
the sublayer of the DLL i.e., called as MAC Sub layer.

Channel Allocation Problem:

1) The MAC sub layer which is useful (or) important in LAN Network.
2) We can classify the channels as Static and Dynamic

a) Static Channel:

It defines, where the number of users is stable and traffic is not bursty.

b) Dynamic Channel:
IT defines, when the number of users using the channel keeps on varying the channel is
considered as a dynamic channel.

Static Channel Allocation:

1) The usual way of allocating a single channel such as a telephone trunk, among multiple
competing users is to chop up its capacity by using one of the multiplexing schemes such as
FDM.( Frequency Division Multiplexing)

2) FDM- If there are N users, the bandwidth is divided into N equal sized portions, for each user
being assigned one portion, and each user has a private frequency band and there is now no
interference among users.

3) Mostly, FDM Technique is suitable for when there is only a small and fixed number of users,
and each of which has a heavy (buffered) load of traffic.

4) FDM Is simple and efficient technique for small and constant number of users, each of which
has a steady (or) a heavy load of traffic.(eg: Carriers switching offices, FM Radio Stations)
Problems with FDM:

1) If fewer than N users are currently interested in communication, some portions of spectrum
will be wasted.

2) If more than N Users want to communicate, some of them will be denied permission, if some
users with allocated frequency hardly ever transmit anything.

3) Even the number of users is N and constant, when some users are in inactivity, no one use
their bandwidth, so it is simple wasted.

These are the some problems it cannot be handled by FDM.

Bursty Traffic:

 The term burst transmission (or) data burst, it defines that any relatively high
bandwidth transmission over a short period.
 For e.g., A download might use 2M Bits/s on avg, while having “peaks” bursting up
to say 2.4M/Bits/s
 This Bursty traffic scenario, cannot handle by FDM and as well as TDM.
 Thus, none of the static channels allocation methods work well with bursty traffic.
 For bursty data traffic( peak traffic to mean traffic ratio is 1000:1)

The poor performance of static FDM can easily be seen with a simple queuing theory
Calculation.
Let us find the mean Time Delay T, to send a frame onto a channel of capacity Cbps. We assume
that the frames arrive randomly with an average arrival rate of lambda frames/sec, and the frames
vary in length with an average length of 1/μ bits. With these parameters, the service rate of the
channel is μC frames/ sec. A standard queuing theory result is

T = 1/μC − λ

Assumptions for Dynamic Channel Allocation:


There are 5 Key Assumptions: They are as Follows:

1) Independent Traffic
2) Single Channel
3) Collisions
4) Continuous (or) Slotted Time
5) Sense Assumption

 Independent Traffic:

 The model consists of N independent stations (E.g. Computers, telephones), each with a
program (or) user that generates frames for transmission.
 The expected number of frames generated in an interval of length del t is , where lamda is
a constant ( the Arrival rate of new frames)
 Once a frame has been generated, the station is blocked and dpoes nothing until the frame
has been successfully transmitted.

 Single Channel:

A single channel is available for all communication. All stations can transmit on it and all can
receive from it. The stations are assumed to be equally capable, though protocols may assign
them different roles (e.g.: Priorities)

 Collisions:

If two frames are transmitted simultaneously, (or) overlap in time, a collision occurs. All stations
can detect collisions. A collided frame must be retransmitted.

 Continuous (or) slotted Time:

 Time may be assumed continuous, in which case frame transmission can begin at any
instant.
 In second case, the time may be slotted (or) divided into discrete intervals (called
slots).
 Frame transmissions must then begin at the start of a slot.A slot contain 0,1 (or) more
frames, corresponding to an idle slot, a successful transmission (or) a collision,
respectively.
 Sense Assumption:

 Carrier sense: Stations can scene, if the channel is in use before trying to use it.
 No carrier sense: Stations cannot sense the channel before trying to use it.

These are the 5 Assumptions which is helpful for analysing (or) using the multiple access
methods (or) protocols.

Multiple Access Protocols:

 ALOHA is a system for coordinating and arbitrating access to a shared communication


network channel.
 It was developed in the 1970’s by Norman Abramson at the university by Hawaii.
 This system is used for ground based radio broadcasting, but the system has been
implemented in satellite communication systems.
 Radio Broadcasting is a unidirectional wireless transmission over radio waves.
 A shared communication system like ALOHA requires a method of handling collisions
that occur when two (or) more systems attempt to transmit on the channel at the same
time.
 In the ALOHA system, a node transmits whenever data is available to send. If another
node transmits at the same time, a collision occurs and the frames that were transmitted
are lost.
 ALOHA means “HELLO” ALOHA is a multiple access protocol at DLL and proposes
how multiple terminals access the medium without collision.

There are two different versions/Types of ALOHA:


1) Pure ALOHA
2) Slotted ALOHA

Pure ALOHA:

 In pure ALOHA, the station 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 a specified time, the station assumes that the
frame 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 to
avoid more collisions.
 In given fig, there are 4 stations that contended with one another for access to shared
channel. All these stations are transmitting frames. Some of these frames collide because
multiple frames are in contention for the shared channel.
 Only two frames, frame 1.1 and frame 2.2 survive. All other frames are destroyed.
 Whenever two frames try to occupy the channel at the same time, there will be collision
and both will be damaged. If first bit of a new frame overlaps with just last bit of a frame
almost finished, both frames will be totally destroyed and both will have to be
retransmitted.

Slotted ALOHA:

 Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of
collision in pure ALOHA are very high.
 In slotted ALOHA, the time of the shared channel is divided into discrete intervals called
the slots.
 The stations can send a frame only at the beginning of the slot and only one frame is sent
in each slot.
 In slotted ALOHA, if any station is not able to place the frame onto the channel at the
beginning of the slot i.e. it misses the time slot then the station has to wait until the
beginning of the next time slot.
 In slotted ALOHA, there is still a possibility of collision if two stations try to send at the
beginning of the same time slot as shown in fig.
 Slotted ALOHA still has an edge over pure ALOHA as chances of collision are reduced
to one-half.
Carrier Sense Multiple Access Protocols:

Protocols in which stations listen for a carrier (transmission) and acts accordingly are called
carrier sense protocols.

Persistent CSMA and Non Persistent CSMA:

Persistent CSMA:

 This is a simple CSMA Scheme, in which when a station has data to send, it first listens
to channel to see whether anyone else transmitting at the moment, if it finds that channel
is idle, the station sends the data.
 If the channel is busy, the station waits until the channel becomes idle and then transmits
a frame.
 If any collisions occur at station waits a random amount of time and starts all over again.
 This protocol is named as 1-persistant because the station transmits with a probability of
1 when the channel is idle.
 If propagation delay is small, collisions happening are small. If delay is large then effect
becomes more and performance gets worse.

Non-Persistent CSMA:

 In this protocol, a station senses the channel when it requires to sends frame, if no one
else is sending then the station begins to send.
 If the channel is in use, the station doesn’t sense the channel continuously to detect the
end of previous transmission for seizing it immediately.
 Instead of it, the station waits a random period of time and then repeats the algorithm for
better channel utilization, but has longer delays than 1-persistent.

P-Persistent CSMA:

 When a station becomes ready to send it senses the channel, if the channel is idle
transmits with a probability P and with a probability q=1-p it defers until next slot.
 If the slot is idle, station either transmits or defers again with probabilities p and q.
 This process continues until a frame gets transmitted or till another station begins
transmitting.
 If there is a collision, station waits a random amount of time and starts again.

CSMA with Collision Detection:

 The persistent and non-persistent protocols of CSMA are an improvement over ALOHA
as they ensure that no station begins transmitting while the channel is busy.
 If two stations sense the channel to be idle and transmit at same time their signals collide.
 There is an improvement in these protocols that the stations can quickly detect the
collision and stops transmitting immediately which same time and bandwidth.
 Here, the CSMA with collision Detection (CSMA/CD) is the basis of Ethernet LAN,
where the collision detection is an analog process.
 The stations hardware listens to the channel while it is transmitting, if the signal is putting
out is different from signal, it understands that collision is occurring.
 Usually the received signal must not be small compared to transmitted signal, which is
difficult for wireless as signals received are 1000000 times weaker than transmitted
signals.
 In the following figure of a CSMA/CD uses a conceptual Model.

 At ‘to’ a station has finished its transmission of frame and any other station may transmit
now.
 If two or more stations transmit at same time there will be collision.
 If the station detects the collision, it aborts its transmission, waits a random period of
time and then tries to transmit assuming that no station has started transmitting.
 So, this model CSMA/CD consists of alternating contention and transmission periods
along with idle periods when all the stations are quite.
 For suppose in the contention algorithm, two stations begins transmitting at same time to,
how long it takes the stations to realize that they have collided?
 The minimum time to detect the collision is the time it takes the signal to propagate from
one station to the other.
 One might assume that a station which did not detect the collision for a time equal to the
full cable propagation time after starting its transmission has seized the cable.
 Seized means that all other stations knows that it is transmitting and will not interfere.

Collision free protocols:

 Some protocols that resolve the contention for the channel without any collisions at all
not even during the contention period.
 In the CSMA/CD, let’s suppose that there are exactly N stations each with a unique
address from 0 to N-1 “wired” into it.
 It doesn’t matter even though some stations are inactive and assume that propagation
delay is negligible. The basic question that arises is: which station gets the channel after a
successful transmission?

A Bit-Map Protocol:

 In collision free protocols the first protocol is the basic bit-map method.
 Each contention period consists of exactly N slots. If station 0 has a frame to send it
transmits a 1 bit during the zeroth slot. No other station is allowed to transmit during this
slot.
 In general case is a station j transmits a frame by inserting a 1 bit into slot j, after ALL N
slots have passed by each station gains a knowledge of which station wants to transmit.
 At that point of they begin to transmit in a numerical order and there will be no chance of
collisions.

Fig: The basic bit-map protocol

 After the last ready station has transmitted its frame, all the stations can monitor as well
another N bit contention period begins.
 If a station becomes ready just after its bit slot has passed by it is out of luck and must be
silent until every station has had a chance and the bit map has come around again.
 Protocols like this which desire to transmit is broadcast before the actual transmission are
called reservation protocols.
 The problem with this bit-map protocol is that the overhead is 1 bit per station so it
doesn’t scale well to networks with thousands of stations.

Token Passing:

 As the bit-map protocol lets every station to transmit a frame in an predefined order.
Now, the token ring does the same things by passing a small message called token from
one station to other in the same predefined order.
 Token represents a permission to send the frame.
 A station on receiving the token transmits the frame that is queued and later it passes the
token to next station, if any station doesn’t have frame to send it passes the token simply.
 In this token ring protocol, the topology of the network defines the order in which station
sends and are connected in a single ring fashion.
 Since passing the token to next station consists of receiving the token in one direction and
transmitting in other direction where the frames are transmitted in direction of token.
 This goes in a circulating fashion in the ring and reaches the destination station.
 To stop the frame circulating, stations need to remove it from the ring where only the
station that has sent the frame or the station that was recipient of the frame can do so.

 In the token passing there is no physical ring but channels are connected to a single long
bus. Where each station uses the bus to transmit the token to next station in a predefined
sequence, this protocol is called token bus.
Binary countdown:

 A station wanting to use the channel broadcasts its address as a binary bit string starting
with the highest bit.
 All the addresses are assumed to be of same length and the bits in each address position
from different stations are Boolean ORed together. So this protocol is a Binary
countdown protocol.

 To avoid conflicts, an arbitration rule must be applied: as soon as a station sees that a
high-order bit position that is 0 in its address has been overwritten with a 1, it gives up.
 For example, if stations 0010, 0100, 1001, and 1010 are all trying to get the channel, in
the first bit time the stations transmit 0, 0, 1, and 1, respectively.
 These are ORed together to form a 1. Stations 0010 and 0100 see the 1 and know that a
higher-numbered station is competing for the channel, so they give up for the current
round.
 Stations 1001 and 1010 continue. The next bit is 0, and both stations continue. The next
bit is 1, so station 1001 gives up.
 The winner is station 1010 because it has the highest address. After winning the bidding,
it may now transmit a frame, after which another bidding cycle starts.

You might also like