Git Product home page Git Product logo

mda-lite's Introduction

Multilevel MDA-Lite Paris Traceroute (MMLPT)

Multilevel MDA-Lite Paris Traceroute is a portable (Linux, MacOS, Windows) traceroute-like tool capable of both giving IP and router level view. It supports IPv4 for IP level and router level, and IPv6 only for IP level.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

MMLPT is written in Python, and uses different libraries to work.

To craft, send and parse packets, it uses scapy:

sudo pip install scapy

To provide a rich graph view, and to compute the IP and router level graphs, MMLPT uses graph-tool, which is a boost C++ library with a python wrapper.

Follow the instructions in the following link to install graph-tool. As the C++ Library makes an extensive use of metaprogramming and templates, it can take a while (up to 30 minutes on a recent laptop) to compile graph-tool:

Graph-tool

Installing

To install then, just tap:

sudo python setup.py install

Running

To run a simple MDA-Lite traceroute at IP level, tap

sudo python MDALite.py destination

To run MDA-Lite traceroute at both IP and router level, tap:

sudo python MDALite.py -a destination

You can tap the following command for the different options

sudo python MDALite.py --help

Recall that on very large topologies, the measurement can take few minutes, up to 10-15 on very complex topologies.

Exploring traceroute results

You should have this kind of output:

(0) : 127.0.0.1 -> ['192.168.0.254']

(1) : 192.168.0.254 -> ['137.194.164.254']

(2) : 137.194.164.254 -> ['137.194.4.240']

(3) : 137.194.4.240 -> ['212.73.200.45']

(4) : 212.73.200.45 -> ['4.69.161.114', '4.69.161.110']

(5) : 4.69.161.114 -> ['4.68.111.194']

4.69.161.110 -> ['4.68.111.194']

(6) : 4.68.111.194 -> ['62.115.122.10', '62.115.122.4']

(7) : 62.115.122.10 -> ['62.115.122.139']

62.115.122.4 -> ['62.115.123.12']

(8) : 62.115.123.12 -> ['62.115.138.236']

62.115.122.139 -> ['62.115.138.104']

(9) : 62.115.138.104 -> ['62.115.133.31', '62.115.136.37', '62.115.141.205', '62.115.119.115', '62.115.136.113', '62.115.139.107', '62.115.114.171', '62.115.136.35']

62.115.138.236 -> ['62.115.136.107', '62.115.133.29', '62.115.136.21', '62.115.136.23', '62.115.114.167', '62.115.141.201', '62.115.119.113', '62.115.136.25']

(10) : 62.115.136.107 -> ['213.248.79.106']

62.115.133.31 -> ['213.248.79.106']

62.115.133.29 -> ['213.248.79.106']

62.115.136.37 -> ['213.248.79.106']

62.115.141.205 -> ['213.248.79.106']

62.115.136.21 -> ['213.248.79.106']

62.115.119.115 -> ['213.248.79.106']

62.115.136.23 -> ['213.248.79.106']

62.115.136.113 -> ['213.248.79.106']

62.115.139.107 -> ['213.248.79.106']

62.115.114.171 -> ['213.248.79.106']

62.115.114.167 -> ['213.248.79.106']

62.115.141.201 -> ['213.248.79.106']

62.115.119.113 -> ['213.248.79.106']

62.115.136.25 -> ['213.248.79.106']

62.115.136.35 -> ['213.248.79.106']

(11) : 213.248.79.106 -> ['195.12.233.115']

(12) : 195.12.233.115

Routers found :

['62.115.136.113', '62.115.136.107']

['62.115.136.23', '62.115.133.31', '62.115.141.201', '62.115.136.21', '62.115.136.25']

['62.115.133.29', '62.115.119.113', '62.115.119.115']

['62.115.136.35', '62.115.136.37']

If the text output is not verbose enough, you can ask for a serialized version of the graph that basically keeps all the informations of the traceroute with the -o option

sudo python MDALite.py -o traceroute.xml -a destination 
from graph_tool import *
g = load_graph("/path/to/serialized/graphs.xml")

# Manipulate the graph via its properties.
v_properties = g.vertex_properties
e_properties = g.edge_properties
g_properties = g.graph_properties

# Example: ip_ids, print ip_ids of an ip_address
ip_address = g.vertex_properties["ip_address"]
ip_ids = g.vertex_properties["ip_ids"]
for v in g.vertices():
    if ip_address[v] == "an_ip_of_your_choice_in_the_traceroute":
        print ip_ids[v]

Deploying in a docker container.

Dockerfile provides an example of a Docker script that allows you to deploy MMLPT in a Dockercontainer (in the example with an ubuntu image). To build the container, launch the command:

docker build --build-arg "CACHE_DATE=$(date)" -t "name/of/your/docker/image" . 

Then push it to docker repository:

docker push name/of/your/docker/image

To run it:

docker run -d name/of/your/docker/image

mda-lite's People

Contributors

kvermeul avatar teto 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.