idnits 2.17.1 draft-sun-softwire-yang-05.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 20 instances of too long lines in the document, the longest one being 37 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 232 has weird spacing: '...v4-addr ine...' == Line 423 has weird spacing: '...-change ine...' -- The document date (July 8, 2016) is 2841 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 6536 (Obsoleted by RFC 8341) == Outdated reference: A later version (-25) exists of draft-ietf-netmod-routing-cfg-22 == Outdated reference: A later version (-07) exists of draft-sivakumar-yang-nat-04 Summary: 2 errors (**), 0 flaws (~~), 5 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Softwire Working Group Q. Sun 3 Internet-Draft H. Wang 4 Intended status: Standards Track Y. Cui 5 Expires: January 9, 2017 Tsinghua University 6 I. Farrer 7 S. Zoric 8 Deutsche Telekom AG 9 M. Boucadair 10 Orange 11 R. Asati 12 Cisco Systems, Inc. 13 July 8, 2016 15 A YANG Data Model for IPv4-in-IPv6 Softwires 16 draft-sun-softwire-yang-05 18 Abstract 20 This document defines a YANG data model for the configuration and 21 operations (state, notification, RPC etc.) of IPv4-in-IPv6 Softwire 22 Border Routers and Customer Premises Equipment. The model covers the 23 Lightweight 4over6, MAP-E and MAP-T Softwire mechanisms. 25 Requirements Language 27 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 28 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 29 document are to be interpreted as described in [RFC2119]. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at http://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on January 9, 2017. 48 Copyright Notice 50 Copyright (c) 2016 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (http://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with respect 58 to this document. Code Components extracted from this document must 59 include Simplified BSD License text as described in Section 4.e of 60 the Trust Legal Provisions and are provided without warranty as 61 described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 66 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 67 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 68 1.3. YANG Modelling of NAT44 Functionality . . . . . . . . . . 4 69 2. Common . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 70 3. Lightweight 4over6 . . . . . . . . . . . . . . . . . . . . . 4 71 4. MAP-E and MAP-T . . . . . . . . . . . . . . . . . . . . . . . 4 72 5. Softwire YANG Tree Diagrams . . . . . . . . . . . . . . . . . 4 73 5.1. Common Tree Diagrams . . . . . . . . . . . . . . . . . . 4 74 5.2. Lightweight 4over6 Tree Diagrams . . . . . . . . . . . . 5 75 5.3. MAP-E and MAP-T Tree Diagrams . . . . . . . . . . . . . . 8 76 5.4. Notifications for Softwire YANG . . . . . . . . . . . . . 9 77 6. Softwire YANG Model . . . . . . . . . . . . . . . . . . . . . 10 78 7. Example of Configure lw4o6 Binding-Table . . . . . . . . . . 26 79 8. Security Considerations . . . . . . . . . . . . . . . . . . . 27 80 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 81 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28 82 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 28 83 11.1. Normative References . . . . . . . . . . . . . . . . . . 28 84 11.2. Informative References . . . . . . . . . . . . . . . . . 29 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 30 87 1. Introduction 89 The IETF Softwire Working Group has developed several IPv4-in-IPv6 90 Softwire mechanisms to address various deployment contexts and 91 constraints. As a companion to the architectural specification 92 documents, this document focuses on the provisioning of A+P softwire 93 functional elements: Border Routers (BRs) and Customer Premises 94 Equipment (CEs). 96 This document defines a YANG data model [RFC6020] that can be used to 97 configure and manage A+P Softwire elements using the NETCONF protocol 98 [RFC6241]. DS-Lite YANG data model is defined in 99 [I-D.boucadair-softwire-dslite-yang]. 101 The Softwire YANG model is structured into two sub-models: 103 o Lightweight 4over6 [RFC7596] 105 o MAP-E [RFC7597] and MAP-T [RFC7599] (combined due to their common 106 configuration parameters). 108 Two root containers are defined: 110 1. Container "softwire-config" holds the collection of YANG 111 definitions common to all Softwire element configuration. 113 2. Container "softwire-state" holds YANG definitions for the 114 operational state of the Softwire elements. 116 A NETCONF notify module is also included. 118 This approach has been taken so that the model can be easily extended 119 to support additional Softwire mechanisms, if required. 121 1.1. Terminology 123 The reader should be familiar with the concepts and terms defined in 124 [RFC7596], [RFC7597], [RFC7599], and the YANG data modelling language 125 [RFC6020]. 127 1.2. Tree Diagrams 129 The meaning of the symbols in these diagrams are as follows: 131 o Brackets "[" and "]" enclose list keys. 133 o Braces "{" and "}" enclose feature content. 135 o Parentheses "(" and ")" enclose choice and case nodes, and case 136 nodes are also marked with a colon (":"). 138 o Symbols after data node names: "?" means an optional node, and "*" 139 denotes a list and leaf-list. 141 o Abbreviations before data node names: "rw" means configuration 142 data (read-write), and "ro" means state data (read-only). 144 1.3. YANG Modelling of NAT44 Functionality 146 The model does not include CPE NAT-specific provisioning parameters 147 that may be used for IPv4 address sharing other than the external IP 148 address and port set which a softwire client may use for NAT44. NAT- 149 specific considerations are out of scope of this document. A YANG 150 model for the configuration and management of NAT gateways is 151 described in [I-D.sivakumar-yang-nat]. 153 2. Common 155 The following sections of the document are structured with the root 156 of the Softwire YANG model (common to all mechanisms) described 157 first. Subsequent sections describe the models relevant to the 158 different softwire mechanisms. All functions are listed, but the 159 YANG models use the "feature" statement to distinguish among the 160 different softwire mechanisms. This document defines a new module 161 named "ietf-softwire" for Softwire data models such that this module 162 auments "ietf-ipv6-unicast-routing" module that is defined in 163 [I-D.ietf-netmod-routing-cfg]. 165 3. Lightweight 4over6 167 Lightweight 4over6 (binding) includes two elements: lwAFTR (BR) and 168 lwB4 (CE). The lwAFTR holds configuration for IPv4-IPv6 address 169 bindings which are used for the forwarding of traffic originating 170 from lwB4s. 172 The lwB4 is configured with the relevant parameters for establishing 173 the IPv4-in-IPv6 tunnel including an IPv6 address for the lwAFTR and 174 the IPv4 configuration for NAT44. 176 4. MAP-E and MAP-T 178 MAP-E and MAP-T elements are provisioned with the MAP rules necessary 179 for defining MAP domains and forwarding rules. For MAP-T CEs, an 180 additional "ipv6-prefix" parameter is also included. Note that when 181 referring to MAP-E/T (algorithm), the CE and BR shares the same model 182 for configuration and management. 184 5. Softwire YANG Tree Diagrams 186 5.1. Common Tree Diagrams 188 Figure 1 describes the high level softwire YANG data model and the 189 way tree is organized is common to all of the different softwire 190 mechanisms listed in Section 1: 192 +--rw softwire-config 193 | +--rw description? string 194 | +--rw binding {binding}? 195 | | +--rw br {br}? 196 | | +--rw cr {cr}? 197 | +--rw algorithm {algorithm}? 198 | 199 +--ro softwire-state 200 +--ro description? string 201 +--ro binding {binding}? 202 | +--ro br {br}? 203 | +--ro ce {ce}? 204 +--ro algorithm {algorithm}? 206 Figure 1: High Level Softwire YANG Tree Organization 208 5.2. Lightweight 4over6 Tree Diagrams 210 Figure 2 defines the softwire data model for lw4o6 (softwire binding 211 mode) which includes lwAFTR (BR) and lwB4 (CE): 213 module: ietf-softwire 214 +--rw softwire-config 215 | +--... 216 | +--rw binding {binding}? 217 | +--rw br {br}? 218 | | +--rw enable? boolean 219 | | +--rw br-instances 220 | | +--rw br-instance* [id] 221 | | +--rw binding-table-versioning 222 | | | +--rw binding-table-version? uint64 223 | | | +--rw binding-table-date? yang:date-and-time 224 | | +--rw id uint32 225 | | +--rw name? string 226 | | +--rw softwire-num-threshold uint32 227 | | +--rw tunnel-payload-mtu uint16 228 | | +--rw tunnel-path-mru uint16 229 | | +--rw binding-table 230 | | +--rw binding-entry* [binding-ipv6info] 231 | | +--rw binding-ipv6info union 232 | | +--rw binding-ipv4-addr inet:ipv4-address 233 | | +--rw port-set 234 | | | +--rw psid-offset uint8 235 | | | +--rw psid-len uint8 236 | | | +--rw psid uint16 237 | | +--rw br-ipv6-addr inet:ipv6-address 238 | | +--rw lifetime? uint32 239 | +--rw ce {ce}? 240 | +--rw enable? boolean 241 | +--rw ce-instances 242 | +--rw ce-instance* [binding-ipv6info] 243 | +--rw name? string 244 | +--rw tunnel-payload-mtu uint16 245 | +--rw tunnel-path-mru uint16 246 | +--rw b4-ipv6-addr-format boolean 247 | +--rw binding-ipv6info union 248 | +--rw binding-ipv4-addr inet:ipv4-address 249 | +--rw port-set 250 | | +--rw psid-offset uint8 251 | | +--rw psid-len uint8 252 | | +--rw psid uint16 253 | +--rw br-ipv6-addr inet:ipv6-address 254 | +--rw lifetime? uint32 255 +--ro softwire-state 256 +--... 257 +--ro binding {binding}? 258 +--ro br {br}? 259 | +--ro br-instances 260 | +--ro br-instance* [id] 261 | +--ro id uint32 262 | +--ro name? string 263 | +--ro sentPacket? yang:zero-based-counter64 264 | +--ro sentByte? yang:zero-based-counter64 265 | +--ro rcvdPacket? yang:zero-based-counter64 266 | +--ro rcvdByte? yang:zero-based-counter64 267 | +--ro droppedPacket? yang:zero-based-counter64 268 | +--ro droppedByte? yang:zero-based-counter64 269 | +--ro active-softwire-num? uint32 270 | +--ro binding-table 271 | +--ro binding-entry* [binding-ipv6info] 272 | +--ro binding-ipv6info union 273 | +--ro active? boolean 274 +--ro ce {ce}? 275 +--ro ce-instances 276 +--ro ce-instance* [binding-ipv6info] 277 +--ro name? string 278 +--ro binding-ipv6info union 279 +--ro sentPacket? yang:zero-based-counter64 280 +--ro sentByte? yang:zero-based-counter64 281 +--ro rcvdPacket? yang:zero-based-counter64 282 +--ro rcvdByte? yang:zero-based-counter64 283 +--ro droppedPacket? yang:zero-based-counter64 284 +--ro droppedByte? yang:zero-based-counter64 286 Figure 2: Softwire Lightweight 4over6 Data Model Tree Structure 288 The data model assumes that each CE/BR instance can: be enable/ 289 disabled, be provisioned with a dedicated configuration data, and 290 maintain its own binding table. 292 Additional information on some of the important lwAFTR nodes is 293 provided below: 295 o binding-table-versioning: optionally used to add a incremental 296 version number and/or timestamp to the binding table. This can be 297 used for logging/data retention purposes. The version number is 298 incremented and a new timestamp value written whenever a change is 299 made to the contents of the binding table or a new binding table 300 list is created. 302 o binding-entry: used to define the binding relationship between 303 3-tuples, which contains the lwB4's IPv6 address/prefix, the 304 allocated IPv4 address and restricted port-set. For detail 305 information, please refer to [RFC7596]. 307 o tunnel-payload-mtu: used to set the IPv4 MTU for the lw4o6 tunnel. 309 o tunnel-path-mru: used to set the maximum lw4o6 IPv6 encapsulating 310 packet size that can be received. 312 o psid-offset: used to set the number of offset bits. 314 o psid-len: defines the number of ports that will be allocated for 315 the softwire. 317 o psid: used to identify the set of ports allocated for a specific 318 softwire. 320 o tunnel-num-threshold: used to set the maximum number of tunnels 321 that can be created on the lw4o6 device simultaneously. 323 o active-tunnel-num (ro): used to present the number of tunnels 324 currently provisioned on the device. 326 o active (ro): used to show the status of particular binding-entry. 328 Additional information on some of the important lwB4 nodes is 329 provided below: 331 o b4-ipv6-addr-format: indicates the format of lwB4 IPv6 address. 332 If set to true, it indicates that the IPv6 source address of the 333 lwB4 is constructed according to the description in Section 6 of 334 [RFC7597]; if set to false, the lwB4 can use any /128 address from 335 the assigned IPv6 prefix. 337 o binding-ipv6info: used to set the IPv6 address type which is 338 combined in a binding entry, for a complete address or a prefix. 340 5.3. MAP-E and MAP-T Tree Diagrams 342 Figure 3 defines the softwire data model for MAP-E and MAP-T: 344 module: ietf-softwire 345 +--rw softwire-config 346 | +--... 347 | +--rw algorithm {algorithm}? 348 | +--rw enable? boolean 349 | +--rw algorithm 350 | +--rw algo-instance* [id] 351 | +--rw algo-versioning 352 | | +--rw algo-version? uint64 353 | | +--rw algo-date? yang:date-and-time 354 | +--rw id uint32 355 | +--rw name? string 356 | +--rw data-plane enumeration 357 | +--rw ea-len uint8 358 | +--rw rule-ipv6-prefix inet:ipv6-prefix 359 | +--rw rule-ipv4-prefix inet:ipv4-prefix 360 | +--rw forwarding boolean 361 | +--rw psid-offset uint8 362 | +--rw psid-len uint8 363 | +--rw tunnel-payload-mtu uint16 364 | +--rw tunnel-path-mru uint16 365 | +--rw br-ipv6-addr inet:ipv6-address 366 | +--rw dmr-ipv6-addr inet:ipv6-prefix 367 +--ro softwire-state 368 +--... 369 +--ro algorithm {algorithm}? 370 +--ro algo-instances 371 +--ro algo-instance* [id] 372 +--ro id int32 373 +--ro name? string 374 +--ro sentPacket? yang:zero-based-counter64 375 +--ro sentByte? yang:zero-based-counter64 376 +--ro rcvdPacket? yang:zero-based-counter64 377 +--ro rcvdByte? yang:zero-based-counter64 378 +--ro droppedPacket? yang:zero-based-counter64 379 +--ro droppedByte? yang:zero-based-counter64 381 Figure 3: Softwire MAP-E and MAP-T Data Model Structure 383 Additional information on some of the important MAP-E and MAP-T nodes 384 is provided below: 386 o algo-versioning: optionally used to add a incremental version 387 number and/or timestamp to the algorithm. This can be used for 388 logging/data retention purposes. The version number is 389 incremented and a new timestamp value written whenever a change is 390 made to the algorithm or a new instance is created. 392 o forwarding: specifies whether the rule can be used as a Forward 393 Mapping Rule (FMR). If not set, this rule is a Basic Mapping Rule 394 (BMR) only and must not be used for forwarding. See Section 4.1 395 of [RFC7598]. 397 o ea-len: used to set the length of the Embedded-Address (EA), which 398 defined in the mapping rule for a MAP domain. 400 o dmr-ipv6-prefix: defines the Default Mapping Rule (DMR) for MAP-T. 401 This parameter is optional when configuring a MAP-T BR. 403 o stat-count (ro): use to show the numbers of packets and bytes 404 information of specific device respectively. 406 5.4. Notifications for Softwire YANG 408 This section describes the tree structure for notifications. These 409 notifications pertain to the configuration and monitoring portions of 410 the specific Softwire mechanisms. The logic is that the softwire 411 instance notifies the NETCONF client with the index for a mapping 412 entry and the NETCONF client retrieves the related information from 413 the operational datastore of that instance. 415 module: ietf-softwire 416 notifications: 417 +---n softwire-binding-br-event {binding,br}? 418 | +--ro br-id? -> /softwire-state/binding/br/.../id 419 | +--ro invalid-entry* -> /softwire-config/binding/br/.../binding-table/binding-entry/binding-ipv6info 420 | +--ro added-entry* inet:ipv6-address 421 | +--ro modified-entry* -> /softwire-config/binding/br/.../binding-table/binding-entry/binding-ipv6info 422 +---n softwire-binding-ce-event {binding,ce}? 423 | +--ro ce-binding-ipv6-addr-change inet:ipv6-address 424 +---n softwire-algorithm-instance-event {algorithm}? 425 +--ro algo-id -> /softwire-config/algorithm/.../id 426 +--ro invalid-entry* -> /softwire-config/algorithm/.../id 427 +--ro added-entry* -> /softwire-config/algorithm/.../id 428 +--ro modified-entry* -> /softwire-config/algorithm/.../id 430 Figure 4: Softwire Notifications Data Model Structure 432 Additional information on some of the important notification nodes is 433 listed below: 435 o invalid-entry, added-entry, modified-entry: used to notify the 436 client that a specific binding entry or MAP rule is expired or 437 invalidated, added, or modified. 439 o ce-binding-ipv6-addr-change: used to notify that the lwB4's 440 binding-ipv6-address has been changed or the value of the 441 'b4-ipv6-addr-format' is "False". 443 6. Softwire YANG Model 445 This module imports typedefs from [RFC6991]. 447 file "ietf-softwire@2016-06-04.yang" 449 module ietf-softwire { 450 namespace "urn:ietf:params:xml:ns:yang:ietf-softwire"; 451 prefix "softwire"; 453 import ietf-inet-types {prefix inet; } 454 import ietf-yang-types {prefix yang; } 456 organization "Softwire Working Group"; 458 contact 459 " 460 Qi Sun 461 Hao Wang 462 Yong Cui 463 Ian 464 Sladjana Zoric 465 Mohamed Boucadair 466 Rajiv 467 "; 469 description 470 "This document defines a YANG data model for the configuration and 471 management of A+P Softwire Border Routers (BRs) and Customer 472 Premises Equipment (CEs). It covers Lightweight 4over6, 473 MAP-E and MAP-T mechanisms. 475 Copyright (c) 2016 IETF Trust and the persons identified 476 as authors of the code. All rights reserved. 477 This version of this YANG module is part of RFC XXX; see the RFC 478 itself for full legal notices."; 480 revision 2016-06-04 { 481 description 482 "Version-05: Combined MAP-E/MAP-T into a single tree. Added binding 483 table/alogorthm versioning"; 484 reference "-05"; 485 } 487 revision 2015-09-30 { 488 description 489 "Version-04: Fix YANG syntax; Add flags to map-rule; Remove 490 the map-rule-type element. "; 491 reference "-04"; 492 } 494 revision 2015-04-07 { 495 description 496 "Version-03: Integrate lw4over6; Updata state nodes; Correct 497 grammar errors; Reuse groupings; Update descriptions. 498 Simplify the model."; 499 reference "-03"; 500 } 502 revision 2015-02-10 { 503 description 504 "Version-02: Add notifications."; 505 reference "-02"; 506 } 508 revision 2015-02-06 { 509 description 510 "Version-01: Correct grammar errors; Reuse groupings; Update 511 descriptions."; 512 reference "-01"; 513 } 515 revision 2015-02-02 { 516 description 517 "Initial revision."; 518 reference "-00"; 519 } 521 /* 522 * Features 523 */ 525 feature binding { 526 description 527 "Lightweight 4over6 (binding) is an IPv4-over-IPv6 tunnelling 528 transition mechanism. Lightweight 4over6 is a solution designed 529 specifically for complete independence between IPv6 subnet 530 prefix (and /128 IPv6 address) and IPv4 address with or 531 without IPv4 address sharing. 533 This is accomplished by maintaining state for 534 each softwire (per-subscriber state) in the central lwAFTR and 535 a hub-and-spoke forwarding architecture. In order to delegate 536 the NAPT function and achieve IPv4 address sharing, 537 port-restricted IPv4 addresses needs to be allocated to CEs. 539 Besides lw4o6, this feature also covers MAP in 1:1 mode 540 (offset=0, PSID explicit)"; 542 reference 543 "RFC7596"; 544 } 546 feature br { 547 if-feature binding; 548 description 549 "The AFTR for Lightweight 4over6, so-called lwAFTR (BR). This 550 feature indicates that a instance functions as a lwAFTR (BR). 551 A lwAFTR (BR) is an IPv4-in-IPv6 tunnel concentrator that 552 maintains per-subscriber IPv4-IPv6 address binding."; 553 } 555 feature ce { 556 if-feature binding; 557 description 558 "The B4 for Lightweight 4over6, so-called lwB4 (CE). This 559 feature indicates that a instance functions as a lwB4 (CE). A 560 lwB4 (ce) is an IPv4-in-IPv6 tunnel initiator. It is 561 dual-stack capable node, either a directly connected end-host 562 or a CE. It sources IPv4 connections using the configured 563 port-set and the public IPv4 address."; 564 } 566 feature algorithm { 567 description 568 "MAP-E is an IPv6 transition mechanism for transporting IPv4 569 packets across an IPv6 network using IP encapsulation. MAP-E 570 allows for a reduction of the amount of centralized state using 571 rules to express IPv4/IPv6 address mappings. This introduces an 572 algorithmic relationship between the IPv6 subnet 573 and IPv4 address. 574 The Mapping of Address and Port - Translation (MAP-T) 575 architecture is a double stateless NAT64 based solution. It uses 576 the stateless algorithmic address & transport layer port mapping 577 scheme defined in MAP-E. The MAP-T solution differs from MAP-E in 578 the use of IPv4-IPv6 translation, rather than encapsulation, as 579 the form of IPv6 domain transport. 580 This feature indicates the instance functions as a MAP-E or 581 MAP-T instance."; 582 reference 583 "RFC7597 & RFC7599"; 584 } 586 /* 587 * Grouping 588 */ 590 grouping port-set { 591 description 592 "Use the PSID algorithm to represent a range of transport layer 593 ports."; 594 leaf psid-offset { 595 type uint8 { 596 range 0..16; 597 } 598 mandatory true; 599 description 600 "The number of offset bits. In Lightweight 4over6, the default 601 value is 0 for assigning one contiguous port range. In MAP-E/T, 602 the default value is 6, which excludes system ports by default 603 and assigns distributed port ranges. If the this parameter is 604 larger than 0, the value of offset MUST be greater than 0."; 605 } 606 leaf psid-len { 607 type uint8 { 608 range 0..15; 609 } 610 mandatory true; 611 description 612 "The length of PSID, representing the sharing ratio for an 613 IPv4 address."; 614 } 615 leaf psid { 616 type uint16; 617 mandatory true; 618 description 619 "Port Set Identifier (PSID) value, which identifies a set 620 of ports algorithmically."; 621 } 622 } 624 grouping binding-entry { 625 description 626 "The lwAFTR maintains an address binding table that contains 627 the binding between the lwB4's IPv6 address, the allocated IPv4 628 address and restricted port-set."; 629 leaf binding-ipv6info { 630 type union { 631 type inet:ipv6-address; 632 type inet:ipv6-prefix; 633 } 634 mandatory true; 635 description 636 "The IPv6 information for a binding entry. 637 If it's an IPv6 prefix, it indicates that 638 the IPv6 source address of the lwB4 is constructed 639 according to the description in RFC7596; 640 if it's an IPv6 address, it means the lwB4 uses 641 any /128 address from the assigned IPv6 prefix. 642 "; 643 } 644 leaf binding-ipv4-addr { 645 type inet:ipv4-address; 646 mandatory true; 647 description 648 "The IPv4 address assigned to the lwB4, which is 649 used as the IPv4 external address 650 for lwB4 local NAPT44."; 651 } 652 container port-set { 653 description 654 "For Lightweight 4over6, the default value 655 of offset should be 0, to configure one contiguous 656 port range."; 657 uses port-set { 658 refine psid-offset { 659 default "0"; 660 } 661 } 662 } 663 leaf br-ipv6-addr { 664 type inet:ipv6-address; 665 mandatory true; 666 description 667 "The IPv6 address for lwaftr."; 668 } 669 leaf lifetime { 670 type uint32; 671 units seconds; 672 description "The lifetime for the binding entry"; 673 } 675 } 677 /* 678 grouping nat-table { 680 description 681 "Grouping 'nat-table' is not extended. The current mechanism 682 is focusing on the provisioning of external IP address and 683 port set; other NAT-specific considerations are out of scope."; 684 } 685 */ 687 grouping traffic-stat { 688 description "Traffic statistics"; 689 leaf sentPacket { 690 type yang:zero-based-counter64; 691 description "Number of packets sent."; 692 } 693 leaf sentByte { 694 type yang:zero-based-counter64; 695 description "Traffic sent, in bytes"; 696 } 697 leaf rcvdPacket { 698 type yang:zero-based-counter64; 699 description "Number of packets received."; 700 } 701 leaf rcvdByte { 702 type yang:zero-based-counter64; 703 description "Traffic received, in bytes"; 704 } 705 leaf droppedPacket { 706 type yang:zero-based-counter64; 707 description "Number of packets dropped."; 708 } 709 leaf droppedByte { 710 type yang:zero-based-counter64; 711 description "Traffic dropped, in bytes"; 712 } 713 } 715 /* 716 * Configuration Data Nodes 717 */ 719 container softwire-config { 720 description 721 "The configuration data for Softwire instances. And the shared 722 data describes the softwire data model which is common to all of 723 the different softwire mechanisms, such as description."; 724 leaf description { 725 type string; 726 description 727 "A textual description of Softwire."; 728 } 729 container binding { 730 if-feature binding; 731 description 732 "lw4over6 (binding) configuration."; 733 container br { 734 if-feature br; 735 description 736 "Indicate this instance supports the lwAFTR (BR) function. 737 The instances advertise the BR feature through the 738 capability exchange mechanism when a NETCONF session is 739 established."; 740 leaf enable { 741 type boolean; 742 description 743 "Enable/disable the lwAFTR (BR) function."; 744 } 745 container br-instances { 746 description 747 "A set of BRs to be configured."; 748 list br-instance { 749 key "id"; 750 description 751 "A set of lwAFTRs to be configured."; 752 container binding-table-version { 753 description "binding table's version"; 754 leaf binding-table-version{ 755 type uint64; 756 description "Incremental version number 757 to the binding table"; 758 } 759 leaf binding-table-date { 760 type yang:date-and-time; 761 description "Timestamp to the binding 762 table"; 763 } 764 } 765 leaf id { 766 type uint32; 767 mandatory true; 768 description "An instance identifier."; 770 } 771 leaf name { 772 type string; 773 description "The name for the lwaftr."; 774 } 775 leaf softwire-num-threshold { 776 type uint32; 777 mandatory true; 778 description 779 "The maximum number of tunnels that can be created on 780 the lwAFTR."; 781 } 782 leaf tunnel-payload-mtu { 783 type uint16; 784 mandatory true; 785 description 786 "The payload MTU for Lightweight 4over6 tunnel."; 787 } 788 leaf tunnel-path-mru { 789 type uint16; 790 mandatory true; 791 description 792 "The path MRU for Lightweight 4over6 tunnel."; 793 } 794 container binding-table { 795 description "binding table"; 796 list binding-entry { 797 key "binding-ipv6info"; 798 description "binding entry"; 799 uses binding-entry; 800 } 801 } 802 } 803 } 804 } 806 container ce { 807 if-feature ce; 808 description 809 "Indicate this instance supports the lwB4 (CE) function. 810 The instances advertise the CE feature through the 811 capability exchange mechanism when a NETCONF session is 812 established."; 813 leaf enable { 814 type boolean; 815 description 816 "Enable/disable the lwB4 (CE) function."; 817 } 818 container ce-instances { 819 description 820 "A set of CEs to be configured."; 821 list ce-instance { 822 key "binding-ipv6info"; 823 description "instances for CE"; 824 leaf name { 825 type string; 826 description "The CE's name."; 827 } 828 leaf tunnel-payload-mtu { 829 type uint16; 830 mandatory true; 831 description 832 "The payload MTU for Lightweight 4over6 tunnel."; 833 } 834 leaf tunnel-path-mru { 835 type uint16; 836 mandatory true; 837 description 838 "The path MRU for Lightweight 4over6 tunnel."; 839 } 840 leaf b4-ipv6-addr-format { 841 type boolean; 842 mandatory true; 843 description 844 "The format of lwB4 (CE) IPv6 address. If set to true, 845 it indicates that the IPv6 source address of the lwB4 846 is constructed according to the description in 847 [RFC7596]; if set to false, the lwB4 (CE) 848 can use any /128 address from the assigned IPv6 849 prefix."; 850 } 851 uses binding-entry; 852 } 853 } 854 } 855 } 857 container algorithm { 858 if-feature algorithm; 859 description 860 "Indicate the instances support the MAP-E and MAP-T function. 861 The instances advertise the map-e feature through the 862 capability exchange mechanism when a NETCONF session is 863 established."; 864 leaf enable { 865 type boolean; 866 description 867 "Enable/disable the MAP-E or MAP-T function."; 868 } 869 container algo-instances { 870 description 871 "A set of MAP-E or MAP-T instances to be configured, 872 applying to BRs and CEs. A MAP-E/T instance defines a MAP 873 domain comprising one or more MAP-CE and MAP-BR"; 874 list algo-instance { 875 key "id"; 876 description "instance for MAP-E/MAP-T"; 877 container algo-versioning { 878 description "algorithm's version"; 879 leaf algo-version { 880 type uint64; 881 description "Incremental version number to 882 the algorithm"; 883 } 884 leaf algo-date { 885 type yang:date-and-time; 886 description "Timestamp to the algorithm"; 887 } 888 } 889 leaf id { 890 type uint32; 891 mandatory true; 892 description "Algorithm Instance ID"; 893 } 894 leaf name { 895 type string; 896 description "The name for the instance."; 897 } 898 leaf data-plane { 899 type enumeration { 900 enum "encapsulation" { 901 description "encapsulation for MAP-E"; 902 } 903 enum "translation" { 904 description "translation for MAP-T"; 905 } 906 } 907 description 908 "Encapsulation is for MAP-E while translation is 909 for MAP-T"; 910 } 911 leaf ea-len { 912 type uint8; 913 mandatory true; 914 description 915 "Embedded Address (EA) bits are the IPv4 EA-bits 916 in the IPv6 address identify an IPv4 917 prefix/address (or part thereof) or 918 a shared IPv4 address (or part thereof) 919 and a port-set identifier. 920 The length of the EA-bits is defined as 921 part of a MAP rule for a MAP domain."; 922 } 923 leaf rule-ipv6-prefix { 924 type inet:ipv6-prefix; 925 mandatory true; 926 description 927 "The Rule IPv6 prefix defined in the mapping rule."; 928 } 929 leaf rule-ipv4-prefix { 930 type inet:ipv4-prefix; 931 mandatory true; 932 description 933 "The Rule IPv4 prefix defined in the mapping rule."; 934 } 935 leaf forwarding { 936 type boolean; 937 mandatory true; 938 description 939 "This parameter specifies whether the rule may be used for 940 forwarding (FMR). If set, this rule is used as an FMR; 941 if not set, this rule is a BMR only and must not be used 942 for forwarding."; 943 } 944 leaf psid-offset { 945 type uint8 { 946 range 0..16; 947 } 948 mandatory true; 949 description 950 "The number of offset bits. In Lightweight 4over6, the default 951 value is 0 for assigning one contiguous port range. In MAP-E/T, 952 the default value is 6, which excludes system ports by default 953 and assigns distributed port ranges. If the this parameter is 954 larger than 0, the value of offset MUST be greater than 0."; 955 } 956 leaf psid-len { 957 type uint8 { 958 range 0..15; 959 } 960 mandatory true; 961 description 962 "The length of PSID, representing the sharing ratio for an 963 IPv4 address."; 964 } 965 leaf tunnel-payload-mtu { 966 type uint16; 967 description 968 "The payload MTU for MAP-E tunnel."; 969 } 970 leaf tunnel-path-mru { 971 type uint16; 972 description 973 "The path MRU for MAP-E tunnel."; 974 } 975 leaf br-ipv6-addr { 976 type inet:ipv6-address; 977 mandatory true; 978 description 979 "The IPv6 address of the MAP-E BR."; 980 } 981 leaf dmr-ipv6-prefix { 982 type inet:ipv6-prefix; 983 description 984 "The IPv6 prefix of the MAP-T BR. "; 985 } 986 } 987 } 988 } 989 } 991 /* 992 * Operational state Data Nodes 993 */ 995 container softwire-state { 996 config false; 997 description 998 "The operational state data for Softwire instances. "; 999 leaf description { 1000 type string; 1001 description 1002 "A textual description of the softwire instances."; 1003 } 1004 container binding { 1005 if-feature binding; 1006 description 1007 "lw4over6 (binding) state."; 1008 container br { 1009 if-feature br; 1010 config false; 1011 description 1012 "Indicate this instance supports the lwAFTR (BR) function. 1013 The instances advertise the lwaftr (BR) feature through the 1014 capability exchange mechanism when a NETCONF session is 1015 established."; 1016 container br-instances { 1017 description 1018 "A set of BRs."; 1019 list br-instance { 1020 key "id"; 1021 description "instances for BR"; 1022 leaf id { 1023 type uint32; 1024 mandatory true; 1025 description "id"; 1026 } 1027 leaf name { 1028 type string; 1029 description "The name for this lwaftr."; 1030 } 1031 uses traffic-stat; 1032 leaf active-softwire-num { 1033 type uint32; 1034 description 1035 "The number of currently active tunnels on the 1036 lw4over6 (binding) instance."; 1037 } 1038 container binding-table { 1039 description "id"; 1040 list binding-entry { 1041 key "binding-ipv6info"; 1042 description "An identifier of the binding entry."; 1043 leaf binding-ipv6info { 1044 type union { 1045 type inet:ipv6-address; 1046 type inet:ipv6-prefix; 1047 } 1048 mandatory true; 1049 description 1050 "The IPv6 information used to identify 1051 a binding entry. "; 1052 } 1053 leaf active { 1054 type boolean; 1055 description 1056 "Status of a specific tunnel."; 1057 } 1059 } 1060 } 1061 } 1062 } 1063 } 1065 container ce { 1066 if-feature ce; 1067 config false; 1068 description 1069 "Indicate this instance supports the lwB4 (CE) function. 1070 The instances advertise the lwb4 (CE) feature through the 1071 capability exchange mechanism when a NETCONF session is 1072 established."; 1073 container ce-instances { 1074 description 1075 "Status of the configured CEs."; 1076 list ce-instance { 1077 key "binding-ipv6info"; 1078 description "a lwB4 (CE) instance."; 1079 leaf name { 1080 type string; 1081 description "The CE's name."; 1082 } 1083 leaf binding-ipv6info { 1084 type union { 1085 type inet:ipv6-address; 1086 type inet:ipv6-prefix; 1087 } 1088 mandatory true; 1089 description 1090 "The IPv6 information used to identify 1091 a binding entry. "; 1092 } 1093 uses traffic-stat; 1094 } 1095 } 1096 } 1097 } 1099 container algorithm { 1100 if-feature algorithm; 1101 config false; 1102 description 1103 "Indicate the instances support the MAP-E and MAP-T function. 1104 The instances advertise the map-e/map-t feature through the 1105 capability exchange mechanism when a NETCONF session is 1106 established."; 1107 container algo-instances { 1108 description 1109 "Status of MAP-E instance(s)."; 1110 list algo-instance { 1111 key "id"; 1112 description "Instances for algorithm"; 1113 leaf id { 1114 type uint32; 1115 mandatory true; 1116 description "id"; 1117 } 1118 leaf name { 1119 type string; 1120 description "The map-e instance name."; 1122 } 1123 uses traffic-stat; 1124 } 1125 } 1126 } 1127 } 1129 /* 1130 * Notifications 1131 */ 1132 notification softwire-br-event { 1133 if-feature binding; 1134 if-feature br; 1135 description "Notification for BR."; 1137 leaf br-id { 1138 type leafref { 1139 path 1140 "/softwire-state/binding/br/br-instances/" 1141 + "br-instance/id"; 1142 } 1143 description "..."; 1144 } 1145 leaf-list invalid-entry { 1146 type leafref { 1147 path 1148 "/softwire-config/binding/br/br-instances/" 1149 + "br-instance[id=current()/../br-id]/" 1150 + "binding-table/binding-entry/binding-ipv6info"; 1151 } 1152 description 1153 "Notify the client that a specific binding entry has been 1154 expired/invalid. The binding-ipv6info identifies an entry."; 1155 } 1156 leaf-list added-entry { 1157 type inet:ipv6-address; 1158 description 1159 "Notify the client that a binding entry has been added. 1160 The ipv6 address of that entry is the index. The client 1161 get other information from the lwaftr about the entry 1162 indexed by that ipv6 address. 1163 "; 1164 } 1165 leaf-list modified-entry { 1166 type leafref { 1167 path 1168 "/softwire-config/binding/br/br-instances/" 1169 + "br-instance[id=current()/../br-id]/" 1170 + "binding-table/binding-entry/binding-ipv6info"; 1171 } 1172 description "..."; 1173 } 1174 } 1176 notification softwire-ce-event { 1177 if-feature binding; 1178 if-feature ce; 1179 description "CE notification"; 1180 leaf ce-binding-ipv6-addr-change { 1181 type inet:ipv6-address; 1182 mandatory true; 1183 description 1184 "The source tunnel IPv6 address of the lwB4. 1185 If 'b4-ipv6-addr-format' is false, or the lwb4's 1186 binding-ipv6-address changes for any reason, 1187 it SHOULD notify the NETCONF client."; 1188 } 1189 } 1191 notification softwire-algorithm-instance-event { 1192 if-feature algorithm; 1193 description "Notifications for MAP-E or MAP-T."; 1194 leaf algo-id { 1195 type leafref { 1196 path 1197 "/softwire-config/algorithm/algo-instances/algo-instance/id"; 1198 } 1199 mandatory true; 1200 description "MAP-E or MAP-T event."; 1201 } 1202 leaf-list invalid-entry-id { 1203 type leafref { 1204 path 1205 "/softwire-config/algorithm/algo-instances/algo-instance/id"; 1206 } 1207 description "Invalid entry event."; 1208 } 1209 leaf-list added-entry { 1210 type leafref { 1211 path 1212 "/softwire-config/algorithm/algo-instances/algo-instance/id"; 1213 } 1214 description "Added entry."; 1215 } 1216 leaf-list modified-entry { 1217 type leafref { 1218 path 1219 "/softwire-config/algorithm/algo-instances/algo-instance/id"; 1220 } 1221 description "Modified entry."; 1222 } 1223 } 1224 } 1225 1227 7. Example of Configure lw4o6 Binding-Table 1229 The lwAFTR maintains an address binding table which contains the 1230 following 3-tuples: 1232 o IPv6 Address for a single lwB4 1234 o Public IPv4 Address 1236 o Restricted port-set 1238 The entry has two functions: the IPv6 encapsulation of inbound IPv4 1239 packets destined to the lwB4 and the validation of outbound IPv4-in- 1240 IPv6 packets received from the lwB4 for de-capsulation. 1242 Let's consider an example to add an entry that maintains the 1243 relationship between 3-tuples of lwB4 (2001:db8::1), '192.0.2.1' and 1244 '1234' in the binding table of the lwAFTR (2001:db8::2). Here is the 1245 example binding-table configuration xml: 1247 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 2001:db8::2 1259 1260 1261 192.0.2.1 1262 1263 1234 1264 1265 2001:db8::1 1266 1 1267 1268 1269 1270 1271 1272 1274 Figure 5: lw4o6 Binding-Table Configuration XML 1276 8. Security Considerations 1278 The YANG module defined in this memo is designed to be accessed via 1279 the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the 1280 secure transport layer and the mandatory to implement secure 1281 transport is SSH [RFC6242]. The NETCONF access control model 1282 [RFC6536] provides the means to restrict access for particular 1283 NETCONF users to a pre-configured subset of all available NETCONF 1284 protocol operations and content. 1286 All data nodes defined in the YANG module which can be created, 1287 modified and deleted (i.e., config true, which is the default). 1288 These data nodes are considered sensitive. Write operations (e.g., 1289 edit-config) applied to these data nodes without proper protection 1290 can negatively affect network operations. 1292 9. IANA Considerations 1294 This document requests IANA to register the following URI in the 1295 "IETF XML Registry" [RFC3688]. 1297 URI: urn:ietf:params:xml:ns:yang:softwire 1298 Registrant Contact: The IESG. 1299 XML: N/A; the requested URI is an XML namespace. 1301 This document requests IANA to register the following YANG module in 1302 the "YANG Module Names" registry [RFC6020]. 1304 name: ietf-dslite-aftr 1305 namespace: urn:ietf:params:xml:ns:yang:softwire 1306 prefix: softwire 1307 reference: RFC XXXX 1309 10. Acknowledgements 1311 The authors would like to thank Lishan Li, Bert Wijnen, Giles Heron, 1312 and Ole Troan for their contributions to this work. 1314 11. References 1316 11.1. Normative References 1318 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1319 Requirement Levels", BCP 14, RFC 2119, 1320 DOI 10.17487/RFC2119, March 1997, 1321 . 1323 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1324 DOI 10.17487/RFC3688, January 2004, 1325 . 1327 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 1328 the Network Configuration Protocol (NETCONF)", RFC 6020, 1329 DOI 10.17487/RFC6020, October 2010, 1330 . 1332 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 1333 and A. Bierman, Ed., "Network Configuration Protocol 1334 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 1335 . 1337 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 1338 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 1339 . 1341 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 1342 Protocol (NETCONF) Access Control Model", RFC 6536, 1343 DOI 10.17487/RFC6536, March 2012, 1344 . 1346 [RFC7596] Cui, Y., Sun, Q., Boucadair, M., Tsou, T., Lee, Y., and I. 1347 Farrer, "Lightweight 4over6: An Extension to the Dual- 1348 Stack Lite Architecture", RFC 7596, DOI 10.17487/RFC7596, 1349 July 2015, . 1351 [RFC7597] Troan, O., Ed., Dec, W., Li, X., Bao, C., Matsushima, S., 1352 Murakami, T., and T. Taylor, Ed., "Mapping of Address and 1353 Port with Encapsulation (MAP-E)", RFC 7597, 1354 DOI 10.17487/RFC7597, July 2015, 1355 . 1357 [RFC7598] Mrugalski, T., Troan, O., Farrer, I., Perreault, S., Dec, 1358 W., Bao, C., Yeh, L., and X. Deng, "DHCPv6 Options for 1359 Configuration of Softwire Address and Port-Mapped 1360 Clients", RFC 7598, DOI 10.17487/RFC7598, July 2015, 1361 . 1363 [RFC7599] Li, X., Bao, C., Dec, W., Ed., Troan, O., Matsushima, S., 1364 and T. Murakami, "Mapping of Address and Port using 1365 Translation (MAP-T)", RFC 7599, DOI 10.17487/RFC7599, July 1366 2015, . 1368 11.2. Informative References 1370 [I-D.boucadair-softwire-dslite-yang] 1371 Boucadair, M., Jacquenet, C., and S. Sivakumar, "YANG Data 1372 Model for the DS-Lite Address Family Transition Router 1373 (AFTR)", draft-boucadair-softwire-dslite-yang-04 (work in 1374 progress), June 2016. 1376 [I-D.ietf-netmod-routing-cfg] 1377 Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 1378 Management", draft-ietf-netmod-routing-cfg-22 (work in 1379 progress), July 2016. 1381 [I-D.sivakumar-yang-nat] 1382 Sivakumar, S., Boucadair, M., and S. <>, "YANG Data Model 1383 for Network Address Translation (NAT)", draft-sivakumar- 1384 yang-nat-04 (work in progress), March 2016. 1386 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1387 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1388 . 1390 Authors' Addresses 1392 Qi Sun 1393 Tsinghua University 1394 Beijing 100084 1395 P.R. China 1397 Phone: +86-10-6278-5822 1398 Email: sunqi.ietf@gmail.com 1400 Hao Wang 1401 Tsinghua University 1402 Beijing 100084 1403 P.R. China 1405 Phone: +86-10-6278-5822 1406 Email: wangh13@mails.tsinghua.edu.cn 1408 Yong Cui 1409 Tsinghua University 1410 Beijing 100084 1411 P.R. China 1413 Phone: +86-10-6260-3059 1414 Email: yong@csnet1.cs.tsinghua.edu.cn 1416 Ian Farrer 1417 Deutsche Telekom AG 1418 CTO-ATI,Landgrabenweg 151 1419 Bonn, NRW 53227 1420 Germany 1422 Email: ian.farrer@telekom.de 1424 Sladjana Zoric 1425 Deutsche Telekom AG 1426 CTO-IPT,Landgrabenweg 151 1427 Bonn, NRW 53227 1428 Germany 1430 Email: sladjana.zoric@telekom.de 1431 Mohamed Boucadair 1432 Orange 1433 Rennes 35000 1434 France 1436 Email: mohamed.boucadair@orange.com 1438 Rajiv Asati 1439 Cisco Systems, Inc. 1440 7025 Kit Creek Rd. 1441 RTP, NC 27709 1442 USA 1444 Email: Rajiva@cisco.com