idnits 2.17.1 draft-ietf-sidr-rpki-rtr-00.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 == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Serial Number: A 32-bit monotonically increasing ordinal which wraps from 2^32-1 to 0. It denotes the logical version of a cache. A cache increments the value by one when it successfully updates its data from a parent cache or from primary RPKI data. As a cache is rcynicing, new incoming data, and implicit deletes, are marked with the new serial but MUST not be sent until the fetch is complete. A serial number is not commensurate between caches, nor need it be maintained across resets of the cache server. See [RFC1982] on DNS Serial Number Arithmetic for too much detail on serial number arithmetic. -- The document date (August 11, 2010) is 5000 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) ** Downref: Normative reference to an Informational RFC: RFC 5781 == Outdated reference: A later version (-13) exists of draft-ietf-sidr-arch-09 == Outdated reference: A later version (-09) exists of draft-ietf-sidr-repos-struct-04 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: February 12, 2011 ISC 6 August 11, 2010 8 The RPKI/Router Protocol 9 draft-ietf-sidr-rpki-rtr-00 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 February 12, 2011. 42 Copyright Notice 44 Copyright (c) 2010 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 . . . . . . . . . . . . . . . . . . . . . . . 8 70 4.8. Cache Reset . . . . . . . . . . . . . . . . . . . . . . . 9 71 4.9. Color Map . . . . . . . . . . . . . . . . . . . . . . . . 9 72 4.10. Error Report . . . . . . . . . . . . . . . . . . . . . . . 10 73 4.11. Fields of a PDU . . . . . . . . . . . . . . . . . . . . . 11 74 5. Protocol Sequences . . . . . . . . . . . . . . . . . . . . . . 11 75 5.1. Start or Restart . . . . . . . . . . . . . . . . . . . . . 12 76 5.2. Typical Exchange . . . . . . . . . . . . . . . . . . . . . 12 77 5.3. No Incremental Update Available . . . . . . . . . . . . . 13 78 5.4. Cache has No Data Available . . . . . . . . . . . . . . . 14 79 6. SSH Transport . . . . . . . . . . . . . . . . . . . . . . . . 14 80 7. Router-Cache Set-Up . . . . . . . . . . . . . . . . . . . . . 15 81 8. Deployment Scenarios . . . . . . . . . . . . . . . . . . . . . 16 82 9. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . 16 83 10. Security Considerations . . . . . . . . . . . . . . . . . . . 17 84 11. Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 85 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 86 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 19 87 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19 88 14.1. Normative References . . . . . . . . . . . . . . . . . . . 19 89 14.2. Informative References . . . . . . . . . . . . . . . . . . 19 90 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 20 92 1. Introduction 94 In order to formally validate the origin ASes of BGP announcements, 95 routers need a simple but reliable mechanism to receive RPKI 96 [I-D.ietf-sidr-arch] or analogous formally validated prefix origin 97 data from a trusted cache. This document describes a protocol to 98 deliver validated prefix origin data to routers over ssh. 100 Section 2 describes the deployment structure and Section 3 then 101 presents an operational overview. The binary payloads of the 102 protocol are formally described in Section 4, and the expected PDU 103 sequences are described in Section 5. The transport protocol is 104 described in Section 6. Section 7 details how routers and caches are 105 configured to connect and authenticate. Section 8 describes likely 106 deployment scenarios. The traditional security and IANA 107 considerations end the document. 109 2. Deployment Structure 111 Deployment of the RPKI to reach routers has a three level structure 112 as follows: 114 Global RPKI: The authoritative data of the RPKI are published in a 115 distributed set of servers, RPKI publication repositories, e.g. 116 the IANA, RIRs, NIRs, and ISPs, see [I-D.ietf-sidr-repos-struct]. 118 Local Caches: A local set of one or more collected and verified non- 119 authoritative caches. A relying party, e.g. router or other 120 client, MUST have a formally authenticated trust relationship 121 with, and a secure transport channel to, any non-authoritative 122 cache(s) it uses. 124 Routers: A router fetches data from a local cache using the protocol 125 described in this document. It is said to be a client of the 126 cache. There are mechanisms for the router to assure itself of 127 the authenticity of the cache and to authenticate itself to the 128 cache. 130 3. Operational Overview 132 A router establishes and keeps open an authenticated connection to a 133 cache with which it has a client/server relationship. It is 134 configured with a semi-ordered list of caches, and establishes a 135 connection to the highest preference cache that accepts one. 137 Periodically, the router sends to the cache the serial number of the 138 highest numbered data record it has received from that cache, i.e. 139 the router's current serial number. When a router establishes a new 140 connection to a cache, or wishes to reset a current relationship, it 141 sends a Reset Query. 143 The Cache responds with all data records which have serial numbers 144 greater than that in the router's query. This may be the null set, 145 in which case the End of Data PDU is still sent. Note that 'greater' 146 must take wrap-around into account, see [RFC1982]. 148 When the router has received all data records from the cache, it sets 149 its current serial number to that of the serial number in the End of 150 Data PDU. 152 When the cache updates its database, it sends a Notify message to 153 every currently connected router. This is a hint that now would be a 154 good time for the router to poll for an update, but is only a hint. 155 The protocol requires the router to poll for updates periodically in 156 any case. 158 Strictly speaking, a router could track a cache simply by asking for 159 a complete data set every time it updates, but this would be very 160 inefficient. The serial number based incremental update mechanism 161 allows an efficient transfer of just the data records which have 162 changed since last update. As with any update protocol based on 163 incremental transfers, the router must be prepared to fall back to a 164 full transfer if for any reason the cache is unable to provide the 165 necessary incremental data. Unlike some incremental transfer 166 protocols, this protocol requires the router to make an explicit 167 request to start the fallback process; this is deliberate, as the 168 cache has no way of knowing whether the router has also established 169 sessions with other caches that may be able to provide better 170 service. 172 4. Protocol Data Units (PDUs) 174 The exchanges between the cache and the router are sequences of 175 exchanges of the following PDUs according to the rules described in 176 Section 5. 178 4.1. Serial Notify 180 The cache notifies the router that the cache has new data. 182 0 8 16 24 31 183 .-------------------------------------------. 184 | Protocol | PDU | | 185 | Version | Type | reserved = zero | 186 | 0 | 0 | | 187 +-------------------------------------------+ 188 | | 189 | Length=12 | 190 | | 191 +-------------------------------------------+ 192 | | 193 | Serial Number | 194 | | 195 `-------------------------------------------' 197 4.2. Serial Query 199 Serial Query: The router sends Serial Query to ask the cache for all 200 payload PDUs which have serial numbers higher than the serial number 201 in the Serial Query. 203 The cache replies to this query with a Cache Response PDU 204 (Section 4.4) if the cache has a record of the changes since the 205 serial number specified by the router. If there have been no changes 206 since the router last queried, the cache responds with an End Of Data 207 PDU. If the cache does not have the data needed to update the 208 router, perhaps because its records do not go back to the Serial 209 Number in the Serial Query, then it responds with a Cache Reset PDU 210 (Section 4.8). 212 0 8 16 24 31 213 .-------------------------------------------. 214 | Protocol | PDU | | 215 | Version | Type | reserved = zero | 216 | 0 | 1 | | 217 +-------------------------------------------+ 218 | | 219 | Length=12 | 220 | | 221 +-------------------------------------------+ 222 | | 223 | Serial Number | 224 | | 225 `-------------------------------------------' 227 4.3. Reset Query 229 Reset Query: The router tells the cache that it wants to receive the 230 total active, current, non-withdrawn, database. The cache responds 231 with a Cache Response PDU (Section 4.4). 233 0 8 16 24 31 234 .-------------------------------------------. 235 | Protocol | PDU | | 236 | Version | Type | reserved = zero | 237 | 0 | 2 | | 238 +-------------------------------------------+ 239 | | 240 | Length=8 | 241 | | 242 `-------------------------------------------' 244 4.4. Cache Response 246 Cache Response: The cache responds with zero or more payload PDUs. 247 When replying to a Serial Query request (Section 4.2), the cache 248 sends the set of all data records it has with serial numbers greater 249 than that sent by the client router. When replying to a Reset Query, 250 the cache sends the set of all data records it has; in this case the 251 withdraw/announce field in the payload PDUs MUST have the value 1 252 (announce). 254 0 8 16 24 31 255 .-------------------------------------------. 256 | Protocol | PDU | | 257 | Version | Type | reserved = zero | 258 | 0 | 3 | | 259 +-------------------------------------------+ 260 | | 261 | Length=8 | 262 | | 263 `-------------------------------------------' 265 4.5. IPv4 Prefix 267 0 8 16 24 31 268 .-------------------------------------------. 269 | Protocol | PDU | | 270 | Version | Type | Color | 271 | 0 | 4 | | 272 +-------------------------------------------+ 273 | | 274 | Length=20 | 275 | | 276 +-------------------------------------------+ 277 | | Prefix | Max | Data | 278 | Flags | Length | Length | Source | 279 | | 0..32 | 0..32 | RPKI/IRR | 280 +-------------------------------------------+ 281 | | 282 | IPv4 prefix | 283 | | 284 +-------------------------------------------+ 285 | | 286 | Autonomous System Number | 287 | | 288 `-------------------------------------------' 290 Due to the nature of the RPKI and the IRR, there can be multiple 291 identical IPvX PDUs. A router MUST be prepared to receive multiple 292 identical record announcements and MUST NOT consider a record to have 293 been deleted until it has received a corresponding number of 294 withdrawals or a reset is performed Hence the router will likely keep 295 an internal reference count on each IPvX PDU. 297 In the RPKI, nothing prevents a signing certificate from issuing two 298 identical ROAs, and nothing prohibits the existence of two identical 299 route: or route6: objects in the IRR. In this case there would be no 300 semantic difference between the objects, merely a process redundancy. 302 In the RPKI, there is also an actual need for what will appear to the 303 router as identical IPvX PDUs. This occurs when an upstream 304 certificate is being reissued or a site is changing providers, often 305 a 'make and break' situation. The ROA is identical in the router 306 sense, i.e. has the same {prefix, len, max-len, asn}, but has a 307 different validation path in the RPKI. This is important to the 308 RPKI, but not to the router. 310 The lowest order bit of the Flags field is 1 for an announcement and 311 0 for a withdrawal. 313 4.6. IPv6 Prefix 315 0 8 16 24 31 316 .-------------------------------------------. 317 | Protocol | PDU | | 318 | Version | Type | Color | 319 | 0 | 6 | | 320 +-------------------------------------------+ 321 | | 322 | Length=32 | 323 | | 324 +-------------------------------------------+ 325 | | Prefix | Max | Data | 326 | Flags | Length | Length | Source | 327 | | 0..128 | 0..128 | RPKI/IRR | 328 +-------------------------------------------+ 329 | | 330 +--- ---+ 331 | | 332 +--- IPv6 prefix ---+ 333 | | 334 +--- ---+ 335 | | 336 +-------------------------------------------+ 337 | | 338 | Autonomous System Number | 339 | | 340 `-------------------------------------------' 342 4.7. End of Data 344 End of Data: Cache tells router it has no more data for the request. 346 0 8 16 24 31 347 .-------------------------------------------. 348 | Protocol | PDU | | 349 | Version | Type | reserved = zero | 350 | 0 | 7 | | 351 +-------------------------------------------+ 352 | | 353 | Length=12 | 354 | | 355 +-------------------------------------------+ 356 | | 357 | Serial Number | 358 | | 359 `-------------------------------------------' 361 4.8. Cache Reset 363 The cache may respond to a Serial Query informing the router that the 364 cache cannot provide an incremental update starting from the serial 365 number specified by the router. The router must decide whether to 366 issue a Reset Query or switch to a different cache. 368 0 8 16 24 31 369 .-------------------------------------------. 370 | Protocol | PDU | | 371 | Version | Type | reserved = zero | 372 | 0 | 8 | | 373 +-------------------------------------------+ 374 | | 375 | Length=8 | 376 | | 377 `-------------------------------------------' 379 4.9. Color Map 381 0 8 16 24 31 382 .-------------------------------------------. 383 | Protocol | PDU | | 384 | Version | Type | Color | 385 | 0 | 9 | | 386 +-------------------------------------------+ 387 | | 388 | Length | 389 | | 390 +-------------------------------------------+ 391 | | 392 ~ Arbitrary Data ~ 393 | | 394 `-------------------------------------------' 396 This PDU allows the cache to send mappings of Color values to the 397 router. The value of Color is a many to one mapping of the value of 398 the Arbitrary Data. 400 The Length field is the total length of the PDU, including the first 401 eight bytes. 403 Color Map PDUs may be sent between a Cache Response PDU and the 404 correspondng End of Data PDU, intermixed among the IPv4 and IPv6 405 PDUs. 407 Router implementations are free to ignore this PDU if they have no 408 need of a mapping on Colors. 410 4.10. Error Report 412 This PDU is used by either party to report an error to the other. 414 The Error Number is described in Section 9. 416 If the error is not associated with any particular PDU, the Erroneous 417 PDU field should be empty and the Length of Encapsulated PDU field 418 should be zero. 420 The diagnostic text is optional, if not present the Length of Error 421 Text field should be zero. If error text is present, it SHOULD be a 422 string in US-ASCII, for maximum portability; if non-US-ASCII 423 characters are absolutely required, the error text MUST use UTF-8 424 encoding. 426 0 8 16 24 31 427 .-------------------------------------------. 428 | Protocol | PDU | | 429 | Version | Type | Error Number | 430 | 0 | 10 | | 431 +-------------------------------------------+ 432 | | 433 | Length | 434 | | 435 +-------------------------------------------+ 436 | | 437 | Length of Encapsulated PDU | 438 | | 439 +-------------------------------------------+ 440 | | 441 ~ Copy of Erroneous PDU ~ 442 | | 443 +-------------------------------------------+ 444 | | 445 | Length of Error Text | 446 | | 447 +-------------------------------------------+ 448 | | 449 | Arbitrary Text | 450 | of | 451 ~ Error Diagnostic Message ~ 452 | | 453 `-------------------------------------------' 455 4.11. Fields of a PDU 457 PDUs contain the following data elements: 459 Protocol Version: An ordinal, currently 0, denoting the version of 460 this protocol. 462 Serial Number: The serial number of the RPKI Cache when this ROA was 463 received from the cache's up-stream cache server or gathered from 464 the global RPKI. A cache increments its serial number when 465 completing an rcynic from a parent cache. See [RFC1982] on DNS 466 Serial Number Arithmetic for too much detail on serial number 467 arithmetic. 469 Length: A 32 bit ordinal which has as its value the count of the 470 bytes in the entire PDU, including the eight bytes of header which 471 end with the length field. 473 Color: An arbitrary 16 bit field that might be used in some way. 475 Flags: The lowest order bit of the Flags field is 1 for an 476 announcement and 0 for a withdrawal, whether this PDU announces a 477 new right to announce the prefix or withdraws a previously 478 announced right. A withdraw effectively deletes one previously 479 announced IPvX Prefix PDU with the exact same Prefix, Length, Max- 480 Len, ASN, Data Source, and Color. 482 Prefix Length: An ordinal denoting the shortest prefix allowed for 483 the prefix. 485 Max Length: An ordinal denoting the longest prefix allowed by the 486 prefix. This MUST NOT be less than the Prefix Length element. 488 Data Source: An ordinal denoting the source of the data, e.g. for 489 RPKI data, it is 0, for IRR data it is 1. 491 Prefix: The IPv4 or IPv6 prefix of the ROA. 493 Autonomous System Number: ASN allowed to announce this prefix, a 32 494 bit ordinal. 496 5. Protocol Sequences 498 The sequences of PDU transmissions fall into three conversations as 499 follows: 501 5.1. Start or Restart 503 Cache Router 504 ~ ~ 505 | <----- Reset Query -------- | R requests data 506 | | 507 | ----- Cache Response -----> | C confirms request 508 | ------- IPvX Prefix ------> | C sends zero or more 509 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 510 | ------- IPvX Prefix ------> | Payload PDUs 511 | ------ End of Data ------> | C sends End of Data 512 | | and sends new serial 513 ~ ~ 515 When a transport session is first established, the router sends a 516 Reset Query and the cache responds with a data sequence of all data 517 it contains. 519 This Reset Query sequence is also used when the router receives a 520 Cache Reset, chooses a new cache, or fears that it has otherwise lost 521 its way. 523 To limit the length of time a cache must keep the data necessary to 524 generate incremental updates, a router MUST send either a Serial 525 Query or a Reset Query no less frequently than once an hour. This 526 also acts as a keep alive at the application layer. 528 5.2. Typical Exchange 530 Cache Router 531 ~ ~ 532 | -------- Notify ----------> | (optional) 533 | | 534 | <----- Serial Query ------- | R requests data 535 | | 536 | ----- Cache Response -----> | C confirms request 537 | ------- IPvX Prefix ------> | C sends zero or more 538 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 539 | ------- IPvX Prefix ------> | Payload PDUs 540 | ------ End of Data ------> | C sends End of Data 541 | | and sends new serial 542 ~ ~ 544 The cache server SHOULD send a notify PDU with its current serial 545 number when the cache's serial changes, with the expectation that the 546 router MAY then issue a serial query earlier than it otherwise might. 547 This is analogous to DNS NOTIFY in [RFC1996]. The cache SHOULD rate 548 limit Serial Notifies to no more frequently than one per minute. 550 When the transport layer is up and either a timer has gone off in the 551 router, or the cache has sent a Notify, the router queries for new 552 data by sending a Serial Query, and the cache sends all data newer 553 than the serial in the Serial Query. 555 To limit the length of time a cache must keep old withdraws, a router 556 MUST send either a Serial Query or a Reset Query no less frequently 557 than once an hour. 559 5.3. No Incremental Update Available 561 Cache Router 562 ~ ~ 563 | <----- Serial Query ------ | R requests data 564 | ------- Cache Reset ------> | C cannot supply update 565 | | from specified serial 566 | <------ Reset Query ------- | R requests new data 567 | ----- Cache Response -----> | C confirms request 568 | ------- IPvX Prefix ------> | C sends zero or more 569 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 570 | ------- IPvX Prefix ------> | Payload PDUs 571 | ------ End of Data ------> | C sends End of Data 572 | | and sends new serial 573 ~ ~ 575 The cache may respond to a Serial Query with a Cache Reset, informing 576 the router that the cache cannot supply an incremental update from 577 the serial number specified by the router. This might be because the 578 cache has lost state, or because the router has waited too long 579 between polls and the cache has cleaned up old data that it no longer 580 believes it needs, or because the cache has run out of storage space 581 and had to expire some old data early. Regardless of how this state 582 arose, the cache replies with a Cache Reset to tell the router that 583 it cannot honor the request. When a router receives this, the router 584 SHOULD attempt to connect to any more preferred caches in its cache 585 list. If there are no more preferred caches it MUST issue a Reset 586 Query and get an entire new load from the cache. 588 5.4. Cache has No Data Available 590 Cache Router 591 ~ ~ 592 | <----- Serial Query ------ | R requests data 593 | ---- Error Report PDU ----> | C cannot supply update 594 ~ ~ 596 Cache Router 597 ~ ~ 598 | <----- Reset Query ------- | R requests data 599 | ---- Error Report PDU ----> | C cannot supply update 600 ~ ~ 602 The cache may respond to either a Serial Query or a Reset Query 603 informing the router that the cache cannot supply any update at all. 604 The most likely cause is that the cache has lost state, perhaps due 605 to a restart, and has not yet recovered. While it is possible that a 606 cache might go into such a state without dropping any of its active 607 sessions, a router is more likely to see this behavior when it 608 initially connects and issues a Reset Query while the cache is still 609 rebuilding its database. 611 When a router receives this kind of error, the router SHOULD attempt 612 to connect to any other caches in its cache list, in preference 613 order. If no other caches are available, the router MUST issue 614 periodic Reset Queries until it gets a new usable load from the 615 cache. 617 6. SSH Transport 619 The transport layer session between a router and a cache carries the 620 binary Protocol Data Units (PDUs) in a persistent SSH session. 622 To run over SSH, the client router first establishes an SSH transport 623 connection using the SSH transport protocol, and the client and 624 server exchange keys for message integrity and encryption. The 625 client then invokes the "ssh-userauth" service to authenticate the 626 application, as described in the SSH authentication protocol RFC 4252 627 [RFC4252]. Once the application has been successfully authenticated, 628 the client invokes the "ssh-connection" service, also known as the 629 SSH connection protocol. 631 After the ssh-connection service is established, the client opens a 632 channel of type "session", which results in an SSH session. 634 Once the SSH session has been established, the application invokes 635 the application transport as an SSH subsystem called "rpki-rtr". 636 Subsystem support is a feature of SSH version 2 (SSHv2) and is not 637 included in SSHv1. Running this protocol as an SSH subsystem avoids 638 the need for the application to recognize shell prompts or skip over 639 extraneous information, such as a system message that is sent at 640 shell start-up. 642 It is assumed that the router and cache have exchanged keys out of 643 band by some reasonably secured means. 645 7. Router-Cache Set-Up 647 A cache has the public authentication data for each router it is 648 configured to support. 650 A router may be configured to peer with a selection of caches, and a 651 cache may be configured to support a selection of routers. Each must 652 have the name of, and authentication data for, each each peer. In 653 addition, in a router, this list has a non-unique preference value 654 for each server in order of preference. The client router attempts 655 to establish a session with each potential serving cache in 656 preference order, and then starts to load data from the highest 657 preference cache to which it can connect and authenticate. The 658 router's list of caches has the following elements: 660 Preference: An ordinal denoting the router's preference to use that 661 cache, the lower the value the more preferred. 663 Name: The IP Address or fully qualified domain name of the cache. 665 Key: The public ssh key of the cache. 667 MyKey: The private ssh key of this client. 669 As caches can not be rigorously synchronous, a client which changes 670 servers can not combine data from different parent caches. 671 Therefore, when a lower preference cache becomes available, if 672 resources allow, it would be prudent for the client to start a new 673 buffer for that cache's data, and only switch to those data when that 674 buffer is fully up to date. 676 When a client loses connectivity to the cache it is currently using, 677 or otherwise decides to switch to a new cache, it SHOULD retain the 678 data from the previous cache and only switch to using the data from 679 the new cache once it has fully synchronized with it. It should do 680 this regardless of whether it has chosen a different cache or 681 established a new connection to the previous cache. However, a 682 configurable timer MUST be provided to bound how long it will retain 683 the "stale" data. 685 8. Deployment Scenarios 687 For illustration, we present three likely deployment scenarios. 689 Small End Site: The small multi-homed end site may wish to outsource 690 the RPKI cache to one or more of their upstream ISPs. They would 691 exchange authentication material with the ISP using some out of 692 band mechanism, and their router(s) would connect to one or more 693 up-streams' caches. The ISPs would likely deploy caches intended 694 for customer use separately from the caches with which their own 695 BGP speakers peer. 697 Large End Site: A larger multi-homed end site might run one or more 698 caches, arranging them in a hierarchy of client caches, each 699 fetching from a serving cache which is closer to the global RPKI. 700 They might configure fall-back peerings to up-stream ISP caches. 702 ISP Backbone: A large ISP would likely have one or more redundant 703 caches in each major PoP, and these caches would fetch from each 704 other in an ISP-dependent topology so as not to place undue load 705 on the global RPKI publication infrastructure. 707 Experience with large DNS cache deployments has shown that complex 708 topologies are ill-advised as it is easy to make errors in the graph, 709 e.g. not maintaining a loop-free condition. 711 Of course, these are illustrations and there are other possible 712 deployment strategies. It is expected that minimizing load on the 713 global RPKI servers will be a major consideration. 715 To keep load on global RPKI services from unnecessary peaks, it is 716 recommended that primary caches which load from the distributed 717 global RPKI not do so all at the same times, e.g. on the hour. 718 Choose a random time, perhaps the ISP's AS number modulo 60 and 719 jitter the inter-fetch timing. 721 9. Error Codes 723 This section contains a preliminary list of error codes. The authors 724 expect additions to this section during development of the initial 725 implementations. Eventually, these error codes will probably need to 726 reside in an IANA registry. 728 0: Reserved. 730 1: Internal Error: The party reporting the error experienced some 731 kind of internal error unrelated to protocol operation (ran out of 732 memory, a coding assertion failed, et cetera). 734 2: No Data Available: The cache believes itself to be in good 735 working order, but is unable to answer either a Serial Query or a 736 Reset Query because it has no useful data available at this time. 737 This is likely to be a temporary error, and most likely indicates 738 that the cache has not yet completed pulling down an initial 739 current data set from the global RPKI system after some kind of 740 event that invalidated whatever data it might have previously held 741 (reboot, network partition, etcetera). 743 10. Security Considerations 745 As this document describes a security protocol, many aspects of 746 security interest are described in the relevant sections. This 747 section points out issues which may not be obvious in other sections. 749 Cache Validation: In order for a collection of caches as described 750 in Section 8 to guarantee a consistent view, they need to be given 751 consistent trust anchors to use in their internal validation 752 process. Distribution of a consistent trust anchor is assumed to 753 be out of band. 755 Cache Peer Identification: The router initiates an ssh transport 756 session to a cache, which it identifies by either IP address or 757 fully qualified domain name. Be aware that a DNS or address 758 spoofing attack could make the correct cache unreachable. No 759 session would be established, as the authorization keys would not 760 match. 762 Transport Security: The RPKI relies on object, not server or 763 transport, trust. I.e. the IANA root trust anchor is distributed 764 to all caches through some out of band means, and can then be used 765 by each cache to validate certificates and ROAs all the way down 766 the tree. The inter-cache relationships are based on this object 767 security model, hence the inter-cache transport can be lightly 768 protected. 770 But this protocol document assumes that the routers can not do the 771 validation cryptography. Hence the last link, from cache to 772 router, is secured by server authentication and transport level 773 security. This is dangerous, as server authentication and 774 transport have very different threat models than object security. 776 So the strength of the trust relationship and the transport 777 between the router(s) and the cache(s) are critical. You're 778 betting your routing on this. 780 While we can not say the cache must be on the same LAN, if only 781 due to the issue of an enterprise wanting to off-load the cache 782 task to their upstream ISP(s), locality, trust, and control are 783 very critical issues here. The cache(s) really SHOULD be as 784 close, in the sense of controlled and protected (against DDoS, 785 MITM) transport, to the router(s) as possible. It also SHOULD be 786 topologically close so that a minimum of validated routing data 787 are needed to bootstrap a router's access to a cache. 789 11. Glossary 791 The following terms are used with special meaning: 793 Global RPKI: The authoritative data of the RPKI are published in a 794 distributed set of servers at the IANA, RIRs, NIRs, and ISPs, see 795 [I-D.ietf-sidr-repos-struct]. 797 Non-authorative Cache: A coalesced copy of the RPKI which is 798 periodically fetched/refreshed directly or indirectly from the 799 global RPKI using the [RFC5781] protocol/tools 801 Cache: The rcynic system is used to gather the distributed data of 802 the RPKI into a validated cache. Trusting this cache further is a 803 matter between the provider of the cache and a relying party. 805 Serial Number: A 32-bit monotonically increasing ordinal which wraps 806 from 2^32-1 to 0. It denotes the logical version of a cache. A 807 cache increments the value by one when it successfully updates its 808 data from a parent cache or from primary RPKI data. As a cache is 809 rcynicing, new incoming data, and implicit deletes, are marked 810 with the new serial but MUST not be sent until the fetch is 811 complete. A serial number is not commensurate between caches, nor 812 need it be maintained across resets of the cache server. See 813 [RFC1982] on DNS Serial Number Arithmetic for too much detail on 814 serial number arithmetic. 816 12. IANA Considerations 818 This document requests the IANA to create a registry for PDU types. 820 This document requests the IANA to create a registry for Data Source 821 Codes. 823 This document requests the IANA to create a registry for Error Codes. 825 In addition, a registry for Version Numbers would be needed if new 826 Version Number is defined in a new RFC. 828 Note to RFC Editor: this section may be replaced on publication as an 829 RFC. 831 13. Acknowledgments 833 The authors wish to thank Steve Bellovin, Rex Fernando, Russ Housley, 834 Pradosh Mohapatra, Keyur Patel, Sandy Murphy, Megumi Ninomiya, Robert 835 Raszuk, John Scudder, Ruediger Volk, David Ward, and Bert Wijnen. 837 14. References 839 14.1. Normative References 841 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 842 August 1996. 844 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 845 Requirement Levels", BCP 14, RFC 2119, March 1997. 847 [RFC4252] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH) 848 Authentication Protocol", RFC 4252, January 2006. 850 [RFC5781] Weiler, S., Ward, D., and R. Housley, "The rsync URI 851 Scheme", RFC 5781, February 2010. 853 14.2. Informative References 855 [I-D.ietf-sidr-arch] 856 Lepinski, M. and S. Kent, "An Infrastructure to Support 857 Secure Internet Routing", draft-ietf-sidr-arch-09 (work in 858 progress), October 2009. 860 [I-D.ietf-sidr-repos-struct] 861 Huston, G., Loomans, R., and G. Michaelson, "A Profile for 862 Resource Certificate Repository Structure", 863 draft-ietf-sidr-repos-struct-04 (work in progress), 864 May 2010. 866 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 867 Changes (DNS NOTIFY)", RFC 1996, August 1996. 869 Authors' Addresses 871 Randy Bush 872 Internet Initiative Japan, Inc. 873 5147 Crystal Springs 874 Bainbridge Island, Washington 98110 875 US 877 Phone: +1 206 780 0431 x1 878 Email: randy@psg.com 880 Rob Austein 881 Internet Systems Consortium 882 950 Charter Street 883 Redwood City, CA 94063 884 USA 886 Email: sra@isc.org