A tool to detect asymmetric routing over IXPs using bi-directional traceroutes from RIPE Atlas probes.
Live version: https://www.inex.ie/ard/
This is a project of the RIPE Atlas Interface Hackaton just prior to RIPE72 in Copenhagen, Denmark.
- Barry O'Donovan, INEX, Dublin, Ireland - principal author and maintainer.
The team at the RIPE hackathon also included:
We've made the main elements accessible via JSON for API use:
-
JSON object of data used to create a request:
/json
-
Submit a request by GET to:
/request/{ixp_id}/{network_id}/{protocol}/json
-
Results:
/result/{key}/json
The application is mostly async with the frontend requests just storing rows in the database and replying. The cron schedule below essentially calls the following artisan commands (and most can take a verbiosity parameter: -v
):
ixps:update
: parseconfigs/ixps.php
and add / update IXPs. Typically done once per day. NB: does not remove IXPs.atlas:update-probes
: iterates over all networks and updates probes (adds new, removes old, checks protocol support, etc.)atlas:create-measurements
: process new end user requests and queues up measurements in the databaseatlas:run-measurements
: iterates over the database and sends outstanding requests to RIPE Atlasatlas:update-measurements
: iterates over measurements sent to RIPE Atlas and looks for completed (failed, etc) results. When both paths of a traceroute are complete, this also emits an event for theInterpretor/Basic
to make a routing decision and create the result object.atlas:complete-requests
: marks end user requests as complete if all measurements have completed.atlas:stop-all-measurements
: Sledge hammer to delete all outstanding RIPE Atlas measurements created with the configured Atlas key.
This is the fruit of a hackaton! Expect bugs, non-defensive programming, databases definitely harmed.
- RIPE Atlas allows a max of 10 measurements towards any one probe at a time. As such, larger requests will take longer to run (finger in the air guesstimate: 5mins per batch of 10).
- Any measurement that hasn't returned in 60mins is considered failed.
- Routing over two LANs at a single exchange is currently considered symmetric. It nearly is anyway 😉
This project uses the standard PHP stack and requires PHP >= 5.6, MySQL/MariaDB, composer.
-
Clone the repository:
git clone https://github.com/inex/ixp-as.git /srv/ard
-
Install dependancies:
cd /srv/ard composer install bower install
-
Create a database:
mysql -u root CREATE DATABASE ard; GRANT ALL ON ard.* TO ard@localhost IDENTIFIED BY 'secret'
-
Copy the base config:
cp .env.example .env
-
Create an application key (Laravel requires this):
php artisan key:generate
-
Edit
.env
and set: theDB_
parameters and add your RIPE Atlas API keys for creating and stopping measurements. -
Create the database schema:
php artisan doctrine:schema:create
-
Add IXPs to
config/ixps.php
:cp config/ixps.php.dist config/ixps.php edit config/ixps.php
-
Add the following to cron:
* * * * * www-data cd /srv/ard && /usr/bin/php artisan schedule:run >> /dev/null 2>&1
-
Test it locally:
php artisan serve
This application is open-sourced software licensed under the MIT license.