1. Homepage
2. Programming
3. COMP SCI 3001/COMP SCI 7039 - Computer Networks and Applications - Programming Assignment 3: Routing Algorithm Assignment

# COMP SCI 3001/COMP SCI 7039 - Computer Networks and Applications - Programming Assignment 3: Routing Algorithm Assignment

AustraliaUniversity of AdelaideCOMP SCI 3001COMP SCI 7039Computer Networks &amp; ApplicationsRouting AlgorithmDistance VectorJavaC++Python

Programming Assignment 3: Routing Algorithm Assignment (Must Use Logbook) (DV) Due 1 Jun by 17:00 Points 200 Available 1 May at 1:00 - 29 Jun at 17:00

Automatic Zero Marks You will get an automatic zero for: a) code that does not compile; b) code that crashes during execution; c) code not submitted and/or leaving code in svn repository only; d) not using correct file names. No exceptions will be made for not following our advice and guidelines. The expectation is that will thoroughly test your implementation prior to submission. Aims Learn about routing protocols and route propagation. Implement a routing protocol. Overview In this assignment, you will be writing code to simulate a network of routers performing route advertisement using a Distance Vector routing protocol. You will need to implement the algorithm in its basic form, and then with Split Horizon to improve the performance of the protocol. Your implementation will need to ensure that the simulated routers in the network correctly and consistently converge their distance and routing tables to the correct state. You will find a more detailed description of the Distance Vector algorithm in the course notes and in section 5.2.2 of Kurose and Ross, Computer Networking, 7th Edition. Your Task Part 1 (DV algorithm) You are to produce a program that:

2. Uses DV algorithm or DV with SH algorithm, as appropriate, to bring the simulated routers to convergence. Output the distance tables in the required format for each router at each step/round. Output the final routing tables in the required format once convergence is reached.

1. The distance table of each router in the following format: X Distance Table at t= 0 Y Z Y 2 INF Z INF 8

where

1. The name of the router , and the current step (starting at 0).
2. The name of the destination router .
3. The name of the next hop router .
4. The current known distance (from the current router , to the destination , via the next hop ) Use INF to represent infinite values and where no link is present
5. Include all routers except the current router in the rows/columns in the table, even if no direct link is present.
6. Rows/columns should be ordered by router name in alphabetical order .
7. Your rows/columns don't have to align , and the amount of white-space you use is your choice , but the easier it is to read the easier your debugging/testing will be.
8. A blank line at the end of the table. When running the algorithm to converge the routing tables and distance tables, this table should be printed for every router (in alphabetical order , by router name), at each step
9. The routing table: X Routing Table: Y,Y,2 Z,Y,5

where

1. The name of the router/node.
2. The name of the destination router/node.
3. The next hop ( an immediate neighbour of the source ).
4. The total minimum cost/distance from the router/node to the destination via the next hop.
5. If a destination is unreachable from the source router/node, your output should look like Y,INF,INF
6. The destination need to be printed in alphabetical order .
7. A blank line at the end of the table.
8. This output should be printed for every router , and every destination (in alphabetical order , by router name, then destination name), each time the routers have reached convergence.
9. Where multiple best routes exist, the first one (next hop) is used (in alphabetical order , by router name). Below is an example of what this output should look like for the provided topology and inputs (shortened, full output HERE X Distance Table at t=0 Y Z Y 2 INF Z INF 8 Y Distance Table at t=0 X Z X 2 INF Z INF 3

Z Distance Table at t=0 X Y X 8 INF Y INF 3 ... X Distance Table at t=2 Y Z Y 2 11 Z 5 8 Y Distance Table at t=2 X Z X 2 8 Z 7 3

Z Distance Table at t=2 X Y X 8 5 Y 10 3

X Routing Table: Y,Y,2 Z,Y,5 Y Routing Table: X,X,2 Z,Z,3 Z Routing Table: X,Y,5 Y,Y,3 X Distance Table at t=3 Y Z Y 2 6 Z 5 3

Y Distance Table at t=3 X Z X 2 INF Z 7 INF

Z Distance Table at t=3 X Y X 3 INF Y 5 INF ... X Routing Table: Y,Y,2 Z,Z,3 Y Routing Table: X,X,2 Z,X,5 Z Routing Table: X,X,3 Y,X,5

Recommended Approach

1. Start by ensuring you're familiar with the DV algorithm. Review the course notes, section 5.2.2 of Kurose & Ross (7th Ed.), and the Wikipedia entry (https://en.wikipedia.org/wiki/Distance-vector_routing_protocol) . Be sure to add logbook entries as you go.
2. Manually determine the expected distance and routing tables at each step for the sample topology Feel free to ask questions and check your tables with your peers on Piazza. Be sure to add logbook entries as you go.
3. Plan your implementation Determine what data structures you'll need, choose a programming language, plan how you're going to parse the input and generate output, plan your algorithm's implementation. Be sure to add logbook entries as you go.
4. Implementation Develop your implementation, testing as you go. Write a makefile if required. Remember , you must add logbook entries as you go. QQ WeChat Whatsapp