GBN Protocol Flashcards
📡
GBN Protocol Basics
Tap to flip
📡
Full Name
Go-Back-N Protocol (GBN)
Core Mechanism
Based on
sliding window
mechanism
Key Differences from Stop-and-Wait
Sender window:
W
T
> 1
Receiver window:
W
R
= 1
Typical setting
: W
T
= 3, W
R
= 1
🔢
Frame Numbering
Tap to flip
🔢
Numbering Requirements
At least
n bits
for frame numbering
Key Condition
W
T
+ W
R
≤ 2
n
Example
When W
T
= 3, W
R
= 1 → n ≥ 2 (3 + 1 ≤ 4)
Numbering Cycle
2-bit cycle: 0→1→2→3→0→1...
✅
Cumulative ACK
Tap to flip
✅
Definition
Receiver can return only the
last frame's ACK
for multiple correct frames
Example
After receiving frames 0,1,2 → returns only
ACK2
Meaning
ACKi means
i and all previous frames
were received correctly
Window Sliding
Sender receives ACK2 → confirms 0-2 received → slides window
⚠️
Exception Handling
Tap to flip
⚠️
Data Frame Loss
Sender sends frames 3,0,1
0 is lost
Receiver expects 0 but gets 1 (illegal)
Discards 1, returns
ACK3
Sender times out, retransmits
0 and all after
ACK Loss
Receiver gets 0-2, sends ACK2 (lost)
Sender times out, retransmits 0-2
Receiver has moved window → discards "old" frames
Resends
ACK2
🚧
Window Size Limitation
Tap to flip
🚧
Problem Scenario
n=2 (4 numbers), but W
T
=4, W
R
=1 (4+1>4)
What Happens
Sender sends 0-3, ACK3 lost
Retransmits 0
Receiver window has cycled to new 0
Consequence
Receiver
cannot distinguish
old and new 0 frames
Solution
Must maintain
W
T
+ W
R
≤ 2
n
📋
Protocol Characteristics
Tap to flip
📋
Sender Rules
W
T
> 1, allows
continuous sending
Receiver Rules
W
R
= 1, must receive
in order
Special Rules
Cumulative ACK
Go-back retransmission
on timeout
Illegal frame handling
Frame Numbering
Next frame after i is
(i+1) mod 2
n
⚖️
Pros & Cons
Tap to flip
⚖️
Advantages
Implements
flow control
More efficient than Stop-and-Wait
Disadvantages
Inefficient when receiver is slow (frequent retransmissions)
Performance drops sharply with
high error rates
Compared to Selective Repeat: less efficient
Key point
: Trade-off between simplicity and efficiency