[SOLVED] CSCI3761 Lab 2-Distance Vector Algorithm

30.00 $

Category: Tags: , , , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon PA2-DistanceVectorAlgorithm-ceowco.zip (249.5 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

• Goal – We will learn the basic of distance vector algorithms, using TCP socket

applications.

•Project Description: DV (Distance Vector Algorithm)

  • In this programming assignment, you are to build a simple Distance Vectorprogram that will communicate with N partners.

    o DV program

    • §  You will run N instances on your machine
    • §  Each instance will run on a different port (instance 1 will run on port18181, instance 2 on port 18182, instance 3 on port 18183, etc),
    • §  The program will start by reading in the appropriate neighbors fileand vector file.
    • §  The program will ONLY read vectors where the fromNode is equalto that node. For instance, node 1 will only read in vectors where

      node1 is the fromNode.

    • §  The program will read in the should support the following requestsfrom clients:
  • Show files at the server’s current directory: ‘print’
    o This will print the current vector table on a node.
    o ONLY print valid vectors (don’t print uninitialized ones)
  • Download files: ‘refresh’

o This will force the current node to send it’s vector table to all it’s neighbors.

• Upload files: ‘update
o This will be of the form: Update fromNode toNode cost o Update checks that the toNode is the current node

§ If it is not it is ignored
o Update then checks if the toNode-fromNode exists in vector table. If it does

not it is added and neighbors are notified
o If the pair is in the table, the if the new cost is less than the old

cost, that cost is stored and the neighbors are notified.

o Programming environment

  • §  All programs should be written C or C++ and run on UNIX likeplatform.
  • §  The starter code works on Mac and should work on linux
  • §  All connections between a server and clients should be TCP/IPsocket.
  • §  I have included a makefile and all the required templates

o Required Skills
o Everyone is expected to know following skills and knowledge in

order to complete this programming assignment.

  • §  TCP/IP Socket programming
  • §  Understanding UNIX like Operating System
  • §  Creating/invoking processes in UNIX like environment
  • §  Makefile
  • §  C or C++•Deliverables

• The deliverables for this assignment include the following files:

o Written C or C++ Code for program
o Makefile
o Readme: A short description of your programs includes: the names of

created executable images which will be created after run your makefile, how to run your programs.

•Submission
• Please do the followings when you submit your programming assignment.

o Create a zip file that contains your written source code, makefile and readme. DO NOT INCLUDE EXECUTABLES AND COMPILED OBJECT FILES.

o Upload it to the class Canvas by deadline.

•Grading
• The maximum point for the assignment is 40. This programming assignment will

be graded by following criteria.

o Completeness: 40 points § Connection :

• 10 points – if your server can connect to all nodes

§ Function :

  • 10 : if your server shares vectors will all neighbors
  • 0: Otherwise§ Commands
  • 3.33 points for each command
  • “download” and “upload” service is 4 points each§ Code quality 10points
    • Comments/structure/etc.

    o EXTRA credit 10pts

  • §  Enhance the program so that a user can type in ROUTE <node>
  • §  The program will respond with the current lowest cost to <node> andwhat the first/next hop is
  • PA2-DistanceVectorAlgorithm-ceowco.zip