User Tools

Site Tools


hints:rpki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
hints:rpki [2024/03/20 11:22] – [RPKI Hints, Top Tips, and FAQs] philiphints:rpki [2025/07/05 23:34] (current) – [Installing Go] philip
Line 14: Line 14:
   * [[rpki#stayrtr|StayRTR]]   * [[rpki#stayrtr|StayRTR]]
   * [[rpki#cisco_ios-xe_hints|Cisco IOS-XE]]   * [[rpki#cisco_ios-xe_hints|Cisco IOS-XE]]
 +  * [[rpki#cisco_ios-xr_hints|Cisco IOS-XR]]
   * [[rpki#juniper_hints|Juniper]]   * [[rpki#juniper_hints|Juniper]]
   * [[rpki#bird_hints|BIRD]]   * [[rpki#bird_hints|BIRD]]
   * [[rpki#frrouting_hints|FRR]]   * [[rpki#frrouting_hints|FRR]]
  
-The tips and tricks for the validator builds discussed below all are for Ubuntu 22.04. They should also work just fine on Ubuntu 18.04 (which is supported until April 2023) and on Ubuntu 20.04 (which is supported until April 2025).+The tips and tricks for the validator builds discussed below all are for Ubuntu 24.04. They should also work on Ubuntu 18.04 and Ubuntu 20.04 (neither of which is supported)and Ubuntu 22.04 (which is supported until April 2027). If you are installing a fresh container or VM, please use Ubuntu 24.04 (if you are wedded to the Ubuntu family).
  
 ===== AS0 TALs ===== ===== AS0 TALs =====
Line 31: Line 32:
 ===== NLnetLabs Routinator ===== ===== NLnetLabs Routinator =====
  
-Nothing to say here, the instructions just work, the validator installs sweetly, and just runs. As long as the instructions are followed. The current version of Routinator is 0.13.2, at time of writing.+Nothing to say here, the instructions just work, the validator installs sweetly, and just runs. As long as the instructions are followed. The current version of Routinator is 0.14.2, at time of writing.
  
 If using Debian/Ubuntu as I do, then just use the supplied package and your favourite package manager. Described in NLnetLabs's [[https://github.com/NLnetLabs/routinator#quick-start-with-debian-and-ubuntu-packages| Github]] repo. If using Debian/Ubuntu as I do, then just use the supplied package and your favourite package manager. Described in NLnetLabs's [[https://github.com/NLnetLabs/routinator#quick-start-with-debian-and-ubuntu-packages| Github]] repo.
Line 40: Line 41:
 deb [arch=amd64] https://packages.nlnetlabs.nl/linux/ubuntu/ jammy main deb [arch=amd64] https://packages.nlnetlabs.nl/linux/ubuntu/ jammy main
 </code> </code>
 +
 +(Note: if you are trying this on Ubuntu 24.04, there is no package for ''noble'' as yet, but I found that using the 22.04 setup works fine.)
  
 Then run: Then run:
Line 83: Line 86:
 ===== FORT ===== ===== FORT =====
  
-FORT is the validator developed by NIC Mexico. More about it is on the [[https://fortproject.net/en/validator|Project page]]. At time of writing, version 1.6.has been released and fixes many issues present in previous versions.+FORT is the validator developed by NIC Mexico. More about it is on the [[https://fortproject.net/en/validator|Project page]]. At time of writing, version 1.6.has been released and fixes many issues present in previous versions. However from version 1.6.3, FORT requires Ubuntu 24.04 as it requires libjansson4 (>= 2.14). Ubuntu 22.04 only comes with libjansson4 2.13.1-1.1build3 will only support FORT version 1.6.2.
  
-FORT is available as part of Ubuntu 22.04 packaging, but it is an older version (1.5.3-1), so for this reason we use the latest NIC Mexico produced package.+FORT is available as part of Ubuntu 22.04 packaging, but it is an older version (1.5.3-1). Likewise for Ubuntu 24.04, the FORT shipped is version 1.6.1-1build3. For this reason we use the latest NIC Mexico produced package.
  
 FORT is not quite so easy to install, but still relatively simple as long as you follow the instructions on their [[https://nicmx.github.io/FORT-validator/installation.html| Github]] repo closely. FORT is not quite so easy to install, but still relatively simple as long as you follow the instructions on their [[https://nicmx.github.io/FORT-validator/installation.html| Github]] repo closely.
Line 92: Line 95:
  
 <code> <code>
-wget https://github.com/NICMx/FORT-validator/releases/download/1.6.1/fort_1.6.1-1_amd64.deb+wget https://github.com/NICMx/FORT-validator/releases/download/1.6.6/fort_1.6.6-1_amd64.deb
 </code> </code>
 and then install it: and then install it:
 <code> <code>
-sudo apt install ./fort_1.6.1-1_amd64.deb+sudo apt install ./fort_1.6.6-1_amd64.deb
 </code> </code>
  
Line 148: Line 151:
 and it should run successfully. You should see something like this when you run **systemctl status fort**: and it should run successfully. You should see something like this when you run **systemctl status fort**:
 <code> <code>
-fort.service - FORT RPKI validator +● fort.service - FORT RPKI validator 
-     Loaded: loaded (/lib/systemd/system/fort.service; enabled; vendor preset: enabled) +     Loaded: loaded (/usr/lib/systemd/system/fort.service; enabled; preset: enabled) 
-    Drop-In: /run/systemd/system/service.d +     Active: active (running) since Mon 2024-10-07 22:58:03 AEST29s ago
-             └─zzz-lxc-service.conf +
-     Active: active (running) since Wed 2022-01-26 03:54:05 UTC4s ago+
        Docs: man:fort(8)        Docs: man:fort(8)
              https://nicmx.github.io/FORT-validator/              https://nicmx.github.io/FORT-validator/
-   Main PID: 3100 (fort) +   Main PID: 148150 (fort) 
-      Tasks: 37 (limit: 28794+      Tasks: 27 (limit: 38225
-     Memory: 12.0M+     Memory: 680.6M (peak: 680.7M) 
 +        CPU: 27.801s
      CGroup: /system.slice/fort.service      CGroup: /system.slice/fort.service
-             └─3100 /usr/bin/fort --configuration-file /etc/fort/config.json+             └─148150 /usr/bin/fort --configuration-file /etc/fort/config.json 
 + 
 +Oct 07 22:58:03 fort systemd[1]: Started fort.service - FORT RPKI validator.
 </code> </code>
 You can check by using **ps ax** to get: You can check by using **ps ax** to get:
Line 184: Line 188:
 ===== RPKI-client ===== ===== RPKI-client =====
  
-**rpki-client** is just a validator - it does not have the functionality to accept connections from a router. We'll come to that later on (we'll need to use [[rpki#stayrtr|StayRTR]], which is a fork of Cloudflare's now unmaintained [[rpki#gortr|GoRTR]]).+**rpki-client** is just a validator - it does not have the functionality to accept connections from a router. We'll come to that later on (we'll need to use [[rpki#stayrtr|StayRTR]], which is a fork of Cloudflare's now unmaintained GoRTR).
  
 **rpki-client** has now been packaged and is available as part of the Ubuntu 22.04 distribution. However, the packaged version is old (version 7.6). At the time of writing, the current release of **rpki-client** is version 8.7. **rpki-client** has now been packaged and is available as part of the Ubuntu 22.04 distribution. However, the packaged version is old (version 7.6). At the time of writing, the current release of **rpki-client** is version 8.7.
Line 198: Line 202:
 The other required package noted in the instructions is **tls** from LibreSSL. LibreSSL is a branch of OpenSSL and is used on OpenBSD - not found on Linux, but seems to be appearing in the latest Debian/Ubuntu beta builds. So we need to download the bits we need and install. The **rpki-client** instructions don't say anything about how to do that. The other required package noted in the instructions is **tls** from LibreSSL. LibreSSL is a branch of OpenSSL and is used on OpenBSD - not found on Linux, but seems to be appearing in the latest Debian/Ubuntu beta builds. So we need to download the bits we need and install. The **rpki-client** instructions don't say anything about how to do that.
  
-First we go to [[https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/|https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/]] and select the latest package, which is libressl-3.8.3.tar.gz at time of writing (libressl-3.9.0 is also out now, but I'm staying away from .0 releases)+First we go to [[https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/|https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/]] and select the latest package, which is libressl-3.9.2.tar.gz at time of writing
 <code> <code>
-wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.8.3.tar.gz+wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.9.2.tar.gz
 </code> </code>
 We then unpack it: We then unpack it:
 <code> <code>
-tar zxf libressl-3.8.3.tar.gz+tar zxf libressl-3.9.2.tar.gz
 </code> </code>
 and then build it: and then build it:
 <code> <code>
-cd libressl-3.8.3+cd libressl-3.9.2
 ./configure --enable-libtls-only ./configure --enable-libtls-only
 make make
Line 215: Line 219:
 Note the option to only build **libtls** - we don't need the rest of LibreSSL and it could well interfere with OpenSSL which will already be on the system. Now that **libtls** is built, the **install** action will put the libraries in **/usr/local/lib** like this: Note the option to only build **libtls** - we don't need the rest of LibreSSL and it could well interfere with OpenSSL which will already be on the system. Now that **libtls** is built, the **install** action will put the libraries in **/usr/local/lib** like this:
 <code> <code>
--rw-r--r--  1 root root      923 Mar 20 00:02 libtls.la +-rw-r--r-- 1 root root 18679208 Jul 14 10:11 libtls.a 
-lrwxrwxrwx  1 root root       16 Mar 20 00:02 libtls.so -> libtls.so.28.0.0 +-rw-r--r-- 1 root root      923 Jul 14 10:11 libtls.la 
-lrwxrwxrwx  1 root root       16 Mar 20 00:02 libtls.so.28 -> libtls.so.28.0.0 +lrwxrwxrwx 1 root root       16 Jul 14 10:11 libtls.so -> libtls.so.29.0.0 
--rw-r--r--  1 root root  9108376 Mar 20 00:02 libtls.so.28.0.0+lrwxrwxrwx 1 root root       16 Jul 14 10:11 libtls.so.29 -> libtls.so.29.0.0 
 +-rw-r--r-- 1 root root  8721528 Jul 14 10:11 libtls.so.29.0.0
 </code> </code>
 Run **sudo ldconfig** so that the system knows about the new libraries. Run **sudo ldconfig** so that the system knows about the new libraries.
Line 255: Line 260:
 sudo make install sudo make install
 </code> </code>
-which will install the client in **/usr/local/sbin** and the TALs in **/etc/rpki**, as well as create the cache and output directories needed. Note that the ARIN TAL requires users to read the disclaimer first so is not provided by default. So you need to do this manually: +which will install the client in **/usr/local/sbin** and the TALs in **/etc/rpki**, as well as create the cache and output directories needed. It will also copy the 5 RIR "constraints" files into **/etc/rpki**; these prevent [[https://datatracker.ietf.org/doc/draft-snijders-constraining-rpki-trust-anchors/|overclaiming of resources]] by the 5 RIRs
-<code> +
-wget https://www.arin.net/resources/manage/rpki/arin.tal +
-sudo mv arin.tal /etc/rpki +
-</code>+
 Now the client can be run. There is no daemon option, it simply runs at the command line, and when it has finished downloading all the VRPs (around 10-15 minutes depending on bandwidth) it exits. But that's okay. Try running the client: Now the client can be run. There is no daemon option, it simply runs at the command line, and when it has finished downloading all the VRPs (around 10-15 minutes depending on bandwidth) it exits. But that's okay. Try running the client:
 <code> <code>
Line 277: Line 279:
 </code> </code>
 and that's it. Every hour, cron will run **rpki-client** which will produce JSON output of all the VRPs it has collected. As noted above, JSON output is what is used by StayRTR and GoRTR as their input sources. Make sure that the **/etc/cron.hourly/rpki-client** is executable, otherwise it will not run. and that's it. Every hour, cron will run **rpki-client** which will produce JSON output of all the VRPs it has collected. As noted above, JSON output is what is used by StayRTR and GoRTR as their input sources. Make sure that the **/etc/cron.hourly/rpki-client** is executable, otherwise it will not run.
 +
 +If you would like to include the [[https://bgp4all.com/pfs/hints/rpki#as0_tals|AS0 TALs]] from APNIC and LACNIC it is not sufficient to just place them in your chosen TAL directory. You will also need to include the **-0** option in the command line, like this:
 +<code>
 +/usr/local/sbin/rpki-client -0j > /tmp/rpki-client.log 2>&1
 +</code>
  
 It's a good idea to check the log file in case **rpki-client** reports issues trying to write local files etc. But mostly what you'll see there are all the transactions with the various CAs, and the problems encountered (there will be lots, unfortunately). It's a good idea to check the log file in case **rpki-client** reports issues trying to write local files etc. But mostly what you'll see there are all the transactions with the various CAs, and the problems encountered (there will be lots, unfortunately).
Line 283: Line 290:
 ===== StayRTR ===== ===== StayRTR =====
  
-StayRTR is a hard fork of [[rpki#gortr|GoRTR]] (which is no longer maintained by Cloudflare). For this reason, I **strongly** recommend you use StayRTR rather than GoRTR. If you have an existing GoRTR install, simply replace it with StayRTR.+StayRTR is a hard fork of GoRTR (which is no longer maintained by Cloudflare and is badly out of date). For this reason, I **strongly** recommend you use StayRTR rather than GoRTR. If you have an existing GoRTR install, simply replace it with StayRTR.
  
-StayRTR has now been packaged and is available as part of the Ubuntu 22.04 distribution. However, the packaged version is old (version 0.3.0). At the time of writing, the current release of StayRTR is version 0.5.1(47). I'm not going to upgrade a production system to interim Ubuntu releases just to get a slightly newer (and still out of date) version of StayRTR.+StayRTR has now been packaged and is available as part of the Ubuntu 22.04 distribution (packaged version is 0.3.0) and the Ubuntu 24.04 distribution (packaged version is 0.5.1). At the time of writing, the current release of StayRTR is version 0.6.2, and much prefer to have the latest version of a critical piece of software like a validator.
  
 So for this reason, and to stay up to date, at least on Ubuntu, we have to build it ourselves. A pity that the **StayRTR** maintainers don't build their own deb package, or pre-build packages like NLnetLabs do with Routinator. So for this reason, and to stay up to date, at least on Ubuntu, we have to build it ourselves. A pity that the **StayRTR** maintainers don't build their own deb package, or pre-build packages like NLnetLabs do with Routinator.
Line 293: Line 300:
 First you will need a working Go environment. Full instructions are at [[https://go.dev/doc/install|https://go.dev/doc/install]], and I've reproduced the key pieces here to make it easy for installers. First you will need a working Go environment. Full instructions are at [[https://go.dev/doc/install|https://go.dev/doc/install]], and I've reproduced the key pieces here to make it easy for installers.
  
-First off, download the latest Go package (1.22.at time of writing):+First off, download the latest Go package (1.24.at time of writing):
 <code> <code>
-wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz+wget https://go.dev/dl/go1.24.4.linux-amd64.tar.gz
 </code> </code>
 If you have an existing Go environment, perhaps save it in case something goes wrong with the new version: If you have an existing Go environment, perhaps save it in case something goes wrong with the new version:
Line 305: Line 312:
 cd /usr/local cd /usr/local
 sudo chmod 777 . sudo chmod 777 .
-tar xzf ~/go1.22.1.linux-amd64.tar.gz+tar xzf ~/go1.24.4.linux-amd64.tar.gz
 sudo chmod 755 . sudo chmod 755 .
 </code> </code>
Line 335: Line 342:
 <code> <code>
 cd dist cd dist
-sudo cp -p stayrtr-v0.5.1-47-gfebec67-linux-x86_64 /usr/local/bin/stayrtr +sudo cp -p stayrtr-v0.6.2-linux-x86_64 /usr/local/bin/stayrtr 
-sudo cp -p rtrdump-v0.5.1-47-gfebec67-linux-x86_64 /usr/local/bin/rtrdump +sudo cp -p rtrdump-v0.6.2-linux-x86_64 /usr/local/bin/rtrdump 
-sudo cp -p rtrmon-v0.5.1-47-gfebec67-linux-x86_64 /usr/local/bin/rtrmon+sudo cp -p rtrmon-v0.6.2-linux-x86_64 /usr/local/bin/rtrmon
 </code> </code>
  
Line 419: Line 426:
 and you should see something like this: and you should see something like this:
 <code> <code>
-stayrtr.service - StayRTR RPKI to Router Server +● stayrtr.service - StayRTR RPKI to Router Server 
-     Loaded: loaded (/lib/systemd/system/stayrtr.service; enabled; vendor preset: ena +     Loaded: loaded (/usr/lib/systemd/system/stayrtr.service; enabled; preset: enabled) 
-     Active: active (running) since Fri 2022-01-28 15:50:27 AEST25s ago +     Active: active (running) since Thu 2024-08-15 16:57:07 +0631s ago 
-       Docs: https://github.com/bgp/stayrtr   Main PID: 17390 (stayrtr) +       Docs: https://github.com/bgp/stayrtr 
-      Tasks: 11 (limit: 4915)     Memory: 241.8M+   Main PID: 44045 (stayrtr) 
 +      Tasks: (limit: 4614) 
 +     Memory: 379.9M (peak: 459.4M) 
 +        CPU: 3.805s
      CGroup: /system.slice/stayrtr.service      CGroup: /system.slice/stayrtr.service
-             └─17390 /usr/local/bin/stayrtr -bind :3323 -cache /var/db/rpki-client/js +             └─44045 /usr/local/bin/stayrtr -bind :3323 -cache /var/db/rpki-client/json 
-Jan 28 15:50:27 stayrtr systemd[1]: Starting StayRTR RPKI to Router Server... + 
-Jan 28 15:50:27 stayrtr systemd[1]: Started StayRTR RPKI to Router Server. +Aug 15 16:57:06 rpki systemd[1]: Starting stayrtr.service - StayRTR RPKI to Router Server... 
-Jan 28 15:50:27 stayrtr stayrtr[17390]: time="2022-01-28T15:50:27+10:00" level=info m +Aug 15 16:57:07 rpki systemd[1]: Started stayrtr.service - StayRTR RPKI to Router Server. 
-Jan 28 15:50:28 stayrtr stayrtr[17390]: time="2022-01-28T15:50:28+10:00" level=info m +Aug 15 16:57:10 rpki stayrtr[44045]: time="2024-08-15T16:57:10+06:00" level=info msg="New update (602077 uniques, 602151 total prefixes, 71 vaps, 3 router> 
-Jan 28 15:50:29 stayrtr stayrtr[17390]: time="2022-01-28T15:50:29+10:00" level=info +Aug 15 16:57:11 rpki stayrtr[44045]: time="2024-08-15T16:57:11+06:00" level=info msg="Update added, new serial 0" 
-Jan 28 15:50:29 stayrtr stayrtr[17390]: time="2022-01-28T15:50:29+10:00" level=info m+Aug 15 16:57:11 rpki stayrtr[44045]: time="2024-08-15T16:57:11+06:00" level=info msg="StayRTR Server started (sessionID:61374, refresh:3600, retry:600, ex>
 </code> </code>
 and you can also run the more traditional **ps ax** to see something like: and you can also run the more traditional **ps ax** to see something like:
 <code> <code>
-17390 ?        Ssl    0:04 /usr/local/bin/stayrtr -bind :3323 -cache /var/db/rpki-client/json+  44045 ?        Ssl    0:03 /usr/local/bin/stayrtr -bind :3323 -cache /var/db/rpki-client/json
 </code> </code>
  
 And that's it. Enjoy your new StayRTR installation. And that's it. Enjoy your new StayRTR installation.
  
-===== GoRTR ===== 
  
-I've included GoRTR here though it is no longer maintained by Cloudflare as the maintainer has moved on to pastures new. All development work is now being carried out on [[rpki#stayrtr|StayRTR]] which is a hard fork of GoRTR. The last version of GoRTR was released in April 2023, and is version 0.14.8.+===== Cisco IOS-XE Hints =====
  
-I'll be very clear - **please don't use GoRTR**. I still run it for interest sake. For production, [[rpki#stayrtr|StayRTR]] is very actively maintained, and that's what should be used in conjunction with [[rpki#rpki-client|rpki-client]].+This section shows the basic configuration needed to get route origin validation up and running on Cisco IOS-XE platforms.
  
-As with StayRTR, you need a working Go environmentPlease consult the [[rpki#installing_go|Installing Go]] section for how to do that.+Most commentary is for IOS-XE 16.x. Older versions will also likely work with the following examples, but their RPKI implementation is somewhat old and buggy.
  
 +==== IOS-XE Configuration with Validator ====
  
-==== Installing GoRTR ==== +Setting up a Cisco IOS-XE router to talk with validator is a one line configuration:
- +
-Easiest way to do this is to build from the [[https://github.com/cloudflare/gortr|Github repo]].  +
- +
-**Note1**: You could download and use the provided [[https://github.com/cloudflare/gortr/releases|binaries]] if you wish. +
- +
-**Note2**: You could even download the [[https://github.com/cloudflare/gortr/releases/download/v0.14.8/gortr_0.14.8_amd64.deb|Debian]] package if you wish, and install that. It needs the **adduser** package, and **libc** from 2.4 onwards (most modern Ubuntu releases). Bonus with the .deb package is that it comes with **systemd** configuration+
- +
-But we will focus on building from the source.+
 <code> <code>
-git clone https://github.com/cloudflare/gortr.git +router bgp <ASN> 
-cd gortr + bgp rpki server tcp <ip address> port <port> refresh 3600
-make build-gortr build-rtrmon build-rtrdump+
 </code> </code>
-which builds **gortr** as well as **rtrmon** and **rtrdump** (the latter used for testing purposes).+where <ip address> is the IP address (IPv4 or IPv6) of the validator, <port> is the TCP port the validator listens on, and 3600 is the RFC8210 recommended refresh interval (the period which the router will use to ask the validator if there is new/updated validation information available).
  
-Copy the resulting binaries to **/usr/local/bin**+Doing this will download the VRPs from the specified validator(s), and then update the BGP table (BGP RIB) with the prefixes validation state (whether valid, invalid, or not-found), and drop invalids. (**NB: See caveats below.**)
-<code> +
-cd dist +
-sudo cp -p gortr-v0.14.8-5-g9f01dca-linux-x86_64 /usr/local/bin/gortr +
-sudo cp -p rtrdump-v0.14.8-5-g9f01dca-linux-x86_64 /usr/local/bin/rtrdump +
-sudo cp -p rtrmon-v0.14.8-5-g9f01dca-linux-x86_64 /usr/local/bin/rtrmon +
-</code>+
  
-GoRTR has lots of options, but the ones we need are these:+To find out what is in the validation database (IPv4 and IPv6 commands shown):
 <code> <code>
- -bind string +show ip bgp rpki table 
-     Bind address (default ":8282"+show bgp ipv6 rpki table
- -cache string +
-    URL of the cached JSON data (default "https://rpki.cloudflare.com/rpki.json"+
- -checktime +
-    Check if file is still valid (default true) +
- -verify +
-        Check signature using provided public key (disable by passing -verify=false)+
 </code> </code>
-We don't need to use the Cloudflare JSON source, given we have our own from the newly created RPKI-client. RPKI-client doesn't insert a timestamp in the way that GoRTR wants, nor is there a signature on it, so we need to disable that too. +and to find out the status of the connection to the validator:
- +
-We run GoRTR like this:+
 <code> <code>
-/usr/local/bin/gortr -bind :3323 -verify=false -cache /var/db/rpki-client/json -checktime=false+show ip bgp rpki servers
 </code> </code>
-which will at least let us test that it works. Run it and see what happens - you should see output at the command line looking like this: 
-<code> 
-INFO[0001] New update (304138 uniques, 304138 total prefixes). 0 bytes. Updating sha256 hash  -> 0592ddc6e9a82666f8ddc5eda8cad76cb61f22640f17199b1bff06b5928b9718 
-INFO[0002] Updated added, new serial 0 
-INFO[0002] GoRTR Server started (sessionID:33094, refresh:3600, retry:600, expire:7200) 
-</code> 
-And if you check the ports that are listening (**ss -an**) you will see: 
-<code> 
-tcp    LISTEN           128          *:3323              *:* 
-tcp    LISTEN           128          *:8080              *:* 
-</code> 
-Port 3323 is the listening port for Router connections. And Port 8080 is the metrics port, for monitoring systems to connect to. 
  
-But perhaps this isn't good for long term operations as you'd prefer to have this start running automatically when the system starts. And for that we'd need to set up a suitable **systemd** entry+==== Cisco IOS-XE Caveats ==== 
 + 
 +Cisco IOS-XE has many defaults which are non-standard and will be potentially frustrating for operators: 
 +  * Cannot specify a source-interface for the router to validator connection 
 +  Automatically activates route origin validation (can be turned off!) 
 +  Automatically drops invalids (can be turned off!) 
 +  Locally originated prefixes are always marked as valid (cannot be turned off!) - fixed in most recent IOS-XE 17.x releases 
 +  Automatically prefers Valid path over Invalid/NotFound, even if latter has higher local-preference (BGP Best Path Selection over-ride) (cannot be turned off!) 
 +  * If validator disappears, router validation database is flushed within a few minutes - fixed in most recent IOS-XE 16.6 releases
  
-First off, let's create a user for GoRTR (it does not have to run as root):+To turn off the checking of the RPKI validation database (**IOS-XE 15.5 onwards**):
 <code> <code>
-sudo groupadd _gortr +router bgp <ASN> 
-sudo useradd –g _gortr –s /sbin/nologin –d /nonexistent –c "GoRTR user" _gortr+ address-family ipv4 
 +  bgp bestpath prefix-validate disable 
 + address-family ipv6 
 +  bgp bestpath prefix-validate disable
 </code> </code>
-Next we create a file **/etc/default/gortr** with the following contents: +The ROAs are still listed in the RPKI table but the router will not use them(This should be the default, as per RFC.)
-<code> +
-# Settings for GoRTRConsult https://github.com/cloudflare/gortr for +
-# more discussion and other available options+
  
-GORTR_ARGS=-bind :3323 -verify=false -cache /var/db/rpki-client/json -checktime=false +To turn off the automatic dropping of invalids:
-+
-</code> +
-Then we go to the **/lib/systemd/system/** folder and create the **systemd** entry - call it **gortr.service**. Here is a simple one that should work:+
 <code> <code>
-[Unit] +router bgp <ASN> 
-Description=GoRTR RPKI to Router Server + address-family ipv4 
-Documentation=https://github.com/cloudflare/gortr +  bgp bestpath prefix-validate allow-invalid 
-After=network.target + address-family ipv6 
- +  bgp bestpath prefix-validate allow-invalid
-[Service] +
-EnvironmentFile=/etc/default/gortr +
-ExecStart=/usr/local/bin/gortr $GORTR_ARGS +
-Type=exec +
-User=_gortr +
-Group=_gortr +
-AmbientCapabilities=CAP_NET_BIND_SERVICE +
-CapabilityBoundingSet=CAP_NET_BIND_SERVICE +
- +
-[Install] +
-WantedBy=multi-user.target+
 </code> </code>
-We then need to enable it:+A new set up of RPKI in a Cisco IOS-XE network should start with "monitoring" only. Which is only downloading the validation database, not implementing any checking. So the savvy operator would combine the above like this:
 <code> <code>
-sudo systemctl enable gortr+router bgp <ASN> 
 + address-family ipv4 
 +  bgp bestpath prefix-validate disable 
 +  bgp bestpath prefix-validate allow-invalid 
 + address-family ipv6 
 +  bgp bestpath prefix-validate disable 
 +  bgp bestpath prefix-validate allow-invalid
 </code> </code>
-which then displays: 
-<code> 
-Created symlink /etc/systemd/system/multi-user.target.wants/gortr.service → /lib/systemd/system/gortr.service. 
-</code> 
-and then we can run GoRTR, like this: 
-<code> 
-sudo systemctl start gortr 
-</code> 
-Once it is running, check that it is working by running: 
-<code> 
-sudo systemctl status gortr 
-</code> 
-and you should see something like this: 
-<code> 
-* gortr.service - GoRTR RPKI to Router Server 
-     Loaded: loaded (/lib/systemd/system/gortr.service; enabled; vendor preset: enabled) 
-    Drop-In: /run/systemd/system/service.d 
-             └─zzz-lxc-service.conf 
-     Active: active (running) since Wed 2023-07-19 07:00:18 UTC; 5 months 9 days ago 
-       Docs: https://github.com/cloudflare/gortr 
-   Main PID: 170962 (gortr) 
-      Tasks: 14 (limit: 38463) 
-     Memory: 314.5M 
-     CGroup: /system.slice/gortr.service 
-             └─170962 /usr/local/bin/gortr -bind :3323 -verify=false -cache /var/db/rpki-client/json -checktime=false 
  
-Dec 27 13:14:43 gortr gortr[170962]: time="2023-12-27T13:14:43Z" level=info msg="File /var/db/rpki-client/json is identical to the previous ve> +Once they are ready to implement RPKI, first remove the ''prefix-validate disable'', and monitor. And once ready to do ROV, removing the ''prefix-validate allow-invalid'' would be the last step. 
-Dec 27 13:24:46 gortr gortr[170962]: time="2023-12-27T13:24:46Z" level=info msg="New update (621269 uniques621269 total prefixes)0 bytes. > + 
-Dec 27 13:24:50 gortr gortr[170962]: time="2023-12-27T13:24:50Z" level=info msg="Updated added, new serial 3871" +The major show-stopper for an IOS-XE based network is the insertion of validation check in the BGP path selection processover-riding ''local-preference''There is no way of turning this mis-feature off and it is a fundamental impediment to implementing ROV in a Cisco IOS-XE based network. 
-</code> + 
-and you can also run the more traditional **ps ax** to see something like:+To propagate the validation state in IBGP, both BGP speakers need:
 <code> <code>
- 170962 ?        Ssl  985:57 /usr/local/bin/gortr -bind :3323 -verify=false -cache /var/db/rpki-client/json -checktime=false+neighbor x.x.x.x announce rpki state
 </code> </code>
 +Please do **NOT** do this, as there are operational consequences, especially if validators become unreachable (specifically that IOS-XE has added an undocumented feature in the path selection process whereby a prefix marked as //valid// from one IBGP neighbour is preferred over //invalid/////notfound// from another IBGP neighbour regardless of //local-preference// setting).
  
-And that'it. Enjoy your new GoRTR installation.+**Summary:** Cisco has tried to make it easy to deploy ROV, but unfortunately this "assistance" ignores standards and best practicesAny implementation must never take control away from the operator about what they can and cannot do, especially if there is no way of turning off mis-features.
  
-===== Cisco IOS-XE Hints =====+===== Cisco IOS-XR Hints =====
  
-This section shows the basic configuration needed to get route origin validation up and running on a Cisco IOS-XE platform. (Cisco IOS-XR is not covered here and will likely be different.)+This section shows the basic configuration needed to get route origin validation up and running on Cisco IOS-XR platforms.
  
-Most commentary is for IOS-XE 16.onwards. IOS 15.5S (and IOS-XE equivalent) will also likely work with the following examples, but their RPKI implementation is somewhat old and buggy.+Most commentary is for IOS-XR 7.onwards. Older versions will also likely work with the following examples, but their RPKI implementation is likely to be more buggy.
  
-==== Configuration with Validator ====+==== IOS-XR Configuration with Validator ====
  
-Setting up a Cisco router to talk with a validator is simple:+Setting up a Cisco IOS-XR router to talk with a validator is done like this:
 <code> <code>
 router bgp <ASN> router bgp <ASN>
- bgp rpki server tcp <ip address> port <port> refresh 3600+ rpki server <ip address> 
 +  bind-source interface Loopback0 
 +  transport tcp port <port> 
 +  refresh-time 3600 
 +  response-time 600
 </code> </code>
-where <ip address> is the IP address (IPv4 or IPv6) of the validator, <port> is the TCP port the validator listens on, and 3600 is the RFC8210 recommended refresh interval (the period which the router will use to ask the validator if there is new/updated validation information available).+where <ip address> is the IP address (IPv4 or IPv6) of the validator, <port> is the TCP port the validator listens on, and 3600 is the RFC8210 recommended refresh interval (the period which the router will use to ask the validator if there is new/updated validation information available). Binding to the Loopback address makes ACLs for the validator simpler to manage. Note that IOS-XE does not offer this valuable feature.
  
 To find out what is in the validation database (IPv4 and IPv6 commands shown): To find out what is in the validation database (IPv4 and IPv6 commands shown):
Line 600: Line 555:
 and to find out the status of the connection to the validator: and to find out the status of the connection to the validator:
 <code> <code>
-show ip bgp rpki servers+show ip bgp rpki server summary
 </code> </code>
  
-==== Caveats ==== +To turn on validation for prefixes on the routerwe need to activate the functionality per address family (as per best practice the operator needs to choose!).
- +
-Cisco IOS-XE has many defaults which are non-standard and will be potentially frustrating for operators: +
-  * Automatically activates route origin validation (cannot be turned off!) +
-  * Automatically drops invalids (can be turned off!) +
-  * Locally originated prefixes are always marked as valid (cannot be turned off!) - fixed in most recent IOS-XE 17.x releases +
-  * Automatically prefers Valid path over Invalid/NotFoundeven if latter has higher local-preference (BGP Best Path Selection over-ride) (cannot be turned off!) - only relevant if propagating validation information in IBGP (not recommended) +
-  * If validator disappears, router validation database is flushed within a few minutes - fixed in most recent IOS-XE 16.x releases +
- +
-To turn off the automatic dropping of invalids:+
 <code> <code>
 router bgp <ASN> router bgp <ASN>
- bgp bestpath prefix-validate allow-invalid+ address-family ipv4 unicast 
 +  bgp origin-as validation enable 
 +  bgp bestpath origin-as use validity 
 +  bgp bestpath origin-as allow invalid 
 + ! 
 + address-family ipv6 unicast 
 +  bgp origin-as validation enable 
 +  bgp bestpath origin-as use validity 
 +  bgp bestpath origin-as allow invalid
 </code> </code>
-To propagate the validation state in IBGPboth BGP speakers need:+The above enables origin validation, and still allows invalid prefixes in the BGP table. 
 + 
 +Once you are ready to drop invalids, as per recommended best practices:
 <code> <code>
-neighbor x.x.x.x announce rpki state+router bgp <ASN> 
 +  address-family ipv4 unicast 
 +    no bgp bestpath origin-as allow invalid 
 +  address-family ipv6 unicast 
 +    no bgp bestpath origin-as allow invalid
 </code> </code>
-Please do **NOT** do this, as there are operational consequences, especially if validators become unreachable (specifically that IOS-XE has added an undocumented feature in the path selection process whereby a prefix marked as //valid// from one IBGP neighbour is preferred over //invalid/////notfound// from another IBGP neighbour regardless of //local-preference// setting). 
  
-**Summary:** Cisco has tried to make it easy to deploy ROVbut unfortunately this "assistance" ignores standards and best practices. Any implementation must never take control away from the operator about what they can and cannot do, especially if there is no way of turning off mis-features. +To display the validation state of prefixesyou can use the following command:
- +
-==== Implementing Route Origin Validation ==== +
- +
-The final step in Cisco IOS-XE is to implement Route Origin Validation. This is achieved simply by turning off the knob we noted above that automatically drops //invalid// prefixes.+
 <code> <code>
-router bgp <ASN> +RP/0/RP0/CPU0:cr1#show bgp origin-as validity ? 
- no bgp bestpath prefix-validate allow-invalid+  invalid    filter routes with invalid origin-as 
 +  not-found  filter routes with unknown (not found) origin-as 
 +  standby    Display Standby BGP information 
 +  valid      filter routes with valid origin-as 
 +  |          Output Modifiers 
 +  <cr>
 </code> </code>
 +The sub-options will display all the prefixes fitting into each category.
  
 ===== Juniper Hints ===== ===== Juniper Hints =====
hints/rpki.1710933761.txt.gz · Last modified: by philip