Data Link Layer
In a computer network, the data link layer is utilised to transmit data between two devices or nodes. The multiple access resolution/protocol and data link control are two examples of how it divides the layer into sections. The upper layer is referred to as logical data link control because it is responsible for flow control and error control in the data link layer. While the lower sub-layer is utilised to manage and minimise channel collisions or multiple access. Multiple access resolutions or media access control are the terms used to describe it.
Data Link Control
A data link control is a dependable method of directing the flow of data packets in a computer network using various techniques like framing, error control and flow control.
Multiple Access Control
The data link control layer is sufficient if there is a dedicated link between the sender and the receiver, but if there isn’t, multiple stations can access the channel at once if there isn’t. Therefore, it is necessary to use multiple access protocols to reduce collision and prevent crosstalk. When a teacher asks a question in a classroom full of students and all the students (or stations) start responding simultaneously (send data at the same time), many chaoses is created (data overlap or data lost), so the teacher’s job is to manage the students and force them to respond one at a time using multiple access protocols.
Random Access Protocol
All stations in this protocol have an equal priority in sending data over a channel. One or more stations cannot control or be dependent upon another station when using the random access protocol. Each station transmits the data frame in accordance with the active or inactive state of the channel. However, there could be a collision or data conflict if more than one station sends the data over the same channel. The data frame packets may be altered or lost as a result of the collision. As a result, the receiver end does not receive.
The various random-access protocols for broadcasting frames on the channel are listed below.
- Aloha
- CSMA
- CSMA/CD
- CSMA/CA
Pure Aloha
- A station waits for a response before sending data. The station waits for a random amount of time called back-off time (Tb) and resends the data if the acknowledgement does not arrive within the allotted time. The likelihood of further collisions declines because different stations wait for varying lengths of time.
Vulnerable Time = 2* Frame transmission time
Throughput = G exp{-2*G}
Maximum throughput = 0.184 for G=0.5
Slotted Aloha
- It is similar to pure aloha, with the exception that time is divided into slots and data sending is only permitted at the start of these slots. A station must wait for the following slot if it misses the allotted time. This lessens the likelihood of a collision.
Vulnerable Time = Frame transmission time
Throughput = G exp{-*G}
Maximum throughput = 0.368 for G=1
CSMA
Fewer collisions are guaranteed by carrier sense multiple access because the station must first determine whether the medium is busy or idle before transmitting data. If it isn’t idle, it waits for the channel to become idle before sending data. Due to propagation delay, there is still a chance of collision in CSMA. For instance, station A will sense the medium before sending any data. It will begin sending data if it discovers that the channel is empty. However, if station B requests to send data and senses the medium, it will also find it idle and send data at the same time the first bit of data is transmitted from station A (delayed due to propagation delay). As a result, data from stations A and B will collide.
CSMA access modes:
- 1-persistent: The node senses the channel, sends the data if it is idle, or continuously checks the medium for idleness before sending data unconditionally (with a probability of 1) when the channel becomes idle.
- Non-Persistent: The node senses the channel; if it is free, it sends the data; if not, it checks the medium once or twice (not continuously) and sends the data when it is.
- P-persistent: The node senses the medium and sends data with p probability if it is idle. If the data is not transmitted ((1-p) probability), the system waits a while before checking the medium once more. If the medium is still empty, the system sends the data with a p probability. Until the frame is sent, this repeat will keep going. It is utilised in packet radio and Wifi systems.
- O-persistent: Transmission takes place in the order determined by the superiority of nodes. The node waits for its time slot to send data if the medium is not in use.
CSMA/CD
Multiple access carriers with collision detection. Stations have the ability to stop data transmission if a collision is found.
CSMA/CA
Multiple access with carrier sense and collision avoidance Sender receipt of acknowledgement signals is a necessary step in the collision detection process. The data is successfully sent if there is only one signal (its own), but a collision has occurred if there are two signals (it’s own and the one with which it collided). A collision must significantly affect the received signal in order to distinguish between these two scenarios. However, this is not the case in wired networks, which is why CSMA/CA is employed here.
CSMA/CA avoids collision by:
- Interframe space – In order to prevent collisions caused by propagation delays, the station waits for the medium to become idle before sending data. This waiting period is known as the Interframe Space or IFS. Once more, it checks to see if the medium is idle after this. The priority of the station affects the IFS duration.
- Contention Window – The amount of time has been divided up into slots. When the sender is prepared to send data, the number of wait slots it chooses at random doubles each time the medium is not found to be idle. If the medium is found to be in use, the process is not restarted in its entirety; rather, the timer is restarted when the channel is once more found to be inactive.
- Acknowledgement – If the acknowledgement is not received before time-out, the sender resends the data.
Controlled Access Protocol
On a shared channel, it is a technique for reducing data frame collision. In the controlled access method, every station engages in communication and chooses whether to send a data frame that has been approved by every other station. This means that unless all other stations are rejected, a single station cannot send the data frames. Reservation, polling and token passing are the three different types of controlled access available.
Channelization Protocols
It is a channelization protocol that enables multiple stations to share the total usable bandwidth in a shared channel according to their time, location and codes. To send the data frames to the channel, it can simultaneously access all of the stations.
Following are the various methods to access the channel based on their time, distance and codes:
- FDMA (Frequency Division Multiple Access)
- TDMA (Time Division Multiple Access)
- CDMA (Code Division Multiple Access)
Frequency Division Multiple Access (FDMA)
In order to assign each station its own band, the available bandwidth is split into equal bands. In order to prevent crosstalk and noise, guard bands are also added to ensure that no two bands overlap.
Time Division Multiple Access (TDMA)
The bandwidth is split among several stations in this. Time is divided into slots for stations to transmit data in order to prevent collisions. However, there is a synchronisation overhead because each station needs to be aware of its time slot. By including synchronisation bits in each slot, this problem is fixed. Propagation delay is a problem with TDMA as well, but it can be fixed by adding guard bands.
Code Division Multiple Access (CDMA)
All transmissions are broadcast simultaneously on one channel. The concepts of time and bandwidth are not divided. For instance, even if only two people in the room speak the same language, perfect data reception is still possible when many people are speaking at once. Similar to this, data from various stations can be sent simultaneously in various code languages.