Data Link Control

Flow Control

  • flow control is a technique for assuring that a transmitting station does not overwhelm a receiving station with data
  • two flow control mechanisms
    • stop-and-wait
      • also referred as "alternating bit" or "send and wait"
    • sliding window

Stop and Wait

  • source transmits frame
  • destination receives frame and replies with acknowledgement (ACK)
  • source waits for ACK before sending next
  • destination can stop flow by not send ACK
  • works well for a few large frames
  • stop and wait becomes inadequate if large block of data is split into small frames

Image

Image

Image

Pros and Cons

  • simple
  • inefficient use of resources (low utilization, especially for systems with long propagation delays)

Sliding window

  • allows multiple numbered frames to be in transit
  • receiver has buffer W long
  • transmitter sends up to W frames without ACK
  • ACK includes number of next frame expected
  • sequence number is bounded by size of field (k)
    • frames are numbered modulo 2k2^k
    • giving max window size of up to 2k12^k - 1
  • receiver can ACK frames without permitting further transmission (Receive Not Ready)
  • must send a normal acknowledge to resume
  • if have full-duplex link, can piggyback ACKs

Image

Go back N

  • based on sliding window
  • if no error, ACK as usual, indicating next frame expected
  • use window to control number of outstanding frames
  • if error, reply with rejection
    • discard that frame and all future frames until error frame received correctly
    • transmitter must go back and retransmitted that frame and all subsequent frames

Image

  • Receiver detects error in frame ii
  • Receiver sens rejectioni(RRi)-i (RRi)
  • Transmitter gets rejection-ii
  • Transmitter transmits frame ii and all subsequent frames

Image

  • Frame ii lost and no additional frame sent
  • Receiver gets nothing and returns neither acknowledgement nor rejection
  • Transmitter times out and sends acknowledgement frame with PP bit set to 1
  • Receiver interprets this as command which it acknowledgement with the number of the next frame it expects (frame ii)
  • Transmitter then retransmits frame ii

Image

  • Receiver gets frame ii and sends acknowledgement (i+1i + 1) which is lost
  • Acknowledgements are cumulative, so next acknowledgement (i+ni+n) may arrive before transmitter times out on frame ii
  • if transmitter times out, it sends acknowledgement with PP bit set as before
  • this can be repeated a number of times before a reset procedure is initiated
  • NOTE: either damaged or lost, for sender is the same since it can't reconstruct the acknowledgement frame to be able to "read" it

Error Control

  • error control techniques use some or all of these mechanisms
    • Automatic repeat request
      • error detection
      • positive acknowledge
      • retransmission after timeout
      • negative acknowledgement and retransmission
  • Some versions of ARQ
    • Stop-and-Wait ARQ
    • Go-back-N ARQ
    • Selective-reject ARQ

Selective Reject

  • also called selective retransmission
  • only rejected frames are retransmitted
  • subsequent frames are accepted by the receiver and buffered
  • minimizes retransmission
  • receiver must maintain large enough buffer
  • more complex logic in transmitter
  • hence less widely used
  • saves bandwidth
  • useful for satellite links with long propagation delays