rfc-8210

The Resource Public Key Infrastructure (RPKI) to Router Protocol, Version 1

R. Bush, R. Austein
date2017-09 streamIETF areartg wgsidr statusPROPOSED STANDARD pages35 canonicalhttps://www.rfc-editor.org/rfc/rfc8210 doi10.17487/RFC8210
In order to verifiably validate the origin Autonomous Systems and Autonomous System Paths of BGP announcements, routers need a simple but reliable mechanism to receive Resource Public Key Infrastructure (RFC 6480) prefix origin data and router keys from a trusted cache. This document describes a protocol to deliver them. This document describes version 1 of the RPKI-Router protocol. RFC 6810 describes version 0. This document updates RFC 6810.

updates

Extracted elements (30)

design-rationale §5.3

The cache is required to merge and simplify the change set before delivering updates to the router. The explicit rationale given is that the entire purpose of the RPKI-Router protocol is to offload work from resource-constrained router platforms to the cache; simplifying the change set is therefore the cache's job.

routing, bgp

design-rationale §4

When a cache cannot provide an incremental update (Cache Reset), the protocol requires the router to explicitly initiate a fallback Reset Query rather than having the cache force it. This is deliberate: the cache cannot know whether the router has other caches that may be able to provide better service, so the decision is left to the router.

routing, bgp

normative-requirement §9.1 MUST

Cache servers supporting SSH transport MUST accept RSA authentication and SHOULD accept ECDSA. User authentication MUST be supported; host authentication MAY be supported. Client routers SHOULD verify the cache's public key to avoid MITM attacks. The protocol runs as an SSH subsystem named 'rpki-rtr'.

routing, bgp, security

normative-requirement §9 MUST

Caches and routers MUST implement unprotected TCP transport on port rpki-rtr (323). If unprotected TCP is the transport, the cache and routers MUST be on the same trusted and controlled network. When a more protected transport is available, caches and routers MUST use it; TCP-AO SHOULD be preferred.

routing, bgp, security, tcp

normative-requirement §6 MUST

Caches MUST set the Expire Interval to a value larger than either the Refresh Interval or the Retry Interval. The router MUST NOT retain data past the time indicated by the Expire Interval.

routing, bgp

normative-requirement §9.2 MUST

Client routers using TLS transport MUST present client-side certificates containing a subjectAltName with iPAddress identities, and the cache MUST verify the connecting IP address against them. Routers MUST verify the cache's TLS server certificate using dNSName identities per RFC 6125; CN-ID identifiers MUST NOT be used for authentication.

routing, bgp, tls, pkix, security

normative-requirement §7 MUST

If either party receives a PDU with an unexpected Protocol Version after negotiation completes, that party MUST drop the session and SHOULD send an Error Report with error code 8 (Unexpected Protocol Version), unless the unexpected PDU was itself an Error Report.

routing, bgp

normative-requirement §5.1 MUST

If either the router or cache finds that the Session ID value does not match the other's (after protocol version negotiation), the detecting party MUST immediately terminate the session with an Error Report PDU with code 0 (Corrupt Data), and the router MUST flush all data learned from that cache.

routing, bgp, security

normative-requirement §5.10 MUST

Implementations MUST compare Subject Public Key values as well as SKIs when detecting duplicate Router Key PDUs because multiple distinct Subject Public Key values can hash to the same SKI.

routing, bgp, crypto

normative-requirement §9.4 MUST

TCP-AO implementations MUST support key lengths of at least 80 printable ASCII bytes and hexadecimal sequences of at least 32 characters (128 bits). MAC lengths of at least 96 bits MUST be supported. The cryptographic algorithms specified in RFC 5926 MUST be supported.

routing, bgp, security, tcp

normative-requirement §8.2 MUST

The cache MUST rate-limit Serial Notify PDUs to no more than one per minute. Serial Notify is analogous to DNS NOTIFY and is only a hint; the protocol requires the router to poll periodically regardless.

routing, bgp

normative-requirement §5.6 MUST

The cache server MUST ensure that the router client holds one and only one IPvX PDU for each unique {Prefix, Len, Max-Len, ASN} tuple at any point in time. If a router receives a duplicate announcement, it SHOULD raise a Duplicate Announcement Received error (code 7).

routing, bgp

normative-requirement §8.3 MUST

When a router receives a Cache Reset, it SHOULD attempt to connect to any more-preferred caches. If none are more-preferred, it MUST issue a Reset Query. When a router receives a No Data Available error, it SHOULD try other caches; if none are available it MUST issue periodic Reset Queries.

routing, bgp

normative-requirement §10 MUST

When holding data from multiple caches, implementations MUST NOT distinguish between data sources when performing BGP announcement validation. Data MUST be kept marked by source so that later updates affect the correct cache's data set.

routing, bgp

normative-requirement §5.3 MUST

When replying to a Serial Query, the cache MUST return the minimum set of changes needed to bring the router into sync, merging multiple changes for any prefix or router key into at most one withdrawal followed by at most one announcement; if all changes cancel out, the prefix or key is omitted entirely.

routing, bgp

protocol-element §6

The End of Data PDU conveys three 32-bit timing parameters: Refresh Interval (1–86400 s, default 3600 s), Retry Interval (1–7200 s, default 600 s), and Expire Interval (600–172800 s, default 7200 s). These allow the cache to control polling frequency and data lifetime on the router.

routing, bgp

protocol-element §2

The Serial Number is a 32-bit strictly increasing unsigned integer that wraps from 2^32-1 to 0, denoting the logical version of a cache. A cache increments it upon completing a validated update from a parent cache or the Global RPKI. Serial Numbers are not commensurate between different caches or different protocol versions.

routing, bgp

protocol-element §2

The Session ID is a 16-bit unsigned integer generated by the cache server at startup to uniquely identify the cache instance and bind it to the sequence of Serial Numbers it generates. It allows routers to restart a failed session knowing that their Serial Numbers are commensurate with those of the cache.

routing, bgp

registry §14

The 'rpki-rtr-error' IANA registry maps error codes to descriptions (0=Corrupt Data, 1=Internal Error, 2=No Data Available, 3=Invalid Request, 4=Unsupported Protocol Version, 5=Unsupported PDU Type, 6=Withdrawal of Unknown Record, 7=Duplicate Announcement Received). Version 1 adds code 8 (Unexpected Protocol Version).

routing, bgp, registry

registry §14

The 'rpki-rtr-pdu' IANA registry maps PDU Type numbers (0–255) to protocol versions and descriptions. Version 1 adds Router Key (Type 9); Type 9 is reserved and unused in version 0. Addition policy is RFC Required (Standards Track or Experimental). Types 0–4, 6–8, and 10 are valid for both versions 0 and 1.

routing, bgp, registry

security-consideration §13

The cache-to-router link relies on server authentication and transport-level security rather than RPKI object security, creating a fundamentally different and weaker trust model. A compromised transport or forged cache can corrupt the router's routing decisions. Caches SHOULD be topologically close to their routers on DDoS-protected, controlled networks; the cache and router's identity SHOULD be mutually verified before any data exchange.

routing, bgp, security

state-machine §7

Protocol version negotiation: a router initiates each transport connection with a Reset Query or Serial Query carrying its version. A v1 cache receiving a v0 query MUST downgrade or terminate with an error. A v1 router receiving a v0 response MUST downgrade or terminate. Once agreed, the version is stable for the life of the session; receipt of a PDU with a different version after negotiation MUST cause the session to be dropped.

routing, bgp

wire-format §5.8

End of Data PDU (Type=7, Length=24): Protocol Version (8-bit), PDU Type (8-bit), Session ID (16-bit), Length (32-bit), Serial Number (32-bit), Refresh Interval (32-bit), Retry Interval (32-bit), Expire Interval (32-bit). New in version 1; carries timing parameters the cache expects the router to use for subsequent polling.

routing, bgp

wire-format §5.11

Error Report PDU (Type=10, variable Length): Error Code (16-bit), Length of Encapsulated PDU (32-bit), Erroneous PDU (variable), Length of Error Text (32-bit), Diagnostic Message (variable, UTF-8). Error text is optional; if absent, Length of Error Text MUST be zero. An Error Report MUST NOT be sent in response to another Error Report.

routing, bgp

wire-format §5.6

IPv4 Prefix PDU (Type=4, Length=20): Flags (8-bit, LSB=1 announce/0 withdraw), Prefix Length (8-bit, 0–32), Max Length (8-bit, 0–32), zero (8-bit), IPv4 Prefix (32-bit), Autonomous System Number (32-bit). Encodes a ROA-derived origin authorization.

routing, bgp, ip

wire-format §5.7

IPv6 Prefix PDU (Type=6, Length=32): same structure as IPv4 Prefix PDU but with a 128-bit IPv6 Prefix field and Prefix Length/Max Length range 0–128. Encodes an IPv6 ROA-derived origin authorization.

routing, bgp, ip

wire-format §5.4

Reset Query PDU (Type=2, Length=8): Protocol Version (8-bit), PDU Type (8-bit), zero (16-bit), Length (32-bit). Router sends this to request the entire current non-withdrawn database from the cache.

routing, bgp

wire-format §5.10

Router Key PDU (Type=9, variable Length): Flags (8-bit, LSB=1 announce/0 withdraw), zero (8-bit), Subject Key Identifier (20 octets), AS Number (32-bit), Subject Public Key Info (variable, full ASN.1 DER encoding including tag and length). New in version 1; Type 9 is reserved/unused in version 0.

routing, bgp, crypto, pkix

wire-format §5.2

Serial Notify PDU (Type=0, Length=12): Protocol Version (8-bit), PDU Type (8-bit), Session ID (16-bit), Length (32-bit), Serial Number (32-bit). Cache-initiated only; the only PDU the cache sends without a prior request from the router.

routing, bgp

wire-format §5.3

Serial Query PDU (Type=1, Length=12): Protocol Version (8-bit), PDU Type (8-bit), Session ID (16-bit), Length (32-bit), Serial Number (32-bit). Router sends this to request all announcements and withdrawals since the specified Serial Number.

routing, bgp