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

Course Name & Code: CSL803 Computational Lab-II

Experiment No.: 05
Experiment Title: To implement and compare MAC layer protocol.

Student Roll No. & Name: 280/Rohan Deshmukh


Date of Performance: Date of Submission:
Course /Lab Outcome:

Assessment
Sr. Parameters for Assessment Marks Rubrics
No.
Practical Performance / Above Average Average Below Average
1 Active Participation (03) (02) (01)
(03 Marks)
2 Report Presentation Above Average Average Below Average
(02 Marks) (02) (01) (00)
Understanding Above Average Average Below Average
3 (03 Marks) (03) (02) (01)
Regularity in submission Above Average Average Below Average
4 (02 Marks) (02) (01) (00)

Total Marks (10):

Teacher’s Name & Signature Date:


EXPERIMENT NO: 05

Aim: To implement and compare MAC layer protocols.

Theory: The fundamental task of any MAC protocol is to regulate the access of a number of
nodes to a shared medium in such a way that certain application-dependent performance
requirements are satisfied. Medium Access Control (MAC) protocols is the first protocol layer
above the Physical Layer (PHY). The Media Access Control (MAC) data communication
Networks protocol sub-layer, also known as the Medium Access Control, is a sub-layer of the data
link layer specified in the seven-layer OSI model. The medium access layer was made necessary
by systems that share a common communications medium. Typically these are local area networks.
The MAC layer is the "low" part of the second OSI layer, the layer of the "data link". In fact, the
IEEE divided this layer into two layers "above" is the control layer the logical connection (Logical
Link Control, LLC) and "down" the control layer The medium access (MAC).

● Requirements and design constraints for wireless MAC protocols


The most important performance requirements for MAC protocols are throughput efficiency,
stability, fairness, low access delay, and low transmission delay, as well as a low overhead.
Overhead of MAC protocols: Per packet overhead Collision-Multiple sender wants to talk.
Collisions can happen if the MAC protocol allows two or more nodes to send packets at the same
time.
● Overhead of MAC protocols
Per packet overhead Collision-Multiple sender wants to talk. Collisions can happen if the MAC
protocol allows two or more nodes to send packets at the same time.

● Hidden-terminal problem
The hidden-terminal problem occurs specifically for the class of Carrier Sense Multiple Access
(CSMA) protocols, where a node senses the medium before starting to transmit a packet.
● Exposed-terminal scenario
In wireless networks, when a node is prevented from sending packets to other nodes because of a
neighboring transmitter is known as the exposed node problem.

The exposed terminal analogy is described as follows: B sends to A, C wants to send to another
terminal D not A or B C senses the carrier and detects that the carrier is busy. C postpones its
transmission until it detects the medium as being idle again But A is outside radio range of C,
waiting is not necessary C is “exposed” to B Tip: Hidden terminals cause collisions, where as
Exposed terminals causes unnecessary delay.

● Important classes of MAC Protocol


A huge number of (wireless) MAC protocols have been devised during the last thirty years. They
can be roughly classified into the following classes.
1. fixed assignment protocols
2. Demand assignment protocols
3. Random access protocols.

fixed assignment protocols : In fixed-assignment schemes, each communicating node is assigned


a frequency band in FDMA systems or a time slot in TDMA systems.

Demand assignment protocols : Demand Assigned Multiple Access (DAMA) is a protocol used
in satellite communications, particularly Very Small Aperture Terminal (VSAT) systems.
Random access protocols : In random access or contention methods, no station is superior to
another station and none is assigned the control over another. Transmission is random among the
stations. That is why these methods are called random access.

Balance of requirements
The balance of requirements is different from traditional (wireless) networks. Additional
requirements come up, first and foremost, the need to conserve energy. Important requirements for
MAC protocols scalability. The need for scalability is evident when considering very dense sensor
networks with dozens or hundreds of nodes in mutual range.

Limitations of the MAC layer


1.Collisions -Multiple sender wants to talk.
2.Overhearing-The wireless medium is a broadcast medium and all the source’s neighbors that are
in receive state hear a packet and drop it when it is not destined to them; these nodes overhear the
packet.
3.Protocol overhead -RTS and CTS packets or request packets in demand assignment protocols,
and furthermore by per-packet overhead like packet headers and trailers.
4.Idle listening –active listening to an redundant channel. A node being in idle state is ready to
receive a packet but is not currently receiving anything.
Following Protocols are used by Medium Access Layer :
● ALOHA
ALOHA is a system for coordinating and arbitrating access to a shared communication channel. It
was developed in the 1970s at the University of Hawaii. The original system used terrestrial 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 lost.
However, a node can listen to broadcasts on the medium, even its own, and determine whether the
frames were transmitted.

● 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.
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.

● CSMA/CD (Carrier Sense Multiple Access/Collision Detection)


CD (collision detection) defines what happens when two devices sense a clear channel, then
attempt to transmit at the same time. A collision occurs, and both devices stop transmission, wait
for a random amount of time, and then retransmit. This is the technique used to access the 802.3
Ethernet network channel. This method handles collisions as they occur, but if the bus is constantly
busy, collisions can occur so often that performance drops drastically. It is estimated that network
traffic must be less than 40 percent of the bus capacity for the network to operate efficiently. If
distances are long, time lags occur that may result in inappropriate carrier sensing, and hence
collisions.
● CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance)
In CA collision avoidance), collisions are avoided because each node signals its intent to transmit
before actually doing so. This method is not popular because it requires excessive overhead that
reduces performance.

Output:
Implementation of MAC layer protocol

CSMA/CD (Carrier Sense Multiple Access/Collision Detection)

Conclusion: Thus, we have implemented and compare the parameters of MAC layer protocols.

You might also like