Coder Social home page Coder Social logo

yiannisbot / ns3-ipfs-ndn Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 51 KB

Codebase to simulate production code with NS3 using Docker Containers

License: GNU General Public License v3.0

Dockerfile 3.24% Shell 3.64% JavaScript 24.03% Python 69.09%

ns3-ipfs-ndn's Introduction

Network Emulation of Production Code on NS3 Using Docker Containers

The files in this repository are the main configuration files to run NS3 simulations using the production code of IPFS and NDN in Docker Containers. The main setup of importing Docker Containers into NS3 code is provided here: https://chepeftw.github.io/NS3DockerEmulator/ with all the required steps and supporting documentation.

This can be a very powerful tool to emulate the real behaviour of IPFS (or any other protocol (stack) for that matter), but in a simulation environment, which further means that it can scale up to thousands of nodes. This particular setup (see files above) has been used in the following paper, which came out of our team @UCL:

Towards Peer-to-Peer Content Retrieval Markets: Enhancing IPFS with ICN, ACM ICN 2019, Macau, SAR, China, September 2019.

The paper details all the setup parameters, as well as what configuration was used to produce the results. The complete compiled code with the NS3 files and the input to the siulations can be found here: https://www.ee.ucl.ac.uk./ipsaras/files/ipfs_ndn_ns3emulation.tgz (~230MB).

The simulation setup can be used as is, or can be modified as needed to evaluate different aspects of the protocol stacks.

Below a step-by-step guide to get the simulation/emulation started with a basic star topology.

NS3 Docker Emulator HOWTO

Preliminaries:

Run the install.sh script to install ns3, Docker and other tools for the emulator to work. You can also read the docs to learn about the NS3 docker emulator: https://chepeftw.github.io/NS3DockerEmulator/

Configuration:

Open main.new.ipfs.py and modify ns3_home and docker_home variables with paths to ns3 and ipfs docker image.

Run:

Use -n option to set the number of nodes in the topology and -t option to set the simulation time in seconds.

Example:

$ sudo python main.new.ipfs.py -n 10 -t 100 create ---> builds ns3, loads ipfs Docker image and sets up the emulator

$ sudo python main.new.ipfs.py -n 10 -t 100 ns3 ---> starts ns3 and connects with containers

$ sudo python main.new.ipfs.py -n 10 -t 100 emulate ---> starts the experiment

Setting ns3 simulation scenario:

Currently, by default the simulator runs the scenario called tap-vm2. You can find tap-vm2 under the scratch folder of ns-3 (see: bake/source/ns-3.26/scratch/). tap-vm2 creates a star topology with a configurable number of nodes. In order to create different topologies, please refer to ns3 documentation: https://www.nsnam.org/documentation/

ns3-ipfs-ndn's People

Contributors

yiannisbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

donegaan

ns3-ipfs-ndn's Issues

Can haz docs plz? :D

Hi! This looks super valuable but it lacks docs explaining how to use it.

Could you write a tutorial on how to set it up and how to run some basic tests (preferably, all tests written)? Thank you!

An error occurred

Hello, this is great. I configured the environment to run the streaming-ipfs.js file without the master.m3u8 file. Do you need to create a video file to add to the image? Thank you.

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.