/acn-multicast-protocol

Simulate a Multicast Routing Protocol on top of Link State Routing Protocol (Advanced Computer Network Course)

Primary LanguageJava

About
======

This is a program that simulates multicast protocol in a network. The multicast protocol is developed on top of a Link State Routing Protocol. This project is developed as a part of Advanced Computer Networks course at UT Dallas.  

Compilation Instructions
========================

(Please have the 'topology' file in the current working directory. Note that the toplogy file name is just 'topology' and it doesn't have any extension. In the project description given by the professor, it is like that only) 

$> javac controller.java
$> javac node.java

Execution Instructions (Please try executing it in cs2.utdallas.edu) 
======================

$> sh flush.sh (this is just for removing the files created after successful execution of a scenario) 
$> sh scenario.sh

1. Place the scenario you want to try in a separate 'scenario.sh' file. There can also be a separate file 'flush.sh' that removes the files generated by the program. 

The contents of the scenario file will look like this:

> scenario.sh (file) 

java controller &
java node 4 &
java node 5 &
java node 6 &
java node 9 receiver 0 &
java node 0 sender "this is node 0 mutlicast message" & 

The contents of 'flush.sh' might look like the following:

> flush.sh (file) 

rm -f input_*
rm -f output_*
rm -f *_received_*

2. The topology file will contain the topology of the network. The format of topology file is like:

0 1 (means there is a link from 0-->1)
1 0 (means there is a link from 1-->0)

3. The runtime of the simulation is 150 seconds. So please be patient until the program gets over. You can use the 'ps' command to see the running processes. 

Example Usage of 'ps': 

$> ps h 

My program will automatically get terminated after 150 seconds. 

4. At the end of the simulation you can view the output and input files. 

Killing a Node in the network
=============================

(WARNING: Do not kill the controller node as the simulation is based on that only) 

You may want to kill a node in between the simulation to see if the program handles link failure. This can be done using kill command of unix. 

First use the ps command to display the list of processes. And then use the process id corresponding to a node to kill it. 

Example
-------

$> ps h

 8317 pts/2    Ss+    0:00 /bin/bash
11657 pts/3    Ss     0:00 bash
23121 pts/0    Sl     0:00 controller controller
23122 pts/0    Sl     0:00 java node 4
23123 pts/0    Sl     0:00 java node 5 receiver 1
23124 pts/0    Sl     0:00 java node 9 receiver 0
23125 pts/0    Sl     0:00 java node 0 sender this is node 0 mutlicast message
23126 pts/0    Sl     0:00 java node 3
23257 pts/3    R+     0:00 ps h
29479 pts/0    Ss+    0:00 /bin/bash

$> kill -9 23136

The above command kills node 3 in the network. 

Author
======
Vivek Venkatesh Ganesan
Contact: g.vivekvenkatesh@gmail.com