Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

OSPF Routing In this assignment you are to write a Java program that computes a routing table using Dijkstra's Forward-Search Algorithm Input Prompt the user

image text in transcribed
OSPF Routing In this assignment you are to write a Java program that computes a routing table using Dijkstra's Forward-Search Algorithm Input Prompt the user for the name of the LSP file. This file contains one or more Link State Packets. An LSP is a string consisting of a three character Node ID, a three character Neighbor ID, and a one character Cost to that neighboring node. Each field is separated by a space. The following list of values (split over 6 columns) can be used to test your program R01 R02 2 R02 RO5 2 R03 R027 R03 R04 3 R03 RO63 R04 R03 3 R04 R082 R05 R02 2 R05 R062 R05 R071 R06 RO33 R06 R05 2 R06 R08 2 R07 R016 RO7 R051 R07 R08 4 R08 R042 RO8 R074 R01 R076 R02 R01 2 R02 R037 Computing the Routing Table Entries The routing table consists of three entries: the Destination node, the Cost to get to that node, and the Next Hop. To create the table, use the algorithm from the L09-1 OPSF Exercise and compute the table values relative to node R01 (or prompt the user and ask for the node ID): 1. Initialize confirmed list with an entry for itself at a cost of 0 2. Select the Link State Packet for the node just added to confirmed list 3. For each unconfirmed neighbor of that node a) compute the cost to reach that node's neighbor as the cost of myself to that node plus the cost from that node to its neighbor b) if the neighbor is not on the tentative list then add it and set next hop to equal to the first node I must access to reach it. c) if the neighbor is already on the tentative list and the new cost is less than the current cost, replace the current entry 4. Move the lowest cost Tentative entry to Confirmed 5. If the tentative list is empty then quit otherwise return to step 2. The data structures within your program are up to you (linked lists, arrays, hash tables, etc) Output Display the routing table after it has been computed. For the test values above the output would be: Node R01 R02 R03 R04 RO5 R06 R07 R08 Distance Next Hop R01 R01 R02 RO8 RO2 RO5 RO5 RO 6 10 OSPF Routing In this assignment you are to write a Java program that computes a routing table using Dijkstra's Forward-Search Algorithm Input Prompt the user for the name of the LSP file. This file contains one or more Link State Packets. An LSP is a string consisting of a three character Node ID, a three character Neighbor ID, and a one character Cost to that neighboring node. Each field is separated by a space. The following list of values (split over 6 columns) can be used to test your program R01 R02 2 R02 RO5 2 R03 R027 R03 R04 3 R03 RO63 R04 R03 3 R04 R082 R05 R02 2 R05 R062 R05 R071 R06 RO33 R06 R05 2 R06 R08 2 R07 R016 RO7 R051 R07 R08 4 R08 R042 RO8 R074 R01 R076 R02 R01 2 R02 R037 Computing the Routing Table Entries The routing table consists of three entries: the Destination node, the Cost to get to that node, and the Next Hop. To create the table, use the algorithm from the L09-1 OPSF Exercise and compute the table values relative to node R01 (or prompt the user and ask for the node ID): 1. Initialize confirmed list with an entry for itself at a cost of 0 2. Select the Link State Packet for the node just added to confirmed list 3. For each unconfirmed neighbor of that node a) compute the cost to reach that node's neighbor as the cost of myself to that node plus the cost from that node to its neighbor b) if the neighbor is not on the tentative list then add it and set next hop to equal to the first node I must access to reach it. c) if the neighbor is already on the tentative list and the new cost is less than the current cost, replace the current entry 4. Move the lowest cost Tentative entry to Confirmed 5. If the tentative list is empty then quit otherwise return to step 2. The data structures within your program are up to you (linked lists, arrays, hash tables, etc) Output Display the routing table after it has been computed. For the test values above the output would be: Node R01 R02 R03 R04 RO5 R06 R07 R08 Distance Next Hop R01 R01 R02 RO8 RO2 RO5 RO5 RO 6 10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago