Selective Repeat and Go-Back-N with SACK Protocol Implementation

Project Overview

This project involved implementing and testing two reliable data transfer protocols: Selective Repeat (SR) and Go-Back-N with Selective Acknowledgment (GBN+SACK). The goal was to simulate robust data transmission over an unreliable network, correctly handling packet loss and corruption while optimizing throughput and delay. Both protocols were designed with sliding window mechanisms, and their performance was evaluated under various network conditions, including different retransmission timeout (RTO) configurations.

Performance Plots

Go Back N

Go Back N

Selective Repeat

Selective Repeat

Project Documentation

Click to enlarge

CS455 Programming Assignment 2 - Click to view full screen

Key Findings

Technical Approach

Experimental Setup and Analysis

I conducted multiple tests with RTO values of 20, 30, 50, 100, 200, and 500 milliseconds to explore the trade-offs between responsiveness and efficiency. For each configuration, three test runs with different seeds were performed to introduce variability and ensure statistical robustness. Metrics such as throughput, goodput, average packet delay, and RTT were recorded and analyzed using 90% confidence intervals.

Results were visualized with Matplotlib, and manual tests were conducted in controlled CSA1 and CSA2 environments to simulate real-world networking conditions.

Challenges and Insights

A critical takeaway was the importance of tuning timeout values to balance network efficiency and responsiveness. Lower timeouts improved responsiveness but increased bandwidth consumption, while higher timeouts reduced overhead but risked slower recovery from errors. Additionally, the project highlighted subtle differences in protocol behavior under various error conditions, offering insight into practical trade-offs in reliable transport protocol design.

A potential extension identified was improving sequence number wrap-around handling to ensure robustness in long-running or high-volume transmissions, a feature essential in production-grade transport protocols like TCP.

Code Samples

Due to course policy, code samples are not available for public sharing.

Technologies Used