Skip to content

UniVe-NeDS-Lab/slow_start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TCP Congestion Window Simulator

A Python tool that simulates the evolution of the TCP Congestion Window (cwnd) and Slow Start Threshold (ssthresh) based on network events. It generates a detailed PDF report containing an evolution graph and a step-by-step event trace table.

usage: congestion.py [-h] [--mss MSS] [--rwnd RWND] (--evolution {ok,mild,severe} [{ok,mild,severe} ...] | --random) [--steps STEPS] [--template TEMPLATE] [--output OUTPUT]

Features

  • TCP Logic Simulation: Implements standard TCP congestion control logic:
    • Slow Start: Exponential growth.
    • Congestion Avoidance: Linear growth.
    • Mild Congestion (3 Duplicate ACKs): Fast Recovery logic.
    • Severe Congestion (Timeout): Reset to MSS (Restart Slow Start).
  • Gilbert-Elliott Model: Optional random event generation using a bursty loss model.

Prerequisites

You need Python 3.x and the following dependencies:

``bash pip install -r requirements.txt

Example:

python3 congestion.py --mss 1460 --rwnd 40000 --steps 10 --evolution ok ok ok ok mild ok ok severe ok ok ok ok ok

Will produce a document with a graph of the congestion window size, and a grid where the student can fill in the events that took place during the protocol evolution.

evolution

In the next page, a solution is provided.

solution

About

A simple implementation of the Slow Start algorithm by VJ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors