idnits 2.17.1 draft-ietf-sidr-rpki-rtr-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([I-D.ietf-sidr-arch]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 3, 2011) is 4802 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-10) exists of draft-ietf-sidr-pfx-validate-01 ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) == Outdated reference: A later version (-13) exists of draft-ietf-sidr-arch-12 == Outdated reference: A later version (-09) exists of draft-ietf-sidr-repos-struct-07 Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group R. Bush 3 Internet-Draft IIJ 4 Intended status: Standards Track R. Austein 5 Expires: September 4, 2011 ISC 6 March 3, 2011 8 The RPKI/Router Protocol 9 draft-ietf-sidr-rpki-rtr-10 11 Abstract 13 In order to formally validate the origin ASes of BGP announcements, 14 routers need a simple but reliable mechanism to receive RPKI 15 [I-D.ietf-sidr-arch] or analogous prefix origin data from a trusted 16 cache. This document describes a protocol to deliver validated 17 prefix origin data to routers over ssh. 19 Requirements Language 21 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 22 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 23 document are to be interpreted as described in RFC 2119 [RFC2119]. 25 Status of this Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on September 4, 2011. 42 Copyright Notice 44 Copyright (c) 2011 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Deployment Structure . . . . . . . . . . . . . . . . . . . . . 3 61 3. Operational Overview . . . . . . . . . . . . . . . . . . . . . 3 62 4. Protocol Data Units (PDUs) . . . . . . . . . . . . . . . . . . 4 63 4.1. Serial Notify . . . . . . . . . . . . . . . . . . . . . . 5 64 4.2. Serial Query . . . . . . . . . . . . . . . . . . . . . . . 5 65 4.3. Reset Query . . . . . . . . . . . . . . . . . . . . . . . 6 66 4.4. Cache Response . . . . . . . . . . . . . . . . . . . . . . 6 67 4.5. IPv4 Prefix . . . . . . . . . . . . . . . . . . . . . . . 7 68 4.6. IPv6 Prefix . . . . . . . . . . . . . . . . . . . . . . . 8 69 4.7. End of Data . . . . . . . . . . . . . . . . . . . . . . . 9 70 4.8. Cache Reset . . . . . . . . . . . . . . . . . . . . . . . 9 71 4.9. Error Report . . . . . . . . . . . . . . . . . . . . . . . 9 72 4.10. Fields of a PDU . . . . . . . . . . . . . . . . . . . . . 10 73 5. Protocol Sequences . . . . . . . . . . . . . . . . . . . . . . 12 74 5.1. Start or Restart . . . . . . . . . . . . . . . . . . . . . 12 75 5.2. Typical Exchange . . . . . . . . . . . . . . . . . . . . . 13 76 5.3. No Incremental Update Available . . . . . . . . . . . . . 13 77 5.4. Cache has No Data Available . . . . . . . . . . . . . . . 14 78 6. SSH Transport . . . . . . . . . . . . . . . . . . . . . . . . 14 79 7. Router-Cache Set-Up . . . . . . . . . . . . . . . . . . . . . 15 80 8. Deployment Scenarios . . . . . . . . . . . . . . . . . . . . . 16 81 9. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . 17 82 10. Security Considerations . . . . . . . . . . . . . . . . . . . 18 83 11. Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 84 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 85 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 20 86 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21 87 14.1. Normative References . . . . . . . . . . . . . . . . . . . 21 88 14.2. Informative References . . . . . . . . . . . . . . . . . . 21 89 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 21 91 1. Introduction 93 In order to formally validate the origin ASes of BGP announcements, 94 routers need a simple but reliable mechanism to receive RPKI 95 [I-D.ietf-sidr-arch] or analogous formally validated prefix origin 96 data from a trusted cache. This document describes a protocol to 97 deliver validated prefix origin data to routers over ssh. 99 Section 2 describes the deployment structure and Section 3 then 100 presents an operational overview. The binary payloads of the 101 protocol are formally described in Section 4, and the expected PDU 102 sequences are described in Section 5. The transport protocol is 103 described in Section 6. Section 7 details how routers and caches are 104 configured to connect and authenticate. Section 8 describes likely 105 deployment scenarios. The traditional security and IANA 106 considerations end the document. 108 The protocol is extensible to support new PDUs with new semantics 109 when and as needed, as indicated by deployment experience. PDUs are 110 versioned should deployment experience call for change. 112 2. Deployment Structure 114 Deployment of the RPKI to reach routers has a three level structure 115 as follows: 117 Global RPKI: The authoritative data of the RPKI are published in a 118 distributed set of servers, RPKI publication repositories, e.g. 119 the IANA, RIRs, NIRs, and ISPs, see [I-D.ietf-sidr-repos-struct]. 121 Local Caches: A local set of one or more collected and verified non- 122 authoritative caches. A relying party, e.g. router or other 123 client, MUST have a formally authenticated trust relationship 124 with, and a secure transport channel to, any non-authoritative 125 cache(s) it uses. 127 Routers: A router fetches data from a local cache using the protocol 128 described in this document. It is said to be a client of the 129 cache. There are mechanisms for the router to assure itself of 130 the authenticity of the cache and to authenticate itself to the 131 cache. 133 3. Operational Overview 135 A router establishes and keeps open an authenticated connection to 136 one or more caches with which it has client/server relationships. It 137 is configured with a semi-ordered list of caches, and establishes a 138 connection to the most preferred cache, or set of caches, which 139 accept the connections. 141 The router MUST choose the most preferred, by configuration, cache or 142 set of caches so that the operator may control load on their caches 143 and the Global RPKI. 145 Periodically, the router sends to the cache the serial number of the 146 highest numbered data record it has received from that cache, i.e. 147 the router's current serial number. When a router establishes a new 148 connection to a cache, or wishes to reset a current relationship, it 149 sends a Reset Query. 151 The Cache responds with all data records which have serial numbers 152 greater than that in the router's query. This may be the null set, 153 in which case the End of Data PDU is still sent. Note that 'greater' 154 must take wrap-around into account, see [RFC1982]. 156 When the router has received all data records from the cache, it sets 157 its current serial number to that of the serial number in the End of 158 Data PDU. 160 When the cache updates its database, it sends a Notify message to 161 every currently connected router. This is a hint that now would be a 162 good time for the router to poll for an update, but is only a hint. 163 The protocol requires the router to poll for updates periodically in 164 any case. 166 Strictly speaking, a router could track a cache simply by asking for 167 a complete data set every time it updates, but this would be very 168 inefficient. The serial number based incremental update mechanism 169 allows an efficient transfer of just the data records which have 170 changed since last update. As with any update protocol based on 171 incremental transfers, the router must be prepared to fall back to a 172 full transfer if for any reason the cache is unable to provide the 173 necessary incremental data. Unlike some incremental transfer 174 protocols, this protocol requires the router to make an explicit 175 request to start the fallback process; this is deliberate, as the 176 cache has no way of knowing whether the router has also established 177 sessions with other caches that may be able to provide better 178 service. 180 4. Protocol Data Units (PDUs) 182 The exchanges between the cache and the router are sequences of 183 exchanges of the following PDUs according to the rules described in 184 Section 5. 186 4.1. Serial Notify 188 The cache notifies the router that the cache has new data. 190 The Cache Nonce reassures the router that the serial numbers are 191 comensurate, i.e. the cache session has not been changed. 193 0 8 16 24 31 194 .-------------------------------------------. 195 | Protocol | PDU | | 196 | Version | Type | Cache Nonce | 197 | 0 | 0 | | 198 +-------------------------------------------+ 199 | | 200 | Length=12 | 201 | | 202 +-------------------------------------------+ 203 | | 204 | Serial Number | 205 | | 206 `-------------------------------------------' 208 4.2. Serial Query 210 Serial Query: The router sends Serial Query to ask the cache for all 211 payload PDUs which have serial numbers higher than the serial number 212 in the Serial Query. 214 The cache replies to this query with a Cache Response PDU 215 (Section 4.4) if the cache has a record of the changes since the 216 serial number specified by the router. If there have been no changes 217 since the router last queried, the cache responds with an End Of Data 218 PDU. If the cache does not have the data needed to update the 219 router, perhaps because its records do not go back to the Serial 220 Number in the Serial Query, then it responds with a Cache Reset PDU 221 (Section 4.8). 223 The Cache Nonce tells the cache what instance the router expects to 224 ensure that the serial numbers are comensurate, i.e. the cache 225 session has not been changed. 227 0 8 16 24 31 228 .-------------------------------------------. 229 | Protocol | PDU | | 230 | Version | Type | Cache Nonce | 231 | 0 | 1 | | 232 +-------------------------------------------+ 233 | | 234 | Length=12 | 235 | | 236 +-------------------------------------------+ 237 | | 238 | Serial Number | 239 | | 240 `-------------------------------------------' 242 4.3. Reset Query 244 Reset Query: The router tells the cache that it wants to receive the 245 total active, current, non-withdrawn, database. The cache responds 246 with a Cache Response PDU (Section 4.4). 248 0 8 16 24 31 249 .-------------------------------------------. 250 | Protocol | PDU | | 251 | Version | Type | reserved = zero | 252 | 0 | 2 | | 253 +-------------------------------------------+ 254 | | 255 | Length=8 | 256 | | 257 `-------------------------------------------' 259 4.4. Cache Response 261 Cache Response: The cache responds with zero or more payload PDUs. 262 When replying to a Serial Query request (Section 4.2), the cache 263 sends the set of all data records it has with serial numbers greater 264 than that sent by the client router. When replying to a Reset Query, 265 the cache sends the set of all data records it has; in this case the 266 withdraw/announce field in the payload PDUs MUST have the value 1 267 (announce). 269 In response to a Reset Query, the Cache Nonce tells the router the 270 instance of the cache session for future confirmation. In response 271 to a Serial Query, the Cache Nonce reassures the router that the 272 serial numbers are comensurate, i.e. the cache session has not been 273 changed. 275 0 8 16 24 31 276 .-------------------------------------------. 277 | Protocol | PDU | | 278 | Version | Type | Cache Nonce | 279 | 0 | 3 | | 280 +-------------------------------------------+ 281 | | 282 | Length=8 | 283 | | 284 `-------------------------------------------' 286 4.5. IPv4 Prefix 288 0 8 16 24 31 289 .-------------------------------------------. 290 | Protocol | PDU | | 291 | Version | Type | reserved = zero | 292 | 0 | 4 | | 293 +-------------------------------------------+ 294 | | 295 | Length=20 | 296 | | 297 +-------------------------------------------+ 298 | | Prefix | Max | | 299 | Flags | Length | Length | zero | 300 | | 0..32 | 0..32 | | 301 +-------------------------------------------+ 302 | | 303 | IPv4 Prefix | 304 | | 305 +-------------------------------------------+ 306 | | 307 | Autonomous System Number | 308 | | 309 `-------------------------------------------' 311 Due to the nature of the RPKI and the IRR, there can be multiple 312 identical IPvX PDUs. A router MUST be prepared to receive multiple 313 identical record announcements and MUST NOT consider a record to have 314 been deleted until it has received a corresponding number of 315 withdrawals or a reset is performed Hence the router will likely keep 316 an internal reference count on each IPvX PDU. 318 In the RPKI, nothing prevents a signing certificate from issuing two 319 identical ROAs, and nothing prohibits the existence of two identical 320 route: or route6: objects in the IRR. In this case there would be no 321 semantic difference between the objects, merely a process redundancy. 323 In the RPKI, there is also an actual need for what will appear to the 324 router as identical IPvX PDUs. This occurs when an upstream 325 certificate is being reissued or a site is changing providers, often 326 a 'make and break' situation. The ROA is identical in the router 327 sense, i.e. has the same {prefix, len, max-len, asn}, but has a 328 different validation path in the RPKI. This is important to the 329 RPKI, but not to the router. 331 The lowest order bit of the Flags field is 1 for an announcement and 332 0 for a withdrawal. 334 4.6. IPv6 Prefix 336 0 8 16 24 31 337 .-------------------------------------------. 338 | Protocol | PDU | | 339 | Version | Type | reserved = zero | 340 | 0 | 6 | | 341 +-------------------------------------------+ 342 | | 343 | Length=32 | 344 | | 345 +-------------------------------------------+ 346 | | Prefix | Max | | 347 | Flags | Length | Length | zero | 348 | | 0..32 | 0..128 | | 349 +-------------------------------------------+ 350 | | 351 +--- ---+ 352 | | 353 +--- IPv6 Prefix ---+ 354 | | 355 +--- ---+ 356 | | 357 +-------------------------------------------+ 358 | | 359 | Autonomous System Number | 360 | | 361 `-------------------------------------------' 363 4.7. End of Data 365 End of Data: Cache tells router it has no more data for the request. 367 The Cache Nonce MUST be the same as that of the corresponding Cache 368 Response which began the, possibly null, sequence of data PDUs. 370 0 8 16 24 31 371 .-------------------------------------------. 372 | Protocol | PDU | | 373 | Version | Type | Cache Nonce | 374 | 0 | 7 | | 375 +-------------------------------------------+ 376 | | 377 | Length=12 | 378 | | 379 +-------------------------------------------+ 380 | | 381 | Serial Number | 382 | | 383 `-------------------------------------------' 385 4.8. Cache Reset 387 The cache may respond to a Serial Query informing the router that the 388 cache cannot provide an incremental update starting from the serial 389 number specified by the router. The router must decide whether to 390 issue a Reset Query or switch to a different cache. 392 0 8 16 24 31 393 .-------------------------------------------. 394 | Protocol | PDU | | 395 | Version | Type | reserved = zero | 396 | 0 | 8 | | 397 +-------------------------------------------+ 398 | | 399 | Length=8 | 400 | | 401 `-------------------------------------------' 403 4.9. Error Report 405 This PDU is used by either party to report an error to the other. 407 The Error Number is described in Section 9. 409 If the error is not associated with any particular PDU, the Erroneous 410 PDU field MUST be empty and the Length of Encapsulated PDU field MUST 411 be zero. 413 If the error is associated with a PDU of excessive, or possibly 414 corrupt, length, the Erroneous PDU field MAY be truncated. 416 The diagnostic text is optional, if not present the Length of Error 417 Text field SHOULD be zero. If error text is present, it SHOULD be a 418 string in US-ASCII, for maximum portability; if non-US-ASCII 419 characters are absolutely required, the error text MUST use UTF-8 420 encoding. 422 0 8 16 24 31 423 .-------------------------------------------. 424 | Protocol | PDU | | 425 | Version | Type | Error Number | 426 | 0 | 10 | | 427 +-------------------------------------------+ 428 | | 429 | Length | 430 | | 431 +-------------------------------------------+ 432 | | 433 | Length of Encapsulated PDU | 434 | | 435 +-------------------------------------------+ 436 | | 437 ~ Copy of Erroneous PDU ~ 438 | | 439 +-------------------------------------------+ 440 | | 441 | Length of Error Text | 442 | | 443 +-------------------------------------------+ 444 | | 445 | Arbitrary Text | 446 | of | 447 ~ Error Diagnostic Message ~ 448 | | 449 `-------------------------------------------' 451 4.10. Fields of a PDU 453 PDUs contain the following data elements: 455 Protocol Version: An ordinal, currently 0, denoting the version of 456 this protocol. 458 Serial Number: The serial number of the RPKI Cache when this ROA was 459 received from the cache's up-stream cache server or gathered from 460 the global RPKI. A cache increments its serial number when 461 completing an rigorously validated update from a parent cache, for 462 example via rcynic. See [RFC1982] on DNS Serial Number Arithmetic 463 for too much detail on serial number arithmetic. 465 Cache Nonce: When a cache server is started, it generates a nonce to 466 identify the instance of the cache and to bind it to the sequence 467 of Serial Numbers that cache instance will generate. This allows 468 the router to restart a failed session knowing that the Serial 469 Number it is using is comensurate with that of the cache. If, at 470 any time, either the router or the cache finds the value of the 471 nonces they hold disagree, they MUST completely drop the session 472 and the router MUST flush all data learned from that cache. 474 The nonce might be a pseudo-random, a monotonically increasing 475 value if the cache has reliable storage, etc. An implementation 476 which uses a fine granularity of time for the Serial Number might 477 never change the Cache Nonce. 479 Length: A 32 bit ordinal which has as its value the count of the 480 bytes in the entire PDU, including the eight bytes of header which 481 end with the length field. 483 Flags: The lowest order bit of the Flags field is 1 for an 484 announcement and 0 for a withdrawal, whether this PDU announces a 485 new right to announce the prefix or withdraws a previously 486 announced right. A withdraw effectively deletes one previously 487 announced IPvX Prefix PDU with the exact same Prefix, Length, Max- 488 Len, and ASN. 490 Prefix Length: An ordinal denoting the shortest prefix allowed for 491 the prefix. 493 Max Length: An ordinal denoting the longest prefix allowed by the 494 prefix. This MUST NOT be less than the Prefix Length element. 496 Prefix: The IPv4 or IPv6 prefix of the ROA. 498 Autonomous System Number: ASN allowed to announce this prefix, a 32 499 bit ordinal. 501 Zero: Fields shown as zero or reserved MUST be zero. The value of 502 such a field MUST be ignored on receipt. 504 5. Protocol Sequences 506 The sequences of PDU transmissions fall into three conversations as 507 follows: 509 5.1. Start or Restart 511 Cache Router 512 ~ ~ 513 | <----- Reset Query -------- | R requests data (or Serial Query) 514 | | 515 | ----- Cache Response -----> | C confirms request 516 | ------- IPvX Prefix ------> | C sends zero or more 517 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 518 | ------- IPvX Prefix ------> | Payload PDUs 519 | ------ End of Data ------> | C sends End of Data 520 | | and sends new serial 521 ~ ~ 523 When a transport session is first established, the router MAY send a 524 Reset Query and the cache responds with a data sequence of all data 525 it contains. 527 Alternatively, if the router has significant unexpired data from a 528 broken session with the same cache, it MAY start with a Serial Query 529 containing the Cache Nonce from the previous session to ensure the 530 serial numbers are comensurate. 532 This Reset Query sequence is also used when the router receives a 533 Cache Reset, chooses a new cache, or fears that it has otherwise lost 534 its way. 536 To limit the length of time a cache must keep the data necessary to 537 generate incremental updates, a router MUST send either a Serial 538 Query or a Reset Query no less frequently than once an hour. This 539 also acts as a keep alive at the application layer. 541 As the cache MAY not keep updates for more than one hour, the router 542 MUST have a polling interval of no greater than half an hour 544 5.2. Typical Exchange 546 Cache Router 547 ~ ~ 548 | -------- Notify ----------> | (optional) 549 | | 550 | <----- Serial Query ------- | R requests data 551 | | 552 | ----- Cache Response -----> | C confirms request 553 | ------- IPvX Prefix ------> | C sends zero or more 554 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 555 | ------- IPvX Prefix ------> | Payload PDUs 556 | ------ End of Data ------> | C sends End of Data 557 | | and sends new serial 558 ~ ~ 560 The cache server SHOULD send a notify PDU with its current serial 561 number when the cache's serial changes, with the expectation that the 562 router MAY then issue a serial query earlier than it otherwise might. 563 This is analogous to DNS NOTIFY in [RFC1996]. The cache SHOULD rate 564 limit Serial Notifies to no more frequently than one per minute. 566 When the transport layer is up and either a timer has gone off in the 567 router, or the cache has sent a Notify, the router queries for new 568 data by sending a Serial Query, and the cache sends all data newer 569 than the serial in the Serial Query. 571 To limit the length of time a cache must keep old withdraws, a router 572 MUST send either a Serial Query or a Reset Query no less frequently 573 than once an hour. 575 5.3. No Incremental Update Available 577 Cache Router 578 ~ ~ 579 | <----- Serial Query ------ | R requests data 580 | ------- Cache Reset ------> | C cannot supply update 581 | | from specified serial 582 | <------ Reset Query ------- | R requests new data 583 | ----- Cache Response -----> | C confirms request 584 | ------- IPvX Prefix ------> | C sends zero or more 585 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 586 | ------- IPvX Prefix ------> | Payload PDUs 587 | ------ End of Data ------> | C sends End of Data 588 | | and sends new serial 589 ~ ~ 591 The cache may respond to a Serial Query with a Cache Reset, informing 592 the router that the cache cannot supply an incremental update from 593 the serial number specified by the router. This might be because the 594 cache has lost state, or because the router has waited too long 595 between polls and the cache has cleaned up old data that it no longer 596 believes it needs, or because the cache has run out of storage space 597 and had to expire some old data early. Regardless of how this state 598 arose, the cache replies with a Cache Reset to tell the router that 599 it cannot honor the request. When a router receives this, the router 600 SHOULD attempt to connect to any more preferred caches in its cache 601 list. If there are no more preferred caches it MUST issue a Reset 602 Query and get an entire new load from the cache. 604 5.4. Cache has No Data Available 606 Cache Router 607 ~ ~ 608 | <----- Serial Query ------ | R requests data 609 | ---- Error Report PDU ----> | C cannot supply update 610 ~ ~ 612 Cache Router 613 ~ ~ 614 | <----- Reset Query ------- | R requests data 615 | ---- Error Report PDU ----> | C cannot supply update 616 ~ ~ 618 The cache may respond to either a Serial Query or a Reset Query 619 informing the router that the cache cannot supply any update at all. 620 The most likely cause is that the cache has lost state, perhaps due 621 to a restart, and has not yet recovered. While it is possible that a 622 cache might go into such a state without dropping any of its active 623 sessions, a router is more likely to see this behavior when it 624 initially connects and issues a Reset Query while the cache is still 625 rebuilding its database. 627 When a router receives this kind of error, the router SHOULD attempt 628 to connect to any other caches in its cache list, in preference 629 order. If no other caches are available, the router MUST issue 630 periodic Reset Queries until it gets a new usable load from the 631 cache. 633 6. SSH Transport 635 The transport layer session between a router and a cache carries the 636 binary Protocol Data Units (PDUs) in a persistent SSH session. 638 To run over SSH, the client router first establishes an SSH transport 639 connection using the SSH transport protocol, and the client and 640 server exchange keys for message integrity and encryption. The 641 client then invokes the "ssh-userauth" service to authenticate the 642 application, as described in the SSH authentication protocol RFC 4252 643 [RFC4252]. Once the application has been successfully authenticated, 644 the client invokes the "ssh-connection" service, also known as the 645 SSH connection protocol. 647 After the ssh-connection service is established, the client opens a 648 channel of type "session", which results in an SSH session. 650 Once the SSH session has been established, the application invokes 651 the application transport as an SSH subsystem called "rpki-rtr". 652 Subsystem support is a feature of SSH version 2 (SSHv2) and is not 653 included in SSHv1. Running this protocol as an SSH subsystem avoids 654 the need for the application to recognize shell prompts or skip over 655 extraneous information, such as a system message that is sent at 656 shell start-up. 658 It is assumed that the router and cache have exchanged keys out of 659 band by some reasonably secured means. 661 7. Router-Cache Set-Up 663 A cache has the public authentication data for each router it is 664 configured to support. 666 A router may be configured to peer with a selection of caches, and a 667 cache may be configured to support a selection of routers. Each must 668 have the name of, and authentication data for, each peer. In 669 addition, in a router, this list has a non-unique preference value 670 for each server in order of preference. This preference merely 671 denotes proximity, not trust, preferred belief, etc. The client 672 router attempts to establish a session with each potential serving 673 cache in preference order, and then starts to load data from the most 674 preferred cache to which it can connect and authenticate. The 675 router's list of caches has the following elements: 677 Preference: An ordinal denoting the router's preference to connect 678 to that cache, the lower the value the more preferred. 680 Name: The IP Address or fully qualified domain name of the cache. 682 Key: The public ssh key of the cache. 684 MyKey: The private ssh key of this client. 686 Due to the distributed nature of the RPKI, caches simply can not be 687 rigorously synchronous. A client may hold data from multiple caches, 688 but MUST keep the data marked as to source, as later updates MUST 689 affect the correct data. 691 Just as there may be more than one covering ROA from a single cache, 692 there may be multiple covering ROAs from multiple caches. The 693 results are as described in [I-D.ietf-sidr-pfx-validate]. 695 If data from multiple caches are held, implementations MUST NOT 696 distinguish between data sources when performing validation. 698 When a more preferred cache becomes available, if resources allow, it 699 would be prudent for the client to start fetching from that cache. 701 The client SHOULD attempt to maintain at least one set of data, 702 regardless of whether it has chosen a different cache or established 703 a new connection to the previous cache. 705 A client MAY drop the data from a particular cache when it is fully 706 in synch with one or more other caches. 708 A client SHOULD delete the data from a cache when it has been unable 709 to refresh from that cache for a configurable timer value. The 710 default for that value is twice the polling period for that cache. 712 If a client loses connectivity to a cache it is using, or otherwise 713 decides to switch to a new cache, it SHOULD retain the data from the 714 previous cache until it has a full set of data from one or more other 715 caches. Note that this may already be true at the point of 716 connection loss if the client has connections to more than one cache. 718 8. Deployment Scenarios 720 For illustration, we present three likely deployment scenarios. 722 Small End Site: The small multi-homed end site may wish to outsource 723 the RPKI cache to one or more of their upstream ISPs. They would 724 exchange authentication material with the ISP using some out of 725 band mechanism, and their router(s) would connect to one or more 726 up-streams' caches. The ISPs would likely deploy caches intended 727 for customer use separately from the caches with which their own 728 BGP speakers peer. 730 Large End Site: A larger multi-homed end site might run one or more 731 caches, arranging them in a hierarchy of client caches, each 732 fetching from a serving cache which is closer to the global RPKI. 733 They might configure fall-back peerings to up-stream ISP caches. 735 ISP Backbone: A large ISP would likely have one or more redundant 736 caches in each major PoP, and these caches would fetch from each 737 other in an ISP-dependent topology so as not to place undue load 738 on the global RPKI publication infrastructure. 740 Experience with large DNS cache deployments has shown that complex 741 topologies are ill-advised as it is easy to make errors in the graph, 742 e.g. not maintaining a loop-free condition. 744 Of course, these are illustrations and there are other possible 745 deployment strategies. It is expected that minimizing load on the 746 global RPKI servers will be a major consideration. 748 To keep load on global RPKI services from unnecessary peaks, it is 749 recommended that primary caches which load from the distributed 750 global RPKI not do so all at the same times, e.g. on the hour. 751 Choose a random time, perhaps the ISP's AS number modulo 60 and 752 jitter the inter-fetch timing. 754 9. Error Codes 756 This section contains a preliminary list of error codes. The authors 757 expect additions to this section during development of the initial 758 implementations. Errors which are considered fatal SHOULD cause the 759 session to be dropped. 761 0: Corrupt Data (fatal): The receiver believes the received PDU to 762 be corrupt in a manner not specified by other error codes. 764 1: Internal Error (fatal): The party reporting the error experienced 765 some kind of internal error unrelated to protocol operation (ran 766 out of memory, a coding assertion failed, et cetera). 768 2: No Data Available: The cache believes itself to be in good 769 working order, but is unable to answer either a Serial Query or a 770 Reset Query because it has no useful data available at this time. 771 This is likely to be a temporary error, and most likely indicates 772 that the cache has not yet completed pulling down an initial 773 current data set from the global RPKI system after some kind of 774 event that invalidated whatever data it might have previously held 775 (reboot, network partition, etcetera). 777 3: Invalid Request (fatal): The cache server believes the client's 778 request to be invalid. 780 4: Unsupported Protocol Version (fatal): The Protocol Version is not 781 known by the receiver of the PDU. 783 5: Unsupported PDU Type (fatal): The PDU Type is not known by the 784 receiver of the PDU. 786 6: Withdrawal of Unknown Record (fatal): The received PDU has Flag=0 787 but a record for the Prefix/PrefixLength/MaxLength triple does not 788 exist in the receiver's database. 790 10. Security Considerations 792 As this document describes a security protocol, many aspects of 793 security interest are described in the relevant sections. This 794 section points out issues which may not be obvious in other sections. 796 Cache Validation: In order for a collection of caches as described 797 in Section 8 to guarantee a consistent view, they need to be given 798 consistent trust anchors to use in their internal validation 799 process. Distribution of a consistent trust anchor is assumed to 800 be out of band. 802 Cache Peer Identification: The router initiates an ssh transport 803 session to a cache, which it identifies by either IP address or 804 fully qualified domain name. Be aware that a DNS or address 805 spoofing attack could make the correct cache unreachable. No 806 session would be established, as the authorization keys would not 807 match. 809 Transport Security: The RPKI relies on object, not server or 810 transport, trust. I.e. the IANA root trust anchor is distributed 811 to all caches through some out of band means, and can then be used 812 by each cache to validate certificates and ROAs all the way down 813 the tree. The inter-cache relationships are based on this object 814 security model, hence the inter-cache transport can be lightly 815 protected. 817 But this protocol document assumes that the routers can not do the 818 validation cryptography. Hence the last link, from cache to 819 router, is secured by server authentication and transport level 820 security. This is dangerous, as server authentication and 821 transport have very different threat models than object security. 823 So the strength of the trust relationship and the transport 824 between the router(s) and the cache(s) are critical. You're 825 betting your routing on this. 827 While we can not say the cache must be on the same LAN, if only 828 due to the issue of an enterprise wanting to off-load the cache 829 task to their upstream ISP(s), locality, trust, and control are 830 very critical issues here. The cache(s) really SHOULD be as 831 close, in the sense of controlled and protected (against DDoS, 832 MITM) transport, to the router(s) as possible. It also SHOULD be 833 topologically close so that a minimum of validated routing data 834 are needed to bootstrap a router's access to a cache. 836 The ssh identity of the cache server MUST be verified and 837 authenticated by the router client, and vice versa, before any 838 data are exchanged. 840 11. Glossary 842 The following terms are used with special meaning: 844 Global RPKI: The authoritative data of the RPKI are published in a 845 distributed set of servers at the IANA, RIRs, NIRs, and ISPs, see 846 [I-D.ietf-sidr-repos-struct]. 848 Non-authorative Cache: A coalesced copy of the RPKI which is 849 periodically fetched/refreshed directly or indirectly from the 850 global RPKI using the [RFC5781] protocol/tools 852 Cache: Relying party update sofcware such as rcynic is used to 853 gather and validate the distributed data of the RPKI into a cache. 854 Trusting this cache further is a matter between the provider of 855 the cache and a relying party. 857 Serial Number: A 32-bit monotonically increasing ordinal which wraps 858 from 2^32-1 to 0. It denotes the logical version of a cache. A 859 cache increments the value by one when it successfully updates its 860 data from a parent cache or from primary RPKI data. As a cache is 861 receiving, new incoming data, and implicit deletes, are marked 862 with the new serial but MUST NOT be sent until the fetch is 863 complete. A serial number is not commensurate between caches, nor 864 need it be maintained across resets of the cache server. See 865 [RFC1982] on DNS Serial Number Arithmetic for too much detail on 866 serial number arithmetic. 868 12. IANA Considerations 870 This document requests the IANA to create a registry for PDU types. 871 The name of the registry should be rpki-rtr-pdu. The policy for 872 adding to the registry is RFC Required per [RFC5226]. The intitial 873 entries should be as follows: 875 0 - Serial Notify 876 1 - Serial Query 877 2 - Reset Query 878 3 - Cache Response 879 4 - IPv4 Prefix 880 6 - IPv6 Prefix 881 7 - End of Data 882 8 - Cache Reset 883 10 - Error Report 885 This document requests the IANA to create a registry for Error Codes. 886 The name of the registry should be rpki-rtr-error. The policy for 887 adding to the registry is Expert Review per [RFC5226], where the 888 responsible IESG area director should appoint the Expert Reviewer. 889 The initial entries should be as follows: 891 0 - Corrupt Data 892 1 - Internal Error 893 2 - No Data Available 894 3 - Invalid Request 895 4 - Unsupported Protocol Version 896 5 - Unsupported PDU Type 897 6 - Withdrawal of Unknown Record 899 This document requests the IANA to add an SSH Subsystem Name, as 900 defined in [RFC4250], of 'rpki-rtr'. 902 Note to RFC Editor: this section may be replaced on publication as an 903 RFC. 905 13. Acknowledgments 907 The authors wish to thank Steve Bellovin, Rex Fernando, Russ Housley, 908 Pradosh Mohapatra, Keyur Patel, Sandy Murphy, Robert Raszuk, John 909 Scudder, Ruediger Volk, and David Ward. Particular thanks go to 910 Hannes Gredler for showing us the dangers of unnecessary fields. 912 14. References 913 14.1. Normative References 915 [I-D.ietf-sidr-pfx-validate] 916 Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 917 Austein, "BGP Prefix Origin Validation", 918 draft-ietf-sidr-pfx-validate-01 (work in progress), 919 February 2011. 921 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 922 August 1996. 924 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 925 Requirement Levels", BCP 14, RFC 2119, March 1997. 927 [RFC4250] Lehtinen, S. and C. Lonvick, "The Secure Shell (SSH) 928 Protocol Assigned Numbers", RFC 4250, January 2006. 930 [RFC4252] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH) 931 Authentication Protocol", RFC 4252, January 2006. 933 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 934 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 935 May 2008. 937 14.2. Informative References 939 [I-D.ietf-sidr-arch] 940 Lepinski, M. and S. Kent, "An Infrastructure to Support 941 Secure Internet Routing", draft-ietf-sidr-arch-12 (work in 942 progress), February 2011. 944 [I-D.ietf-sidr-repos-struct] 945 Huston, G., Loomans, R., and G. Michaelson, "A Profile for 946 Resource Certificate Repository Structure", 947 draft-ietf-sidr-repos-struct-07 (work in progress), 948 February 2011. 950 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 951 Changes (DNS NOTIFY)", RFC 1996, August 1996. 953 [RFC5781] Weiler, S., Ward, D., and R. Housley, "The rsync URI 954 Scheme", RFC 5781, February 2010. 956 Authors' Addresses 958 Randy Bush 959 Internet Initiative Japan, Inc. 960 5147 Crystal Springs 961 Bainbridge Island, Washington 98110 962 US 964 Phone: +1 206 780 0431 x1 965 Email: randy@psg.com 967 Rob Austein 968 Internet Systems Consortium 969 950 Charter Street 970 Redwood City, CA 94063 971 USA 973 Email: sra@isc.org