Coder Social home page Coder Social logo

mwarning / meshnetsimulator Goto Github PK

View Code? Open in Web Editor NEW
74.0 10.0 8.0 1.85 MB

A simulator for sketching mesh network routing strategies

License: BSD 3-Clause "New" or "Revised" License

Rust 100.00%
mesh-networks network-visualization freifunk simulation mesh routing-algorithm manet

meshnetsimulator's Introduction

Mesh Network Routing Algorithm Simulator

Currently not maintained - I write routing protocols in C now and use my emulator.

This is a simple discrete event simulator for sketching mesh network routing strategies in the hopes to find better approaches to mesh routing. Please note that this simulator does not virtualize a TCP/IP stack nor all characteristics of wireless connections. The dynamic nature of MANETs is also not (yet) covered by this simulator.

The simulator is controled via a command line that can also be reached over a network. The output from the simulator is a json files and can be displayed using the Mesh Graph Viewer.

The motivation for this project is that community networks such as Freifunk struggle with scaling issues of their MANETs. The cause is management traffic caused by hundreds of nodes. But testing new algorithms for scalability is a problem since many nodes are required. That is what this high speed simulator is helping with.

Also part of this repository are basic information about mesh routing protocols.

Note: While some routing algorithms have been implemented. Most of them are not in a working state right now.

Overall Workflow

  1. Design algorithm
  2. Test algorithm (<= MeshNetSimulator)
  3. Code program
  4. Test on virtual hardware
  5. Test on real hardware

How to Use

Run the program and use the command line commands to create/load a topology. Then select a routing algorithm, perform a few simulation steps and run the test command.

$ mkdir ~/simulation
$ cd simulation
$ ./MeshNetSimulator-amd64-linux
Listen for commands on 127.0.0.1:8011

Every time toplogy or node state changes, a new graph.json file is written. You can use the GraphViewer frontend to visualize the topology and node states:

$ ./MeshNetViewer-amd64-linux ~/simulation/graph.json --call tcp://127.0.0.1:8011 --config config.json --open

Now the web browsers opens and commands can be passed to the MeshNetSimulator from the command line in the web browser interface. Results will be displayed.

Command Line

The interactive command line allows to control the routing simulator. It is accessible from the terminal and via TCP/UDP/Unix socket.

Simulation:

  • algo [<name>]
    Set current routing algorithm or print list of available algorithms.
  • sim_step [<steps>]
    Run simulation steps. Default is 1.
  • sim_reset
    Reset simulator state.
  • sim_info
    Show simulator state.
  • progress <true|false>
    Show simulation progress.
  • test [<samples>]
    Test routing algorithm with optional sample size.
    Does not change node state.
  • debug_init <source> <target>
    Debug routing path from source to target.
    Does not change node state.
  • debug_step
    Perform a routing step on the path that was initialized.
    Does not change node state.

Graph info:

  • graph_info
    Show graph state.
  • get <key>
    Get node property.
  • set <key> <value>
    Set node property.

Graph topology:

  • graph_clear
    Clear graph.
  • line <node_count> <create_loop>
    Add a line of nodes. Connect ends to create a loop.
  • star <edge_count>
    Add star structure of nodes.
  • tree <node_count> [<inter_count>]
    Add a tree structure of nodes with interconnections
  • lattice4 <x_xount> <y_count>
    Create a lattice structure of squares.
  • lattice8 <x_xount> <y_count>
    Create a lattice structure of squares and diagonal connections.
  • remove_nodes <node_list>
    Remove nodes. Node list is a comma separated list of node ids.
  • connect_nodes <node_list>
    Connect nodes. Node list is a comma separated list of node ids.
  • disconnect_nodes <node_list>
    Disconnect nodes. Node list is a comma separated list of node ids.
  • remove_unconnected
    Remove nodes without any connections.

Graph positions:

  • positions <true|false>
    Enable geo positions.
  • move_node <node_id> <x> <y> <z>
    Move a node by x/y/z (in km).
  • move_nodes <x> <y> <z>
    Move all nodes by x/y/z (in km).
  • move_to <x> <y> <z>
    Move all nodes to x/y/z (in degrees).
  • rnd_pos <range>
    Randomize node positions in an area with width (in km) around current node center.
  • connect_in_range <range>
    Connect all nodes in range of less then range (in km).

Meta:

  • run <file>
    Run commands from a script.
  • import <file>
    Import a graph as JSON file.
  • export <file>
    Export a graph as JSON file.
  • show_mst
    Mark the minimum spanning tree.
  • crop_mst
    Only leave the minimum spanning tree.
  • exit
    Exit simulator.
  • help
    Show this help.

Build Program

Use cargo build or cargo run to build the project. Cargo is the Rust package manager and build tool.

Similar Software

Big Projects

OMNeT++: OMNeT++ is an extensible, modular, component-based C++ simulation library and framework, primarily for building network simulators.

ns-3: ns-3 is a discrete-event network simulator for Internet systems, targeted primarily for research and educational use.

EMANE: Extendable Mobile Ad-hoc Network Emulator.

http://www.brianlinkletter.com/open-source-network-simulators/

Small Projects

MLC: Use lxc containers to simulate mesh networks.

Network Mesh Emulator: Use VirtualBox images with OpenWrt.

Various Links

Various Scientific Papers

A collection of scientific papers somewhat related to Mobile Ad-Hoc Mesh Routing.

Mesh Radio Projects

A collection of projects.

meshnetsimulator's People

Contributors

mwarning avatar reneci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meshnetsimulator's Issues

Selecting Nodes??

Please could explicitly explain how to select stating and ending nodes on OSX. Clicking on one node puts a light halo around it - but then clicking on another node just transfers the halo to the new node. So I can't ever "Add a Route".
Thanks

Update selected text on site reload

When the site is relaoded, previously selected files are selected again.
But the file name is not shown because the we update the name file on "onchange='...'".

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.