Revision questions:

  1. A damaged acknowledgement is a situation that could occur in stop-and-wait flow control. How could this problem be overcome?
  • One of two errors that can occur in Stop-and-Wait flow control.
  • Acknowledgements are sent by Station B to acknowledge receipt of correctly received frames from Station A.
  • Station B labels the Acknowledgements as ACK0 (for receipt for Frame1), ACK1 (for receipt for Frame0).

ANSWER:

If damaged acknowledgement happens midway,

Upon a TIME OUT interval (set reasonable amount of time), Station A does not receive ACK0 for the previous Frame1, Station A will retransmit Frame1 again.

When Station B again receives Frame1 and finds a duplicate, it’ll discard the previous Frame1.

  1. A Damaged frame is a situation that could occur in go-back-n ARQ. How could this problem be resolved?
  2. Station A sends frames 0 through 6 to Station B.
  3. Station B receives all seven frames and cumulatively acknowledges with RR7 (Receive Ready).
  4. Because of a noise burst, the RR7 is lost.
  5. A times out and re-transmits frame 0.
  6. B has already advanced its receive window to accept frames 7,0,1,2,3,4 and 5. So, it assumes that frame 7 has been lost and that this is a new frame 0, which it accepts.

ANSWER:

To overcome the problem, the maximum window size should be no more than half the range of sequence numbers. IF only, 4 acknowledged frames maybe outstanding, no confusion can result. Thus, for a k bit sequence number field, which provides a sequence number range of 2k, the maximum window size is limited to 2k-1.

Reflective questions:

  1. For very high data rates, for very long distances between sender and receiver, stop-and-wait flow control provides inefficient line utilisation. Discuss this issue and identify advantages and disadvantages of stop-and-wait flow control.

ANSWER:

The principle advantage is its simplicity while its main disadvantage is its inefficient use of bandwidth.

  1. The sliding window flow control mechanism requires maintaining a sequence number to identify each frame transmitted. Discuss the numbering system and the impact of different scenarios on sliding window flow control.

Sliding Window Flow Control

  • Efficiency can be greatly improved by allowing multiple frames to be in transit at the same time.
  • Assuming that A and B connected via a full-duplex link wants to communicate.
  • Assuming that A sends frames to B.
  • Station B allocates buffer space for n frames.
  • Station B can accept n frames at one time.
  • Therefore, Station A is allowed to send n frames without waiting for ACK.
  • To keep track of which frames have been ACKed; each ACK is labeled with a sequence number.
  • B ACKs a frame by sending an ACK that includes the sequence number of the next frame expected.
  • Station A maintains a list of sequence numbers that it is allowed to send while Station B maintains a list of sequence numbers that it is prepared to receive.
  • Each of these lists can be thought of as a window of frames.
  • Sequence Number
  • It is of bounded size, because the sequence number occupies a field in the frame.
  • The frame usually starts at 0.
  • For example, for a 5-bit sequence number field, it can range from 0 to 31. Or frames are numbered modulo 32.
  • In general, for a k-bit field:
  • The range of numbers is 0 through 2k-1.
  • Frames are numbered modulo (2k).
  • The actual window size need not be the maximum possible size for a sequence number length.
  • From Figure 7-4, RR3 means Receive-Ready sequence number 3. In other words, B has received all the frames up to frame number 2 and is ready to receive frame number 3. In fact, it is prepared to receive up to the maximum window size, which is seven in this particular case.
  • In addition, most protocols allow a destination to completely cut off the flow of frames by sending a RNR (Receive-Not-Ready) message, which acks former frames but forbids transfer of future frames.
  • For example RNR4 means that the destination has received all frames up to number 3 but unable to accept any more.
  • Of course, the station must send a normal ACK to reopen the window when it’s ready.

Assuming A and B exchange data.

  • Each would need to maintain two windows; one for transmission and one for receive.
  • Each side needs to send the data and ACKs to the other.
  • Efficient Solution: Piggybacking.
  • Each data frame includes a field that holds the sequence # of that frame plus a field that holds the sequence # used for ACKs.
  • Thus, if a station has data to send and an ack to send, it sends both together in one frame.
  • It saves communication capacity.
  • If a station does not have any data to send, then it sends a separate ACK.
  • If a station has data to send but no new ACK, it must repeat the last ACKed #.
  • With sliding window flow control, the transmission link is treated as a pipeline that may be filled with multiple frames in transit. With stop-and-wait, only one frame may be in the pipe at a time.