This Python script simulates dynamic network routing using the Distance Vector Routing algorithm. It allows for changes in network topology over time and updates routing tables accordingly.
- Python 3.x
- Required Python packages:
queue
-
Clone this repository to your local machine by running:
git clone https://github.com/ShubhamPhapale/distance-vector-routing/tree/main
-
Ensure you have Python 3.x installed.
-
Install the required Python package by running:
pip install queue
-
Place your network topology configuration in
input.txt
and any dynamic changes inchange.txt
. -
Run the simulation by executing the following command in your terminal:
python dvrDynamicChanges.py
The input.txt
file should contain the initial network topology configuration. It should have the following format:
<num_routers>
<space-separated list of router names>
<src>
<dest>
<cost>
<src>
<dest>
<cost>
...
EOF
Example:
3
A B C
A B 2
B C 3
C A 4
EOF
The change.txt
file contains dynamic changes in the network topology. It should have the following format:
<src>
<dest>
<cost>
<timestamp>
<src>
<dest>
<cost>
<timestamp>
...
Example:
A B 5 10
B C 2 15
If the change.txt
file is empty, the program will run with the initial network configuration provided in input.txt
.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Added some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request