diff options
| author | mo khan <mo@mokhan.ca> | 2025-09-07 14:58:22 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-09-07 14:58:22 -0600 |
| commit | 2764341dd76a0470803667fb8fe52f04bd87447f (patch) | |
| tree | 71a1f0d244eece049eb46305e9b8f2371bd435d6 /comp347 | |
| parent | b1d075c5c728fbb386da81432600cdd84bea257d (diff) | |
feat: complete 1.2
Diffstat (limited to 'comp347')
| -rw-r--r-- | comp347/assignment2/assignment2.md | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/comp347/assignment2/assignment2.md b/comp347/assignment2/assignment2.md index 392c2f3..b9a731f 100644 --- a/comp347/assignment2/assignment2.md +++ b/comp347/assignment2/assignment2.md @@ -39,7 +39,35 @@ TCP establishes connections through a three-way handshake and terminates them gr ### 1.2 Go-Back-N Protocol (5%) -[To be completed] +While Reliable Data Transfer (RDT) protocols are essentially stop-and-wait protocols that send one packet and wait for acknowledgment before sending the next, Go-Back-N (GBN) achieves higher throughput by allowing multiple packets to be transmitted without waiting for individual acknowledgments. GBN accomplishes this through several key mechanisms: + +#### 1. Sliding Window Mechanism +GBN uses a sliding window of size N that allows the sender to transmit up to N unacknowledged packets. The window "slides" forward as acknowledgments are received, enabling continuous transmission without waiting for each individual ACK. + +#### 2. Sequence Number Space +GBN uses a finite sequence number space (typically modulo 2^k) where packets are numbered sequentially. The sender maintains: +- **base**: oldest unacknowledged packet sequence number +- **nextseqnum**: next sequence number to be used +- **Window boundary**: base ≤ sequence numbers < base + N + +#### 3. Cumulative Acknowledgments +The receiver sends cumulative ACKs, where ACK(n) acknowledges all packets up to and including sequence number n. This allows a single ACK to acknowledge multiple packets, reducing ACK traffic and simplifying the protocol. + +#### 4. Selective Retransmission Strategy +When a timeout occurs or a NAK is received, GBN retransmits all unacknowledged packets starting from the oldest unacknowledged packet (base). This "go-back-N" behavior ensures reliable delivery while maintaining simplicity. + +#### 5. Receiver Window Size of 1 +The receiver maintains a window of size 1, accepting only the next expected packet in sequence. Out-of-order packets are discarded and the receiver sends a duplicate ACK for the last correctly received packet. This maintains simplicity at the receiver. + +#### 6. Timer Management +GBN uses a single timer for the oldest unacknowledged packet. When the timer expires, all unacknowledged packets are retransmitted, and the timer is restarted. + +#### Performance Benefits +- **Pipeline Utilization**: Multiple packets can be "in flight" simultaneously, utilizing available bandwidth more efficiently than stop-and-wait +- **Higher Throughput**: Transmission rate approaches channel capacity when the window size is appropriately chosen relative to the bandwidth-delay product +- **Reduced Idle Time**: Sender doesn't wait for individual ACKs before continuing transmission + +**Key Insight**: GBN trades some efficiency (retransmitting correctly received but out-of-order packets) for simplicity and improved throughput compared to stop-and-wait protocols. ### 1.3 IPv6 Transition (5%) |
