0% found this document useful (0 votes)
14 views

lesson 8 Medium Control Methods

This lesson covers Medium Access Control (MAC) methods essential for managing shared transmission media in networks. It explains the significance of MAC, various types of protocols including ALOHA, CSMA, CSMA/CD, and CSMA/CA, and their mechanisms to minimize collisions and optimize bandwidth usage. The lesson also details the operational procedures and advantages of each protocol, highlighting their applications in both wired and wireless networks.

Uploaded by

lucbrouillard381
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

lesson 8 Medium Control Methods

This lesson covers Medium Access Control (MAC) methods essential for managing shared transmission media in networks. It explains the significance of MAC, various types of protocols including ALOHA, CSMA, CSMA/CD, and CSMA/CA, and their mechanisms to minimize collisions and optimize bandwidth usage. The lesson also details the operational procedures and advantages of each protocol, highlighting their applications in both wired and wireless networks.

Uploaded by

lucbrouillard381
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

LESSON 8 Medium Control Methods

By the end of the lesson the learner should be able to:

(i) Explain the importance of medium access control in shared media


(ii) Explain the different types of Medium Control Methods
(iii) Describe the different types of CSMA
(iv) Distinguish between CSMA/CD and CSMA/CA

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.

Example of Broadcast Links.

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.

Solution: We need a protocol to coordinate the transmission of the active nodes

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)

What is expected from Multiple Access Protocols?

Main task is to minimize collisions in order to utilize the bandwidth by:

(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

Category of Multiple - access protocol


1. Random Access Methods
It’s used in shared broadcast links

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.

There are two different versions/types of ALOHA:

(i) Pure ALOHA

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.

The throughput (S) for pure ALOHA is S = G × e −2G .

The maximum throughput Smax = 0.184 when G= (1/2).

G = Average number of frames generated by the system (all stations) during one frame transmission
time

(ii) 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 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.

The throughput for slotted ALOHA is S = G × e−G.

The maximum throughput Smax = 0.368 when G = 1.


0.4

0.3

Slotted Aloha
0.2

0.1
Pure Aloha

0.5 1.0 1.5 2.0


G = offered load rate= new frames+ retransmitted
= Total frames presented to the link per the
transmission time of a single frame
Protocol Flow Chart for ALOHA:

Fig. shows the protocol flow chart for ALOHA.

Explanation:

• A station which has a frame ready will send it.


• Then it waits for some time.
• If it receives the acknowledgement then the transmission is successful.
• Otherwise the station uses a backs-off strategy, and sends the packet again.
• After many times if there is no acknowledgement then the station aborts the idea of
transmission.

Carrier Sensed Multiple Access (CSMA):

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.

There Are Three Different Type of CSMA Protocols

(i) I-persistent CSMA


(ii) Non- Persistent CSMA
(iii) p-persistent CSMA

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.

(ii) Non-persistent CSMA


• In this scheme, if a station wants to transmit a frame and it finds that the channel is busy (some
other station is transmitting) then it will wait for fixed interval of time.
• After this time, it again checks the status of the channel and if the channel is free it will transmit.
• A station that has a frame to send senses the channel.
• If the channel is idle, it sends immediately.
• If the channel is busy, it waits a random amount of time and then senses the channel again.
• In non-persistent CSMA the station does not continuously sense the channel for the purpose of
capturing it when it detects the end of previous transmission.

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 entire scheme of CSMA/CD is depicted in the fig.

Frame format of CSMA/CD

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:

Fig. Shows a flow chart for the CSMA/CD protocol.

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 avoids the collisions using three basic techniques.


(i) Inter-frame space
(ii) Contention window
(iii) Acknowledgements

1. Inter-frame Space (IFS)


(i) Whenever the channel is found idle, the station does not transmit immediately. It waits for a
period of time called inter-frame space (IFS).
(ii) When channel is sensed to be idle, it may be possible that same distant station may have
already started transmitting and the signal of that distant station has not yet reached other
stations.
(iii) Therefore the purpose of IFS time is to allow this transmitted signal to reach other stations.
(iv) If after this IFS time, the channel is still idle, the station can send, but it still needs to wait a time
equal to contention time.
(v) IFS variable can also be used to define the priority of a station or a frame.
2. Contention Window
(i) Contention window is an amount of time divided into slots.
(ii) A station that is ready to send chooses a random number of slots as its wait time.
(iii) The number of slots in the window changes according to the binary exponential back-off
strategy. It means that it is set of one slot the first time and then doubles each time the station
cannot detect an idle channel after the IFS time.
(iv) This is very similar to the p-persistent method except that a random outcome defines the
number of slots taken by the waiting station.
(v) In contention window the station needs to sense the channel after each time slot.
(vi) If the station finds the channel busy, it does not restart the process. It just stops the timer &
restarts it when the channel is sensed as idle.
3. Acknowledgement
(i) Despite all the precautions, collisions may occur and destroy the data.
(ii) The positive acknowledgment and the time-out timer can help guarantee that receiver has
received the frame.

CSMA/CA Procedure:

Fig. Shows the flow chart explaining the principle of CSMA/CA.

• This is the CSMA protocol with collision avoidance.


• The station ready to transmit, senses the line by using one of the persistent strategies.
• As soon as it find the line to be idle, the station waits for an IFG (Inter-frame gap) amount of
time.
• If then waits for some random time and sends the frame.
• After sending the frame, it sets a timer and waits for the acknowledgement from the receiver.
• If the acknowledgement is received before expiry of the timer, then the transmission is
successful.
• But if the transmitting station does not receive the expected acknowledgement before the timer
expiry then it increments the back off parameter, waits for the back off time and re-senses the
line.
2. Controlled Access or Scheduling
Provides in order access to shared medium so that every station has chance to transfer (fair protocol)

Eliminates collision completely

Three methods for controlled access:

(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

Two models: Centralized and distributed polling

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

• No primary and secondary


• Stations have a known polling order list which is made based on some protocol
• station with the highest priority will have the access right first, then it passes the access right to
the next station (it will send a pulling message to the next station in the pulling list), which will
passes the access right to the following next station, …

Primary is sending to Secondary


Secondary is sending to Primary

(iii) Token passing


Station Interface is in two states:

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.

(i) Frequency-Division Multiple Access (FDMA)


(ii) Time-Division Multiple Access (TDMA)
(iii) Code-Division Multiple Access (CDMA)

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

You might also like