2025
RDT-Sim — Reliable Data Transfer over UDP
A reliable file transfer system built over UDP implementing the Go-Back-N sliding window protocol, with configurable packet loss, corruption, and reordering simulation.
Overview
Raw UDP provides no delivery guarantees — packets can be lost, corrupted, or arrive out of order. This project implements the Go-Back-N sliding window protocol on top of UDP to achieve reliable file transfer, and pairs it with a configurable network simulator node to stress-test the implementation under realistic adverse conditions.
Architecture
The system has five components:
- Client — initiates file transfer requests
- Server — accepts and stores incoming files
- Sender — segments files, manages window state, and handles retransmissions
- Receiver — accepts packets, sends ACKs, reorders and reassembles data
- Intermediate node — sits between sender and receiver, applying configurable impairments (loss rate, corruption probability, reorder rate)
How Go-Back-N Works Here
The sender maintains a sliding window of up to N unacknowledged packets. On timeout or NAK, it retransmits all packets from the last unacknowledged sequence number forward. This keeps the protocol simple while tolerating lossy links.
Features
- Configurable packet loss, corruption, and reordering rates via the intermediate node
- Checksum validation for corruption detection
- Bidirectional file transfer (upload and download)
- Automatic timeout-based retransmission
- Supports both small and large file transfers with variable window sizes