Skip to content

Commit f4706d2

Browse files
authored
Updated readme
1 parent bb31c9e commit f4706d2

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

README.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,52 @@
1-
Distance-Vector-Routing-Protocol-CPP-Implementation
1+
This is a C++17 implementation of [Distance Vector Routing Protocol](https://en.wikipedia.org/wiki/Distance-vector_routing_protocol) using Virtual Ethernet Interface of **Linux Operating System**.
2+
This implementation was done as an assignment of Computer Networking Sessional Course of Department of Computer Science & Engineering, BUET
3+
4+
5+
6+
Files Description:
7+
- "setup.sh" : Contains the necessary shell commands to setup virtual interface
8+
- "unsetup.sh" : Contains the necessary shell commands to remove the created virtual interface
9+
- "driver.py" : Contains the python program codes to operate the routers in virtual interface
10+
- "topo.txt" : Contains topology info of the network.(whole network picture given in "Assignment_spec.pdf")
11+
- "router.cpp" : Contains codes of router program.
12+
- all Other Files : Contains utility codes for router.cpp
13+
- "Testing Commands": Contains some sample commands for "driver.py"
14+
15+
16+
17+
System Requirements:
18+
- Linux Operating System (Tested on Ubuntu 18, 19beta)
19+
- C++17 or higher (Tested using GNU G++ 8.2)
20+
- Python2
21+
- Here IPs of virtual interfaces used from "192.168.10.[1-4]" and IP of driver is "192.168.10.100". If your system uses any of these IPs then you must change these in "topo.txt" and "driver.py". Moreover you should change your ethernet interface name ("enp1s0" here) according to your machine interface name (can be determined by "ifconfig" command) in "topo.txt"
22+
23+
24+
25+
To simulate the protocol:
26+
- First run "setup.sh" shell script in terminal
27+
> ./setup.sh
28+
- Then compile and create router executable file from "router.cpp"
29+
> c++ router.cpp -std=c++17 -o router.out
30+
- Run "router.out" with two arguments, router-ip as 1st argument and topology-file-name as 2nd one in separate terminals for each ip.
31+
> ./router.out router-ip topo.txt
32+
- Finally run the "driver.py"
33+
> ./driver.py topo.txt
34+
- Now, type help in python console to see the available commands.
35+
Sample Demonstration:
36+
- [Terminal:01]
37+
>> ./router.out 192.168.10.1 topo.txt
38+
- [Terminal:02]
39+
>> ./router.out 192.168.10.2 topo.txt
40+
- [Terminal:03]
41+
>> ./router.out 192.168.10.3 topo.txt
42+
- [Terminal:04]
43+
>> ./router.out 192.168.10.4 topo.txt
44+
- [Terminal:05]
45+
>> ./driver.py topo.txt
46+
>> help
47+
>> show 192.168.10.1
48+
49+
50+
For further details, see "Assignment_spec.pdf".
51+
52+
This has been created as a CLion Project. That's why "CMakeLists.txt" exists here.

0 commit comments

Comments
 (0)