Git Product home page Git Product logo

flashroute.rs's Introduction

flashroute.rs

A reproduction and enhancement of paper "FlashRoute: Efficient Traceroute on a Massive Scale" (ACM IMC'20) in Rust. [Slides] [Report]

fr

FlashRoute

FlashRoute is a tool to discover network topology, which is specially optimized for full Internet topology discovery. It has high time efficiency in which it can finish the scan over the full IPv4 /24 address space in 7 minutes at probing speed of 200 Kpps, and 17 mins at probing speed of 100 Kpps. It also has high network efficiency, in which it can finish the scan using only 75% of probes used by Scamper and 30% of probes used by Yarrp to finish the same task.

More introductions for FlashRoute can be found in both the paper and the repository.

Reproduction in Rust

The original FlashRoute is written in C++14 with Boost and Abseil libraries, which works well but may still be not modern, concise, or safe enough. We reimplement FlashRoute in Rust, a modern system programming language, and name it as flashroute.rs.

Compared to the original implementation, the main features of flashroute.rs are:

  • 50% LoC compared to the orginal C++ implementation.
  • Safer and extensible low-level network communication through pnet, instead of bare socket API.
  • Asynchronous tasks and coroutine scheduling, instead of explicit thread management.
  • More utilization of multi-core processors brings probing performance improvements of up to 40% (tested on AMD EPYC 7B12 (8) @ 2.25 GHz).
  • More comprehensive thread-safety thanks to the borrow checker of Rust.
  • Mutex or rwlock free. All inter-task communications are achieved through message channels or atomic operations.
  • grain option and hashmap-based data structure allows richer probing patterns.
  • Produce human-readable results and even visualization of network topology.

Usage

flashroute.rs requires Rust stable toolchain (>= 1.48.0).

  • Probe random hosts selected from each /30 (provided by grain) subnet of 202.120.0.0, NIC specification is optional
    cargo run --release -- 202.120.0.0/16 --grain 2 [--interface en0]
  • Probe random hosts selected from each /24 subnet of 0.0.0.0/0 (the internet)
    cargo run --release -- 0.0.0.0/0 --grain 8
  • Probe all hosts of 115.159.2.0/24
    cargo run --release -- 115.159.2.0/24 --grain 0
  • Probe a single host
    cargo run --release -- 192.168.1.1/32 --grain 0
  • Probe all hosts listed in a file line by line
    cargo run --release -- path/to/file --grain 8
  • Follow the behavior of the original FlashRoute and only count the internet routers:
    cargo run --release -- 0.0.0.0/0 --grain 8 --router-only

Most of the options of original implementation are provided too, run cargo run -- --help to see all possible options.

Notes

Listening on ICMP socket requires superuser permission, the flashroute.rs may automatically restart in sudo mode.

Windows users may be required to install pcap library to make it built. However, flashroute.rs has not been tested on Windows yet.

References

  1. Yuchen Huang, Michael Rabinovich, and Rami Al-Dalky. 2020. FlashRoute: Efficient Traceroute on a Massive Scale. In ACM Internet Measurement Conference (IMC ’20), October 27–29, 2020, Virtual Event, USA. ACM, New York, NY, USA, 13 pages. https://doi.org/10.1145/3419394.3423619
  2. lambdahuang/Flashroute, https://github.com/lambdahuang/FlashRoute

flashroute.rs's People

Contributors

bugenzhao avatar shi2uku 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

Watchers

 avatar  avatar  avatar

flashroute.rs's Issues

Flashroute no response in ipv6

In ipv4,the Flashroute can run normally.
But I send 1,000,000 packets to traceroute the ipv6 address,however I receive 0 response.
My server suppports the ipv6,the linux Kernal is 4.15
I need help

Run Error

The environment has been built,
The code works,
but it returns me:
IoError(Os {code: 2,kind:NotFound,message: "No such file or drectory" })
How can I do?What's wrong?

Compile Problem

The environment has been built,but which path should I compile in? I try compiling in this path,but failed.

~/FlashRoute-0.1.0# bazel build flashroute

The error is below

/root/FlashRoute-0.1.0/WORKSPACE:38:15: in
Repository rule git_repository defined at:
/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in
ERROR: An error occurred during the fetch of repository 'com_github_nelhage_rules_boost':
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git.bzl", line 181, column 30, in _git_repository_implementation
update = _clone_or_update(ctx)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git.bzl", line 36, column 20, in clone_or_update
git
= git_repo(ctx, directory)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 91, column 12, in git_repo
_update(ctx, git_repo)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 101, column 9, in _update
init(ctx, git_repo)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 118, column 15, in init
_error(ctx.name, cl, st.stderr)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 190, column 9, in _error
fail("error running '%s' while working with @%s:\n%s" % (command_text, name, stderr))
Error in fail: error running 'git init /root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/com_github_nelhage_rules_boost' while working with @com_github_nelhage_rules_boost:
src/main/tools/process-wrapper-legacy.cc:80: "execvp(git, ...)": No such file or directory
ERROR: Error fetching repository: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git.bzl", line 181, column 30, in _git_repository_implementation
update = _clone_or_update(ctx)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git.bzl", line 36, column 20, in clone_or_update
git
= git_repo(ctx, directory)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 91, column 12, in git_repo
_update(ctx, git_repo)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 101, column 9, in _update
init(ctx, git_repo)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 118, column 15, in init
_error(ctx.name, cl, st.stderr)
File "/root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 190, column 9, in _error
fail("error running '%s' while working with @%s:\n%s" % (command_text, name, stderr))
Error in fail: error running 'git init /root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/com_github_nelhage_rules_boost' while working with @com_github_nelhage_rules_boost:
src/main/tools/process-wrapper-legacy.cc:80: "execvp(git, ...)": No such file or directory
ERROR: no such package '@com_github_nelhage_rules_boost//boost': error running 'git init /root/.cache/bazel/_bazel_root/6756548e03526d6223b176b5c6e8421d/external/com_github_nelhage_rules_boost' while working with @com_github_nelhage_rules_boost:
src/main/tools/process-wrapper-legacy.cc:80: "execvp(git, ...)": No such file or directory

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.