Access Control
Access Control
The data link layer is used in a computer network to transmit the data between two devices or
nodes. It divides the layer into parts such as data link control and the multiple access
resolution/protocol. The upper layer has the responsibility to flow control and the error control
in the data link layer, and hence it is termed as logical of data link control. Whereas the lower
sub-layer is used to handle and reduce the collision or multiple access on a channel. Hence it is
termed as media access control or the multiple access resolutions.
For example, suppose that there is a classroom full of students. When a teacher asks a question,
all the students (small channels) in the class start answering the question at the same time
(transferring the data simultaneously). All the students respond at the same time due to which
data is overlap or data lost. Therefore it is the responsibility of a teacher (multiple access
protocol) to manage the students and make them one answer.
ollowing are the types of multiple access protocol that is subdivided into the different process as:
A. Random Access Protocol
In this protocol, all the station has the equal priority to send the data over a channel. In random
access protocol, one or more stations cannot depend on another station nor any station control
another station. Depending on the channel's state (idle or busy), each station transmits the data
frame. However, if more than one station sends the data over a channel, there may be a collision
or data conflict. Due to the collision, the data frame packets may be lost or changed. And hence,
it does not receive by the receiver end.
Following are the different methods of random-access protocols for broadcasting frames on the
channel.
Aloha
CSMA
CSMA/CD
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.
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.
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.
data.
CSMA/ CD
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.
CSMA/ CA
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.
B. Controlled Access Protocol
It is a method of reducing data frame collision on a shared channel. In the controlled access
method, each station interacts and decides to send a data frame by a particular station approved
by all other stations. It means that a single station cannot send the data frames unless all other
stations are not approved. It has three types of controlled access: Reservation, Polling, and
Token Passing.
C. Channelization Protocols
It is a channelization protocol that allows the total usable bandwidth in a shared channel to be
shared across multiple stations based on their time, distance and codes. It can access all the
stations at the same time to send the data frames to the channel.
Following are the various methods to access the channel based on their time, distance and
codes:
FDMA
It is a frequency division multiple access (FDMA) method used to divide the available
bandwidth into equal bands so that multiple users can send data through a different frequency to
the subchannel. Each station is reserved with a particular band to prevent the crosstalk between
the channels and interferences of stations.
TDMA
Time Division Multiple Access (TDMA) is a channel access method. It allows the same
frequency bandwidth to be shared across multiple stations. And to avoid collisions in the shared
channel, it divides the channel into different frequency slots that allocate stations to transmit the
data frames. The same frequency bandwidth into the shared channel by dividing the signal into
various time slots to transmit it. However, TDMA has an overhead of synchronization that
specifies each station's time slot by adding synchronization bits to each slot.
CDMA
The code division multiple access (CDMA) is a channel access method. In CDMA, all stations
can simultaneously send the data over the same channel. It means that it allows each station to
transmit the data frames with full frequency on the shared channel at all times. It does not require
the division of bandwidth on a shared channel based on time slots. If multiple stations send data
to a channel simultaneously, their data frames are separated by a unique code sequence. Each
station has a different unique code for transmitting the data over a shared channel. For example,
there are multiple users in a room that are continuously speaking. Data is received by the users if
only two-person interact with each other using the same language. Similarly, in the network, if
different stations communicate with each other simultaneously with different code language.
Problem 1
After the kth consecutive collision, each colliding station waits for a random time chosen from
the interval- (0 to 2k-1) x RTT
Problem 2
In a CSMA / CD network running at 1 Gbps over 1 km cable with no repeaters, the signal speed
in the cable is 200000 km/sec. What is minimum frame size?
Solution-
Given-
Bandwidth = 1 Gbps
Distance = 1 km
Speed = 200000 km/sec
= 1 km / (200000 km/sec)
= 5 x 10-6 sec
= 10000 bits
Problem-03:
A 2 km long broadcast LAN has 107 bps bandwidth and uses CSMA / CD. The signal travels
along the wire at 2 x 108 m/sec. What is the minimum packet size that can be used on this
network?
A. 50 B
B. 100 B
C. 200 B
D. None of the above
Solution-
Given-
Distance = 2 km
Bandwidth = 107 bps
Speed = 2 x 108 m/sec
= 2 km / (2 x 108 m/sec)
= 10-5 sec
Problem-04:
A and B are the only two stations on Ethernet. Each has a steady queue of frames to send. Both
A and B attempts to transmit a frame, collide and A wins first back off race. At the end of this
successful transmission by A, both A and B attempt to transmit and collide. The probability that
A wins the second back off race is ___ .
A. 0.5
B. 0.625
C. 0.75
D. 1.0
Solution-
According to question, we have-
Now,
We have been asked the probability of station A to transmit its 2nd data packet successfully after
2nd collision.
After the 2nd collision occurs, we have-
At Station A-
2nd data packet of station A undergoes collision for the 1st time.
So, collision number for the 2nd data packet of station A = 1.
Now, station A randomly chooses a number from the range [0,21-1] = [0,1].
Then, station A waits for back off time and then attempts to retransmit its data packet.
At Station B-
1st data packet of station B undergoes collision for the 2nd time.
So, collision number for the 1st data packet of station B = 2.
Now, station B randomly chooses a number from the range [0,22-1] = [0,3].
Then, station B waits for back off time and then attempts to retransmit its data packet.
0 0 Collision
0 1 A wins
0 2 A wins
0 3 A wins
1 0 B wins
1 1 Collision
1 2 A wins
1 3 A wins
From here,