Introduction

This lab is designed to provide hands-on experience with the deployment and operation of Resource Public Key Infrastructure (RPKI) for securing BGP routing. Participants will deploy RPKI validator software and configure routers to perform Route Origin Validation (ROV) within a predefined network topology.

Core routers and IBGP sessions within each AS are preconfigured to allow participants to focus on RPKI-related tasks rather than basic BGP setup. During the lab, participants will set up two Ubuntu-based servers to run RPKI validators Routinator and FORT, and connect them with multiple routing platforms, including Cisco IOS XE, Juniper Junos OS, MikroTik RouterOS, and Arista EOS, using RPKI-to-Router (RTR) protocol.

Upon completion of the lab, participants will gain practical insight into how RPKI validators interact with different routing platforms, how ROV affects BGP best path selection, and how routing policies can be implemented based on RPKI validation states.

The lab is divided into four structured tasks that progressively build from validator deployment to policy enforcement.

Objectives

By the end of this lab, participants will be able to gain an understanding of:

  • The role of RPKI in enhancing BGP security and mitigating route origin hijacking
  • The architecture and function of RPKI validators, including their interaction with routers via the RTR protocol
  • The implementation of ROV across different routing platforms (Cisco IOS XE, Juniper Junos OS, MikroTik RouterOS, Arista EOS) in a multi-vendor environment
  • The meaning of RPKI validation states (VALID, INVALID, UNKNOWN / NOT FOUND) and their impact on BGP best path selection
  • The use of RPKI validation states in designing flexible routing policies that go beyond simply dropping INVALID prefixes

Lab Structure

1
Install and Configure Routinator
2
Install and Configure FORT
3
Establish BGP Sessions and Enable RPKI Origin Validation
4
Implement Routing Policies Based on RPKI Validation States
Preconfigured Components: Core routers, Transit router, and IBGP sessions on border routers are already configured.

Topology

RPKI Deployment Lab Topology

RPKI Deployment Lab Topology

Prefix Announcement by ASNs

Device Name ASN IPv4 Prefix IPv6 Prefix
Border1-Cisco13553361.45.248.0/242401:4601:248::/48
Border2-Juniper13553561.45.250.0/242401:4601:250::/48
Border3-MikroTik13553761.45.252.0/242401:4601:252::/48
Border4-Arista13553961.45.254.0/242401:4601:254::/48

Task 1

Install and Configure Routinator

This task focuses on installation and configuration of an RPKI validator called "Routinator", which will be used as our primary validator in this lab.

By the end of this task, we should ensure Routinator is running with its local RPKI cache database fully loaded and ready for accepting RTR sessions from routers.

Section 1.1: Installing Routinator

Log into Routinator server. When running "sudo" commands, enter the login password if prompted.

Update APT package index.

🔗 Routinator
sudo apt update

Install packages to allow APT to use a repository over HTTPS.

🔗 Routinator
sudo apt install -y ca-certificates curl gnupg lsb-release nano net-tools

Add the GPG key from NLnet Labs.

🔗 Routinator
curl -fsSL https://packages.nlnetlabs.nl/aptkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/nlnetlabs-archive-keyring.gpg

Set up the repository.

🔗 Routinator
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/nlnetlabs-archive-keyring.gpg] https://packages.nlnetlabs.nl/linux/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/nlnetlabs.list > /dev/null

Update the APT package index again.

🔗 Routinator
sudo apt update

Install Routinator.

🔗 Routinator
sudo apt install -y routinator

Stop Routinator to ensure it will not be running without proper configuration.

🔗 Routinator
sudo systemctl stop routinator

Verify Routinator's status.

🔗 Routinator
sudo systemctl status routinator

Verify the list of TALs. By default, Routinator installs all TALs from 5 RIRs.

🔗 Routinator
routinator --tal=list
▶ Output
.---- RIR TALs
|
.- RIR test TALs
V  V
X      afrinic             AFRINIC production TAL
X      apnic               APNIC production TAL
X      arin                ARIN production TAL
X      lacnic              LACNIC production TAL
X      ripe                RIPE production TAL
   X   apnic-testbed       APNIC RPKI Testbed
   X   arin-ote            ARIN Operational Test and Evaluation Environment
   X   ripe-pilot          RIPE NCC RPKI Test Environment
           nlnetlabs-testbed   NLnet Labs RPKI Testbed

Verify default configuration of Routinator.

🔗 Routinator
routinator config

Section 1.2: Configuring Routinator

Routinator will use the configuration file /etc/routinator/routinator.conf, which contains some preconfigured options. Let's customize the parameters.

🔗 Routinator
sudo nano /etc/routinator/routinator.conf

Make the following changes to run Routinator on specific addresses and ports. In this lab, we are planning to run RTR protocol and web server on both IPv4 and IPv6.

🔗 Routinator
rtr-listen = ["100.64.0.1:3323", "[2001:db8::1]:3323"]
http-listen = ["100.64.0.1:8323", "[2001:db8::1]:8323"]

Press Ctrl+O then Enter to save, then Ctrl+X to exit nano.

After changing the configuration file, use --config option to verify the applied configuration.

🔗 Routinator
routinator --config /etc/routinator/routinator.conf config

Once the configuration is confirmed to be correctly applied, restart Routinator.

🔗 Routinator
sudo systemctl restart routinator

Verify Routinator's status.

🔗 Routinator
sudo systemctl status routinator

Press q to return.

Verify whether Routinator is running on addresses and ports as configured.

🔗 Routinator
ss -tln
At this stage, wait up to 15 minutes while Routinator downloads ROA objects from RPKI repositories. Time may vary depending on the size of ROA data and server bandwidth.

Routinator comes with a graphical web portal accessible from MGMT-H1. Open Firefox and navigate to http://100.64.0.1:8323 or http://[2001:db8::1]:8323.

Once Routinator's database is fully loaded, test prefix validation on the web portal:

  • Prefix: 2401:4601:248::/48
  • Origin ASN: 135533

According to the ROA created for this prefix, the validation result should be VALID.

Routinator Web Portal showing VALID result

Routinator Web Portal - Prefix validation result showing VALID


Task 2

Install and Configure FORT

This task focuses on installation and configuration of another RPKI validator called "FORT", which will be used as our secondary validator in this lab.

Section 2.1: Installing FORT

Log into Fort server. When running "sudo" commands, enter the login password if prompted.

Update APT package index.

🔗 Fort
sudo apt update

(Optional, For Reference Only) To install the dependencies and required packages such as libssl (>=1.1) and libjansson4 (>=2.4), add a suitable repository.

🔗 Fort
sudo nano /etc/apt/sources.list

(Optional, For Reference Only) Add the following repositories as a minimum.

🔗 Fort
deb     http://deb.debian.org/debian/   stable main non-free contrib
deb-src http://deb.debian.org/debian/   stable main non-free contrib

Press Ctrl+O then Enter to save, then Ctrl+X to exit.

(Optional, For Reference Only) Accept the public keys of the newly added repositories.

🔗 Fort
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 6ED0E7B82643E131 F8D2585B8783D481
Note: There might be a warning about the legacy keyring — this can be safely ignored.

Update the APT package index again.

🔗 Fort
sudo apt update

Install dependencies and required packages.

🔗 Fort
sudo apt install -y build-essential libjansson-dev libjansson4 libssl-dev pkg-config rsync libcurl4-openssl-dev libxml2-dev nano net-tools
Note: If a "Daemons using outdated libraries" screen appears, press Tab then Enter to continue.

Navigate to a temporary directory and download the FORT installation package. To get the most up-to-date version, visit https://github.com/NICMx/FORT-validator/releases.

🔗 Fort
cd /tmp
wget https://github.com/NICMx/FORT-validator/releases/download/1.6.7/fort_amd64.deb

Install FORT using the downloaded package.

🔗 Fort
sudo apt install ./fort_amd64.deb

Stop FORT to ensure it will not be running without proper configuration.

🔗 Fort
sudo systemctl stop fort

Verify FORT's status.

🔗 Fort
sudo systemctl status fort

Verify the list of TALs. By default, FORT installs all TALs from 5 RIRs.

🔗 Fort
ls -lah /etc/fort/tal

Section 2.2: Configuring FORT

Create a directory with necessary permissions for FORT to store ROA output.

🔗 Fort
mkdir /tmp/fort/
sudo chown -R fort: /tmp/fort

FORT configuration file is located at /etc/fort/config.json. Open it for editing.

🔗 Fort
sudo nano /etc/fort/config.json

Remove the current configuration and apply the following. The output section is optional and will print all ROA objects into a file for later review. Full configuration options are documented in the FORT configuration documentation.

🔗 Fort
{
    "tal": "/etc/fort/tal/",
    "local-repository": "/var/lib/fort/",
    "server": {
        "address": [
            "100.64.0.2",
            "2001:db8::2"
            ],
        "port": "6323"
    },
    "output": {
        "roa": "/tmp/fort/roas.csv"
    },
    "log": {
        "output": "syslog"
    }
}

Press Ctrl+O then Enter to save, then Ctrl+X to exit.

Restart FORT.

🔗 Fort
sudo systemctl restart fort

Verify FORT's status.

🔗 Fort
sudo systemctl status fort

Press q to return.

Verify whether FORT is running on addresses and ports as configured.

🔗 Fort
ss -tln
Wait up to 15 minutes while FORT downloads ROA objects. Once the database is fully loaded, the log message "First validation cycle successfully ended..." will appear in the status output.

Periodically check FORT's status to monitor progress.

🔗 Fort
sudo systemctl status fort

The ROA output CSV file in /tmp/fort should also be generated.

🔗 Fort
sudo ls -l /tmp/fort
sudo head -n 10 /tmp/fort/roas.csv

Task 3

Establish BGP Sessions and Enable ROV

Once both validators are operational and their local RPKI cache databases are fully populated, we can proceed with establishing BGP sessions and enabling ROV on the routers.

Section 3.1: Border1-Cisco – Establishing IBGP and EBGP Sessions

Log into Border1-Cisco router. To enter privileged EXEC mode, use enable password.

IBGP sessions have been preconfigured. Verify the BGP sessions:

🔗 Border1-Cisco
show bgp ipv4 unicast summary
show bgp ipv6 unicast summary

We expect to see 2 IBGP sessions. After confirming BGP sessions are established, verify the BGP table:

🔗 Border1-Cisco
show bgp ipv4 unicast
show bgp ipv6 unicast

Show detailed BGP Path Attributes of a specific prefix:

🔗 Border1-Cisco
show bgp ipv4 unicast 61.45.248.0/24
show bgp ipv6 unicast 2401:4601:248::/48

Next, configure the EBGP session with the Transit router.

🔗 Border1-Cisco
configure terminal
router bgp 135533
 neighbor 192.0.2.1 remote-as 64500
 neighbor 192.0.2.1 description IPv4 EBGP with Transit
 neighbor 3fff:1::1 remote-as 64500
 neighbor 3fff:1::1 description IPv6 EBGP with Transit
 address-family ipv4 unicast
  neighbor 192.0.2.1 activate
 exit-address-family
 address-family ipv6 unicast
  neighbor 3fff:1::1 activate
 exit-address-family
end
write memory

After configuring the EBGP session, verify BGP status:

🔗 Border1-Cisco
show bgp ipv4 unicast summary
show bgp ipv6 unicast summary

Section 3.2: Border1-Cisco – Enabling ROV

To enable ROV, configure RTR sessions between the router and the validators.

🔗 Border1-Cisco
configure terminal
router bgp 135533
 bgp rpki server tcp 100.64.0.1 port 3323 refresh 900
 bgp rpki server tcp 2001:db8::1 port 3323 refresh 900
 bgp rpki server tcp 100.64.0.2 port 6323 refresh 900
 bgp rpki server tcp 2001:db8::2 port 6323 refresh 900
end
write memory
Note: If any error appears around RPKI validator server sending no data (usually FORT), this indicates the validator does not yet have all Validated ROA Payloads (VRPs). This resolves once all ROAs are downloaded. No need to wait — proceed to the next task.

Verify RTR sessions and synchronization status:

🔗 Border1-Cisco
show ip bgp rpki servers | include BGP|Prefixes
Note: If any validator shows no prefix, remove it from BGP configuration and re-add it. If prefix counts differ between validators, this is expected and not a bug.

To view the RPKI validation database:

🔗 Border1-Cisco
show ip bgp rpki table
ROV is enabled by default on Cisco IOS and IOS XE. The default behavior may result in unintended routing issues, so we will disable the default mechanism and implement policy-based RPKI ROV in Task 4 to explicitly drop INVALID prefixes.

Enable BGP Soft Reconfiguration Inbound on EBGP sessions to avoid periodic BGP refreshes when VRP tables are updated.

🔗 Border1-Cisco
configure terminal
router bgp 135533
 address-family ipv4 unicast
  neighbor 192.0.2.1 soft-reconfiguration inbound
 exit-address-family
 address-family ipv6 unicast
  neighbor 3fff:1::1 soft-reconfiguration inbound
 exit-address-family
end
write memory

Once RPKI validation database synchronization is done, verify the BGP table again:

🔗 Border1-Cisco
show bgp ipv4 unicast
show bgp ipv6 unicast

Section 3.3: Border2-Juniper – Establishing IBGP and EBGP Sessions

Log into Border2-Juniper router. IBGP sessions have been preconfigured. Verify with:

🔗 Border2-Juniper
show bgp summary

Verify BGP prefixes in the routing table:

🔗 Border2-Juniper
show route protocol bgp table inet.0
show route protocol bgp table inet6.0

Show detailed BGP Path Attributes of a specific prefix:

🔗 Border2-Juniper
show route protocol bgp table inet.0 61.45.250.0/24 detail
show route protocol bgp table inet6.0 2401:4601:250::/48 detail

Configure the EBGP session with the Transit router.

🔗 Border2-Juniper
configure
top edit protocols bgp group TRANSIT-EBGP-V4
    set type external
    set peer-as 64500
    set family inet unicast
    set neighbor 192.0.2.5
    set description "IPv4 EBGP with Transit"
top edit protocols bgp group TRANSIT-EBGP-V6
    set type external
    set peer-as 64500
    set family inet6 unicast
    set neighbor 3fff:2::1
    set description "IPv6 EBGP with Transit"
commit and-quit

After configuring the EBGP session, verify BGP status:

🔗 Border2-Juniper
show bgp summary

Section 3.4: Border2-Juniper – Enabling ROV

Configure RTR sessions between the router and the validators.

🔗 Border2-Juniper
configure
top edit routing-options validation group ROUTINATOR
    set session 100.64.0.1 port 3323
    set session 2001:db8::1 port 3323
top edit routing-options validation group FORT
    set session 100.64.0.2 port 6323
    set session 2001:db8::2 port 6323
commit and-quit

Verify RTR sessions and synchronization status:

🔗 Border2-Juniper
show validation session
Note: Junos OS takes some time to finish synchronization. If the database is empty, wait a few minutes and try again.

To view the RPKI validation database:

🔗 Border2-Juniper
show validation database

Unlike Cisco, Junos OS requires a routing policy to perform ROV. Create a policy implementing the following actions: Accept VALID, Reject INVALID, Accept UNKNOWN/NOT FOUND.

🔗 Border2-Juniper
configure
top edit policy-options policy-statement RPKI-ROV
    set term VALID from protocol bgp validation-database valid
    set term VALID then accept validation-state valid
    set term INVALID from protocol bgp validation-database invalid
    set term INVALID then reject validation-state invalid
    set term UNKNOWN from protocol bgp validation-database unknown
    set term UNKNOWN then accept validation-state unknown
commit and-quit

Set the newly created policy as the import policy of the EBGP sessions.

🔗 Border2-Juniper
configure
top set protocols bgp group TRANSIT-EBGP-V4 import RPKI-ROV
top set protocols bgp group TRANSIT-EBGP-V6 import RPKI-ROV
commit and-quit

Verify BGP prefixes in the routing table:

🔗 Border2-Juniper
show route protocol bgp table inet.0
show route protocol bgp table inet6.0

Section 3.5: Border3-MikroTik – Establishing IBGP and EBGP Sessions

Log into Border3-MikroTik router. IBGP sessions have been preconfigured. Verify:

🔗 Border3-MikroTik
/routing/bgp/session/print

Verify BGP prefixes in the routing table:

🔗 Border3-MikroTik
/routing/route/print where bgp and afi=ip4
/routing/route/print where bgp and afi=ip6

Show detailed BGP Path Attributes:

🔗 Border3-MikroTik
/routing/route/print detail where bgp and afi=ip4 and dst-address=61.45.252.0/24
/routing/route/print detail where bgp and afi=ip6 and dst-address=2401:4601:252::/48

Check the BGP template named "ISP3":

🔗 Border3-MikroTik
/routing/bgp/template/print

Configure the EBGP session with the Transit router.

🔗 Border3-MikroTik
/routing/bgp/connection
    add name=TRANSIT-V4 connect=yes listen=yes         remote.address=192.0.2.9 .as=64500 local.role=ebgp         templates=ISP3 address-families=ip
    add name=TRANSIT-V6 connect=yes listen=yes         remote.address=3fff:3::1 .as=64500 local.role=ebgp         templates=ISP3 address-families=ipv6

After configuring, verify BGP status:

🔗 Border3-MikroTik
/routing/bgp/session/print

Section 3.6: Border3-MikroTik – Enabling ROV

Configure the RTR session with the validator.

🔗 Border3-MikroTik
/routing rpki add group=VALIDATOR address=2001:db8::1 port=3323 refresh-interval=900
Note: The MikroTik RouterOS version used in this lab has limitations with multiple RTR sessions. We configure only a single connection to Routinator over IPv6. See MikroTik RPKI documentation for more information.

Verify RTR session synchronization status:

🔗 Border3-MikroTik
/routing/rpki/session/print

Once the RTR session state is "sync", query ROA of a specific prefix:

🔗 Border3-MikroTik
/routing rpki rpki-query group=VALIDATOR prefix=2401:4601:252::/48

Test validation of a specific prefix:

🔗 Border3-MikroTik
/routing rpki rpki-check group=VALIDATOR prefix=2401:4601:252::/48 origin-as=135537

Create a routing filter that rejects INVALID prefixes and accepts all others.

🔗 Border3-MikroTik
/routing/filter/rule
    add chain=EBGP-IN rule="rpki-verify VALIDATOR"
    add chain=EBGP-IN rule="if (rpki invalid) { reject } else { accept }"

Set the newly created routing filter as input filter of the EBGP sessions.

🔗 Border3-MikroTik
/routing bgp connection
    set TRANSIT-V4 input.filter=EBGP-IN
    set TRANSIT-V6 input.filter=EBGP-IN

Verify BGP prefixes using proplist output:

🔗 Border3-MikroTik
/routing/route/print proplist=dst-address,gateway,distance,bgp.local-pref,bgp.as-path,rpki where bgp and afi=ip4
/routing/route/print proplist=dst-address,gateway,distance,bgp.local-pref,bgp.as-path,rpki where bgp and afi=ip6

Section 3.7: Border4-Arista – Establishing IBGP and EBGP Sessions

Log into Border4-Arista router. To enter privileged EXEC mode, use enable password. IBGP sessions have been preconfigured. Verify:

🔗 Border4-Arista
show ip bgp summary
show ipv6 bgp summary

Verify the BGP table:

🔗 Border4-Arista
show ip bgp
show ipv6 bgp

Show detailed BGP Path Attributes:

🔗 Border4-Arista
show ip bgp 61.45.254.0/24
show ipv6 bgp 2401:4601:254::/48

Configure the EBGP session with the Transit router.

🔗 Border4-Arista
configure terminal
router bgp 135539
 neighbor 192.0.2.13 remote-as 64500
 neighbor 192.0.2.13 description IPv4 EBGP with Transit
 neighbor 3fff:4::1 remote-as 64500
 neighbor 3fff:4::1 description IPv6 EBGP with Transit
 address-family ipv4
  neighbor 192.0.2.13 activate
  exit
 address-family ipv6
  neighbor 3fff:4::1 activate
  exit
end
write memory

Verify BGP status:

🔗 Border4-Arista
show ip bgp summary
show ipv6 bgp summary

Section 3.8: Border4-Arista – Enabling ROV

In Arista EOS, multi-agent service is required to enable RPKI. Enable it first.

🔗 Border4-Arista
configure terminal
service routing protocols model multi-agent
end
write memory

Reload the router for the multi-agent configuration to take effect.

🔗 Border4-Arista
reload now

Once the router is back, log in again and configure RTR sessions.

🔗 Border4-Arista
configure terminal
router bgp 135539
 rpki cache ROUTINATOR-V4
  host 100.64.0.1 port 3323
  refresh-interval 900
  exit
 rpki cache ROUTINATOR-V6
  host 2001:db8::1 port 3323
  refresh-interval 900
  exit
 rpki cache FORT-V4
  host 100.64.0.2 port 6323
  refresh-interval 900
  exit
 rpki cache FORT-V6
  host 2001:db8::2 port 6323
  refresh-interval 900
  exit
end
write memory

Verify RTR sessions and synchronization status:

🔗 Border4-Arista
show bgp rpki roa summary

To view the RPKI validation database:

🔗 Border4-Arista
show bgp rpki roa ipv4 | more
show bgp rpki roa ipv6 | more

Arista EOS does not enable ROV by default. Enable it explicitly:

🔗 Border4-Arista
configure terminal
router bgp 135539
 rpki origin-validation
  ebgp local
end
write memory

Verify the BGP table after synchronization:

🔗 Border4-Arista
show bgp ipv4 unicast
show bgp ipv6 unicast

Section 3.9: Originating RPKI INVALID and UNKNOWN Prefixes

To test RPKI validation, originate INVALID and UNKNOWN prefixes in the Transit router:

  • RPKI INVALID: 61.45.249.0/24 and 2401:4601:249::/48
  • RPKI UNKNOWN: 61.45.248.0/22 and 2401:4601:1000::/36

Log into Transit router and originate/advertise the prefixes.

🔗 Transit
/ip/route
    add dst-address=61.45.248.0/22 blackhole
    add dst-address=61.45.249.0/24 blackhole
/ipv6/route
    add dst-address=2401:4601:1000::/36 blackhole
    add dst-address=2401:4601:249::/48 blackhole
/ip/firewall/address-list
    add list=TRANSIT-V4-OUT address=61.45.248.0/22
    add list=TRANSIT-V4-OUT address=61.45.249.0/24
/ipv6/firewall/address-list
    add list=TRANSIT-V6-OUT address=2401:4601:1000::/36
    add list=TRANSIT-V6-OUT address=2401:4601:249::/48
/routing/filter/rule
    add chain=TRANSIT-V4-OUT disabled=no rule="if (dst-len<=24) { accept }"
    add chain=TRANSIT-V6-OUT disabled=no rule="if (dst-len<=48) { accept }"
/routing/bgp/connection
    set ISP1-V4 output.filter-chain=TRANSIT-V4-OUT output.network=TRANSIT-V4-OUT
    set ISP2-V4 output.filter-chain=TRANSIT-V4-OUT output.network=TRANSIT-V4-OUT
    set ISP3-V4 output.filter-chain=TRANSIT-V4-OUT output.network=TRANSIT-V4-OUT
    set ISP4-V4 output.filter-chain=TRANSIT-V4-OUT output.network=TRANSIT-V4-OUT
    set ISP1-V6 output.filter-chain=TRANSIT-V6-OUT output.network=TRANSIT-V6-OUT
    set ISP2-V6 output.filter-chain=TRANSIT-V6-OUT output.network=TRANSIT-V6-OUT
    set ISP3-V6 output.filter-chain=TRANSIT-V6-OUT output.network=TRANSIT-V6-OUT
    set ISP4-V6 output.filter-chain=TRANSIT-V6-OUT output.network=TRANSIT-V6-OUT

Verify BGP advertisements:

🔗 Transit
/routing/bgp/advertisements/print where as-path~"64500$"

Section 3.10: Border1-Cisco – Verifying RPKI INVALID and UNKNOWN Prefixes

View BGP table. For each address family, expect 2 prefixes with origin ASN 64500: 1 INVALID and 1 UNKNOWN.

🔗 Border1-Cisco
show bgp ipv4 unicast
show bgp ipv6 unicast

View BGP routes in the routing table. Cisco IOS/IOS XE drops RPKI INVALIDs by default — the routing table will not contain INVALID prefixes.

🔗 Border1-Cisco
show ip route bgp
show ipv6 route bgp

Section 3.11: Border2-Juniper – Verifying RPKI INVALID and UNKNOWN Prefixes

View BGP prefixes. INVALID prefixes are hidden, UNKNOWN prefixes appear normally.

🔗 Border2-Juniper
show route protocol bgp table inet.0 terse
show route protocol bgp table inet6.0 terse

To view hidden (INVALID) BGP prefixes, add the hidden keyword:

🔗 Border2-Juniper
show route protocol bgp table inet.0 terse hidden
show route protocol bgp table inet6.0 terse hidden

Section 3.12: Border3-MikroTik – Verifying RPKI INVALID and UNKNOWN Prefixes

View BGP prefixes. INVALID prefixes are filtered and Inactive (no "A" flag), UNKNOWN prefixes are Active (with "A" flag).

🔗 Border3-MikroTik
/routing/route/print proplist=dst-address,gateway,distance,bgp.local-pref,bgp.as-path,rpki where bgp and afi=ip4
/routing/route/print proplist=dst-address,gateway,distance,bgp.local-pref,bgp.as-path,rpki where bgp and afi=ip6

Section 3.13: Border4-Arista – Verifying RPKI INVALID and UNKNOWN Prefixes

View BGP table. For each address family, expect 2 prefixes with origin ASN 64500: 1 INVALID and 1 UNKNOWN.

🔗 Border4-Arista
show bgp ipv4 unicast
show bgp ipv6 unicast

View BGP routes in the routing table. Unlike many other vendors, Arista EOS accepts INVALID prefixes by default.

🔗 Border4-Arista
show ip route bgp
show ipv6 route bgp

To reject INVALID prefixes, configure an import policy and apply it to the EBGP sessions.

🔗 Border4-Arista
configure terminal
route-map EBGP-IN deny 10
 match origin-as validity invalid
 exit
route-map EBGP-IN permit 20
 exit
router bgp 135539
 address-family ipv4
  neighbor 192.0.2.13 route-map EBGP-IN in
  exit
 address-family ipv6
  neighbor 3fff:4::1 route-map EBGP-IN in
  exit
end
write memory

Verify BGP table and routing table after the policy takes effect:

🔗 Border4-Arista
show bgp ipv4 unicast
show bgp ipv6 unicast
show ip route bgp
show ipv6 route bgp

Task 4

Implement Routing Policies Based on ROV States

In this task, instead of simply dropping INVALID prefixes, we implement RPKI routing policies that accept all prefixes but set BGP LOCAL_PREF according to their ROV states:

Section 4.1: Border1-Cisco – Implementing BGP Import Policy for ROV

Configure the RPKI routing policy.

🔗 Border1-Cisco
configure terminal
route-map RPKI-POLICY-IN permit 10
 match rpki valid
 set local-preference 110
 exit
route-map RPKI-POLICY-IN permit 20
 match rpki not-found
 set local-preference 100
 exit
route-map RPKI-POLICY-IN permit 30
 match rpki invalid
 set local-preference 90
 exit
end
write memory

Disable the default INVALID-drop behavior, then apply the policy as inbound filter of the EBGP sessions.

🔗 Border1-Cisco
configure terminal
router bgp 135533
 address-family ipv4 unicast
  bgp bestpath prefix-validate allow-invalid
  neighbor 192.0.2.1 route-map RPKI-POLICY-IN in
 exit-address-family
 address-family ipv6 unicast
  bgp bestpath prefix-validate allow-invalid
  neighbor 3fff:1::1 route-map RPKI-POLICY-IN in
 exit-address-family
end
write memory

Verify BGP table and routing table:

🔗 Border1-Cisco
show bgp ipv4 unicast
show bgp ipv6 unicast
show ip route bgp
show ipv6 route bgp

Section 4.2: Border2-Juniper – Implementing BGP Import Policy for ROV

Configure the RPKI routing policy.

🔗 Border2-Juniper
configure
top edit policy-options policy-statement RPKI-POLICY
    set term VALID from protocol bgp validation-database valid
    set term VALID then accept validation-state valid local-preference 110
    set term INVALID from protocol bgp validation-database invalid
    set term INVALID then accept validation-state invalid local-preference 90
    set term UNKNOWN from protocol bgp validation-database unknown
    set term UNKNOWN then accept validation-state unknown local-preference 100
commit and-quit

Replace the existing RPKI-ROV import policy with the new one.

🔗 Border2-Juniper
configure
top delete protocols bgp group TRANSIT-EBGP-V4 import RPKI-ROV
top delete protocols bgp group TRANSIT-EBGP-V6 import RPKI-ROV
top set protocols bgp group TRANSIT-EBGP-V4 import RPKI-POLICY
top set protocols bgp group TRANSIT-EBGP-V6 import RPKI-POLICY
commit and-quit

Verify BGP prefixes in the routing table:

🔗 Border2-Juniper
show route protocol bgp table inet.0 terse
show route protocol bgp table inet6.0 terse

Section 4.3: Border3-MikroTik – Implementing BGP Import Policy for ROV

Configure the RPKI routing policy.

🔗 Border3-MikroTik
/routing/filter/rule
    add chain=RPKI-POLICY rule="rpki-verify VALIDATOR"
    add chain=RPKI-POLICY rule="if (rpki valid) { set bgp-local-pref 110; accept }"
    add chain=RPKI-POLICY rule="if (rpki unknown) { set bgp-local-pref 100; accept }"
    add chain=RPKI-POLICY rule="if (rpki invalid) { set bgp-local-pref 90; accept }"

Apply the policy as inbound filter of the EBGP sessions.

🔗 Border3-MikroTik
/routing bgp connection
    set TRANSIT-V4 input.filter=RPKI-POLICY
    set TRANSIT-V6 input.filter=RPKI-POLICY

Verify BGP prefixes. INVALID prefixes should now be Active, with LOCAL_PREF set by their ROV state.

🔗 Border3-MikroTik
/routing/route/print proplist=dst-address,gateway,distance,bgp.local-pref,bgp.as-path,rpki where bgp and afi=ip4
/routing/route/print proplist=dst-address,gateway,distance,bgp.local-pref,bgp.as-path,rpki where bgp and afi=ip6

Section 4.4: Border4-Arista – Implementing BGP Import Policy for ROV

Configure the RPKI routing policy.

🔗 Border4-Arista
configure terminal
route-map RPKI-POLICY-IN permit 10
 match origin-as validity valid
 set local-preference 110
 exit
route-map RPKI-POLICY-IN permit 20
 match origin-as validity not-found
 set local-preference 100
 exit
route-map RPKI-POLICY-IN permit 30
 match origin-as validity invalid
 set local-preference 90
 exit
end
write memory

Apply the policy as inbound filter of the EBGP sessions.

🔗 Border4-Arista
configure terminal
router bgp 135539
 address-family ipv4
  neighbor 192.0.2.13 route-map RPKI-POLICY-IN in
  exit
 address-family ipv6
  neighbor 3fff:4::1 route-map RPKI-POLICY-IN in
  exit
end
write memory

Verify BGP table. INVALID prefixes should now appear with LOCAL_PREF 90.

🔗 Border4-Arista
show bgp ipv4 unicast
show bgp ipv6 unicast
show ip route bgp
show ipv6 route bgp
✓ Lab complete! All border routers now implement RPKI-based routing policies, setting LOCAL_PREF values based on validation state rather than simply dropping INVALID prefixes.