Tech-invite3GPPspaceIETFspace
959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 8210

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

Pages: 35
Proposed Standard
Updates:  6810
Part 1 of 2 – Pages 1 to 19
None   None   Next

Top   ToC   RFC8210 - Page 1
Internet Engineering Task Force (IETF)                           R. Bush
Request for Comments: 8210                     Internet Initiative Japan
Updates: 6810                                                 R. Austein
Category: Standards Track                           Dragon Research Labs
ISSN: 2070-1721                                           September 2017


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

Abstract

In order to verifiably validate the origin Autonomous Systems and Autonomous System Paths of BGP announcements, routers need a simple but reliable mechanism to receive Resource Public Key Infrastructure (RFC 6480) prefix origin data and router keys from a trusted cache. This document describes a protocol to deliver them. This document describes version 1 of the RPKI-Router protocol. RFC 6810 describes version 0. This document updates RFC 6810. Status of This Memo This is an Internet Standards Track document. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841. 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.
Top   ToC   RFC8210 - Page 2
Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.
Top   ToC   RFC8210 - Page 3

Table of Contents

1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 1.2. Changes from RFC 6810 . . . . . . . . . . . . . . . . . . 4 2. Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Deployment Structure . . . . . . . . . . . . . . . . . . . . 5 4. Operational Overview . . . . . . . . . . . . . . . . . . . . 6 5. Protocol Data Units (PDUs) . . . . . . . . . . . . . . . . . 7 5.1. Fields of a PDU . . . . . . . . . . . . . . . . . . . . . 7 5.2. Serial Notify . . . . . . . . . . . . . . . . . . . . . . 10 5.3. Serial Query . . . . . . . . . . . . . . . . . . . . . . 10 5.4. Reset Query . . . . . . . . . . . . . . . . . . . . . . . 12 5.5. Cache Response . . . . . . . . . . . . . . . . . . . . . 12 5.6. IPv4 Prefix . . . . . . . . . . . . . . . . . . . . . . . 13 5.7. IPv6 Prefix . . . . . . . . . . . . . . . . . . . . . . . 14 5.8. End of Data . . . . . . . . . . . . . . . . . . . . . . . 15 5.9. Cache Reset . . . . . . . . . . . . . . . . . . . . . . . 16 5.10. Router Key . . . . . . . . . . . . . . . . . . . . . . . 16 5.11. Error Report . . . . . . . . . . . . . . . . . . . . . . 17 6. Protocol Timing Parameters . . . . . . . . . . . . . . . . . 18 7. Protocol Version Negotiation . . . . . . . . . . . . . . . . 20 8. Protocol Sequences . . . . . . . . . . . . . . . . . . . . . 21 8.1. Start or Restart . . . . . . . . . . . . . . . . . . . . 21 8.2. Typical Exchange . . . . . . . . . . . . . . . . . . . . 22 8.3. No Incremental Update Available . . . . . . . . . . . . . 23 8.4. Cache Has No Data Available . . . . . . . . . . . . . . . 23 9. Transport . . . . . . . . . . . . . . . . . . . . . . . . . . 24 9.1. SSH Transport . . . . . . . . . . . . . . . . . . . . . . 25 9.2. TLS Transport . . . . . . . . . . . . . . . . . . . . . . 26 9.3. TCP MD5 Transport . . . . . . . . . . . . . . . . . . . . 26 9.4. TCP-AO Transport . . . . . . . . . . . . . . . . . . . . 27 10. Router-Cache Setup . . . . . . . . . . . . . . . . . . . . . 27 11. Deployment Scenarios . . . . . . . . . . . . . . . . . . . . 28 12. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . 29 13. Security Considerations . . . . . . . . . . . . . . . . . . . 30 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 15.1. Normative References . . . . . . . . . . . . . . . . . . 32 15.2. Informative References . . . . . . . . . . . . . . . . . 34 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 35 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35
Top   ToC   RFC8210 - Page 4

1. Introduction

In order to verifiably validate the origin Autonomous Systems (ASes) and AS paths of BGP announcements, routers need a simple but reliable mechanism to receive cryptographically validated Resource Public Key Infrastructure (RPKI) [RFC6480] prefix origin data and router keys from a trusted cache. This document describes a protocol to deliver them. The design is intentionally constrained to be usable on much of the current generation of ISP router platforms. This document updates [RFC6810]. Section 3 describes the deployment structure, and Section 4 then presents an operational overview. The binary payloads of the protocol are formally described in Section 5, and the expected Protocol Data Unit (PDU) sequences are described in Section 8. The transport protocol options are described in Section 9. Section 10 details how routers and caches are configured to connect and authenticate. Section 11 describes likely deployment scenarios. The traditional security and IANA considerations end the document. The protocol is extensible in order to support new PDUs with new semantics, if deployment experience indicates that they are needed. PDUs are versioned should deployment experience call for change.

1.1. Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

1.2. Changes from RFC 6810

This section summarizes the significant changes between [RFC6810] and the protocol described in this document. o New Router Key PDU type (Section 5.10) added. o Explicit timing parameters (Section 5.8, Section 6) added. o Protocol version number incremented from 0 (zero) to 1 (one). o Protocol version number negotiation (Section 7) added.
Top   ToC   RFC8210 - Page 5

2. Glossary

The following terms are used with special meaning. Global RPKI: The authoritative data of the RPKI are published in a distributed set of servers at the IANA, Regional Internet Registries (RIRs), National Internet Registries (NIRs), and ISPs; see [RFC6481]. Cache: A cache is a coalesced copy of the published Global RPKI data, periodically fetched or refreshed, directly or indirectly, using the rsync protocol [RFC5781] or some successor. Relying Party software is used to gather and validate the distributed data of the RPKI into a cache. Trusting this cache further is a matter between the provider of the cache and a Relying Party. Serial Number: "Serial Number" is a 32-bit strictly increasing unsigned integer which wraps from 2^32-1 to 0. It denotes the logical version of a cache. A cache increments the value when it successfully updates its data from a parent cache or from primary RPKI data. While a cache is receiving updates, new incoming data and implicit deletes are associated with the new serial but MUST NOT be sent until the fetch is complete. A Serial Number is not commensurate between different caches or different protocol versions, nor need it be maintained across resets of the cache 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 ID to uniquely identify the instance of the cache and to bind it to the sequence of Serial Numbers that cache instance will generate. This allows the router to restart a failed session knowing that the Serial Number it is using is commensurate with that of the cache. Payload PDU: A payload PDU is a protocol message which contains data for use by the router, as opposed to a PDU which conveys the control mechanisms of this protocol. Prefixes and Router Keys are examples of payload PDUs.

3. Deployment Structure

Deployment of the RPKI to reach routers has a three-level structure as follows: Global RPKI: The authoritative data of the RPKI are published in a distributed set of servers at the IANA, RIRs, NIRs, and ISPs (see [RFC6481]).
Top   ToC   RFC8210 - Page 6
   Local Caches:  Local caches are a local set of one or more collected
      and verified caches of RPKI data.  A Relying Party, e.g., router
      or other client, MUST have a trust relationship with, and a
      trusted transport channel to, any cache(s) it uses.

   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
      cache.  There MAY be mechanisms for the router to assure itself of
      the authenticity of the cache and to authenticate itself to the
      cache (see Section 9).

4. Operational Overview

A router establishes and keeps open a connection to one or more caches with which it has client/server relationships. It is configured with a semi-ordered list of caches and establishes a connection to the most preferred cache, or set of caches, which accept the connections. The router MUST choose the most preferred, by configuration, cache or set of caches so that the operator may control load on their caches and the Global RPKI. Periodically, the router sends to the cache the most recent Serial 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 a router establishes a new session with a cache or wishes to reset a current relationship, it sends a Reset Query. 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, in which case the End of Data PDU (Section 5.8) is still sent. Note that the Serial Number comparison used to determine "since the given Serial Number" MUST take wrap-around into account; see [RFC1982]. 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 received End of Data PDU. When the cache updates its database, it sends a Notify PDU to every currently connected router. This is a hint that now would be a good 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 any case. 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 inefficient. The Serial-Number-based incremental update mechanism
Top   ToC   RFC8210 - Page 7
   allows an efficient transfer of just the data records which have
   changed since the last update.  As with any update protocol based on
   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
   necessary incremental data.  Unlike some incremental transfer
   protocols, this protocol requires the router to make an explicit
   request to start the fallback process; this is deliberate, as the
   cache has no way of knowing whether the router has also established
   sessions with other caches that may be able to provide better
   service.

   As a cache server must evaluate certificates and ROAs (Route Origin
   Authorizations; see [RFC6480]), which are time dependent, servers'
   clocks MUST be correct to a tolerance of approximately an hour.

5. Protocol Data Units (PDUs)

The exchanges between the cache and the router are sequences of exchanges of the following PDUs according to the rules described in Section 8. Reserved fields (marked "zero" in PDU diagrams) MUST be zero on transmission and MUST be ignored on receipt.

5.1. Fields of a PDU

PDUs contain the following data elements: Protocol Version: An 8-bit unsigned integer, currently 1, denoting the version of this protocol. PDU Type: An 8-bit unsigned integer, denoting the type of the PDU, e.g., IPv4 Prefix. Serial Number: The Serial Number of the RPKI cache when this set of PDUs was received from an upstream cache server or gathered from the Global RPKI. A cache increments its Serial Number when completing a rigorously validated update from a parent cache or the Global RPKI. Session ID: A 16-bit unsigned integer. When a cache server is 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 instance will generate. This allows the router to restart a failed session knowing that the Serial Number it is using is commensurate with that of the cache. If, at any time after the protocol version has been negotiated (Section 7), either the router or the cache finds that the value of the Session ID is not
Top   ToC   RFC8210 - Page 8
      the same as the other's, the party which detects the mismatch MUST
      immediately terminate the session with an Error Report PDU with
      code 0 ("Corrupt Data"), and the router MUST flush all data
      learned from that cache.

      Note that sessions are specific to a particular protocol version.
      That is, if a cache server supports multiple versions of this
      protocol, happens to use the same Session ID value for multiple
      protocol versions, and further happens to use the same Serial
      Number values for two or more sessions using the same Session ID
      but different Protocol Version values, the Serial Numbers are not
      commensurate.  The full test for whether Serial Numbers are
      commensurate requires comparing Protocol Version, Session ID, and
      Serial Number.  To reduce the risk of confusion, cache servers
      SHOULD NOT use the same Session ID across multiple protocol
      versions, but even if they do, routers MUST treat sessions with
      different Protocol Version fields as separate sessions even if
      they do happen to have the same Session ID.

      Should a cache erroneously reuse a Session ID so that a router
      does not realize that the session has changed (old Session ID and
      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
      router to discover that it is confused will depend on whether the
      Serial Numbers are also reused.  If the Serial Numbers in the old
      and new sessions are different enough, the cache will respond to
      the router's Serial Query with a Cache Reset, which will solve the
      problem.  If, however, the Serial Numbers are close, the cache may
      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
      that the router will detect some discrepancy between the state
      that the cache expects and its own state.  For example, the Cache
      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
      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
      out of sync is when nothing in the Cache Response contradicts any
      data currently held by the router.

      Using persistent storage for the Session ID or a clock-based
      scheme for generating Session IDs should avoid the risk of
      Session ID collisions.

      The Session ID might be a pseudorandom value, a strictly
      increasing value if the cache has reliable storage, et cetera.  A
      seconds-since-epoch timestamp value such as the POSIX time()
      function makes a good Session ID value.
Top   ToC   RFC8210 - Page 9
   Length:  A 32-bit unsigned integer which has as its value the count
      of the bytes in the entire PDU, including the 8 bytes of header
      which includes the length field.

   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
      IPv6), the flag indicates whether this PDU announces a new right
      to announce the prefix or withdraws a previously announced right;
      a withdraw effectively deletes one previously announced Prefix PDU
      with the exact same Prefix, Length, Max-Len, and Autonomous System
      Number (ASN).  Similarly, for a Router Key PDU, the flag indicates
      whether this PDU announces a new Router Key or deletes one
      previously announced Router Key PDU with the exact same AS Number,
      subjectKeyIdentifier, and subjectPublicKeyInfo.

      The remaining bits in the Flags field are reserved for future use.
      In protocol version 1, they MUST be zero on transmission and MUST
      be ignored on receipt.

   Prefix Length:  An 8-bit unsigned integer denoting the shortest
      prefix allowed by the Prefix element.

   Max Length:  An 8-bit unsigned integer denoting the longest prefix
      allowed by the Prefix element.  This MUST NOT be less than the
      Prefix Length element.

   Prefix:  The IPv4 or IPv6 prefix of the ROA.

   Autonomous System Number:  A 32-bit unsigned integer representing an
      ASN allowed to announce a prefix or associated with a router key.

   Subject Key Identifier:  20-octet Subject Key Identifier (SKI) value
      of a router key, as described in [RFC6487].

   Subject Public Key Info:  A router key's subjectPublicKeyInfo value,
      as described in [RFC8208].  This is the full ASN.1 DER encoding of
      the subjectPublicKeyInfo, including the ASN.1 tag and length
      values of the subjectPublicKeyInfo SEQUENCE.

   Refresh Interval:  Interval between normal cache polls.  See
      Section 6.

   Retry Interval:  Interval between cache poll retries after a failed
      cache poll.  See Section 6.

   Expire Interval:  Interval during which data fetched from a cache
      remains valid in the absence of a successful subsequent cache
      poll.  See Section 6.
Top   ToC   RFC8210 - Page 10

5.2. Serial Notify

The cache notifies the router that the cache has new data. The Session ID reassures the router that the Serial Numbers are commensurate, i.e., the cache session has not been changed. Upon receipt of a Serial Notify PDU, the router MAY issue an immediate Serial Query (Section 5.3) or Reset Query (Section 5.4) without waiting for the Refresh Interval timer (see Section 6) to expire. Serial Notify is the only message that the cache can send that is not in response to a message from the router. If the router receives a Serial Notify PDU during the initial startup period where the router and cache are still negotiating to agree on a protocol version, the router MUST simply ignore the Serial Notify PDU, even if the Serial Notify PDU is for an unexpected protocol version. See Section 7 for details. 0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | Version | Type | Session ID | | 1 | 0 | | +-------------------------------------------+ | | | Length=12 | | | +-------------------------------------------+ | | | Serial Number | | | `-------------------------------------------'

5.3. Serial Query

The router sends a Serial Query to ask the cache for all announcements and withdrawals which have occurred since the Serial Number specified in the Serial Query. The cache replies to this query with a Cache Response PDU (Section 5.5) if the cache has a (possibly null) record of the 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).
Top   ToC   RFC8210 - Page 11
   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.
   That is, if a particular prefix or router key underwent multiple
   changes between the Serial Number specified by the router and the
   cache's current Serial Number, the cache MUST merge those changes to
   present the simplest possible view of those changes to the router.
   In general, this means that, for any particular prefix or router key,
   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
   stream will not mention the prefix or router key at all.

   The rationale for this approach is that the entire purpose of the
   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
   set, thus reducing work for 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
   the Serial Query, then it responds with a Cache Reset PDU
   (Section 5.9).

   The Session ID tells the cache what instance the router expects to
   ensure that the Serial Numbers are commensurate, i.e., the cache
   session has not been changed.

   0          8          16         24        31
   .-------------------------------------------.
   | Protocol |   PDU    |                     |
   | Version  |   Type   |     Session ID      |
   |    1     |    1     |                     |
   +-------------------------------------------+
   |                                           |
   |                 Length=12                 |
   |                                           |
   +-------------------------------------------+
   |                                           |
   |               Serial Number               |
   |                                           |
   `-------------------------------------------'
Top   ToC   RFC8210 - Page 12

5.4. Reset Query

The router tells the cache that it wants to receive the total active, current, non-withdrawn database. The cache responds with a Cache Response PDU (Section 5.5), followed by zero or more payload PDUs and an End of Data PDU (Section 5.8). 0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | Version | Type | zero | | 1 | 2 | | +-------------------------------------------+ | | | Length=8 | | | `-------------------------------------------'

5.5. Cache Response

The cache responds to queries with zero or more payload PDUs. When replying to a Serial Query (Section 5.3), the cache sends the set of announcements and withdrawals that have occurred since the Serial 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 this case, the withdraw/announce field in the payload PDUs MUST have the value 1 (announce). 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. In response to a Serial Query, the Session ID being the same reassures the router that the Serial Numbers are commensurate, i.e., the cache session has not been changed. 0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | Version | Type | Session ID | | 1 | 3 | | +-------------------------------------------+ | | | Length=8 | | | `-------------------------------------------'
Top   ToC   RFC8210 - Page 13

5.6. IPv4 Prefix

0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | Version | Type | zero | | 1 | 4 | | +-------------------------------------------+ | | | Length=20 | | | +-------------------------------------------+ | | Prefix | Max | | | Flags | Length | Length | zero | | | 0..32 | 0..32 | | +-------------------------------------------+ | | | IPv4 Prefix | | | +-------------------------------------------+ | | | Autonomous System Number | | | `-------------------------------------------' The lowest-order bit of the Flags field is 1 for an announcement and 0 for a withdrawal. In the RPKI, nothing prevents a signing certificate from issuing two identical ROAs. In this case, there would be no semantic difference between the objects, merely a process redundancy. 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 certificate is being reissued or there is an address ownership 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 it would have a different validation path in the RPKI. This is important to the RPKI but not to the router. 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, 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 already has active, it SHOULD raise a Duplicate Announcement Received error.
Top   ToC   RFC8210 - Page 14

5.7. IPv6 Prefix

0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | Version | Type | zero | | 1 | 6 | | +-------------------------------------------+ | | | Length=32 | | | +-------------------------------------------+ | | Prefix | Max | | | Flags | Length | Length | zero | | | 0..128 | 0..128 | | +-------------------------------------------+ | | +--- ---+ | | +--- IPv6 Prefix ---+ | | +--- ---+ | | +-------------------------------------------+ | | | Autonomous System Number | | | `-------------------------------------------' Analogous to the IPv4 Prefix PDU, it has 96 more bits and no magic.
Top   ToC   RFC8210 - Page 15

5.8. End of Data

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 corresponding Cache Response which began the (possibly null) sequence of payload PDUs. 0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | Version | Type | Session ID | | 1 | 7 | | +-------------------------------------------+ | | | Length=24 | | | +-------------------------------------------+ | | | Serial Number | | | +-------------------------------------------+ | | | Refresh Interval | | | +-------------------------------------------+ | | | Retry Interval | | | +-------------------------------------------+ | | | Expire Interval | | | `-------------------------------------------' The Refresh Interval, Retry Interval, and Expire Interval are all 32-bit elapsed times measured in seconds. They express the timing parameters which the cache expects the router to use in deciding when 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 values for these parameters.
Top   ToC   RFC8210 - Page 16

5.9. Cache Reset

The cache may respond to a Serial Query informing the router that the cache cannot provide an incremental update starting from the Serial Number specified by the router. The router must decide whether to issue a Reset Query or switch to a different cache. 0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | Version | Type | zero | | 1 | 8 | | +-------------------------------------------+ | | | Length=8 | | | `-------------------------------------------'

5.10. Router Key

0 8 16 24 31 .-------------------------------------------. | Protocol | PDU | | | | Version | Type | Flags | zero | | 1 | 9 | | | +-------------------------------------------+ | | | Length | | | +-------------------------------------------+ | | +--- ---+ | Subject Key Identifier | +--- ---+ | | +--- ---+ | (20 octets) | +--- ---+ | | +-------------------------------------------+ | | | AS Number | | | +-------------------------------------------+ | | | Subject Public Key Info | | | `-------------------------------------------'
Top   ToC   RFC8210 - Page 17
   The lowest-order bit of the Flags field is 1 for an announcement and
   0 for a withdrawal.

   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
   Public Key} at any one point in time.  Should the router client
   receive a Router Key PDU with a {SKI, ASN, Subject Public Key}
   identical to one it already has active, it SHOULD raise a Duplicate
   Announcement Received error.

   Note that a particular ASN may appear in multiple Router Key PDUs
   with different Subject Public Key values, while a particular Subject
   Public Key value may appear in multiple Router Key PDUs with
   different ASNs.  In the interest of keeping the announcement and
   withdrawal semantics as simple as possible for the router, this
   protocol makes no attempt to compress either of these cases.

   Also note that it is possible, albeit very unlikely, for multiple
   distinct Subject Public Key values to hash to the same SKI.  For this
   reason, implementations MUST compare Subject Public Key values as
   well as SKIs when detecting duplicate PDUs.

5.11. Error Report

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 errors in Error Report PDUs. Error codes are described in Section 12. 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 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 erroneous Error Report PDU is received, the session SHOULD be dropped. If the error is associated with a PDU of excessive length, i.e., too long to be any legal PDU other than another Error Report, or a possibly corrupt length, the Erroneous PDU field MAY be truncated. The diagnostic text is optional; if not present, the Length of Error Text field MUST be zero. If error text is present, it MUST be a string in UTF-8 encoding (see [RFC3629]).
Top   ToC   RFC8210 - Page 18
   0          8          16         24        31
   .-------------------------------------------.
   | Protocol |   PDU    |                     |
   | Version  |   Type   |     Error Code      |
   |    1     |    10    |                     |
   +-------------------------------------------+
   |                                           |
   |                  Length                   |
   |                                           |
   +-------------------------------------------+
   |                                           |
   |       Length of Encapsulated PDU          |
   |                                           |
   +-------------------------------------------+
   |                                           |
   ~               Erroneous PDU               ~
   |                                           |
   +-------------------------------------------+
   |                                           |
   |           Length of Error Text            |
   |                                           |
   +-------------------------------------------+
   |                                           |
   |              Arbitrary Text               |
   |                    of                     |
   ~          Error Diagnostic Message         ~
   |                                           |
   `-------------------------------------------'

6. Protocol Timing Parameters

Since the data the cache distributes via the RPKI-Router protocol are retrieved from the Global RPKI system at intervals which are only 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 are likely to remain valid (or, at least, unchanged). For this 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 three values that allow the cache to communicate timing parameters to the router: Refresh Interval: This parameter tells the router how long to wait before next attempting to poll the cache and between subsequent attempts, using a Serial Query or Reset Query PDU. The router SHOULD NOT poll the cache sooner than indicated by this parameter. Note that receipt of a Serial Notify PDU overrides this interval
Top   ToC   RFC8210 - Page 19
      and suggests that the router issue an immediate query without
      waiting for the Refresh Interval to expire.  Countdown for this
      timer starts upon receipt of the containing End Of Data PDU.

      Minimum allowed value:  1 second.

      Maximum allowed value:  86400 seconds (1 day).

      Recommended default:  3600 seconds (1 hour).

   Retry Interval:  This parameter tells the router how long to wait
      before retrying a failed Serial Query or Reset Query.  The router
      SHOULD NOT retry sooner than indicated by this parameter.  Note
      that a protocol version mismatch overrides this interval: if the
      router needs to downgrade to a lower protocol version number, it
      MAY send the first Serial Query or Reset Query immediately.
      Countdown for this timer starts upon failure of the query and
      restarts after each subsequent failure until a query succeeds.

      Minimum allowed value:  1 second.

      Maximum allowed value:  7200 seconds (2 hours).

      Recommended default:  600 seconds (10 minutes).

   Expire Interval:  This parameter tells the router how long it can
      continue to use the current version of the data while unable to
      perform a successful subsequent query.  The router MUST NOT retain
      the data past the time indicated by this parameter.  Countdown for
      this timer starts upon receipt of the containing End Of Data PDU.

      Minimum allowed value:  600 seconds (10 minutes).

      Maximum allowed value:  172800 seconds (2 days).

      Recommended default:  7200 seconds (2 hours).

   If the router has never issued a successful query against a
   particular cache, it SHOULD retry periodically using the default
   Retry Interval, above.

   Caches MUST set Expire Interval to a value larger than either Refresh
   Interval or Retry Interval.


(next page on part 2)

Next Section