Routing table simulation
To create a distributed simulator of a router program which, when instantiated in several machines, will start communicating with each other to create a routing table at each site.
Your software (which should be called myRouter) will be an independent application under Linux. When it is run, it takes the file name as its argument. So the command line will look like:
java myRouter data.txt
where “data.txt” will have the form e.g.
1. 9989 is the port number which it uses to receive routing data from other routers and receive datagrams from other routers and clients. Please use port numbers from 20001 to 20010 while running the program in Windows.
2. A, B, .. are the names of networks it is connected to (usually two or more).
3. A:126.96.36.199:8989 means this router is connected to A, and there is another router sharing this A which is running at 188.8.131.52:8989.
Routing Table Maintenance
You write only one program (can consist of several classes but only one main method). That same program is run in several PCs concurrently, with arguments as discussed above. They will start communicating with each other, to get a complete routing table at each site. Then they will output the routing table to the standard output. You can use either a distance vector or a link state.
Here is an example output. These are actual outputs after the program is run (tables are in columns defined as Network, hops and route):
A --- r1 --- B --- r2 --- C
r3 - (itl115)
A 0 direct
E 0 direct
B 1 /184.108.40.206
C 2 /220.127.116.11
I already have code for client server communication written in Java and working properly. I now need help with accessing routing table of each router and then appending it with the new entries and displaying it at each terminal with output displayed as above.
This is urgent and would really appreciate if somebody can provide program structure since I dont have much experience working on networking in Java.