Medium Access Control Sub Layer Protocol
Medium Access Control Sub Layer Protocol
When a sender and receiver have a dedicated link to transmit data packets, the data link control is
enough to handle the channel. Suppose there is no dedicated path to communicate or transfer the
data between two devices. In that case, multiple stations access the channel and simultaneously
transmits the data over the channel. It may create collision and cross talk. Hence, the multiple
access protocol is required to reduce the collision and avoid crosstalk between the channels.
Following are the types of multiple access protocol that is subdivided into the different process:
Note: Controlled Access and Channelization Protocols are not considered for your Syllabus
Following are the different methods of random-access protocols for broadcasting frames on
the channel.
o Aloha
o CSMA
Dept-CSE Page 1
MODULE-2 DATA LINK LAYER
o CSMA/CD
o CSMA/CA
It is designed for wireless LAN (Local Area Network) but can also be used in a shared medium
to transmit data. Using this method, any station can transmit data across a network
simultaneously when a data frameset is available for transmission.
Aloha Rules
Pure Aloha
Whenever data is available for sending over a channel at stations, we use Pure Aloha. In pure
Aloha, when each station transmits data to a channel without checking whether the channel is
idle or not, the chances of collision may occur, and the data frame can be lost. When any station
transmits the data frame to a channel, the pure Aloha waits for the receiver's acknowledgment. If
it does not acknowledge the receiver end within the specified time, the station waits for a random
amount of time, called the backoff time (Tb). And the station may assume the frame has been
lost or destroyed. Therefore, it retransmits the frame until all the data are successfully transmitted
to the receiver.
Dept-CSE Page 2
MODULE-2 DATA LINK LAYER
As we can see in the figure above, there are four stations for accessing a shared channel and
transmitting data frames. Some frames collide because most stations send their frames at the
same time. Only two frames, frame 1.1 and frame 2.2, are successfully transmitted to the receiver
end. At the same time, other frames are lost or destroyed. Whenever two frames fall on a shared
channel simultaneously, collisions can occur, and both will suffer damage. If the new frame's
first bit enters the channel before finishing the last bit of the second frame. Both frames are
completely finished, and both stations must retransmit the data frame.
Slotted Aloha
The slotted Aloha is designed to overcome the pure Aloha's efficiency because pure Aloha has a
very high possibility of frame hitting. In slotted Aloha, the shared channel is divided into a fixed
time interval called slots. So that, if a station wants to send a frame to a shared channel, the
frame can only be sent at the beginning of the slot, and only one frame is allowed to be sent to
each slot. And if the stations are unable to send data to the beginning of the slot, the station will
have to wait until the beginning of the slot for the next time. However, the possibility of a
collision remains when trying to send a frame at the beginning of two or more station time slot.
Dept-CSE Page 3
MODULE-2 DATA LINK LAYER
It is a carrier sense multiple access based on media access protocol to sense the traffic on a
channel (idle or busy) before transmitting the data. It means that if the channel is idle, the station
can send data to the channel. Otherwise, it must wait until the channel becomes idle. Hence, it
reduces the chances of a collision on a transmission medium.
1-Persistent: In the 1-Persistent mode of CSMA that defines each node, first sense the shared
channel and if the channel is idle, it immediately sends the data. Else it must wait and keep track
of the status of the channel to be idle and broadcast the frame unconditionally as soon as the
channel is idle.
Non-Persistent: It is the access mode of CSMA that defines before transmitting the data, each
node must sense the channel, and if the channel is inactive, it immediately sends the data.
Otherwise, the station must wait for a random time (not continuously), and when the channel is
found to be idle, it transmits the frames.
Dept-CSE Page 4
MODULE-2 DATA LINK LAYER
O- Persistent: It is an O-persistent method that defines the superiority of the station before the
transmission of the frame on the shared channel. If it is found that the channel is inactive, each
station waits for its turn to retransmit the data.
It is a carrier sense multiple access/ collision detection network protocol to transmit data
frames. The CSMA/CD protocol works with a medium access control layer. Therefore, it first
senses the shared channel before broadcasting the frames, and if the channel is idle, it transmits a
frame to check whether the transmission was successful. If the frame is successfully received, the
station sends another frame. If any collision is detected in the CSMA/CD, the station sends a
jam/ stop signal to the shared channel to terminate data transmission. After that, it waits for a
random time before sending a frame to a channel.
Dept-CSE Page 5
MODULE-2 DATA LINK LAYER
Following are the methods used in the CSMA/ CA to avoid the collision:
Interframe space: In this method, the station waits for the channel to become idle, and if it gets
the channel is idle, it does not immediately send the data. Instead of this, it waits for some time,
and this time period is called the Interframe space or IFS. However, the IFS time is often used
to define the priority of the station.
Contention window: In the Contention window, the total time is divided into different slots.
When the station/ sender is ready to transmit the data frame, it chooses a random slot number of
slots as wait time. If the channel is still busy, it does not restart the entire process, except that it
restarts the timer only to send data packets when the channel is inactive.
Acknowledgment: In the acknowledgment method, the sender station sends the data frame to
the shared channel if the acknowledgment is not received ahead of time.
The IEEE 802.3 standard defines the fundamental frame format that is necessary for all MAC
implementations. However, the core functionality of the protocol is being extended by several
optional forms.
Preamble and SFD, which operate at the physical layer, begin an Ethernet frame. The packet's
payload follows the Ethernet header, which includes the MAC addresses for the source and
destination. CRC, the final field, is utilized to find errors. Let's now examine each section of the
fundamental frame format.
1. Preamble - Ethernet frames begin with a 7-byte. This is a sequence of alternate 0s and 1s
that denotes the beginning of the frame and enables bit synchronization between the sender
and receiver. PRE (Preamble) was initially developed to accommodate the loss of a few bits
as a result of signal delays. Prior to the actual frame beginning, PRE (Preamble) alerts the
receiver that a frame is about to start and enables the receiver to lock onto the data stream.
Dept-CSE Page 6
MODULE-2 DATA LINK LAYER
2. Start of frame Delimiter (SFD) - This 1-byte field is always set to 10101011. The
destination address is the next set of bits that will begin the frame, as indicated by SFD.
The preamble is frequently referred to as 8 Bytes since SFD is sometimes seen as a
component of PRE. The SFD notifies the station or stations that synchronization is now
impossible.
3. Destination Address - This 6-Byte element contains the MAC address of the device for
which the data is intended.
4. Source Address - This 6-byte element contains the source machine's MAC address.
Since Source Address is always a unique address (Unicast), 0 is always the least
significant bit of the first byte.
5. Length - A 2-Byte field called Length represents the size of an Ethernet frame as a
whole. Due to some inherent constraints of Ethernet, this 16-bit field can store length
values from 0 to 65534, but length values greater than 1500 are not permitted.
6. Data - This area, sometimes referred to as the Payload, is where the real data is placed. If
Internet Protocol is utilised via Ethernet, both the IP header and data will be placed here.
The longest possible piece of data might be 1500 bytes long. If the data length is less than
the minimum length, which is 46 bytes, padding 0's are appended to make up the
difference.
7. Cyclic Redundancy Check (CRC) - CRC is a field of 4 bytes. The data in this field is a
32-bit hash code created using the fields for the destination address, source address,
length, and data. Data is damaged if the checksum calculated by the destination differs
from the checksum value supplied.
Note- Ethernet IEEE 802.3 frames range in size from 64 to 1518 bytes, including data length
(46 to 1500 bytes)
Below, a thorough explanation of the IEEE 802.3 basic frame format is provided. Let's look at
the expanded Ethernet frame header, which allows for a payload even more than 1500 bytes.
Dept-CSE Page 7
MODULE-2 DATA LINK LAYER
Flaws of Ethernet:
1. It can't be applied in real-time situations. Data delivery within a certain time frame is
necessary for real-time applications. Due to the high likelihood of collisions, Ethernet is
unreliable. The delivery of the data to its destination may be delayed due to an increased
number of collisions.
2. Applications requiring interaction cannot be utilized with it. Even extremely little
amounts of data must be delivered for interactive apps like chatting. The minimum data
length required by Ethernet is 46 bytes.
3. It is incompatible with client-server applications. Applications that use client-server
architecture demand that the server is prioritized over the client. Priorities cannot be set
in Ethernet.
Dept-CSE Page 8