Data Link Control | Line discipline, Flow and Error Control


Data Link Control is that the service provided by the Link Layer to supply reliable data transfer over the physical medium. for instance, within the half-duplex transmission mode, one device can only transmit the info at a time.

If both the devices at the top of the links transmit the info simultaneously, they’re going to collide and results in the loss of knowledge. the info link layer provides the coordination among the devices in order that no collision occurs.

  • Line discipline.
  • Flow control.
  • Error control.


In-Line Discipline is a functionality of the Data link layer that provides coordination among the link systems. It determines which device can send, and when it can send the data. There are also some categories of line discipline.



The first method is employed in peer to see communication, the second method is employed in primary secondary communication.

Is employed primarily during a system where there’s no doubt of the incorrect receiver getting the transmission, that is, when there’s a fanatical link between two devices in order that the sole device capable of receiving the transmission is that the intended one.

ENQ/ACK coordinates which device may start transmission and whether or not.

Data Link Control

The initiator first transmits a frame called an inquiry (ENQ) asking if the receiver is out there to receive data. the receiver must answer either with an acknowledgment (ACK) frame if it is ready to receive or with a negative acknowledge (NAK) frame if it is not.


  • Ensuring the sending entity doesn’t overwhelm the receiving entity
    —Preventing buffer overflow
  • Transmission time
    —Time is taken to emit all bits into the medium at the sender’s side
    —Determined by the data rate
  • Propagation time
    —Time for a touch to traverse the link and reach the destination
    —Determined by the transmission distance
  • We first assume error-free transmission.

Flow control -For speed mismatch (sender faster than receiver), finite receiver buffer, or occasional unavailability of the receiver feedback mechanism is usually required.

Also Read: Unguided media


We are going to talk about categories of Flow control.

  • Stop-and-wait
  • Sliding window
Data Link Control


  • The source transmits a frame.
  • The destination receives the frame and replies with a small frame called acknowledgment (ACK).
  • The source waits for the ACK before sending the next frame.
    —This is the core of the protocol!
  • The destination can stop the flow by not sending an ACK (e.g., if the destination is busy …).
  • Performance of Stop-and-Wait
  • STOP-AND-WAIT Flow control is not efficient for the end of the day transmission and high-speed transmission. Another sort of protocol called “sliding-window” is meant for this situation
Data Link Control


Sliding window flow control-

  • Idea: allow multiple frames to transmit
    —The receiver has a buffer of W frames
    —The transmitter can send up to W frames without receiving the ACK
  • Each frame must be numbered: sequence number is included within the frame header
  • ACK includes the sequence number of the subsequent expected frame by the receiver
Data Link Control


  • Error control: detection and correction of errors
  • We consider two types of errors:
    —Lost frames
  • The receiver cannot recognize that this is often a frame.
    Damaged frames
  • The receiver can recognize the frame, but some bits are in error.

Two approaches for error control
ARQ: automatic repeat request, supported some or all of the subsequent ingredients:

  • Error detection
  • Positive acknowledgment
  • Retransmission after timeout
  • Negative acknowledgment and retransmission
    —FEC: Forward error correction


  • The effect of ARQ is to show an unreliable link into a reliable one.
  • Three versions of ARQ:
    —Selective-reject (or, selective repeat)


  • Stop-and-wait ARQ
  • Sliding window ARQ
Data Link Control


  • Based on stop-and-wait flow control
  • The source station is equipped with a timer.
  • The source transmits a single frame and waits for an ACK
  • If the frame is lost…
    —The timer eventually fires, and therefore the source retransmits the frame.
  • If the receiver receives a damaged frame, discard it
    —The timer eventually fires, and therefore the source retransmits the frame.
  • If everything goes right, but the ACK is broken or lost, the source won’t recognize it
    —The timer eventually fires, the source will retransmit the frame
    —The receiver gets two copies of an equivalent frame!
    —Solution: use sequence numbers, 1 bit is enough, i.e., frame0 and frame1, ACK0 and ACK1
Data Link Control


  • Based on sliding-window flow control
  • Use window size to regulate the number of unacknowledged frames outstanding
  • If no error, the destination will send ACK as usual with the next frame expected (positive ACK, RR: receive ready)
  • If error, the destination will reply with rejection (negative ACK, REJ: reject)
    —The receiver discards that frame and all future frames until the erroneous frame is received correctly.
    —The source must go back and retransmit that frame and all succeeding frames that were transmitted in the interim.
    —This makes the receiver simple but decreases the efficiency


  • Suppose A is sending frames to B. After each transmission, A sets a timer for the frame.
  • n Go-Back-N ARQ, if the receiver detects an error in frame i
    —The receiver discards the frame and sends REJ-i
    —Source gets REJ-i
    —Source retransmits frame I and all subsequent frames


  • Assume the receiver has received frame i-1. If frame i is lost
    —Source subsequently sends i+1
  • The receiver gets frame i+1 out of order
    —At the data link layer, this means the loss of a frame!
  • Receiver sends REJ-i
  • Source gets REJ-i, then goes back to frame I and retransmits frame I, i+1, …


  • Assume receiver has received frame i-1
  • Frame i is lost and no additional frame is shipped
  • The receiver gets nothing and returns neither acknowledgment nor rejection
  • Source times out and sends a request to the receiver asking for instructions
  • Receiver responses with RR frame, including the number of the subsequent frames it expects, i.e., the frame I
  • Source then retransmits frame i


  • Also called selective repeat
  • Pros:
    —Only rejected frames are retransmitted
    —Subsequent frames are accepted by the receiver and buffered
    —Minimizes the number of retransmissions
  • Cons:
    —The receiver must maintain a large enough buffer and must contain logic for reinserting the retransmitted frame in the proper sequence
    —Also more complex logic in the source


We hope you have got complete information about what is Data Link Control in the computer network and its type.

We always try to give complete information about any topic. So that your knowledge is not incomplete. If you like this information given by us.

If you want to say something About this information means any suggestion about this article.

And some related posts-

Leave a Comment