idnits 2.17.1 draft-ietf-dhc-dhcpv6-bulk-leasequery-01.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 773. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 784. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 791. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 797. 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 247 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 (May 21, 2008) is 5818 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 (ref. '1') (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 3633 (ref. '2') (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 4614 (ref. '3') (Obsoleted by RFC 7414) -- Obsolete informational reference (is this intentional?): RFC 2401 (ref. '7') (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: November 22, 2008 May 21, 2008 6 DHCPv6 Bulk Leasequery 7 draft-ietf-dhc-dhcpv6-bulk-leasequery-01.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 November 22, 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_RELAYID . . . . . . . . . . . . . . . . . . . 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 [1] protocol specifies a mechanism for the assignment of 93 IPv6 address and configuration information to IPv6 nodes. IPv6 94 Prefix Delegation for DHCPv6 (PD) [2] specifies a mechanism for 95 DHCPv6 delegation of IPv6 prefixes and related data. DHCPv6 servers 96 maintain authoritative information including binding information for 97 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 [6] 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 [3] for efficiency of data transfer. We specify a new 126 DHCPv6 option, the Relay Identifier option, to support efficient 127 recovery of all data associated with a specific relay agent; we also 128 add a query-type for this purpose. We add query-types by network 129 segment and by Remote-ID option value, to assist a relay that needs 130 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 [4]. 138 DHCPv6 terminology is defined in [1]. DHCPv6 Leasequery terminology 139 is defined in [6]. 141 3. Protocol Overview 143 The Bulk Leasequery mechanism is modeled on the existing individual 144 Leasequery protocol in [6]; most differences arise from the use of 145 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 [6]. The Bulk Leasequery protocol also 179 adds several new queries. The new queries introduced here cannot be 180 used effectively with the UDP Leasequery protocol. Requestors MUST 181 NOT send these new query-types in RFC5007 [6] query messages. 183 Query by Relay Identifier - This query asks a server for the 184 bindings associated with a specific relay; the relay is identified 185 by a DUID carried in a Relay-ID option. 187 Query by Link Address - This query asks a server for the bindings on 188 a particular network segment; the link is specified in the query's 189 link-address field. 191 Query by Remote ID - This query asks a server for the bindings 192 associated with a Relay Agent Remote-ID option [5] value. 194 4. Interaction Between UDP Leasequery and Bulk Leasequery 196 Bulk Leasequery can be seen as an extension of the existing UDP 197 Leasequery protocol [6]. This section tries to clarify the 198 relationship between the two protocols. 200 The query-types introduced in the UDP Leasequery protocol can be used 201 in the Bulk Leasequery protocol. One change in behavior is permitted 202 when Bulk Leasequery is used. RFC5007 [6], in sections 4.1.2.5 and 203 4.3.3, specifies the use of a Client Link option in LEASEQUERY-REPLY 204 messages in cases where multiple bindings were found. When Bulk 205 Leasequery is used, this mechanism is not necessary: a server 206 returning multiple bindings simply does so directly as specified in 207 this document. The Client Link option MUST NOT appear in Bulk 208 Leasequery replies. 210 Only LEASEQUERY, LEASEQUERY-REPLY, LEASEQUERY-DATA, and LEASEQUERY- 211 DONE messages are allowed over the Bulk Leasequery connection. No 212 other DHCPv6 messages are supported. The Bulk Leasequery connection 213 is not an alternative DHCPv6 communication option for clients seeking 214 DHCPv6 service. 216 The new queries introduced in this specification cannot be used with 217 the UDP Leasequery protocol. Servers that implement this 218 specification and also permit UDP queries MUST NOT accept Bulk 219 Leasequery query-types in UDP Leasequery messages. Such servers MUST 220 respond with an error status code of NotAllowed [6]. 222 5. Message and Option Definitions 223 5.1. Message Framing for TCP 225 The use of TCP for the Bulk Leasequery protocol permits one or more 226 DHCPv6 messages to be sent at a time. The receiver needs to be able 227 to determine how large each message is. Two octets containing the 228 message size in network byte-order are prepended to each DHCPv6 229 message sent on a Bulk Leasequery TCP connection. The two message- 230 size octets 'frame' each DHCPv6 message. 232 DHCPv6 message framed for TCP: 234 0 1 2 3 235 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 236 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 237 | message-size | msg-type | trans-id | 238 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 239 | transaction-id (cont'd) | | 240 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 241 | . 242 . options . 243 . (variable) . 244 | | 245 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 247 message-size the number of octets in the message that 248 follows, as a 16-bit integer in network 249 byte-order. 251 All other fields are as specified in DHCPv6 [1]. 253 5.2. Messages 255 The LEASEQUERY and LEASEQUERY-REPLY messages are defined in RFC5007 256 [6]. In a Bulk Leasequery exchange, a single LEASEQUERY-REPLY 257 message is used to indicate the success or failure of a query, and to 258 carry data that do not change in the context of a single query and 259 answer, such as the Server-ID and Client-ID options. If a query is 260 successful, only a single LEASEQUERY-REPLY message MUST appear. If 261 the server is returning binding data, the LEASEQUERY-REPLY also 262 contains the first client's binding data in an OPTION_CLIENT_DATA 263 option. 265 5.2.1. LEASEQUERY-DATA 267 The LEASEQUERY-DATA message (message type TBD) carries data about a 268 single DHCPv6 client's leases and/or PD bindings on a single link. 269 The purpose of the message is to reduce redundant data when there are 270 multiple bindings to be sent. The LEASEQUERY-DATA message MUST be 271 preceded by a LEASEQUERY-REPLY message. The LEASEQUERY-REPLY conveys 272 the query's status, carries the Leasequery's Client-ID and Server-ID 273 options, and carries the first client's binding data if the query was 274 successful. 276 LEASEQUERY-DATA MUST ONLY be sent in response to a successful 277 LEASEQUERY, and only if more than one client's data is to be sent. 278 The LEASEQUERY-DATA message's transaction-id field MUST match the 279 transaction-id of the LEASEQUERY request message. The Server-ID, 280 Client-ID, and OPTION_STATUS_CODE options SHOULD NOT be included: 281 that data should be constant for any one Bulk Leasequery reply, and 282 should have been conveyed in the LEASEQUERY-REPLY message. 284 5.2.2. LEASEQUERY-DONE 286 The LEASEQUERY-DONE message (message type TBD) indicates the end of a 287 group of related Leasequery replies. The LEASEQUERY-DONE message's 288 transaction-id field MUST match the transaction-id of the LEASEQUERY 289 request message. The presence of the message itself signals the end 290 of a stream of reply messages. A single LEASEQUERY-DONE MUST BE sent 291 after all replies (a successful LEASEQUERY-REPLY and zero or more 292 LEASEQUERY-DATA messages) to a successful Bulk Leasequery request 293 that returned at least one binding. 295 A server may encounter an error condition after it has sent the 296 initial LEASEQUERY-REPLY. In that case, it SHOULD attempt to send a 297 LEASEQUERY-DONE with an OPTION_STATUS_CODE option indicating the 298 error condition to the requestor. Other DHCPv6 options SHOULD NOT be 299 included in the LEASEQUERY-DONE message. 301 5.3. Query Types 303 The OPTION_LQ_QUERY option is defined in [6]. We introduce the 304 following new query-types: QUERY_BY_RELAYID, QUERY_BY_LINK_ADDRESS, 305 QUERY_BY_REMOTE_ID. These queries are designed to assist relay 306 agents in recovering binding data in circumstances where some or all 307 of the relay's binding data has been lost. 309 5.3.1. QUERY_BY_RELAYID 311 This query asks the server to return bindings associated with the 312 specified relay DUID. 314 QUERY_BY_RELAYID (3) - The query-options MUST contain an 315 OPTION_RELAYID option. If the link-address field is 0::0, the 316 query asks for all bindings associated with the specified relay 317 DUID. If the link-address is specified, the query asks for 318 bindings on that link. 320 5.3.2. QUERY_BY_LINK_ADDRESS 322 The QUERY_BY_LINK_ADDRESS asks the server to return bindings on a 323 network segment identified by an link-address value from a relay's 324 Relay-Forward message. 326 QUERY_BY_LINK_ADDRESS (4) - The query's link-address contains an 327 address a relay may have used in the link-address of a Relay- 328 Forward message. The Server attempts to locate bindings on the 329 same network segment as the link-address. 331 5.3.3. QUERY_BY_REMOTE_ID 333 The QUERY_BY_REMOTE_ID asks the server to return bindings associated 334 with a Remote-ID option value from a relay's Relay-Forward message. 335 The query-options MUST include a Relay Agent Remote-ID option [5]. 337 In order to support this query, a server needs to record the most- 338 recent Remote-ID option value seen in a Relay-Forward message along 339 with its other binding data. 341 QUERY_BY_REMOTE_ID (5) - The query-options MUST include a Relay 342 Agent Remote-ID option [5]. If the Server has recorded Remote-ID 343 values with its bindings, it uses the option's value to identify 344 bindings to return. 346 5.4. Options 348 5.4.1. Relay-ID Option 350 The Relay-ID option carries a DUID [1]. A relay agent MAY include 351 the option in Relay-Forward messages it sends. Obviously, it will 352 not be possible for a server to respond to QUERY_BY_RELAYID queries 353 unless the relay agent has included this option. A relay SHOULD be 354 able to generate a DUID for this purpose, and capture the result in 355 stable storage. A relay SHOULD also allow the DUID value to be 356 configurable: doing so allows an administrator to replace a relay 357 agent while retaining the association between the relay and existing 358 DHCPv6 bindings. 360 A DHCPv6 Server MAY associate Relay-ID options from Relay-Forward 361 messages it processes with PD and/or lease bindings that result. 362 Doing so allows it to respond to QUERY_BY_RELAYID Leasequeries. 364 The format of the Relay-ID option is shown below: 366 0 1 2 3 367 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 368 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 369 | OPTION_RELAYID | option-len | 370 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 371 . . 372 . DUID . 373 . (variable length) . 374 . . 375 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 377 option-code OPTION_RELAYID (TBD). 379 option-len Length of DUID in octets. 381 DUID The DUID for the relay agent. 383 5.5. Status Codes 385 QueryTerminated (TBD) - Indicates that the server is unable to 386 perform a query or has prematurely terminated the query for some 387 reason (which should be communicated in the text message). This may 388 be because the server is short of resources or is being shut down. 389 The requestor may retry the query at a later time. The requestor 390 should wait at least a short interval before retrying. Note that 391 while a server may simply prematurely close its end of the 392 connection, it is preferable for the server to send a LEASEQUERY- 393 REPLY or LEASEQUERY-DONE with this status-code to notify the 394 requestor of the condition. 396 5.6. Connection and Transmission Parameters 398 DHCPv6 Servers that support Bulk Leasequery SHOULD listen for 399 incoming TCP connections on the DHCPv6 server port 547. 400 Implementations MAY offer to make the incoming port configurable, but 401 port 547 MUST be the default. Client implementations SHOULD make TCP 402 connections to port 547, and MAY offer to make the destination server 403 port configurable. 405 This section presents a table of values used to control Bulk 406 Leasequery behavior, including recommended defaults. Implementations 407 MAY make these values configurable. 409 Parameter Default Description 410 ------------------------------------------ 411 BULK_LQ_CONN_TIMEOUT 30 secs Bulk Leasequery connection timeout 412 BULK_LQ_DATA_TIMEOUT 30 secs Bulk Leasequery data timeout 413 BULK_LQ_MAX_RETRY 60 secs Max Bulk Leasequery retry timeout value 414 BULK_LQ_MAX_CONNS 10 Max Bulk Leasequery TCP connections 416 6. Requestor Behavior 418 6.1. Connecting 420 A Requestor attempts to establish a TCP connection to a DHCPv6 Server 421 in order to initiate a Leasequery exchange. The Requestor SHOULD be 422 prepared to abandon the connection attempt after 423 BULK_LQ_CONN_TIMEOUT. If the attempt fails, the Requestor MAY retry. 424 Retries MUST use an exponential backoff timer, increasing the 425 interval between attempts up to BULK_LQ_MAX_RETRY. 427 6.2. Forming Queries 429 After a connection is established, the Requestor constructs a 430 Leasequery message, as specified in [6]. The query may have any of 431 the defined query-types, and includes the options and data required 432 by the query-type chosen. The Requestor sends the message size then 433 sends the actual DHCPv6 message, as described in Section 5.1. 435 If the TCP connection becomes blocked while the Requestor is sending 436 its query, the Requestor SHOULD be prepared to terminate the 437 connection after BULK_LQ_DATA_TIMEOUT. We make this recommendation 438 to allow Requestors to control the period of time they are willing to 439 wait before abandoning a connection, independent of notifications 440 from the TCP implementations they may be using. 442 6.3. Processing Replies 444 The Requestor attempts to read a LEASEQUERY-REPLY message from the 445 TCP connection. If the stream of replies becomes blocked, the 446 Requestor SHOULD be prepared to terminate the connection after 447 BULK_LQ_DATA_TIMEOUT, and MAY begin retry processing if configured to 448 do so. 450 The Requestor examines the LEASEQUERY-REPLY message, and determines 451 how to proceed. Message validation rules are specified in DHCPv6 452 Leasequery [6]. If the reply contains an error status code (carried 453 in an OPTION_STATUS_CODE option), the Requestor follows the 454 recommendations in [6]. A successful reply that does not include an 455 OPTION_CLIENT_DATA option indicates that the target server had no 456 bindings matching the query. 458 The Leasequery protocol uses the OPTION_CLIENT_LINK option as an 459 indicator that multiple bindings were present in response to a single 460 query. For Bulk Leasequery, the OPTION_CLIENT_LINK option is not 461 used, and MUST NOT be present in replies. 463 A successful LEASEQUERY-REPLY that is returning binding data includes 464 an OPTION_CLIENT_DATA option and possibly additional options. If 465 there are additional bindings to be returned, they will be carried in 466 LEASEQUERY-DATA messages. Each LEASEQUERY-DATA message contains an 467 OPTION_CLIENT_DATA option, and possibly other options. A LEASEQUERY- 468 DATA message that does not contain an OPTION_CLIENT_DATA MUST BE 469 discarded. 471 A single bulk query can result in a large number of replies. For 472 example, a single relay agent might be responsible for routes for 473 thousands of clients' delegated prefixes. The Requestor MUST be 474 prepared to receive more than one LEASEQUERY-DATA with transaction- 475 ids matching a single LEASEQUERY message. 477 The LEASEQUERY-DONE message ends a successful Bulk Leasequery request 478 that returned at least one binding. A LEASEQUERY-REPLY without any 479 bindings MUST NOT be followed by a LEASEQUERY-DONE message for the 480 same transaction-id. After receiving LEASEQUERY-DONE from a server, 481 the Requestor MAY close the TCP connection to that server. If the 482 transaction-id in the LEASEQUERY-DONE does not match an outstanding 483 LEASEQUERY message, the client MUST close the TCP connection. 485 6.4. Querying Multiple Servers 487 A Bulk Leasequery client MAY be configured to attempt to connect to 488 and query from multiple DHCPv6 servers in parallel. The DHCPv6 489 Leasequery specification [6] includes a discussion about reconciling 490 binding data received from multiple DHCPv6 servers. 492 6.5. Multiple Queries to a Single Server 494 Bulk Leasequery clients may need to make multiple queries in order to 495 recover binding information. A Requestor MAY use a single connection 496 to issue multiple queries. Each query MUST have a unique transaction 497 id. A server MAY process more than one query at a time. A server 498 that is willing to do so MAY interleave replies to the multiple 499 queries within the stream of reply messages it sends. Clients need 500 to be aware that replies for multiple queries may be interleaved 501 within the stream of reply messages. Clients that are not able to 502 process interleaved replies (based on transaction id) MUST NOT send 503 more than one query at a time. Requestors should be aware that 504 servers are not required to process queries in parallel, and that 505 servers are likely to limit the rate at which they process queries 506 from any one Requestor. 508 6.5.1. Example 510 This example illustrates what a series of queries and responses might 511 look like. This is only an example - there is no requirement that 512 this sequence must be followed, or that clients or servers must 513 support parallel queries. 515 In the example session, the client sends four queries after 516 establishing a connection. Query 1 results in a failure; query 2 517 succeeds and the stream of replies concludes before the client issues 518 any new query. Query 3 and query 4 overlap, and the server 519 interleaves its replies to those two queries. 521 Client Server 522 ------ ------ 523 LEASEQUERY xid 1 -----> 524 <----- LEASEQUERY-REPLY xid 1 (w/error) 525 LEASEQUERY xid 2 -----> 526 <----- LEASEQUERY-REPLY xid 2 527 <----- LEASEQUERY-DATA xid 2 528 <----- LEASEQUERY-DATA xid 2 529 <----- LEASEQUERY-DONE xid 2 530 LEASEQUERY xid 3 -----> 531 LEASEQUERY xid 4 -----> 532 <----- LEASEQUERY-REPLY xid 4 533 <----- LEASEQUERY-DATA xid 4 534 <----- LEASEQUERY-REPLY xid 3 535 <----- LEASEQUERY-DATA xid 4 536 <----- LEASEQUERY-DATA xid 3 537 <----- LEASEQUERY-DONE xid 3 538 <----- LEASEQUERY-DATA xid 4 539 <----- LEASEQUERY-DONE xid 4 541 6.6. Closing Connections 543 The Requestor MAY close its end of the TCP connection after sending a 544 LEASEQUERY message to the server. The Requestor MAY choose to retain 545 the connection if it intends to issue additional queries. Note that 546 this client behavior does not guarantee that the connection will be 547 available for additional queries: the server might decide to close 548 the connection based on its own configuration. 550 7. Server Behavior 552 7.1. Accepting Connections 554 Servers that implement DHCPv6 Bulk Leasequery listen for incoming TCP 555 connections. Port numbers are discussed in Section 5.6. Servers 556 MUST be able to limit the number of currently accepted and active 557 connections. The value BULK_LQ_MAX_CONNS MUST be the default; 558 implementations MAY permit the value to be configurable. 560 Servers MAY restrict Bulk Leasequery connections and LEASEQUERY 561 messages to certain clients. Connections not from permitted clients 562 SHOULD BE closed immediately, to avoid server connection resource 563 exhaustion. Servers MAY restrict some clients to certain query 564 types. Servers MAY reply to queries that are not permitted with the 565 NotAllowed status code [6], or MAY close the connection. 567 If the TCP connection becomes blocked while the server is accepting a 568 connection or reading a query, it SHOULD be prepared to terminate the 569 connection after BULK_LQ_DATA_TIMEOUT. We make this recommendation 570 to allow Servers to control the period of time they are willing to 571 wait before abandoning an inactive connection, independent of the TCP 572 implementations they may be using. 574 7.2. Forming Replies 576 The DHCPv6 Leasequery [6] specification describes the initial 577 construction of LEASEQUERY-REPLY messages and the processing of 578 QUERY_BY_ADDRESS and QUERY_BY_CLIENTID. Use of the LEASEQUERY-REPLY 579 and LEASEQUERY-DATA messages to carry multiple bindings are described 580 in Section 5.2. Message transmission and framing for TCP is 581 described in Section 5.1. If the connection becomes blocked while 582 the server is attempting to send reply messages, the server SHOULD be 583 prepared to terminate the TCP connection after BULK_LQ_DATA_TIMEOUT. 585 If the server encounters an error during initial query processing, 586 before any reply has been sent, it SHOULD send a LEASEQUERY-REPLY 587 containing an error code in an OPTION_STATUS_CODE option. This 588 signals to the requestor that no data will be returned. If the 589 server encounters an error while processing a query that has already 590 resulted in one or more reply messages, the server SHOULD send a 591 LEASEQUERY-DONE message with an error status. The server SHOULD 592 close its end of the connection as an indication that it was not able 593 to complete query processing. 595 If the server does not find any bindings satisfying a query, it 596 SHOULD send a LEASEQUERY-REPLY without an OPTION_STATUS_CODE option 597 and without any OPTION_CLIENT_DATA option. Otherwise, the server 598 sends each binding's data in a reply message. The first reply 599 message is a LEASEQUERY-REPLY. The binding data is carried in an 600 OPTION_CLIENT_DATA option, as specified in [6] and extended below. 601 The server returns subsequent bindings in LEASEQUERY-DATA messages, 602 which can avoid redundant data (such as the requestor's Client-ID). 604 For QUERY_BY_RELAYID, the server locates each binding associated with 605 the query's Relay-ID option value. In order to give a meaningful 606 reply to a QUERY_BY_RELAYID, the server has to be able to maintain 607 this association in its DHCPv6 binding data. If the query's link- 608 address is not set to 0::0, the server only returns bindings on links 609 that could contain that address. If the link-address is not 0::0 and 610 the server cannot find any matching links, the server SHOULD return 611 the NotConfigured status in a LEASEQUERY-REPLY. 613 For QUERY_BY_LINK_ADDRESS, the server locates each binding associated 614 with the link identified by the query's link-address value. 616 For QUERY_BY_REMOTE_ID, the server locates each binding associated 617 with the query's Relay Remote-ID option value. In order to be able 618 to give meaningful replies to this query, the server has to be able 619 to maintain this association in its binding database. If the query 620 message's link-address is not set to 0::0, the server only returns 621 bindings on links that could contain that address. If the link- 622 address is not 0::0 and the server cannot find any matching links, 623 the server SHOULD return the NotConfigured status in a LEASEQUERY- 624 REPLY. 626 The server sends the LEASEQUERY-DONE message as specified in 627 Section 5.2. 629 7.3. Multiple or Parallel Queries 631 As discussed in Section 6.5, Requestors may want to leverage an 632 existing connection if they need to make multiple queries. Servers 633 MAY support reading and processing multiple queries from a single 634 connection. A server MUST NOT read more query messages from a 635 connection than it is prepared to process simultaneously. 637 This MAY be a feature that is administratively controlled. Servers 638 that are able to process queries in parallel SHOULD offer 639 configuration that limits the number of simultaneous queries 640 permitted from any one Requestor, in order to control resource use if 641 there are multiple Requestors seeking service. 643 7.4. Closing Connections 645 The server MAY close its end of the TCP connection after sending its 646 last message (a LEASEQUERY-REPLY or a LEASEQUERY-DONE) in response to 647 a query. Alternatively, the server MAY retain the connection and 648 wait for additional queries from the client. The server SHOULD be 649 prepared to limit the number of connections it maintains, and SHOULD 650 be prepared to close idle connections to enforce the limit. 652 The server MUST close its end of the TCP connection if it encounters 653 an error sending data on the connection. The server MUST close its 654 end of the TCP connection if it finds that it has to abort an in- 655 process request. A server aborting an in-process request MAY attempt 656 to signal that to its clients by using the QueryTerminated 657 (Section 5.5) status code. If the server detects that the client end 658 has been closed, the server MUST close its end of the connection 659 after it has finished processing any outstanding requests from the 660 client. 662 8. Security Considerations 664 The "Security Considerations" section of [1] details the general 665 threats to DHCPv6. The DHCPv6 Leasequery specification [6] describes 666 recommendations for the Leasequery protocol, especially with regard 667 to relayed LEASEQUERY messages, mitigation of packet-flooding DOS 668 attacks, restriction to trusted clients, and use of IPsec [7]. 670 The use of TCP introduces some additional concerns. Attacks that 671 attempt to exhaust the DHCPv6 server's available TCP connection 672 resources, such as SYN flooding attacks, can compromise the ability 673 of legitimate clients to receive service. Malicious clients who 674 succeed in establishing connections, but who then send invalid 675 queries, partial queries, or no queries at all also can exhaust a 676 server's pool of available connections. We recommend that servers 677 offer configuration to limit the sources of incoming connections, 678 that they limit the number of accepted connections and the number of 679 in-process queries from any one connection, and that they limit the 680 period of time during which an idle connection will be left open. 682 9. IANA Considerations 684 IANA is requested to assign a new DHCPv6 Option Code in the registry 685 maintained in http://www.iana.org/assignments/dhcpv6-parameters: 687 OPTION_RELAYID 689 IANA is requested to assign a new value in the registry of DHCPv6 690 Status Codes maintained in 691 http://www.iana.org/assignments/dhcpv6-parameters: 693 QueryTerminated 695 IANA is requested to assign values for the following new DHCPv6 696 Message types in the registry maintained in 697 http://www.iana.org/assignments/dhcpv6-parameters: 699 LEASEQUERY-DONE 700 LEASEQUERY-DATA 702 IANA is requested to assign the following new values in the registry 703 of query-types for the DHCPv6 OPTION_LQ_QUERY option: 704 QUERY_BY_RELAYID 705 QUERY_BY_LINK_ADDRESS 706 QUERY_BY_REMOTE_ID 708 10. Acknowledgements 710 Many of the ideas in this document were originally proposed by Kim 711 Kinnear, Richard Johnson, Hemant Singh, Ole Troan, and Bernie Volz. 712 Further suggestions and improvements were made by participants in the 713 DHC working group, including John Brzozowski, Marcus Goller, Ted 714 Lemon, and Bud Millwood. 716 11. Modification History 718 12. References 720 12.1. Normative References 722 [1] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., and M. 723 Carney, "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)", 724 RFC 3315, July 2003. 726 [2] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic Host 727 Configuration Protocol (DHCP) version 6", RFC 3633, 728 December 2003. 730 [3] Duke, M., Braden, R., Eddy, W., and E. Blanton, "A Roadmap for 731 Transmission Control Protocol (TCP) Specification Documents", 732 RFC 4614, September 2006. 734 [4] Bradner, S., "Key words for use in RFCs to Indicate Requirement 735 Levels", BCP 14, RFC 2119, March 1997. 737 [5] Volz, B., "Dynamic Host Configuration Protocol for IPv6 (DHCPv6) 738 Relay Agent Remote-ID Option", RFC 4649, August 2006. 740 [6] Brzozowski, J., Kinnear, K., Volz, B., and S. Zeng, "DHCPv6 741 Leasequery", RFC 5007, September 2007. 743 12.2. Informative References 745 [7] Kent, S. and R. Atkinson, "Security Architecture for the 746 Internet Protocol", RFC 2401, November 1998. 748 Author's Address 750 Mark Stapp 751 Cisco Systems, Inc. 752 1414 Massachusetts Ave. 753 Boxborough, MA 01719 754 USA 756 Phone: +1 978 936 0000 757 Email: mjs@cisco.com 759 Full Copyright Statement 761 Copyright (C) The IETF Trust (2008). 763 This document is subject to the rights, licenses and restrictions 764 contained in BCP 78, and except as set forth therein, the authors 765 retain all their rights. 767 This document and the information contained herein are provided on an 768 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 769 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 770 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 771 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 772 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 773 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 775 Intellectual Property 777 The IETF takes no position regarding the validity or scope of any 778 Intellectual Property Rights or other rights that might be claimed to 779 pertain to the implementation or use of the technology described in 780 this document or the extent to which any license under such rights 781 might or might not be available; nor does it represent that it has 782 made any independent effort to identify any such rights. Information 783 on the procedures with respect to rights in RFC documents can be 784 found in BCP 78 and BCP 79. 786 Copies of IPR disclosures made to the IETF Secretariat and any 787 assurances of licenses to be made available, or the result of an 788 attempt made to obtain a general license or permission for the use of 789 such proprietary rights by implementers or users of this 790 specification can be obtained from the IETF on-line IPR repository at 791 http://www.ietf.org/ipr. 793 The IETF invites any interested party to bring to its attention any 794 copyrights, patents or patent applications, or other proprietary 795 rights that may cover technology that may be required to implement 796 this standard. Please address the information to the IETF at 797 ietf-ipr@ietf.org. 799 Acknowledgment 801 Funding for the RFC Editor function is provided by the IETF 802 Administrative Support Activity (IASA).