idnits 2.17.1 draft-ietf-rtgwg-lne-model-03.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 673 has weird spacing: '...-set-id str...' == Line 686 has weird spacing: '...gorithm str...' == Line 734 has weird spacing: '...-set-id str...' == Line 749 has weird spacing: '...gorithm str...' == Line 835 has weird spacing: '...-set-id str...' == (7 more instances...) -- The document date (July 3, 2017) is 2489 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-05 ** 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-02 -- 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: January 4, 2018 Deutsche Telekom 6 A. Lindem 7 Cisco Systems 8 D. Bogdanovic 10 X. Liu 11 Jabil 12 July 3, 2017 14 YANG Logical Network Elements 15 draft-ietf-rtgwg-lne-model-03 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 http://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 January 4, 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 (http://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 . . . . . . . . . . . . . . . . . 13 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-06-30.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-03-13 { 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 description 497 "True if the host can access LNE information 498 using the root mount point. This value 499 my not be modifiable in all implementations."; 500 } 501 leaf description { 502 type string; 503 description 504 "Description of the logical network element."; 505 } 506 yangmnt:mount-point "root" { 507 description 508 "Root for models supported per logical 509 network element. This mount point will 510 may or may not be inline based on the server 511 implementation. It SHALL always contain a YANG 512 library and interfaces instance. 514 When the associated 'managed' leaf is 'false' any 515 operation that attempts to access information below 516 the root SHALL fail with an error-tag of 517 'access-denied' and an error-app-tag of 518 'lne-not-managed'."; 519 } 520 } 521 } 523 // augment statements 525 augment "/if:interfaces/if:interface" { 526 description 527 "Add a node for the identification of the logical network 528 element associated with an interface. Applies to interfaces 529 that can be assigned on a per logical network element basis. 531 Note that a standard error will be returned if the 532 identified leafref isn't present. If an interfaces cannot 533 be assigned for any other reason, the operation SHALL fail 534 with an error-tag of 'operation-failed' and an error-app-tag 535 of 'lne-assignment-failed'. A meaningful error-info that 536 indicates the source of the assignment failure SHOULD also 537 be provided."; 538 leaf bind-lne-name { 539 type leafref { 540 path "/logical-network-elements/logical-network-element/name"; 541 } 542 description 543 "Logical network element ID to which interface is bound."; 544 } 545 } 547 // notification statements 549 notification bind-lne-name-failed { 550 description 551 "Indicates an error in the association of an interface to an 552 LNE. Only generated after success is initially returned when 553 bind-lne-name is set."; 554 leaf name { 555 type leafref { 556 path "/if:interfaces/if:interface/if:name"; 557 } 558 mandatory true; 559 description 560 "Contains the interface name associated with the 561 failure."; 562 } 563 leaf bind-lne-name { 564 type leafref { 565 path "/if:interfaces/if:interface/lne:bind-lne-name"; 566 } 567 mandatory true; 568 description 569 "Contains the bind-lne-name associated with the 570 failure."; 571 } 572 leaf error-info { 573 type string; 574 description 575 "Optionally, indicates the source of the assignment 576 failure."; 577 } 578 } 579 } 580 582 7. References 584 7.1. Normative References 586 [I-D.ietf-netmod-schema-mount] 587 Bjorklund, M. and L. Lhotka, "YANG Schema Mount", draft- 588 ietf-netmod-schema-mount-05 (work in progress), May 2017. 590 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 591 Requirement Levels", BCP 14, RFC 2119, 592 DOI 10.17487/RFC2119, March 1997, 593 . 595 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 596 DOI 10.17487/RFC3688, January 2004, 597 . 599 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 600 the Network Configuration Protocol (NETCONF)", RFC 6020, 601 DOI 10.17487/RFC6020, October 2010, 602 . 604 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 605 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 606 . 608 7.2. Informative References 610 [I-D.ietf-netmod-yang-tree-diagrams] 611 Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft- 612 ietf-netmod-yang-tree-diagrams-01 (work in progress), June 613 2017. 615 [I-D.ietf-rtgwg-device-model] 616 Lindem, A., Berger, L., Bogdanovic, D., and C. Hopps, 617 "Network Device YANG Logical Organization", draft-ietf- 618 rtgwg-device-model-02 (work in progress), March 2017. 620 [I-D.ietf-rtgwg-ni-model] 621 Berger, L., Hopps, C., Lindem, A., and D. Bogdanovic, 622 "YANG Network Instances", draft-ietf-rtgwg-ni-model-02 623 (work in progress), March 2017. 625 [RFC7317] Bierman, A. and M. Bjorklund, "A YANG Data Model for 626 System Management", RFC 7317, DOI 10.17487/RFC7317, August 627 2014, . 629 [RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module 630 Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, 631 . 633 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 634 RFC 7950, DOI 10.17487/RFC7950, August 2016, 635 . 637 [RFC8022] Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 638 Management", RFC 8022, DOI 10.17487/RFC8022, November 639 2016, . 641 Appendix A. Acknowledgments 643 The Routing Area Yang Architecture design team members included Acee 644 Lindem, Anees Shaikh, Christian Hopps, Dean Bogdanovic, Lou Berger, 645 Qin Wu, Rob Shakir, Stephane Litkowski, and Yan Gang. Useful review 646 comments were also received by Martin Bjorklund and John Scudder. 648 This document was motivated by, and derived from, 649 [I-D.ietf-rtgwg-device-model]. 651 The RFC text was produced using Marshall Rose's xml2rfc tool. 653 Appendix B. Examples 655 The following subsections provide example uses of LNEs. 657 B.1. Example: Host Device Managed LNE 659 This section describes an example of the LNE model using schema mount 660 to achieve the parent management. An example device supports 661 multiple instances of LNEs (logical routers), each of which supports 662 features of layer 2 and layer 3 interfaces [RFC7223], routing 663 information base [RFC8022], and OSPF protocol. Each of these 664 features is specified by a YANG model, and they are combined using 665 YANG Schema Mount as follows: 667 module: ietf-logical-network-element 668 +--rw logical-network-elements 669 +--rw logical-network-element* [name] 670 +--rw name string 671 +--mp root 672 +--ro yanglib:modules-state/ 673 | +--ro module-set-id string 674 | +--ro module* [name revision] 675 | +--ro name yang:yang-identifier 676 +--rw sys:system/ 677 | +--rw contact? string 678 | +--rw hostname? inet:domain-name 679 | +--rw authentication {authentication}? 680 | +--rw user-authentication-order* identityref 681 | +--rw user* [name] {local-users}? 682 | +--rw name string 683 | +--rw password? ianach:crypt-hash 684 | +--rw authorized-key* [name] 685 | +--rw name string 686 | +--rw algorithm string 687 | +--rw key-data binary 688 +--ro sys:system-state/ 689 | ... 690 +--ro rt:routing-state/ 691 | +--ro router-id? yang:dotted-quad 692 | +--ro control-plane-protocols 693 | +--ro control-plane-protocol* [type name] 694 | +--ro ospf:ospf/ 695 | +--ro instance* [af] 696 | ... 697 +--rw rt:routing/ 698 | +--rw router-id? yang:dotted-quad 699 | +--rw control-plane-protocols 700 | +--rw control-plane-protocol* [type name] 701 | +--rw ospf:ospf/ 702 | +--rw instance* [af] 703 | +--rw areas 704 | +--rw area* [area-id] 705 | +--rw interfaces 706 | +--rw interface* [name] 707 | +--rw name if:interface-ref 708 | +--rw cost? uint16 709 +--rw if:interfaces/ 710 | +--rw interface* [name] 711 | +--rw name string 712 | +--rw ip:ipv4!/ 713 | | +--rw address* [ip] 714 | | ... 715 +--ro if:interfaces-state/ 716 +--ro interface* [name] 717 +--ro name string 718 +--ro ip:ipv4!/ 719 | +--ro address* [ip] 720 | ... 722 module: ietf-interfaces 723 +--rw interfaces 724 | +--rw interface* [name] 725 | +--rw name string 726 | +--rw lne:bind-lne-name? string 727 +--ro interfaces-state 728 +--ro interface* [name] 729 +--ro name string 730 +--ro oper-status enumeration 732 module: ietf-yang-library 733 +--ro modules-state 734 +--ro module-set-id string 735 +--ro module* [name revision] 736 +--ro name yang:yang-identifier 738 module: ietf-system 739 +--rw system 740 | +--rw contact? string 741 | +--rw hostname? inet:domain-name 742 | +--rw authentication {authentication}? 743 | +--rw user-authentication-order* identityref 744 | +--rw user* [name] {local-users}? 745 | +--rw name string 746 | +--rw password? ianach:crypt-hash 747 | +--rw authorized-key* [name] 748 | +--rw name string 749 | +--rw algorithm string 750 | +--rw key-data binary 751 +--ro system-state 752 +--ro platform 753 | +--ro os-name? string 754 | +--ro os-release? string 756 To realize the above schema, the example device implements the 757 following schema mount instance: 759 "ietf-yang-schema-mount:schema-mounts": { 760 "mount-point": [ 761 { 762 "module": "ietf-logical-network-element", 763 "name": "root", 764 "use-schema": [ 765 { 766 "name": "lne-schema" 767 } 768 ] 769 } 770 ], 771 "schema": [ 772 { 773 "name": "lne-schema", 774 "module": [ 775 { 776 "name": "ietf-yang-library", 777 "revision": "2016-06-21", 778 "namespace": 779 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 780 "conformance-type": "implement" 781 }, 782 { 783 "name": "ietf-system", 784 "revision": "2014-08-06", 785 "namespace": 786 "urn:ietf:params:xml:ns:yang:ietf-system", 787 "conformance-type": "implement" 788 }, 789 { 790 "name": "ietf-routing", 791 "revision": "2016-11-04", 792 "namespace": 793 "urn:ietf:params:xml:ns:yang:ietf-routing", 794 "conformance-type": "implement" 795 }, 796 { 797 "name": "ietf-ospf", 798 "revision": "2017-03-12", 799 "namespace": 800 "urn:ietf:params:xml:ns:yang:ietf-ospf", 801 "conformance-type": "implement" 802 }, 803 { 804 "name": "ietf-interfaces", 805 "revision": "2014-05-08", 806 "namespace": 807 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 808 "conformance-type": "implement" 809 }, 810 { 811 "name": "ietf-ip", 812 "revision": "2014-06-16", 813 "namespace": 814 "urn:ietf:params:xml:ns:yang:ietf-ip", 815 "conformance-type": "implement" 816 } 817 ] 818 } 819 ] 820 } 822 By using the implementation of the YANG schema mount, an operator can 823 create instances of logical routers. An interface can be assigned to 824 a logical router, so that the logical router has the permission to 825 access this interface. The OSPF protocol can then be enabled on this 826 assigned interface. 828 For this implementation, a parent management session has access to 829 the schemas of both the parent hosting system and the child logical 830 routers. In addition, each child logical router can grant its own 831 management sessions, which have the following schema: 833 module: ietf-yang-library 834 +--ro modules-state 835 +--ro module-set-id string 836 +--ro module* [name revision] 837 +--ro name yang:yang-identifier 839 module: ietf-system 840 +--rw system 841 | +--rw contact? string 842 | +--rw hostname? inet:domain-name 843 | +--rw authentication {authentication}? 844 | +--rw user-authentication-order* identityref 845 | +--rw user* [name] {local-users}? 846 | +--rw name string 847 | +--rw password? ianach:crypt-hash 848 | +--rw authorized-key* [name] 849 | +--rw name string 850 | +--rw algorithm string 851 | +--rw key-data binary 852 +--ro system-state 853 +--ro platform 854 | +--ro os-name? string 855 | +--ro os-release? string 857 module: ietf-routing 858 +--ro routing-state 859 | +--ro router-id? yang:dotted-quad 860 | +--ro control-plane-protocols 861 | | +--ro control-plane-protocol* [type name] 862 | | +--ro ospf:ospf/ 863 | | +--ro instance* [af] 864 +--rw routing 865 +--rw router-id? yang:dotted-quad 866 +--rw control-plane-protocols 867 +--rw control-plane-protocol* [type name] 868 +--rw ospf:ospf/ 869 +--rw instance* [af] 870 +--rw areas 871 +--rw area* [area-id] 872 +--rw interfaces 873 +--rw interface* [name] 874 +--rw name if:interface-ref 875 +--rw cost? uint16 877 module: ietf-interfaces 878 +--rw interfaces 879 | +--rw interface* [name] 880 | +--rw name string 881 +--ro interfaces-state 882 +--ro interface* [name] 883 +--ro name string 884 +--ro oper-status enumeration 886 B.1.1. Configuration Data 888 The following shows an example where two customer specific LNEs are 889 configured: 891 { 892 "ietf-logical-network-element:logical-network-elements": { 893 "logical-network-element": [ 894 { 895 "name": "cust1", 896 "root": { 897 "ietf-system:system": { 898 "authentication": { 899 "user": [ 900 { 901 "name": "john", 902 "password": "$0$password" 903 } 904 ] 905 } 906 }, 907 "ietf-routing:routing": { 908 "router-id": "192.0.2.1", 909 "control-plane-protocols": { 910 "control-plane-protocol": [ 911 { 912 "type": "ietf-routing:ospf", 913 "name": "1", 914 "ietf-ospf:ospf": { 915 "instance": [ 916 { 917 "af": "ipv4", 918 "areas": { 919 "area": [ 920 { 921 "area-id": "203.0.113.1", 922 "interfaces": { 923 "interface": [ 924 { 925 "name": "eth1", 926 "cost": 10 927 } 928 ] 929 } 930 } 931 ] 932 } 933 } 934 ] 935 } 936 } 937 ] 938 } 939 }, 940 "ietf-interfaces:interfaces": { 941 "interfaces": { 942 "interface": [ 943 { 944 "name": "eth1", 945 "ip:ipv4": { 946 "address": [ 947 { 948 "ip": "192.0.2.11", 949 "prefix-length": 24, 950 } 951 ] 952 } 953 } 954 ] 955 } 956 } 957 } 958 }, 959 { 960 "name": "cust2", 961 "root": { 962 "ietf-system:system": { 963 "authentication": { 964 "user": [ 965 { 966 "name": "john", 967 "password": "$0$password" 968 } 969 ] 970 } 971 } 972 "ietf-routing:routing": { 973 "router-id": "192.0.2.2", 974 "control-plane-protocols": { 975 "control-plane-protocol": [ 976 { 977 "type": "ietf-routing:ospf", 978 "name": "1", 979 "ietf-ospf:ospf": { 980 "instance": [ 981 { 982 "af": "ipv4", 983 "areas": { 984 "area": [ 985 { 986 "area-id": "203.0.113.1", 987 "interfaces": { 988 "interface": [ 989 { 990 "name": "eth1", 991 "cost": 10 992 } 993 ] 994 } 995 } 996 ] 997 } 998 } 999 ] 1000 } 1001 } 1002 ] 1003 } 1004 } 1005 "ietf-interfaces:interfaces": { 1006 "interfaces": { 1007 { 1008 "name": "eth1", 1009 "ip:ipv4": { 1010 "address": [ 1011 { 1012 "ip": "192.0.2.11", 1013 "prefix-length": 24, 1014 } 1015 ] 1016 } 1017 } 1018 ] 1019 } 1020 } 1021 } 1022 ] 1023 }, 1025 "ietf-interfaces:interfaces": { 1026 "interfaces": { 1027 "interface": [ 1028 { 1029 "name": "eth0", 1030 "ip:ipv4": { 1031 "address": [ 1032 { 1033 "ip": "192.0.2.10", 1034 "prefix-length": 24, 1035 } 1036 ] 1038 } 1039 }, 1040 { 1041 "name": "cust1:eth1", 1042 "lne:bind-lne-name": "cust1" 1043 }, 1044 { 1045 "name": "cust2:eth1", 1046 "lne:bind-lne-name": "cust2" 1047 } 1048 ] 1049 } 1050 }, 1052 "ietf-system:system": { 1053 "authentication": { 1054 "user": [ 1055 { 1056 "name": "root", 1057 "password": "$0$password" 1058 } 1059 ] 1060 } 1061 } 1062 } 1064 B.1.2. State Data 1066 The following shows possible state data associated the above 1067 configuration data: 1069 { 1070 "ietf-logical-network-element:logical-network-elements": { 1071 "logical-network-element": [ 1072 { 1073 "name": "cust1", 1074 "root": { 1075 "ietf-yang-library:modules-state": { 1076 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1077 "module": [ 1078 { 1079 "name": "iana-if-type", 1080 "revision": "2014-05-08", 1081 "namespace": 1082 "urn:ietf:params:xml:ns:yang:iana-if-type", 1083 "conformance-type": "import" 1084 }, 1085 { 1086 "name": "ietf-inet-types", 1087 "revision": "2013-07-15", 1088 "namespace": 1089 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1090 "conformance-type": "import" 1091 }, 1092 { 1093 "name": "ietf-interfaces", 1094 "revision": "2014-05-08", 1095 "feature": [ 1096 "arbitrary-names", 1097 "pre-provisioning" 1098 ], 1099 "namespace": 1100 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1101 "conformance-type": "implement" 1102 }, 1103 { 1104 "name": "ietf-ip", 1105 "revision": "2014-06-16", 1106 "namespace": 1107 "urn:ietf:params:xml:ns:yang:ietf-ip", 1108 "conformance-type": "implement" 1109 }, 1110 { 1111 "name": "ietf-ospf", 1112 "revision": "2017-03-12", 1113 "namespace": 1114 "urn:ietf:params:xml:ns:yang:ietf-ospf", 1115 "conformance-type": "implement" 1116 }, 1117 { 1118 "name": "ietf-routing", 1119 "revision": "2016-11-04", 1120 "namespace": 1121 "urn:ietf:params:xml:ns:yang:ietf-routing", 1122 "conformance-type": "implement" 1123 }, 1124 { 1125 "name": "ietf-system", 1126 "revision": "2014-08-06", 1127 "namespace": 1128 "urn:ietf:params:xml:ns:yang:ietf-system", 1129 "conformance-type": "implement" 1130 }, 1131 { 1132 "name": "ietf-yang-library", 1133 "revision": "2016-06-21", 1134 "namespace": 1135 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1136 "conformance-type": "implement" 1137 }, 1138 { 1139 "name": "ietf-yang-types", 1140 "revision": "2013-07-15", 1141 "namespace": 1142 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1143 "conformance-type": "import" 1144 } 1145 ] 1146 } 1147 "ietf-system:system-state": { 1148 "ietf-system:system-state": { 1149 "platform": { 1150 "os-name": "NetworkOS" 1151 } 1152 } 1153 }, 1154 "ietf-routing:routing-state": { 1155 "router-id": "192.0.2.1", 1156 "control-plane-protocols": { 1157 "control-plane-protocol": [ 1158 { 1159 "type": "ietf-routing:ospf", 1160 "name": "1", 1161 "ietf-ospf:ospf": { 1162 "instance": [ 1163 { 1164 "af": "ipv4", 1165 "areas": { 1166 "area": [ 1167 { 1168 "area-id": "203.0.113.1", 1169 "interfaces": { 1170 "interface": [ 1171 { 1172 "name": "eth1", 1173 "cost": 10 1174 } 1175 ] 1176 } 1177 } 1178 ] 1179 } 1180 } 1181 ] 1183 } 1184 } 1185 ] 1186 } 1187 }, 1188 "ietf-interfaces:interfaces-state": { 1189 "interfaces": { 1190 "interface": [ 1191 { 1192 "name": "eth1", 1193 "type": "iana-if-type:ethernetCsmacd", 1194 "oper-status": "up", 1195 "phys-address": "00:01:02:A1:B1:C1", 1196 "statistics": { 1197 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1198 }, 1199 "ip:ipv4": { 1200 "address": [ 1201 { 1202 "ip": "192.0.2.11", 1203 "prefix-length": 24, 1204 } 1205 ] 1206 } 1207 } 1208 ] 1209 } 1210 } 1211 } 1212 }, 1213 { 1214 "name": "cust2", 1215 "root": { 1216 "ietf-yang-library:modules-state": { 1217 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1218 "module": [ 1219 { 1220 "name": "iana-if-type", 1221 "revision": "2014-05-08", 1222 "namespace": 1223 "urn:ietf:params:xml:ns:yang:iana-if-type", 1224 "conformance-type": "import" 1225 }, 1226 { 1227 "name": "ietf-inet-types", 1228 "revision": "2013-07-15", 1229 "namespace": 1230 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1231 "conformance-type": "import" 1232 }, 1233 { 1234 "name": "ietf-interfaces", 1235 "revision": "2014-05-08", 1236 "feature": [ 1237 "arbitrary-names", 1238 "pre-provisioning" 1239 ], 1240 "namespace": 1241 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1242 "conformance-type": "implement" 1243 }, 1244 { 1245 "name": "ietf-ip", 1246 "revision": "2014-06-16", 1247 "namespace": 1248 "urn:ietf:params:xml:ns:yang:ietf-ip", 1249 "conformance-type": "implement" 1250 }, 1251 { 1252 "name": "ietf-ospf", 1253 "revision": "2017-03-12", 1254 "namespace": 1255 "urn:ietf:params:xml:ns:yang:ietf-ospf", 1256 "conformance-type": "implement" 1257 }, 1258 { 1259 "name": "ietf-routing", 1260 "revision": "2016-11-04", 1261 "namespace": 1262 "urn:ietf:params:xml:ns:yang:ietf-routing", 1263 "conformance-type": "implement" 1264 }, 1265 { 1266 "name": "ietf-system", 1267 "revision": "2014-08-06", 1268 "namespace": 1269 "urn:ietf:params:xml:ns:yang:ietf-system", 1270 "conformance-type": "implement" 1271 }, 1272 { 1273 "name": "ietf-yang-library", 1274 "revision": "2016-06-21", 1275 "namespace": 1276 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1277 "conformance-type": "implement" 1278 }, 1279 { 1280 "name": "ietf-yang-types", 1281 "revision": "2013-07-15", 1282 "namespace": 1283 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1284 "conformance-type": "import" 1285 } 1286 ] 1287 } 1288 "ietf-system:system-state": { 1289 "ietf-system:system-state": { 1290 "platform": { 1291 "os-name": "NetworkOS" 1292 } 1293 } 1294 }, 1295 "ietf-routing:routing-state": { 1296 "router-id": "192.0.2.2", 1297 "control-plane-protocols": { 1298 "control-plane-protocol": [ 1299 { 1300 "type": "ietf-routing:ospf", 1301 "name": "1", 1302 "ietf-ospf:ospf": { 1303 "instance": [ 1304 { 1305 "af": "ipv4", 1306 "areas": { 1307 "area": [ 1308 { 1309 "area-id": "203.0.113.1", 1310 "interfaces": { 1311 "interface": [ 1312 { 1313 "name": "eth1", 1314 "cost": 10 1315 } 1316 ] 1317 } 1318 } 1319 ] 1320 } 1321 } 1322 ] 1323 } 1324 } 1325 ] 1326 } 1328 } 1329 "ietf-interfaces:interfaces-state": { 1330 "interfaces": { 1331 { 1332 "name": "eth1", 1333 "type": "iana-if-type:ethernetCsmacd", 1334 "oper-status": "up", 1335 "phys-address": "00:01:02:A1:B1:C2", 1336 "statistics": { 1337 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1338 }, 1339 "ip:ipv4": { 1340 "address": [ 1341 { 1342 "ip": "192.0.2.11", 1343 "prefix-length": 24, 1344 } 1345 ] 1346 } 1347 } 1348 ] 1349 } 1350 } 1351 } 1352 ] 1353 }, 1355 "ietf-interfaces:interfaces-state": { 1356 "interfaces": { 1357 "interface": [ 1358 { 1359 "name": "eth0", 1360 "type": "iana-if-type:ethernetCsmacd", 1361 "oper-status": "up", 1362 "phys-address": "00:01:02:A1:B1:C0", 1363 "statistics": { 1364 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1365 }, 1366 "ip:ipv4": { 1367 "address": [ 1368 { 1369 "ip": "192.0.2.10", 1370 "prefix-length": 24, 1371 } 1372 ] 1373 } 1374 }, 1375 { 1376 "name": "cust1:eth1", 1377 "type": "iana-if-type:ethernetCsmacd", 1378 "oper-status": "up", 1379 "phys-address": "00:01:02:A1:B1:C1", 1380 "statistics": { 1381 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1382 } 1383 }, 1384 { 1385 "name": "cust2:eth1", 1386 "type": "iana-if-type:ethernetCsmacd", 1387 "oper-status": "up", 1388 "phys-address": "00:01:02:A1:B1:C2", 1389 "statistics": { 1390 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1391 } 1392 } 1393 ] 1394 } 1395 }, 1397 "ietf-yang-library:modules-state": { 1398 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1399 "module": [ 1400 { 1401 "name": "iana-if-type", 1402 "revision": "2014-05-08", 1403 "namespace": 1404 "urn:ietf:params:xml:ns:yang:iana-if-type", 1405 "conformance-type": "import" 1406 }, 1407 { 1408 "name": "ietf-inet-types", 1409 "revision": "2013-07-15", 1410 "namespace": 1411 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1412 "conformance-type": "import" 1413 }, 1414 { 1415 "name": "ietf-interfaces", 1416 "revision": "2014-05-08", 1417 "feature": [ 1418 "arbitrary-names", 1419 "pre-provisioning" 1420 ], 1421 "namespace": 1422 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1423 "conformance-type": "implement" 1425 }, 1426 { 1427 "name": "ietf-ip", 1428 "revision": "2014-06-16", 1429 "namespace": 1430 "urn:ietf:params:xml:ns:yang:ietf-ip", 1431 "conformance-type": "implement" 1432 }, 1433 { 1434 "name": "ietf-logical-network-element", 1435 "revision": "2017-03-13", 1436 "feature": [ 1437 "bind-lne-name" 1438 ], 1439 "namespace": 1440 "urn:ietf:params:xml:ns:yang:ietf-logical-network-element", 1441 "conformance-type": "implement" 1442 }, 1443 { 1444 "name": "ietf-ospf", 1445 "revision": "2017-03-12", 1446 "namespace": 1447 "urn:ietf:params:xml:ns:yang:ietf-ospf", 1448 "conformance-type": "implement" 1449 }, 1450 { 1451 "name": "ietf-routing", 1452 "revision": "2016-11-04", 1453 "namespace": 1454 "urn:ietf:params:xml:ns:yang:ietf-routing", 1455 "conformance-type": "implement" 1456 }, 1457 { 1458 "name": "ietf-system", 1459 "revision": "2014-08-06", 1460 "namespace": 1461 "urn:ietf:params:xml:ns:yang:ietf-system", 1462 "conformance-type": "implement" 1463 }, 1464 { 1465 "name": "ietf-yang-library", 1466 "revision": "2016-06-21", 1467 "namespace": 1468 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1469 "conformance-type": "implement" 1470 }, 1471 { 1472 "name": "ietf-yang-schema-mount", 1473 "revision": "2017-05-16", 1474 "namespace": 1475 "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount", 1476 "conformance-type": "implement" 1477 }, 1478 { 1479 "name": "ietf-yang-types", 1480 "revision": "2013-07-15", 1481 "namespace": 1482 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1483 "conformance-type": "import" 1484 } 1485 ] 1486 }, 1488 "ietf-system:system-state": { 1489 "platform": { 1490 "os-name": "NetworkOS" 1491 } 1492 } 1493 } 1495 B.2. Example: Self Managed LNE 1497 This section describes an example of the LNE model using schema mount 1498 to achieve child independent management. An example device supports 1499 multiple instances of LNEs (logical routers), each of them has the 1500 features of layer 2 and layer 3 interfaces [RFC7223], routing 1501 information base [RFC8022], and the OSPF protocol. Each of these 1502 features is specified by a YANG model, and they are put together by 1503 the YANG Schema Mount as following: 1505 module: ietf-logical-network-element 1506 +--rw logical-network-elements 1507 +--rw logical-network-element* [name] 1508 +--rw name string 1509 +--mp root 1510 // The internal modules of the LNE are not visible to 1511 // the parament management. 1512 // The child manages its modules, including ietf-routing 1513 // and ietf-interfaces 1515 module: ietf-interfaces 1516 +--rw interfaces 1517 | +--rw interface* [name] 1518 | +--rw name string 1519 | +--rw lne:bind-lne-name? string 1520 +--ro interfaces-state 1521 +--ro interface* [name] 1522 +--ro name string 1523 +--ro oper-status enumeration 1525 module: ietf-yang-library 1526 +--ro modules-state 1527 +--ro module-set-id string 1528 +--ro module* [name revision] 1529 +--ro name yang:yang-identifier 1531 module: ietf-system 1532 +--rw system 1533 | +--rw contact? string 1534 | +--rw hostname? inet:domain-name 1535 | +--rw authentication {authentication}? 1536 | +--rw user-authentication-order* identityref 1537 | +--rw user* [name] {local-users}? 1538 | +--rw name string 1539 | +--rw password? ianach:crypt-hash 1540 | +--rw authorized-key* [name] 1541 | +--rw name string 1542 | +--rw algorithm string 1543 | +--rw key-data binary 1544 +--ro system-state 1545 +--ro platform 1546 | +--ro os-name? string 1547 | +--ro os-release? string 1549 To realize the above schema, the device implements the following 1550 schema mount instance: 1552 "ietf-yang-schema-mount:schema-mounts": { 1553 "mount-point": [ 1554 { 1555 "module": "ietf-logical-network-element", 1556 "name": "root", 1557 "inline": [null] 1558 } 1559 ] 1560 } 1562 By using the implementation of the YANG schema mount, an operator can 1563 create instances of logical routers, each with their logical router 1564 specific in-line modules. An interface can be assigned to a logical 1565 router, so that the logical router has the permission to access this 1566 interface. The OSPF protocol can then be enabled on this assigned 1567 interface. Each logical router independently manages its own set of 1568 modules, which may or may not be the same as other logical routers. 1569 The following is an example of schema set implemented on one 1570 particular logical router: 1572 module: ietf-yang-library 1573 +--ro modules-state 1574 +--ro module-set-id string 1575 +--ro module* [name revision] 1576 +--ro name yang:yang-identifier 1578 module: ietf-system 1579 +--rw system 1580 | +--rw contact? string 1581 | +--rw hostname? inet:domain-name 1582 | +--rw authentication {authentication}? 1583 | +--rw user-authentication-order* identityref 1584 | +--rw user* [name] {local-users}? 1585 | +--rw name string 1586 | +--rw password? ianach:crypt-hash 1587 | +--rw authorized-key* [name] 1588 | +--rw name string 1589 | +--rw algorithm string 1590 | +--rw key-data binary 1591 +--ro system-state 1592 +--ro platform 1593 | +--ro os-name? string 1594 | +--ro os-release? string 1596 module: ietf-routing 1597 +--ro routing-state 1598 | +--ro router-id? yang:dotted-quad 1599 | +--ro control-plane-protocols 1600 | | +--ro control-plane-protocol* [type name] 1601 | | +--ro ospf:ospf/ 1602 | | +--ro instance* [af] 1603 +--rw routing 1604 +--rw router-id? yang:dotted-quad 1605 +--rw control-plane-protocols 1606 +--rw control-plane-protocol* [type name] 1607 +--rw ospf:ospf/ 1608 +--rw instance* [af] 1609 +--rw areas 1610 +--rw area* [area-id] 1611 +--rw interfaces 1612 +--rw interface* [name] 1613 +--rw name if:interface-ref 1614 +--rw cost? uint16 1616 module: ietf-interfaces 1617 +--rw interfaces 1618 | +--rw interface* [name] 1619 | +--rw name string 1620 +--ro interfaces-state 1621 +--ro interface* [name] 1622 +--ro name string 1623 +--ro oper-status enumeration 1625 B.2.1. Configuration Data 1627 Each of the child virtual routers is managed through its own sessions 1628 and configuration data. 1630 B.2.1.1. Logical Network Element 'vnf1' 1632 The following shows an example configuration data for the LNE name 1633 "vnf1": 1635 { 1636 "ietf-system:system": { 1637 "authentication": { 1638 "user": [ 1639 { 1640 "name": "john", 1641 "password": "$0$password" 1642 } 1643 ] 1644 } 1645 }, 1646 "ietf-routing:routing": { 1647 "router-id": "192.0.2.1", 1648 "control-plane-protocols": { 1649 "control-plane-protocol": [ 1650 { 1651 "type": "ietf-routing:ospf", 1652 "name": "1", 1653 "ietf-ospf:ospf": { 1654 "instance": [ 1655 { 1656 "af": "ipv4", 1657 "areas": { 1658 "area": [ 1659 { 1660 "area-id": "203.0.113.1", 1661 "interfaces": { 1662 "interface": [ 1663 { 1664 "name": "eth1", 1665 "cost": 10 1666 } 1667 ] 1668 } 1669 } 1670 ] 1671 } 1672 } 1673 ] 1674 } 1675 } 1676 ] 1677 } 1678 }, 1679 "ietf-interfaces:interfaces": { 1680 "interfaces": { 1681 "interface": [ 1682 { 1683 "name": "eth1", 1684 "ip:ipv4": { 1685 "address": [ 1686 { 1687 "ip": "192.0.2.11", 1688 "prefix-length": 24, 1689 } 1690 ] 1691 } 1692 } 1693 ] 1694 } 1695 } 1697 } 1699 B.2.1.2. Logical Network Element 'vnf2' 1701 The following shows an example configuration data for the LNE name 1702 "vnf2": 1704 { 1705 "ietf-system:system": { 1706 "authentication": { 1707 "user": [ 1708 { 1709 "name": "john", 1710 "password": "$0$password" 1711 } 1712 ] 1713 } 1714 }, 1715 "ietf-routing:routing": { 1716 "router-id": "192.0.2.2", 1717 "control-plane-protocols": { 1718 "control-plane-protocol": [ 1719 { 1720 "type": "ietf-routing:ospf", 1721 "name": "1", 1722 "ietf-ospf:ospf": { 1723 "instance": [ 1724 { 1725 "af": "ipv4", 1726 "areas": { 1727 "area": [ 1728 { 1729 "area-id": "203.0.113.1", 1730 "interfaces": { 1731 "interface": [ 1732 { 1733 "name": "eth1", 1734 "cost": 10 1735 } 1736 ] 1737 } 1738 } 1739 ] 1740 } 1741 } 1742 ] 1743 } 1744 } 1746 ] 1747 } 1748 }, 1749 "ietf-interfaces:interfaces": { 1750 "interfaces": { 1751 "interface": [ 1752 { 1753 "name": "eth1", 1754 "ip:ipv4": { 1755 "address": [ 1756 { 1757 "ip": "192.0.2.11", 1758 "prefix-length": 24, 1759 } 1760 ] 1761 } 1762 } 1763 ] 1764 } 1765 } 1766 } 1768 B.2.2. State Data 1770 The following sections shows possible state data associated the above 1771 configuration data. Note that there are three views: the host 1772 device's, and each LNE's. 1774 B.2.2.1. Host Device 1776 The following shows state data for the device hosting the example 1777 LNEs: 1779 { 1780 "ietf-logical-network-element:logical-network-elements": { 1781 "logical-network-element": [ 1782 { 1783 "name": "vnf1", 1784 "root": { 1785 } 1786 }, 1787 { 1788 "name": "vnf2", 1789 "root": { 1790 } 1791 } 1792 ] 1793 }, 1794 "ietf-interfaces:interfaces-state": { 1795 "interfaces": { 1796 "interface": [ 1797 { 1798 "name": "eth0", 1799 "type": "iana-if-type:ethernetCsmacd", 1800 "oper-status": "up", 1801 "phys-address": "00:01:02:A1:B1:C0", 1802 "statistics": { 1803 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1804 }, 1805 "ip:ipv4": { 1806 "address": [ 1807 { 1808 "ip": "192.0.2.10", 1809 "prefix-length": 24, 1810 } 1811 ] 1812 } 1813 }, 1814 { 1815 "name": "vnf1:eth1", 1816 "type": "iana-if-type:ethernetCsmacd", 1817 "oper-status": "up", 1818 "phys-address": "00:01:02:A1:B1:C1", 1819 "statistics": { 1820 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1821 } 1822 }, 1823 { 1824 "name": "vnf2:eth2", 1825 "type": "iana-if-type:ethernetCsmacd", 1826 "oper-status": "up", 1827 "phys-address": "00:01:02:A1:B1:C2", 1828 "statistics": { 1829 "discontinuity-time": "2017-06-26T12:34:56-05:00" 1830 } 1831 } 1832 ] 1833 } 1834 }, 1836 "ietf-yang-library:modules-state": { 1837 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1838 "module": [ 1839 { 1840 "name": "iana-if-type", 1841 "revision": "2014-05-08", 1842 "namespace": 1843 "urn:ietf:params:xml:ns:yang:iana-if-type", 1844 "conformance-type": "import" 1845 }, 1846 { 1847 "name": "ietf-inet-types", 1848 "revision": "2013-07-15", 1849 "namespace": 1850 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1851 "conformance-type": "import" 1852 }, 1853 { 1854 "name": "ietf-interfaces", 1855 "revision": "2014-05-08", 1856 "feature": [ 1857 "arbitrary-names", 1858 "pre-provisioning" 1859 ], 1860 "namespace": 1861 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1862 "conformance-type": "implement" 1863 }, 1864 { 1865 "name": "ietf-ip", 1866 "revision": "2014-06-16", 1867 "namespace": 1868 "urn:ietf:params:xml:ns:yang:ietf-ip", 1869 "conformance-type": "implement" 1870 }, 1871 { 1872 "name": "ietf-logical-network-element", 1873 "revision": "2017-03-13", 1874 "feature": [ 1875 "bind-lne-name" 1876 ], 1877 "namespace": 1878 "urn:ietf:params:xml:ns:yang:ietf-logical-network-element", 1879 "conformance-type": "implement" 1880 }, 1881 { 1882 "name": "ietf-system", 1883 "revision": "2014-08-06", 1884 "namespace": 1885 "urn:ietf:params:xml:ns:yang:ietf-system", 1886 "conformance-type": "implement" 1887 }, 1888 { 1889 "name": "ietf-yang-library", 1890 "revision": "2016-06-21", 1891 "namespace": 1892 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1893 "conformance-type": "implement" 1894 }, 1895 { 1896 "name": "ietf-yang-schema-mount", 1897 "revision": "2017-05-16", 1898 "namespace": 1899 "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount", 1900 "conformance-type": "implement" 1901 }, 1902 { 1903 "name": "ietf-yang-types", 1904 "revision": "2013-07-15", 1905 "namespace": 1906 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1907 "conformance-type": "import" 1908 } 1909 ] 1910 }, 1912 "ietf-system:system-state": { 1913 "platform": { 1914 "os-name": "NetworkOS" 1915 } 1916 } 1917 } 1919 B.2.2.2. Logical Network Element 'vnf1' 1921 The following shows state data for the example LNE with name "vnf1": 1923 { 1924 "ietf-yang-library:modules-state": { 1925 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 1926 "module": [ 1927 { 1928 "name": "iana-if-type", 1929 "revision": "2014-05-08", 1930 "namespace": 1931 "urn:ietf:params:xml:ns:yang:iana-if-type", 1932 "conformance-type": "import" 1933 }, 1934 { 1935 "name": "ietf-inet-types", 1936 "revision": "2013-07-15", 1937 "namespace": 1939 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 1940 "conformance-type": "import" 1941 }, 1942 { 1943 "name": "ietf-interfaces", 1944 "revision": "2014-05-08", 1945 "feature": [ 1946 "arbitrary-names", 1947 "pre-provisioning" 1948 ], 1949 "namespace": 1950 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 1951 "conformance-type": "implement" 1952 }, 1953 { 1954 "name": "ietf-ip", 1955 "revision": "2014-06-16", 1956 "namespace": 1957 "urn:ietf:params:xml:ns:yang:ietf-ip", 1958 "conformance-type": "implement" 1959 }, 1960 { 1961 "name": "ietf-ospf", 1962 "revision": "2017-03-12", 1963 "namespace": 1964 "urn:ietf:params:xml:ns:yang:ietf-ospf", 1965 "conformance-type": "implement" 1966 }, 1967 { 1968 "name": "ietf-routing", 1969 "revision": "2016-11-04", 1970 "namespace": 1971 "urn:ietf:params:xml:ns:yang:ietf-routing", 1972 "conformance-type": "implement" 1973 }, 1974 { 1975 "name": "ietf-system", 1976 "revision": "2014-08-06", 1977 "namespace": 1978 "urn:ietf:params:xml:ns:yang:ietf-system", 1979 "conformance-type": "implement" 1980 }, 1981 { 1982 "name": "ietf-yang-library", 1983 "revision": "2016-06-21", 1984 "namespace": 1985 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 1986 "conformance-type": "implement" 1988 }, 1989 { 1990 "name": "ietf-yang-types", 1991 "revision": "2013-07-15", 1992 "namespace": 1993 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 1994 "conformance-type": "import" 1995 } 1996 ] 1997 }, 1999 "ietf-system:system-state": { 2000 "platform": { 2001 "os-name": "NetworkOS" 2002 } 2003 }, 2005 "ietf-routing:routing-state": { 2006 "router-id": "192.0.2.1", 2007 "control-plane-protocols": { 2008 "control-plane-protocol": [ 2009 { 2010 "type": "ietf-routing:ospf", 2011 "name": "1", 2012 "ietf-ospf:ospf": { 2013 "instance": [ 2014 { 2015 "af": "ipv4", 2016 "areas": { 2017 "area": [ 2018 { 2019 "area-id": "203.0.113.1", 2020 "interfaces": { 2021 "interface": [ 2022 { 2023 "name": "eth1", 2024 "cost": 10 2025 } 2026 ] 2027 } 2028 } 2029 ] 2030 } 2031 } 2032 ] 2033 } 2034 } 2035 ] 2037 } 2038 }, 2040 "ietf-interfaces:interfaces-state": { 2041 "interfaces": { 2042 "interface": [ 2043 { 2044 "name": "eth1", 2045 "type": "iana-if-type:ethernetCsmacd", 2046 "oper-status": "up", 2047 "phys-address": "00:01:02:A1:B1:C1", 2048 "statistics": { 2049 "discontinuity-time": "2017-06-26T12:34:56-05:00" 2050 }, 2051 "ip:ipv4": { 2052 "address": [ 2053 { 2054 "ip": "192.0.2.11", 2055 "prefix-length": 24, 2056 } 2057 ] 2058 } 2059 } 2060 ] 2061 } 2062 } 2063 } 2065 B.2.2.3. Logical Network Element 'vnf2' 2067 The following shows state data for the example LNE with name "vnf2": 2069 { 2070 "ietf-yang-library:modules-state": { 2071 "module-set-id": "123e4567-e89b-12d3-a456-426655440000", 2072 "module": [ 2073 { 2074 "name": "iana-if-type", 2075 "revision": "2014-05-08", 2076 "namespace": 2077 "urn:ietf:params:xml:ns:yang:iana-if-type", 2078 "conformance-type": "import" 2079 }, 2080 { 2081 "name": "ietf-inet-types", 2082 "revision": "2013-07-15", 2083 "namespace": 2084 "urn:ietf:params:xml:ns:yang:ietf-inet-types", 2085 "conformance-type": "import" 2086 }, 2087 { 2088 "name": "ietf-interfaces", 2089 "revision": "2014-05-08", 2090 "feature": [ 2091 "arbitrary-names", 2092 "pre-provisioning" 2093 ], 2094 "namespace": 2095 "urn:ietf:params:xml:ns:yang:ietf-interfaces", 2096 "conformance-type": "implement" 2097 }, 2098 { 2099 "name": "ietf-ip", 2100 "revision": "2014-06-16", 2101 "namespace": 2102 "urn:ietf:params:xml:ns:yang:ietf-ip", 2103 "conformance-type": "implement" 2104 }, 2105 { 2106 "name": "ietf-ospf", 2107 "revision": "2017-03-12", 2108 "namespace": 2109 "urn:ietf:params:xml:ns:yang:ietf-ospf", 2110 "conformance-type": "implement" 2111 }, 2112 { 2113 "name": "ietf-routing", 2114 "revision": "2016-11-04", 2115 "namespace": 2116 "urn:ietf:params:xml:ns:yang:ietf-routing", 2117 "conformance-type": "implement" 2118 }, 2119 { 2120 "name": "ietf-system", 2121 "revision": "2014-08-06", 2122 "namespace": 2123 "urn:ietf:params:xml:ns:yang:ietf-system", 2124 "conformance-type": "implement" 2125 }, 2126 { 2127 "name": "ietf-yang-library", 2128 "revision": "2016-06-21", 2129 "namespace": 2130 "urn:ietf:params:xml:ns:yang:ietf-yang-library", 2131 "conformance-type": "implement" 2132 }, 2133 { 2134 "name": "ietf-yang-types", 2135 "revision": "2013-07-15", 2136 "namespace": 2137 "urn:ietf:params:xml:ns:yang:ietf-yang-types", 2138 "conformance-type": "import" 2139 } 2140 ] 2141 }, 2143 "ietf-system:system-state": { 2144 "platform": { 2145 "os-name": "NetworkOS" 2146 } 2147 }, 2149 "ietf-routing:routing-state": { 2150 "router-id": "192.0.2.2", 2151 "control-plane-protocols": { 2152 "control-plane-protocol": [ 2153 { 2154 "type": "ietf-routing:ospf", 2155 "name": "1", 2156 "ietf-ospf:ospf": { 2157 "instance": [ 2158 { 2159 "af": "ipv4", 2160 "areas": { 2161 "area": [ 2162 { 2163 "area-id": "203.0.113.1", 2164 "interfaces": { 2165 "interface": [ 2166 { 2167 "name": "eth1", 2168 "cost": 10 2169 } 2170 ] 2171 } 2172 } 2173 ] 2174 } 2175 } 2176 ] 2177 } 2178 } 2179 ] 2180 } 2182 }, 2184 "ietf-interfaces:interfaces-state": { 2185 "interfaces": { 2186 "interface": [ 2187 { 2188 "name": "eth1", 2189 "type": "iana-if-type:ethernetCsmacd", 2190 "oper-status": "up", 2191 "phys-address": "00:01:02:A1:B1:C2", 2192 "statistics": { 2193 "discontinuity-time": "2017-06-26T12:34:56-05:00" 2194 }, 2195 "ip:ipv4": { 2196 "address": [ 2197 { 2198 "ip": "192.0.2.11", 2199 "prefix-length": 24, 2200 } 2201 ] 2202 } 2203 } 2204 ] 2205 } 2206 } 2207 } 2209 Authors' Addresses 2211 Lou Berger 2212 LabN Consulting, L.L.C. 2214 Email: lberger@labn.net 2216 Christan Hopps 2217 Deutsche Telekom 2219 Email: chopps@chopps.org 2221 Acee Lindem 2222 Cisco Systems 2223 301 Midenhall Way 2224 Cary, NC 27513 2225 USA 2227 Email: acee@cisco.com 2228 Dean Bogdanovic 2230 Email: ivandean@gmail.com 2232 Xufeng Liu 2233 Jabil 2235 Email: Xufeng_Liu@jabil.com