lesson 8 Medium Control Methods
lesson 8 Medium Control Methods
Medium access control/multiple access control is a protocol used in shared transmission media
Broadcast link used in LAN consists of multiple sending and receiving nodes connected to or use a single
shared link.
Problem: When two or more nodes transmit at the same time, their frames will collide and the link
bandwidth is wasted during collision
How to coordinate the access of multiple sending/receiving nodes to the shared link is the challenge.
These protocols are called Medium or Multiple Access Control (MAC) Protocols belong to a sublayer of
the data link layer called MAC (Medium Access Control)
(i) Determining when a station can use the shared link (medium)
(ii) What a station should do when the link is busy
(iii) What the station should do when it is involved in collision
ALOHA: ALOHA is a system for coordinating and arbitrating access to a shared communication Networks
channel. It was developed in the 1970s by Norman Abramson and his colleagues at the University of
Hawaii. The original system was meant for ground based radio broadcasting, but the system has been
implemented in satellite communication systems.
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 destroyed. However, a node can listen to broadcasts
on the medium, even its own, and determine whether the frames were transmitted.
ALOHA means "Hello". ALOHA is a multiple access protocol at the data link layer and proposes how
multiple terminals access the medium without interference or collision. In 1972 Roberts developed a
protocol that would increase the capacity of ALOHA two fold. The Slotted ALOHA protocol involves
dividing the time interval into discrete slots and each slot interval corresponds to the time period of one
frame. This method requires synchronization between the sending nodes to prevent collisions.
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.
Figure shows an example of frame collisions in pure ALOHA.
• In fig there are four 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 a collision and
both will be damaged. If first bit of a new frame overlaps with just the last bit of a frame almost
finished, both frames will be totally destroyed and both will have to be retransmitted.
G = Average number of frames generated by the system (all stations) during one frame transmission
time
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 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.
0.3
Slotted Aloha
0.2
0.1
Pure Aloha
Explanation:
CSMA is a network access method used on shared network topologies such as Ethernet to control access
to the network. Devices attached to the network cable listen (carrier sense) before transmitting. If the
channel is in use, devices wait before transmitting. MA (Multiple Access) indicates that many devices can
connect to and share the same network. All devices have equal access to use the network when it is
clear.
CSMA protocol was developed to overcome the problem found in ALOHA i.e. to minimize the chances
of collision, so as to improve the performance. CSMA protocol is based on the principle of 'carrier sense'.
The station senses the carrier or channel before transmitting a frame. It means the station checks the
state of channel, whether it is idle or busy.
Even though devices attempt to sense whether the network is in use, there is a good chance that two
stations will attempt to access it at the same time. On large networks, the transmission time between
one end of the cable and another is enough that one station may access the cable even though another
has already just accessed it.
The chances of collision still exist because of propagation delay. The frame transmitted by one station
takes some time to reach other stations. In the meantime, other stations may sense the channel to be
idle and transmit their frames. This results in the collision.
Comparison of the channel utilization versus load for various random access protocols
(i) I-persistent CSMA
• In this method, station that wants to transmit data continuously senses the channel to check
whether the channel is idle or busy.
• If the channel is busy, the station waits until it becomes idle.
• When the station detects an idle-channel, it immediately transmits the frame with probability 1.
Hence it is called I-persistent CSMA.
• This method has the highest chance of collision because two or more stations may find channel to
be idle at the same time and transmit their frames.
• When the collision occurs, the stations wait a random amount of time and start all-over again.
Drawback of I-persistent
• The propagation delay time greatly affects this protocol. Let us suppose, just after the station 1
begins its transmission, station 2 also became ready to send its data and senses the channel. If the
station 1 signal has not yet reached station 2, station 2 will sense the channel to be idle and will
begin its transmission. This will result in collision.
Even if propagation delay time is zero, collision will still occur. If two stations became ready in the
middle of third station's transmission, both stations will wait until the transmission of first station ends
and then both will begin their transmission exactly simultaneously. This will also result in collision.
Advantage of non-persistent
• It reduces the chance of collision because the stations wait a random amount of time. It is
unlikely that two or more stations will wait for same amount of time and will retransmit at the
same time.
• Disadvantage of non-persistent
• It reduces the efficiency of network because the channel remains idle when there may be
stations with frames to send. This is due to the fact that the stations wait a random amount of
time after the collision.
(iii) p-persistent CSMA
• This method is used when channel has time slots such that the time slot duration is equal to or
greater than the maximum propagation delay time.
• Whenever a station becomes ready to send, it senses the channel.
• If channel is busy, station waits until next slot.
• If channel is idle, it transmits with a probability p.
• With the probability q=l-p, the station then waits for the beginning of the next time slot.
• If the next slot is also idle, it either transmits or waits again with probabilities p and q.
• This process is repeated till either frame has been transmitted or another station has begun
transmitting.
• In case of the transmission by another station, the station acts as though a collision has occurred
and it waits a random amount of time and starts again.
Advantage of p-persistent
• It reduces the chance of collision and improves the efficiency of the network.
• CSMA/CD is a protocol in which the station senses the carrier or channel before transmitting
frame just as in persistent and non-persistent CSMA. If the channel is busy, the station waits.
• Additional feature in CSMA/CD is that the stations can detect the collisions. The stations abort
their transmission as soon as they detect a collision. In CSMA this feature is not present. The
stations continued their transmission even though they find that the collision has occurred. This
leads to the wastage of channel time.
• However this problem is handled in CSMA/CD. In CSMA/CD, the station that places its data onto
the channel after sensing the channel continues to sense the channel even after the data
transmission. If collision is detected, the station aborts its transmission and waits for
predetermined amount of time & then sends its data again.
• As soon as a collision is detected, the transmitting station releases a jam signal.
• Jam signal will alert the other stations. The stations are not supposed to transmit immediately
after the collision has occurred. Otherwise there is a possibility that the same frames would
collide again.
• After some back-off delay time the stations will retry the transmission. If the collision occurs
again then the back off delay time is increased progressively.
• Therefore the CSMA/CD method consists of alternating transmission period and collisions with
idle periods when none of the stations is transmitting.
The frame format specified by IEEE 802.3 standard contains following fields.
1. Preamble: It is seven bytes (56 bits) that provides bit synchronization. It consists of
alternating Os and 1s. The purpose is to provide alert and timing pulse.
2. Start Frame Delimiter (SFD): It is one byte field with unique pattern: 10 10 1011. It
marks the beginning of frame.
3. Destination Address (DA): It is six byte field that contains physical address of packet's
destination.
4. Source Address (SA): It is also a six byte field and contains the physical address of source
or last device to forward the packet (most recent router to receiver).
5. Length: This two byte field specifies the length or number of bytes in data field.
6. Data: It can be of 46 to 1500 bytes, depending upon the type of frame and the length of
the information field.
7. Frame Check Sequence (FCS): This for byte field contains CRC for error detection.
(iv) CSMA/CD Procedure:
Explanation:
• The station that has a ready frame sets the back off parameter to zero.
• Then it senses the line using one of the persistent strategies.
• If then sends the frame. If there is no collision for a period corresponding to one complete
frame, then the transmission is successful.
• Otherwise the station sends the jam signal to inform the other stations about the collision.
• The station then increments the back off time and waits for a random back off time and sends
the frame again.
• If the back off has reached its limit then the station aborts the transmission.
• CSMA/CD is used for the traditional Ethernet.
• CSMA/CD is an important protocol. IEEE 802.3 (Ethernet) is an example of CSMA/CD. It is an
international standard.
• The MAC sublayer protocol does not guarantee reliable delivery. Even in absence of collision the
receiver may not have copied the frame correctly.
CSMA/CA protocol is used in wireless networks because they cannot detect the collision so the only
solution is collision avoidance.
CSMA/CA Procedure:
(i) Reservation
(ii) Polling
(iii) Token Passing
(i) Reservation
• Stations take turns transmitting a single frame at a full rate ( R ) bps
• Transmissions are organized into variable length cycles
• Each cycle begins with a reservation interval that consists of (N) mini-slots. One mini-slot for
each of the N stations
• When a station needs to send a data frame, it makes a reservation in its own mini-slot.
• By listening to the reservation interval, every station knows which stations will transfer frames,
and in which order.
• The stations that made reservations can send their data frames after the reservation frame.
(ii) Polling
Stations take turns accessing the medium
Centralized polling
• One device is assigned as primary station and the others as secondary stations
• All data exchanges are done through the primary
• When the primary has a frame to send it sends a select frame that includes the address of the
intended secondary
• When the primary is ready to receive data it send a Poll frame for each device to ask if it has
data to send or not. If yes, data will be transmitted otherwise NAK is sent.
• Polling can be done in order (Round-Robin) or based on predetermined order
Distributed polling
Listen state: Listen to the arriving bits and check the destination address to see if it is its own address. If
yes the frame is copied to the station otherwise it is passed through the output port to the next station.
Transmit state: station captures a special frame called free token and transmits its frames. Sending
station is responsible for reinserting the free token into the ring medium and for removing the
transmitted frame from the medium.
Bits are copied to the output bits with a one bit delay
listen transmit
mode mode
input 1 bit output
from to
ring
delay ring
delay
to from to from
station station station station
3. Channelization
It is a multiple-access method in which the available bandwidth of a link is shared in time, frequency, or
through code, between different stations. In this section, we discuss three channelization protocols.
Summary
Three broad classes:
• Channel Partitioning – divide channel into smaller “pieces” (time slots, frequency, code) –
allocate piece to node for exclusive use
• Random Access – channel not divided, allow collisions – “recover” from collisions
• “Taking turns” – nodes take turns, but nodes with more to send can take longer turns
http://ecomputernotes.com/computernetworkingnotes/communication-networks/media-access-
control