draft-ietf-sidr-rpki-rtr-rfc6810-bis-09.txt   rfc8210.txt 
Network Working Group R. Bush Internet Engineering Task Force (IETF) R. Bush
Internet-Draft Internet Initiative Japan Request for Comments: 8210 Internet Initiative Japan
Updates: 6810 (if approved) R. Austein Updates: 6810 R. Austein
Intended status: Standards Track Dragon Research Labs Category: Standards Track Dragon Research Labs
Expires: August 21, 2017 February 17, 2017 ISSN: 2070-1721 September 2017
The Resource Public Key Infrastructure (RPKI) to Router Protocol, The Resource Public Key Infrastructure (RPKI) to Router Protocol,
Version 1 Version 1
draft-ietf-sidr-rpki-rtr-rfc6810-bis-09
Abstract Abstract
In order to verifiably validate the origin Autonomous Systems and In order to verifiably validate the origin Autonomous Systems and
Autonomous System Paths of BGP announcements, routers need a simple Autonomous System Paths of BGP announcements, routers need a simple
but reliable mechanism to receive Resource Public Key Infrastructure but reliable mechanism to receive Resource Public Key Infrastructure
(RFC 6480) prefix origin data and router keys from a trusted cache. (RFC 6480) prefix origin data and router keys from a trusted cache.
This document describes a protocol to deliver them. This document describes a protocol to deliver them.
This document describes version 1 of the rpki-rtr protocol. RFC 6810 This document describes version 1 of the RPKI-Router protocol. RFC
describes version 0. 6810 describes version 0. This document updates RFC 6810.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 7841.
This Internet-Draft will expire on August 21, 2017. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
https://www.rfc-editor.org/info/rfc8210.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4
1.2. Changes from RFC 6810 . . . . . . . . . . . . . . . . . . 3 1.2. Changes from RFC 6810 . . . . . . . . . . . . . . . . . . 4
2. Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3. Deployment Structure . . . . . . . . . . . . . . . . . . . . 4 3. Deployment Structure . . . . . . . . . . . . . . . . . . . . 5
4. Operational Overview . . . . . . . . . . . . . . . . . . . . 5 4. Operational Overview . . . . . . . . . . . . . . . . . . . . 6
5. Protocol Data Units (PDUs) . . . . . . . . . . . . . . . . . 6 5. Protocol Data Units (PDUs) . . . . . . . . . . . . . . . . . 7
5.1. Fields of a PDU . . . . . . . . . . . . . . . . . . . . . 6 5.1. Fields of a PDU . . . . . . . . . . . . . . . . . . . . . 7
5.2. Serial Notify . . . . . . . . . . . . . . . . . . . . . . 9 5.2. Serial Notify . . . . . . . . . . . . . . . . . . . . . . 10
5.3. Serial Query . . . . . . . . . . . . . . . . . . . . . . 9 5.3. Serial Query . . . . . . . . . . . . . . . . . . . . . . 10
5.4. Reset Query . . . . . . . . . . . . . . . . . . . . . . . 10 5.4. Reset Query . . . . . . . . . . . . . . . . . . . . . . . 12
5.5. Cache Response . . . . . . . . . . . . . . . . . . . . . 11 5.5. Cache Response . . . . . . . . . . . . . . . . . . . . . 12
5.6. IPv4 Prefix . . . . . . . . . . . . . . . . . . . . . . . 11 5.6. IPv4 Prefix . . . . . . . . . . . . . . . . . . . . . . . 13
5.7. IPv6 Prefix . . . . . . . . . . . . . . . . . . . . . . . 13 5.7. IPv6 Prefix . . . . . . . . . . . . . . . . . . . . . . . 14
5.8. End of Data . . . . . . . . . . . . . . . . . . . . . . . 13 5.8. End of Data . . . . . . . . . . . . . . . . . . . . . . . 15
5.9. Cache Reset . . . . . . . . . . . . . . . . . . . . . . . 14 5.9. Cache Reset . . . . . . . . . . . . . . . . . . . . . . . 16
5.10. Router Key . . . . . . . . . . . . . . . . . . . . . . . 15 5.10. Router Key . . . . . . . . . . . . . . . . . . . . . . . 16
5.11. Error Report . . . . . . . . . . . . . . . . . . . . . . 16 5.11. Error Report . . . . . . . . . . . . . . . . . . . . . . 17
6. Protocol Timing Parameters . . . . . . . . . . . . . . . . . 17 6. Protocol Timing Parameters . . . . . . . . . . . . . . . . . 18
7. Protocol Version Negotiation . . . . . . . . . . . . . . . . 18 7. Protocol Version Negotiation . . . . . . . . . . . . . . . . 20
8. Protocol Sequences . . . . . . . . . . . . . . . . . . . . . 20 8. Protocol Sequences . . . . . . . . . . . . . . . . . . . . . 21
8.1. Start or Restart . . . . . . . . . . . . . . . . . . . . 20 8.1. Start or Restart . . . . . . . . . . . . . . . . . . . . 21
8.2. Typical Exchange . . . . . . . . . . . . . . . . . . . . 21 8.2. Typical Exchange . . . . . . . . . . . . . . . . . . . . 22
8.3. No Incremental Update Available . . . . . . . . . . . . . 21 8.3. No Incremental Update Available . . . . . . . . . . . . . 23
8.4. Cache Has No Data Available . . . . . . . . . . . . . . . 22 8.4. Cache Has No Data Available . . . . . . . . . . . . . . . 23
9. Transport . . . . . . . . . . . . . . . . . . . . . . . . . . 22 9. Transport . . . . . . . . . . . . . . . . . . . . . . . . . . 24
9.1. SSH Transport . . . . . . . . . . . . . . . . . . . . . . 24 9.1. SSH Transport . . . . . . . . . . . . . . . . . . . . . . 25
9.2. TLS Transport . . . . . . . . . . . . . . . . . . . . . . 24 9.2. TLS Transport . . . . . . . . . . . . . . . . . . . . . . 26
9.3. TCP MD5 Transport . . . . . . . . . . . . . . . . . . . . 25 9.3. TCP MD5 Transport . . . . . . . . . . . . . . . . . . . . 26
9.4. TCP-AO Transport . . . . . . . . . . . . . . . . . . . . 25 9.4. TCP-AO Transport . . . . . . . . . . . . . . . . . . . . 27
10. Router-Cache Setup . . . . . . . . . . . . . . . . . . . . . 26 10. Router-Cache Setup . . . . . . . . . . . . . . . . . . . . . 27
11. Deployment Scenarios . . . . . . . . . . . . . . . . . . . . 27 11. Deployment Scenarios . . . . . . . . . . . . . . . . . . . . 28
12. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . 28 12. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . 29
13. Security Considerations . . . . . . . . . . . . . . . . . . . 29 13. Security Considerations . . . . . . . . . . . . . . . . . . . 30
14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31
15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 31 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 32
16. References . . . . . . . . . . . . . . . . . . . . . . . . . 31 15.1. Normative References . . . . . . . . . . . . . . . . . . 32
16.1. Normative References . . . . . . . . . . . . . . . . . . 31 15.2. Informative References . . . . . . . . . . . . . . . . . 34
16.2. Informative References . . . . . . . . . . . . . . . . . 32 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 35
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35
1. Introduction 1. Introduction
In order to verifiably validate the origin Autonomous Systems (ASes) In order to verifiably validate the origin Autonomous Systems (ASes)
and AS paths of BGP announcements, routers need a simple but reliable and AS paths of BGP announcements, routers need a simple but reliable
mechanism to receive cryptographically validated Resource Public Key mechanism to receive cryptographically validated Resource Public Key
Infrastructure (RPKI) [RFC6480] prefix origin data and router keys Infrastructure (RPKI) [RFC6480] prefix origin data and router keys
from a trusted cache. This document describes a protocol to deliver from a trusted cache. This document describes a protocol to deliver
them. The design is intentionally constrained to be usable on much them. The design is intentionally constrained to be usable on much
of the current generation of ISP router platforms. of the current generation of ISP router platforms.
This document updates [RFC6810].
Section 3 describes the deployment structure, and Section 4 then Section 3 describes the deployment structure, and Section 4 then
presents an operational overview. The binary payloads of the presents an operational overview. The binary payloads of the
protocol are formally described in Section 5, and the expected protocol are formally described in Section 5, and the expected
Protocol Data Unit (PDU) sequences are described in Section 8. The Protocol Data Unit (PDU) sequences are described in Section 8. The
transport protocol options are described in Section 9. Section 10 transport protocol options are described in Section 9. Section 10
details how routers and caches are configured to connect and details how routers and caches are configured to connect and
authenticate. Section 11 describes likely deployment scenarios. The authenticate. Section 11 describes likely deployment scenarios. The
traditional security and IANA considerations end the document. traditional security and IANA considerations end the document.
The protocol is extensible in order to support new PDUs with new The protocol is extensible in order to support new PDUs with new
semantics, if deployment experience indicates they are needed. PDUs semantics, if deployment experience indicates that they are needed.
are versioned should deployment experience call for change. PDUs are versioned should deployment experience call for change.
1.1. Requirements Language 1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
document are to be interpreted as described in RFC 2119 [RFC2119] "OPTIONAL" in this document are to be interpreted as described in
only when they appear in all upper case. They may also appear in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
lower or mixed case as English words, without special meaning. capitals, as shown here.
1.2. Changes from RFC 6810 1.2. Changes from RFC 6810
This section summarizes the significant changes between [RFC6810] and This section summarizes the significant changes between [RFC6810] and
the protocol described in this document. the protocol described in this document.
o New Router Key PDU type (Section 5.10) added. o New Router Key PDU type (Section 5.10) added.
o Explicit timing parameters (Section 5.8, Section 6) added. o Explicit timing parameters (Section 5.8, Section 6) added.
o Protocol version number incremented from zero to one. o Protocol version number incremented from 0 (zero) to 1 (one).
o Protocol version number negotiation (Section 7) added. o Protocol version number negotiation (Section 7) added.
2. Glossary 2. Glossary
The following terms are used with special meaning. The following terms are used with special meaning.
Global RPKI: The authoritative data of the RPKI are published in a Global RPKI: The authoritative data of the RPKI are published in a
distributed set of servers at the IANA, Regional Internet distributed set of servers at the IANA, Regional Internet
Registries (RIRs), National Internet Registries (NIRs), and ISPs; Registries (RIRs), National Internet Registries (NIRs), and ISPs;
see [RFC6481]. see [RFC6481].
Cache: A coalesced copy of the published Global RPKI data, Cache: A cache is a coalesced copy of the published Global RPKI
periodically fetched or refreshed, directly or indirectly, using data, periodically fetched or refreshed, directly or indirectly,
the [RFC5781] protocol or some successor. Relying party software using the rsync protocol [RFC5781] or some successor. Relying
is used to gather and validate the distributed data of the RPKI Party software is used to gather and validate the distributed data
into a cache. Trusting this cache further is a matter between the of the RPKI into a cache. Trusting this cache further is a matter
provider of the cache and a relying party. between the provider of the cache and a Relying Party.
Serial Number: A 32-bit strictly increasing unsigned integer which Serial Number: "Serial Number" is a 32-bit strictly increasing
wraps from 2^32-1 to 0. It denotes the logical version of a unsigned integer which wraps from 2^32-1 to 0. It denotes the
cache. A cache increments the value when it successfully updates logical version of a cache. A cache increments the value when it
its data from a parent cache or from primary RPKI data. While a successfully updates its data from a parent cache or from primary
cache is receiving updates, new incoming data and implicit deletes RPKI data. While a cache is receiving updates, new incoming data
are associated with the new serial but MUST NOT be sent until the and implicit deletes are associated with the new serial but MUST
fetch is complete. A Serial Number is not commensurate between NOT be sent until the fetch is complete. A Serial Number is not
different caches or different protocol versions, nor need it be commensurate between different caches or different protocol
maintained across resets of the cache server. See [RFC1982] on versions, nor need it be maintained across resets of the cache
DNS Serial Number Arithmetic for too much detail on the topic. server. See [RFC1982] on DNS Serial Number Arithmetic for too
much detail on the topic.
Session ID: When a cache server is started, it generates a Session Session ID: When a cache server is started, it generates a
ID to uniquely identify the instance of the cache and to bind it Session ID to uniquely identify the instance of the cache and to
to the sequence of Serial Numbers that cache instance will bind it to the sequence of Serial Numbers that cache instance will
generate. This allows the router to restart a failed session generate. This allows the router to restart a failed session
knowing that the Serial Number it is using is commensurate with knowing that the Serial Number it is using is commensurate with
that of the cache. that of the cache.
Payload PDU: A protocol message which contains data for use by the Payload PDU: A payload PDU is a protocol message which contains data
router, as opposed to a PDU which conveys the control mechanisms for use by the router, as opposed to a PDU which conveys the
of this protocol. Prefixes and Router Keys are examples of control mechanisms of this protocol. Prefixes and Router Keys are
payload PDUs. examples of payload PDUs.
3. Deployment Structure 3. Deployment Structure
Deployment of the RPKI to reach routers has a three-level structure Deployment of the RPKI to reach routers has a three-level structure
as follows: as follows:
Global RPKI: The authoritative data of the RPKI are published in a Global RPKI: The authoritative data of the RPKI are published in a
distributed set of servers, RPKI publication repositories, e.g., distributed set of servers at the IANA, RIRs, NIRs, and ISPs (see
by the IANA, RIRs, NIRs, and ISPs (see [RFC6481]). [RFC6481]).
Local Caches: A local set of one or more collected and verified Local Caches: Local caches are a local set of one or more collected
caches of RPKI data. A relying party, e.g., router or other and verified caches of RPKI data. A Relying Party, e.g., router
client, MUST have a trust relationship with, and a trusted or other client, MUST have a trust relationship with, and a
transport channel to, any cache(s) it uses. trusted transport channel to, any cache(s) it uses.
Routers: A router fetches data from a local cache using the protocol Routers: A router fetches data from a local cache using the protocol
described in this document. It is said to be a client of the described in this document. It is said to be a client of the
cache. There MAY be mechanisms for the router to assure itself of cache. There MAY be mechanisms for the router to assure itself of
the authenticity of the cache and to authenticate itself to the the authenticity of the cache and to authenticate itself to the
cache (see Section 9). cache (see Section 9).
4. Operational Overview 4. Operational Overview
A router establishes and keeps open a connection to one or more A router establishes and keeps open a connection to one or more
caches with which it has client/server relationships. It is caches with which it has client/server relationships. It is
configured with a semi-ordered list of caches, and establishes a configured with a semi-ordered list of caches and establishes a
connection to the most preferred cache, or set of caches, which connection to the most preferred cache, or set of caches, which
accept the connections. accept the connections.
The router MUST choose the most preferred, by configuration, cache or The router MUST choose the most preferred, by configuration, cache or
set of caches so that the operator may control load on their caches set of caches so that the operator may control load on their caches
and the Global RPKI. and the Global RPKI.
Periodically, the router sends to the cache the most recent Serial Periodically, the router sends to the cache the most recent Serial
Number for which it has received data from that cache, i.e., the Number for which it has received data from that cache, i.e., the
router's current Serial Number, in the form of a Serial Query. When router's current Serial Number, in the form of a Serial Query. When
a router establishes a new session with a cache, or wishes to reset a a router establishes a new session with a cache or wishes to reset a
current relationship, it sends a Reset Query. current relationship, it sends a Reset Query.
The cache responds to the Serial Query with all data changes which The cache responds to the Serial Query with all data changes which
took place since the given Serial Number. This may be the null set, took place since the given Serial Number. This may be the null set,
in which case the End of Data PDU is still sent. Note that the in which case the End of Data PDU (Section 5.8) is still sent. Note
Serial Number comparison used to determine "since the given Serial that the Serial Number comparison used to determine "since the given
Number" MUST take wrap-around into account, see [RFC1982]. Serial Number" MUST take wrap-around into account; see [RFC1982].
When the router has received all data records from the cache, it sets When the router has received all data records from the cache, it sets
its current Serial Number to that of the Serial Number in the its current Serial Number to that of the Serial Number in the
received End of Data PDU. received End of Data PDU.
When the cache updates its database, it sends a Notify message to When the cache updates its database, it sends a Notify PDU to every
every currently connected router. This is a hint that now would be a currently connected router. This is a hint that now would be a good
good time for the router to poll for an update, but is only a hint. time for the router to poll for an update, but it is only a hint.
The protocol requires the router to poll for updates periodically in The protocol requires the router to poll for updates periodically in
any case. any case.
Strictly speaking, a router could track a cache simply by asking for Strictly speaking, a router could track a cache simply by asking for
a complete data set every time it updates, but this would be very a complete data set every time it updates, but this would be very
inefficient. The Serial Number based incremental update mechanism inefficient. The Serial-Number-based incremental update mechanism
allows an efficient transfer of just the data records which have allows an efficient transfer of just the data records which have
changed since last update. As with any update protocol based on changed since the last update. As with any update protocol based on
incremental transfers, the router must be prepared to fall back to a incremental transfers, the router must be prepared to fall back to a
full transfer if for any reason the cache is unable to provide the full transfer if for any reason the cache is unable to provide the
necessary incremental data. Unlike some incremental transfer necessary incremental data. Unlike some incremental transfer
protocols, this protocol requires the router to make an explicit protocols, this protocol requires the router to make an explicit
request to start the fallback process; this is deliberate, as the request to start the fallback process; this is deliberate, as the
cache has no way of knowing whether the router has also established cache has no way of knowing whether the router has also established
sessions with other caches that may be able to provide better sessions with other caches that may be able to provide better
service. service.
As a cache server must evaluate certificates and ROAs (Route Origin As a cache server must evaluate certificates and ROAs (Route Origin
Attestations; see [RFC6480]), which are time dependent, servers' Authorizations; see [RFC6480]), which are time dependent, servers'
clocks MUST be correct to a tolerance of approximately an hour. clocks MUST be correct to a tolerance of approximately an hour.
5. Protocol Data Units (PDUs) 5. Protocol Data Units (PDUs)
The exchanges between the cache and the router are sequences of The exchanges between the cache and the router are sequences of
exchanges of the following PDUs according to the rules described in exchanges of the following PDUs according to the rules described in
Section 8. Section 8.
Reserved fields (marked "zero" in PDU diagrams) MUST be zero on Reserved fields (marked "zero" in PDU diagrams) MUST be zero on
transmission, and MUST be ignored on receipt. transmission and MUST be ignored on receipt.
5.1. Fields of a PDU 5.1. Fields of a PDU
PDUs contain the following data elements: PDUs contain the following data elements:
Protocol Version: An eight-bit unsigned integer, currently 1, Protocol Version: An 8-bit unsigned integer, currently 1, denoting
denoting the version of this protocol. the version of this protocol.
PDU Type: An eight-bit unsigned integer, denoting the type of the PDU Type: An 8-bit unsigned integer, denoting the type of the PDU,
PDU, e.g., IPv4 Prefix, etc. e.g., IPv4 Prefix.
Serial Number: The Serial Number of the RPKI Cache when this set of Serial Number: The Serial Number of the RPKI cache when this set of
PDUs was received from an upstream cache server or gathered from PDUs was received from an upstream cache server or gathered from
the Global RPKI. A cache increments its Serial Number when the Global RPKI. A cache increments its Serial Number when
completing a rigorously validated update from a parent cache or completing a rigorously validated update from a parent cache or
the Global RPKI. the Global RPKI.
Session ID: A 16-bit unsigned integer. When a cache server is Session ID: A 16-bit unsigned integer. When a cache server is
started, it generates a Session ID to identify the instance of the started, it generates a Session ID to identify the instance of the
cache and to bind it to the sequence of Serial Numbers that cache cache and to bind it to the sequence of Serial Numbers that cache
instance will generate. This allows the router to restart a instance will generate. This allows the router to restart a
failed session knowing that the Serial Number it is using is failed session knowing that the Serial Number it is using is
commensurate with that of the cache. If, at any time after the commensurate with that of the cache. If, at any time after the
protocol version has been negotiated (Section 7), either the protocol version has been negotiated (Section 7), either the
router or the cache finds the value of the Session ID is not the router or the cache finds that the value of the Session ID is not
same as the other's, the party which detects the mismatch MUST the same as the other's, the party which detects the mismatch MUST
immediately terminate the session with an Error Report PDU with immediately terminate the session with an Error Report PDU with
code 0 ("Corrupt Data"), and the router MUST flush all data code 0 ("Corrupt Data"), and the router MUST flush all data
learned from that cache. learned from that cache.
Note that sessions are specific to a particular protocol version. Note that sessions are specific to a particular protocol version.
That is: if a cache server supports multiple versions of this That is, if a cache server supports multiple versions of this
protocol, happens to use the same Session ID value for multiple protocol, happens to use the same Session ID value for multiple
protocol versions, and further happens to use the same Serial protocol versions, and further happens to use the same Serial
Number values for two or more sessions using the same Session ID Number values for two or more sessions using the same Session ID
but different Protocol Version values, the serial numbers are not but different Protocol Version values, the Serial Numbers are not
commensurate. The full test for whether serial numbers are commensurate. The full test for whether Serial Numbers are
commensurate requires comparing Protocol Version, Session ID, and commensurate requires comparing Protocol Version, Session ID, and
Serial Number. To reduce the risk of confusion, cache servers Serial Number. To reduce the risk of confusion, cache servers
SHOULD NOT use the same Session ID across multiple protocol SHOULD NOT use the same Session ID across multiple protocol
versions, but even if they do, routers MUST treat sessions with versions, but even if they do, routers MUST treat sessions with
different Protocol Version fields as separate sessions even if different Protocol Version fields as separate sessions even if
they do happen to have the same Session ID. they do happen to have the same Session ID.
Should a cache erroneously reuse a Session ID so that a router Should a cache erroneously reuse a Session ID so that a router
does not realize that the session has changed (old Session ID and does not realize that the session has changed (old Session ID and
new Session ID have same numeric value), the router may become new Session ID have the same numeric value), the router may become
confused as to the content of the cache. The time it takes the confused as to the content of the cache. The time it takes the
router to discover it is confused will depend on whether the router to discover that it is confused will depend on whether the
Serial Numbers are also reused. If the Serial Numbers in the old Serial Numbers are also reused. If the Serial Numbers in the old
and new sessions are different enough, the cache will respond to and new sessions are different enough, the cache will respond to
the router's Serial Query with a Cache Reset, which will solve the the router's Serial Query with a Cache Reset, which will solve the
problem. If, however, the Serial Numbers are close, the cache may problem. If, however, the Serial Numbers are close, the cache may
respond with a Cache Response, which may not be enough to bring respond with a Cache Response, which may not be enough to bring
the router into sync. In such cases, it's likely but not certain the router into sync. In such cases, it's likely but not certain
that the router will detect some discrepancy between the state that the router will detect some discrepancy between the state
that the cache expects and its own state. For example, the Cache that the cache expects and its own state. For example, the Cache
Response may tell the router to drop a record which the router Response may tell the router to drop a record which the router
does not hold, or may tell the router to add a record which the does not hold or may tell the router to add a record which the
router already has. In such cases, a router will detect the error router already has. In such cases, a router will detect the error
and reset the session. The one case in which the router may stay and reset the session. The one case in which the router may stay
out of sync is when nothing in the Cache Response contradicts any out of sync is when nothing in the Cache Response contradicts any
data currently held by the router. data currently held by the router.
Using persistent storage for the Session ID or a clock-based Using persistent storage for the Session ID or a clock-based
scheme for generating Session IDs should avoid the risk of Session scheme for generating Session IDs should avoid the risk of
ID collisions. Session ID collisions.
The Session ID might be a pseudo-random value, a strictly The Session ID might be a pseudorandom value, a strictly
increasing value if the cache has reliable storage, et cetera. A increasing value if the cache has reliable storage, et cetera. A
seconds-since-epoch timestamp value such as the POSIX time() seconds-since-epoch timestamp value such as the POSIX time()
function makes a good Session ID value. function makes a good Session ID value.
Length: A 32-bit unsigned integer which has as its value the count Length: A 32-bit unsigned integer which has as its value the count
of the bytes in the entire PDU, including the eight bytes of of the bytes in the entire PDU, including the 8 bytes of header
header which includes the length field. which includes the length field.
Flags: The lowest order bit of the Flags field is 1 for an Flags: The lowest-order bit of the Flags field is 1 for an
announcement and 0 for a withdrawal. For a Prefix PDU (IPv4 or announcement and 0 for a withdrawal. For a Prefix PDU (IPv4 or
IPv6), the flag indicates whether this PDU announces a new right IPv6), the flag indicates whether this PDU announces a new right
to announce the prefix or withdraws a previously announced right; to announce the prefix or withdraws a previously announced right;
a withdraw effectively deletes one previously announced Prefix PDU a withdraw effectively deletes one previously announced Prefix PDU
with the exact same Prefix, Length, Max-Len, and Autonomous System with the exact same Prefix, Length, Max-Len, and Autonomous System
Number (ASN). Similarly, for a Router Key PDU, the flag indicates Number (ASN). Similarly, for a Router Key PDU, the flag indicates
whether this PDU announces a new Router Key or deletes one whether this PDU announces a new Router Key or deletes one
previously announced Router Key PDU with the exact same AS Number, previously announced Router Key PDU with the exact same AS Number,
subjectKeyIdentifier, and subjectPublicKeyInfo. subjectKeyIdentifier, and subjectPublicKeyInfo.
The remaining bits in the flags field are reserved for future use. The remaining bits in the Flags field are reserved for future use.
In protocol version 1, they MUST be 0 on transmission and MUST be In protocol version 1, they MUST be zero on transmission and MUST
ignored on receipt. be ignored on receipt.
Prefix Length: An 8-bit unsigned integer denoting the shortest Prefix Length: An 8-bit unsigned integer denoting the shortest
prefix allowed by the Prefix element. prefix allowed by the Prefix element.
Max Length: An 8-bit unsigned integer denoting the longest prefix Max Length: An 8-bit unsigned integer denoting the longest prefix
allowed by the Prefix element. This MUST NOT be less than the allowed by the Prefix element. This MUST NOT be less than the
Prefix Length element. Prefix Length element.
Prefix: The IPv4 or IPv6 prefix of the ROA. Prefix: The IPv4 or IPv6 prefix of the ROA.
Autonomous System Number: A 32-bit unsigned integer representing an Autonomous System Number: A 32-bit unsigned integer representing an
ASN allowed to announce a prefix or associated with a router key. ASN allowed to announce a prefix or associated with a router key.
Subject Key Identifier: 20-octet Subject Key Identifier (SKI) value Subject Key Identifier: 20-octet Subject Key Identifier (SKI) value
of a router key, as described in [RFC6487]. of a router key, as described in [RFC6487].
Subject Public Key Info: a router key's subjectPublicKeyInfo value, Subject Public Key Info: A router key's subjectPublicKeyInfo value,
as described in [I-D.ietf-sidr-bgpsec-algs]. This is the full as described in [RFC8208]. This is the full ASN.1 DER encoding of
ASN.1 DER encoding of the subjectPublicKeyInfo, including the the subjectPublicKeyInfo, including the ASN.1 tag and length
ASN.1 tag and length values of the subjectPublicKeyInfo SEQUENCE. values of the subjectPublicKeyInfo SEQUENCE.
Refresh Interval: Interval between normal cache polls. See Refresh Interval: Interval between normal cache polls. See
Section 6 Section 6.
Retry Interval: Interval between cache poll retries after a failed Retry Interval: Interval between cache poll retries after a failed
cache poll. See Section 6 cache poll. See Section 6.
Expire Interval: Interval during which data fetched from a cache Expire Interval: Interval during which data fetched from a cache
remains valid in the absence of a successful subsequent cache remains valid in the absence of a successful subsequent cache
poll. See Section 6 poll. See Section 6.
5.2. Serial Notify 5.2. Serial Notify
The cache notifies the router that the cache has new data. The cache notifies the router that the cache has new data.
The Session ID reassures the router that the Serial Numbers are The Session ID reassures the router that the Serial Numbers are
commensurate, i.e., the cache session has not been changed. commensurate, i.e., the cache session has not been changed.
Upon receipt of a Serial Notify PDU, the router MAY issue an Upon receipt of a Serial Notify PDU, the router MAY issue an
immediate Serial Query (Section 5.3) or Reset Query (Section 5.4) immediate Serial Query (Section 5.3) or Reset Query (Section 5.4)
without waiting for the Refresh Interval timer (see Section 6) to without waiting for the Refresh Interval timer (see Section 6) to
expire. expire.
Serial Notify is the only message that the cache can send that is not Serial Notify is the only message that the cache can send that is not
in response to a message from the router. in response to a message from the router.
If the router receives a Serial Notify PDU during the initial start- If the router receives a Serial Notify PDU during the initial startup
up period where the router and cache are still negotiating to agree period where the router and cache are still negotiating to agree on a
on a protocol version, the router MUST simply ignore the Serial protocol version, the router MUST simply ignore the Serial Notify
Notify PDU, even if the Serial Notify PDU is for an unexpected PDU, even if the Serial Notify PDU is for an unexpected protocol
protocol version. See Section 7 for details. version. See Section 7 for details.
0 8 16 24 31 0 8 16 24 31
.-------------------------------------------. .-------------------------------------------.
| Protocol | PDU | | | Protocol | PDU | |
| Version | Type | Session ID | | Version | Type | Session ID |
| 1 | 0 | | | 1 | 0 | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Length=12 | | Length=12 |
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Serial Number | | Serial Number |
| | | |
`-------------------------------------------' `-------------------------------------------'
5.3. Serial Query 5.3. Serial Query
The router sends Serial Query to ask the cache for all announcements The router sends a Serial Query to ask the cache for all
and withdrawals which have occurred since the Serial Number specified announcements and withdrawals which have occurred since the Serial
in the Serial Query. Number specified in the Serial Query.
The cache replies to this query with a Cache Response PDU The cache replies to this query with a Cache Response PDU
(Section 5.5) if the cache has a, possibly null, record of the (Section 5.5) if the cache has a (possibly null) record of the
changes since the Serial Number specified by the router, followed by changes since the Serial Number specified by the router, followed by
zero or more payload PDUs and an End Of Data PDU (Section 5.8). zero or more payload PDUs and an End Of Data PDU (Section 5.8).
When replying to a Serial Query, the cache MUST return the minimum When replying to a Serial Query, the cache MUST return the minimum
set of changes needed to bring the router into sync with the cache. set of changes needed to bring the router into sync with the cache.
That is, if a particular prefix or router key underwent multiple That is, if a particular prefix or router key underwent multiple
changes between the Serial Number specified by the router and the changes between the Serial Number specified by the router and the
cache's current Serial Number, the cache MUST merge those changes to cache's current Serial Number, the cache MUST merge those changes to
present the simplest possible view of those changes to the router. present the simplest possible view of those changes to the router.
In general, this means that, for any particular prefix or router key, In general, this means that, for any particular prefix or router key,
the data stream will include at most one withdrawal followed by at the data stream will include at most one withdrawal followed by at
most one announcement, and if all of the changes cancel out, the data most one announcement, and if all of the changes cancel out, the data
stream will not mention the prefix or router key at all. stream will not mention the prefix or router key at all.
The rationale for this approach is that the entire purpose of the The rationale for this approach is that the entire purpose of the
rpki-rtr protocol is to offload work from the router to the cache, RPKI-Router protocol is to offload work from the router to the cache,
and it should therefore be the cache's job to simplify the change and it should therefore be the cache's job to simplify the change
set, thus reducing work for the router. set, thus reducing work for the router.
If the cache does not have the data needed to update the router, If the cache does not have the data needed to update the router,
perhaps because its records do not go back to the Serial Number in perhaps because its records do not go back to the Serial Number in
the Serial Query, then it responds with a Cache Reset PDU the Serial Query, then it responds with a Cache Reset PDU
(Section 5.9). (Section 5.9).
The Session ID tells the cache what instance the router expects to The Session ID tells the cache what instance the router expects to
ensure that the Serial Numbers are commensurate, i.e., the cache ensure that the Serial Numbers are commensurate, i.e., the cache
skipping to change at page 11, line 30 skipping to change at page 12, line 37
announcements and withdrawals that have occurred since the Serial announcements and withdrawals that have occurred since the Serial
Number sent by the client router. When replying to a Reset Query Number sent by the client router. When replying to a Reset Query
(Section 5.4), the cache sends the set of all data records it has; in (Section 5.4), the cache sends the set of all data records it has; in
this case, the withdraw/announce field in the payload PDUs MUST have this case, the withdraw/announce field in the payload PDUs MUST have
the value 1 (announce). the value 1 (announce).
In response to a Reset Query, the new value of the Session ID tells In response to a Reset Query, the new value of the Session ID tells
the router the instance of the cache session for future confirmation. the router the instance of the cache session for future confirmation.
In response to a Serial Query, the Session ID being the same In response to a Serial Query, the Session ID being the same
reassures the router that the Serial Numbers are commensurate, i.e., reassures the router that the Serial Numbers are commensurate, i.e.,
the cache session has not changed. the cache session has not been changed.
0 8 16 24 31 0 8 16 24 31
.-------------------------------------------. .-------------------------------------------.
| Protocol | PDU | | | Protocol | PDU | |
| Version | Type | Session ID | | Version | Type | Session ID |
| 1 | 3 | | | 1 | 3 | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Length=8 | | Length=8 |
| | | |
skipping to change at page 12, line 27 skipping to change at page 13, line 30
+-------------------------------------------+ +-------------------------------------------+
| | | |
| IPv4 Prefix | | IPv4 Prefix |
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Autonomous System Number | | Autonomous System Number |
| | | |
`-------------------------------------------' `-------------------------------------------'
The lowest order bit of the Flags field is 1 for an announcement and The lowest-order bit of the Flags field is 1 for an announcement and
0 for a withdrawal. 0 for a withdrawal.
In the RPKI, nothing prevents a signing certificate from issuing two In the RPKI, nothing prevents a signing certificate from issuing two
identical ROAs. In this case, there would be no semantic difference identical ROAs. In this case, there would be no semantic difference
between the objects, merely a process redundancy. between the objects, merely a process redundancy.
In the RPKI, there is also an actual need for what might appear to a In the RPKI, there is also an actual need for what might appear to a
router as identical IPvX PDUs. This can occur when an upstream router as identical IPvX PDUs. This can occur when an upstream
certificate is being reissued or there is an address ownership certificate is being reissued or there is an address ownership
transfer up the validation chain. The ROA would be identical in the transfer up the validation chain. The ROA would be identical in the
router sense, i.e., have the same {Prefix, Len, Max-Len, ASN}, but a router sense, i.e., have the same {Prefix, Len, Max-Len, ASN}, but it
different validation path in the RPKI. This is important to the would have a different validation path in the RPKI. This is
RPKI, but not to the router. important to the RPKI but not to the router.
The cache server MUST ensure that it has told the router client to The cache server MUST ensure that it has told the router client to
have one and only one IPvX PDU for a unique {Prefix, Len, Max-Len, have one and only one IPvX PDU for a unique {Prefix, Len, Max-Len,
ASN} at any one point in time. Should the router client receive an ASN} at any one point in time. Should the router client receive an
IPvX PDU with a {Prefix, Len, Max-Len, ASN} identical to one it IPvX PDU with a {Prefix, Len, Max-Len, ASN} identical to one it
already has active, it SHOULD raise a Duplicate Announcement Received already has active, it SHOULD raise a Duplicate Announcement Received
error. error.
5.7. IPv6 Prefix 5.7. IPv6 Prefix
skipping to change at page 13, line 41 skipping to change at page 15, line 10
| | | |
`-------------------------------------------' `-------------------------------------------'
Analogous to the IPv4 Prefix PDU, it has 96 more bits and no magic. Analogous to the IPv4 Prefix PDU, it has 96 more bits and no magic.
5.8. End of Data 5.8. End of Data
The cache tells the router it has no more data for the request. The cache tells the router it has no more data for the request.
The Session ID and Protocol Version MUST be the same as that of the The Session ID and Protocol Version MUST be the same as that of the
corresponding Cache Response which began the, possibly null, sequence corresponding Cache Response which began the (possibly null) sequence
of payload PDUs. of payload PDUs.
0 8 16 24 31 0 8 16 24 31
.-------------------------------------------. .-------------------------------------------.
| Protocol | PDU | | | Protocol | PDU | |
| Version | Type | Session ID | | Version | Type | Session ID |
| 1 | 7 | | | 1 | 7 | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Length=24 | | Length=24 |
skipping to change at page 14, line 33 skipping to change at page 15, line 41
| | | |
| Retry Interval | | Retry Interval |
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Expire Interval | | Expire Interval |
| | | |
`-------------------------------------------' `-------------------------------------------'
The Refresh Interval, Retry Interval, and Expire Interval are all The Refresh Interval, Retry Interval, and Expire Interval are all
32-bit elapsed times measured in seconds, and express the timing 32-bit elapsed times measured in seconds. They express the timing
parameters which the cache expects the router to use in deciding when parameters which the cache expects the router to use in deciding when
to send subsequent Serial Query or Reset Query PDUs to the cache. to send subsequent Serial Query or Reset Query PDUs to the cache.
See Section 6 for an explanation of the use and the range of allowed See Section 6 for an explanation of the use and the range of allowed
values for these parameters. values for these parameters.
5.9. Cache Reset 5.9. Cache Reset
The cache may respond to a Serial Query informing the router that the The cache may respond to a Serial Query informing the router that the
cache cannot provide an incremental update starting from the Serial cache cannot provide an incremental update starting from the Serial
Number specified by the router. The router must decide whether to Number specified by the router. The router must decide whether to
skipping to change at page 15, line 22 skipping to change at page 16, line 29
| Length=8 | | Length=8 |
| | | |
`-------------------------------------------' `-------------------------------------------'
5.10. Router Key 5.10. Router Key
0 8 16 24 31 0 8 16 24 31
.-------------------------------------------. .-------------------------------------------.
| Protocol | PDU | | | | Protocol | PDU | | |
| Version | Type | Flags | zero | | Version | Type | Flags | zero |
| 1 | 9 | | | | 1 | 9 | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Length | | Length |
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
+--- ---+ +--- ---+
| Subject Key Identifier | | Subject Key Identifier |
+--- ---+ +--- ---+
| | | |
skipping to change at page 15, line 46 skipping to change at page 17, line 4
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| AS Number | | AS Number |
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Subject Public Key Info | | Subject Public Key Info |
| | | |
`-------------------------------------------' `-------------------------------------------'
The lowest-order bit of the Flags field is 1 for an announcement and
The lowest order bit of the Flags field is 1 for an announcement and
0 for a withdrawal. 0 for a withdrawal.
The cache server MUST ensure that it has told the router client to The cache server MUST ensure that it has told the router client to
have one and only one Router Key PDU for a unique {SKI, ASN, Subject have one and only one Router Key PDU for a unique {SKI, ASN, Subject
Public Key} at any one point in time. Should the router client Public Key} at any one point in time. Should the router client
receive a Router Key PDU with a {SKI, ASN, Subject Public Key} receive a Router Key PDU with a {SKI, ASN, Subject Public Key}
identical to one it already has active, it SHOULD raise a Duplicate identical to one it already has active, it SHOULD raise a Duplicate
Announcement Received error. Announcement Received error.
Note that a particular ASN may appear in multiple Router Key PDUs Note that a particular ASN may appear in multiple Router Key PDUs
skipping to change at page 16, line 27 skipping to change at page 17, line 33
reason, implementations MUST compare Subject Public Key values as reason, implementations MUST compare Subject Public Key values as
well as SKIs when detecting duplicate PDUs. well as SKIs when detecting duplicate PDUs.
5.11. Error Report 5.11. Error Report
This PDU is used by either party to report an error to the other. This PDU is used by either party to report an error to the other.
Error reports are only sent as responses to other PDUs, not to report Error reports are only sent as responses to other PDUs, not to report
errors in Error Report PDUs. errors in Error Report PDUs.
The Error Code is described in Section 12. Error codes are described in Section 12.
If the error is generic (e.g., "Internal Error") and not associated If the error is generic (e.g., "Internal Error") and not associated
with the PDU to which it is responding, the Erroneous PDU field MUST with the PDU to which it is responding, the Erroneous PDU field MUST
be empty and the Length of Encapsulated PDU field MUST be zero. be empty and the Length of Encapsulated PDU field MUST be zero.
An Error Report PDU MUST NOT be sent for an Error Report PDU. If an An Error Report PDU MUST NOT be sent for an Error Report PDU. If an
erroneous Error Report PDU is received, the session SHOULD be erroneous Error Report PDU is received, the session SHOULD be
dropped. dropped.
If the error is associated with a PDU of excessive length, i.e., too If the error is associated with a PDU of excessive length, i.e., too
skipping to change at page 17, line 20 skipping to change at page 18, line 20
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Length | | Length |
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Length of Encapsulated PDU | | Length of Encapsulated PDU |
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
~ Copy of Erroneous PDU ~ ~ Erroneous PDU ~
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Length of Error Text | | Length of Error Text |
| | | |
+-------------------------------------------+ +-------------------------------------------+
| | | |
| Arbitrary Text | | Arbitrary Text |
| of | | of |
~ Error Diagnostic Message ~ ~ Error Diagnostic Message ~
| | | |
`-------------------------------------------' `-------------------------------------------'
6. Protocol Timing Parameters 6. Protocol Timing Parameters
Since the data the cache distributes via the rpki-rtr protocol are Since the data the cache distributes via the RPKI-Router protocol are
retrieved from the Global RPKI system at intervals which are only retrieved from the Global RPKI system at intervals which are only
known to the cache, only the cache can really know how frequently it known to the cache, only the cache can really know how frequently it
makes sense for the router to poll the cache, or how long the data makes sense for the router to poll the cache, or how long the data
are likely to remain valid (or, at least, unchanged). For this are likely to remain valid (or, at least, unchanged). For this
reason, as well as to allow the cache some control over the load reason, as well as to allow the cache some control over the load
placed on it by its client routers, the End Of Data PDU includes placed on it by its client routers, the End Of Data PDU includes
three values that allow the cache to communicate timing parameters to three values that allow the cache to communicate timing parameters to
the router. the router:
Refresh Interval: This parameter tells the router how long to wait Refresh Interval: This parameter tells the router how long to wait
before next attempting to poll the cache and between subsequent before next attempting to poll the cache and between subsequent
attempts, using a Serial Query or Reset Query PDU. The router attempts, using a Serial Query or Reset Query PDU. The router
SHOULD NOT poll the cache sooner than indicated by this parameter. SHOULD NOT poll the cache sooner than indicated by this parameter.
Note that receipt of a Serial Notify PDU overrides this interval Note that receipt of a Serial Notify PDU overrides this interval
and suggests that the router issue an immediate query without and suggests that the router issue an immediate query without
waiting for the Refresh Interval to expire. Countdown for this waiting for the Refresh Interval to expire. Countdown for this
timer starts upon receipt of the containing End Of Data PDU. timer starts upon receipt of the containing End Of Data PDU.
Minimum allowed value: 1 second. Minimum allowed value: 1 second.
Maximum allowed value: 86400 seconds (one day). Maximum allowed value: 86400 seconds (1 day).
Recommended default: 3600 seconds (one hour). Recommended default: 3600 seconds (1 hour).
Retry Interval: This parameter tells the router how long to wait Retry Interval: This parameter tells the router how long to wait
before retrying a failed Serial Query or Reset Query. The router before retrying a failed Serial Query or Reset Query. The router
SHOULD NOT retry sooner than indicated by this parameter. Note SHOULD NOT retry sooner than indicated by this parameter. Note
that a protocol version mismatch overrides this interval: if the that a protocol version mismatch overrides this interval: if the
router needs to downgrade to a lower protocol version number, it router needs to downgrade to a lower protocol version number, it
MAY send the first Serial Query or Reset Query immediately. MAY send the first Serial Query or Reset Query immediately.
Countdown for this timer starts upon failure of the query, and Countdown for this timer starts upon failure of the query and
restarts after each subsequent failure until a query succeeds. restarts after each subsequent failure until a query succeeds.
Minimum allowed value: 1 second. Minimum allowed value: 1 second.
Maximum allowed value: 7200 seconds (two hours). Maximum allowed value: 7200 seconds (2 hours).
Recommended default: 600 seconds (ten minutes). Recommended default: 600 seconds (10 minutes).
Expire Interval: This parameter tells the router how long it can Expire Interval: This parameter tells the router how long it can
continue to use the current version of the data while unable to continue to use the current version of the data while unable to
perform a successful subsequent query. The router MUST NOT retain perform a successful subsequent query. The router MUST NOT retain
the data past the time indicated by this parameter. Countdown for the data past the time indicated by this parameter. Countdown for
this timer starts upon receipt of the containing End Of Data PDU. this timer starts upon receipt of the containing End Of Data PDU.
Minimum allowed value: 600 seconds (ten minutes). Minimum allowed value: 600 seconds (10 minutes).
Maximum allowed value: 172800 seconds (two days). Maximum allowed value: 172800 seconds (2 days).
Recommended default: 7200 seconds (two hours). Recommended default: 7200 seconds (2 hours).
If the router has never issued a successful query against a If the router has never issued a successful query against a
particular cache, it SHOULD retry periodically using the default particular cache, it SHOULD retry periodically using the default
Retry Interval, above. Retry Interval, above.
Caches MUST set Expire Interval to a value larger than either Refresh Caches MUST set Expire Interval to a value larger than either Refresh
Interval or Retry Interval. Interval or Retry Interval.
7. Protocol Version Negotiation 7. Protocol Version Negotiation
A router MUST start each transport connection by issuing either a A router MUST start each transport connection by issuing either a
Reset Query or a Serial Query. This query will tell the cache which Reset Query or a Serial Query. This query will tell the cache which
version of this protocol the router implements. version of this protocol the router implements.
If a cache which supports version 1 receives a query from a router If a cache which supports version 1 receives a query from a router
which specifies version 0, the cache MUST downgrade to protocol which specifies version 0, the cache MUST downgrade to protocol
version 0 [RFC6810] or send a version 1 Error Report PDU with Error version 0 [RFC6810] or send a version 1 Error Report PDU with Error
Code 4 ("Unsupported Protocol Version") and terminate the connection. Code 4 ("Unsupported Protocol Version") and terminate the connection.
If a router which supports version 1 sends a query to a cache which If a router which supports version 1 sends a query to a cache which
only supports version 0, one of two things will happen. only supports version 0, one of two things will happen:
1. The cache may terminate the connection, perhaps with a version 0 1. The cache may terminate the connection, perhaps with a version 0
Error Report PDU. In this case the router MAY retry the Error Report PDU. In this case, the router MAY retry the
connection using protocol version 0. connection using protocol version 0.
2. The cache may reply with a version 0 response. In this case the 2. The cache may reply with a version 0 response. In this case, the
router MUST either downgrade to version 0 or terminate the router MUST either downgrade to version 0 or terminate the
connection. connection.
In any of the downgraded combinations above, the new features of In any of the downgraded combinations above, the new features of
version 1 will not be available, and all PDUs will have 0 in their version 1 will not be available, and all PDUs will have 0 in their
version fields. version fields.
If either party receives a PDU containing an unrecognized Protocol If either party receives a PDU containing an unrecognized Protocol
Version (neither 0 nor 1) during this negotiation, it MUST either Version (neither 0 nor 1) during this negotiation, it MUST either
downgrade to a known version or terminate the connection, with an downgrade to a known version or terminate the connection, with an
Error Report PDU unless the received PDU is itself an Error Report Error Report PDU unless the received PDU is itself an Error
PDU. Report PDU.
The router MUST ignore any Serial Notify PDUs it might receive from The router MUST ignore any Serial Notify PDUs it might receive from
the cache during this initial start-up period, regardless of the the cache during this initial startup period, regardless of the
Protocol Version field in the Serial Notify PDU. Since Session ID Protocol Version field in the Serial Notify PDU. Since Session ID
and Serial Number values are specific to a particular protocol and Serial Number values are specific to a particular protocol
version, the values in the notification are not useful to the router. version, the values in the notification are not useful to the router.
Even if these values were meaningful, the only effect that processing Even if these values were meaningful, the only effect that processing
the notification would have would be to trigger exactly the same the notification would have would be to trigger exactly the same
Reset Query or Serial Query that the router has already sent as part Reset Query or Serial Query that the router has already sent as part
of the not-yet-complete version negotiation process, so there is of the not-yet-complete version negotiation process, so there is
nothing to be gained by processing notifications until version nothing to be gained by processing notifications until version
negotiation completes. negotiation completes.
skipping to change at page 20, line 13 skipping to change at page 21, line 18
Protocol Version and Session ID. Protocol Version and Session ID.
If either party receives a PDU for a different Protocol Version once If either party receives a PDU for a different Protocol Version once
the above negotiation completes, that party MUST drop the session; the above negotiation completes, that party MUST drop the session;
unless the PDU containing the unexpected Protocol Version was itself unless the PDU containing the unexpected Protocol Version was itself
an Error Report PDU, the party dropping the session SHOULD send an an Error Report PDU, the party dropping the session SHOULD send an
Error Report with an error code of 8 ("Unexpected Protocol Version"). Error Report with an error code of 8 ("Unexpected Protocol Version").
8. Protocol Sequences 8. Protocol Sequences
The sequences of PDU transmissions fall into three conversations as The sequences of PDU transmissions fall into four conversations as
follows: follows:
8.1. Start or Restart 8.1. Start or Restart
Cache Router Cache Router
~ ~ ~ ~
| <----- Reset Query -------- | R requests data (or Serial Query) | <----- Reset Query -------- | R requests data (or Serial Query)
| | | |
| ----- Cache Response -----> | C confirms request | ----- Cache Response -----> | C confirms request
| ------- Payload PDU ------> | C sends zero or more | ------- Payload PDU ------> | C sends zero or more
skipping to change at page 20, line 39 skipping to change at page 21, line 44
When a transport connection is first established, the router MUST When a transport connection is first established, the router MUST
send either a Reset Query or a Serial Query. A Serial Query would be send either a Reset Query or a Serial Query. A Serial Query would be
appropriate if the router has significant unexpired data from a appropriate if the router has significant unexpired data from a
broken session with the same cache and remembers the Session ID of broken session with the same cache and remembers the Session ID of
that session, in which case a Serial Query containing the Session ID that session, in which case a Serial Query containing the Session ID
from the previous session will allow the router to bring itself up to from the previous session will allow the router to bring itself up to
date while ensuring that the Serial Numbers are commensurate and that date while ensuring that the Serial Numbers are commensurate and that
the router and cache are speaking compatible versions of the the router and cache are speaking compatible versions of the
protocol. In all other cases, the router lacks the necessary data protocol. In all other cases, the router lacks the necessary data
for fast re-synchronization and therefore MUST fall back to a Reset for fast resynchronization and therefore MUST fall back to a Reset
Query. Query.
The Reset Query sequence is also used when the router receives a The Reset Query sequence is also used when the router receives a
Cache Reset, chooses a new cache, or fears that it has otherwise lost Cache Reset, chooses a new cache, or fears that it has otherwise lost
its way. its way.
See Section 7 for details on version negotiation. See Section 7 for details on version negotiation.
To limit the length of time a cache must keep the data necessary to To limit the length of time a cache must keep the data necessary to
generate incremental updates, a router MUST send either a Serial generate incremental updates, a router MUST send either a Serial
skipping to change at page 21, line 21 skipping to change at page 22, line 27
| <----- Serial Query ------- | R requests data | <----- Serial Query ------- | R requests data
| | | |
| ----- Cache Response -----> | C confirms request | ----- Cache Response -----> | C confirms request
| ------- Payload PDU ------> | C sends zero or more | ------- Payload PDU ------> | C sends zero or more
| ------- Payload PDU ------> | IPv4 Prefix, IPv6 Prefix, | ------- Payload PDU ------> | IPv4 Prefix, IPv6 Prefix,
| ------- Payload PDU ------> | or Router Key PDUs | ------- Payload PDU ------> | or Router Key PDUs
| ------- End of Data ------> | C sends End of Data | ------- End of Data ------> | C sends End of Data
| | and sends new serial | | and sends new serial
~ ~ ~ ~
The cache server SHOULD send a notify PDU with its current Serial The cache server SHOULD send a Notify PDU with its current Serial
Number when the cache's serial changes, with the expectation that the Number when the cache's serial changes, with the expectation that the
router MAY then issue a Serial Query earlier than it otherwise might. router MAY then issue a Serial Query earlier than it otherwise might.
This is analogous to DNS NOTIFY in [RFC1996]. The cache MUST rate This is analogous to DNS NOTIFY in [RFC1996]. The cache MUST
limit Serial Notifies to no more frequently than one per minute. rate-limit Serial Notifies to no more frequently than one per minute.
When the transport layer is up and either a timer has gone off in the When the transport layer is up and either a timer has gone off in the
router, or the cache has sent a Notify, the router queries for new router or the cache has sent a Notify PDU, the router queries for new
data by sending a Serial Query, and the cache sends all data newer data by sending a Serial Query, and the cache sends all data newer
than the serial in the Serial Query. than the serial in the Serial Query.
To limit the length of time a cache must keep old withdraws, a router To limit the length of time a cache must keep old withdraws, a router
MUST send either a Serial Query or a Reset Query periodically. See MUST send either a Serial Query or a Reset Query periodically. See
Section 6 for details on the required polling frequency. Section 6 for details on the required polling frequency.
8.3. No Incremental Update Available 8.3. No Incremental Update Available
Cache Router Cache Router
~ ~ ~ ~
| <----- Serial Query ------ | R requests data | <------ Serial Query ------ | R requests data
| ------- Cache Reset ------> | C cannot supply update | ------- Cache Reset ------> | C cannot supply update
| | from specified serial | | from specified serial
| <------ Reset Query ------- | R requests new data | <------ Reset Query ------- | R requests new data
| ----- Cache Response -----> | C confirms request | ----- Cache Response -----> | C confirms request
| ------- Payload PDU ------> | C sends zero or more | ------- Payload PDU ------> | C sends zero or more
| ------- Payload PDU ------> | IPv4 Prefix, IPv6 Prefix, | ------- Payload PDU ------> | IPv4 Prefix, IPv6 Prefix,
| ------- Payload PDU ------> | or Router Key PDUs | ------- Payload PDU ------> | or Router Key PDUs
| ------- End of Data ------> | C sends End of Data | ------- End of Data ------> | C sends End of Data
| | and sends new serial | | and sends new serial
~ ~ ~ ~
The cache may respond to a Serial Query with a Cache Reset, informing The cache may respond to a Serial Query with a Cache Reset, informing
the router that the cache cannot supply an incremental update from the router that the cache cannot supply an incremental update from
the Serial Number specified by the router. This might be because the the Serial Number specified by the router. This might be because the
cache has lost state, or because the router has waited too long cache has lost state, or because the router has waited too long
between polls and the cache has cleaned up old data that it no longer between polls and the cache has cleaned up old data that it no longer
believes it needs, or because the cache has run out of storage space believes it needs, or because the cache has run out of storage space
and had to expire some old data early. Regardless of how this state and had to expire some old data early. Regardless of how this state
arose, the cache replies with a Cache Reset to tell the router that arose, the cache replies with a Cache Reset to tell the router that
it cannot honor the request. When a router receives this, the router it cannot honor the request. When a router receives this, the router
SHOULD attempt to connect to any more preferred caches in its cache SHOULD attempt to connect to any more-preferred caches in its cache
list. If there are no more preferred caches, it MUST issue a Reset list. If there are no more-preferred caches, it MUST issue a Reset
Query and get an entire new load from the cache. Query and get an entire new load from the cache.
8.4. Cache Has No Data Available 8.4. Cache Has No Data Available
Cache Router Cache Router
~ ~ ~ ~
| <----- Serial Query ------ | R requests data | <------ Serial Query ------ | R requests data
| ---- Error Report PDU ----> | C No Data Available | ---- Error Report PDU ----> | C No Data Available
~ ~ ~ ~
Cache Router Cache Router
~ ~ ~ ~
| <----- Reset Query ------- | R requests data | <------ Reset Query ------- | R requests data
| ---- Error Report PDU ----> | C No Data Available | ---- Error Report PDU ----> | C No Data Available
~ ~ ~ ~
The cache may respond to either a Serial Query or a Reset Query The cache may respond to either a Serial Query or a Reset Query
informing the router that the cache cannot supply any update at all. informing the router that the cache cannot supply any update at all.
The most likely cause is that the cache has lost state, perhaps due The most likely cause is that the cache has lost state, perhaps due
to a restart, and has not yet recovered. While it is possible that a to a restart, and has not yet recovered. While it is possible that a
cache might go into such a state without dropping any of its active cache might go into such a state without dropping any of its active
sessions, a router is more likely to see this behavior when it sessions, a router is more likely to see this behavior when it
initially connects and issues a Reset Query while the cache is still initially connects and issues a Reset Query while the cache is still
skipping to change at page 23, line 31 skipping to change at page 24, line 45
Caches and routers MUST implement unprotected transport over TCP Caches and routers MUST implement unprotected transport over TCP
using a port, rpki-rtr (323); see Section 14. Operators SHOULD use using a port, rpki-rtr (323); see Section 14. Operators SHOULD use
procedural means, e.g., access control lists (ACLs), to reduce the procedural means, e.g., access control lists (ACLs), to reduce the
exposure to authentication issues. exposure to authentication issues.
If unprotected TCP is the transport, the cache and routers MUST be on If unprotected TCP is the transport, the cache and routers MUST be on
the same trusted and controlled network. the same trusted and controlled network.
If available to the operator, caches and routers MUST use one of the If available to the operator, caches and routers MUST use one of the
following more protected protocols. following more protected protocols:
Caches and routers SHOULD use TCP-AO transport [RFC5925] over the o Caches and routers SHOULD use TCP-AO transport [RFC5925] over the
rpki-rtr port. rpki-rtr port.
Caches and routers MAY use SSHv2 transport [RFC4252] using the normal o Caches and routers MAY use Secure Shell version 2 (SSHv2)
SSH port. For an example, see Section 9.1. transport [RFC4252] using the normal SSH port. For an example,
see Section 9.1.
Caches and routers MAY use TCP MD5 transport [RFC2385] using the o Caches and routers MAY use TCP MD5 transport [RFC2385] using the
rpki-rtr port. Note that TCP MD5 has been obsoleted by TCP-AO rpki-rtr port. Note that TCP MD5 has been obsoleted by TCP-AO
[RFC5925]. [RFC5925].
Caches and routers MAY use TCP over IPsec transport [RFC4301] using o Caches and routers MAY use TCP over IPsec transport [RFC4301]
the rpki-rtr port. using the rpki-rtr port.
Caches and routers MAY use TLS transport [RFC5246] using port rpki- o Caches and routers MAY use Transport Layer Security (TLS)
rtr-tls (324); see Section 14. transport [RFC5246] using port rpki-rtr-tls (324); see Section 14.
9.1. SSH Transport 9.1. SSH Transport
To run over SSH, the client router first establishes an SSH transport To run over SSH, the client router first establishes an SSH transport
connection using the SSHv2 transport protocol, and the client and connection using the SSHv2 transport protocol, and the client and
server exchange keys for message integrity and encryption. The server exchange keys for message integrity and encryption. The
client then invokes the "ssh-userauth" service to authenticate the client then invokes the "ssh-userauth" service to authenticate the
application, as described in the SSH authentication protocol application, as described in the SSH authentication protocol
[RFC4252]. Once the application has been successfully authenticated, [RFC4252]. Once the application has been successfully authenticated,
the client invokes the "ssh-connection" service, also known as the the client invokes the "ssh-connection" service, also known as the
SSH connection protocol. SSH connection protocol.
After the ssh-connection service is established, the client opens a After the ssh-connection service is established, the client opens a
channel of type "session", which results in an SSH session. channel of type "session", which results in an SSH session.
Once the SSH session has been established, the application invokes Once the SSH session has been established, the application invokes
the application transport as an SSH subsystem called "rpki-rtr". the application transport as an SSH subsystem called "rpki-rtr".
Subsystem support is a feature of SSH version 2 (SSHv2) and is not Subsystem support is a feature of SSHv2 and is not included in SSHv1.
included in SSHv1. Running this protocol as an SSH subsystem avoids Running this protocol as an SSH subsystem avoids the need for the
the need for the application to recognize shell prompts or skip over application to recognize shell prompts or skip over extraneous
extraneous information, such as a system message that is sent at information, such as a system message that is sent at shell startup.
shell start-up.
It is assumed that the router and cache have exchanged keys out of It is assumed that the router and cache have exchanged keys out of
band by some reasonably secured means. band by some reasonably secured means.
Cache servers supporting SSH transport MUST accept RSA authentication Cache servers supporting SSH transport MUST accept RSA authentication
and SHOULD accept Elliptic Curve Digital Signature Algorithm (ECDSA) and SHOULD accept Elliptic Curve Digital Signature Algorithm (ECDSA)
authentication. User authentication MUST be supported; host authentication. User authentication MUST be supported; host
authentication MAY be supported. Implementations MAY support authentication MAY be supported. Implementations MAY support
password authentication. Client routers SHOULD verify the public key password authentication. Client routers SHOULD verify the public key
of the cache to avoid monkey-in-the-middle attacks. of the cache to avoid MITM attacks.
9.2. TLS Transport 9.2. TLS Transport
Client routers using TLS transport MUST present client-side Client routers using TLS transport MUST present client-side
certificates to authenticate themselves to the cache in order to certificates to authenticate themselves to the cache in order to
allow the cache to manage the load by rejecting connections from allow the cache to manage the load by rejecting connections from
unauthorized routers. In principle, any type of certificate and unauthorized routers. In principle, any type of certificate and
certificate authority (CA) may be used; however, in general, cache Certification Authority (CA) may be used; however, in general, cache
operators will wish to create their own small-scale CA and issue operators will wish to create their own small-scale CA and issue
certificates to each authorized router. This simplifies credential certificates to each authorized router. This simplifies credential
rollover; any unrevoked, unexpired certificate from the proper CA may rollover; any unrevoked, unexpired certificate from the proper CA may
be used. be used.
Certificates used to authenticate client routers in this protocol Certificates used to authenticate client routers in this protocol
MUST include a subjectAltName extension [RFC5280] containing one or MUST include a subjectAltName extension [RFC5280] containing one or
more iPAddress identities; when authenticating the router's more iPAddress identities; when authenticating the router's
certificate, the cache MUST check the IP address of the TLS certificate, the cache MUST check the IP address of the TLS
connection against these iPAddress identities and SHOULD reject the connection against these iPAddress identities and SHOULD reject the
connection if none of the iPAddress identities match the connection. connection if none of the iPAddress identities match the connection.
Routers MUST also verify the cache's TLS server certificate, using Routers MUST also verify the cache's TLS server certificate, using
subjectAltName dNSName identities as described in [RFC6125], to avoid subjectAltName dNSName identities as described in [RFC6125], to avoid
monkey-in-the-middle attacks. The rules and guidelines defined in MITM attacks. The rules and guidelines defined in [RFC6125] apply
[RFC6125] apply here, with the following considerations: here, with the following considerations:
Support for DNS-ID identifier type (that is, the dNSName identity o Support for the DNS-ID identifier type (that is, the dNSName
in the subjectAltName extension) is REQUIRED in rpki-rtr server identity in the subjectAltName extension) is REQUIRED in rpki-rtr
and client implementations which use TLS. Certification server and client implementations which use TLS. Certification
authorities which issue rpki-rtr server certificates MUST support authorities which issue rpki-rtr server certificates MUST support
the DNS-ID identifier type, and the DNS-ID identifier type MUST be the DNS-ID identifier type, and the DNS-ID identifier type MUST be
present in rpki-rtr server certificates. present in rpki-rtr server certificates.
DNS names in rpki-rtr server certificates SHOULD NOT contain the o DNS names in rpki-rtr server certificates SHOULD NOT contain the
wildcard character "*". wildcard character "*".
rpki-rtr implementations which use TLS MUST NOT use CN-ID o rpki-rtr implementations which use TLS MUST NOT use Common Name
identifiers; a CN field may be present in the server certificate's (CN-ID) identifiers; a CN field may be present in the server
subject name, but MUST NOT be used for authentication within the certificate's subject name but MUST NOT be used for authentication
rules described in [RFC6125]. within the rules described in [RFC6125].
The client router MUST set its "reference identifier" to the DNS o The client router MUST set its "reference identifier" to the DNS
name of the rpki-rtr cache. name of the rpki-rtr cache.
9.3. TCP MD5 Transport 9.3. TCP MD5 Transport
If TCP MD5 is used, implementations MUST support key lengths of at If TCP MD5 is used, implementations MUST support key lengths of at
least 80 printable ASCII bytes, per Section 4.5 of [RFC2385]. least 80 printable ASCII bytes, per Section 4.5 of [RFC2385].
Implementations MUST also support hexadecimal sequences of at least Implementations MUST also support hexadecimal sequences of at least
32 characters, i.e., 128 bits. 32 characters, i.e., 128 bits.
Key rollover with TCP MD5 is problematic. Cache servers SHOULD Key rollover with TCP MD5 is problematic. Cache servers SHOULD
skipping to change at page 26, line 15 skipping to change at page 27, line 29
10. Router-Cache Setup 10. Router-Cache Setup
A cache has the public authentication data for each router it is A cache has the public authentication data for each router it is
configured to support. configured to support.
A router may be configured to peer with a selection of caches, and a A router may be configured to peer with a selection of caches, and a
cache may be configured to support a selection of routers. Each must cache may be configured to support a selection of routers. Each must
have the name of, and authentication data for, each peer. In have the name of, and authentication data for, each peer. In
addition, in a router, this list has a non-unique preference value addition, in a router, this list has a non-unique preference value
for each server. This preference merely denotes proximity, not for each server. This preference merely denotes proximity, not
trust, preferred belief, etc. The client router attempts to trust, preferred belief, et cetera. The client router attempts to
establish a session with each potential serving cache in preference establish a session with each potential serving cache in preference
order, and then starts to load data from the most preferred cache to order and then starts to load data from the most preferred cache to
which it can connect and authenticate. The router's list of caches which it can connect and authenticate. The router's list of caches
has the following elements: has the following elements:
Preference: An unsigned integer denoting the router's preference to Preference: An unsigned integer denoting the router's preference to
connect to that cache; the lower the value, the more preferred. connect to that cache; the lower the value, the more preferred.
Name: The IP address or fully qualified domain name of the cache. Name: The IP address or fully qualified domain name of the cache.
Cache Credential(s): Any credential (such as a public key) needed to Cache Credential(s): Any credential (such as a public key) needed to
authenticate the cache's identity to the router. authenticate the cache's identity to the router.
skipping to change at page 26, line 46 skipping to change at page 28, line 13
affect the correct data. affect the correct data.
Just as there may be more than one covering ROA from a single cache, Just as there may be more than one covering ROA from a single cache,
there may be multiple covering ROAs from multiple caches. The there may be multiple covering ROAs from multiple caches. The
results are as described in [RFC6811]. results are as described in [RFC6811].
If data from multiple caches are held, implementations MUST NOT If data from multiple caches are held, implementations MUST NOT
distinguish between data sources when performing validation of BGP distinguish between data sources when performing validation of BGP
announcements. announcements.
When a more preferred cache becomes available, if resources allow, it When a more-preferred cache becomes available, if resources allow, it
would be prudent for the client to start fetching from that cache. would be prudent for the client to start fetching from that cache.
The client SHOULD attempt to maintain at least one set of data, The client SHOULD attempt to maintain at least one set of data,
regardless of whether it has chosen a different cache or established regardless of whether it has chosen a different cache or established
a new connection to the previous cache. a new connection to the previous cache.
A client MAY drop the data from a particular cache when it is fully A client MAY drop the data from a particular cache when it is fully
in sync with one or more other caches. in sync with one or more other caches.
See Section 6 for details on what to do when the client is not able See Section 6 for details on what to do when the client is not able
to refresh from a particular cache. to refresh from a particular cache.
If a client loses connectivity to a cache it is using, or otherwise If a client loses connectivity to a cache it is using or otherwise
decides to switch to a new cache, it SHOULD retain the data from the decides to switch to a new cache, it SHOULD retain the data from the
previous cache until it has a full set of data from one or more other previous cache until it has a full set of data from one or more other
caches. Note that this may already be true at the point of caches. Note that this may already be true at the point of
connection loss if the client has connections to more than one cache. connection loss if the client has connections to more than one cache.
11. Deployment Scenarios 11. Deployment Scenarios
For illustration, we present three likely deployment scenarios. For illustration, we present three likely deployment scenarios:
Small End Site: The small multihomed end site may wish to outsource Small End Site: The small multihomed end site may wish to outsource
the RPKI cache to one or more of their upstream ISPs. They would the RPKI cache to one or more of their upstream ISPs. They would
exchange authentication material with the ISP using some out-of- exchange authentication material with the ISP using some out-of-
band mechanism, and their router(s) would connect to the cache(s) band mechanism, and their router(s) would connect to the cache(s)
of one or more upstream ISPs. The ISPs would likely deploy caches of one or more upstream ISPs. The ISPs would likely deploy caches
intended for customer use separately from the caches with which intended for customer use separately from the caches with which
their own BGP speakers peer. their own BGP speakers peer.
Large End Site: A larger multihomed end site might run one or more Large End Site: A larger multihomed end site might run one or more
caches, arranging them in a hierarchy of client caches, each caches, arranging them in a hierarchy of client caches, each
fetching from a serving cache which is closer to the Global RPKI. fetching from a serving cache which is closer to the Global RPKI.
They might configure fall-back peerings to upstream ISP caches. They might configure fallback peerings to upstream ISP caches.
ISP Backbone: A large ISP would likely have one or more redundant ISP Backbone: A large ISP would likely have one or more redundant
caches in each major point of presence (PoP), and these caches caches in each major point of presence (PoP), and these caches
would fetch from each other in an ISP-dependent topology so as not would fetch from each other in an ISP-dependent topology so as not
to place undue load on the Global RPKI. to place undue load on the Global RPKI.
Experience with large DNS cache deployments has shown that complex Experience with large DNS cache deployments has shown that complex
topologies are ill-advised as it is easy to make errors in the graph, topologies are ill-advised, as it is easy to make errors in the
e.g., not maintain a loop-free condition. graph, e.g., not maintain a loop-free condition.
Of course, these are illustrations and there are other possible Of course, these are illustrations, and there are other possible
deployment strategies. It is expected that minimizing load on the deployment strategies. It is expected that minimizing load on the
Global RPKI servers will be a major consideration. Global RPKI servers will be a major consideration.
To keep load on Global RPKI services from unnecessary peaks, it is To keep load on Global RPKI services from unnecessary peaks, it is
recommended that primary caches which load from the distributed recommended that primary caches which load from the distributed
Global RPKI not do so all at the same times, e.g., on the hour. Global RPKI not do so all at the same times, e.g., on the hour.
Choose a random time, perhaps the ISP's AS number modulo 60 and Choose a random time, perhaps the ISP's AS number modulo 60, and
jitter the inter-fetch timing. jitter the inter-fetch timing.
12. Error Codes 12. Error Codes
This section contains a preliminary list of error codes. The authors This section contains a preliminary list of error codes. The authors
expect additions to the list during development of the initial expect additions to the list during development of the initial
implementations. There is an IANA registry where valid error codes implementations. There is an IANA registry where valid error codes
are listed; see Section 14. Errors which are considered fatal MUST are listed; see Section 14. Errors which are considered fatal MUST
cause the session to be dropped. cause the session to be dropped.
0: Corrupt Data (fatal): The receiver believes the received PDU to 0: Corrupt Data (fatal): The receiver believes the received PDU to
be corrupt in a manner not specified by another error code. be corrupt in a manner not specified by another error code.
1: Internal Error (fatal): The party reporting the error experienced 1: Internal Error (fatal): The party reporting the error experienced
some kind of internal error unrelated to protocol operation (ran some kind of internal error unrelated to protocol operation (ran
out of memory, a coding assertion failed, et cetera). out of memory, a coding assertion failed, et cetera).
2: No Data Available: The cache believes itself to be in good 2: No Data Available: The cache believes itself to be in good
working order, but is unable to answer either a Serial Query or a working order but is unable to answer either a Serial Query or a
Reset Query because it has no useful data available at this time. Reset Query because it has no useful data available at this time.
This is likely to be a temporary error, and most likely indicates This is likely to be a temporary error and most likely indicates
that the cache has not yet completed pulling down an initial that the cache has not yet completed pulling down an initial
current data set from the Global RPKI system after some kind of current data set from the Global RPKI system after some kind of
event that invalidated whatever data it might have previously held event that invalidated whatever data it might have previously held
(reboot, network partition, et cetera). (reboot, network partition, et cetera).
3: Invalid Request (fatal): The cache server believes the client's 3: Invalid Request (fatal): The cache server believes the client's
request to be invalid. request to be invalid.
4: Unsupported Protocol Version (fatal): The Protocol Version is not 4: Unsupported Protocol Version (fatal): The Protocol Version is not
known by the receiver of the PDU. known by the receiver of the PDU.
5: Unsupported PDU Type (fatal): The PDU Type is not known by the 5: Unsupported PDU Type (fatal): The PDU Type is not known by the
receiver of the PDU. receiver of the PDU.
6: Withdrawal of Unknown Record (fatal): The received PDU has Flag=0 6: Withdrawal of Unknown Record (fatal): The received PDU has
but a matching record ({Prefix, Len, Max-Len, ASN} tuple for an Flag=0, but a matching record ({Prefix, Len, Max-Len, ASN} tuple
IPvX PDU, or {SKI, ASN, Subject Public Key} tuple for a Router Key for an IPvX PDU or {SKI, ASN, Subject Public Key} tuple for a
PDU) does not exist in the receiver's database. Router Key PDU) does not exist in the receiver's database.
7: Duplicate Announcement Received (fatal): The received PDU has 7: Duplicate Announcement Received (fatal): The received PDU has
Flag=1 but a matching record ({Prefix, Len, Max-Len, ASN} tuple Flag=1, but a matching record ({Prefix, Len, Max-Len, ASN} tuple
for an IPvX PDU, or {SKI, ASN, Subject Public Key} tuple for a for an IPvX PDU or {SKI, ASN, Subject Public Key} tuple for a
Router Key PDU) is already active in the router. Router Key PDU) is already active in the router.
8: Unexpected Protocol Version (fatal): The received PDU has a 8: Unexpected Protocol Version (fatal): The received PDU has a
Protocol Version field that differs from the protocol version Protocol Version field that differs from the protocol version
negotiated in Section 7. negotiated in Section 7.
13. Security Considerations 13. Security Considerations
As this document describes a security protocol, many aspects of As this document describes a security protocol, many aspects of
security interest are described in the relevant sections. This security interest are described in the relevant sections. This
skipping to change at page 29, line 26 skipping to change at page 30, line 40
Cache Peer Identification: The router initiates a transport Cache Peer Identification: The router initiates a transport
connection to a cache, which it identifies by either IP address or connection to a cache, which it identifies by either IP address or
fully qualified domain name. Be aware that a DNS or address fully qualified domain name. Be aware that a DNS or address
spoofing attack could make the correct cache unreachable. No spoofing attack could make the correct cache unreachable. No
session would be established, as the authorization keys would not session would be established, as the authorization keys would not
match. match.
Transport Security: The RPKI relies on object, not server or Transport Security: The RPKI relies on object, not server or
transport, trust. That is, the IANA root trust anchor is transport, trust. That is, the IANA root trust anchor is
distributed to all caches through some out-of-band means, and can distributed to all caches through some out-of-band means and can
then be used by each cache to validate certificates and ROAs all then be used by each cache to validate certificates and ROAs all
the way down the tree. The inter-cache relationships are based on the way down the tree. The inter-cache relationships are based on
this object security model; hence, the inter-cache transport can this object security model; hence, the inter-cache transport can
be lightly protected. be lightly protected.
However, this protocol document assumes that the routers cannot do However, this protocol document assumes that the routers cannot do
the validation cryptography. Hence, the last link, from cache to the validation cryptography. Hence, the last link, from cache to
router, is secured by server authentication and transport-level router, is secured by server authentication and transport-level
security. This is dangerous, as server authentication and security. This is dangerous, as server authentication and
transport have very different threat models than object security. transport have very different threat models than object security.
So the strength of the trust relationship and the transport So the strength of the trust relationship and the transport
between the router(s) and the cache(s) are critical. You're between the router(s) and the cache(s) are critical. You're
betting your routing on this. betting your routing on this.
While we cannot say the cache must be on the same LAN, if only due While we cannot say the cache must be on the same LAN, if only due
to the issue of an enterprise wanting to off-load the cache task to the issue of an enterprise wanting to offload the cache task to
to their upstream ISP(s), locality, trust, and control are very their upstream ISP(s), locality, trust, and control are very
critical issues here. The cache(s) really SHOULD be as close, in critical issues here. The cache(s) really SHOULD be as close, in
the sense of controlled and protected (against DDoS, MITM) the sense of controlled and protected (against DDoS, MITM)
transport, to the router(s) as possible. It also SHOULD be transport, to the router(s) as possible. It also SHOULD be
topologically close so that a minimum of validated routing data topologically close so that a minimum of validated routing data
are needed to bootstrap a router's access to a cache. are needed to bootstrap a router's access to a cache.
The identity of the cache server SHOULD be verified and The identity of the cache server SHOULD be verified and
authenticated by the router client, and vice versa, before any authenticated by the router client, and vice versa, before any
data are exchanged. data are exchanged.
skipping to change at page 30, line 22 skipping to change at page 31, line 35
corruption attacks. As pointed out in Section 9, TCP-AO is the corruption attacks. As pointed out in Section 9, TCP-AO is the
long-term plan. Protocols which provide integrity and long-term plan. Protocols which provide integrity and
authenticity SHOULD be used, and if they cannot, i.e., TCP is used authenticity SHOULD be used, and if they cannot, i.e., TCP is used
as the transport, the router and cache MUST be on the same as the transport, the router and cache MUST be on the same
trusted, controlled network. trusted, controlled network.
14. IANA Considerations 14. IANA Considerations
This section only discusses updates required in the existing IANA This section only discusses updates required in the existing IANA
protocol registries to accommodate version 1 of this protocol. See protocol registries to accommodate version 1 of this protocol. See
[RFC6810] for IANA Considerations from the original (version 0) [RFC6810] for IANA considerations from the original (version 0)
protocol. protocol.
All existing entries in the IANA "rpki-rtr-pdu" registry remain valid All existing entries in the IANA "rpki-rtr-pdu" registry remain valid
for protocol version 0. All of the PDU types allowed in protocol for protocol version 0. All of the PDU types allowed in protocol
version 0 are also allowed in protocol version 1, with the addition version 0 are also allowed in protocol version 1, with the addition
of the new Router Key PDU. To reduce the likelihood of confusion, of the new Router Key PDU. To reduce the likelihood of confusion,
the PDU number used by the Router Key PDU in protocol version 1 is the PDU number used by the Router Key PDU in protocol version 1 is
hereby registered as reserved (and unused) in protocol version 0. hereby registered as reserved (and unused) in protocol version 0.
The policy for adding to the registry is RFC Required per [RFC5226], The policy for adding to the registry is RFC Required per [RFC8126];
either Standards Track or Experimental. the document must be either Standards Track or Experimental.
Assuming that the registry allows range notation in the Protocol The "rpki-rtr-pdu" registry has been updated as follows:
Version field, the updated "rpki-rtr-pdu" registry will be:
Protocol PDU Protocol PDU
Version Type Description Version Type Description
-------- ---- --------------- -------- ---- ---------------
0-1 0 Serial Notify 0-1 0 Serial Notify
0-1 1 Serial Query 0-1 1 Serial Query
0-1 2 Reset Query 0-1 2 Reset Query
0-1 3 Cache Response 0-1 3 Cache Response
0-1 4 IPv4 Prefix 0-1 4 IPv4 Prefix
0-1 6 IPv6 Prefix 0-1 6 IPv6 Prefix
skipping to change at page 31, line 11 skipping to change at page 32, line 29
1 9 Router Key 1 9 Router Key
0-1 10 Error Report 0-1 10 Error Report
0-1 255 Reserved 0-1 255 Reserved
All existing entries in the IANA "rpki-rtr-error" registry remain All existing entries in the IANA "rpki-rtr-error" registry remain
valid for all protocol versions. Protocol version 1 adds one new valid for all protocol versions. Protocol version 1 adds one new
error code: error code:
Error Error
Code Description Code Description
----- ---------------- ----- ---------------------------
8 Unexpected Protocol Version 8 Unexpected Protocol Version
15. Acknowledgments 15. References
The authors wish to thank Nils Bars, Steve Bellovin, Tim Bruijnzeels,
Rex Fernando, Richard Hansen, Paul Hoffman, Fabian Holler, Russ
Housley, Pradosh Mohapatra, Keyur Patel, David Mandelberg, Sandy
Murphy, Robert Raszuk, Andreas Reuter, Thomas C. Schmidt, John
Scudder, Ruediger Volk, Matthias Waehlisch, and David Ward.
Particular thanks go to Hannes Gredler for showing us the dangers of
unnecessary fields.
No doubt this list is incomplete. We apologize to any contributor
whose name we missed.
16. References
16.1. Normative References
[I-D.ietf-sidr-bgpsec-algs] 15.1. Normative References
Turner, S., "BGPsec Algorithms, Key Formats, & Signature
Formats", draft-ietf-sidr-bgpsec-algs-16 (work in
progress), November 2016.
[RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982,
August 1996. DOI 10.17487/RFC1982, August 1996,
<https://www.rfc-editor.org/info/rfc1982>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", RFC 2119, BCP 14, March 1997. Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC2385] Heffernan, A., "Protection of BGP Sessions via the TCP MD5 [RFC2385] Heffernan, A., "Protection of BGP Sessions via the TCP MD5
Signature Option", RFC 2385, August 1998. Signature Option", RFC 2385, DOI 10.17487/RFC2385, August
1998, <https://www.rfc-editor.org/info/rfc2385>.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", RFC 3629, STD 63, November 2003. 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
2003, <https://www.rfc-editor.org/info/rfc3629>.
[RFC4252] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH) [RFC4252] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
Authentication Protocol", RFC 4252, January 2006. Authentication Protocol", RFC 4252, DOI 10.17487/RFC4252,
January 2006, <https://www.rfc-editor.org/info/rfc4252>.
[RFC4301] Kent, S. and K. Seo, "Security Architecture for the [RFC4301] Kent, S. and K. Seo, "Security Architecture for the
Internet Protocol", RFC 4301, December 2005. Internet Protocol", RFC 4301, DOI 10.17487/RFC4301,
December 2005, <https://www.rfc-editor.org/info/rfc4301>.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", RFC 5226, BCP 26,
May 2008.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008. (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008,
<https://www.rfc-editor.org/info/rfc5246>.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
Housley, R., and W. Polk, "Internet X.509 Public Key Housley, R., and W. Polk, "Internet X.509 Public Key
Infrastructure Certificate and Certificate Revocation List Infrastructure Certificate and Certificate Revocation List
(CRL) Profile", RFC 5280, May 2008. (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
<https://www.rfc-editor.org/info/rfc5280>.
[RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP [RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP
Authentication Option", RFC 5925, June 2010. Authentication Option", RFC 5925, DOI 10.17487/RFC5925,
June 2010, <https://www.rfc-editor.org/info/rfc5925>.
[RFC5926] Lebovitz, G. and E. Rescorla, "Cryptographic Algorithms [RFC5926] Lebovitz, G. and E. Rescorla, "Cryptographic Algorithms
for the TCP Authentication Option (TCP-AO)", RFC 5926, for the TCP Authentication Option (TCP-AO)", RFC 5926,
June 2010. DOI 10.17487/RFC5926, June 2010,
<https://www.rfc-editor.org/info/rfc5926>.
[RFC6125] Saint-Andre, P. and J. Hodges, "Representation and [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and
Verification of Domain-Based Application Service Identity Verification of Domain-Based Application Service Identity
within Internet Public Key Infrastructure Using X.509 within Internet Public Key Infrastructure Using X.509
(PKIX) Certificates in the Context of Transport Layer (PKIX) Certificates in the Context of Transport Layer
Security (TLS)", RFC 6125, March 2011. Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March
2011, <https://www.rfc-editor.org/info/rfc6125>.
[RFC6487] Huston, G., Michaelson, G., and R. Loomans, "A Profile for [RFC6487] Huston, G., Michaelson, G., and R. Loomans, "A Profile for
X.509 PKIX Resource Certificates", RFC 6487, February X.509 PKIX Resource Certificates", RFC 6487,
2012. DOI 10.17487/RFC6487, February 2012,
<https://www.rfc-editor.org/info/rfc6487>.
[RFC6810] Bush, R. and R. Austein, "The Resource Public Key [RFC6810] Bush, R. and R. Austein, "The Resource Public Key
Infrastructure (RPKI) to Router Protocol", RFC 6810, Infrastructure (RPKI) to Router Protocol", RFC 6810,
January 2013. DOI 10.17487/RFC6810, January 2013,
<https://www.rfc-editor.org/info/rfc6810>.
[RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R.
Austein, "BGP Prefix Origin Validation", RFC 6811, January Austein, "BGP Prefix Origin Validation", RFC 6811,
2013. DOI 10.17487/RFC6811, January 2013,
<https://www.rfc-editor.org/info/rfc6811>.
16.2. Informative References [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
Writing an IANA Considerations Section in RFCs", BCP 26,
RFC 8126, DOI 10.17487/RFC8126, June 2017,
<https://www.rfc-editor.org/info/rfc8126>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8208] Turner, S. and O. Borchert, "BGPsec Algorithms, Key
Formats, and Signature Formats", RFC 8208,
DOI 10.17487/RFC8208, September 2017,
<http://www.rfc-editor.org/info/rfc8208>.
15.2. Informative References
[RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone
Changes (DNS NOTIFY)", RFC 1996, August 1996. Changes (DNS NOTIFY)", RFC 1996, DOI 10.17487/RFC1996,
August 1996, <https://www.rfc-editor.org/info/rfc1996>.
[RFC4808] Bellovin, S., "Key Change Strategies for TCP-MD5", [RFC4808] Bellovin, S., "Key Change Strategies for TCP-MD5",
RFC 4808, March 2007. RFC 4808, DOI 10.17487/RFC4808, March 2007,
<https://www.rfc-editor.org/info/rfc4808>.
[RFC5781] Weiler, S., Ward, D., and R. Housley, "The rsync URI [RFC5781] Weiler, S., Ward, D., and R. Housley, "The rsync URI
Scheme", RFC 5781, February 2010. Scheme", RFC 5781, DOI 10.17487/RFC5781, February 2010,
<https://www.rfc-editor.org/info/rfc5781>.
[RFC6480] Lepinski, M. and S. Kent, "An Infrastructure to Support [RFC6480] Lepinski, M. and S. Kent, "An Infrastructure to Support
Secure Internet Routing", RFC 6480, February 2012. Secure Internet Routing", RFC 6480, DOI 10.17487/RFC6480,
February 2012, <https://www.rfc-editor.org/info/rfc6480>.
[RFC6481] Huston, G., Loomans, R., and G. Michaelson, "A Profile for [RFC6481] Huston, G., Loomans, R., and G. Michaelson, "A Profile for
Resource Certificate Repository Structure", RFC 6481, Resource Certificate Repository Structure", RFC 6481,
February 2012. DOI 10.17487/RFC6481, February 2012,
<https://www.rfc-editor.org/info/rfc6481>.
Acknowledgements
The authors wish to thank Nils Bars, Steve Bellovin, Tim Bruijnzeels,
Rex Fernando, Richard Hansen, Paul Hoffman, Fabian Holler, Russ
Housley, Pradosh Mohapatra, Keyur Patel, David Mandelberg, Sandy
Murphy, Robert Raszuk, Andreas Reuter, Thomas C. Schmidt, John
Scudder, Ruediger Volk, Matthias Waehlisch, and David Ward.
Particular thanks go to Hannes Gredler for showing us the dangers of
unnecessary fields.
No doubt this list is incomplete. We apologize to any contributor
whose name we missed.
Authors' Addresses Authors' Addresses
Randy Bush Randy Bush
Internet Initiative Japan Internet Initiative Japan
5147 Crystal Springs 5147 Crystal Springs
Bainbridge Island, Washington 98110 Bainbridge Island, Washington 98110
US United States of America
Email: randy@psg.com Email: randy@psg.com
Rob Austein Rob Austein
Dragon Research Labs Dragon Research Labs
Email: sra@hactrn.net Email: sra@hactrn.net
 End of changes. 137 change blocks. 
292 lines changed or deleted 315 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/