A comprehensive simulation of Reliable Data Transfer (RDT) and TCP Congestion Control protocols, focusing on packet reliability, corruption handling, and network flow control.
- RDT 2.2: Implements a stop-and-wait protocol that handles corrupted packets using checksums and ACKs with alternating sequence numbers (0 or 1).
- RDT 3.0: Simulates a channel with both packet loss and corruption. It features a multi-threaded timer implementation using
std::mutexandstd::condition_variableto handle retransmissions upon timeout.
- TCP Tahoe: Simulates the Slow Start and Congestion Avoidance phases. Upon detecting packet loss, the congestion window (
cwnd) is reset to 1, andssthreshis updated to half of the currentcwnd. - TCP Reno: Enhances the simulation by adding logic for Triple Duplicate ACKs. It distinguishes between timeouts (resetting
cwndto 1) and duplicate ACKs (performing fast recovery by settingcwndtocwnd/2).
- Checksum Logic: Validates data integrity by summing sequence numbers and ASCII values of the payload.
- Unreliable Channel: Simulates real-world network conditions using a
transmitfunction with configurable loss and corruption probabilities (default set to 0.3). - Concurrency: Utilized C++ threads in RDT 3.0 to manage non-blocking protocol timers.
/Transport-Layer: C++ source code for RDT 2.2 and RDT 3.0./Congestion-Control: C++ source code for TCP Tahoe and TCP Reno./docs: Detailed assignment report containing logic analysis and output screenshots.
Compile the files using any C++11 compliant compiler. For RDT 3.0, ensure you link the pthread library:
g++ RDT_3.0.cpp -pthread -o rdt3
./rdt3