The Three Defenses
Option 1: Upstream-Managed Hygiene
- Workload: Low-complexity single-homed or simple dual-homed networks without dedicated network engineers.
- Budget: Zero added hardware, software, or monitoring overhead.
- Skill Level: Beginner to junior support.
- Risk: High. If your upstream provider accepts a leaked more-specific prefix from a third party, your outbound traffic heads into a black hole. If you accidentally leak a route yourself, your upstream might carry it globally if their ingress filters lag behind.
Option 2: Local RPKI Route Origin Validation (ROV)
- Workload: Multi-homed networks operating edge border gateways that process full global tables or partial transit tables.
- Budget: Minimal. A small virtual machine running a validator cache daemon alongside border routers.
- Skill Level: Intermediate. Requires understanding BGP communities, RPKI states (Valid, Invalid, NotFound), and route-map evaluation.
- Risk: Medium. Protects against origin hijacks and unauthorized origin leaks. Does not protect against path-shortening leaks where an unauthorized AS appears in the middle of the AS-path while the origin AS remains legitimate.
Option 3: Comprehensive Policy-Driven Filtering
bgpq4), strict maximum prefix limits (max-prefix), and AS-path filtering that enforces valley-free routing.
- Workload: Autonomous systems hosting multi-tenant infrastructure, content networks, or hybrid cloud interconnects with both peering and transit links.
- Budget: Moderate. Requires automated deployment pipelines to refresh route filters against PeeringDB and IRR databases daily.
- Skill Level: Advanced. Requires scripting, continuous route health monitoring, and proactive alert triage.
- Risk: Lowest. Drops both invalid origins and transit-to-transit announcement violations before routes reach the main routing table.
Comparing the Approaches
| Criteria | Upstream-Managed | Local RPKI ROV | Comprehensive Policy Filtering |
|---|---|---|---|
| Hardware Overhead | None | Minimal (Validator cache) | Minimal to Moderate (Automation tools) |
| Configuration Complexity | Low | Moderate | High |
| Origin Leak Protection | Depends on carrier | Deterministic and local | Deterministic and local |
| Mid-Path Leak Protection | None | None | High (Via AS-path and valley-free rules) |
| Maintenance Overhead | Low | Low (Validator maintenance) | Ongoing (Filter updates, IRR tracking) |
Choosing by Network Profile
RPKI Invalid states directly.
For networks participating in internet exchanges (IXPs) or direct private network interconnects (PNIs), Option 3 is necessary. When you peer directly with other networks, you risk becoming an involuntary transit network if your edge router leaks routes learned from one peer to another transit provider. This violation of valley-free routing floods your border interfaces with global traffic. You can inspect how these policy mistakes occur in our look at accidental transit and valley-free routing.
Implementing RPKI ROV in Practice
TEXT
# Illustrative BIRD 2 configuration for RPKI validation
router id 192.0.2.1;
protocol rpki rtr_validator {
rtr server 127.0.0.1 port 8282;
refresh 600;
retry 60;
expire 7200;
}
filter bgp_in_filter {
# Reject RPKI invalid prefixes immediately
if roa_check(rtr_validator, net, bgp_path.last) = ROA_INVALID then {
reject "RPKI check failed: invalid origin AS ", bgp_path.last, " for prefix ", net;
}
# Accept valid and unknown/not-found prefixes
accept;
}ROA_INVALID ensures that routes carrying an origin AS not authorized by the prefix owner are dropped at the edge. However, prefixes marked ROA_UNKNOWN (NotFound) must typically be accepted unless you want to discard routes for the large portion of the internet that has not yet published ROAs. For deeper implementation steps on Linux gateways, review our guide on hardening Linux border routers with RPKI in BIRD.
Defending against BGP route leaks does not require rewriting your entire infrastructure overnight. Start by signing ROAs for all assigned IP space at your registry. Next, if you receive full tables from upstreams, deploy a local validator and drop ROA_INVALID announcements. Add automated prefix lists and explicit peer filters only when operating an open peering policy or multi-homed BGP mesh.