Skip to content

Nehuen1304/reliable-transport-protocol-cpp

Repository files navigation

📡 Reliable Transport Protocol & Congestion Control

A robust Transport Layer Protocol implementation in C++ using the OMNeT++ simulation framework. This project engineers a solution to the "Producer-Consumer" problem in distributed networks, implementing Flow Control and Congestion Control algorithms to prevent packet loss and bufferbloat under high-throughput scenarios.

Network Topology (Figure: Simulation topology illustrating the bottleneck placement and feedback loop)

🚀 Key Engineering Features

  • Reliable Transport: Custom implementation of a connection-oriented protocol ensuring ordered delivery and data integrity.
  • [cite_start]Flow Control (Backpressure): Implemented a feedback mechanism where the receiver actively advertises its available buffer space (advertisedWindow) to throttle the sender, preventing receiver overflow[cite: 326].
  • [cite_start]Congestion Control: Dynamic cwnd (Congestion Window) adjustment inspired by TCP (AIMD/Slow Start) to react to network saturation events[cite: 342, 376].
  • [cite_start]Zero Packet Loss: Achieved 0% packet drop rate in controlled saturation tests by effectively balancing the transmission rate against the bottleneck capacity[cite: 408].

📊 Performance Analysis

We conducted stress tests comparing a naive "open-loop" system vs. the optimized "closed-loop" (feedback) system.

1. Throughput Efficiency (Saturation)

The system successfully maximizes channel utilization (Goodput) up to the physical bottleneck limit (5 packets/sec) without collapsing.

Throughput Saturation (Figure: Goodput vs. Offered Load. The linear growth and smooth plateau demonstrate perfect bandwidth utilization)

2. Latency Control (Congestion Avoidance)

Unlike the naive approach where delay grows exponentially upon saturation, the Feedback mechanism stabilizes the End-to-End delay, preventing buffer starvation and uncontrolled lag.

Latency Control (Figure: Average Delay vs. Offered Load. The system manages queue sizes effectively even under heavy load)

📄 Technical White Paper

For a deep dive into the mathematical proofs, loss probability analysis, and detailed architectural decisions, refer to the full engineering report:

👉 Read the Performance Analysis Report (PDF) (Note: Original documentation in Spanish)

🛠️ Tech Stack & Tools

  • Core Logic: C++17 (Custom Modules)
  • Simulation Engine: OMNeT++ (Discrete Event Simulation)
  • Protocol Design: Sliding Window, ACKs, RTO (Retransmission Timeouts)
  • Data Analysis: Python (Matplotlib/Pandas) for generating performance curves.

🚦 How to Run

(Assuming OMNeT++ environment is set up)

# 1. Build the project
make

# 2. Run the simulation (GUI mode)
./lab3-kickstarter -m -u Cmdenv

# 3. Analyze results
# Results are generated in the /results folder as .vec and .sca files

About

Reliable Transport Layer protocol implementation in C++ using OMNeT++ simulation (Congestion Control & Flow Control)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors