My task is to implement Distance Vector Multicast Routing Protocol (DVMRP) using files (No sockets or threads). I will have three java programs
- Host.java
- Router.java
- Controller.java
The procedure for testing is:
- Run the test1.sh script file on a new terminal window
test1.sh looks like:
rm -f lan? hout? hin?
rm -f rout?
router 0 0 1 &
router 1 1 2 &
router 2 2 3 &
router 3 3 0 &
controller host router 0 1 2 3 lan 0 1 2 3&
Here, the line containing
router 0 0 1 &
means that a process is created from the executable file "router" (basically Router.java) and runs it in the background with input 0 0 1, & is I think to say that its in bash mode.
Similarly the next line
router 1 1 2 &
means that another process is created from the executable file "router" (basically Router.java) and runs in the background with input 1 1 2.
Similarly, the line:
controller ...
means that another process is created from the executable file "controller" (basically Controller.java) and runs in the background with the corresponding input.
How to do this? Sorry for earlier confusion :)
java Router 0 0 1 &router 0...9 host 0...9 lan 0...9This input tells the controller process that there are routers and their router-id which ranges from 0 to 9, hosts and their host-id which ranges from 0 to 9, lans and their lab-id which ranges from 0 to 9