Data Link Layer in OSI Model

framing-and-link-access

The Data Link Layer provides a guaranteed delivery service, i.e., it transmits network layer datagrams without error. Transmissions and acknowledgments are used to provide a reliable delivery service. A data link layer typically offers a reliable delivery service over links since they have high error rates and can be repaired locally, rather than causing the data to be retransmitted.

3) Flow Control

4) Error Control

Signals may experience problems during the transition, and the bits may get inverted. These errors are recognized and attempted to be recovered by the data link layer in order to retrieve actual data bits.

5) Physical Addressing

6) Multi-Access

When a host on the shared link tries to send data, there is a significant chance of a collision. The data-link layer provides mechanisms such as CSMA/CD that enable different systems to access shared media.

multi-access-in-data-link-layer

Error Detection and Correction in Data Link Layer

The data-link layer employs error control techniques to ensure that frames (bit streams of data) are accurately delivered from the source to the destination.

Errors

Bits might get damaged while transported over a computer network due to interference and network difficulties. Errors occur when corrupted bits cause spurious data to be received by the destination.

Types of errors: Errors are classified into three types: single-bit errors, multiple-bit errors, and burst errors.

single-bit-error

multiple-bit-error

burst-error

Error Control

There are two methods for controlling errors:

The sender must send some additional bits together with the data bits for error detection and correction. Based on the additional redundant bits, the receiver performs the necessary checks. If the data is error-free, it eliminates the unnecessary bits before delivering the message to the upper layers.

Error Detection Techniques

Three methods are used to detect an error in frames: Parity check, Checksum, and Cyclic Redundancy Check (CRC) .

1. Parity Check The parity check is performed by adding an extra bit to the data known as the parity bit, which results in a number of 1s that are either even in the case of even parity or odd in the case of odd parity. The parity check is only useful for detecting single-bit errors.

The sender counts the amount of 1s in the frame and adds the parity bit in the following manner:

When a frame is received, the receiver counts the number of 1s in it. In the case of an even parity check, the frame is accepted if the number of 1s is even; otherwise, it is refused. A similar approach is used for odd numbers.

parity-check

2. Checksum

checksum-error-detection

3. Cyclic Redundancy Check (CRC)

cyclic-redundancy-check-error-detection

Error Correction Techniques

Error correction techniques determine the exact number of corrupted bits and their positions. There are two main approaches.

The four major error-correcting codes are as follows:

Design Issues with Data Link Layer

Network Layer Service Agreement

The primary goal of this service is to provide services to the network layer. The main aim of the data link layer is to transmit data from the network layer on the source machine to the layer on the destination machine. The Data Link Control Protocol is used to communicate between the two data levels.

The Data Link layer provides the following essential services to the Network layer:

Framing

The data is sent to the destination machine in the form of frames from the source machine. The starting and ending points of the frame should be highlighted so that the destination machine can clearly recognize the frame.

The data link layer divides the bitstream into layers and computes the checksum for each. The checksum is enumerated at the destination layer. Framing is the process of breaking up a bitstream by inserting spaces and time gaps.

Counting on time and marking the beginning and end of each frame is challenging and dangerous. Simple techniques used in framing are:

Flow Control

Error Control

Physical Address of Frames

The data link layer appends a header to the frame that describes the physical address of the sender or receiver.

Enroll in our Free Computer Networking course with certification designed by industry experts. Sign up today & pave the way for a thriving career!

Conclusion