idnits 2.17.1 draft-zheng-netconf-fragmentation-02.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 : ---------------------------------------------------------------------------- ** There are 9 instances of too long lines in the document, the longest one being 21 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 26, 2018) is 2128 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- No issues found here. Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Netconf G. Zheng 3 Internet-Draft M. Wang 4 Intended status: Informational Huawei 5 Expires: December 28, 2018 June 26, 2018 7 A NETCONF Extension for Data Fragmentation 8 draft-zheng-netconf-fragmentation-02 10 Abstract 12 This document introduces an extension to NETCONF (Network 13 Configuration) protocol. The extension allows NETCONF to handle 14 large size data as fragmented RPC messages. Specifically, this 15 document defines a new capability and relevant operations 16 to handle the fragmentations. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at https://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on December 28, 2018. 35 Copyright Notice 37 Copyright (c) 2018 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (https://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 2. Concept and Terminology . . . . . . . . . . . . . . . . . . . 3 54 2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 55 3. Current Large size Handling Methods and Problems . . . . . . 3 56 3.1. Stream-Oriented Handling . . . . . . . . . . . . . . . . 3 57 3.2. Requesting a Portion of Data . . . . . . . . . . . . . . 4 58 3.3. Using tools to extract data respectively . . . . . . . . 4 59 4. Netconf Fragmentation Mechanism . . . . . . . . . . . . . . . 5 60 4.1. Fragmentation Requirements . . . . . . . . . . . . . . . 5 61 4.2. extention . . . . . . . . . . . . . . . . . . 5 62 5. YANG data model . . . . . . . . . . . . . . . . . . . . . . . 6 63 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 64 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 65 8. Normative References . . . . . . . . . . . . . . . . . . . . 8 66 Appendix A. Appendix A: Examples of the Candidate Solutions . . 9 67 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 69 1. Introduction 71 NETCONF [RFC6241] is the next generation network management protocol 72 for configuring devices. It is becoming more and more popular, and 73 some NMS (Network Management System) only use NETCONF as its 74 southbound interface. The message procedures of NETCONF are based on 75 RPC (Remote Procedure Call) interactions. A NETCONF client/server 76 sends a message to the counterpart and then receives a replying 77 message. 79 In some situations, the message might be very large. For 80 example, when NMS is retrieving a large amount of routes in a core 81 router or doing a full-synchronizing with a device, the 82 data might exceed Mega-Byte amount. And also in some scenarios, the 83 client may retrieve a continuous stream of operational data from the 84 operational datastore [I-D.ietf-netmod-revised-datastores] to perform 85 network analytics. Then there comes the problem of how to handle the 86 large size data. This document briefly introduces two typical ways 87 of current handling on this issue; and analyzes the problems of them. 89 To fix the problems, in Section 4, this document proposes a method of 90 extending the NETCONF protocol to allow handling large size data as 91 fragmented messages. The fragmentation is done at the 92 NETCONF level, so it allows the NETCONF client to terminate the large 93 size data processing momentarily by protocol interactions; and also 94 allows the fragmented messages to be instantly parsed piece by piece. 95 Specifically, the fragmentation is achieved through a newly defined 96 capability and relevant operations. 98 2. Concept and Terminology 100 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 101 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 102 document are to be interpreted as described in [RFC2119]. 104 2.1. Terminology 106 DOM: Document Object Model, which is a cross-platform and language- 107 independent convention for representing and interacting with objects 108 in HTML, XHTML and XML documents. Objects in the DOM tree may be 109 addressed and manipulated by using methods on the objects. 111 SAX: Simple API for XML, which is an event sequential access parser 112 API developed by the XML-DEV mailing list for XML documents. SAX 113 provides a mechanism for reading data from an XML document that is an 114 alternative to that provided by the DOM. Where the DOM operates on 115 the document as a whole, SAX parsers operate on each piece of the XML 116 document sequentially. 118 libxml: a software library for parsing XML documents. 120 : a capability and operation defined in this document to 121 handle large size 123 3. Current Large size Handling Methods and Problems 125 3.1. Stream-Oriented Handling 127 Stream-Oriented handling mainly includes the following two aspects: 129 o The server encapsulates the large size replying data in a message and streams it to the client through TCP protocol. 132 o The client parses the received content in a stream- 133 oriented way. More specifically, the client could utilize SAX to 134 instantly parse the received content without waiting for the whole 135 message been transported. 137 Problems: 139 o Stream-Oriented method lacks the capability of discontinuing 140 large size processing in the server. It would cause unnecessary 141 resource/performance cost in the devices if the NMS has already 142 got the intended portion or just canceled by the administrators. 144 o Another problem is the implementation of SAX parsing is more 145 complex than DOM parsing in the Netconf client. More computing 146 burden will be taken in Netconf client to support SAX parsing. 148 3.2. Requesting a Portion of Data 150 The clients actively limit the search range of the data so that the 151 servers only need to reply with a part of the large size data. Thus 152 the clients could control the replies in a reasonable size. One 153 example is that the clients get a list of the content, and provide a 154 start offset and a max-count, to get a portion at a time. 156 Problems: 158 o This method has an implication that the client needs to know the 159 list/index of the intended large size data in advance before it 160 starting the search request. It can't fit the scenarios of real- 161 time on-demand data retrieving. And there is no standard to 162 specify the list/index format in a uniform way. Thus it is only 163 suitable for private implementation, thus multi-vendor interaction 164 is not supported. 166 o More important, it is just an indirect way to solve the problem. 167 It could not fit the scenarios where the client just needs the 168 whole large size data in the server. 170 3.3. Using tools to extract data respectively 172 There are some tools/functions which can handle the iteration. For 173 example, the XPATH's position() function can help to do this work. 174 The following examples show some instances: 176 178 180 Problems: 182 o Xpath function just can meet the "xpath filter" case, which 183 cannot cover the "subtree filter" case. 185 o Different encoding format request different tools, and there is 186 no standard to process the received data in a uniform way. Thus 187 it is only suitable for private implementation, thus multi-vendor 188 interaction is not supported. 190 4. Netconf Fragmentation Mechanism 192 4.1. Fragmentation Requirements 194 this document proposes an RPC fragmentation mechanism to handle the 195 large size data. Two essential requirements of the fragmentation 196 are: 198 o It needs to allow the NETCONF client to terminate the large size 199 data processing momentarily by protocol interactions. In the 200 proposed mechanisms in this draft, when the NETCONF server replies 201 the client an fragmentation, it will wait the response 202 from the client that whether it needs to send the next 203 fragmentation. So if the initiator has got the intended portion, 204 it could terminate the large size process immediately. 206 o It needs to allow the NETCONF client to instantly parse the 207 fragmentations piece by piece through the more widely supported 208 DOM parsing. So in this document, it specifies that each fragmentation MUST be in a complete XML form. 211 4.2. extention 213 o Function 215 The devices can only use operation when the Get-block 216 capability was announced. 218 The fragmentation rules are: 220 A. There should be a Max-Size for fragmentation. [Ope 221 Question]Should there be a clear specification of the size? E.g. 222 64K bytes. 224 B. When the message reaches the Max-Size, it is sent to the 225 client and the next message could be created in advance. 227 C. Different records from one same table could be put into 228 different messages 230 D. All of the fields in one record MUST be put into one message. 233 E. XML syntax MUST be complete in each fragmented message, so 234 that each fragmentation could be parsed individually. 236 F. If the record(s) of the child node(s)/table(s) and the parent 237 node(s)/table(s) are replied in different fragmentations, the 238 child node/table fragmentations MUST include the path and index 239 information of all the ancestor node(s)/table(s) in a hierarchical 240 mode. 242 o Parameters 244 : in operation, if the parameter is conveyed, it means the operation is 246 terminated. Then it doesn't need to reply the remaining 247 fragmentations. 249 o Successful Operation Reply 251 A message conveying a element indicates the 252 operation is successful. If there exists a next fragment, then an 253 set-id attribute MUST be included in the messge. The 254 attribute set-id is used to identify different fragment sets. 256 o Exception Handling 258 After the NETCONF server replies a fragment, if there is no 259 corresponding Get-block request from the client in a reasonable 260 period (the time valued to be specified in the future), then the 261 server release the offset of the replying data and cannot use operation anymore, and the remaining data needs to be replied. 264 Please refer to Appendix A.1 for an example. 266 5. YANG data model 268 file "ietf-netconf-fragmentation@2018-06-20.yang" 269 module ietf-netconf-fragmentation { 270 yang-version 1.1; 271 namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-fragmentation"; 272 prefix fgm; 274 import ietf-datastores{ 275 prefix ds; 276 } 278 import ietf-yang-types { 279 prefix yang; 280 } 282 import ietf-netconf { 283 prefix nc; 284 } 285 organization 286 "IETF NETCONF Working Group"; 287 contact 288 "WG Web: 290 WG List: 292 Author: Guangying Zheng 293 295 Author: Zitao Wang 296 "; 297 description 298 "This document introduces an extension to NETCONF (Network Configuration) protocol. 299 The extension allows NETCONF to handle large size data as fragmented RPC messages. 300 Specifically, this document defines a new get-block capability and relevant 301 operations to handle the fragmentations."; 303 revision 2018-06-20 { 304 description 305 "Initial revision."; 306 reference "draft-zheng-netconf-fragmentation-01"; 307 } 309 rpc get-block { 310 description 311 "Retrieve data from an NMDA datastore."; 312 input { 313 leaf source { 314 type identityref { 315 base ds:datastore; 316 } 317 mandatory true; 318 description 319 "Datastore from which to retrieve data."; 320 } 322 choice filter-spec { 323 description 324 "The content filter specification for this request."; 326 anydata subtree-filter { 327 description 328 "This parameter identifies the portions of the 329 target datastore to retrieve."; 330 reference "RFC 6241, Section 6."; 331 } 332 leaf xpath-filter { 333 if-feature nc:xpath; 334 type yang:xpath1.0; 335 description 336 "This parameter contains an XPath expression 337 identifying the portions of the target 338 datastore to retrieve."; 339 } 340 } 341 } 342 } 343 rpc discard-fragmentation { 344 description 345 "Discard the netconf fragmentation, if the discard parameter is conveyed, 346 it means the operation is terminated. 347 Then it doesn't need to reply the remaining fragmentations."; 348 } 350 } 351 353 6. Security Considerations 355 TBD. 357 7. IANA Considerations 359 TBD. 361 8. Normative References 363 [I-D.ietf-netmod-revised-datastores] 364 Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 365 and R. Wilton, "Network Management Datastore 366 Architecture", draft-ietf-netmod-revised-datastores-10 367 (work in progress), January 2018. 369 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 370 Requirement Levels", BCP 14, RFC 2119, 371 DOI 10.17487/RFC2119, March 1997, 372 . 374 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 375 and A. Bierman, Ed., "Network Configuration Protocol 376 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 377 . 379 Appendix A. Appendix A: Examples of the Candidate Solutions 381 A.1. (RPC Fragmentation) Example: 383 Example 1: Get the next fragment 385 387 388 389 390 391 392 393 394 395 396 397 399 403 404 405 406 407 root 408 superuser 409 Charlie Root 410 411 1 412 1 413 414 415 416 417 418 419 421 423 425 426 427 431 432 433 434 435 admin 436 commonuser 437 Jim Green 438 439 9 440 90 441 442 443 444 445 446 447 449 Example 2: Abandon the remaining fragments 451 453 454 455 456 458 460 461 463 Authors' Addresses 465 Guangying Zheng 466 Huawei 467 101 Software Avenue, Yuhua District 468 Nanjing, Jiangsu 210012 469 China 471 Email: zhengguangying@huawei.com 472 Michael Wang 473 Huawei 474 101 Software Avenue, Yuhua District 475 Nanjing, Jiangsu 210012 476 China 478 Email: wangzitao@huawei.com