计算机网络-后退N帧协议(GBN)窗口大小
转载自:https://upscfever.com/upsc-fever/en/gatecse/en-gatecse-chp97.html
当使用 n n n 比特对帧进行编号的时候,发送窗口的大小应该小于 2 n − 1 2^n-1 2n−1
具体解释如下:
Window size for Go-Back-N ARQ
- We choose m = 2, which means the size of the window can be 2 m − 1 2^m - 1 2m−1, or 3. We can now show why the size of the send window must be less than 2 m 2^m 2m.
- If the size of the window is 3 (less than 2 2 2^2 22) and all three acknowledgments are lost, the frame 0 timer expires and all three frames are resent.
- The receiver is now expecting frame 3, not frame 0, so the duplicate frame is correctly discarded. On the other hand, if the size of the window is 4 (equal to 2 2 2^2 22) and all acknowledgments are lost, the sender will send a duplicate of frame 0.
- However, this time the window of the receiver expects to receive frame 0, so it accepts frame 0, not as a duplicate, but as the first frame in the next cycle. This is an error.