matteogreek / measurements-for-comnetsemu

Twamp protocol for ComNetsEmu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Network measurements for ComNetsEmu

How to use

  1. Move inside the net_measures directory located in the examples folder (not yet available inside the last version of ComNetsEmu, clone the repo inside the emulator)

  2. Run the shell script called build_image.sh to build the Docker image

    $ bash ./build_image.sh
    
  3. Run measure.py with the chosen arguments to lunch the measurement script. To see the required arguments:

    $ sudo python3 ./measure.py -h 
    	-h, --help  show this help message and exit
    	-snd SND    Set sender address
    	-rcv RCV    Set receiver address
    	-topo TOPO  Select topology from proposed ones: [tree][chain][dumbbell]
    

    Example:

    $ sudo python3 ./measure.py -snd 10.0.0.1 -rcv 10.0.0.2 -topo tree
    
  4. When prompted, enter the number of hosts to create on the network. If Tree topology is selected, instead of the number of hosts, the script requires the depth and the fanout of the tree.

  5. When the measurements are finished the results can be viewed by opening results.html or the specified plot pathload_results.svg and twamp_results.svg

How it was built

Main Functions

  • The Round-trip time as well as One-way delay is measured using a Python implementation of the Two-Way Active Measurement Protocol (TWAMP) as defined in RFC5357.The official implementation of the twamp protocol used can be found here.

  • The Available bandwidth is estimated with Pathload. The implementation of Pathload used can be found here.

  • To emulate different scenarios where the network measurement tools could be tested to assess their accuracy and intrusiveness, cross-traffic was introduced into the network. To accomplish this, a platform capable of generating traffic called D-ITG was used. The official implementation of the tool can be found here. To manually test the performances of the tools in the docker-in-docker scenario and directly on the Docker host, the traffic.py script was added.

Containerization

Both the measurements techniques are containerize. To containerize the Python scripts we create the Dockerfile for the respective Docker image. Then we create the image with the command shown below found inside the file called build_image.sh

$ docker build -t measure --file ./Dockerfile

Network Topology Emulation

Based on the choice made when launching the script, 3 different topologies can be created.

  1. Chain topology with n switches and n hosts
    h1     h2     h3         hn
    |      |      |          |
    s1 --- s2 --- s3 --- ... sn
    
  2. Tree topology with depth = 2 and fanout = 2
         s1
       //   \\		
      s2     s3
    //  \\ //  \\
    h1   h2 h3   hn
    
  3. Dumb-bell topology with fixed number of switches and n hosts split equally splitted on both sides
      h1 \\	      // h2
          s1 --- s2
    hn/2 //	      \\hn/2
    

About

Twamp protocol for ComNetsEmu


Languages

Language:HTML 51.2%Language:C 31.4%Language:Python 17.2%Language:Shell 0.1%