Giter Club home page Giter Club logo

network-drive's Introduction

Network Drive

This project is representing a virtual network routing among virtual nodes that connecting via interfaces. Each packet goes to its destination using routing algorithms and finds its way between nodes. It uses Distance Vector routing protocol for routing and forwarding messages. It also supports the Traceroute command to find nodes and interfaces.

How to run

Install vagrant software and then in project directory run

vagrant up

Vagrant configs are to run a virtual machine on your computer. You had to install Virtual Box or other virtual machines. After that, you can connect to the virtual machine using vagrant ssh command.

NOTE: You also can make codes on your machine with standard c++ compiler g++.

You can write a network configs with bellow syntax.

node <node_name> <physical_ip>
<node_name1> <-> <node_name2>

For example a net config for a tree could be something like this :

node A localhost
node B localhost
node C localhost
node D localhost
node E localhost
A <-> B
B <-> C
C <-> D
C <-> E

After writing a config, you should make some lnx file that will run with each node program.

./tools/netconv config

After that some lnx file will be made. For example for node A in our tree nets we have something like this :

localhost 5000
localhost 5001 192.168.0.1 192.168.0.2
localhost 5003 192.168.0.10 192.168.0.9

NOTE: There is some example net config in net's folder.

After that it is time to run each node with a lnx file. first make codes :

make

then for running that for each node run this command :

./node <node_name>.lnx

How to use

With help command, you see how the whole node program works :

> help
- help, h: Print this list of commands
- interfaces, li: Print information about each interface, one per line
- routes, lr: Print information about the route to each known destination, one per line
- up [integer]: Bring an interface "up" (it must be an existing interface, probably one you brought down)
- down [integer]: Bring an interface "down"
- send [ip] [protocol] [payload]: sends payload with protocol=protocol to virtual-ip ip
- traceroute [ip]: show traceroute
- q: quit this node

network-drive's People

Contributors

mhazizian avatar moridi avatar

Stargazers

Ali Edalat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.