You are here

ECN-Spider

Developer

ETH Zurich; contributors University of Liege (Scamper component) and collaborating institution University of Auckland (QoF testing).

Description

ECN-Spider is an active measurement tool, built in a modular manner using mPlane components and an associated client, to test Explicit Congestion Notification (ECN) connectivity failures and readiness for ECN negotiation. ECN-Spider takes as input a list of target IP addresses to test. For each unique address, the tool simultaneously opens two connections, one with ECN negotiation enabled and one without. ECN Spider utilize Linux's system-level configuration of ECN negotiation, instead of packet injection, performing the following step for each measurement:

  1. disable ECN and open a socket to the target,
  2. enable ECN and open a second socket to the target, and
  3. optionally perform HTTP requests via both sockets or close immediately

Then, it reports the per-address connection status. Integrated into ECN Spider is the QoF flow meter, which observes the traffic generated by this test and logs TCP and IP ECN flags for each connection attempt. For each test, the tool outputs the address tested and the flags observed on the first and subsequent packets, from which connectivity, ECN negotiation, and ECN signaling failure detection can be derived.

The ECN Spider component performs the actual test. Other components find target addresses for testing:

  1. HTTPResolver selects IP adresses based on a list of website domains (e.g., the Alexa top million list) to test ECN readiness of webserver targets. It resolves these to at most one IPv4 and one IPv6 address per site using a given DNS server. Duplicate IP addresses are eliminated taking the highest-ranked website for each address.
  2. BtDhtResolver utilizes the BitTorrent Distributed Hash Table (DHT) protocol to detect hosts that are currently available to open a TCP connection by searching for a (random) torrent that leads to forwards to potential seeds.

The tool also includes an mPlane client to coordinate the components to run either local or distributed runs of the measurements. The tool is presently being generalized to support mass measurement of path- and feature-dependent connectivity and feature functionality issues; hence the full toolchain is referred to as pathspider, of which ECN Spider is a single feature.

Usage Scenarios


The tool is designed either to harvest a set of IP addresses in order to test general ECN connectivity safety for a sample of the Internet (see measurement results on webserver testing at http://ecn.ethz.ch/) or to take ECN connectivity measurements from specific set of targets from a given probe, in order to test ECN-related connectivity failure to eliminate ECN as a potential cause of a reported problem. We note this second scenario is increasingly operationally relevant, due to the pending ECN on-by-default behavior for Apple Mac OS and iOS devices, an June 2015 announcement based in part on mPlane work with ECN safety.

Metrics and Capabilities

Given a set of target IPv4 or IPv6 addresses, ECN Spider returns connectivity with ECN negotiation attempted and without, as well as TCP and IP ECN codepoint information in order to diagnose ECN signaling issues. The core IPv4 capability is as follows:

{ "capability": "measure",
"parameters": { "destination.ip4": "[*]",
"destination.port", "[*]" },
"results": { "source.port",
"destination.ip4",
"destination.port",
"connectivity.ip",
"ecnspider.ecnstate",
"ecnspider.initflags.fwd",
"ecnspider.synflags.fwd",
"ecnspider.unionflags.fwd",
"ecnspider.initflags.rev",
"ecnspider.synflags.rev",
"ecnspider.unionflags.rev",
"ecnspider.ttl.rev.min" }
}

The ecnspider. elements are included in a custom registry inheriting from the core registry, included with the component.

Probe Execution Environment

ECN Spider runs on any reasonably recent Linux machine capable of running the Python 3 mPlane SDK. It requires QoF (https://github.com/britram/qof) and its prerequisites (libglib-2.0, libtrace, libfixbuf) to be installed. It requires the post-0.9.0 version of the SDK (including multiple value support) in the sdk-multival branch to be installed on client and component side. See below for installation instructions.

Quick start
 
First create a Python 3.4 virtual environment:
$ virtualenv -p python3.4 venv
$ source venv/bin/activate

Install tornado

(venv) $ pip install tornado

Installing the sdk-multival branch of mPlane using git and pip:

(venv) $ git clone https://github.com/fp7mplane/protocol-ri.git
(venv) $ cd protocol-ri
(venv) $ git checkout sdk-multival
(venv) $ cd ..
(venv) $ git clone https://github.com/britram/pathtools.git

(venv) $ pip install -v -e protocol-ri

And finally to install pathspider type: (note: dependencies numpy and pandas need some time to install):

(venv) $ pip install -v -e pathtools

Configuration

pathspider operates in three modes:

  • service : Just run mPlane components, acting as a measurement probe.
  • client : A client implementation analyzing results from multiple probes.
  • standalone : A standalone implementation where the measurements and analysis are performed on the same computer.

Each operating mode has its own configuration file. Either service.conf, client.conf or standalone.conf. standalone.conf basically includes all configuration options from the client and serivce mode.

Client Configuration

Adjust URLs to point to your mPlane probes:

[probes]
nyc = http://path-nyc.corvid.ch:18888/
ams = http://path-ams.corvid.ch:18888/
sin = http://path-sin.corvid.ch:18888/
sfo = http://path-sfo.corvid.ch:18888/
lon = http://path-lon.corvid.ch:18888/

[main]
use_tracebox = false
resolver = http://path-ams.corvid.ch:18888/

Service Configuration

You will probably want to change interface_uri to the network interface the traffic flows.

[module_ecnspider]
module = pathspider.ecnspider2
worker_count = 200
connection_timeout = 4
interface_uri = ring:eth0
qof_port = 54739
enable_ipv6 = true

[module_btdhtresolver]
module = pathspider.btdhtresolver
enable_ipv6 = true

# other optional arguments:
# ip4addr = 0.0.0.0   # bind ecnspider to this IPv4 address
# ip6addr = ::        # bind ecnspider to this IPv6 address
# port4 = 9881   # bind address collector to this IPv4 address
# port6 = 9882   # bind address collector to this IPv6 address

# other optional arguments:
# ip4addr = 0.0.0.0   # bind ecnspider to this IPv4 address
# ip6addr = ::        # bind ecnspider to this IPv6 address

[module_scamper]
module = pathspider.scamper.scamper
ip4addr = 1.2.3.4
ip6addr = ::1

#[module_webresolver]
#module = pathspider.webresolver

Examples

To run the examples, change to the pathspider directory. (The configuration files have to be in the same directory or they have to be explicetly specified by --config FILE.)

cd pathtools/pathspider

Print all available options with pathspider -h

Running a standalone measurement using BitTorrent DHT as address source:

pathspider --mode standalone --resolver-btdht --count 1000
 
Official Version

ECN Spider is available from GitHub, https://github.com/britram/pathtools; see the quick start instructions above. The probe does not appear in D2.2, as it has been developed and integrated into mPlane since its publication, having started as a separate project at ETH Zurich.

References

ETH's ECN observatory page is http://ecn.ethz.ch/. ECN Spider has been used to generate the results in the mPlane paper "Enabling Internet-Wide Deployment of Explicit Congestion Notification" at PAM 2015, cited in the recent announcement that Apple will enable ECN by default on the client side in developer seeds of Mac OS X and iOS.