2018-11-22 16:11:23 +01:00
|
|
|
|
# Routinator
|
2018-07-26 16:44:06 +02:00
|
|
|
|
|
2019-01-04 12:29:58 +01:00
|
|
|
|
[](https://travis-ci.com/NLnetLabs/routinator)
|
|
|
|
|
[](https://ci.appveyor.com/project/partim/routinator)
|
|
|
|
|
[](https://hub.docker.com/r/nlnetlabs/routinator)
|
|
|
|
|
[](https://crates.io/crates/routinator)
|
|
|
|
|
[](https://twitter.com/routinator3000)
|
|
|
|
|
|
|
|
|
|
Introducing ‘Routinator 3000,’ RPKI relying party software written in Rust.
|
|
|
|
|
If you have any feedback, we would love to hear from you. Don’t hesitate to
|
2018-11-02 11:17:57 +01:00
|
|
|
|
[create an issue on Github](https://github.com/NLnetLabs/routinator/issues/new)
|
2018-11-12 20:56:40 +01:00
|
|
|
|
or post a message on our [RPKI mailing list](https://nlnetlabs.nl/mailman/listinfo/rpki).
|
2018-09-19 10:29:22 +02:00
|
|
|
|
|
2018-12-09 12:51:31 +01:00
|
|
|
|
|
2018-11-01 12:34:55 +01:00
|
|
|
|
## Quick Start
|
|
|
|
|
|
|
|
|
|
Assuming you have rsync and the C toolchain but not yet Rust, here’s how
|
|
|
|
|
you get the Routinator to run as an RTR server listening on 127.0.0.1 port
|
|
|
|
|
3323:
|
|
|
|
|
|
2018-11-22 01:08:34 +01:00
|
|
|
|
```bash
|
2018-11-01 12:34:55 +01:00
|
|
|
|
curl https://sh.rustup.rs -sSf | sh
|
|
|
|
|
source ~/.cargo/env
|
|
|
|
|
cargo install routinator
|
2018-12-09 12:51:31 +01:00
|
|
|
|
routinator rtrd -al 127.0.0.1:3323
|
2018-11-01 12:34:55 +01:00
|
|
|
|
```
|
|
|
|
|
|
2018-11-05 15:39:03 +01:00
|
|
|
|
If you have an older version of the Routinator, you can update via
|
|
|
|
|
|
2018-11-22 01:08:34 +01:00
|
|
|
|
```bash
|
2018-11-05 15:39:03 +01:00
|
|
|
|
cargo install -f routinator
|
|
|
|
|
```
|
|
|
|
|
|
2018-12-09 12:51:31 +01:00
|
|
|
|
|
2018-11-22 01:03:58 +01:00
|
|
|
|
## Quick Start with Docker
|
|
|
|
|
|
|
|
|
|
Due to the impracticality of complying with the ARIN TAL distribution terms
|
|
|
|
|
in an unsupervised Docker environment, prior to launching the container it
|
|
|
|
|
is necessary to first review and agree to the ARIN TAL terms available at
|
|
|
|
|
https://www.arin.net/resources/rpki/tal.html
|
|
|
|
|
|
|
|
|
|
The ARIN TAL RFC 7730 format file available at that URL will then need to
|
2018-11-22 20:31:02 +01:00
|
|
|
|
be downloaded and mounted into the docker container as a replacement for
|
|
|
|
|
the dummy arin.tal file that is shipped with Routinator.
|
2018-11-22 01:03:58 +01:00
|
|
|
|
|
2018-11-22 01:08:34 +01:00
|
|
|
|
```bash
|
2018-11-23 15:24:54 +01:00
|
|
|
|
# Create a local directory for the RPKI cache
|
2018-11-22 13:29:58 +01:00
|
|
|
|
sudo mkdir -p /etc/routinator/tals
|
2018-11-22 01:03:58 +01:00
|
|
|
|
# Fetch the ARIN TAL (after agreeing to the distribution terms as described above)
|
2018-11-22 13:29:58 +01:00
|
|
|
|
sudo wget https://www.arin.net/resources/rpki/arin-rfc7730.tal -P /etc/routinator/tals
|
2018-11-22 21:04:44 +01:00
|
|
|
|
# Launch a detached container named 'routinator' (will listen on 0.0.0.0:3323 and expose that port)
|
|
|
|
|
sudo docker run -d --name routinator -p 3323:3323 -v /etc/routinator/tals/arin-rfc7730.tal:/root/.rpki-cache/tals/arin.tal nlnetlabs/routinator
|
2018-11-22 01:03:58 +01:00
|
|
|
|
```
|
2018-11-01 12:34:55 +01:00
|
|
|
|
|
|
|
|
|
## RPKI
|
|
|
|
|
|
|
|
|
|
The Resource Public Key Infrastructure provides cryptographically signed
|
|
|
|
|
statements about the association of Internet routing resources. In
|
|
|
|
|
particular, it allows the holder of an IP address prefix to publish which
|
|
|
|
|
AS number will be the origin of BGP route announcements for it.
|
|
|
|
|
|
2018-11-23 15:24:54 +01:00
|
|
|
|
All of these statements are published in a distributed repository.
|
2018-11-01 12:34:55 +01:00
|
|
|
|
Routinator will collect these statements into a local copy, validate
|
|
|
|
|
their signatures, and construct a list of associations between IP address
|
|
|
|
|
prefixes and AS numbers. It provides this information to routers supporting
|
2018-11-23 15:24:54 +01:00
|
|
|
|
the RPKI-RTR protocol or can output it in a number of useful formats.
|
2018-11-01 12:34:55 +01:00
|
|
|
|
|
|
|
|
|
## Full Roadmap
|
2018-09-06 18:20:44 +02:00
|
|
|
|
|
2018-11-23 15:24:54 +01:00
|
|
|
|
* [x] Fetch certificates and ROAs via rsync
|
|
|
|
|
* [x] Perform cryptographic validation
|
|
|
|
|
* [x] Export validated ROAs in CSV, JSON and RPSL format
|
|
|
|
|
* [x] Add local white list exceptions and overrides
|
|
|
|
|
([RFC 8416](https://tools.ietf.org/html/rfc8416))
|
|
|
|
|
* [x] Implement the RPKI-RTR protocol for pushing RPKI data to
|
2018-12-03 10:00:13 +01:00
|
|
|
|
supported routers ([RFC 6810](https://tools.ietf.org/html/rfc6810), [RFC 8210](https://tools.ietf.org/html/rfc8210))
|
2018-11-23 15:24:54 +01:00
|
|
|
|
* [ ] Exhaustive interoperability and compliance testing
|
|
|
|
|
* [ ] Integration with alerting and monitoring services so that route
|
|
|
|
|
hijacks, misconfigurations, connectivity and application problems
|
|
|
|
|
can be flagged.
|
|
|
|
|
* [ ] Implement the RRDP protocol for fetching
|
|
|
|
|
([RFC 8182](https://tools.ietf.org/html/rfc8182))
|
|
|
|
|
* [ ] Implement a basic web-based user interface and Command Line Interface
|
|
|
|
|
* [ ] Expose an API
|
|
|
|
|
* [ ] Add the ability to process Internet Routing Registry data
|
2018-07-02 11:00:56 +02:00
|
|
|
|
|
2018-07-24 10:53:46 +02:00
|
|
|
|
## Getting Started
|
|
|
|
|
|
2018-10-26 12:57:21 +02:00
|
|
|
|
There’s two things you need for Routinator: rsync and Rust and a C toolc…
|
2018-11-02 13:33:44 +01:00
|
|
|
|
There are three things you need for Routinator: rsync, Rust and a C
|
2018-10-26 12:57:21 +02:00
|
|
|
|
toolchain. You need rsync because the RPKI repository currently uses rsync
|
|
|
|
|
as its main means of distribution. You need Rust because that’s what the
|
|
|
|
|
Routinator has been written in. Some of the cryptographic primitives used
|
|
|
|
|
by the Routinator require a C toolchain, so you need that, too.
|
|
|
|
|
|
2018-11-23 15:24:54 +01:00
|
|
|
|
Since this currently is an early version, we decided not to distribute
|
|
|
|
|
binary packages just yet. But don’t worry, getting Rust and building
|
2018-11-02 09:31:55 +01:00
|
|
|
|
packages with it is easy.
|
2018-07-24 10:53:46 +02:00
|
|
|
|
|
|
|
|
|
### rsync
|
|
|
|
|
|
|
|
|
|
Currently, Routinator requires the `rsync` executable to be in your path.
|
|
|
|
|
We are not quite sure which particular version you need at the very least,
|
|
|
|
|
but whatever is being shipped with current Linux and \*BSD distributions
|
2018-07-26 22:52:31 +02:00
|
|
|
|
and macOS should be fine.
|
2018-07-24 10:53:46 +02:00
|
|
|
|
|
2019-01-03 17:04:22 +01:00
|
|
|
|
On Windows, Routinator requires the `rsync` version that comes with
|
|
|
|
|
[Cygwin](https://www.cygwin.com/) – make sure to select rsync during the
|
|
|
|
|
installation phase. And yes, Routinator totally works on Windows, too.
|
|
|
|
|
|
2018-11-23 15:24:54 +01:00
|
|
|
|
If you don’t have rsync, please head to http://rsync.samba.org/
|
2018-07-24 10:53:46 +02:00
|
|
|
|
|
|
|
|
|
### Rust
|
|
|
|
|
|
2018-10-26 12:57:21 +02:00
|
|
|
|
While some system distributions include Rust as system packages,
|
2018-11-29 20:15:45 +01:00
|
|
|
|
Routinator relies on a relatively new version of Rust, currently 1.30 or
|
2018-11-01 12:34:55 +01:00
|
|
|
|
newer. We therefore suggest to use the canonical Rust installation via a
|
|
|
|
|
tool called *rustup.*
|
2018-07-24 10:53:46 +02:00
|
|
|
|
|
2018-10-26 12:57:21 +02:00
|
|
|
|
To install *rustup* and Rust, simply do:
|
2018-07-02 11:00:56 +02:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl https://sh.rustup.rs -sSf | sh
|
|
|
|
|
```
|
|
|
|
|
|
2018-07-24 10:53:46 +02:00
|
|
|
|
or, alternatively, get the file, have a look and then run it manually.
|
|
|
|
|
Follow the instructions to get rustup and cargo, the rust build tool, into
|
2018-07-02 18:17:14 +02:00
|
|
|
|
your path.
|
2018-07-02 11:00:56 +02:00
|
|
|
|
|
2018-07-24 10:53:46 +02:00
|
|
|
|
You can update your Rust installation later by simply running
|
2018-07-02 18:17:14 +02:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
rustup update
|
|
|
|
|
```
|
|
|
|
|
|
2018-07-24 14:07:53 +02:00
|
|
|
|
### C Toolchain
|
|
|
|
|
|
|
|
|
|
Some of the libraries Routinator depends on require a C toolchain to be
|
|
|
|
|
present. Your system probably has some easy way to install the minimum
|
|
|
|
|
set of packages to build from C sources. If you are unsure, try to run
|
|
|
|
|
`cc` on a command line and if there’s a complaint about missing input
|
|
|
|
|
files, you are probably good to go.
|
|
|
|
|
|
2018-07-20 14:32:59 +02:00
|
|
|
|
## Building and Running
|
|
|
|
|
|
2018-11-01 11:22:42 +01:00
|
|
|
|
The easiest way to get Routinator is to leave it to cargo by saying
|
2018-07-02 11:00:56 +02:00
|
|
|
|
|
2018-11-22 01:08:34 +01:00
|
|
|
|
```bash
|
2018-11-01 11:22:42 +01:00
|
|
|
|
cargo install routinator
|
2018-07-02 11:00:56 +02:00
|
|
|
|
```
|
|
|
|
|
|
2018-11-02 16:31:39 +01:00
|
|
|
|
If you want to try the master branch from the repository instead of a
|
|
|
|
|
release version, you can run
|
|
|
|
|
|
2018-11-22 01:08:34 +01:00
|
|
|
|
```bash
|
2018-11-02 16:31:39 +01:00
|
|
|
|
cargo install --git https://github.com/NLnetLabs/routinator.git
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If you want to update an installed version, you run the same command but
|
|
|
|
|
add the `-f` flag (aka force) to approve overwriting the installed
|
|
|
|
|
version.
|
|
|
|
|
|
|
|
|
|
The command will build Routinator and install it in the same directory
|
|
|
|
|
that cargo itself lives in (likely `$HOME/.cargo/bin`).
|
2018-12-09 12:51:31 +01:00
|
|
|
|
Which means Routinator will be in your path, too.
|
|
|
|
|
|
|
|
|
|
There are currently two major functions of the Routinator: printing the
|
|
|
|
|
list of valid route origins, also known as _Validated ROA Payload_ or VRP,
|
|
|
|
|
and providing the service for routers to access this list via a protocol
|
|
|
|
|
known as RPKI-to-Router protocol or RTR.
|
|
|
|
|
|
|
|
|
|
These (and all other functions) of Routinator are accessible on the
|
2018-12-12 14:04:18 +01:00
|
|
|
|
command line via sub-commands. The commands are `vrps` and `rtrd`,
|
2018-12-09 12:51:31 +01:00
|
|
|
|
respectively.
|
|
|
|
|
|
|
|
|
|
So, to have Routinator print the list, you say
|
2018-07-02 11:00:56 +02:00
|
|
|
|
|
|
|
|
|
```bash
|
2018-12-09 12:51:31 +01:00
|
|
|
|
routinator vrps
|
2018-07-02 11:00:56 +02:00
|
|
|
|
```
|
|
|
|
|
|
2018-11-01 11:22:42 +01:00
|
|
|
|
If this is the first time you’ve
|
2018-10-26 12:57:21 +02:00
|
|
|
|
been using Routinator, it will create `$HOME/.rpki-cache`, put the
|
|
|
|
|
trust anchor locators of the five RIRs there, and then complain that
|
|
|
|
|
ARIN’s TAL is in fact not really there.
|
2018-07-24 15:27:48 +02:00
|
|
|
|
|
2018-10-26 12:57:21 +02:00
|
|
|
|
Follow the instructions provided and try again. You can also add
|
|
|
|
|
additional trust anchors by simple dropping their TAL file in RFC 7730
|
|
|
|
|
format into `$HOME/.rpki-cache/tals`.
|
2018-07-20 14:32:59 +02:00
|
|
|
|
|
2018-10-26 12:57:21 +02:00
|
|
|
|
Now Routinator will rsync the entire RPKI repository to your machine
|
2018-11-01 12:34:55 +01:00
|
|
|
|
(which will take a while during the first run), validate it and produce
|
|
|
|
|
a long list of AS numbers and prefixes.
|
2018-07-02 11:00:56 +02:00
|
|
|
|
|
2018-12-09 12:51:31 +01:00
|
|
|
|
Information about additional command line arguments is available via the
|
|
|
|
|
`-h` option or you can look at the more detailed man page via the `man`
|
|
|
|
|
sub-command:
|
2018-07-20 14:32:59 +02:00
|
|
|
|
|
|
|
|
|
```bash
|
2018-12-09 12:51:31 +01:00
|
|
|
|
routinator man
|
2018-10-26 12:57:21 +02:00
|
|
|
|
```
|
|
|
|
|
|
2018-11-01 12:34:55 +01:00
|
|
|
|
It is also available online on the
|
|
|
|
|
[NLnetLabs documentation
|
|
|
|
|
site](https://www.nlnetlabs.nl/documentation/rpki/routinator/).
|
2018-11-01 11:22:42 +01:00
|
|
|
|
|
2018-12-09 12:51:31 +01:00
|
|
|
|
|
2018-10-26 12:57:21 +02:00
|
|
|
|
## Feeding a Router with RPKI-RTR
|
|
|
|
|
|
2018-12-09 12:51:31 +01:00
|
|
|
|
Routinator supports RPKI-RTR as specified in RFC 8210 as well as the older
|
|
|
|
|
version from RFC 6810. It will act as an RTR server if you start it with
|
|
|
|
|
the `rtrd` sub-command. It will do so as a daemon and detach from your
|
|
|
|
|
terminal unless you provide the `-a` (for attached) option.
|
2018-09-20 12:21:54 +02:00
|
|
|
|
|
2018-10-26 12:57:21 +02:00
|
|
|
|
You can specify the address(es) to listen on via the `-l` (or `--listen`)
|
2018-12-09 12:51:31 +01:00
|
|
|
|
option. If you don’t, it will listen on `127.0.0.1:3323` by default. This
|
|
|
|
|
isn’t the IANA-assigned default port for the protocol, which would be 323.
|
|
|
|
|
But since that is a privileged port you’d need to be running Routinator as
|
|
|
|
|
root when otherwise there is no reason to do that. Also, note that the
|
2018-10-31 14:18:37 +01:00
|
|
|
|
default address is a localhost address for security reasons.
|
2018-10-26 12:57:21 +02:00
|
|
|
|
|
2018-10-27 15:04:53 +02:00
|
|
|
|
So, in order to run Routinator as an RTR server listening on port 3323 on
|
2018-12-09 12:51:31 +01:00
|
|
|
|
both 192.0.2.13 and 2001:0DB8::13 without detaching from the terminal, run
|
2018-09-20 12:21:54 +02:00
|
|
|
|
|
|
|
|
|
```bash
|
2018-12-09 12:51:31 +01:00
|
|
|
|
routinator rtrd -a -l 192.0.2.13:3323 -l [2001:0DB8::13]:3323
|
2018-09-20 12:21:54 +02:00
|
|
|
|
```
|
2018-10-26 12:57:21 +02:00
|
|
|
|
|
2018-11-01 12:34:55 +01:00
|
|
|
|
By default, the repository will be updated and re-validated every hour as
|
|
|
|
|
per the recommendation in the RFC. You can change this via the
|
2018-11-01 22:14:46 +01:00
|
|
|
|
`--refresh` option and specify the interval between re-validations in
|
2018-11-01 12:34:55 +01:00
|
|
|
|
seconds. That is, if you rather have Routinator validate every fifteen
|
|
|
|
|
minutes, the above command becomes
|
|
|
|
|
|
|
|
|
|
```bash
|
2018-12-09 12:51:31 +01:00
|
|
|
|
routinator rtrd -a -l 192.0.2.13:3323 -l [2001:0DB8::13]:3323 --refresh=900
|
2018-11-01 12:34:55 +01:00
|
|
|
|
```
|
|
|
|
|
|
2018-12-12 14:04:18 +01:00
|
|
|
|
## Configuration Files
|
|
|
|
|
|
|
|
|
|
Routinator can take its configuration from a file, too. You can specify
|
|
|
|
|
such a configuration file via the `-c` option. If you don’t, Routinator
|
|
|
|
|
will check if there is a file `$HOME/.routinator.conf` and if it exists,
|
|
|
|
|
use it. If it doesn’t exist and there is no `-c` option, default values
|
|
|
|
|
are used.
|
|
|
|
|
|
|
|
|
|
The configuration file is a TOML file. Its entries are named similarly to
|
|
|
|
|
the command line options. Details about the available entries and there
|
|
|
|
|
meaning can be found in the manual page. In addition, a complete sample
|
|
|
|
|
configuration file showing all the default values can be found in the
|
2018-12-19 17:02:05 +01:00
|
|
|
|
repository at [etc/routinator.conf](https://github.com/NLnetLabs/routinator/blob/master/etc/routinator.conf).
|
2018-12-12 14:04:18 +01:00
|
|
|
|
|
|
|
|
|
|
2018-10-26 12:57:21 +02:00
|
|
|
|
## Local Exceptions
|
2018-09-20 12:21:54 +02:00
|
|
|
|
|
2018-11-23 15:24:54 +01:00
|
|
|
|
If you would like to add exceptions to the validated RPKI data in the
|
|
|
|
|
form of local filters and additions, you can specify this in a file
|
|
|
|
|
using JSON notation according to the [SLURM] standard. You can find
|
2018-11-01 11:22:42 +01:00
|
|
|
|
two example files in the repository at `/test/slurm`. Use the `-x` option
|
|
|
|
|
to refer to your file with local exceptions.
|
|
|
|
|
|
2018-11-01 12:34:55 +01:00
|
|
|
|
Routinator will re-read that file on every validation run, so you can
|
|
|
|
|
simply update the file whenever your exceptions change.
|
|
|
|
|
|
2018-11-01 11:22:42 +01:00
|
|
|
|
[SLURM]: https://tools.ietf.org/html/rfc8416
|
2018-12-09 12:51:31 +01:00
|
|
|
|
|