idnits 2.17.1 draft-ietf-dhc-dhcpv6-bulk-leasequery-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 14. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 779. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 790. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 797. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 803. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust Copyright Line does not match the current year == Line 248 has weird spacing: '...ge-size the...' -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (June 3, 2008) is 5798 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) ** Obsolete normative reference: RFC 3315 (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 3633 (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 4614 (Obsoleted by RFC 7414) -- Obsolete informational reference (is this intentional?): RFC 2401 (Obsoleted by RFC 4301) Summary: 4 errors (**), 0 flaws (~~), 3 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DHC M. Stapp 3 Internet-Draft Cisco Systems, Inc. 4 Expires: December 5, 2008 June 3, 2008 6 DHCPv6 Bulk Leasequery 7 draft-ietf-dhc-dhcpv6-bulk-leasequery-02.txt 9 Status of this Memo 11 By submitting this Internet-Draft, each author represents that any 12 applicable patent or other IPR claims of which he or she is aware 13 have been or will be disclosed, and any of which he or she becomes 14 aware will be disclosed, in accordance with Section 6 of BCP 79. 16 Internet-Drafts are working documents of the Internet Engineering 17 Task Force (IETF), its areas, and its working groups. Note that 18 other groups may also distribute working documents as Internet- 19 Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six months 22 and may be updated, replaced, or obsoleted by other documents at any 23 time. It is inappropriate to use Internet-Drafts as reference 24 material or to cite them other than as "work in progress." 26 The list of current Internet-Drafts can be accessed at 27 http://www.ietf.org/ietf/1id-abstracts.txt. 29 The list of Internet-Draft Shadow Directories can be accessed at 30 http://www.ietf.org/shadow.html. 32 This Internet-Draft will expire on December 5, 2008. 34 Copyright Notice 36 Copyright (C) The IETF Trust (2008). 38 Abstract 40 The Dynamic Host Configuration Protocol for IPv6 (DHCPv6) has been 41 extended with a Leasequery capability that allows a client to request 42 information about DHCPv6 bindings. That mechanism is limited to 43 queries for individual bindings. In some situations individual 44 binding queries may not be efficient, or even possible. This 45 document expands on the Leasequery protocol, adding new query types 46 and allowing for bulk transfer of DHCPv6 binding data via TCP. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 52 3. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 4 53 4. Interaction Between UDP Leasequery and Bulk Leasequery . . . . 5 54 5. Message and Option Definitions . . . . . . . . . . . . . . . . 5 55 5.1. Message Framing for TCP . . . . . . . . . . . . . . . . . 6 56 5.2. Messages . . . . . . . . . . . . . . . . . . . . . . . . . 6 57 5.2.1. LEASEQUERY-DATA . . . . . . . . . . . . . . . . . . . 7 58 5.2.2. LEASEQUERY-DONE . . . . . . . . . . . . . . . . . . . 7 59 5.3. Query Types . . . . . . . . . . . . . . . . . . . . . . . 7 60 5.3.1. QUERY_BY_RELAY_ID . . . . . . . . . . . . . . . . . . 7 61 5.3.2. QUERY_BY_LINK_ADDRESS . . . . . . . . . . . . . . . . 8 62 5.3.3. QUERY_BY_REMOTE_ID . . . . . . . . . . . . . . . . . . 8 63 5.4. Options . . . . . . . . . . . . . . . . . . . . . . . . . 8 64 5.4.1. Relay-ID Option . . . . . . . . . . . . . . . . . . . 8 65 5.5. Status Codes . . . . . . . . . . . . . . . . . . . . . . . 9 66 5.6. Connection and Transmission Parameters . . . . . . . . . . 9 67 6. Requestor Behavior . . . . . . . . . . . . . . . . . . . . . . 10 68 6.1. Connecting . . . . . . . . . . . . . . . . . . . . . . . . 10 69 6.2. Forming Queries . . . . . . . . . . . . . . . . . . . . . 10 70 6.3. Processing Replies . . . . . . . . . . . . . . . . . . . . 10 71 6.4. Querying Multiple Servers . . . . . . . . . . . . . . . . 11 72 6.5. Multiple Queries to a Single Server . . . . . . . . . . . 11 73 6.5.1. Example . . . . . . . . . . . . . . . . . . . . . . . 12 74 6.6. Closing Connections . . . . . . . . . . . . . . . . . . . 12 75 7. Server Behavior . . . . . . . . . . . . . . . . . . . . . . . 13 76 7.1. Accepting Connections . . . . . . . . . . . . . . . . . . 13 77 7.2. Forming Replies . . . . . . . . . . . . . . . . . . . . . 13 78 7.3. Multiple or Parallel Queries . . . . . . . . . . . . . . . 14 79 7.4. Closing Connections . . . . . . . . . . . . . . . . . . . 15 80 8. Security Considerations . . . . . . . . . . . . . . . . . . . 15 81 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 82 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 16 83 11. Modification History . . . . . . . . . . . . . . . . . . . . . 16 84 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 16 85 12.1. Normative References . . . . . . . . . . . . . . . . . . . 16 86 12.2. Informative References . . . . . . . . . . . . . . . . . . 17 87 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 17 88 Intellectual Property and Copyright Statements . . . . . . . . . . 18 90 1. Introduction 92 The DHCPv6 [RFC3315] protocol specifies a mechanism for the 93 assignment of IPv6 address and configuration information to IPv6 94 nodes. IPv6 Prefix Delegation for DHCPv6 (PD) [RFC3633] specifies a 95 mechanism for DHCPv6 delegation of IPv6 prefixes and related data. 96 DHCPv6 servers maintain authoritative information including binding 97 information for delegated IPv6 prefixes. 99 The client of a PD binding is typically a router, which then 100 advertises the delegated prefix to locally-connected hosts. The 101 delegated IPv6 prefix must be routeable in order to be useful. The 102 actual DHCPv6 PD client may not be permitted to inject routes into 103 the delegating network. In service-provider (SP) networks, for 104 example, an edge router typically acts as a DHCPv6 relay agent, and 105 this edge router often has the responsibility to maintain routes 106 within the service-provider network for clients' PD bindings. 108 A DHCPv6 relay with this responsibility requires a means to recover 109 binding information from the authoritative DHCPv6 server(s) in the 110 event of replacement or reboot, in order to restore routeability to 111 delegated prefixes. The relay may be a network device without 112 adequate local storage to maintain the necessary binding-to-route 113 data. A DHCPv6 Leasequery protocol [RFC5007] has been developed that 114 allows queries for individual bindings from the authoritative DHCPv6 115 Server(s). The individual query mechanism is only useable when the 116 target binding is known to the requestor, such as upon receipt of 117 traffic. In the case of DHCPv6 Prefix Delegation, the PD binding 118 data may need to be known before any traffic arrives from the client 119 router. The DHCPv6 relay router may not be able to form individual 120 queries in such cases. 122 This document extends the DHCPv6 Leasequery protocol to add support 123 for queries that address these requirements. At the SP edge there 124 may be many thousands of delegated prefixes per relay, so we specify 125 the use of TCP [RFC4614] for efficiency of data transfer. We specify 126 a new DHCPv6 option, the Relay Identifier option, to support 127 efficient recovery of all data associated with a specific relay 128 agent; we also add a query-type for this purpose. We add query-types 129 by network segment and by Remote-ID option value, to assist a relay 130 that needs to recover a subset of its clients' bindings. 132 2. Terminology 134 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 135 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 136 document are to be interpreted as described in [RFC2119]. 138 DHCPv6 terminology is defined in [RFC3315]. DHCPv6 Leasequery 139 terminology is defined in [RFC5007]. 141 3. Protocol Overview 143 The Bulk Leasequery mechanism is modeled on the existing individual 144 Leasequery protocol in [RFC5007]; most differences arise from the use 145 of TCP. A Bulk Leasequery client opens a TCP connection to a DHCPv6 146 Server, using the DHCPv6 port 547. Note that this implies that the 147 Leasequery client has server IP address(es) available via 148 configuration or some other means, and that it has unicast IP 149 reachability to the server. No relaying for bulk leasequery is 150 specified. 152 After establishing a connection, the client sends a LEASEQUERY 153 message containing a query-type and data about bindings it is 154 interested in. The server uses the query-type and the data to 155 identify any relevant bindings. In order to support some query- 156 types, servers may have to maintain additional data structures or be 157 able to locate bindings based on specific option data. The server 158 replies with a LEASEQUERY-REPLY message, indicating the success or 159 failure of the query. If the query was successful, the server 160 includes the first client's binding data in the LEASEQUERY-REPLY 161 message also. If more than one client's bindings are being returned, 162 the server then transmits the additional client bindings in a series 163 of LEASEQUERY-DATA messages. If the server has sent at least one 164 client's bindings, it sends a LEASEQUERY-DONE message when it has 165 finished sending its replies. The client may reuse the connection to 166 send additional queries. Each end of the TCP connection can be 167 closed after all data has been sent. 169 This specification includes a new DHCPv6 option, the Relay-ID option. 170 The option contains a DUID identifying a DHCPv6 relay agent. Relay 171 agents can include this option in Relay-Forward messages they send. 172 Servers can retain the Relay-ID and associate it with bindings made 173 on behalf of the relay's clients. A relay can then recover binding 174 information about downstream clients by using the Relay-ID in a 175 LEASEQUERY message. The Relay-ID option is defined in Section 5.4.1. 177 Bulk Leasequery supports the queries by IPv6 address and by Client 178 DUID as specified in RFC5007 [RFC5007]. The Bulk Leasequery protocol 179 also adds several new queries. The new queries introduced here 180 cannot be used effectively with the UDP Leasequery protocol. 181 Requestors MUST NOT send these new query-types in RFC5007 [RFC5007] 182 query messages. 184 Query by Relay Identifier - This query asks a server for the 185 bindings associated with a specific relay; the relay is identified 186 by a DUID carried in a Relay-ID option. 188 Query by Link Address - This query asks a server for the bindings on 189 a particular network segment; the link is specified in the query's 190 link-address field. 192 Query by Remote ID - This query asks a server for the bindings 193 associated with a Relay Agent Remote-ID option [RFC4649] value. 195 4. Interaction Between UDP Leasequery and Bulk Leasequery 197 Bulk Leasequery can be seen as an extension of the existing UDP 198 Leasequery protocol [RFC5007]. This section tries to clarify the 199 relationship between the two protocols. 201 The query-types introduced in the UDP Leasequery protocol can be used 202 in the Bulk Leasequery protocol. One change in behavior is permitted 203 when Bulk Leasequery is used. RFC5007 [RFC5007], in sections 4.1.2.5 204 and 4.3.3, specifies the use of a Client Link option in LEASEQUERY- 205 REPLY messages in cases where multiple bindings were found. When 206 Bulk Leasequery is used, this mechanism is not necessary: a server 207 returning multiple bindings simply does so directly as specified in 208 this document. The Client Link option MUST NOT appear in Bulk 209 Leasequery replies. 211 Only LEASEQUERY, LEASEQUERY-REPLY, LEASEQUERY-DATA, and LEASEQUERY- 212 DONE messages are allowed over the Bulk Leasequery connection. No 213 other DHCPv6 messages are supported. The Bulk Leasequery connection 214 is not an alternative DHCPv6 communication option for clients seeking 215 DHCPv6 service. 217 The new queries introduced in this specification cannot be used with 218 the UDP Leasequery protocol. Servers that implement this 219 specification and also permit UDP queries MUST NOT accept Bulk 220 Leasequery query-types in UDP Leasequery messages. Such servers MUST 221 respond with an error status code of NotAllowed [RFC5007]. 223 5. Message and Option Definitions 224 5.1. Message Framing for TCP 226 The use of TCP for the Bulk Leasequery protocol permits one or more 227 DHCPv6 messages to be sent at a time. The receiver needs to be able 228 to determine how large each message is. Two octets containing the 229 message size in network byte-order are prepended to each DHCPv6 230 message sent on a Bulk Leasequery TCP connection. The two message- 231 size octets 'frame' each DHCPv6 message. 233 DHCPv6 message framed for TCP: 235 0 1 2 3 236 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 237 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 238 | message-size | msg-type | trans-id | 239 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 240 | transaction-id (cont'd) | | 241 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 242 | . 243 . options . 244 . (variable) . 245 | | 246 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 248 message-size the number of octets in the message that 249 follows, as a 16-bit integer in network 250 byte-order. 252 All other fields are as specified in DHCPv6 [RFC3315]. 254 5.2. Messages 256 The LEASEQUERY and LEASEQUERY-REPLY messages are defined in RFC5007 257 [RFC5007]. In a Bulk Leasequery exchange, a single LEASEQUERY-REPLY 258 message is used to indicate the success or failure of a query, and to 259 carry data that do not change in the context of a single query and 260 answer, such as the Server-ID and Client-ID options. If a query is 261 successful, only a single LEASEQUERY-REPLY message MUST appear. If 262 the server is returning binding data, the LEASEQUERY-REPLY also 263 contains the first client's binding data in an OPTION_CLIENT_DATA 264 option. 266 5.2.1. LEASEQUERY-DATA 268 The LEASEQUERY-DATA message (message type TBD) carries data about a 269 single DHCPv6 client's leases and/or PD bindings on a single link. 270 The purpose of the message is to reduce redundant data when there are 271 multiple bindings to be sent. The LEASEQUERY-DATA message MUST be 272 preceded by a LEASEQUERY-REPLY message. The LEASEQUERY-REPLY conveys 273 the query's status, carries the Leasequery's Client-ID and Server-ID 274 options, and carries the first client's binding data if the query was 275 successful. 277 LEASEQUERY-DATA MUST ONLY be sent in response to a successful 278 LEASEQUERY, and only if more than one client's data is to be sent. 279 The LEASEQUERY-DATA message's transaction-id field MUST match the 280 transaction-id of the LEASEQUERY request message. The Server-ID, 281 Client-ID, and OPTION_STATUS_CODE options SHOULD NOT be included: 282 that data should be constant for any one Bulk Leasequery reply, and 283 should have been conveyed in the LEASEQUERY-REPLY message. 285 5.2.2. LEASEQUERY-DONE 287 The LEASEQUERY-DONE message (message type TBD) indicates the end of a 288 group of related Leasequery replies. The LEASEQUERY-DONE message's 289 transaction-id field MUST match the transaction-id of the LEASEQUERY 290 request message. The presence of the message itself signals the end 291 of a stream of reply messages. A single LEASEQUERY-DONE MUST BE sent 292 after all replies (a successful LEASEQUERY-REPLY and zero or more 293 LEASEQUERY-DATA messages) to a successful Bulk Leasequery request 294 that returned at least one binding. 296 A server may encounter an error condition after it has sent the 297 initial LEASEQUERY-REPLY. In that case, it SHOULD attempt to send a 298 LEASEQUERY-DONE with an OPTION_STATUS_CODE option indicating the 299 error condition to the requestor. Other DHCPv6 options SHOULD NOT be 300 included in the LEASEQUERY-DONE message. 302 5.3. Query Types 304 The OPTION_LQ_QUERY option is defined in [RFC5007]. We introduce the 305 following new query-types: QUERY_BY_RELAY_ID, QUERY_BY_LINK_ADDRESS, 306 QUERY_BY_REMOTE_ID. These queries are designed to assist relay 307 agents in recovering binding data in circumstances where some or all 308 of the relay's binding data has been lost. 310 5.3.1. QUERY_BY_RELAY_ID 312 This query asks the server to return bindings associated with the 313 specified relay DUID. 315 QUERY_BY_RELAY_ID (3) - The query-options MUST contain an 316 OPTION_RELAY_ID option. If the link-address field is 0::0, the 317 query asks for all bindings associated with the specified relay 318 DUID. If the link-address is specified, the query asks for 319 bindings on that link. 321 5.3.2. QUERY_BY_LINK_ADDRESS 323 The QUERY_BY_LINK_ADDRESS asks the server to return bindings on a 324 network segment identified by an link-address value from a relay's 325 Relay-Forward message. 327 QUERY_BY_LINK_ADDRESS (4) - The query's link-address contains an 328 address a relay may have used in the link-address of a Relay- 329 Forward message. The Server attempts to locate bindings on the 330 same network segment as the link-address. 332 5.3.3. QUERY_BY_REMOTE_ID 334 The QUERY_BY_REMOTE_ID asks the server to return bindings associated 335 with a Remote-ID option value from a relay's Relay-Forward message. 336 The query-options MUST include a Relay Agent Remote-ID option 337 [RFC4649]. 339 In order to support this query, a server needs to record the most- 340 recent Remote-ID option value seen in a Relay-Forward message along 341 with its other binding data. 343 QUERY_BY_REMOTE_ID (5) - The query-options MUST include a Relay 344 Agent Remote-ID option [RFC4649]. If the Server has recorded 345 Remote-ID values with its bindings, it uses the option's value to 346 identify bindings to return. 348 5.4. Options 350 5.4.1. Relay-ID Option 352 The Relay-ID option carries a DUID [RFC3315]. A relay agent MAY 353 include the option in Relay-Forward messages it sends. Obviously, it 354 will not be possible for a server to respond to QUERY_BY_RELAY_ID 355 queries unless the relay agent has included this option. A relay 356 SHOULD be able to generate a DUID for this purpose, and capture the 357 result in stable storage. A relay SHOULD also allow the DUID value 358 to be configurable: doing so allows an administrator to replace a 359 relay agent while retaining the association between the relay and 360 existing DHCPv6 bindings. 362 A DHCPv6 Server MAY associate Relay-ID options from Relay-Forward 363 messages it processes with PD and/or lease bindings that result. 364 Doing so allows it to respond to QUERY_BY_RELAY_ID Leasequeries. 366 The format of the Relay-ID option is shown below: 368 0 1 2 3 369 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 370 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 371 | OPTION_RELAY_ID | option-len | 372 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 373 . . 374 . DUID . 375 . (variable length) . 376 . . 377 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 379 option-code OPTION_RELAY_ID (TBD). 381 option-len Length of DUID in octets. 383 DUID The DUID for the relay agent. 385 5.5. Status Codes 387 QueryTerminated (TBD) - Indicates that the server is unable to 388 perform a query or has prematurely terminated the query for some 389 reason (which should be communicated in the text message). This may 390 be because the server is short of resources or is being shut down. 391 The requestor may retry the query at a later time. The requestor 392 should wait at least a short interval before retrying. Note that 393 while a server may simply prematurely close its end of the 394 connection, it is preferable for the server to send a LEASEQUERY- 395 REPLY or LEASEQUERY-DONE with this status-code to notify the 396 requestor of the condition. 398 5.6. Connection and Transmission Parameters 400 DHCPv6 Servers that support Bulk Leasequery SHOULD listen for 401 incoming TCP connections on the DHCPv6 server port 547. 402 Implementations MAY offer to make the incoming port configurable, but 403 port 547 MUST be the default. Client implementations SHOULD make TCP 404 connections to port 547, and MAY offer to make the destination server 405 port configurable. 407 This section presents a table of values used to control Bulk 408 Leasequery behavior, including recommended defaults. Implementations 409 MAY make these values configurable. 411 Parameter Default Description 412 ------------------------------------------ 413 BULK_LQ_CONN_TIMEOUT 30 secs Bulk Leasequery connection timeout 414 BULK_LQ_DATA_TIMEOUT 30 secs Bulk Leasequery data timeout 415 BULK_LQ_MAX_RETRY 60 secs Max Bulk Leasequery retry timeout value 416 BULK_LQ_MAX_CONNS 10 Max Bulk Leasequery TCP connections 418 6. Requestor Behavior 420 6.1. Connecting 422 A Requestor attempts to establish a TCP connection to a DHCPv6 Server 423 in order to initiate a Leasequery exchange. The Requestor SHOULD be 424 prepared to abandon the connection attempt after 425 BULK_LQ_CONN_TIMEOUT. If the attempt fails, the Requestor MAY retry. 426 Retries MUST use an exponential backoff timer, increasing the 427 interval between attempts up to BULK_LQ_MAX_RETRY. 429 6.2. Forming Queries 431 After a connection is established, the Requestor constructs a 432 Leasequery message, as specified in [RFC5007]. The query may have 433 any of the defined query-types, and includes the options and data 434 required by the query-type chosen. The Requestor sends the message 435 size then sends the actual DHCPv6 message, as described in 436 Section 5.1. 438 If the TCP connection becomes blocked while the Requestor is sending 439 its query, the Requestor SHOULD be prepared to terminate the 440 connection after BULK_LQ_DATA_TIMEOUT. We make this recommendation 441 to allow Requestors to control the period of time they are willing to 442 wait before abandoning a connection, independent of notifications 443 from the TCP implementations they may be using. 445 6.3. Processing Replies 447 The Requestor attempts to read a LEASEQUERY-REPLY message from the 448 TCP connection. If the stream of replies becomes blocked, the 449 Requestor SHOULD be prepared to terminate the connection after 450 BULK_LQ_DATA_TIMEOUT, and MAY begin retry processing if configured to 451 do so. 453 The Requestor examines the LEASEQUERY-REPLY message, and determines 454 how to proceed. Message validation rules are specified in DHCPv6 455 Leasequery [RFC5007]. If the reply contains an error status code 456 (carried in an OPTION_STATUS_CODE option), the Requestor follows the 457 recommendations in [RFC5007]. A successful reply that does not 458 include an OPTION_CLIENT_DATA option indicates that the target server 459 had no bindings matching the query. 461 The Leasequery protocol uses the OPTION_CLIENT_LINK option as an 462 indicator that multiple bindings were present in response to a single 463 query. For Bulk Leasequery, the OPTION_CLIENT_LINK option is not 464 used, and MUST NOT be present in replies. 466 A successful LEASEQUERY-REPLY that is returning binding data includes 467 an OPTION_CLIENT_DATA option and possibly additional options. If 468 there are additional bindings to be returned, they will be carried in 469 LEASEQUERY-DATA messages. Each LEASEQUERY-DATA message contains an 470 OPTION_CLIENT_DATA option, and possibly other options. A LEASEQUERY- 471 DATA message that does not contain an OPTION_CLIENT_DATA MUST BE 472 discarded. 474 A single bulk query can result in a large number of replies. For 475 example, a single relay agent might be responsible for routes for 476 thousands of clients' delegated prefixes. The Requestor MUST be 477 prepared to receive more than one LEASEQUERY-DATA with transaction- 478 ids matching a single LEASEQUERY message. 480 The LEASEQUERY-DONE message ends a successful Bulk Leasequery request 481 that returned at least one binding. A LEASEQUERY-REPLY without any 482 bindings MUST NOT be followed by a LEASEQUERY-DONE message for the 483 same transaction-id. After receiving LEASEQUERY-DONE from a server, 484 the Requestor MAY close the TCP connection to that server. If the 485 transaction-id in the LEASEQUERY-DONE does not match an outstanding 486 LEASEQUERY message, the client MUST close the TCP connection. 488 6.4. Querying Multiple Servers 490 A Bulk Leasequery client MAY be configured to attempt to connect to 491 and query from multiple DHCPv6 servers in parallel. The DHCPv6 492 Leasequery specification [RFC5007] includes a discussion about 493 reconciling binding data received from multiple DHCPv6 servers. 495 6.5. Multiple Queries to a Single Server 497 Bulk Leasequery clients may need to make multiple queries in order to 498 recover binding information. A Requestor MAY use a single connection 499 to issue multiple queries. Each query MUST have a unique transaction 500 id. A server MAY process more than one query at a time. A server 501 that is willing to do so MAY interleave replies to the multiple 502 queries within the stream of reply messages it sends. Clients need 503 to be aware that replies for multiple queries may be interleaved 504 within the stream of reply messages. Clients that are not able to 505 process interleaved replies (based on transaction id) MUST NOT send 506 more than one query at a time. Requestors should be aware that 507 servers are not required to process queries in parallel, and that 508 servers are likely to limit the rate at which they process queries 509 from any one Requestor. 511 6.5.1. Example 513 This example illustrates what a series of queries and responses might 514 look like. This is only an example - there is no requirement that 515 this sequence must be followed, or that clients or servers must 516 support parallel queries. 518 In the example session, the client sends four queries after 519 establishing a connection. Query 1 results in a failure; query 2 520 succeeds and the stream of replies concludes before the client issues 521 any new query. Query 3 and query 4 overlap, and the server 522 interleaves its replies to those two queries. 524 Client Server 525 ------ ------ 526 LEASEQUERY xid 1 -----> 527 <----- LEASEQUERY-REPLY xid 1 (w/error) 528 LEASEQUERY xid 2 -----> 529 <----- LEASEQUERY-REPLY xid 2 530 <----- LEASEQUERY-DATA xid 2 531 <----- LEASEQUERY-DATA xid 2 532 <----- LEASEQUERY-DONE xid 2 533 LEASEQUERY xid 3 -----> 534 LEASEQUERY xid 4 -----> 535 <----- LEASEQUERY-REPLY xid 4 536 <----- LEASEQUERY-DATA xid 4 537 <----- LEASEQUERY-REPLY xid 3 538 <----- LEASEQUERY-DATA xid 4 539 <----- LEASEQUERY-DATA xid 3 540 <----- LEASEQUERY-DONE xid 3 541 <----- LEASEQUERY-DATA xid 4 542 <----- LEASEQUERY-DONE xid 4 544 6.6. Closing Connections 546 The Requestor MAY close its end of the TCP connection after sending a 547 LEASEQUERY message to the server. The Requestor MAY choose to retain 548 the connection if it intends to issue additional queries. Note that 549 this client behavior does not guarantee that the connection will be 550 available for additional queries: the server might decide to close 551 the connection based on its own configuration. 553 7. Server Behavior 555 7.1. Accepting Connections 557 Servers that implement DHCPv6 Bulk Leasequery listen for incoming TCP 558 connections. Port numbers are discussed in Section 5.6. Servers 559 MUST be able to limit the number of currently accepted and active 560 connections. The value BULK_LQ_MAX_CONNS MUST be the default; 561 implementations MAY permit the value to be configurable. 563 Servers MAY restrict Bulk Leasequery connections and LEASEQUERY 564 messages to certain clients. Connections not from permitted clients 565 SHOULD BE closed immediately, to avoid server connection resource 566 exhaustion. Servers MAY restrict some clients to certain query 567 types. Servers MAY reply to queries that are not permitted with the 568 NotAllowed status code [RFC5007], or MAY close the connection. 570 If the TCP connection becomes blocked while the server is accepting a 571 connection or reading a query, it SHOULD be prepared to terminate the 572 connection after BULK_LQ_DATA_TIMEOUT. We make this recommendation 573 to allow Servers to control the period of time they are willing to 574 wait before abandoning an inactive connection, independent of the TCP 575 implementations they may be using. 577 7.2. Forming Replies 579 The DHCPv6 Leasequery [RFC5007] specification describes the initial 580 construction of LEASEQUERY-REPLY messages and the processing of 581 QUERY_BY_ADDRESS and QUERY_BY_CLIENTID. Use of the LEASEQUERY-REPLY 582 and LEASEQUERY-DATA messages to carry multiple bindings are described 583 in Section 5.2. Message transmission and framing for TCP is 584 described in Section 5.1. If the connection becomes blocked while 585 the server is attempting to send reply messages, the server SHOULD be 586 prepared to terminate the TCP connection after BULK_LQ_DATA_TIMEOUT. 588 If the server encounters an error during initial query processing, 589 before any reply has been sent, it SHOULD send a LEASEQUERY-REPLY 590 containing an error code in an OPTION_STATUS_CODE option. This 591 signals to the requestor that no data will be returned. If the 592 server encounters an error while processing a query that has already 593 resulted in one or more reply messages, the server SHOULD send a 594 LEASEQUERY-DONE message with an error status. The server SHOULD 595 close its end of the connection as an indication that it was not able 596 to complete query processing. 598 If the server does not find any bindings satisfying a query, it 599 SHOULD send a LEASEQUERY-REPLY without an OPTION_STATUS_CODE option 600 and without any OPTION_CLIENT_DATA option. Otherwise, the server 601 sends each binding's data in a reply message. The first reply 602 message is a LEASEQUERY-REPLY. The binding data is carried in an 603 OPTION_CLIENT_DATA option, as specified in [RFC5007] and extended 604 below. The server returns subsequent bindings in LEASEQUERY-DATA 605 messages, which can avoid redundant data (such as the requestor's 606 Client-ID). 608 For QUERY_BY_RELAY_ID, the server locates each binding associated 609 with the query's Relay-ID option value. In order to give a 610 meaningful reply to a QUERY_BY_RELAY_ID, the server has to be able to 611 maintain this association in its DHCPv6 binding data. If the query's 612 link-address is not set to 0::0, the server only returns bindings on 613 links that could contain that address. If the link-address is not 614 0::0 and the server cannot find any matching links, the server SHOULD 615 return the NotConfigured status in a LEASEQUERY-REPLY. 617 For QUERY_BY_LINK_ADDRESS, the server locates each binding associated 618 with the link identified by the query's link-address value. 620 For QUERY_BY_REMOTE_ID, the server locates each binding associated 621 with the query's Relay Remote-ID option value. In order to be able 622 to give meaningful replies to this query, the server has to be able 623 to maintain this association in its binding database. If the query 624 message's link-address is not set to 0::0, the server only returns 625 bindings on links that could contain that address. If the link- 626 address is not 0::0 and the server cannot find any matching links, 627 the server SHOULD return the NotConfigured status in a LEASEQUERY- 628 REPLY. 630 The server sends the LEASEQUERY-DONE message as specified in 631 Section 5.2. 633 7.3. Multiple or Parallel Queries 635 As discussed in Section 6.5, Requestors may want to leverage an 636 existing connection if they need to make multiple queries. Servers 637 MAY support reading and processing multiple queries from a single 638 connection. A server MUST NOT read more query messages from a 639 connection than it is prepared to process simultaneously. 641 This MAY be a feature that is administratively controlled. Servers 642 that are able to process queries in parallel SHOULD offer 643 configuration that limits the number of simultaneous queries 644 permitted from any one Requestor, in order to control resource use if 645 there are multiple Requestors seeking service. 647 7.4. Closing Connections 649 The server MAY close its end of the TCP connection after sending its 650 last message (a LEASEQUERY-REPLY or a LEASEQUERY-DONE) in response to 651 a query. Alternatively, the server MAY retain the connection and 652 wait for additional queries from the client. The server SHOULD be 653 prepared to limit the number of connections it maintains, and SHOULD 654 be prepared to close idle connections to enforce the limit. 656 The server MUST close its end of the TCP connection if it encounters 657 an error sending data on the connection. The server MUST close its 658 end of the TCP connection if it finds that it has to abort an in- 659 process request. A server aborting an in-process request MAY attempt 660 to signal that to its clients by using the QueryTerminated 661 (Section 5.5) status code. If the server detects that the client end 662 has been closed, the server MUST close its end of the connection 663 after it has finished processing any outstanding requests from the 664 client. 666 8. Security Considerations 668 The "Security Considerations" section of [RFC3315] details the 669 general threats to DHCPv6. The DHCPv6 Leasequery specification 670 [RFC5007] describes recommendations for the Leasequery protocol, 671 especially with regard to relayed LEASEQUERY messages, mitigation of 672 packet-flooding DOS attacks, restriction to trusted clients, and use 673 of IPsec [RFC2401]. 675 The use of TCP introduces some additional concerns. Attacks that 676 attempt to exhaust the DHCPv6 server's available TCP connection 677 resources, such as SYN flooding attacks, can compromise the ability 678 of legitimate clients to receive service. Malicious clients who 679 succeed in establishing connections, but who then send invalid 680 queries, partial queries, or no queries at all also can exhaust a 681 server's pool of available connections. We recommend that servers 682 offer configuration to limit the sources of incoming connections, 683 that they limit the number of accepted connections and the number of 684 in-process queries from any one connection, and that they limit the 685 period of time during which an idle connection will be left open. 687 9. IANA Considerations 689 IANA is requested to assign a new DHCPv6 Option Code in the registry 690 maintained in http://www.iana.org/assignments/dhcpv6-parameters: 692 OPTION_RELAY_ID 694 IANA is requested to assign a new value in the registry of DHCPv6 695 Status Codes maintained in 696 http://www.iana.org/assignments/dhcpv6-parameters: 698 QueryTerminated 700 IANA is requested to assign values for the following new DHCPv6 701 Message types in the registry maintained in 702 http://www.iana.org/assignments/dhcpv6-parameters: 704 LEASEQUERY-DONE 705 LEASEQUERY-DATA 707 IANA is requested to assign the following new values in the registry 708 of query-types for the DHCPv6 OPTION_LQ_QUERY option: 709 QUERY_BY_RELAY_ID 710 QUERY_BY_LINK_ADDRESS 711 QUERY_BY_REMOTE_ID 713 10. Acknowledgements 715 Many of the ideas in this document were originally proposed by Kim 716 Kinnear, Richard Johnson, Hemant Singh, Ole Troan, and Bernie Volz. 717 Further suggestions and improvements were made by participants in the 718 DHC working group, including John Brzozowski, Marcus Goller, Ted 719 Lemon, and Bud Millwood. 721 11. Modification History 723 12. References 725 12.1. Normative References 727 [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., 728 and M. Carney, "Dynamic Host Configuration Protocol for 729 IPv6 (DHCPv6)", RFC 3315, July 2003. 731 [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic 732 Host Configuration Protocol (DHCP) version 6", RFC 3633, 733 December 2003. 735 [RFC4614] Duke, M., Braden, R., Eddy, W., and E. Blanton, "A Roadmap 736 for Transmission Control Protocol (TCP) Specification 737 Documents", RFC 4614, September 2006. 739 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 740 Requirement Levels", BCP 14, RFC 2119, March 1997. 742 [RFC4649] Volz, B., "Dynamic Host Configuration Protocol for IPv6 743 (DHCPv6) Relay Agent Remote-ID Option", RFC 4649, 744 August 2006. 746 [RFC5007] Brzozowski, J., Kinnear, K., Volz, B., and S. Zeng, 747 "DHCPv6 Leasequery", RFC 5007, September 2007. 749 12.2. Informative References 751 [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for the 752 Internet Protocol", RFC 2401, November 1998. 754 Author's Address 756 Mark Stapp 757 Cisco Systems, Inc. 758 1414 Massachusetts Ave. 759 Boxborough, MA 01719 760 USA 762 Phone: +1 978 936 0000 763 Email: mjs@cisco.com 765 Full Copyright Statement 767 Copyright (C) The IETF Trust (2008). 769 This document is subject to the rights, licenses and restrictions 770 contained in BCP 78, and except as set forth therein, the authors 771 retain all their rights. 773 This document and the information contained herein are provided on an 774 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 775 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 776 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 777 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 778 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 779 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 781 Intellectual Property 783 The IETF takes no position regarding the validity or scope of any 784 Intellectual Property Rights or other rights that might be claimed to 785 pertain to the implementation or use of the technology described in 786 this document or the extent to which any license under such rights 787 might or might not be available; nor does it represent that it has 788 made any independent effort to identify any such rights. Information 789 on the procedures with respect to rights in RFC documents can be 790 found in BCP 78 and BCP 79. 792 Copies of IPR disclosures made to the IETF Secretariat and any 793 assurances of licenses to be made available, or the result of an 794 attempt made to obtain a general license or permission for the use of 795 such proprietary rights by implementers or users of this 796 specification can be obtained from the IETF on-line IPR repository at 797 http://www.ietf.org/ipr. 799 The IETF invites any interested party to bring to its attention any 800 copyrights, patents or patent applications, or other proprietary 801 rights that may cover technology that may be required to implement 802 this standard. Please address the information to the IETF at 803 ietf-ipr@ietf.org. 805 Acknowledgment 807 Funding for the RFC Editor function is provided by the IETF 808 Administrative Support Activity (IASA).