idnits 2.17.1 draft-ietf-sidr-rpki-rtr-20.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 (November 30, 2011) is 4503 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-03 ** Obsolete normative reference: RFC 2385 (Obsoleted by RFC 5925) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) Summary: 4 errors (**), 0 flaws (~~), 2 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 Internet Initiative Japan 4 Intended status: Standards Track R. Austein 5 Expires: June 2, 2012 Dragon Research Labs 6 November 30, 2011 8 The RPKI/Router Protocol 9 draft-ietf-sidr-rpki-rtr-20 11 Abstract 13 In order to formally validate the origin ASs of BGP announcements, 14 routers need a simple but reliable mechanism to receive RPKI 15 [I-D.ietf-sidr-arch] prefix origin data from a trusted cache. This 16 document describes a protocol to deliver validated prefix origin data 17 to routers. 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 [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 June 2, 2012. 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. Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 3. Deployment Structure . . . . . . . . . . . . . . . . . . . . . 4 62 4. Operational Overview . . . . . . . . . . . . . . . . . . . . . 4 63 5. Protocol Data Units (PDUs) . . . . . . . . . . . . . . . . . . 5 64 5.1. Serial Notify . . . . . . . . . . . . . . . . . . . . . . 5 65 5.2. Serial Query . . . . . . . . . . . . . . . . . . . . . . . 6 66 5.3. Reset Query . . . . . . . . . . . . . . . . . . . . . . . 7 67 5.4. Cache Response . . . . . . . . . . . . . . . . . . . . . . 7 68 5.5. IPv4 Prefix . . . . . . . . . . . . . . . . . . . . . . . 8 69 5.6. IPv6 Prefix . . . . . . . . . . . . . . . . . . . . . . . 9 70 5.7. End of Data . . . . . . . . . . . . . . . . . . . . . . . 9 71 5.8. Cache Reset . . . . . . . . . . . . . . . . . . . . . . . 10 72 5.9. Error Report . . . . . . . . . . . . . . . . . . . . . . . 10 73 5.10. Fields of a PDU . . . . . . . . . . . . . . . . . . . . . 11 74 6. Protocol Sequences . . . . . . . . . . . . . . . . . . . . . . 13 75 6.1. Start or Restart . . . . . . . . . . . . . . . . . . . . . 13 76 6.2. Typical Exchange . . . . . . . . . . . . . . . . . . . . . 14 77 6.3. No Incremental Update Available . . . . . . . . . . . . . 14 78 6.4. Cache has No Data Available . . . . . . . . . . . . . . . 15 79 7. Transport . . . . . . . . . . . . . . . . . . . . . . . . . . 15 80 7.1. SSH Transport . . . . . . . . . . . . . . . . . . . . . . 16 81 7.2. TLS Transport . . . . . . . . . . . . . . . . . . . . . . 17 82 7.3. TCP MD5 Transport . . . . . . . . . . . . . . . . . . . . 17 83 7.4. TCP-AO Transport . . . . . . . . . . . . . . . . . . . . . 18 84 8. Router-Cache Set-Up . . . . . . . . . . . . . . . . . . . . . 18 85 9. Deployment Scenarios . . . . . . . . . . . . . . . . . . . . . 19 86 10. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . 20 87 11. Security Considerations . . . . . . . . . . . . . . . . . . . 21 88 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 89 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 23 90 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23 91 14.1. Normative References . . . . . . . . . . . . . . . . . . . 23 92 14.2. Informative References . . . . . . . . . . . . . . . . . . 24 93 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24 95 1. Introduction 97 In order to formally validate the origin ASs of BGP announcements, 98 routers need a simple but reliable mechanism to receive RPKI 99 [I-D.ietf-sidr-arch] formally validated prefix origin data from a 100 trusted cache. This document describes a protocol to deliver 101 validated prefix origin data to routers. 103 Section 3 describes the deployment structure and Section 4 then 104 presents an operational overview. The binary payloads of the 105 protocol are formally described in Section 5, and the expected PDU 106 sequences are described in Section 6. The transport protocol options 107 are described in Section 7. Section 8 details how routers and caches 108 are configured to connect and authenticate. Section 9 describes 109 likely deployment scenarios. The traditional security and IANA 110 considerations end the document. 112 The protocol is extensible to support new PDUs with new semantics 113 when and as needed, as indicated by deployment experience. PDUs are 114 versioned should deployment experience call for change. 116 2. Glossary 118 The following terms are used with special meaning: 120 Global RPKI: The authoritative data of the RPKI are published in a 121 distributed set of servers at the IANA, RIRs, NIRs, and ISPs, see 122 [I-D.ietf-sidr-repos-struct]. 124 Cache: A coalesced copy of the RPKI which is periodically fetched/ 125 refreshed directly or indirectly from the global RPKI using the 126 [RFC5781] protocol/tools. Relying party software is used to 127 gather and validate the distributed data of the RPKI into a cache. 128 Trusting this cache further is a matter between the provider of 129 the cache and a relying party. 131 Serial Number: A 32-bit monotonically increasing ordinal which wraps 132 from 2^32-1 to 0. It denotes the logical version of a cache. A 133 cache increments the value by one when it successfully updates its 134 data from a parent cache or from primary RPKI data. As a cache is 135 receiving, new incoming data and implicit deletes are marked with 136 the new serial but MUST NOT be sent until the fetch is complete. 137 A serial number is not commensurate between caches, nor need it be 138 maintained across resets of the cache server. See [RFC1982] on 139 DNS Serial Number Arithmetic for too much detail on serial number 140 arithmetic. 142 Nonce: When a cache server is started, it generates a nonce to 143 identify the instance of the cache and to bind it to the sequence 144 of Serial Numbers that cache instance will generate. This allows 145 the router to restart a failed session knowing that the Serial 146 Number it is using is commensurate with that of the cache. 148 3. Deployment Structure 150 Deployment of the RPKI to reach routers has a three level structure 151 as follows: 153 Global RPKI: The authoritative data of the RPKI are published in a 154 distributed set of servers, RPKI publication repositories, e.g. 155 the IANA, RIRs, NIRs, and ISPs, see [I-D.ietf-sidr-repos-struct]. 157 Local Caches: A local set of one or more collected and verified 158 caches. A relying party, e.g. router or other client, MUST have a 159 trust relationship with, and a trusted transport channel to, any 160 authoritative cache(s) it uses. 162 Routers: A router fetches data from a local cache using the protocol 163 described in this document. It is said to be a client of the 164 cache. There MAY be mechanisms for the router to assure itself of 165 the authenticity of the cache and to authenticate itself to the 166 cache. 168 4. Operational Overview 170 A router establishes and keeps open a connection to one or more 171 caches with which it has client/server relationships. It is 172 configured with a semi-ordered list of caches, and establishes a 173 connection to the most preferred cache, or set of caches, which 174 accept the connections. 176 The router MUST choose the most preferred, by configuration, cache or 177 set of caches so that the operator may control load on their caches 178 and the Global RPKI. 180 Periodically, the router sends to the cache the serial number of the 181 highest numbered data it has received from that cache, i.e. the 182 router's current serial number. When a router establishes a new 183 connection to a cache, or wishes to reset a current relationship, it 184 sends a Reset Query. 186 The Cache responds with all data records which have serial numbers 187 greater than that in the router's query. This may be the null set, 188 in which case the End of Data PDU is still sent. Note that 'greater' 189 must take wrap-around into account, see [RFC1982]. 191 When the router has received all data records from the cache, it sets 192 its current serial number to that of the serial number in the End of 193 Data PDU. 195 When the cache updates its database, it sends a Notify message to 196 every currently connected router. This is a hint that now would be a 197 good time for the router to poll for an update, but is only a hint. 198 The protocol requires the router to poll for updates periodically in 199 any case. 201 Strictly speaking, a router could track a cache simply by asking for 202 a complete data set every time it updates, but this would be very 203 inefficient. The serial number based incremental update mechanism 204 allows an efficient transfer of just the data records which have 205 changed since last update. As with any update protocol based on 206 incremental transfers, the router must be prepared to fall back to a 207 full transfer if for any reason the cache is unable to provide the 208 necessary incremental data. Unlike some incremental transfer 209 protocols, this protocol requires the router to make an explicit 210 request to start the fallback process; this is deliberate, as the 211 cache has no way of knowing whether the router has also established 212 sessions with other caches that may be able to provide better 213 service. 215 As a cache server must evaluate certificates and ROAs which are time 216 dependent, servers' clocks MUST be correct to a tolerance of 217 approximately an hour. 219 5. Protocol Data Units (PDUs) 221 The exchanges between the cache and the router are sequences of 222 exchanges of the following PDUs according to the rules described in 223 Section 6. 225 Fields with unspecified content MUST be zero on transmission and MAY 226 be ignored on receipt. 228 5.1. Serial Notify 230 The cache notifies the router that the cache has new data. 232 The Cache Nonce reassures the router that the serial numbers are 233 commensurate, i.e. the cache session has not been changed. 235 Serial Notify is only message that the cache can send that is not in 236 response to a message from the router. 238 0 8 16 24 31 239 .-------------------------------------------. 240 | Protocol | PDU | | 241 | Version | Type | Cache Nonce | 242 | 0 | 0 | | 243 +-------------------------------------------+ 244 | | 245 | Length=12 | 246 | | 247 +-------------------------------------------+ 248 | | 249 | Serial Number | 250 | | 251 `-------------------------------------------' 253 5.2. Serial Query 255 Serial Query: The router sends Serial Query to ask the cache for all 256 payload PDUs which have serial numbers higher than the serial number 257 in the Serial Query. 259 The cache replies to this query with a Cache Response PDU 260 (Section 5.4) if the cache has a, possibly null, record of the 261 changes since the serial number specified by the router. If there 262 have been no changes since the router last queried, the cache then 263 sends an End Of Data PDU. 265 If the cache does not have the data needed to update the router, 266 perhaps because its records do not go back to the Serial Number in 267 the Serial Query, then it responds with a Cache Reset PDU 268 (Section 5.8). 270 The Cache Nonce tells the cache what instance the router expects to 271 ensure that the serial numbers are commensurate, i.e. the cache 272 session has not been changed. 274 0 8 16 24 31 275 .-------------------------------------------. 276 | Protocol | PDU | | 277 | Version | Type | Cache Nonce | 278 | 0 | 1 | | 279 +-------------------------------------------+ 280 | | 281 | Length=12 | 282 | | 283 +-------------------------------------------+ 284 | | 285 | Serial Number | 286 | | 287 `-------------------------------------------' 289 5.3. Reset Query 291 Reset Query: The router tells the cache that it wants to receive the 292 total active, current, non-withdrawn, database. The cache responds 293 with a Cache Response PDU (Section 5.4). 295 0 8 16 24 31 296 .-------------------------------------------. 297 | Protocol | PDU | | 298 | Version | Type | reserved = zero | 299 | 0 | 2 | | 300 +-------------------------------------------+ 301 | | 302 | Length=8 | 303 | | 304 `-------------------------------------------' 306 5.4. Cache Response 308 Cache Response: The cache responds with zero or more payload PDUs. 309 When replying to a Serial Query request (Section 5.2), the cache 310 sends the set of all data records it has with serial numbers greater 311 than that sent by the client router. When replying to a Reset Query, 312 the cache sends the set of all data records it has; in this case the 313 withdraw/announce field in the payload PDUs MUST have the value 1 314 (announce). 316 In response to a Reset Query, the new value of Cache Nonce tells the 317 router the instance of the cache session for future confirmation. In 318 response to a Serial Query, the Cache Nonce being the same reassures 319 the router that the serial numbers are commensurate, i.e. the cache 320 session has not changed. 322 0 8 16 24 31 323 .-------------------------------------------. 324 | Protocol | PDU | | 325 | Version | Type | Cache Nonce | 326 | 0 | 3 | | 327 +-------------------------------------------+ 328 | | 329 | Length=8 | 330 | | 331 `-------------------------------------------' 333 5.5. IPv4 Prefix 335 0 8 16 24 31 336 .-------------------------------------------. 337 | Protocol | PDU | | 338 | Version | Type | reserved = zero | 339 | 0 | 4 | | 340 +-------------------------------------------+ 341 | | 342 | Length=20 | 343 | | 344 +-------------------------------------------+ 345 | | Prefix | Max | | 346 | Flags | Length | Length | zero | 347 | | 0..32 | 0..32 | | 348 +-------------------------------------------+ 349 | | 350 | IPv4 Prefix | 351 | | 352 +-------------------------------------------+ 353 | | 354 | Autonomous System Number | 355 | | 356 `-------------------------------------------' 358 The lowest order bit of the Flags field is 1 for an announcement and 359 0 for a withdrawal. 361 In the RPKI, nothing prevents a signing certificate from issuing two 362 identical ROAs, and nothing prohibits the existence of two identical 363 route: or route6: objects in the IRR. In this case there would be no 364 semantic difference between the objects, merely a process redundancy. 366 In the RPKI, there is also an actual need for what might appear to a 367 router as identical IPvX PDUs. This can occur when an upstream 368 certificate is being reissued or there is an address ownership 369 transfer up the validation chain. The ROA would be identical in the 370 router sense, i.e. have the same {prefix, len, max-len, asn}, but a 371 different validation path in the RPKI. This is important to the 372 RPKI, but not to the router. 374 The cache server MUST ensure that it has told the router client to 375 have one and only one IPvX PDU for a unique {prefix, len, max-len, 376 asn} at any one point in time. Should the router client receive an 377 IPvX PDU with a {prefix, len, max-len, asn} identical to one it 378 already has active, it SHOULD raise a Duplicate Announcement Received 379 error. 381 5.6. IPv6 Prefix 383 0 8 16 24 31 384 .-------------------------------------------. 385 | Protocol | PDU | | 386 | Version | Type | reserved = zero | 387 | 0 | 6 | | 388 +-------------------------------------------+ 389 | | 390 | Length=32 | 391 | | 392 +-------------------------------------------+ 393 | | Prefix | Max | | 394 | Flags | Length | Length | zero | 395 | | 0..128 | 0..128 | | 396 +-------------------------------------------+ 397 | | 398 +--- ---+ 399 | | 400 +--- IPv6 Prefix ---+ 401 | | 402 +--- ---+ 403 | | 404 +-------------------------------------------+ 405 | | 406 | Autonomous System Number | 407 | | 408 `-------------------------------------------' 410 5.7. End of Data 412 End of Data: Cache tells router it has no more data for the request. 414 The Cache Nonce MUST be the same as that of the corresponding Cache 415 Response which began the, possibly null, sequence of data PDUs. 417 0 8 16 24 31 418 .-------------------------------------------. 419 | Protocol | PDU | | 420 | Version | Type | Cache Nonce | 421 | 0 | 7 | | 422 +-------------------------------------------+ 423 | | 424 | Length=12 | 425 | | 426 +-------------------------------------------+ 427 | | 428 | Serial Number | 429 | | 430 `-------------------------------------------' 432 5.8. Cache Reset 434 The cache may respond to a Serial Query informing the router that the 435 cache cannot provide an incremental update starting from the serial 436 number specified by the router. The router must decide whether to 437 issue a Reset Query or switch to a different cache. 439 0 8 16 24 31 440 .-------------------------------------------. 441 | Protocol | PDU | | 442 | Version | Type | reserved = zero | 443 | 0 | 8 | | 444 +-------------------------------------------+ 445 | | 446 | Length=8 | 447 | | 448 `-------------------------------------------' 450 5.9. Error Report 452 This PDU is used by either party to report an error to the other. 454 Error reports are only sent as responses to other PDUs. 456 The Error Code is described in Section 10. 458 If the error is not associated with any particular PDU, the Erroneous 459 PDU field MUST be empty and the Length of Encapsulated PDU field MUST 460 be zero. 462 An Error Report PDU MUST NOT be sent for an Error Report PDU. If an 463 erroneous Error Report PDU is received, the session SHOULD be 464 dropped. 466 If the error is associated with a PDU of excessive, or possibly 467 corrupt, length, the Erroneous PDU field MAY be truncated. 469 The diagnostic text is optional, if not present the Length of Error 470 Text field SHOULD be zero. If error text is present, it SHOULD be a 471 string in US-ASCII, for maximum portability; if non-US-ASCII 472 characters are absolutely required, the error text MUST use UTF-8 473 encoding. 475 0 8 16 24 31 476 .-------------------------------------------. 477 | Protocol | PDU | | 478 | Version | Type | Error Code | 479 | 0 | 10 | | 480 +-------------------------------------------+ 481 | | 482 | Length | 483 | | 484 +-------------------------------------------+ 485 | | 486 | Length of Encapsulated PDU | 487 | | 488 +-------------------------------------------+ 489 | | 490 ~ Copy of Erroneous PDU ~ 491 | | 492 +-------------------------------------------+ 493 | | 494 | Length of Error Text | 495 | | 496 +-------------------------------------------+ 497 | | 498 | Arbitrary Text | 499 | of | 500 ~ Error Diagnostic Message ~ 501 | | 502 `-------------------------------------------' 504 5.10. Fields of a PDU 506 PDUs contain the following data elements: 508 Protocol Version: An ordinal, currently 0, denoting the version of 509 this protocol. 511 PDU Type: An ordinal, denoting the type of the PDU, e.g. IPv4 512 Prefix, etc. 514 Serial Number: The serial number of the RPKI Cache when this ROA was 515 received from the cache's up-stream cache server or gathered from 516 the global RPKI. A cache increments its serial number when 517 completing an rigorously validated update from a parent cache, for 518 example via rcynic. See [RFC1982] on DNS Serial Number Arithmetic 519 for too much detail on serial number arithmetic. 521 Cache Nonce: When a cache server is started, it generates a nonce to 522 identify the instance of the cache and to bind it to the sequence 523 of Serial Numbers that cache instance will generate. This allows 524 the router to restart a failed session knowing that the Serial 525 Number it is using is commensurate with that of the cache. If, at 526 any time, either the router or the cache finds the value of the 527 nonces they hold disagree, they MUST completely drop the session 528 and the router MUST flush all data learned from that cache. 530 The nonce might be a pseudo-random, a monotonically increasing 531 value if the cache has reliable storage, etc. An implementation 532 which uses a fine granularity of time for the Serial Number might 533 never change the Cache Nonce. 535 Length: A 32 bit ordinal which has as its value the count of the 536 bytes in the entire PDU, including the eight bytes of header which 537 end with the length field. 539 Flags: The lowest order bit of the Flags field is 1 for an 540 announcement and 0 for a withdrawal, whether this PDU announces a 541 new right to announce the prefix or withdraws a previously 542 announced right. A withdraw effectively deletes one previously 543 announced IPvX Prefix PDU with the exact same Prefix, Length, Max- 544 Len, and ASN. 546 Prefix Length: An ordinal denoting the shortest prefix allowed for 547 the prefix. 549 Max Length: An ordinal denoting the longest prefix allowed by the 550 prefix. This MUST NOT be less than the Prefix Length element. 552 Prefix: The IPv4 or IPv6 prefix of the ROA. 554 Autonomous System Number: ASN allowed to announce this prefix, a 32 555 bit ordinal. 557 Zero: Fields shown as zero or reserved MUST be zero. The value of 558 such a field MUST be ignored on receipt. 560 6. Protocol Sequences 562 The sequences of PDU transmissions fall into three conversations as 563 follows: 565 6.1. Start or Restart 567 Cache Router 568 ~ ~ 569 | <----- Reset Query -------- | R requests data (or Serial Query) 570 | | 571 | ----- Cache Response -----> | C confirms request 572 | ------- IPvX Prefix ------> | C sends zero or more 573 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 574 | ------- IPvX Prefix ------> | Payload PDUs 575 | ------ End of Data ------> | C sends End of Data 576 | | and sends new serial 577 ~ ~ 579 When a transport session is first established, the router MAY send a 580 Reset Query and the cache responds with a data sequence of all data 581 it contains. 583 Alternatively, if the router has significant unexpired data from a 584 broken session with the same cache, it MAY start with a Serial Query 585 containing the Cache Nonce from the previous session to ensure the 586 serial numbers are commensurate. 588 This Reset Query sequence is also used when the router receives a 589 Cache Reset, chooses a new cache, or fears that it has otherwise lost 590 its way. 592 To limit the length of time a cache must keep the data necessary to 593 generate incremental updates, a router MUST send either a Serial 594 Query or a Reset Query no less frequently than once an hour. This 595 also acts as a keep alive at the application layer. 597 As the cache MAY not keep updates for little more than one hour, the 598 router MUST have a polling interval of no greater than once an hour. 600 6.2. Typical Exchange 602 Cache Router 603 ~ ~ 604 | -------- Notify ----------> | (optional) 605 | | 606 | <----- Serial Query ------- | R requests data 607 | | 608 | ----- Cache Response -----> | C confirms request 609 | ------- IPvX Prefix ------> | C sends zero or more 610 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 611 | ------- IPvX Prefix ------> | Payload PDUs 612 | ------ End of Data ------> | C sends End of Data 613 | | and sends new serial 614 ~ ~ 616 The cache server SHOULD send a notify PDU with its current serial 617 number when the cache's serial changes, with the expectation that the 618 router MAY then issue a serial query earlier than it otherwise might. 619 This is analogous to DNS NOTIFY in [RFC1996]. The cache MUST rate 620 limit Serial Notifies to no more frequently than one per minute. 622 When the transport layer is up and either a timer has gone off in the 623 router, or the cache has sent a Notify, the router queries for new 624 data by sending a Serial Query, and the cache sends all data newer 625 than the serial in the Serial Query. 627 To limit the length of time a cache must keep old withdraws, a router 628 MUST send either a Serial Query or a Reset Query no less frequently 629 than once an hour. 631 6.3. No Incremental Update Available 633 Cache Router 634 ~ ~ 635 | <----- Serial Query ------ | R requests data 636 | ------- Cache Reset ------> | C cannot supply update 637 | | from specified serial 638 | <------ Reset Query ------- | R requests new data 639 | ----- Cache Response -----> | C confirms request 640 | ------- IPvX Prefix ------> | C sends zero or more 641 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 642 | ------- IPvX Prefix ------> | Payload PDUs 643 | ------ End of Data ------> | C sends End of Data 644 | | and sends new serial 645 ~ ~ 647 The cache may respond to a Serial Query with a Cache Reset, informing 648 the router that the cache cannot supply an incremental update from 649 the serial number specified by the router. This might be because the 650 cache has lost state, or because the router has waited too long 651 between polls and the cache has cleaned up old data that it no longer 652 believes it needs, or because the cache has run out of storage space 653 and had to expire some old data early. Regardless of how this state 654 arose, the cache replies with a Cache Reset to tell the router that 655 it cannot honor the request. When a router receives this, the router 656 SHOULD attempt to connect to any more preferred caches in its cache 657 list. If there are no more preferred caches it MUST issue a Reset 658 Query and get an entire new load from the cache. 660 6.4. Cache has No Data Available 662 Cache Router 663 ~ ~ 664 | <----- Serial Query ------ | R requests data 665 | ---- Error Report PDU ----> | C No Data Available 666 ~ ~ 668 Cache Router 669 ~ ~ 670 | <----- Reset Query ------- | R requests data 671 | ---- Error Report PDU ----> | C No Data Available 672 ~ ~ 674 The cache may respond to either a Serial Query or a Reset Query 675 informing the router that the cache cannot supply any update at all. 676 The most likely cause is that the cache has lost state, perhaps due 677 to a restart, and has not yet recovered. While it is possible that a 678 cache might go into such a state without dropping any of its active 679 sessions, a router is more likely to see this behavior when it 680 initially connects and issues a Reset Query while the cache is still 681 rebuilding its database. 683 When a router receives this kind of error, the router SHOULD attempt 684 to connect to any other caches in its cache list, in preference 685 order. If no other caches are available, the router MUST issue 686 periodic Reset Queries until it gets a new usable load from the 687 cache. 689 7. Transport 691 The transport layer session between a router and a cache carries the 692 binary Protocol Data Units (PDUs) in a persistent session. 694 To prevent cache spoofing and DoS attacks by illegitimate routers, it 695 is highly desirable that the router and the cache are authenticated 696 to each other. Integrity protection for payloads is also desirable 697 to protect against monkey in the middle attacks. Unfortunately, 698 there is no protocol to do so on all currently used platforms. 699 Therefore, as of this document, there is no mandatory to implement 700 transport which provides authentication and integrity protection. 702 To reduce exposure to dropped but non-terminated sessions, both 703 caches and routers SHOULD enable keep alives when available in the 704 chosen transport protocol. 706 It is expected that, when TCP-AO [RFC5925] is available on all 707 platforms deployed by operators, it will become the mandatory to 708 implement transport. 710 Caches and routers MUST implement unprotected transport over TCP 711 using a port, RPKI-Rtr, to be assigned, see Section 12. Operators 712 SHOULD use procedural means, ACLs, ... to reduce the exposure to 713 authentication issues. 715 If available to the operator, caches and routers SHOULD use one of 716 the following more protected protocols. 718 Caches and routers SHOULD use TCP AO transport [RFC2385] over the 719 RPKI-Rtr port. 721 Caches and routers MAY use SSH transport [RFC4252] using using a the 722 normal SSH port. For an example, see Section 7.1. 724 Caches and routers MAY use TCP MD5 transport [RFC2385] using the 725 RPKI-Rtr port. 727 Caches and routers MAY use IPsec transport [RFC4301] using the RPKI- 728 Rtr port. 730 Caches and routers MAY use TLS transport [RFC5246] using using a 731 port, RPKI-Rtr TLS, to be assigned, see Section 12. 733 7.1. SSH Transport 735 To run over SSH, the client router first establishes an SSH transport 736 connection using the SSH transport protocol, and the client and 737 server exchange keys for message integrity and encryption. The 738 client then invokes the "ssh-userauth" service to authenticate the 739 application, as described in the SSH authentication protocol RFC 4252 740 [RFC4252]. Once the application has been successfully authenticated, 741 the client invokes the "ssh-connection" service, also known as the 742 SSH connection protocol. 744 After the ssh-connection service is established, the client opens a 745 channel of type "session", which results in an SSH session. 747 Once the SSH session has been established, the application invokes 748 the application transport as an SSH subsystem called "rpki-rtr". 749 Subsystem support is a feature of SSH version 2 (SSHv2) and is not 750 included in SSHv1. Running this protocol as an SSH subsystem avoids 751 the need for the application to recognize shell prompts or skip over 752 extraneous information, such as a system message that is sent at 753 shell start-up. 755 It is assumed that the router and cache have exchanged keys out of 756 band by some reasonably secured means. 758 Cache servers supporting SSH transport MUST accept RSA and DSA 759 authentication, and SHOULD accept ECDSA authentication. User 760 authentication MUST be supported; host authentication MAY be 761 supported. Implementations MAY support password authentication. 762 Client routers SHOULD verify the public key of the cache, to avoid 763 monkey-in-the-middle attacks. 765 7.2. TLS Transport 767 Client routers using TLS transport MUST use client-side certificates 768 for authentication. While in principle any type of certificate and 769 certificate authority may be used, in general cache operators will 770 generally wish to create their own small-scale CA and issue 771 certificates to each authorized router. This simplifies credential 772 roll-over; any unrevoked, unexpired certificate from the proper CA 773 may be used. If such certificates are used, the CN field [RFC5280] 774 MUST be used to denote the router's identity. 776 Clients SHOULD verify the cache's certificate as well, to avoid 777 monkey-in-the-middle attacks. 779 7.3. TCP MD5 Transport 781 If TCP-MD5 is used, implementations MUST support key lengths of at 782 least 80 printable ASCII bytes, per section 4.5 of [RFC2385]. 783 Implementations MUST also support hexadecimal sequences of at least 784 32 characters, i.e., 128 bits. 786 Key rollover with TCP-MD5 is problematic. Cache servers SHOULD 787 support [RFC4808]. 789 7.4. TCP-AO Transport 791 Implementations MUST support key lengths of at least 80 printable 792 ASCII bytes. Implementations MUST also support hexadecimal sequences 793 of at least 32 characters, i.e., 128 bits. MAC lengths of at least 794 96 bits MUST be supported, per section 5.3 of [RFC2385]. 796 The cryptographic algorithms and associcated parameters described in 797 [RFC5926] MUST be supported. 799 8. Router-Cache Set-Up 801 A cache has the public authentication data for each router it is 802 configured to support. 804 A router may be configured to peer with a selection of caches, and a 805 cache may be configured to support a selection of routers. Each must 806 have the name of, and authentication data for, each peer. In 807 addition, in a router, this list has a non-unique preference value 808 for each server in order of preference. This preference merely 809 denotes proximity, not trust, preferred belief, etc. The client 810 router attempts to establish a session with each potential serving 811 cache in preference order, and then starts to load data from the most 812 preferred cache to which it can connect and authenticate. The 813 router's list of caches has the following elements: 815 Preference: An ordinal denoting the router's preference to connect 816 to that cache, the lower the value the more preferred. 818 Name: The IP Address or fully qualified domain name of the cache. 820 Key: Any needed public key of the cache. 822 MyKey: Any needed private key or certificate of this client. 824 Due to the distributed nature of the RPKI, caches simply can not be 825 rigorously synchronous. A client may hold data from multiple caches, 826 but MUST keep the data marked as to source, as later updates MUST 827 affect the correct data. 829 Just as there may be more than one covering ROA from a single cache, 830 there may be multiple covering ROAs from multiple caches. The 831 results are as described in [I-D.ietf-sidr-pfx-validate]. 833 If data from multiple caches are held, implementations MUST NOT 834 distinguish between data sources when performing validation. 836 When a more preferred cache becomes available, if resources allow, it 837 would be prudent for the client to start fetching from that cache. 839 The client SHOULD attempt to maintain at least one set of data, 840 regardless of whether it has chosen a different cache or established 841 a new connection to the previous cache. 843 A client MAY drop the data from a particular cache when it is fully 844 in synch with one or more other caches. 846 A client SHOULD delete the data from a cache when it has been unable 847 to refresh from that cache for a configurable timer value. The 848 default for that value is twice the polling period for that cache. 850 If a client loses connectivity to a cache it is using, or otherwise 851 decides to switch to a new cache, it SHOULD retain the data from the 852 previous cache until it has a full set of data from one or more other 853 caches. Note that this may already be true at the point of 854 connection loss if the client has connections to more than one cache. 856 9. Deployment Scenarios 858 For illustration, we present three likely deployment scenarios. 860 Small End Site: The small multi-homed end site may wish to outsource 861 the RPKI cache to one or more of their upstream ISPs. They would 862 exchange authentication material with the ISP using some out of 863 band mechanism, and their router(s) would connect to one or more 864 up-streams' caches. The ISPs would likely deploy caches intended 865 for customer use separately from the caches with which their own 866 BGP speakers peer. 868 Large End Site: A larger multi-homed end site might run one or more 869 caches, arranging them in a hierarchy of client caches, each 870 fetching from a serving cache which is closer to the global RPKI. 871 They might configure fall-back peerings to up-stream ISP caches. 873 ISP Backbone: A large ISP would likely have one or more redundant 874 caches in each major PoP, and these caches would fetch from each 875 other in an ISP-dependent topology so as not to place undue load 876 on the global RPKI publication infrastructure. 878 Experience with large DNS cache deployments has shown that complex 879 topologies are ill-advised as it is easy to make errors in the graph, 880 e.g. not maintaining a loop-free condition. 882 Of course, these are illustrations and there are other possible 883 deployment strategies. It is expected that minimizing load on the 884 global RPKI servers will be a major consideration. 886 To keep load on global RPKI services from unnecessary peaks, it is 887 recommended that primary caches which load from the distributed 888 global RPKI not do so all at the same times, e.g. on the hour. 889 Choose a random time, perhaps the ISP's AS number modulo 60 and 890 jitter the inter-fetch timing. 892 10. Error Codes 894 This section contains a preliminary list of error codes. The authors 895 expect additions to this section during development of the initial 896 implementations. Errors which are considered fatal SHOULD cause the 897 session to be dropped. 899 0: Corrupt Data (fatal): The receiver believes the received PDU to 900 be corrupt in a manner not specified by other error codes. 902 1: Internal Error (fatal): The party reporting the error experienced 903 some kind of internal error unrelated to protocol operation (ran 904 out of memory, a coding assertion failed, et cetera). 906 2: No Data Available: The cache believes itself to be in good 907 working order, but is unable to answer either a Serial Query or a 908 Reset Query because it has no useful data available at this time. 909 This is likely to be a temporary error, and most likely indicates 910 that the cache has not yet completed pulling down an initial 911 current data set from the global RPKI system after some kind of 912 event that invalidated whatever data it might have previously held 913 (reboot, network partition, et cetera). 915 3: Invalid Request (fatal): The cache server believes the client's 916 request to be invalid. 918 4: Unsupported Protocol Version (fatal): The Protocol Version is not 919 known by the receiver of the PDU. 921 5: Unsupported PDU Type (fatal): The PDU Type is not known by the 922 receiver of the PDU. 924 6: Withdrawal of Unknown Record (fatal): The received PDU has Flag=0 925 but a record for the Prefix/PrefixLength/MaxLength triple does not 926 exist in the receiver's database. 928 7: Duplicate Announcement Received (fatal): The received PDU has an 929 identical {prefix, len, max-len, asn} tuple as a PDU which is 930 still active in the router. 932 11. Security Considerations 934 As this document describes a security protocol, many aspects of 935 security interest are described in the relevant sections. This 936 section points out issues which may not be obvious in other sections. 938 Cache Validation: In order for a collection of caches as described 939 in Section 9 to guarantee a consistent view, they need to be given 940 consistent trust anchors to use in their internal validation 941 process. Distribution of a consistent trust anchor is assumed to 942 be out of band. 944 Cache Peer Identification: The router initiates a transport session 945 to a cache, which it identifies by either IP address or fully 946 qualified domain name. Be aware that a DNS or address spoofing 947 attack could make the correct cache unreachable. No session would 948 be established, as the authorization keys would not match. 950 Transport Security: The RPKI relies on object, not server or 951 transport, trust. I.e. the IANA root trust anchor is distributed 952 to all caches through some out of band means, and can then be used 953 by each cache to validate certificates and ROAs all the way down 954 the tree. The inter-cache relationships are based on this object 955 security model, hence the inter-cache transport can be lightly 956 protected. 958 But this protocol document assumes that the routers can not do the 959 validation cryptography. Hence the last link, from cache to 960 router, is secured by server authentication and transport level 961 security. This is dangerous, as server authentication and 962 transport have very different threat models than object security. 964 So the strength of the trust relationship and the transport 965 between the router(s) and the cache(s) are critical. You're 966 betting your routing on this. 968 While we can not say the cache must be on the same LAN, if only 969 due to the issue of an enterprise wanting to off-load the cache 970 task to their upstream ISP(s), locality, trust, and control are 971 very critical issues here. The cache(s) really SHOULD be as 972 close, in the sense of controlled and protected (against DDoS, 973 MITM) transport, to the router(s) as possible. It also SHOULD be 974 topologically close so that a minimum of validated routing data 975 are needed to bootstrap a router's access to a cache. 977 The identity of the cache server MUST be verified and 978 authenticated by the router client, and vice versa, before any 979 data are exchanged. 981 12. IANA Considerations 983 This document requests the IANA to assign 'well known' TCP Port 984 Numbers to the RPKI-Router Protocol for the following, see Section 7: 986 RPKI-Rtr 987 RPKI-Rtr TLS 989 This document requests the IANA to create a registry for tuples of 990 Protocol Version / PDU Type, each of which may range from 0 to 255. 991 The name of the registry should be rpki-rtr-pdu. The policy for 992 adding to the registry is RFC Required per [RFC5226], either 993 standards track or experimental. The initial entries should be as 994 follows: 996 Protocol 997 Version PDU Type 998 -------- ------------------- 999 0 0 - Serial Notify 1000 0 1 - Serial Query 1001 0 2 - Reset Query 1002 0 3 - Cache Response 1003 0 4 - IPv4 Prefix 1004 0 6 - IPv6 Prefix 1005 0 7 - End of Data 1006 0 8 - Cache Reset 1007 0 10 - Error Report 1008 0 255 - Reserved 1010 This document requests the IANA to create a registry for Error Codes 1011 0 to 255. The name of the registry should be rpki-rtr-error. The 1012 policy for adding to the registry is Expert Review per [RFC5226], 1013 where the responsible IESG area director should appoint the Expert 1014 Reviewer. The initial entries should be as follows: 1016 0 - Corrupt Data 1017 1 - Internal Error 1018 2 - No Data Available 1019 3 - Invalid Request 1020 4 - Unsupported Protocol Version 1021 5 - Unsupported PDU Type 1022 6 - Withdrawal of Unknown Record 1023 7 - Duplicate Announcement Received 1024 255 - Reserved 1026 This document requests the IANA to add an SSH Connection Protocol 1027 Subsystem Name, as defined in [RFC4250], of 'rpki-rtr'. 1029 13. Acknowledgments 1031 The authors wish to thank Steve Bellovin, Rex Fernando, Paul Hoffman, 1032 Russ Housley, Pradosh Mohapatra, Keyur Patel, Sandy Murphy, Robert 1033 Raszuk, John Scudder, Ruediger Volk, and David Ward. Particular 1034 thanks go to Hannes Gredler for showing us the dangers of unnecessary 1035 fields. 1037 14. References 1039 14.1. Normative References 1041 [I-D.ietf-sidr-pfx-validate] 1042 Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 1043 Austein, "BGP Prefix Origin Validation", 1044 draft-ietf-sidr-pfx-validate-03 (work in progress), 1045 October 2011. 1047 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 1048 August 1996. 1050 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1051 Requirement Levels", BCP 14, RFC 2119, March 1997. 1053 [RFC2385] Heffernan, A., "Protection of BGP Sessions via the TCP MD5 1054 Signature Option", RFC 2385, August 1998. 1056 [RFC4250] Lehtinen, S. and C. Lonvick, "The Secure Shell (SSH) 1057 Protocol Assigned Numbers", RFC 4250, January 2006. 1059 [RFC4252] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH) 1060 Authentication Protocol", RFC 4252, January 2006. 1062 [RFC4301] Kent, S. and K. Seo, "Security Architecture for the 1063 Internet Protocol", RFC 4301, December 2005. 1065 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1066 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 1067 May 2008. 1069 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1070 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1072 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1073 Housley, R., and W. Polk, "Internet X.509 Public Key 1074 Infrastructure Certificate and Certificate Revocation List 1075 (CRL) Profile", RFC 5280, May 2008. 1077 [RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP 1078 Authentication Option", RFC 5925, June 2010. 1080 [RFC5926] Lebovitz, G. and E. Rescorla, "Cryptographic Algorithms 1081 for the TCP Authentication Option (TCP-AO)", RFC 5926, 1082 June 2010. 1084 14.2. Informative References 1086 [I-D.ietf-sidr-arch] 1087 Lepinski, M. and S. Kent, "An Infrastructure to Support 1088 Secure Internet Routing", draft-ietf-sidr-arch-13 (work in 1089 progress), May 2011. 1091 [I-D.ietf-sidr-repos-struct] 1092 Huston, G., Loomans, R., and G. Michaelson, "A Profile for 1093 Resource Certificate Repository Structure", 1094 draft-ietf-sidr-repos-struct-09 (work in progress), 1095 July 2011. 1097 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 1098 Changes (DNS NOTIFY)", RFC 1996, August 1996. 1100 [RFC4808] Bellovin, S., "Key Change Strategies for TCP-MD5", 1101 RFC 4808, March 2007. 1103 [RFC5781] Weiler, S., Ward, D., and R. Housley, "The rsync URI 1104 Scheme", RFC 5781, February 2010. 1106 Authors' Addresses 1108 Randy Bush 1109 Internet Initiative Japan 1110 5147 Crystal Springs 1111 Bainbridge Island, Washington 98110 1112 US 1114 Phone: +1 206 780 0431 x1 1115 Email: randy@psg.com 1117 Rob Austein 1118 Dragon Research Labs 1120 Email: sra@hactrn.net