The Data-link layer of the OSI model provides the Network
layer with a well-defined interface, groups the bits transmitted to the Physical
layer into frames, identifies transmission errors, and applies flow control
mechanisms that prevent a slow receiver from being flooded with data sent by a
fast transmitter. For providing all these services, the layer uses mechanisms,
such as Cyclic Redundancy Check (CRC), for error detection and flow control.
However, the main function of the Data-link layer is to ensure
delivery of data from the Network layer of the source host to the Network layer
of the destination host. While performing these functions, it is possible for
the data to become corrupted or lost. To counter this problem, the Data-link
layer uses the following protocols:
Unrestricted Simplex Protocol: Assumes
that the data is transmitted in only one direction and Network layers of the
source and destination networks are functional. This protocol is unreliable
because there is always some loss of data during transmission.
Simplex Stop-and-Wait Protocol: Assumes
that the receiving Data-link layer stores the data frames until these are
transmitted to the Network layer. In addition, this is a simplex protocol, which
assumes that the communication channel is error free. The disadvantage of
implementing this protocol is that it does not provide the recipient node any
mechanism to prevent overflow of data.
Sliding Window Protocol: Uses a single
channel to transmit control and data frames to keep track of the data frames
being transmitted. It was introduced to provide bi-directional data
communication and transmission.
The Data-link layer also uses various error-detection
techniques, such as CRC and bit stuffing, to detect transmission errors that
corrupt the data frames. In addition, the Data-link layer applies a flow control
mechanism to prevent a fast sender from flooding a slow receiver with data
frames.