idnits 2.17.1 draft-ietf-rtgwg-lne-model-04.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 678 has weird spacing: '...-set-id str...' == Line 691 has weird spacing: '...gorithm str...' == Line 739 has weird spacing: '...-set-id str...' == Line 754 has weird spacing: '...gorithm str...' == Line 840 has weird spacing: '...-set-id str...' == (7 more instances...) -- The document date (September 26, 2017) is 2404 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-12) exists of draft-ietf-netmod-schema-mount-06 ** Obsolete normative reference: RFC 7223 (Obsoleted by RFC 8343) == Outdated reference: A later version (-06) exists of draft-ietf-netmod-yang-tree-diagrams-01 == Outdated reference: A later version (-12) exists of draft-ietf-rtgwg-ni-model-03 -- Obsolete informational reference (is this intentional?): RFC 7895 (Obsoleted by RFC 8525) -- Obsolete informational reference (is this intentional?): RFC 8022 (Obsoleted by RFC 8349) Summary: 1 error (**), 0 flaws (~~), 10 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group L. Berger 3 Internet-Draft LabN Consulting, L.L.C. 4 Intended status: Standards Track C. Hopps 5 Expires: March 30, 2018 Deutsche Telekom 6 A. Lindem 7 Cisco Systems 8 D. Bogdanovic 10 X. Liu 11 Jabil 12 September 26, 2017 14 YANG Logical Network Elements 15 draft-ietf-rtgwg-lne-model-04 17 Abstract 19 This document defines a logical network element module. This module 20 can be used to manage the logical resource partitioning that may be 21 present on a network device. Examples of common industry terms for 22 logical resource partitioning are Logical Systems or Logical Routers. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at https://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on March 30, 2018. 41 Copyright Notice 43 Copyright (c) 2017 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (https://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 59 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 3. Logical Network Elements . . . . . . . . . . . . . . . . . . 5 62 3.1. LNE Instantiation and Resource Assignment . . . . . . . . 6 63 3.2. LNE Management - LNE View . . . . . . . . . . . . . . . . 7 64 3.3. LNE Management - Host Network Device View . . . . . . . . 7 65 4. Security Considerations . . . . . . . . . . . . . . . . . . . 8 66 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 67 6. Logical Network Element Model . . . . . . . . . . . . . . . . 9 68 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 69 7.1. Normative References . . . . . . . . . . . . . . . . . . 13 70 7.2. Informative References . . . . . . . . . . . . . . . . . 14 71 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 14 72 Appendix B. Examples . . . . . . . . . . . . . . . . . . . . . . 15 73 B.1. Example: Host Device Managed LNE . . . . . . . . . . . . 15 74 B.1.1. Configuration Data . . . . . . . . . . . . . . . . . 19 75 B.1.2. State Data . . . . . . . . . . . . . . . . . . . . . 23 76 B.2. Example: Self Managed LNE . . . . . . . . . . . . . . . . 32 77 B.2.1. Configuration Data . . . . . . . . . . . . . . . . . 35 78 B.2.2. State Data . . . . . . . . . . . . . . . . . . . . . 38 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 47 81 1. Introduction 83 This document defines a YANG [RFC6020] module to support the creation 84 of logical network elements on a network device. A logical network 85 element (LNE) is an independently managed virtual device made up of 86 resources allocated to it from the host or parent network device. An 87 LNE running on a host network device conceptually parallels a virtual 88 machine running on a host system. Using host-virtualization 89 terminology one could refer to an LNE as a "Guest", and the 90 containing network-device as the "Host". While LNEs may be 91 implemented via host-virtualization technologies this is not a 92 requirement. 94 This document also defines the necessary augmentations for allocating 95 host resources to a given LNE. As the interface management model 96 [RFC7223] is the only a module that currently defines host resources, 97 this document currently defines only a single augmentation to cover 98 the assignment of interfaces to an LNE. Future modules that define 99 support for the control of host device resources are expected to, 100 where appropriate, provide parallel support for the assignment of 101 controlled resources to LNEs. 103 As each LNE is an independently managed device, each will have its 104 own set of YANG modeled data that is independent of the host device 105 and other LNEs. For example, multiple LNEs may all have their own 106 "Tunnel0" interface defined which will not conflict with each other 107 and will not exist in the host's interface model. An LNE will have 108 its own management interfaces possibly including independent 109 instances of netconf/restconf/etc servers to support configuration of 110 their YANG models. As an example of this independence, an 111 implementation may choose to completely rename assigned interfaces, 112 so on the host the assigned interface might be called "Ethernet0/1" 113 while within the LNE it might be called "eth1". 115 In addition to standard management interfaces, a host device 116 implementation may support accessing LNE configuration and 117 operational YANG models directly from the host system. When 118 supported, such access is accomplished through a yang-schema-mount 119 mount point [I-D.ietf-netmod-schema-mount] under which the root level 120 LNE YANG models may be accessed. 122 Examples of vendor terminology for an LNE include logical system or 123 logical router, and virtual switch, chassis, or fabric. 125 1.1. Terminology 127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 128 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 129 document are to be interpreted as described in [RFC2119]. 131 Readers are expected to be familiar with terms and concepts of YANG 132 [RFC7950] and YANG Schema Mount [I-D.ietf-netmod-schema-mount]. 134 This document uses the graphical representation of data models 135 defined in [I-D.ietf-netmod-yang-tree-diagrams]. 137 2. Overview 139 In this document, we consider network devices that support protocols 140 and functions defined within the IETF Routing Area, e.g, routers, 141 firewalls, and hosts. Such devices may be physical or virtual, e.g., 142 a classic router with custom hardware or one residing within a 143 server-based virtual machine implementing a virtual network function 144 (VNF). Each device may sub-divide their resources into logical 145 network elements (LNEs), each of which provides a managed logical 146 device. Examples of vendor terminology for an LNE include logical 147 system or logical router, and virtual switch, chassis, or fabric. 148 Each LNE may also support virtual routing and forwarding (VRF) and 149 virtual switching instance (VSI) functions, which are referred to 150 below as a network instances (NIs). This breakdown is represented in 151 Figure 1. 153 ,'''''''''''''''''''''''''''''''''''''''''''''''. 154 | Network Device (Physical or Virtual) | 155 | ..................... ..................... | 156 | : Logical Network : : Logical Network : | 157 | : Element : : Element : | 158 | :+-----+-----+-----+: :+-----+-----+-----+: | 159 | :| Net | Net | Net |: :| Net | Net | Net |: | 160 | :|Inst.|Inst.|Inst.|: :|Inst.|Inst.|Inst.|: | 161 | :+-----+-----+-----+: :+-----+-----+-----+: | 162 | : | | | | | | : : | | | | | | : | 163 | :..|.|...|.|...|.|..: :..|.|...|.|...|.|..: | 164 | | | | | | | | | | | | | | 165 ''''|'|'''|'|'''|'|'''''''''|'|'''|'|'''|'|''''' 166 | | | | | | | | | | | | 167 Interfaces Interfaces 169 Figure 1: Module Element Relationships 171 A model for LNEs is described in Section 3 and the model for NIs is 172 covered in [I-D.ietf-rtgwg-ni-model]. 174 The interface management model [RFC7223] is an existing model that is 175 impacted by the definition of LNEs and network instances. This 176 document and [I-D.ietf-rtgwg-ni-model] define augmentations to the 177 interface module to support LNEs and NIs. Similar elements, although 178 perhaps only for LNEs, may also need to be included as part of the 179 definition of the future hardware and QoS modules. 181 Interfaces are a crucial part of any network device's configuration 182 and operational state. They generally include a combination of raw 183 physical interfaces, link-layer interfaces, addressing configuration, 184 and logical interfaces that may not be tied to any physical 185 interface. Several system services, and layer 2 and layer 3 186 protocols may also associate configuration or operational state data 187 with different types of interfaces (these relationships are not shown 188 for simplicity). The interface management model is defined by 189 [RFC7223]. The logical-network-element module augments existing 190 interface management model by adding an identifier which is used on 191 physical interface types to identify an associated LNE. 193 The interface related augmentation is as follows: 195 module: ietf-logical-network-element 196 augment /if:interfaces/if:interface: 197 +--rw bind-lne-name? -> 198 /logical-network-elements/logical-network-element/name 200 The interface model defined in [RFC7223] is structured to include all 201 interfaces in a flat list, without regard to logical assignment of 202 resources supported on the device. The bind-lne-name and leaf 203 provides the association between an interface and its associated LNE. 204 Note that as currently defined, to assign an interface to both an LNE 205 and NI, the interface would first be assigned to the LNE and then 206 within that LNE's interface module, the LNE's representation of that 207 interface would be assigned to an NI using the mechanisms defined in 208 [I-D.ietf-rtgwg-ni-model]. 210 3. Logical Network Elements 212 Logical network elements support the ability of some devices to 213 partition resources into independent logical routers and/or switches. 214 Device support for multiple logical network elements is 215 implementation specific. Systems without such capabilities need not 216 include support for the logical-network-element module. In physical 217 devices, some hardware features are shared across partitions, but 218 control plane (e.g., routing) protocol instances, tables, and 219 configuration are managed separately. For example, in logical 220 routers or VNFs, this may correspond to establishing multiple logical 221 instances using a single software installation. The model supports 222 configuration of multiple instances on a single device by creating a 223 list of logical network elements, each with their own configuration 224 and operational state related to routing and switching protocols. 226 The LNE model can be represented using the tree format defined in 227 [I-D.ietf-netmod-yang-tree-diagrams] as: 229 module: ietf-logical-network-element 230 +--rw logical-network-elements 231 +--rw logical-network-element* [name] 232 +--rw name string 233 +--rw managed? boolean 234 +--rw description? string 235 +--mp root 236 augment /if:interfaces/if:interface: 237 +--rw bind-lne-name? 238 -> /logical-network-elements/logical-network-element/name 240 notifications: 241 +---n bind-lne-name-failed 242 +--ro name -> /if:interfaces/interface/name 243 +--ro bind-lne-name 244 | -> /if:interfaces/interface/lne:bind-lne-name 245 +--ro error-info? string 247 'name' identifies the logical network element. 'managed' indicates 248 if the server providing the host network device will provide the 249 client LNE information via the 'root' structure. The root of an 250 LNE's specific data is the schema mount point 'root'. bind-lne-name 251 is used to associated an interface with an LNE and bind-lne-name- 252 failed is used in certain failure cases. 254 An LNE root MUST contain at least the YANG library [RFC7895] and 255 Interfaces [RFC7223] modules. 257 3.1. LNE Instantiation and Resource Assignment 259 Logical network elements may be controlled by clients using existing 260 list operations. When list entries are created, a new LNE is 261 instantiated. The models mounted under an LNE root are expected to 262 be dependent on the server implementation. When a list entry is 263 deleted, an existing LNE is destroyed. For more information, see 264 [RFC7950] Section 7.8.6. 266 Once instantiated, host network device resources can be associated 267 with the new LNE. As previously mentioned, this document augments 268 ietf-interfaces with the bind-lne-name leaf to support such 269 associations for interfaces. When an bind-lne-name is set to a valid 270 LNE name, an implementation MUST take whatever steps are internally 271 necessary to assign the interface to the LNE or provide an error 272 message (defined below) with an indication of why the assignment 273 failed. It is possible for the assignment to fail while processing 274 the set, or after asynchronous processing. Error notification in the 275 latter case is supported via a notification. 277 On a successful interface assignment to an LNE, an implementation 278 MUST also make the resource available to the LNE by providing a 279 system created interface to the LNE. The name of the system created 280 interface is a local matter and may be identical or completely 281 different, and mapped from and to, the name used in the context of 282 the host device. The system created interface SHOULD be exposed via 283 the LNE-specific instance of the interfaces module [RFC7223]. 285 3.2. LNE Management - LNE View 287 Each LNE instance is expected to support management functions from 288 within the context of the LNE root, via a server that provides 289 information with the LNE's root exposed as device root. Management 290 functions operating within the context of an LNE are accessed through 291 the LNE's standard management interfaces, e.g., NETCONF and SNMP. 292 Initial configuration, much like the initial configuration of the 293 host device, is a local implementation matter. 295 When accessing an LNE via the LNE's management interface, a network- 296 device representation will be presented, but its scope will be 297 limited to the specific LNE. Normal YANG/NETCONF mechanisms, 298 together with the required YANG library [RFC7895] instance, can be 299 used to identify the available modules. Each supported module will 300 be presented as a top level module. Only LNE associated resources 301 will be reflected in resource related modules, e.g., interfaces, 302 hardware, and perhaps QoS. From the management perspective, there 303 will be no difference between the available LNE view (information) 304 and a physical network device. 306 3.3. LNE Management - Host Network Device View 308 There are multiple implementation approaches possible to enable a 309 network device to support the logical-network-element module and 310 multiple LNEs. Some approaches will allow the management functions 311 operating at network device level to access LNE configuration and 312 operational information, while others will not. Similarly, even when 313 LNE management from the network device is supported by the 314 implementation, it may be prohibited by user policy. 316 Independent of the method selected by an implementation, the 317 'managed' boolean mentioned above is used to indicate when LNE 318 management from the network device context is possible. When the 319 'managed' boolean is 'false', the LNE cannot be managed by the host 320 system and can only be managed from within the context of the LNE as 321 described in the previous section, Section 3.2. Attempts to access 322 information below a root node whose associated 'managed' boolean is 323 set to 'false' MUST result in the error message indicated below. In 324 some implementations, it may not be possible to change this value. 326 For example, when an LNE is implemented using virtual machine and 327 traditional hypervisor technologies, it is likely that this value 328 will be restricted to a 'false' value. 330 It is an implementation choice if the information can be accessed and 331 modified from within the context of the LNE, or even the context of 332 the host device. When the 'managed' boolean is 'true', LNE 333 information SHALL be accessible from the context of the host device. 334 When the associated schema-mount definition has the 'config' leaf set 335 to 'true', then LNE information SHALL also be modifiable from the 336 context of the host device. When LNE information is available from 337 both the host device and from within the context of the LNE, the same 338 information MUST be made available via the 'root' element, with paths 339 modified as described in [I-D.ietf-netmod-schema-mount]. 341 An implementation MAY represent an LNE's schema using either the 342 'inline' or 'use-schema' approaches defined in 343 [I-D.ietf-netmod-schema-mount]. The choice of which to use is 344 completely an implementation choice. The inline case is anticipated 345 to be generally used in the cases where the 'managed' will always be 346 'false'. The 'use-schema' approach is expected to be be most useful 347 in the case where all LNEs share the same schema. When 'use-schema' 348 is used with an LNE mount point, the YANG library rooted in the LNE's 349 mount point MUST match the associated schema defined within the ietf- 350 yang-schema-mount module. 352 Beyond the two modules that will always be present for an LNE, as an 353 LNE is a network device itself, all modules that may be present at 354 the top level network device MAY also be present for the LNE. The 355 list of available modules is expected to be implementation dependent. 356 As is the method used by an implementation to support LNEs. 357 Appendix B provide example uses of LNEs. 359 4. Security Considerations 361 LNE information represents device and network configuration 362 information. As such, the security of this information is important, 363 but it is fundamentally no different than any other interface or 364 device configuration information that has already been covered in 365 other documents such as [RFC7223], [RFC7317] and [RFC8022]. 367 The vulnerable "config true" parameters and subtrees are the 368 following: 370 /logical-network-elements/logical-network-element: This list 371 specifies the logical network element and the related logical 372 device configuration. 374 /logical-network-elements/logical-network-element/managed: While 375 this leaf is contained in the previous list, it is worth 376 particular attention as it controls whether information under the 377 LNE mount point is accessible by both the host device and within 378 the LNE context. There may be extra sensitivity to this leaf in 379 environments where an LNE is managed by a different party than the 380 host device, and that party does not wish to share LNE information 381 with the operator of the host device. 383 /if:interfaces/if:interface/bind-lne-name: This leaf indicates the 384 LNE instance to which an interface is assigned. 386 Unauthorized access to any of these lists can adversely affect the 387 security of both the local device and the network. This may lead to 388 network malfunctions, delivery of packets to inappropriate 389 destinations, and other problems. 391 5. IANA Considerations 393 This document registers a URI in the IETF XML registry [RFC3688]. 394 Following the format in RFC 3688, the following registration is 395 requested to be made. 397 URI: urn:ietf:params:xml:ns:yang:ietf-logical-network-element 399 Registrant Contact: The IESG. 401 XML: N/A, the requested URI is an XML namespace. 403 This document registers a YANG module in the YANG Module Names 404 registry [RFC6020]. 406 name: ietf-logical-network-element 407 namespace: urn:ietf:params:xml:ns:yang:ietf-logical-network-element 408 prefix: lne 409 reference: RFC XXXX 411 6. Logical Network Element Model 413 The structure of the model defined in this document is described by 414 the YANG module below. 416 file "ietf-logical-network-element@2017-09-27.yang" 417 module ietf-logical-network-element { 418 yang-version 1.1; 420 // namespace 421 namespace "urn:ietf:params:xml:ns:yang:ietf-logical-network-element"; 422 prefix lne; 424 // import some basic types 426 import ietf-interfaces { 427 prefix if; 428 reference "RFC 7223: A YANG Data Model for Interface Management"; 429 } 430 import ietf-yang-schema-mount { 431 prefix yangmnt; 432 reference "draft-ietf-netmod-schema-mount: YANG Schema Mount"; 433 // RFC Ed.: Please replace this draft name with the corresponding 434 // RFC number 435 } 437 organization 438 "IETF Routing Area (rtgwg) Working Group"; 439 contact 440 "WG Web: 441 WG List: 443 Author: Lou Berger 444 445 Author: Christan Hopps 446 447 Author: Acee Lindem 448 449 Author: Dean Bogdanovic 450 "; 451 description 452 "This module is used to support multiple logical network 453 elements on a single physical or virtual system. 455 Copyright (c) 2017 IETF Trust and the persons 456 identified as authors of the code. All rights reserved. 458 Redistribution and use in source and binary forms, with or 459 without modification, is permitted pursuant to, and subject 460 to the license terms contained in, the Simplified BSD License 461 set forth in Section 4.c of the IETF Trust's Legal Provisions 462 Relating to IETF Documents 463 (http://trustee.ietf.org/license-info). 465 This version of this YANG module is part of RFC XXXX; see 466 the RFC itself for full legal notices."; 468 // RFC Ed.: replace XXXX with actual RFC number and remove 469 // this note 470 // RFC Ed.: please update TBD 472 revision 2017-09-27 { 473 description 474 "Initial revision."; 475 reference "RFC TBD"; 476 } 478 // top level device definition statements 480 container logical-network-elements { 481 description 482 "Allows a network device to support multiple logical 483 network element (device) instances."; 484 list logical-network-element { 485 key "name"; 486 description 487 "List of logical network elements."; 488 leaf name { 489 type string; 490 description 491 "Device-wide unique identifier for the 492 logical network element."; 493 } 494 leaf managed { 495 type boolean; 496 default "true"; 497 description 498 "True if the host can access LNE information 499 using the root mount point. This value 500 my not be modifiable in all implementations."; 501 } 502 leaf description { 503 type string; 504 description 505 "Description of the logical network element."; 506 } 507 container "root" { 508 description 509 "Container for mount point."; 510 yangmnt:mount-point "root" { 511 description 512 "Root for models supported per logical 513 network element. This mount point will 514 may or may not be inline based on the server 515 implementation. It SHALL always contain a YANG 516 library and interfaces instance. 518 When the associated 'managed' leaf is 'false' any 519 operation that attempts to access information below 520 the root SHALL fail with an error-tag of 521 'access-denied' and an error-app-tag of 522 'lne-not-managed'."; 523 } 524 } 525 } 526 } 528 // augment statements 530 augment "/if:interfaces/if:interface" { 531 description 532 "Add a node for the identification of the logical network 533 element associated with an interface. Applies to interfaces 534 that can be assigned on a per logical network element basis. 536 Note that a standard error will be returned if the 537 identified leafref isn't present. If an interfaces cannot 538 be assigned for any other reason, the operation SHALL fail 539 with an error-tag of 'operation-failed' and an error-app-tag 540 of 'lne-assignment-failed'. A meaningful error-info that 541 indicates the source of the assignment failure SHOULD also 542 be provided."; 543 leaf bind-lne-name { 544 type leafref { 545 path "/logical-network-elements/logical-network-element/name"; 546 } 547 description 548 "Logical network element ID to which interface is bound."; 549 } 550 } 552 // notification statements 554 notification bind-lne-name-failed { 555 description 556 "Indicates an error in the association of an interface to an 557 LNE. Only generated after success is initially returned when 558 bind-lne-name is set."; 559 leaf name { 560 type leafref { 561 path "/if:interfaces/if:interface/if:name"; 562 } 563 mandatory true; 564 description 565 "Contains the interface name associated with the 566 failure."; 567 } 568 leaf bind-lne-name { 569 type leafref { 570 path "/if:interfaces/if:interface/lne:bind-lne-name"; 571 } 572 mandatory true; 573 description 574 "Contains the bind-lne-name associated with the 575 failure."; 576 } 577 leaf error-info { 578 type string; 579 description 580 "Optionally, indicates the source of the assignment 581 failure."; 582 } 583 } 584 } 585 587 7. References 589 7.1. Normative References 591 [I-D.ietf-netmod-schema-mount] 592 Bjorklund, M. and L. Lhotka, "YANG Schema Mount", draft- 593 ietf-netmod-schema-mount-06 (work in progress), July 2017. 595 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 596 Requirement Levels", BCP 14, RFC 2119, 597 DOI 10.17487/RFC2119, March 1997, 598 . 600 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 601 DOI 10.17487/RFC3688, January 2004, 602 . 604 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 605 the Network Configuration Protocol (NETCONF)", RFC 6020, 606 DOI 10.17487/RFC6020, October 2010, 607 . 609 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 610 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 611 . 613 7.2. Informative References 615 [I-D.ietf-netmod-yang-tree-diagrams] 616 Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft- 617 ietf-netmod-yang-tree-diagrams-01 (work in progress), June 618 2017. 620 [I-D.ietf-rtgwg-device-model] 621 Lindem, A., Berger, L., Bogdanovic, D., and C. Hopps, 622 "Network Device YANG Logical Organization", draft-ietf- 623 rtgwg-device-model-02 (work in progress), March 2017. 625 [I-D.ietf-rtgwg-ni-model] 626 Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. 627 Liu, "YANG Network Instances", draft-ietf-rtgwg-ni- 628 model-03 (work in progress), July 2017. 630 [RFC7317] Bierman, A. and M. Bjorklund, "A YANG Data Model for 631 System Management", RFC 7317, DOI 10.17487/RFC7317, August 632 2014, . 634 [RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module 635 Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, 636 . 638 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 639 RFC 7950, DOI 10.17487/RFC7950, August 2016, 640 . 642 [RFC8022] Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 643 Management", RFC 8022, DOI 10.17487/RFC8022, November 644 2016, . 646 Appendix A. Acknowledgments 648 The Routing Area Yang Architecture design team members included Acee 649 Lindem, Anees Shaikh, Christian Hopps, Dean Bogdanovic, Lou Berger, 650 Qin Wu, Rob Shakir, Stephane Litkowski, and Yan Gang. Useful review 651 comments were also received by Martin Bjorklund and John Scudder. 653 This document was motivated by, and derived from, 654 [I-D.ietf-rtgwg-device-model]. 656 The RFC text was produced using Marshall Rose's xml2rfc tool. 658 Appendix B. Examples 660 The following subsections provide example uses of LNEs. 662 B.1. Example: Host Device Managed LNE 664 This section describes an example of the LNE model using schema mount 665 to achieve the parent management. An example device supports 666 multiple instances of LNEs (logical routers), each of which supports 667 features of layer 2 and layer 3 interfaces [RFC7223], routing 668 information base [RFC8022], and OSPF protocol. Each of these 669 features is specified by a YANG model, and they are combined using 670 YANG Schema Mount as follows: 672 module: ietf-logical-network-element 673 +--rw logical-network-elements 674 +--rw logical-network-element* [name] 675 +--rw name string 676 +--mp root 677 +--ro yanglib:modules-state/ 678 | +--ro module-set-id string 679 | +--ro module* [name revision] 680 | +--ro name yang:yang-identifier 681 +--rw sys:system/ 682 | +--rw contact? string 683 | +--rw hostname? inet:domain-name 684 | +--rw authentication {authentication}? 685 | +--rw user-authentication-order* identityref 686 | +--rw user* [name] {local-users}? 687 | +--rw name string 688 | +--rw password? ianach:crypt-hash 689 | +--rw authorized-key* [name] 690 | +--rw name string 691 | +--rw algorithm string 692 | +--rw key-data binary 693 +--ro sys:system-state/ 694 | ... 695 +--ro rt:routing-state/ 696 | +--ro router-id? yang:dotted-quad 697 | +--ro control-plane-protocols 698 | +--ro control-plane-protocol* [type name] 699 | +--ro ospf:ospf/ 700 | +--ro instance* [af] 701 | ... 702 +--rw rt:routing/ 703 | +--rw router-id? yang:dotted-quad 704 | +--rw control-plane-protocols 705 | +--rw control-plane-protocol* [type name] 706 | +--rw ospf:ospf/ 707 | +--rw instance* [af] 708 | +--rw areas 709 | +--rw area* [area-id] 710 | +--rw interfaces 711 | +--rw interface* [name] 712 | +--rw name if:interface-ref 713 | +--rw cost? uint16 714 +--rw if:interfaces/ 715 | +--rw interface* [name] 716 | +--rw name string 717 | +--rw ip:ipv4!/ 718 | | +--rw address* [ip] 719 | | ... 720 +--ro if:interfaces-state/ 721 +--ro interface* [name] 722 +--ro name string 723 +--ro ip:ipv4!/ 724 | +--ro address* [ip] 725 | ... 727 module: ietf-interfaces 728 +--rw interfaces 729 | +--rw interface* [name] 730 | +--rw name string 731 | +--rw lne:bind-lne-name? string 732 +--ro interfaces-state 733 +--ro interface* [name] 734 +--ro name string 735 +--ro oper-status enumeration 737 module: ietf-yang-library 738 +--ro modules-state 739 +--ro module-set-id string 740 +--ro module* [name revision] 741 +--ro name yang:yang-identifier 743 module: ietf-system 744 +--rw system 745 | +--rw contact? string 746 | +--rw hostname? inet:domain-name 747 | +--rw authentication {authentication}? 748 | +--rw user-authentication-order* identityref 749 | +--rw user* [name] {local-users}? 750 | +--rw name string 751 | +--rw password? ianach:crypt-hash 752 | +--rw authorized-key* [name] 753 | +--rw name string 754 | +--rw algorithm string 755 | +--rw key-data binary 756 +--ro system-state 757 +--ro platform 758 | +--ro os-name? string 759 | +--ro os-release? string 761 To realize the above schema, the example device implements the 762 following schema mount instance: 764 "ietf-yang-schema-mount:schema-mounts": { 765 "mount-point": [ 766 { 767 "module": "ietf-logical-network-element", 768 "name": "root", 769 "use-schema": [ 770 { 771 "name": "lne-schema" 772 } 773 ] 774 } 775 ], 776 "schema": [ 777 { 778 "name": "lne-schema", 779 "module": [ 780 { 781 "name": "ietf-yang-library", 782 "revision": "2016-06-21", 783 "namespace": 784 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 785 "conformance-type": "implement" 786 }, 787 { 788 "name": "ietf-system", 789 "revision": "2014-08-06", 790 "namespace": 791 "urn:ietf:params:xml:ns:yang:ietf-system", 792 "conformance-type": "implement" 793 }, 794 { 795 "name": "ietf-routing", 796 "revision": "2016-11-04", 797 "namespace": 798 "urn:ietf:params:xml:ns:yang:ietf-routing", 799 "conformance-type": "implement" 800 }, 801 { 802 "name": "ietf-ospf", 803 "revision": "2017-03-12", 804 "namespace": 805 "urn:ietf:params:xml:ns:yang:ietf-ospf", 806 "conformance-type": "implement" 807 }, 808 { 809 "name": "ietf-interfaces", 810 "revision": "2014-05-08", 811 "namespace": 812 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 813 "conformance-type": "implement" 814 }, 815 { 816 "name": "ietf-ip", 817 "revision": "2014-06-16", 818 "namespace": 819 "urn:ietf:params:xml:ns:yang:ietf-ip", 820 "conformance-type": "implement" 821 } 822 ] 823 } 824 ] 825 } 827 By using the implementation of the YANG schema mount, an operator can 828 create instances of logical routers. An interface can be assigned to 829 a logical router, so that the logical router has the permission to 830 access this interface. The OSPF protocol can then be enabled on this 831 assigned interface. 833 For this implementation, a parent management session has access to 834 the schemas of both the parent hosting system and the child logical 835 routers. In addition, each child logical router can grant its own 836 management sessions, which have the following schema: 838 module: ietf-yang-library 839 +--ro modules-state 840 +--ro module-set-id string 841 +--ro module* [name revision] 842 +--ro name yang:yang-identifier 844 module: ietf-system 845 +--rw system 846 | +--rw contact? string 847 | +--rw hostname? inet:domain-name 848 | +--rw authentication {authentication}? 849 | +--rw user-authentication-order* identityref 850 | +--rw user* [name] {local-users}? 851 | +--rw name string 852 | +--rw password? ianach:crypt-hash 853 | +--rw authorized-key* [name] 854 | +--rw name string 855 | +--rw algorithm string 856 | +--rw key-data binary 857 +--ro system-state 858 +--ro platform 859 | +--ro os-name? string 860 | +--ro os-release? string 862 module: ietf-routing 863 +--ro routing-state 864 | +--ro router-id? yang:dotted-quad 865 | +--ro control-plane-protocols 866 | | +--ro control-plane-protocol* [type name] 867 | | +--ro ospf:ospf/ 868 | | +--ro instance* [af] 869 +--rw routing 870 +--rw router-id? yang:dotted-quad 871 +--rw control-plane-protocols 872 +--rw control-plane-protocol* [type name] 873 +--rw ospf:ospf/ 874 +--rw instance* [af] 875 +--rw areas 876 +--rw area* [area-id] 877 +--rw interfaces 878 +--rw interface* [name] 879 +--rw name if:interface-ref 880 +--rw cost? uint16 882 module: ietf-interfaces 883 +--rw interfaces 884 | +--rw interface* [name] 885 | +--rw name string 886 +--ro interfaces-state 887 +--ro interface* [name] 888 +--ro name string 889 +--ro oper-status enumeration 891 B.1.1. Configuration Data 893 The following shows an example where two customer specific LNEs are 894 configured: 896 { 897 "ietf-logical-network-element:logical-network-elements": { 898 "logical-network-element": [ 899 { 900 "name": "cust1", 901 "root": { 902 "ietf-system:system": { 903 "authentication": { 904 "user": [ 905 { 906 "name": "john", 907 "password": "$0$password" 908 } 909 ] 910 } 911 }, 912 "ietf-routing:routing": { 913 "router-id": "192.0.2.1", 914 "control-plane-protocols": { 915 "control-plane-protocol": [ 916 { 917 "type": "ietf-routing:ospf", 918 "name": "1", 919 "ietf-ospf:ospf": { 920 "instance": [ 921 { 922 "af": "ipv4", 923 "areas": { 924 "area": [ 925 { 926 "area-id": "203.0.113.1", 927 "interfaces": { 928 "interface": [ 929 { 930 "name": "eth1", 931 "cost": 10 932 } 933 ] 934 } 935 } 936 ] 937 } 938 } 939 ] 940 } 941 } 942 ] 943 } 944 }, 945 "ietf-interfaces:interfaces": { 946 "interfaces": { 947 "interface": [ 948 { 949 "name": "eth1", 950 "ip:ipv4": { 951 "address": [ 952 { 953 "ip": "192.0.2.11", 954 "prefix-length": 24, 955 } 956 ] 957 } 958 } 959 ] 960 } 961 } 962 } 963 }, 964 { 965 "name": "cust2", 966 "root": { 967 "ietf-system:system": { 968 "authentication": { 969 "user": [ 970 { 971 "name": "john", 972 "password": "$0$password" 973 } 974 ] 975 } 976 } 977 "ietf-routing:routing": { 978 "router-id": "192.0.2.2", 979 "control-plane-protocols": { 980 "control-plane-protocol": [ 981 { 982 "type": "ietf-routing:ospf", 983 "name": "1", 984 "ietf-ospf:ospf": { 985 "instance": [ 986 { 987 "af": "ipv4", 988 "areas": { 989 "area": [ 990 { 991 "area-id": "203.0.113.1", 992 "interfaces": { 993 "interface": [ 994 { 995 "name": "eth1", 996 "cost": 10 997 } 998 ] 999 } 1000 } 1001 ] 1002 } 1003 } 1004 ] 1005 } 1006 } 1007 ] 1008 } 1009 } 1010 "ietf-interfaces:interfaces": { 1011 "interfaces": { 1012 { 1013 "name": "eth1", 1014 "ip:ipv4": { 1015 "address": [ 1016 { 1017 "ip": "192.0.2.11", 1018 "prefix-length": 24, 1019 } 1020 ] 1021 } 1022 } 1023 ] 1024 } 1025 } 1026 } 1027 ] 1028 }, 1030 "ietf-interfaces:interfaces": { 1031 "interfaces": { 1032 "interface": [ 1033 { 1034 "name": "eth0", 1035 "ip:ipv4": { 1036 "address": [ 1037 { 1038 "ip": "192.0.2.10", 1039 "prefix-length": 24, 1040 } 1041 ] 1043 } 1044 }, 1045 { 1046 "name": "cust1:eth1", 1047 "lne:bind-lne-name": "cust1" 1048 }, 1049 { 1050 "name": "cust2:eth1", 1051 "lne:bind-lne-name": "cust2" 1052 } 1053 ] 1054 } 1055 }, 1057 "ietf-system:system": { 1058 "authentication": { 1059 "user": [ 1060 { 1061 "name": "root", 1062 "password": "$0$password" 1063 } 1064 ] 1065 } 1066 } 1067 } 1069 B.1.2. State Data 1071 The following shows possible state data associated the above 1072 configuration data: 1074 { 1075 "ietf-logical-network-element:logical-network-elements": { 1076 "logical-network-element": [ 1077 { 1078 "name": "cust1", 1079 "root": { 1080 "ietf-yang-library:modules-state": { 1081 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1082 "module": [ 1083 { 1084 "name": "iana-if-type", 1085 "revision": "2014-05-08", 1086 "namespace": 1087 "urn:ietf:params:xml:ns:yang:iana-if-type", 1088 "conformance-type": "import" 1089 }, 1090 { 1091 "name": "ietf-inet-types", 1092 "revision": "2013-07-15", 1093 "namespace": 1094 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1095 "conformance-type": "import" 1096 }, 1097 { 1098 "name": "ietf-interfaces", 1099 "revision": "2014-05-08", 1100 "feature": [ 1101 "arbitrary-names", 1102 "pre-provisioning" 1103 ], 1104 "namespace": 1105 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1106 "conformance-type": "implement" 1107 }, 1108 { 1109 "name": "ietf-ip", 1110 "revision": "2014-06-16", 1111 "namespace": 1112 "urn:ietf:params:xml:ns:yang:ietf-ip", 1113 "conformance-type": "implement" 1114 }, 1115 { 1116 "name": "ietf-ospf", 1117 "revision": "2017-03-12", 1118 "namespace": 1119 "urn:ietf:params:xml:ns:yang:ietf-ospf", 1120 "conformance-type": "implement" 1121 }, 1122 { 1123 "name": "ietf-routing", 1124 "revision": "2016-11-04", 1125 "namespace": 1126 "urn:ietf:params:xml:ns:yang:ietf-routing", 1127 "conformance-type": "implement" 1128 }, 1129 { 1130 "name": "ietf-system", 1131 "revision": "2014-08-06", 1132 "namespace": 1133 "urn:ietf:params:xml:ns:yang:ietf-system", 1134 "conformance-type": "implement" 1135 }, 1136 { 1137 "name": "ietf-yang-library", 1138 "revision": "2016-06-21", 1139 "namespace": 1140 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1141 "conformance-type": "implement" 1142 }, 1143 { 1144 "name": "ietf-yang-types", 1145 "revision": "2013-07-15", 1146 "namespace": 1147 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1148 "conformance-type": "import" 1149 } 1150 ] 1151 } 1152 "ietf-system:system-state": { 1153 "ietf-system:system-state": { 1154 "platform": { 1155 "os-name": "NetworkOS" 1156 } 1157 } 1158 }, 1159 "ietf-routing:routing-state": { 1160 "router-id": "192.0.2.1", 1161 "control-plane-protocols": { 1162 "control-plane-protocol": [ 1163 { 1164 "type": "ietf-routing:ospf", 1165 "name": "1", 1166 "ietf-ospf:ospf": { 1167 "instance": [ 1168 { 1169 "af": "ipv4", 1170 "areas": { 1171 "area": [ 1172 { 1173 "area-id": "203.0.113.1", 1174 "interfaces": { 1175 "interface": [ 1176 { 1177 "name": "eth1", 1178 "cost": 10 1179 } 1180 ] 1181 } 1182 } 1183 ] 1184 } 1185 } 1186 ] 1188 } 1189 } 1190 ] 1191 } 1192 }, 1193 "ietf-interfaces:interfaces-state": { 1194 "interfaces": { 1195 "interface": [ 1196 { 1197 "name": "eth1", 1198 "type": "iana-if-type:ethernetCsmacd", 1199 "oper-status": "up", 1200 "phys-address": "00:01:02:A1:B1:C1", 1201 "statistics": { 1202 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1203 }, 1204 "ip:ipv4": { 1205 "address": [ 1206 { 1207 "ip": "192.0.2.11", 1208 "prefix-length": 24, 1209 } 1210 ] 1211 } 1212 } 1213 ] 1214 } 1215 } 1216 } 1217 }, 1218 { 1219 "name": "cust2", 1220 "root": { 1221 "ietf-yang-library:modules-state": { 1222 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1223 "module": [ 1224 { 1225 "name": "iana-if-type", 1226 "revision": "2014-05-08", 1227 "namespace": 1228 "urn:ietf:params:xml:ns:yang:iana-if-type", 1229 "conformance-type": "import" 1230 }, 1231 { 1232 "name": "ietf-inet-types", 1233 "revision": "2013-07-15", 1234 "namespace": 1235 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1236 "conformance-type": "import" 1237 }, 1238 { 1239 "name": "ietf-interfaces", 1240 "revision": "2014-05-08", 1241 "feature": [ 1242 "arbitrary-names", 1243 "pre-provisioning" 1244 ], 1245 "namespace": 1246 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1247 "conformance-type": "implement" 1248 }, 1249 { 1250 "name": "ietf-ip", 1251 "revision": "2014-06-16", 1252 "namespace": 1253 "urn:ietf:params:xml:ns:yang:ietf-ip", 1254 "conformance-type": "implement" 1255 }, 1256 { 1257 "name": "ietf-ospf", 1258 "revision": "2017-03-12", 1259 "namespace": 1260 "urn:ietf:params:xml:ns:yang:ietf-ospf", 1261 "conformance-type": "implement" 1262 }, 1263 { 1264 "name": "ietf-routing", 1265 "revision": "2016-11-04", 1266 "namespace": 1267 "urn:ietf:params:xml:ns:yang:ietf-routing", 1268 "conformance-type": "implement" 1269 }, 1270 { 1271 "name": "ietf-system", 1272 "revision": "2014-08-06", 1273 "namespace": 1274 "urn:ietf:params:xml:ns:yang:ietf-system", 1275 "conformance-type": "implement" 1276 }, 1277 { 1278 "name": "ietf-yang-library", 1279 "revision": "2016-06-21", 1280 "namespace": 1281 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1282 "conformance-type": "implement" 1283 }, 1284 { 1285 "name": "ietf-yang-types", 1286 "revision": "2013-07-15", 1287 "namespace": 1288 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1289 "conformance-type": "import" 1290 } 1291 ] 1292 } 1293 "ietf-system:system-state": { 1294 "ietf-system:system-state": { 1295 "platform": { 1296 "os-name": "NetworkOS" 1297 } 1298 } 1299 }, 1300 "ietf-routing:routing-state": { 1301 "router-id": "192.0.2.2", 1302 "control-plane-protocols": { 1303 "control-plane-protocol": [ 1304 { 1305 "type": "ietf-routing:ospf", 1306 "name": "1", 1307 "ietf-ospf:ospf": { 1308 "instance": [ 1309 { 1310 "af": "ipv4", 1311 "areas": { 1312 "area": [ 1313 { 1314 "area-id": "203.0.113.1", 1315 "interfaces": { 1316 "interface": [ 1317 { 1318 "name": "eth1", 1319 "cost": 10 1320 } 1321 ] 1322 } 1323 } 1324 ] 1325 } 1326 } 1327 ] 1328 } 1329 } 1330 ] 1331 } 1333 } 1334 "ietf-interfaces:interfaces-state": { 1335 "interfaces": { 1336 { 1337 "name": "eth1", 1338 "type": "iana-if-type:ethernetCsmacd", 1339 "oper-status": "up", 1340 "phys-address": "00:01:02:A1:B1:C2", 1341 "statistics": { 1342 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1343 }, 1344 "ip:ipv4": { 1345 "address": [ 1346 { 1347 "ip": "192.0.2.11", 1348 "prefix-length": 24, 1349 } 1350 ] 1351 } 1352 } 1353 ] 1354 } 1355 } 1356 } 1357 ] 1358 }, 1360 "ietf-interfaces:interfaces-state": { 1361 "interfaces": { 1362 "interface": [ 1363 { 1364 "name": "eth0", 1365 "type": "iana-if-type:ethernetCsmacd", 1366 "oper-status": "up", 1367 "phys-address": "00:01:02:A1:B1:C0", 1368 "statistics": { 1369 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1370 }, 1371 "ip:ipv4": { 1372 "address": [ 1373 { 1374 "ip": "192.0.2.10", 1375 "prefix-length": 24, 1376 } 1377 ] 1378 } 1379 }, 1380 { 1381 "name": "cust1:eth1", 1382 "type": "iana-if-type:ethernetCsmacd", 1383 "oper-status": "up", 1384 "phys-address": "00:01:02:A1:B1:C1", 1385 "statistics": { 1386 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1387 } 1388 }, 1389 { 1390 "name": "cust2:eth1", 1391 "type": "iana-if-type:ethernetCsmacd", 1392 "oper-status": "up", 1393 "phys-address": "00:01:02:A1:B1:C2", 1394 "statistics": { 1395 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1396 } 1397 } 1398 ] 1399 } 1400 }, 1402 "ietf-yang-library:modules-state": { 1403 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1404 "module": [ 1405 { 1406 "name": "iana-if-type", 1407 "revision": "2014-05-08", 1408 "namespace": 1409 "urn:ietf:params:xml:ns:yang:iana-if-type", 1410 "conformance-type": "import" 1411 }, 1412 { 1413 "name": "ietf-inet-types", 1414 "revision": "2013-07-15", 1415 "namespace": 1416 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1417 "conformance-type": "import" 1418 }, 1419 { 1420 "name": "ietf-interfaces", 1421 "revision": "2014-05-08", 1422 "feature": [ 1423 "arbitrary-names", 1424 "pre-provisioning" 1425 ], 1426 "namespace": 1427 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1428 "conformance-type": "implement" 1430 }, 1431 { 1432 "name": "ietf-ip", 1433 "revision": "2014-06-16", 1434 "namespace": 1435 "urn:ietf:params:xml:ns:yang:ietf-ip", 1436 "conformance-type": "implement" 1437 }, 1438 { 1439 "name": "ietf-logical-network-element", 1440 "revision": "2017-03-13", 1441 "feature": [ 1442 "bind-lne-name" 1443 ], 1444 "namespace": 1445 "urn:ietf:params:xml:ns:yang:ietf-logical-network-element", 1446 "conformance-type": "implement" 1447 }, 1448 { 1449 "name": "ietf-ospf", 1450 "revision": "2017-03-12", 1451 "namespace": 1452 "urn:ietf:params:xml:ns:yang:ietf-ospf", 1453 "conformance-type": "implement" 1454 }, 1455 { 1456 "name": "ietf-routing", 1457 "revision": "2016-11-04", 1458 "namespace": 1459 "urn:ietf:params:xml:ns:yang:ietf-routing", 1460 "conformance-type": "implement" 1461 }, 1462 { 1463 "name": "ietf-system", 1464 "revision": "2014-08-06", 1465 "namespace": 1466 "urn:ietf:params:xml:ns:yang:ietf-system", 1467 "conformance-type": "implement" 1468 }, 1469 { 1470 "name": "ietf-yang-library", 1471 "revision": "2016-06-21", 1472 "namespace": 1473 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1474 "conformance-type": "implement" 1475 }, 1476 { 1477 "name": "ietf-yang-schema-mount", 1478 "revision": "2017-05-16", 1479 "namespace": 1480 "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount", 1481 "conformance-type": "implement" 1482 }, 1483 { 1484 "name": "ietf-yang-types", 1485 "revision": "2013-07-15", 1486 "namespace": 1487 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1488 "conformance-type": "import" 1489 } 1490 ] 1491 }, 1493 "ietf-system:system-state": { 1494 "platform": { 1495 "os-name": "NetworkOS" 1496 } 1497 } 1498 } 1500 B.2. Example: Self Managed LNE 1502 This section describes an example of the LNE model using schema mount 1503 to achieve child independent management. An example device supports 1504 multiple instances of LNEs (logical routers), each of them has the 1505 features of layer 2 and layer 3 interfaces [RFC7223], routing 1506 information base [RFC8022], and the OSPF protocol. Each of these 1507 features is specified by a YANG model, and they are put together by 1508 the YANG Schema Mount as following: 1510 module: ietf-logical-network-element 1511 +--rw logical-network-elements 1512 +--rw logical-network-element* [name] 1513 +--rw name string 1514 +--mp root 1515 // The internal modules of the LNE are not visible to 1516 // the parament management. 1517 // The child manages its modules, including ietf-routing 1518 // and ietf-interfaces 1520 module: ietf-interfaces 1521 +--rw interfaces 1522 | +--rw interface* [name] 1523 | +--rw name string 1524 | +--rw lne:bind-lne-name? string 1525 +--ro interfaces-state 1526 +--ro interface* [name] 1527 +--ro name string 1528 +--ro oper-status enumeration 1530 module: ietf-yang-library 1531 +--ro modules-state 1532 +--ro module-set-id string 1533 +--ro module* [name revision] 1534 +--ro name yang:yang-identifier 1536 module: ietf-system 1537 +--rw system 1538 | +--rw contact? string 1539 | +--rw hostname? inet:domain-name 1540 | +--rw authentication {authentication}? 1541 | +--rw user-authentication-order* identityref 1542 | +--rw user* [name] {local-users}? 1543 | +--rw name string 1544 | +--rw password? ianach:crypt-hash 1545 | +--rw authorized-key* [name] 1546 | +--rw name string 1547 | +--rw algorithm string 1548 | +--rw key-data binary 1549 +--ro system-state 1550 +--ro platform 1551 | +--ro os-name? string 1552 | +--ro os-release? string 1554 To realize the above schema, the device implements the following 1555 schema mount instance: 1557 "ietf-yang-schema-mount:schema-mounts": { 1558 "mount-point": [ 1559 { 1560 "module": "ietf-logical-network-element", 1561 "name": "root", 1562 "inline": [null] 1563 } 1564 ] 1565 } 1567 By using the implementation of the YANG schema mount, an operator can 1568 create instances of logical routers, each with their logical router 1569 specific in-line modules. An interface can be assigned to a logical 1570 router, so that the logical router has the permission to access this 1571 interface. The OSPF protocol can then be enabled on this assigned 1572 interface. Each logical router independently manages its own set of 1573 modules, which may or may not be the same as other logical routers. 1574 The following is an example of schema set implemented on one 1575 particular logical router: 1577 module: ietf-yang-library 1578 +--ro modules-state 1579 +--ro module-set-id string 1580 +--ro module* [name revision] 1581 +--ro name yang:yang-identifier 1583 module: ietf-system 1584 +--rw system 1585 | +--rw contact? string 1586 | +--rw hostname? inet:domain-name 1587 | +--rw authentication {authentication}? 1588 | +--rw user-authentication-order* identityref 1589 | +--rw user* [name] {local-users}? 1590 | +--rw name string 1591 | +--rw password? ianach:crypt-hash 1592 | +--rw authorized-key* [name] 1593 | +--rw name string 1594 | +--rw algorithm string 1595 | +--rw key-data binary 1596 +--ro system-state 1597 +--ro platform 1598 | +--ro os-name? string 1599 | +--ro os-release? string 1601 module: ietf-routing 1602 +--ro routing-state 1603 | +--ro router-id? yang:dotted-quad 1604 | +--ro control-plane-protocols 1605 | | +--ro control-plane-protocol* [type name] 1606 | | +--ro ospf:ospf/ 1607 | | +--ro instance* [af] 1608 +--rw routing 1609 +--rw router-id? yang:dotted-quad 1610 +--rw control-plane-protocols 1611 +--rw control-plane-protocol* [type name] 1612 +--rw ospf:ospf/ 1613 +--rw instance* [af] 1614 +--rw areas 1615 +--rw area* [area-id] 1616 +--rw interfaces 1617 +--rw interface* [name] 1618 +--rw name if:interface-ref 1619 +--rw cost? uint16 1621 module: ietf-interfaces 1622 +--rw interfaces 1623 | +--rw interface* [name] 1624 | +--rw name string 1625 +--ro interfaces-state 1626 +--ro interface* [name] 1627 +--ro name string 1628 +--ro oper-status enumeration 1630 B.2.1. Configuration Data 1632 Each of the child virtual routers is managed through its own sessions 1633 and configuration data. 1635 B.2.1.1. Logical Network Element 'vnf1' 1637 The following shows an example configuration data for the LNE name 1638 "vnf1": 1640 { 1641 "ietf-system:system": { 1642 "authentication": { 1643 "user": [ 1644 { 1645 "name": "john", 1646 "password": "$0$password" 1647 } 1648 ] 1649 } 1650 }, 1651 "ietf-routing:routing": { 1652 "router-id": "192.0.2.1", 1653 "control-plane-protocols": { 1654 "control-plane-protocol": [ 1655 { 1656 "type": "ietf-routing:ospf", 1657 "name": "1", 1658 "ietf-ospf:ospf": { 1659 "instance": [ 1660 { 1661 "af": "ipv4", 1662 "areas": { 1663 "area": [ 1664 { 1665 "area-id": "203.0.113.1", 1666 "interfaces": { 1667 "interface": [ 1668 { 1669 "name": "eth1", 1670 "cost": 10 1671 } 1672 ] 1673 } 1674 } 1675 ] 1676 } 1677 } 1678 ] 1679 } 1680 } 1681 ] 1682 } 1683 }, 1684 "ietf-interfaces:interfaces": { 1685 "interfaces": { 1686 "interface": [ 1687 { 1688 "name": "eth1", 1689 "ip:ipv4": { 1690 "address": [ 1691 { 1692 "ip": "192.0.2.11", 1693 "prefix-length": 24, 1694 } 1695 ] 1696 } 1697 } 1698 ] 1699 } 1700 } 1702 } 1704 B.2.1.2. Logical Network Element 'vnf2' 1706 The following shows an example configuration data for the LNE name 1707 "vnf2": 1709 { 1710 "ietf-system:system": { 1711 "authentication": { 1712 "user": [ 1713 { 1714 "name": "john", 1715 "password": "$0$password" 1716 } 1717 ] 1718 } 1719 }, 1720 "ietf-routing:routing": { 1721 "router-id": "192.0.2.2", 1722 "control-plane-protocols": { 1723 "control-plane-protocol": [ 1724 { 1725 "type": "ietf-routing:ospf", 1726 "name": "1", 1727 "ietf-ospf:ospf": { 1728 "instance": [ 1729 { 1730 "af": "ipv4", 1731 "areas": { 1732 "area": [ 1733 { 1734 "area-id": "203.0.113.1", 1735 "interfaces": { 1736 "interface": [ 1737 { 1738 "name": "eth1", 1739 "cost": 10 1740 } 1741 ] 1742 } 1743 } 1744 ] 1745 } 1746 } 1747 ] 1748 } 1749 } 1751 ] 1752 } 1753 }, 1754 "ietf-interfaces:interfaces": { 1755 "interfaces": { 1756 "interface": [ 1757 { 1758 "name": "eth1", 1759 "ip:ipv4": { 1760 "address": [ 1761 { 1762 "ip": "192.0.2.11", 1763 "prefix-length": 24, 1764 } 1765 ] 1766 } 1767 } 1768 ] 1769 } 1770 } 1771 } 1773 B.2.2. State Data 1775 The following sections shows possible state data associated the above 1776 configuration data. Note that there are three views: the host 1777 device's, and each LNE's. 1779 B.2.2.1. Host Device 1781 The following shows state data for the device hosting the example 1782 LNEs: 1784 { 1785 "ietf-logical-network-element:logical-network-elements": { 1786 "logical-network-element": [ 1787 { 1788 "name": "vnf1", 1789 "root": { 1790 } 1791 }, 1792 { 1793 "name": "vnf2", 1794 "root": { 1795 } 1796 } 1797 ] 1798 }, 1799 "ietf-interfaces:interfaces-state": { 1800 "interfaces": { 1801 "interface": [ 1802 { 1803 "name": "eth0", 1804 "type": "iana-if-type:ethernetCsmacd", 1805 "oper-status": "up", 1806 "phys-address": "00:01:02:A1:B1:C0", 1807 "statistics": { 1808 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1809 }, 1810 "ip:ipv4": { 1811 "address": [ 1812 { 1813 "ip": "192.0.2.10", 1814 "prefix-length": 24, 1815 } 1816 ] 1817 } 1818 }, 1819 { 1820 "name": "vnf1:eth1", 1821 "type": "iana-if-type:ethernetCsmacd", 1822 "oper-status": "up", 1823 "phys-address": "00:01:02:A1:B1:C1", 1824 "statistics": { 1825 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1826 } 1827 }, 1828 { 1829 "name": "vnf2:eth2", 1830 "type": "iana-if-type:ethernetCsmacd", 1831 "oper-status": "up", 1832 "phys-address": "00:01:02:A1:B1:C2", 1833 "statistics": { 1834 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1835 } 1836 } 1837 ] 1838 } 1839 }, 1841 "ietf-yang-library:modules-state": { 1842 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1843 "module": [ 1844 { 1845 "name": "iana-if-type", 1846 "revision": "2014-05-08", 1847 "namespace": 1848 "urn:ietf:params:xml:ns:yang:iana-if-type", 1849 "conformance-type": "import" 1850 }, 1851 { 1852 "name": "ietf-inet-types", 1853 "revision": "2013-07-15", 1854 "namespace": 1855 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1856 "conformance-type": "import" 1857 }, 1858 { 1859 "name": "ietf-interfaces", 1860 "revision": "2014-05-08", 1861 "feature": [ 1862 "arbitrary-names", 1863 "pre-provisioning" 1864 ], 1865 "namespace": 1866 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1867 "conformance-type": "implement" 1868 }, 1869 { 1870 "name": "ietf-ip", 1871 "revision": "2014-06-16", 1872 "namespace": 1873 "urn:ietf:params:xml:ns:yang:ietf-ip", 1874 "conformance-type": "implement" 1875 }, 1876 { 1877 "name": "ietf-logical-network-element", 1878 "revision": "2017-03-13", 1879 "feature": [ 1880 "bind-lne-name" 1881 ], 1882 "namespace": 1883 "urn:ietf:params:xml:ns:yang:ietf-logical-network-element", 1884 "conformance-type": "implement" 1885 }, 1886 { 1887 "name": "ietf-system", 1888 "revision": "2014-08-06", 1889 "namespace": 1890 "urn:ietf:params:xml:ns:yang:ietf-system", 1891 "conformance-type": "implement" 1892 }, 1893 { 1894 "name": "ietf-yang-library", 1895 "revision": "2016-06-21", 1896 "namespace": 1897 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1898 "conformance-type": "implement" 1899 }, 1900 { 1901 "name": "ietf-yang-schema-mount", 1902 "revision": "2017-05-16", 1903 "namespace": 1904 "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount", 1905 "conformance-type": "implement" 1906 }, 1907 { 1908 "name": "ietf-yang-types", 1909 "revision": "2013-07-15", 1910 "namespace": 1911 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1912 "conformance-type": "import" 1913 } 1914 ] 1915 }, 1917 "ietf-system:system-state": { 1918 "platform": { 1919 "os-name": "NetworkOS" 1920 } 1921 } 1922 } 1924 B.2.2.2. Logical Network Element 'vnf1' 1926 The following shows state data for the example LNE with name "vnf1": 1928 { 1929 "ietf-yang-library:modules-state": { 1930 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1931 "module": [ 1932 { 1933 "name": "iana-if-type", 1934 "revision": "2014-05-08", 1935 "namespace": 1936 "urn:ietf:params:xml:ns:yang:iana-if-type", 1937 "conformance-type": "import" 1938 }, 1939 { 1940 "name": "ietf-inet-types", 1941 "revision": "2013-07-15", 1942 "namespace": 1944 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1945 "conformance-type": "import" 1946 }, 1947 { 1948 "name": "ietf-interfaces", 1949 "revision": "2014-05-08", 1950 "feature": [ 1951 "arbitrary-names", 1952 "pre-provisioning" 1953 ], 1954 "namespace": 1955 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1956 "conformance-type": "implement" 1957 }, 1958 { 1959 "name": "ietf-ip", 1960 "revision": "2014-06-16", 1961 "namespace": 1962 "urn:ietf:params:xml:ns:yang:ietf-ip", 1963 "conformance-type": "implement" 1964 }, 1965 { 1966 "name": "ietf-ospf", 1967 "revision": "2017-03-12", 1968 "namespace": 1969 "urn:ietf:params:xml:ns:yang:ietf-ospf", 1970 "conformance-type": "implement" 1971 }, 1972 { 1973 "name": "ietf-routing", 1974 "revision": "2016-11-04", 1975 "namespace": 1976 "urn:ietf:params:xml:ns:yang:ietf-routing", 1977 "conformance-type": "implement" 1978 }, 1979 { 1980 "name": "ietf-system", 1981 "revision": "2014-08-06", 1982 "namespace": 1983 "urn:ietf:params:xml:ns:yang:ietf-system", 1984 "conformance-type": "implement" 1985 }, 1986 { 1987 "name": "ietf-yang-library", 1988 "revision": "2016-06-21", 1989 "namespace": 1990 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1991 "conformance-type": "implement" 1993 }, 1994 { 1995 "name": "ietf-yang-types", 1996 "revision": "2013-07-15", 1997 "namespace": 1998 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1999 "conformance-type": "import" 2000 } 2001 ] 2002 }, 2004 "ietf-system:system-state": { 2005 "platform": { 2006 "os-name": "NetworkOS" 2007 } 2008 }, 2010 "ietf-routing:routing-state": { 2011 "router-id": "192.0.2.1", 2012 "control-plane-protocols": { 2013 "control-plane-protocol": [ 2014 { 2015 "type": "ietf-routing:ospf", 2016 "name": "1", 2017 "ietf-ospf:ospf": { 2018 "instance": [ 2019 { 2020 "af": "ipv4", 2021 "areas": { 2022 "area": [ 2023 { 2024 "area-id": "203.0.113.1", 2025 "interfaces": { 2026 "interface": [ 2027 { 2028 "name": "eth1", 2029 "cost": 10 2030 } 2031 ] 2032 } 2033 } 2034 ] 2035 } 2036 } 2037 ] 2038 } 2039 } 2040 ] 2042 } 2043 }, 2045 "ietf-interfaces:interfaces-state": { 2046 "interfaces": { 2047 "interface": [ 2048 { 2049 "name": "eth1", 2050 "type": "iana-if-type:ethernetCsmacd", 2051 "oper-status": "up", 2052 "phys-address": "00:01:02:A1:B1:C1", 2053 "statistics": { 2054 "discontinuity-time": "2017-06-26T12:34:56-05:00" 2055 }, 2056 "ip:ipv4": { 2057 "address": [ 2058 { 2059 "ip": "192.0.2.11", 2060 "prefix-length": 24, 2061 } 2062 ] 2063 } 2064 } 2065 ] 2066 } 2067 } 2068 } 2070 B.2.2.3. Logical Network Element 'vnf2' 2072 The following shows state data for the example LNE with name "vnf2": 2074 { 2075 "ietf-yang-library:modules-state": { 2076 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 2077 "module": [ 2078 { 2079 "name": "iana-if-type", 2080 "revision": "2014-05-08", 2081 "namespace": 2082 "urn:ietf:params:xml:ns:yang:iana-if-type", 2083 "conformance-type": "import" 2084 }, 2085 { 2086 "name": "ietf-inet-types", 2087 "revision": "2013-07-15", 2088 "namespace": 2089 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 2090 "conformance-type": "import" 2091 }, 2092 { 2093 "name": "ietf-interfaces", 2094 "revision": "2014-05-08", 2095 "feature": [ 2096 "arbitrary-names", 2097 "pre-provisioning" 2098 ], 2099 "namespace": 2100 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 2101 "conformance-type": "implement" 2102 }, 2103 { 2104 "name": "ietf-ip", 2105 "revision": "2014-06-16", 2106 "namespace": 2107 "urn:ietf:params:xml:ns:yang:ietf-ip", 2108 "conformance-type": "implement" 2109 }, 2110 { 2111 "name": "ietf-ospf", 2112 "revision": "2017-03-12", 2113 "namespace": 2114 "urn:ietf:params:xml:ns:yang:ietf-ospf", 2115 "conformance-type": "implement" 2116 }, 2117 { 2118 "name": "ietf-routing", 2119 "revision": "2016-11-04", 2120 "namespace": 2121 "urn:ietf:params:xml:ns:yang:ietf-routing", 2122 "conformance-type": "implement" 2123 }, 2124 { 2125 "name": "ietf-system", 2126 "revision": "2014-08-06", 2127 "namespace": 2128 "urn:ietf:params:xml:ns:yang:ietf-system", 2129 "conformance-type": "implement" 2130 }, 2131 { 2132 "name": "ietf-yang-library", 2133 "revision": "2016-06-21", 2134 "namespace": 2135 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 2136 "conformance-type": "implement" 2137 }, 2138 { 2139 "name": "ietf-yang-types", 2140 "revision": "2013-07-15", 2141 "namespace": 2142 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 2143 "conformance-type": "import" 2144 } 2145 ] 2146 }, 2148 "ietf-system:system-state": { 2149 "platform": { 2150 "os-name": "NetworkOS" 2151 } 2152 }, 2154 "ietf-routing:routing-state": { 2155 "router-id": "192.0.2.2", 2156 "control-plane-protocols": { 2157 "control-plane-protocol": [ 2158 { 2159 "type": "ietf-routing:ospf", 2160 "name": "1", 2161 "ietf-ospf:ospf": { 2162 "instance": [ 2163 { 2164 "af": "ipv4", 2165 "areas": { 2166 "area": [ 2167 { 2168 "area-id": "203.0.113.1", 2169 "interfaces": { 2170 "interface": [ 2171 { 2172 "name": "eth1", 2173 "cost": 10 2174 } 2175 ] 2176 } 2177 } 2178 ] 2179 } 2180 } 2181 ] 2182 } 2183 } 2184 ] 2185 } 2187 }, 2189 "ietf-interfaces:interfaces-state": { 2190 "interfaces": { 2191 "interface": [ 2192 { 2193 "name": "eth1", 2194 "type": "iana-if-type:ethernetCsmacd", 2195 "oper-status": "up", 2196 "phys-address": "00:01:02:A1:B1:C2", 2197 "statistics": { 2198 "discontinuity-time": "2017-06-26T12:34:56-05:00" 2199 }, 2200 "ip:ipv4": { 2201 "address": [ 2202 { 2203 "ip": "192.0.2.11", 2204 "prefix-length": 24, 2205 } 2206 ] 2207 } 2208 } 2209 ] 2210 } 2211 } 2212 } 2214 Authors' Addresses 2216 Lou Berger 2217 LabN Consulting, L.L.C. 2219 Email: lberger@labn.net 2221 Christan Hopps 2222 Deutsche Telekom 2224 Email: chopps@chopps.org 2226 Acee Lindem 2227 Cisco Systems 2228 301 Midenhall Way 2229 Cary, NC 27513 2230 USA 2232 Email: acee@cisco.com 2233 Dean Bogdanovic 2235 Email: ivandean@gmail.com 2237 Xufeng Liu 2238 Jabil 2240 Email: Xufeng_Liu@jabil.com