A visual simulation of the Routing Information Protocol (RIP) distance-vector algorithm, with animated router and packet images.
- Python 3.8 or higher
- Pillow (for image assets) — install with:
pip install pillowIf Pillow is not installed, the simulation still runs using plain coloured shapes as fallback.
- Install Python from https://python.org (check "Add Python to PATH")
- Open Command Prompt in the project folder and run:
pip install pillow python main.py
pip3 install pillow
python3 main.py# Install tkinter if missing (only needed once)
sudo apt install python3-tk # Debian / Ubuntu
sudo pacman -S tk # Arch / CachyOS / Manjaro
pip install pillow
python3 main.pyrip-sim/
├── main.py # Entry point
├── gui.py # Tkinter GUI (topology editor + simulation)
├── router.py # Router class and distance-vector logic
├── rip_algorithm.py # One round of RIP update
├── network_topology.py # Load topology from file
├── utils.py # Shared constants and formatting helpers
├── test_rip.py # Headless test (no GUI needed)
├── assets/
│ ├── router.png # Router node image
│ └── packet.png # Travelling packet/message image
└── data/
└── topology.txt # Default topology loaded on startup
python3 test_rip.pyEach line defines one undirected link:
R1 R2
R2 R3
R3 R4
You can also define the topology interactively using the built-in topology editor.