All the protocol in random access approach will
answer the following questions
[Link] can station access the medium?
[Link] can the station do if the medium is busy?
[Link] can the station determine the success or
failure of the transmission?
[Link] can the station do if there is an access
conflict?
ALOHA
● Earliest random access method ,was developed at the University
of Hawaii around 1970.
● It was designed for a radio(wireless)LAN,but it can be used on
any shared medium.
● The original ALOHA protocol is called pure [Link] is
simple but elegant protocol.
● The idea is that each station sends a frame whenever it has a
frame to [Link] there is possibility of collision between
frames from different stations
● Pure ALOHA refers to the original ALOHA protocol. The idea is that
each station sends a frame whenever one is available. Because there is
only one channel to share, there is a chance that frames from different
stations will collide.
● The pure ALOHA protocol utilizes acknowledgments from the
receiver to ensure successful transmission. When a user sends a frame,
it expects confirmation from the receiver. If no acknowledgment is
received within a designated time period, the sender assumes that the
frame was not received and retransmits the frame.
● When two frames attempt to occupy the channel simultaneously, a
collision occurs and both frames become garbled. If the first bit of a
new frame overlaps with the last bit of a frame that is almost
finished, both frames will be completely destroyed and will need to
be retransmitted. If all users retransmit their frames at the same time
after a time-out, the frames will collide again.
● To prevent this, the pure ALOHA protocol dictates that each user
waits a random amount of time, known as the back-off time, before
retransmitting the frame. This randomness helps to avoid further
collisions.
Algorithm
The algorithm of CSMA/CA is:
[Link] a frame is ready, the transmitting station checks whether the channel is idle
or busy.
[Link] the channel is busy, the station waits until the channel becomes idle.
[Link] the channel is idle, the station waits for an Inter-frame gap (IFG) amount of time
and then sends the frame.
[Link] sending the frame, it sets a timer.
[Link] station then waits for acknowledgement from the receiver. If it receives the
acknowledgement before expiry of timer, it marks a successful transmission.
[Link], it waits for a back-off time period and restarts the algorithm.
MAC Frame: The MAC layer frame consists of 9 fields. The following figure
shows the basic structure of an IEEE 802.11 MAC data frame along with the
content of the frame control field.
Frame Control(FC) – It is 2 bytes long field which defines type of frame and
some control information. Various fields present in FC are:
Version: It is a 2 bit long field which indicates the current protocol
version which is fixed to be 0 for now.
Type: It is a 2 bit long field which determines the function of frame i.e
management(00), control(01) or data(10). The value 11 is reserved.
Subtype: It is a 4 bit long field which indicates sub-type of the frame like 0000
for association request, 1000 for beacon.
To DS: It is a 1 bit long field which when set indicates that destination frame
is for DS(distribution system).
From DS: It is a 1 bit long field which when set indicates frame coming
from DS.
More frag (More fragments): It is 1 bit long field which when set to 1
means frame is followed by other fragments.
Retry: It is 1-bit long field, if the current frame is a retransmission of an
earlier frame, this bit is set to 1.
Power Mgmt (Power management): It is 1-bit long field that indicates
the mode of a station after successful transmission of a frame. Set to 1
the field indicates that the station goes into power-save mode. If the field
is set to 0, the station stays active.
More data: It is 1-bit long field that is used to indicate receiver that a
sender has more data to send than the current frame.
WEP(wireless equivalent privacy): It is 1 bit long field which indicates
that the standard security mechanism of 802.11 is applied.
Order: - The final one-bit subfield instructs the receiver that the frames
should be in an ordered sequence to the higher levels.
● Duration/ID – It is 4 bytes long field which contains the value indicating
the period of time in which the medium is occupied(in µs).
● Address 1 to 4 – These are 6 bytes long fields which contain standard
IEEE 802 MAC addresses (48 bit each). The meaning of each address
depends on the DS bits in the frame control field.
● SC (Sequence control) – It is 16 bits long field which consists of 2
sub-fields, i.e., Sequence number (12 bits) and Fragment number (4 bits).
Since acknowledgement mechanism frames may be duplicated hence, a
sequence number is used to filter duplicate frames.
● Data – It is a variable length field which contain information
specific to individual frames which is transferred transparently
from a sender to the receiver(s).
● CRC (Cyclic redundancy check) – It is 4 bytes long field
which contains a 32 bit CRC error detection sequence to
ensure error free frame.
Features of the IEEE 802.11 MAC frame:
Frame Control Field: The frame control field contains information about the type of frame, the
data rate, and the power management status.
Duration Field: The duration field specifies the length of time that the channel will be occupied
by the transmission.
Address Fields: The address fields specify the source and destination MAC addresses of the
Wi-Fi devices involved in the communication.
Sequence Control Field: The sequence control field is used to identify and manage the
transmission sequence of the frames.
Frame Body: The frame body contains the actual data being transmitted between Wi-Fi devices,
such as IP packets, TCP segments, or UDP datagrams.
Frame Check Sequence: The frame check sequence (FCS) is used to check the integrity of the
data transmitted in the frame and to detect any transmission errors.
Management, Control, and Data Frames: The IEEE 802.11 MAC frame
defines three types of frames: management frames, control frames, data
frames. Management frames are used for network management, control
frames are used for coordination between Wi-Fi devices, and data frames
are used for the transmission of actual data.
Fragmentation: The IEEE 802.11 MAC frame supports fragmentation,
which allows large data packets to be divided into smaller fragments for
transmission.
Acknowledgments: The IEEE 802.11 MAC frame uses acknowledgments
to confirm the successful transmission of frames and to request the
retransmission of any frames that were not successfully received.