RPKI Deployment
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
Topology
RPKI Deployment Lab Topology
Prefix Announcement by ASNs
| Device Name | ASN | IPv4 Prefix | IPv6 Prefix |
|---|---|---|---|
| Border1-Cisco | 135533 | 61.45.248.0/24 | 2401:4601:248::/48 |
| Border2-Juniper | 135535 | 61.45.250.0/24 | 2401:4601:250::/48 |
| Border3-MikroTik | 135537 | 61.45.252.0/24 | 2401:4601:252::/48 |
| Border4-Arista | 135539 | 61.45.254.0/24 | 2401:4601:254::/48 |
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.
sudo apt update
Install packages to allow APT to use a repository over HTTPS.
sudo apt install -y ca-certificates curl gnupg lsb-release nano net-tools
Add the GPG key from NLnet Labs.
curl -fsSL https://packages.nlnetlabs.nl/aptkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/nlnetlabs-archive-keyring.gpg
Set up the repository.
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.
sudo apt update
Install Routinator.
sudo apt install -y routinator
Stop Routinator to ensure it will not be running without proper configuration.
sudo systemctl stop routinator
Verify Routinator's status.
sudo systemctl status routinator
Verify the list of TALs. By default, Routinator installs all TALs from 5 RIRs.
routinator --tal=list
.---- 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 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.
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.
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 --config /etc/routinator/routinator.conf config
Once the configuration is confirmed to be correctly applied, restart Routinator.
sudo systemctl restart routinator
Verify Routinator's status.
sudo systemctl status routinator
Press q to return.
Verify whether Routinator is running on addresses and ports as configured.
ss -tln
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 - Prefix validation result showing VALID
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.
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.
sudo nano /etc/apt/sources.list
(Optional, For Reference Only) Add the following repositories as a minimum.
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.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 6ED0E7B82643E131 F8D2585B8783D481
Update the APT package index again.
sudo apt update
Install dependencies and required packages.
sudo apt install -y build-essential libjansson-dev libjansson4 libssl-dev pkg-config rsync libcurl4-openssl-dev libxml2-dev nano net-tools
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.
cd /tmp wget https://github.com/NICMx/FORT-validator/releases/download/1.6.7/fort_amd64.deb
Install FORT using the downloaded package.
sudo apt install ./fort_amd64.deb
Stop FORT to ensure it will not be running without proper configuration.
sudo systemctl stop fort
Verify FORT's status.
sudo systemctl status fort
Verify the list of TALs. By default, FORT installs all TALs from 5 RIRs.
ls -lah /etc/fort/tal
Section 2.2: Configuring FORT
Create a directory with necessary permissions for FORT to store ROA output.
mkdir /tmp/fort/ sudo chown -R fort: /tmp/fort
FORT configuration file is located at /etc/fort/config.json. Open it for editing.
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.
{
"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.
sudo systemctl restart fort
Verify FORT's status.
sudo systemctl status fort
Press q to return.
Verify whether FORT is running on addresses and ports as configured.
ss -tln
Periodically check FORT's status to monitor progress.
sudo systemctl status fort
The ROA output CSV file in /tmp/fort should also be generated.
sudo ls -l /tmp/fort sudo head -n 10 /tmp/fort/roas.csv
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:
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:
show bgp ipv4 unicast show bgp ipv6 unicast
Show detailed BGP Path Attributes of a specific prefix:
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.
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:
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.
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
Verify RTR sessions and synchronization status:
show ip bgp rpki servers | include BGP|Prefixes
To view the RPKI validation database:
show ip bgp rpki table
Enable BGP Soft Reconfiguration Inbound on EBGP sessions to avoid periodic BGP refreshes when VRP tables are updated.
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:
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:
show bgp summary
Verify BGP prefixes in the routing table:
show route protocol bgp table inet.0 show route protocol bgp table inet6.0
Show detailed BGP Path Attributes of a specific prefix:
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.
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:
show bgp summary
Section 3.4: Border2-Juniper – Enabling ROV
Configure RTR sessions between the router and the validators.
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:
show validation session
To view the RPKI validation database:
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.
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.
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:
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:
/routing/bgp/session/print
Verify BGP prefixes in the routing table:
/routing/route/print where bgp and afi=ip4 /routing/route/print where bgp and afi=ip6
Show detailed BGP Path Attributes:
/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":
/routing/bgp/template/print
Configure the EBGP session with the Transit router.
/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:
/routing/bgp/session/print
Section 3.6: Border3-MikroTik – Enabling ROV
Configure the RTR session with the validator.
/routing rpki add group=VALIDATOR address=2001:db8::1 port=3323 refresh-interval=900
Verify RTR session synchronization status:
/routing/rpki/session/print
Once the RTR session state is "sync", query ROA of a specific prefix:
/routing rpki rpki-query group=VALIDATOR prefix=2401:4601:252::/48
Test validation of a specific prefix:
/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.
/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.
/routing bgp connection
set TRANSIT-V4 input.filter=EBGP-IN
set TRANSIT-V6 input.filter=EBGP-IN
Verify BGP prefixes using proplist output:
/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:
show ip bgp summary show ipv6 bgp summary
Verify the BGP table:
show ip bgp show ipv6 bgp
Show detailed BGP Path Attributes:
show ip bgp 61.45.254.0/24 show ipv6 bgp 2401:4601:254::/48
Configure the EBGP session with the Transit router.
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:
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.
configure terminal service routing protocols model multi-agent end write memory
Reload the router for the multi-agent configuration to take effect.
reload now
Once the router is back, log in again and configure RTR sessions.
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:
show bgp rpki roa summary
To view the RPKI validation database:
show bgp rpki roa ipv4 | more show bgp rpki roa ipv6 | more
Arista EOS does not enable ROV by default. Enable it explicitly:
configure terminal router bgp 135539 rpki origin-validation ebgp local end write memory
Verify the BGP table after synchronization:
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.
/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:
/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.
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.
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.
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:
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).
/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.
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.
show ip route bgp show ipv6 route bgp
To reject INVALID prefixes, configure an import policy and apply it to the EBGP sessions.
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:
show bgp ipv4 unicast show bgp ipv6 unicast show ip route bgp show ipv6 route bgp
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:
- RPKI VALID: Set LOCAL_PREF to 110 (more preferred)
- RPKI INVALID: Set LOCAL_PREF to 90 (less preferred)
- RPKI UNKNOWN / NOT FOUND: Set LOCAL_PREF to 100 (default)
Section 4.1: Border1-Cisco – Implementing BGP Import Policy for ROV
Configure the RPKI routing policy.
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.
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:
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.
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.
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:
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.
/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.
/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.
/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.
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.
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.
show bgp ipv4 unicast show bgp ipv6 unicast show ip route bgp show ipv6 route bgp