Question: USING JAVA - Your simulator needs to build routing tables and then forward data packets until they reach their destinations based on the routing tables
USING JAVA - Your simulator needs to build routing tables and then forward data packets until they reach their destinations based on the routing tables built.
Each network topology file consists of a number of rows, each row represents a single edge in the network. There are three entries per row. The first entry is the node ID at one end, the second is the node ID at the other end, and the third entry is the cost of the link between the nodes which will be used in computing optimal routes. For example, a row with these values: 2 12 23 means that there is a link between node 2 and node 12 and that link has a cost 23. Here are three topologies to use:
Toplogy1.txt (5 nodes, 7 edges)
4 1 532 4 2 669 3 2 722 3 4 196 0 1 907 0 2 291 1 3 24
Toplogy2.txt (10 nodes, 20 edges)
9 4 723 9 2 310 8 4 607 8 9 800 6 8 390 6 9 841 1 6 592 1 8 968 3 1 446 3 4 608 7 8 129 7 6 894 5 7 95 5 4 627 0 9 711 0 5 95 2 8 96 2 6 839 4 0 828 4 6 184
Toplogy3.txt (30 nodes, 60 edges)
23 15 67 23 8 119 16 23 986 16 15 921 7 16 180 7 8 793 22 8 57 22 15 536 9 7 978 9 16 16 21 15 823 21 23 280 6 15 849 6 16 23 1 16 756 1 22 712 29 7 181 29 23 163 14 6 240 14 1 840 24 23 229 24 29 306 4 1 47 4 6 799 19 16 227 19 9 281 26 4 807 26 16 64 11 7 998 11 29 104 18 4 1020 18 19 786 3 21 376 3 6 686 12 1 265 12 26 370 27 22 268 27 7 842 17 9 312 17 22 477 2 22 269 2 14 73 13 16 755 13 2 986 28 6 535 28 1 498 20 13 1001 20 26 255 25 27 578 25 1 554 10 1 497 10 22 44 5 6 390 5 2 1028 0 20 254 0 22 917 15 4 694 15 28 246 8 17 109 8 2 513
Initially, every node is only aware of its immediate neighbors (and thus would not have a complete picture of the topology). To build routing tables, nodes will proceed in Rounds. At the beginning of every round, each node will prepare a DV packet that it would send to its immediate neighbors. DV packets include the source node and the list of nodes-costs pairs for what this node knows about the network. In every round, a pair of nodes that are connected will exchange their DV packets and update their tables. The above topologies were generated using BRITE. Make sure nothing is hard-coded (even the number of nodes!). Your simulator should take as a line argument, which topology file to use along with the duration to run your simulation (e.g., how many rounds needs to be simulated). Distance Vector Recall that in a distance vector-based routing algorithm, each node would tell its neighbors, what it knows about the whole network. As nodes exchange information with their neighbors in every round, they update their routing tables if better routes are discovered. Each node would maintain a routing table that consists of destination, cost, next hop. The DV packet each node sends is simply the destination and cost pairs (no need to send the next hop). When a node receives a data packet, it consults its routing table and forwards the packet to the next hop, which would do the same until the packet reaches the destination.
Show the full routing table of one of the topology files
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
