Docsity

Data Link Control Protocols: Flow Control, Error Detection and Correction, and HDLC, Slides of Data Communication Systems and Computer Networks

Partial preview of the text

Download Data Link Control Protocols: Flow Control, Error Detection and Correction, and HDLC and more Slides Data Communication Systems and Computer Networks in PDF only on Docsity!

Chapter 7

Data Link Control Protocols

Flow Control

  • Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow
  • Transmission time —Time taken to emit all bits into medium
  • Propagation time —Time for a bit to traverse the link

Stop and Wait

  • Source transmits frame
  • Destination receives frame and replies with acknowledgement
  • Source waits for ACK before sending next frame
  • Destination can stop flow by not send ACK
  • Works well for a few large frames

Fragmentation

  • Large block of data may be split into small frames —Limited buffer size —Errors detected sooner (when whole frame received) —On error, retransmission of smaller frames is needed —Prevents one station occupying medium for long periods
  • Stop and wait becomes inadequate

Sliding Windows Flow Control

  • Allow multiple frames to be in transit
  • Receiver has buffer W long
  • Transmitter can send up to W frames without ACK
  • Each frame is numbered
  • ACK includes number of next frame expected
  • Sequence number bounded by size of field (k) —Frames are numbered modulo 2k

Sliding Window Diagram

Sliding Window Enhancements

  • Receiver can acknowledge frames without permitting further transmission (Receive Not Ready)
  • Must send a normal acknowledge to resume
  • If duplex, use piggybacking —If no data to send, use acknowledgement frame —If data but no acknowledgement to send, send last acknowledgement number again, or have ACK valid flag (TCP)

Error Detection

  • Additional bits added by transmitter for error detection code
  • Parity —Value of parity bit is such that character has even (even parity) or odd (odd parity) number of ones —Even number of bit errors goes undetected

Error Control

  • Detection and correction of errors
  • Lost frames
  • Damaged frames
  • Automatic repeat request —Error detection —Positive acknowledgment —Retransmission after timeout —Negative acknowledgement and retransmission

Automatic Repeat Request

(ARQ)

  • Stop and wait
  • Go back N
  • Selective reject (selective retransmission)

Stop and Wait -

Diagram

Stop and Wait - Pros and Cons

  • Simple
  • Inefficient

Go Back N - Damaged Frame

  • Receiver detects error in frame i
  • Receiver sends rejection-i
  • Transmitter gets rejection-i
  • Transmitter retransmits frame i and all subsequent

Go Back N - Lost Frame (1)

  • Frame i lost
  • Transmitter sends i+
  • Receiver gets frame i+1 out of sequence
  • Receiver send reject i
  • Transmitter goes back to frame i and retransmits