Skip to content

Created originally as the repository to maintain the assignments of COMP535 - Computer Networks which includes developing a simulated network instance.

Notifications You must be signed in to change notification settings

Shabirmean/simulatedNetwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simulated Network

The program is intended to create and experiment with networks involving multiple routers. It demonstrates how the Link State Updates happen between routers to maintain the topoology discovery requirment of all the router in the network.

The source can be build and run in several terminal windows to initiate multiple router instances. The program requires a configuration file as an argument.

Sample configuration file can be found at inside the conf directory. The program expects two specific configs from the configuration file:

socs.network.router.ip = <THE SIMULATED IP ADDRESS TO BE GIVEN TO IDENTIFY THIS ROUTER>
socs.network.router.port = <THE PORT IN WHICH THIS ROUTER IS TO BE STARTED>

Once the router is started the following commands can be issued to do create different network topologies:

  • attach [Process IP] [Process Port] [IP Address] [Link Weight]:
this command establishs a link to the remote router which is identified by [IP Address]. 
After you start a router program instance, the first thing you have to do is to run attach 
command to establish the new links to the other routers. This operation is implemented by 
adding the new Link object in the ports array. In this command, besides the Process IP/Port
and simulated IP Address, you also need to specify the "Link Weight" which is the cost for 
transmitting data through this link and is useful when you calculate the shortest path to 
the certain destination.
  • start:
start this router and initialize the database synchronization process. After you establish 
the links by running attach , you will run start command to send HELLO messages and LSAUPDATE
to all connected routers for the Link State Database synchronization. This operation will be 
illustrated in the next section.
  • connect [Process IP] [Process Port] [IP Address] [Link Weight]:
similar to attach command, but it directly triggers the database synchronization without the 
necessary to run start (this command can only be run after start ).
  • disconnect [Port Number]:
remove the link between this router and the remote one which is connected at port [Port Number] 
(port number is between 0 - 3, i.e. four links in the router). Through this command, you are triggering
the synchronization of Link State Database by sending LSAUPDATE (Link State Advertisement Update) 
message to all neighbors in the topology. This process will also be illustrated in the next section.
  • detect [IP Address]:
output the routing path from this router to the destination router which is identified by [IP Address].
  • neighbors:
output the IP Addresses of all neighbors of the router where you run this command.
  • quit:
exit the program. NOTE, this will trigger the synchronization of link state database.
  • ports:
prints the details of each connection in all of its ports (denotes the ports of the simulated router).
  • lsd:
prints the Link State Database entries of this simulated router.
  • topology:
prints the topology graph that shows every connection in the simulated network and their weights. 
Also prints the routing table (calculated by running the Dijkstra's algorithm) for this router. 

This was done as part of the course requirement for COMP535 - Computer Networks at McGill University.

About

Created originally as the repository to maintain the assignments of COMP535 - Computer Networks which includes developing a simulated network instance.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages