Docsity

Sliding Windows Flow Control-Data Communication-Lecture Slides, Slides of Data Communication Systems and Computer Networks

Partial preview of the text

Download Sliding Windows Flow Control-Data Communication-Lecture Slides and more Slides Data Communication Systems and Computer Networks in PDF only on Docsity!

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

 Multiple acknowledgement are possible

• Frames has a field for sequence number

• Sequence number bounded by size of field (k)

 Frames are numbered modulo 2

k

Example Sliding Window

Sliding Window Enhancements

• Receiver can acknowledge frames without permitting

further transmission (Receive Not Ready,RNR)

• Must send a normal acknowledge to resume

• If full duplex, use piggybacking

 If no data to send, use acknowledgement frame

 If data but no acknowledgement to send, send last

acknowledgement number again

• Much efficient than stop and wait as

 Stop and wait treats the link as a pipe with one frame at any time

 Sliding Window treats the link as a pipe filled with frames

flow control techniques cont..

  • Positive Acknowledgement  Receiver informs successful reception of some frame i by sending ACK i
  • Negative acknowledgement and retransmission  Receiver detects a damaged frame and send a rejection REJ
  • Retransmission after timeout  Transmitter waits for an acknowledgement and retransmits after timer is expired
  • Negative acknowledgement and retransmission  Receiver is not ready to receive further frames but has successfully received previous frames RNR

Automatic Repeat Request (ARQ)

• Techniques used for controlling flow errors are

collectively termed as Automatic Repeat Request

(ARQ )

• Typical ARQs

 Stop and wait

 Go back N

 Selective reject (selective retransmission)

stop and wait ARQ...  Solution

  • Each frame numbered 0 1 alternatively
  • Use ACK0 and ACK
  • If same frame is received twice, receiver detects it by looking at frame number and discards it.

Damaged Frame Damaged ACK

Go Back N ARQ

• The Scheme

 Based on sliding window

 No-Error

• reply with RRi acknowledgement with next frame expected e.g.

RR

 Damaged Frame

• Reply with rejection ( REJi ) i indicates damaged frame

• Discard that frame and all future frames until error frame

received correctly

• Transmitter must go back and retransmit that frame and all

subsequent frames

go Back N cont..

  • Lost Frame  Case-I [ Transmitter has data to send]  Frame i lost  Transmitter sends next frame i.e. i+  Receiver gets frame i+1 out of sequence  Receiver discards frame i+1 and sends rejection REJi ,all subsequent frames will also be discarded  Transmitter goes back to frame i and retransmits frame i and all subsequent frames

go Back N ..

  • Damaged Acknowledgement  Receiver gets frame i and send acknowledgement ( i+1 ) which is lost  Acknowledgements are cumulative, so next acknowledgement ( i+n ) may arrive before transmitter times out on frame i  If transmitter times out, it sends acknowledgement with P bit set as before  This can be repeated a number of times before a reset procedure is initiated

Sliding window Go Back N ARQ

Selective Reject -

Diagram