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: WT > 1
  • Receiver window: WR = 1

Typical setting: WT = 3, WR = 1

🔢

Frame Numbering

Tap to flip

🔢
Numbering Requirements
At least n bits for frame numbering
Key Condition
WT + WR ≤ 2n
Example
When WT = 3, WR = 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
  1. Sender sends frames 3,0,1
  2. 0 is lost
  3. Receiver expects 0 but gets 1 (illegal)
  4. Discards 1, returns ACK3
  5. Sender times out, retransmits 0 and all after
ACK Loss
  1. Receiver gets 0-2, sends ACK2 (lost)
  2. Sender times out, retransmits 0-2
  3. Receiver has moved window → discards "old" frames
  4. Resends ACK2
🚧

Window Size Limitation

Tap to flip

🚧
Problem Scenario
n=2 (4 numbers), but WT=4, WR=1 (4+1>4)
What Happens
  1. Sender sends 0-3, ACK3 lost
  2. Retransmits 0
  3. Receiver window has cycled to new 0
Consequence
Receiver cannot distinguish old and new 0 frames
Solution
Must maintain WT + WR ≤ 2n
📋

Protocol Characteristics

Tap to flip

📋
Sender Rules
WT > 1, allows continuous sending
Receiver Rules
WR = 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 2n
⚖️

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