Question: Objective: To find the least cost forwarding path for all routers using Dijkstras algorithm. Requirements: 1. Create a C based code to find the least

Objective:

To find the least cost forwarding path for all routers using Dijkstras algorithm.

Requirements:

1. Create a C based code to find the least cost forwarding path for a given set of six routers

2. Use Dijkstras algorithm to find the least cost path. The algorithm will generate its least cost routing paths

3. The C program should be able to read a file (router.txt) for the cost information

4. The C program should be able to find the least cost forwarding path for at least six routers

5. The least cost forwarding path details should be written to a file and to the console.

Procedure:

1. Create a C-based code that runs on the cse server

2. Open the router.txt file and read the cost between the routers. Your code should be able to support at least six routers

3. Use the Dijkstras algorithm to find the least cost forwarding path between the routers

4. The format of the input file is s d c Where s is the source, d is the destination, and c is the cost between source and destination.

5. Write to a file (LS.txt) and print to the console the forwarding table for all the routers that were computed using Dijkstras algorithm. The output file will have the destination router and least cost link connecting it

6. The input and output file formats are shown below for the network shown in Figure 1. The output file format shows only the output for two routers u and v but you should generate least cost path for all routers. An example input file router.txt is available on Blackboard for the network shown in Figure 1.

Objective: To find the least cost forwarding path for all routers using

Input File Format Output File Format: u v 2 u w 5 u x 1 v x 2 v (u, v) w (u, x) x (u, x) y (u, x) z (u, x) x y 1 u (v, u) w (v, w) x (v, x) y (v, x) z (v, x) w y 1 w z 5 Input File Format Output File Format: u v 2 u w 5 u x 1 v x 2 v (u, v) w (u, x) x (u, x) y (u, x) z (u, x) x y 1 u (v, u) w (v, w) x (v, x) y (v, x) z (v, x) w y 1 w z 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!