idnits 2.17.1 draft-ietf-bess-l2vpn-yang-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 23 instances of too long lines in the document, the longest one being 107 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 470 has weird spacing: '...et-type rt-...' == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- The document date (June 30, 2017) is 2463 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Obsolete informational reference (is this intentional?): RFC 4447 (Obsoleted by RFC 8077) -- Obsolete informational reference (is this intentional?): RFC 6536 (Obsoleted by RFC 8341) Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 BESS Working Group H. Shah, Ed. 3 Internet-Draft Ciena Corporation 4 Intended status: Standards Track P. Brissette, Ed. 5 Expires: January 1, 2018 Cisco Systems, Inc. 6 I. Chen, Ed. 7 Jabil 8 I. Hussain, Ed. 9 Infinera Corporation 10 B. Wen, Ed. 11 Comcast 12 K. Tiruveedhula, Ed. 13 Juniper Networks 14 June 30, 2017 16 YANG Data Model for MPLS-based L2VPN 17 draft-ietf-bess-l2vpn-yang-06.txt 19 Abstract 21 This document describes a YANG data model for Layer 2 VPN (L2VPN) 22 services over MPLS networks. These services include point-to-point 23 Virtual Private Wire Service (VPWS) and multipoint Virtual Private 24 LAN service (VPLS) that uses LDP and BGP signaled Pseudowires. It is 25 expected that this model will be used by the management tools run by 26 the network operators in order to manage and monitor the network 27 resources that they use to deliver L2VPN services. 29 This document also describes the YANG data model for the Pseudowires. 30 The independent definition of the Pseudowires facilitates its use in 31 Ethernet Segment and EVPN data models defined in separate document. 33 Status of This Memo 35 This Internet-Draft is submitted in full conformance with the 36 provisions of BCP 78 and BCP 79. 38 Internet-Drafts are working documents of the Internet Engineering 39 Task Force (IETF). Note that other groups may also distribute 40 working documents as Internet-Drafts. The list of current Internet- 41 Drafts is at http://datatracker.ietf.org/drafts/current/. 43 Internet-Drafts are draft documents valid for a maximum of six months 44 and may be updated, replaced, or obsoleted by other documents at any 45 time. It is inappropriate to use Internet-Drafts as reference 46 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on January 1, 2018. 50 Copyright Notice 52 Copyright (c) 2017 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents 57 (http://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the Simplified BSD License. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 68 2. Specification of Requirements . . . . . . . . . . . . . . . . 4 69 3. L2VPN YANG Model . . . . . . . . . . . . . . . . . . . . . . 4 70 3.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 4 71 3.2. Open issues and next steps . . . . . . . . . . . . . . . 7 72 3.3. Pseudowire Common . . . . . . . . . . . . . . . . . . . . 8 73 3.3.1. Pseudowire . . . . . . . . . . . . . . . . . . . . . 8 74 3.3.2. pw-templates . . . . . . . . . . . . . . . . . . . . 8 75 3.4. L2VPN Common . . . . . . . . . . . . . . . . . . . . . . 8 76 3.4.1. redundancy-group-templates . . . . . . . . . . . . . 8 77 3.5. L2VPN instance . . . . . . . . . . . . . . . . . . . . . 8 78 3.5.1. common attributes . . . . . . . . . . . . . . . . . . 8 79 3.5.2. PW list . . . . . . . . . . . . . . . . . . . . . . . 8 80 3.5.3. List of endpoints . . . . . . . . . . . . . . . . . . 9 81 3.5.4. point-to-point or multipoint service . . . . . . . . 10 82 3.6. Operational State . . . . . . . . . . . . . . . . . . . . 10 83 3.7. Yang tree . . . . . . . . . . . . . . . . . . . . . . . . 10 84 4. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 13 85 5. Security Considerations . . . . . . . . . . . . . . . . . . . 40 86 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 41 87 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 41 88 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 41 89 8.1. Normative References . . . . . . . . . . . . . . . . . . 41 90 8.2. Informative References . . . . . . . . . . . . . . . . . 41 91 Appendix A. Example Configuration . . . . . . . . . . . . . . . 44 92 Appendix B. Contributors . . . . . . . . . . . . . . . . . . . . 44 93 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 45 95 1. Introduction 97 The Network Configuration Protocol (NETCONF) [RFC6241] is a network 98 management protocol that defines mechanisms to manage network 99 devices. YANG [RFC6020] is a modular language that represents data 100 structures in an XML or JSON tree format, and is used as a data 101 modeling language for the NETCONF. 103 This document defines a YANG data model for MPLS based Layer 2 VPN 104 services (L2VPN) [RFC4664] and includes switching between the local 105 attachment circuits. The L2VPN model covers point-to-point VPWS and 106 Multipoint VPLS services. These services use signaling of 107 Pseudowires across MPLS networks using LDP [RFC4447][RFC4762] or 108 BGP[RFC4761]. 110 Initially, the data model covers Ethernet based Layer 2 services. 111 The Ethernet Attachment Circuits are not defined. Instead, they are 112 leveraged from other standards organizations such as IEEE802.1 and 113 Metro Ethernet Forum (MEF). 115 Other Layer 2 services, such as ATM, Frame Relay, TDM, etc are 116 included in the scope but will be covered as the future work items. 118 The objective of the model is to define building blocks that can be 119 easily assembled in different order to realize different services. 121 The data model uses following constructs for configuration and 122 management: 124 o Configuration 126 o Operational State 128 o Executables (Actions) 130 o Notifications 132 The current document focuses on definition of configuration, state 133 and notificationobjects. 135 The L2VPN data object model uses the instance centric approach. 136 Within an L2VPN instance; a set of common parameters, a list of PWs 137 and a list of endpoints are defined. A special constraint is added 138 for the VPWS configuration such that only two endpoints are allowed 139 in the list of endpoints. 141 The Pseudowire data object model is defined independent of the L2VPN 142 data object model to allow its inclusion in the Ethernet Segment and 143 EVPN data objects. 145 The L2VPN data object model augments Psuedowire data object for its 146 definition. 148 The document also includes Notifications used by the L2VPN object 149 model 151 2. Specification of Requirements 153 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 154 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 155 document are to be interpreted as described in [RFC2119]. 157 3. L2VPN YANG Model 159 3.1. Overview 161 In this version of the document, for configuration, one single 162 container, l2vpn, is defined. Within the l2vpn container, common 163 parameters and a list of endpoints are defined. For the point-to- 164 point VPWS configuration, endpoint list is used with the constraint 165 that limits the number of endpoints to be two. For the multipoint 166 service, endpoint list is used. Each endpoint contains the common 167 definition that is either an attachment circuit, a pseudowire or a 168 redundancy group. The YANG data model for l2vpn in this document is 169 greatly simplified by by removing separate definition of endpoint-a 170 and endpoint-z that was specific for VPWS service. The same endpoint 171 list is used by both the VPLS and VPWS service with the exception 172 that VPWS uses only two entries. 174 The l2vpn container also includes definition of common building 175 blocks for redundancy-grp templates and pseudowire-templates. 177 The State objects have been consolidated with the configuration 178 object as per the recommendations provided by the Guidelines for Yang 179 Module Authors document. 181 The IETF working group has defined the VPWS and VPLS services that 182 leverages the pseudowire technologies defined by the PWE3 working 183 group. A large number of RFCs from these working groups cover this 184 subject matter. Hence, it is prudent that this document state the 185 scope of the MPLS L2VPN object model definitions. 187 The following documents are within the scope. This is not an 188 exhaustive list but a representation of documents that are covered 189 for this work: 191 o Requirements for Pseudo-wire Emulation Edge-to-Edge (PWE3) 192 [RFC3916] 194 o Pseudo-wire Emulation Edge-to-Edge (PWE3) Architecture [RFC3985] 196 o IANA Allocations for Pseudowire Edge to Edge Emulation (PWE3) 197 [RFC4446] 199 o Pseudowire Setup and Maintenance Using the Label Distribution 200 Protocol (LDP) [RFC4447] 202 o Encapsulation Methods for Transport of Ethernet over MPLS Networks 203 [RFC4448] 205 o Pseudowire Emulation Edge-to-Edge (PWE3) Control Word for Use over 206 an MPLS PSN [RFC4385] 208 o Requirements for Multi-Segment Pseudowire Emulation Edge-to-Edge 209 (PWE3) [RFC5254] 211 o An Architecture for Multi-Segment Pseudowire Emulation Edge-to- 212 Edge [RFC5659] 214 o Segmented Pseudowire [RFC6073] 216 o Framework for Layer 2 Virtual Private Networks [RFC4664] 218 o Service Requirements for Layer 2 Provider-Provisioned Virtual 219 Private Networks [RFC4665] 221 o Virtual Private LAN Service (VPLS) Using BGP for Auto-Discovery 222 and Signaling [RFC4761] 224 o Virtual Private LAN Service (VPLS) Using Label Distribution 225 Protocol (LDP) Signaling [RFC4762] 227 o Attachment Individual Identifier (AII) Types for Aggregation 228 [RFC5003] 230 o Provisioning, Auto-Discovery, and Signaling in Layer 2 Virtual 231 Private Networks (L2VPNs) [RFC6074] 233 o Flow-Aware Transport of Pseudowires over an MPLS Packet Switched 234 Network [RFC6391] 236 o Layer 2 Virtual Private Networks Using BGP for Auto-Discovery and 237 Signaling [RFC6624] 239 o Extensions to the Virtual Private LAN Service (VPLS) Provider Edge 240 (PE) Model for Provider Backbone Bridging [RFC7041] 242 o LDP Extensions for Optimized MAC Address Withdrawal in a 243 Hierarchical Virtual Private LAN Service (H-VPLS) [RFC7361] 245 o Using the generic associated channel label for Pseudowire in the 246 MPLS Transport Profile [RFC6423] 248 o Pseudowire status for static pseudowire [RFC6478] 250 The specifics of pseudowire over MPLS-TP LSPs is in scope. However, 251 the initial effort addresses definitions of object models that are 252 commonly deployed. 254 The IETF work in L2VPN and PWE3 working group relating to L2TP, OAM, 255 multicast (e.g. p2mp, etree, etc) and access specific protocols such 256 as G.8032, MSTP, etc is out-of-scope for this document. 258 The following is the high level view of the L2VPN data model. 260 PW // Container 261 PW specific attributes 263 PW template definition 265 template-ref Redundancy-Group // redundancy-group 266 template 267 attributes 269 l2vpn-instances // containter 271 common attributes 273 BGP-parameters // container 274 common attributes 275 auto-discovery attributes 276 signaling attributes 278 // list of PWs being used 279 PW // container 280 template-ref PW 281 attribute-override 283 PBB-parameters // container 284 pbb specific attributes 286 VPWS-constraints // rule to limit number of endpoints to two 288 // List of endpoints, where each member endpoint container is - 289 PW // reference 290 redundancy-grp // container 291 AC // eventual reference to standard AC 292 PW // reference 294 Figure 1 296 3.2. Open issues and next steps 298 Most of the open issues have been resolved in this document. There 299 are some items for considerations, such as PW headend, VPLS IRB. 300 These may or may not be convered in this document. If the working 301 group intends these topics be addressed in a separate document, 302 authors will proceed to finalize this document with comments received 303 on the definitions included in the current document. 305 3.3. Pseudowire Common 307 3.3.1. Pseudowire 309 Pseudowire definitions is moved to a seperate container in order to 310 allow Ethernet Segment and EVPN models can refer without having to 311 pull down L2VPN container. 313 3.3.2. pw-templates 315 The pw-templates container contains a list of pw-template. Each pw- 316 template defines a list of common pseudowire attributes such as PW 317 MTU, control word support etc. 319 3.4. L2VPN Common 321 3.4.1. redundancy-group-templates 323 The redundancy-group-template contains a list of templates. Each 324 template defines common attributes related to redundancy such as 325 protection mode, reversion parameters, etc. 327 3.5. L2VPN instance 329 A list of L2VPN instance is defined where each entry represent a 330 point to point or multipoint service. Within a service instance, a 331 set of common attributes are defined, followed by a list of PWs and a 332 list of endpoints. 334 3.5.1. common attributes 336 The common attributes apply to entire L2VPN instance. These 337 attributes typically include attributes such as mac-aging-timer, BGP 338 related parameters (if using BGP signaling), discovery-type, etc. 340 3.5.2. PW list 342 The PW list is the number of PWs that are being used for a given 343 L2VPN instance. Each PW entry refers to PW template to inherit 344 common attributes for the PW. The one or more attributes from the 345 template can be overriden. It further extends definitions of more PW 346 specific attributes such as use of control word, mac withdraw, what 347 type of signaling (i.e. LDP or BGP), setting of the TTL, etc. 349 3.5.3. List of endpoints 351 The list of endpoints define the characteristics of the L2VPN 352 service. In the case of VPWS, the list is limited to two entries 353 while for VPLS, there could be many. 355 Each entry in the endpoint list, may hold AC, PW or redundancy-grp 356 references. The core aspect of endpoint container is its flexible 357 personality based on what user decides to include in it. It is 358 future-proofed with possible extensions that can be included in the 359 endpoint container such as Integrated Route Bridging (IRB), PW 360 Headend, Virtual Switch Instance, etc. 362 The endpoint entry also defines the split-horizon attribute which 363 defines the frame forwarding restrictions between the endpoints 364 belonging to same split-horizon group. This construct permits 365 multiple instances of split horizon groups with its own endpoint 366 members. The frame forwarding restrictions does not apply between 367 endpoints that belong to two different split horizon groups. 369 3.5.3.1. ac 371 Attachment Circuit (AC)resides within endpoint entry either as an 372 independent entity or as a member of the redundancy group. AC is not 373 defined in this document but references the definitions being 374 specified by other working groups and standard bodies. 376 3.5.3.2. pw 378 The Pseudo-wire resides within endpoint entry either as an 379 independent entity or as a member of the redundancy group. The PW 380 refers to one of the entry in the list of PWs defined with the L2VPN 381 instance. 383 3.5.3.3. redundancy-grp choice 385 The redundancy-grp is a generic redundancy construct which can hold 386 primary and backup members of AC and PWs. This flexibility permits 387 combinations of - 389 o primary and backup AC 391 o primary and backup PW 393 o primary AC and backup PW 395 o primary PW and backup AC 396 The redundancy group also defines attributes of the type of 397 redundancy, such as protection mode, reroute mode, reversion related 398 parameters, etc. 400 3.5.4. point-to-point or multipoint service 402 The point-to-point service as defined for VPWS is represented by a 403 list of endpoints and is limited to two entries by the VPWS constrain 404 rules 406 The multipoint service as defined for VPLS is represented by a list 407 of endpoints. 409 The augmentation of ietf-l2vpn module is TBD. All IP addresses 410 defined in this module are currently scoped under global VRF/table. 412 3.6. Operational State 414 The operational state of L2VPN attributes has been consolidated with 415 the configuration as per recommendations from the guidelines for the 416 YANG author document. 418 3.7. Yang tree 420 module: ietf-pseudowires 421 +--rw pseudowires 422 +--rw pseudowire* [name] 423 | +--rw name string 424 | +--ro state? pseudowire-status-type 425 | +--rw template? pw-template-ref 426 | +--rw mtu? uint16 427 | +--rw mac-withdraw? boolean 428 | +--rw cw-negotiation? cw-negotiation-type 429 | +--rw tunnel-policy? string 430 | +--rw (pw-type)? 431 | +--:(configured-pw) 432 | +--rw configured-pw 433 | +--rw peer-ip? inet:ip-address 434 | +--rw pw-id? uint32 435 | +--rw icb? boolean 436 | +--rw transmit-label? rt-types:mpls-label 437 | +--rw receive-label? rt-types:mpls-label 438 +--rw pw-templates 439 +--rw pw-template* [name] 440 +--rw name string 441 +--rw mtu? uint16 442 +--rw cw-negotiation? cw-negotiation-type 443 +--rw tunnel-policy? string 445 module: ietf-l2vpn 446 +--rw l2vpn 447 +--rw redundancy-group-templates 448 | +--rw redundancy-group-template* [name] 449 | +--rw name string 450 | +--rw protection-mode? enumeration 451 | +--rw reroute-mode? enumeration 452 | +--rw dual-receive? boolean 453 | +--rw revert? boolean 454 | +--rw reroute-delay? uint16 455 | +--rw revert-delay? uint16 456 +--rw instances 457 +--rw instance* [name type] 458 +--rw name string 459 +--rw type identityref 460 +--rw mtu? uint16 461 +--rw mac-aging-timer? uint32 462 +--rw service-type? l2vpn-service-type 463 +--rw discovery-type? l2vpn-discovery-type 464 +--rw signaling-type l2vpn-signaling-type 465 +--rw bgp-auto-discovery 466 | +--rw route-distinguisher? rt-types:route-distinguisher 467 | +--rw vpn-id? string 468 | +--rw vpn-target* [route-target] 469 | +--rw route-target rt-types:route-target 470 | +--rw route-target-type rt-types:route-target-type 471 +--rw bgp-signaling 472 | +--rw site-id? uint16 473 | +--rw site-range? uint16 474 +--rw endpoint* [name] 475 | +--rw name string 476 | +--rw (ac-or-pw-or-redundancy-grp)? 477 | | +--:(ac) 478 | | | +--rw ac* [name] 479 | | | +--rw name string 480 | | | +--ro state? operational-state-type 481 | | +--:(pw) 482 | | | +--rw pw* [name] 483 | | | +--rw name pw:pseudowire-ref 484 | | | +--ro state? -> /pw:pseudowires/pseudowire[pw:name=current()/../name]/state 485 | | +--:(redundancy-grp) 486 | | +--rw (primary) 487 | | | +--:(primary-ac) 488 | | | | +--rw primary-ac 489 | | | | +--rw name? string 490 | | | | +--ro state? operational-state-type 491 | | | +--:(primary-pw) 492 | | | +--rw primary-pw* [name] 493 | | | +--rw name pw:pseudowire-ref 494 | | | +--ro state? -> /pw:pseudowires/pseudowire[pw:name=current()/../name]/state 495 | | +--rw (backup)? 496 | | | +--:(backup-ac) 497 | | | | +--rw backup-ac 498 | | | | +--rw name? string 499 | | | | +--ro state? operational-state-type 500 | | | +--:(backup-pw) 501 | | | +--rw backup-pw* [name] 502 | | | +--rw name pw:pseudowire-ref 503 | | | +--ro state? -> /pw:pseudowires/pseudowire[pw:name=current()/../name]/state 504 | | | +--rw precedence? uint32 505 | | +--rw template? -> /l2vpn/redundancy-group-templates/redundancy-group-template/name 506 | | +--rw protection-mode? enumeration 507 | | +--rw reroute-mode? enumeration 508 | | +--rw dual-receive? boolean 509 | | +--rw revert? boolean 510 | | +--rw reroute-delay? uint16 511 | | +--rw revert-delay? uint16 512 | +--rw split-horizon-group? string 513 +--rw vpws-constraints 514 +--rw pbb-parameters 515 +--rw (component-type)? 516 +--:(i-component) 517 | +--rw i-sid? i-sid-type 518 | +--rw backbone-src-mac? yang:mac-address 519 +--:(b-component) 520 +--rw bind-b-component-name? l2vpn-instance-name-ref 521 +--ro bind-b-component-type? identityref 522 augment /pw:pseudowires/pw:pseudowire: 523 +--rw vccv-ability? boolean 524 +--rw request-vlanid? uint16 525 +--rw vlan-tpid? string 526 +--rw ttl? uint8 527 augment /pw:pseudowires/pw:pseudowire/pw:pw-type: 528 +--:(bgp-pw) 529 | +--rw bgp-pw 530 | +--rw remote-pe-id? inet:ip-address 531 +--:(bgp-ad-pw) 532 +--rw bgp-ad-pw 533 +--rw remote-ve-id? uint16 535 notifications: 536 +---n l2vpn-state-change-notification 537 +--ro l2vpn-instance-name? l2vpn-instance-name-ref 538 +--ro l2vpn-instance-type? -> /l2vpn/instances/instance[l2vpn:name=current()/../l2vpn-instance-name]/type 539 +--ro (ac-or-pw-or-redundancy-grp)? 540 | +--:(ac) 541 | | +--ro ac? -> /l2vpn/instances/instance[name=current()/../l2vpn-instance-name][type=current()/../l2vpn-instance-type]/endpoint/pw/name 542 | +--:(pw) 543 | | +--ro pw? -> /l2vpn/instances/instance[name=current()/../l2vpn-instance-name][type=current()/../l2vpn-instance-type]/endpoint/pw/name 544 | +--:(redundancy-grp) 545 | +--ro (primary) 546 | | +--:(primary-ac) 547 | | | +--ro primary-ac? -> /l2vpn/instances/instance[name=current()/../l2vpn-instance-name][type=current()/../l2vpn-instance-type]/endpoint/primary-ac/name 548 | | +--:(primary-pw) 549 | | +--ro primary-pw? -> /l2vpn/instances/instance[name=current()/../l2vpn-instance-name][type=current()/../l2vpn-instance-type]/endpoint/primary-pw/name 550 | +--ro (backup)? 551 | +--:(backup-ac) 552 | | +--ro backup-ac? -> /l2vpn/instances/instance[name=current()/../l2vpn-instance-name][type=current()/../l2vpn-instance-type]/endpoint/backup-ac/name 553 | +--:(backup-pw) 554 | +--ro backup-pw? -> /l2vpn/instances/instance[name=current()/../l2vpn-instance-name][type=current()/../l2vpn-instance-type]/endpoint/backup-pw/name 555 +--ro state? identityref 557 Figure 2 559 4. YANG Module 561 The L2VPN configuration container is logically divided into following 562 high level config areas: 564 file "ietf-pseudowires@2017-06-26.yang" 565 module ietf-pseudowires { 566 namespace "urn:ietf:params:xml:ns:yang:ietf-pseudowires"; 567 prefix "pw"; 569 import ietf-inet-types { 570 prefix "inet"; 571 } 573 import ietf-routing-types { 574 prefix "rt-types"; 575 } 577 organization "ietf"; 578 contact "ietf"; 579 description "Pseudowire YANG model"; 581 revision "2017-06-26" { 582 description "Initial revision " + 583 " - Created a new model for pseudowires, which used " + 584 " to be defined within the L2VPN model " + 585 ""; 587 reference ""; 588 } 590 /* Typedefs */ 592 typedef pseudowire-ref { 593 type leafref { 594 path "/pw:pseudowires/pw:pseudowire/pw:name"; 595 } 596 description "A type that is a reference to a pseudowire"; 597 } 599 typedef pw-template-ref { 600 type leafref { 601 path "/pw:pseudowires/pw:pw-templates/pw:pw-template/pw:name"; 602 } 603 description "A type that is a reference to a pw-template"; 604 } 606 typedef cw-negotiation-type { 607 type enumeration { 608 enum "non-preferred" { 609 description "No preference for control-word"; 610 } 611 enum "preferred" { 612 description "Prefer to have control-word negotiation"; 613 } 614 } 615 description "control-word negotiation preference type"; 616 } 618 typedef pseudowire-status-type { 619 type bits { 620 bit pseudowire-forwarding { 621 position 0; 622 description "Pseudowire is forwarding"; 623 } 624 bit pseudowire-not-forwarding { 625 position 1; 626 description "Pseudowire is not forwarding"; 627 } 628 bit local-attachment-circuit-receive-fault { 629 position 2; 630 description "Local attachment circuit (ingress) receive " + 631 "fault"; 632 } 633 bit local-attachment-circuit-transmit-fault { 634 position 3; 635 description "Local attachment circuit (egress) transmit " + 636 "fault"; 637 } 638 bit local-PSN-facing-PW-receive-fault { 639 position 4; 640 description "Local PSN-facing PW (ingress) receive fault"; 641 } 642 bit local-PSN-facing-PW-transmit-fault { 643 position 5; 644 description "Local PSN-facing PW (egress) transmit fault"; 645 } 646 bit PW-preferential-forwarding-status { 647 position 6; 648 description "Pseudowire preferential forwarding status"; 649 } 650 bit PW-request-switchover-status { 651 position 7; 652 description "Pseudowire request switchover status"; 653 } 654 } 655 description 656 "Pseudowire status type, as registered in the IANA " + 657 "Pseudowire Status Code Registry"; 658 } 660 /* Groupings */ 662 grouping pw-type-grp { 663 description "pseudowire type grouping"; 664 choice pw-type { 665 description "A choice of pseudowire type"; 666 case ldp-or-static-pw { 667 leaf peer-ip { 668 type inet:ip-address; 669 description "peer IP address"; 670 } 671 leaf pw-id { 672 type uint32; 673 description "pseudowire id"; 674 } 675 leaf icb { 676 type boolean; 677 description "inter-chassis backup"; 678 } 679 leaf transmit-label { 680 type rt-types:mpls-label; 681 description "transmit lable"; 682 } 683 leaf receive-label { 684 type rt-types:mpls-label; 685 description "receive label"; 686 } 687 } 688 case bgp-pw { 689 leaf remote-pe-id { 690 type inet:ip-address; 691 description "remote pe id"; 692 } 693 } 694 case bgp-ad-pw { 695 leaf remote-ve-id { 696 type uint16; 697 description "remote ve id"; 698 } 699 } 700 } 701 } 703 /* Data */ 705 container pseudowires { 706 description "Configuration management of pseudowires"; 707 list pseudowire { 708 key "name"; 709 description "A pseudowire"; 710 leaf name { 711 type string; 712 description "pseudowire name"; 713 } 714 leaf state { 715 type pseudowire-status-type; 716 config false; 717 description "pseudowire operation status"; 718 reference "RFC 4446 and IANA Pseudowire Status Codes " + 719 "Registery"; 720 } 721 leaf template { 722 type pw-template-ref; 723 description "pseudowire template"; 724 } 725 leaf mtu { 726 type uint16; 727 description "PW MTU"; 728 } 729 leaf mac-withdraw { 730 type boolean; 731 default false; 732 description "Enable (true) or disable (false) MAC withdraw"; 733 } 734 leaf cw-negotiation { 735 type cw-negotiation-type; 736 description "cw-negotiation"; 737 } 738 leaf tunnel-policy { 739 type string; 740 description "tunnel policy name"; 741 } 742 choice pw-type { 743 description "A choice of pseudowire type"; 744 case configured-pw { 745 container configured-pw { 746 description "LDP or static pseudowire that requires " + 747 "manual configuration"; 748 leaf peer-ip { 749 type inet:ip-address; 750 description "peer IP address"; 751 } 752 leaf pw-id { 753 type uint32; 754 description "pseudowire id"; 755 } 756 leaf icb { 757 type boolean; 758 description "inter-chassis backup"; 759 } 760 leaf transmit-label { 761 type rt-types:mpls-label; 762 description "transmit lable"; 763 } 764 leaf receive-label { 765 type rt-types:mpls-label; 766 description "receive label"; 767 } 768 } 769 } 770 } 771 } 772 container pw-templates { 773 description "pw-templates"; 774 list pw-template { 775 key "name"; 776 description "pw-template"; 777 leaf name { 778 type string; 779 description "name"; 780 } 781 leaf mtu { 782 type uint16; 783 description "pseudowire mtu"; 784 } 785 leaf cw-negotiation { 786 type cw-negotiation-type; 787 default "preferred"; 788 description 789 "control-word negotiation preference"; 790 } 791 leaf tunnel-policy { 792 type string; 793 description "tunnel policy name"; 794 } 795 } 796 } 797 } 798 } 799 801 file "ietf-l2vpn@2017-06-26.yang" 802 module ietf-l2vpn { 803 namespace "urn:ietf:params:xml:ns:yang:ietf-l2vpn"; 804 prefix "l2vpn"; 806 import ietf-inet-types { 807 prefix "inet"; 808 } 810 import ietf-yang-types { 811 prefix "yang"; 812 } 814 import ietf-routing-types { 815 prefix "rt-types"; 816 } 818 import ietf-pseudowires { 819 prefix "pw"; 820 } 822 organization "ietf"; 823 contact "ietf"; 824 description "l2vpn"; 826 revision "2017-06-26" { 827 description "Sixth revision " + 828 " - Removed unused module mpls " + 829 " - Renamed l2vpn-instances-state to l2vpn-instances " + 830 " - Added pseudowire status as defined in RFC4446 and " + 831 " IANA Pseudowire Status Codes Register " + 832 " - Added notifications " + 833 " - Moved PW definition out of L2VPN " + 834 " - Moved model to NMDA style specified in " + 835 " draft-dsdt-nmda-guidelines-01.txt " + 836 " - Renamed l2vpn-instances and l2vpn-instance to " + 837 " instances and instance to shorten xpaths " + 838 ""; 839 reference ""; 840 } 842 revision "2017-03-06" { 843 description "Sixth revision " + 844 " - Removed the 'common' container and move pw-templates " + 845 " and redundancy-group-templates up a level " + 846 " - Consolidated the endpoint configuration such that " + 847 " all L2VPN instances has a list of endpoint. For " + 848 " certain types of L2VPN instances such as VPWS where " + 849 " each L2VPN instance is limited to at most two " + 850 " endpoint, additional augment statements were included " + 851 " to add necessary constraints " + 852 " - Removed discovery-type and signaling-type operational " + 853 " state from VPLS pseudowires, as these two parameters " + 854 " are configured as L2VPN parameters rather than " + 855 " pseudowire paramteres " + 856 " - Renamed l2vpn-instances to l2vpn-instances-state " + 857 " in the operational state branch " + 858 " - Removed BGP parameter groupings and reused " + 859 " ietf-routing-types.yang module instead " + 860 ""; 861 reference ""; 862 } 864 revision "2016-10-24" { 865 description "Fifth revision " + 866 " - Edits based on Giles's comments " + 867 " 5) Remove relative leafrefs in groupings, " + 868 " and the resulting new groupings are: " + 869 " (a) bgp-auto-discovery-parameters-grp " + 870 " (b) bgp-signaling-parameters-grp " + 871 " (c) endpoint-grp " + 872 " 11) Merge VPLS and VPWS into one single list " + 873 " and use augment statements to handle " + 874 " differences between VPLS and VPWS " + 875 " - Add a new grouping l2vpn-common-parameters-grp " + 876 " to make VPLS and VPWS more consistent"; 877 reference ""; 878 } 880 revision "2016-05-31" { 881 description "Fourth revision " + 882 " - Edits based on Giles's comments " + 883 " 1) Change enumeration to identityref type for: " + 884 " (a) l2vpn-service-type " + 885 " (b) l2vpn-discovery-type " + 886 " (c) l2vpn-signaling-type " + 887 " bgp-rt-type, cw-negotiation, and " + 888 " pbb-component remain enumerations " + 889 " 2) Define i-sid-type for leaf 'i-sid' " + 890 " (which is renamed from 'i-tag') " + 891 " 3) Rename 'vpn-targets' to 'vpn-target' " + 892 " 4) Import ietf-mpls.yang and reuse the " + 893 " 'mpls-label' type defined in ietf-mpls.yang " + 894 " transmit-label and receive-label " + 895 " 8) Change endpoint list's key to name " + 896 " 9) Changed MTU to type uint16 " + 897 ""; 898 reference ""; 899 } 901 revision "2016-03-07" { 902 description "Third revision " + 903 " - Changed the module name to ietf-l2vpn " + 904 " - Merged EVPN into L2VPN " + 905 " - Eliminated the definitions of attachment " + 906 " circuit with the intention to reuse other " + 907 " layer-2 definitions " + 908 " - Added state branch"; 909 reference ""; 910 } 912 revision "2015-10-08" { 913 description "Second revision " + 914 " - Added container vpls-instances " + 915 " - Rearranged groupings and typedefs to be " + 916 " reused across vpls-instance and vpws-instances"; 917 reference ""; 918 } 920 revision "2015-06-30" { 921 description "Initial revision"; 922 reference ""; 923 } 924 /* identities */ 926 identity l2vpn-instance-type { 927 description "Base identity from which identities of " + 928 "l2vpn service instance types are derived"; 929 } 931 identity vpws-instance-type { 932 base l2vpn-instance-type; 933 description "This identity represents VPWS instance type"; 934 } 936 identity vpls-instance-type { 937 base l2vpn-instance-type; 938 description "This identity represents VPLS instance type"; 939 } 941 identity link-discovery-protocol { 942 description "Base identiy from which identities describing " + 943 "link discovery protocols are derived"; 944 } 946 identity lacp { 947 base "link-discovery-protocol"; 948 description "This identity represents LACP"; 949 } 951 identity lldp { 952 base "link-discovery-protocol"; 953 description "This identity represents LLDP"; 954 } 956 identity bpdu { 957 base "link-discovery-protocol"; 958 description "This identity represens BPDU"; 959 } 961 identity cpd { 962 base "link-discovery-protocol"; 963 description "This identity represents CPD"; 964 } 966 identity udld { 967 base "link-discovery-protocol"; 968 description "This identity represens UDLD"; 969 } 971 identity l2vpn-service { 972 description "Base identity from which identities describing " + 973 "L2VPN services are derived"; 974 } 976 identity Ethernet { 977 base "l2vpn-service"; 978 description "This identity represents Ethernet service"; 979 } 981 identity ATM { 982 base "l2vpn-service"; 983 description "This identity represents Asynchronous Transfer " + 984 "Mode service"; 985 } 987 identity FR { 988 base "l2vpn-service"; 989 description "This identity represent Frame-Relay service"; 990 } 992 identity TDM { 993 base "l2vpn-service"; 994 description "This identity represent Time Devision " + 995 "Multiplexing service"; 996 } 997 identity l2vpn-discovery { 998 description "Base identity from which identities describing " + 999 "L2VPN discovery protocols are derived"; 1000 } 1002 identity manual-discovery { 1003 base "l2vpn-discovery"; 1004 description "Manual configuration of l2vpn service"; 1005 } 1007 identity bgp-auto-discovery { 1008 base "l2vpn-discovery"; 1009 description "Border Gateway Protocol (BGP) auto-discovery of " + 1010 "l2vpn service"; 1011 } 1013 identity ldp-discovery { 1014 base "l2vpn-discovery"; 1015 description "Label Distribution Protocol (LDP) discovery of " + 1016 "l2vpn service"; 1017 } 1019 identity mixed-discovery { 1020 base "l2vpn-discovery"; 1021 description "Mixed discovery methods of l2vpn service"; 1022 } 1024 identity l2vpn-signaling { 1025 description "Base identity from which identities describing " + 1026 "L2VPN signaling protocols are derived"; 1027 } 1029 identity static-configuration { 1030 base "l2vpn-signaling"; 1031 description "Static configuration of labels (no signaling)"; 1032 } 1034 identity ldp-signaling { 1035 base "l2vpn-signaling"; 1036 description "Label Distribution Protocol (LDP) signaling"; 1037 } 1039 identity bgp-signaling { 1040 base "l2vpn-signaling"; 1041 description "Border Gateway Protocol (BGP) signaling"; 1042 } 1044 identity mixed-signaling { 1045 base "l2vpn-signaling"; 1046 description "Mixed signaling methods"; 1047 } 1049 identity l2vpn-notification-state { 1050 description "The base identity on which notification states " + 1051 "are based"; 1052 } 1054 identity MAC-limit-reached { 1055 base "l2vpn-notification-state"; 1056 description "MAC limit is reached"; 1057 } 1059 identity MAC-limit-cleared { 1060 base "l2vpn-notification-state"; 1061 description "MAC limit is cleared"; 1062 } 1064 identity MTU-mismatched { 1065 base "l2vpn-notification-state"; 1066 description "MAC is mismatched"; 1067 } 1068 identity MTU-mismatched-cleared { 1069 base "l2vpn-notification-state"; 1070 description "MAC is mismatch is cleared"; 1071 } 1073 identity state-changed-to-up { 1074 base "l2vpn-notification-state"; 1075 description "State is changed to UP"; 1076 } 1078 identity state-changed-to-down { 1079 base "l2vpn-notification-state"; 1080 description "State is changed to down"; 1081 } 1083 identity MAC-move-limit-exceeded { 1084 base "l2vpn-notification-state"; 1085 description "MAC move limit is exceeded"; 1086 } 1088 identity MAC-move-limit-exceeded-cleared { 1089 base "l2vpn-notification-state"; 1090 description "MAC move limit exceeded is cleared"; 1091 } 1093 identity MAC-flap-detected { 1094 base "l2vpn-notification-state"; 1095 description "MAC flap detected"; 1096 } 1098 identity port-disabled-due-to-MAC-flap { 1099 base "l2vpn-notification-state"; 1100 description "Port disabled due to MAC flap"; 1101 } 1103 /* typedefs */ 1105 typedef l2vpn-service-type { 1106 type identityref { 1107 base "l2vpn-service"; 1108 } 1109 description "L2VPN service type"; 1110 } 1112 typedef l2vpn-discovery-type { 1113 type identityref { 1114 base "l2vpn-discovery"; 1115 } 1116 description "L2VPN discovery type"; 1117 } 1119 typedef l2vpn-signaling-type { 1120 type identityref { 1121 base "l2vpn-signaling"; 1122 } 1123 description "L2VPN signaling type"; 1124 } 1126 typedef link-discovery-protocol-type { 1127 type identityref { 1128 base "link-discovery-protocol"; 1129 } 1130 description "This type is used to identify " + 1131 "link discovery protocol"; 1132 } 1134 typedef pbb-component-type { 1135 type enumeration { 1136 enum "b-component" { 1137 description "Identifies as a b-component"; 1138 } 1139 enum "i-component" { 1140 description "Identifies as an i-component"; 1141 } 1142 } 1143 description "This type is used to identify " + 1144 "the type of PBB component"; 1145 } 1147 typedef redundancy-group-template-ref { 1148 type leafref { 1149 path "/l2vpn:l2vpn/l2vpn:redundancy-group-templates" + 1150 "/l2vpn:redundancy-group-template/l2vpn:name"; 1151 } 1152 description "redundancy-group-template-ref"; 1153 } 1155 typedef l2vpn-instance-name-ref { 1156 type leafref { 1157 path "/l2vpn:l2vpn/l2vpn:instances" + 1158 "/l2vpn:instance/l2vpn:name"; 1159 } 1160 description "l2vpn-instance-name-ref"; 1161 } 1163 typedef l2vpn-instance-type-ref { 1164 type leafref { 1165 path "/l2vpn:l2vpn/l2vpn:instances" + 1166 "/l2vpn:instance/l2vpn:type"; 1167 } 1168 description "l2vpn-instance-type-ref"; 1169 } 1171 typedef operational-state-type { 1172 type enumeration { 1173 enum 'up' { 1174 description "Operational state is up"; 1175 } 1176 enum 'down' { 1177 description "Operational state is down"; 1178 } 1179 } 1180 description "operational-state-type"; 1181 } 1183 typedef i-sid-type { 1184 type uint32 { 1185 range "0..16777216"; 1186 } 1187 description "I-SID type that is 24-bits. " + 1188 "This should be moved to ieee-types.yang at " + 1189 "http://www.ieee802.org/1/files/public/docs2015" + 1190 "/new-mholness-ieee-types-yang-v01.yang"; 1191 } 1193 /* groupings */ 1195 grouping one-l2vpn-instance-grp { 1196 description "A grouping that identifies a single L2VPN instance"; 1197 leaf l2vpn-instance-name { 1198 type l2vpn-instance-name-ref; 1199 description "The L2VPN instance name"; 1200 } 1201 leaf l2vpn-instance-type { 1202 type leafref { 1203 path "/l2vpn:l2vpn/l2vpn:instances" + 1204 "/l2vpn:instance" + 1205 "[l2vpn:name=current()/../l2vpn-instance-name]" + 1206 "/l2vpn:type"; 1207 } 1208 description "The L2VPN instance type"; 1209 } 1210 } 1211 grouping pbb-parameters-grp { 1212 description "PBB parameters grouping"; 1213 container pbb-parameters { 1214 description "pbb-parameters"; 1215 choice component-type { 1216 description "PBB component type"; 1217 case i-component { 1218 leaf i-sid { 1219 type i-sid-type; 1220 description "I-SID"; 1221 } 1222 leaf backbone-src-mac { 1223 type yang:mac-address; 1224 description "backbone-src-mac"; 1225 } 1226 } 1227 case b-component { 1228 leaf bind-b-component-name { 1229 type l2vpn-instance-name-ref; 1230 must "/l2vpn:l2vpn" + 1231 "/l2vpn:instances" + 1232 "/l2vpn:instance[l2vpn:name=current()]" + 1233 "/type = 'vpls-instance-type'" { 1234 description "A b-component must be an L2VPN instance " + 1235 "of type vpls-instance-type"; 1236 } 1237 description "Reference to the associated b-component"; 1238 } 1239 leaf bind-b-component-type { 1240 type identityref { 1241 base l2vpn-instance-type; 1242 } 1243 must ". = 'l2vpn:vpls-instance-type'" { 1244 description "The associated b-component must have " + 1245 "type vpls-instance-type"; 1246 } 1247 config false; 1248 description "Type of the associated b-component"; 1249 } 1250 } 1251 } 1252 } 1253 } 1255 grouping pbb-parameters-state-grp { 1256 description "PBB parameters grouping"; 1257 container pbb-parameters { 1258 description "pbb-parameters"; 1259 choice component-type { 1260 description "PBB component type"; 1261 case i-component { 1262 leaf i-sid { 1263 type i-sid-type; 1264 description "I-SID"; 1265 } 1266 leaf backbone-src-mac { 1267 type yang:mac-address; 1268 description "backbone-src-mac"; 1269 } 1270 } 1271 case b-component { 1272 leaf bind-b-component-name { 1273 type string; 1274 description "Name of the associated b-component"; 1275 } 1276 leaf bind-b-component-type { 1277 type identityref { 1278 base l2vpn-instance-type; 1279 } 1280 must ". = 'l2vpn:vpls-instance-type'" { 1281 description "The associated b-component must have " + 1282 "type vpls-instance-type"; 1283 } 1284 description "Type of the associated b-component"; 1285 } 1286 } 1287 } 1288 } 1289 } 1291 grouping l2vpn-common-parameters-grp { 1292 description "L2VPN common parameters"; 1293 leaf name { 1294 type string; 1295 description "Name of L2VPN service instance"; 1296 } 1297 leaf type { 1298 type identityref { 1299 base l2vpn-instance-type; 1300 } 1301 description "Type of L2VPN service instance"; 1302 } 1303 leaf mtu { 1304 type uint16; 1305 description "MTU of L2VPN service"; 1306 } 1307 leaf mac-aging-timer { 1308 type uint32; 1309 description "mac-aging-timer, the duration after which" + 1310 "a MAC entry is considered aged out"; 1311 } 1312 leaf service-type { 1313 type l2vpn-service-type; 1314 default Ethernet; 1315 description "L2VPN service type"; 1316 } 1317 leaf discovery-type { 1318 type l2vpn-discovery-type; 1319 default manual-discovery; 1320 description "L2VPN service discovery type"; 1321 } 1322 leaf signaling-type { 1323 type l2vpn-signaling-type; 1324 mandatory true; 1325 description "L2VPN signaling type"; 1326 } 1327 } 1329 grouping bgp-signaling-parameters-grp { 1330 description "BGP parameters for signaling"; 1331 leaf site-id { 1332 type uint16; 1333 description "Site ID"; 1334 } 1335 leaf site-range { 1336 type uint16; 1337 description "Site Range"; 1338 } 1339 } 1341 grouping redundancy-group-properties-grp { 1342 description "redundancy-group-properties-grp"; 1343 leaf protection-mode { 1344 type enumeration { 1345 enum "frr" { 1346 value 0; 1347 description "fast reroute"; 1348 } 1349 enum "master-slave" { 1350 value 1; 1351 description "master-slave"; 1352 } 1353 enum "independent" { 1354 value 2; 1355 description "independent"; 1356 } 1357 } 1358 description "protection-mode"; 1359 } 1360 leaf reroute-mode { 1361 type enumeration { 1362 enum "immediate" { 1363 value 0; 1364 description "immediate reroute"; 1365 } 1366 enum "delayed" { 1367 value 1; 1368 description "delayed reroute"; 1369 } 1370 enum "never" { 1371 value 2; 1372 description "never reroute"; 1373 } 1374 } 1375 description "reroute-mode"; 1376 } 1377 leaf dual-receive { 1378 type boolean; 1379 description 1380 "allow extra traffic to be carried by backup"; 1381 } 1382 leaf revert { 1383 type boolean; 1384 description "allow forwarding to revert to primary " + 1385 "after restoring primary"; 1386 } 1387 leaf reroute-delay { 1388 when "../reroute-mode = 'delayed'" { 1389 description "Specify amount of time to " + 1390 "delay reroute only when " + 1391 "delayed route is configured"; 1392 } 1393 type uint16; 1394 description "amount of time to delay reroute"; 1395 } 1396 leaf revert-delay { 1397 when "../revert = 'true'" { 1398 description "Specify the amount of time to " + 1399 "wait to revert to primary " + 1400 "only if reversion is configured"; 1401 } 1402 type uint16; 1403 description "amount ot time to wait to revert to primary"; 1404 } 1405 } 1407 grouping endpoint-grp { 1408 description "A grouping that defines the structure of " + 1409 "an endpoint"; 1410 choice ac-or-pw-or-redundancy-grp { 1411 description "A choice ofattachment circuit or " + 1412 "pseudowire or redundancy group"; 1413 case ac { 1414 description "Attachment circuit(s) as an endpoint"; 1415 } 1416 case pw { 1417 description "Pseudowire(s) as an endpoint"; 1418 } 1419 case redundancy-grp { 1420 description "Redundancy group as an endpoint"; 1421 choice primary { 1422 mandatory true; 1423 description "primary options"; 1424 case primary-ac { 1425 description "primary-ac"; 1426 } 1427 case primary-pw { 1428 description "primary-pw"; 1429 } 1430 } 1431 choice backup { 1432 description "backup options"; 1433 case backup-ac { 1434 description "backup-ac"; 1435 } 1436 case backup-pw { 1437 description "backup-pw"; 1438 } 1439 } 1440 } 1441 } 1442 } 1444 grouping ac-params-grp { 1445 description "ac-state-grp"; 1446 leaf name { 1447 type string; 1448 description "Name of attachment circuit. " + 1449 "This field is intended to " + 1450 "reference standardized " + 1451 "layer-2 definitions."; 1452 } 1453 leaf state { 1454 type operational-state-type; 1455 config false; 1456 description "attachment circuit up/down state"; 1457 } 1458 } 1460 grouping pw-params-grp { 1461 description "PW state grouping"; 1462 leaf name { 1463 type pw:pseudowire-ref; 1464 description "Pseudowire name"; 1465 } 1466 leaf state { 1467 type leafref { 1468 path "/pw:pseudowires" + 1469 "/pw:pseudowire[pw:name=current()/../name]" + 1470 "/pw:state"; 1471 } 1472 config false; 1473 description "Pseudowire state"; 1474 } 1475 } 1477 /* L2VPN YANG Model */ 1479 container l2vpn { 1480 description "l2vpn"; 1482 container redundancy-group-templates { 1483 description "redundancy group templates"; 1484 list redundancy-group-template { 1485 key "name"; 1486 description "redundancy-group-template"; 1487 leaf name { 1488 type string; 1489 description "name"; 1490 } 1491 uses redundancy-group-properties-grp; 1492 } 1493 } 1494 container instances { 1495 description "A list of L2VPN instances"; 1496 list instance { 1497 key "name type"; 1498 description "An L2VPN service instance"; 1499 uses l2vpn-common-parameters-grp; 1500 container bgp-auto-discovery { 1501 description "BGP auto-discovery parameters"; 1502 leaf route-distinguisher { 1503 type rt-types:route-distinguisher; 1504 description "BGP route distinguisher"; 1505 } 1506 leaf vpn-id { 1507 type string; 1508 description "VPN ID"; 1509 } 1510 uses rt-types:vpn-route-targets; 1511 } 1512 container bgp-signaling { 1513 when "../signaling-type = 'bgp-signaling'" { 1514 description "Check signaling type: " + 1515 "Can only configure BGP signaling if " + 1516 "signaling type is BGP"; 1517 } 1518 description "BGP signaling parameters"; 1519 uses bgp-signaling-parameters-grp; 1520 } 1521 list endpoint { 1522 key "name"; 1523 description "An endpoint"; 1524 leaf name { 1525 type string; 1526 description "endpoint name"; 1527 } 1528 uses endpoint-grp { 1529 augment "ac-or-pw-or-redundancy-grp/ac" { 1530 description "Augment for attachment circuit(s) " + 1531 "as an endpoint"; 1532 list ac { 1533 key "name"; 1534 uses ac-params-grp; 1535 description "An L2VPN instance's " + 1536 "attachment circuit list"; 1537 } 1538 } 1539 augment "ac-or-pw-or-redundancy-grp/pw" { 1540 description "Augment for pseudowire(s) as an endpoint"; 1541 list pw { 1542 key "name"; 1543 uses pw-params-grp { 1544 description "Pseudowire parameters"; 1545 refine "name" { 1546 must "(../../../type = " + 1547 " 'l2vpn:vpws-instance-type') or " + 1548 "(not(boolean(/pw:pseudowires" + 1549 " /pw:pseudowire[pw:name = current()]" + 1550 " /vccv-ability)) and " + 1551 " not(boolean(/pw:pseudowires" + 1552 " /pw:pseudowire[pw:name = current()]" + 1553 " /request-vlanid)) and " + 1554 " not(boolean(/pw:pseudowires" + 1555 " /pw:pseudowire[pw:name = current()]" + 1556 " /vlan-tpid)) and " + 1557 " not(boolean(/pw:pseudowires" + 1558 " /pw:pseudowire[pw:name = current()]" + 1559 " /ttl)))" { 1560 description "Only a VPWS PW has parameters " + 1561 "vccv-ability, request-vlanid, " + 1562 "vlan-tpid, and ttl"; 1563 } 1564 } 1565 } 1566 description "An L2VPN instance's pseudowire list"; 1567 } 1568 } 1569 augment "ac-or-pw-or-redundancy-grp/redundancy-grp/" + 1570 "primary/primary-ac" { 1571 description "Augment for primary-ac"; 1572 container primary-ac { 1573 description "Primary AC"; 1574 uses ac-params-grp; 1575 } 1576 } 1577 augment "ac-or-pw-or-redundancy-grp/redundancy-grp/" + 1578 "primary/primary-pw" { 1579 description "Augment for primary-pw"; 1580 list primary-pw { 1581 key "name"; 1582 uses pw-params-grp { 1583 description "Pseudowire parameters"; 1584 refine "name" { 1585 must "(../../../type = " + 1586 " 'l2vpn:vpws-instance-type') or " + 1587 "(not(boolean(/pw:pseudowires" + 1588 " /pw:pseudowire[pw:name = current()]" + 1589 " /vccv-ability)) and " + 1590 " not(boolean(/pw:pseudowires" + 1591 " /pw:pseudowire[pw:name = current()]" + 1592 " /request-vlanid)) and " + 1593 " not(boolean(/pw:pseudowires" + 1594 " /pw:pseudowire[pw:name = current()]" + 1595 " /vlan-tpid)) and " + 1596 " not(boolean(/pw:pseudowires" + 1597 " /pw:pseudowire[pw:name = current()]" + 1598 " /ttl)))" { 1599 description "Only a VPWS PW has parameters " + 1600 "vccv-ability, request-vlanid, " + 1601 "vlan-tpid, and ttl"; 1602 } 1603 } 1604 } 1605 description "An L2VPN instance's pseudowire list"; 1606 } 1607 } 1608 augment "ac-or-pw-or-redundancy-grp/redundancy-grp/" + 1609 "backup/backup-ac" { 1610 description "Augment for backup-ac"; 1611 container backup-ac { 1612 description "Backup AC"; 1613 uses ac-params-grp; 1614 } 1615 } 1616 augment "ac-or-pw-or-redundancy-grp/redundancy-grp/" + 1617 "backup/backup-pw" { 1618 description "Augment for backup-pw"; 1619 list backup-pw { 1620 key "name"; 1621 uses pw-params-grp { 1622 description "Pseudowire parameters"; 1623 refine "name" { 1624 must "(../../../type = " + 1625 " 'l2vpn:vpws-instance-type') or " + 1626 "(not(boolean(/pw:pseudowires" + 1627 " /pw:pseudowire[pw:name = current()]" + 1628 " /vccv-ability)) and " + 1629 " not(boolean(/pw:pseudowires" + 1630 " /pw:pseudowire[pw:name = current()]" + 1631 " /request-vlanid)) and " + 1632 " not(boolean(/pw:pseudowires" + 1633 " /pw:pseudowire[pw:name = current()]" + 1634 " /vlan-tpid)) and " + 1635 " not(boolean(/pw:pseudowires" + 1636 " /pw:pseudowire[pw:name = current()]" + 1637 " /ttl)))" { 1638 description "Only a VPWS PW has parameters " + 1639 "vccv-ability, request-vlanid, " + 1640 "vlan-tpid, and ttl"; 1641 } 1642 } 1644 } 1645 description "A list of backup pseudowires"; 1646 } 1647 } 1648 augment "ac-or-pw-or-redundancy-grp/redundancy-grp" { 1649 description "Augment for redundancy group properties"; 1650 leaf template { 1651 type leafref { 1652 path "/l2vpn/redundancy-group-templates" + 1653 "/redundancy-group-template/name"; 1654 } 1655 description "Reference a redundancy group " + 1656 "properties template"; 1657 } 1658 uses redundancy-group-properties-grp; 1659 } 1660 } 1661 } 1662 } 1663 } 1664 } 1666 /* augments */ 1668 augment "/pw:pseudowires/pw:pseudowire" { 1669 description "Augment for peudowire parameters for " + 1670 "VPWS pseudowires"; 1671 leaf vccv-ability { 1672 type boolean; 1673 description "vccvability"; 1674 } 1675 leaf request-vlanid { 1676 type uint16; 1677 description "request vlanid"; 1678 } 1679 leaf vlan-tpid { 1680 type string; 1681 description "vlan tpid"; 1682 } 1683 leaf ttl { 1684 type uint8; 1685 description "time-to-live"; 1686 } 1687 } 1689 augment "/pw:pseudowires/pw:pseudowire/pw:pw-type" { 1690 description "Additional pseudowire types"; 1691 case bgp-pw { 1692 container bgp-pw { 1693 description "BGP pseudowire"; 1694 leaf remote-pe-id { 1695 type inet:ip-address; 1696 description "remote pe id"; 1697 } 1698 } 1699 } 1700 case bgp-ad-pw { 1701 container bgp-ad-pw { 1702 description "BGP auto-discovery pseudowire"; 1703 leaf remote-ve-id { 1704 type uint16; 1705 description "remote ve id"; 1706 } 1707 } 1708 } 1709 } 1711 augment "/l2vpn/instances/instance" { 1712 when "type = 'l2vpn:vpws-instance-type'" { 1713 description "Constraints only for VPWS pseudowires"; 1714 } 1715 description "Augment for VPWS instance"; 1716 container vpws-constraints { 1717 must "(count(../endpoint) < 2) and " + 1718 "(count(../endpoint/pw) < 1) and " + 1719 "(count(../endpoint/ac) < 1) and " + 1720 "(count(../endpoint/primary-pw) < 1) and " + 1721 "(count(../endpoint/backup-pw) < 1) " { 1722 description "A VPWS L2VPN instance has at most 2 endpoints " + 1723 "and each endpoint has at most 1 pseudowire or " + 1724 "1 attachment circuit"; 1725 } 1726 description "VPWS constraints"; 1727 } 1728 } 1730 augment "/l2vpn/instances/instance" { 1731 when "type = 'l2vpn:vpls-instance-type'" { 1732 description "Parameters specifically for a VPLS instance"; 1733 } 1734 description "Augment for parameters for a VPLS instance"; 1735 uses pbb-parameters-grp; 1736 } 1738 augment "/l2vpn/instances/instance/endpoint" { 1739 when "../type = 'l2vpn:vpls-instance-type'" { 1740 description "Endpoint parameter specifically for " + 1741 "a VPLS instance"; 1742 } 1743 description "Augment for endpoint parameters for a VPLS instance"; 1744 leaf split-horizon-group { 1745 type string; 1746 description "Identify a split horizon group"; 1747 } 1748 } 1750 augment "/l2vpn/instances/instance/endpoint" + 1751 "/ac-or-pw-or-redundancy-grp/redundancy-grp" + 1752 "/backup/backup-pw/backup-pw" { 1753 when "../../type = 'l2vpn:vpls-instance-type'" { 1754 description "Backup pseudowire parameter specifically for " + 1755 "a VPLS instance"; 1756 } 1757 description "Augment for backup pseudowire paramters for " + 1758 "a VPLS instance"; 1759 leaf precedence { 1760 type uint32; 1761 description "precedence of the pseudowire"; 1762 } 1763 } 1765 /* Notifications */ 1767 notification l2vpn-state-change-notification { 1768 description "L2VPN and constituents state change notification"; 1769 uses one-l2vpn-instance-grp; 1770 uses endpoint-grp { 1771 augment "ac-or-pw-or-redundancy-grp/ac" { 1772 description "Augment for attachment circuit(s) " + 1773 "as an endpoint"; 1774 leaf ac { 1775 type leafref { 1776 path "/l2vpn/instances/instance" + 1777 "[name=current()/../l2vpn-instance-name]" + 1778 "[type=current()/../l2vpn-instance-type]" + 1779 "/endpoint/pw/name"; 1780 } 1781 description "Related attachment circuit"; 1782 } 1783 } 1784 augment "ac-or-pw-or-redundancy-grp/pw" { 1785 description "Augment for pseudowire(s) as an endpoint"; 1786 leaf pw { 1787 type leafref { 1788 path "/l2vpn/instances/instance" + 1789 "[name=current()/../l2vpn-instance-name]" + 1790 "[type=current()/../l2vpn-instance-type]" + 1791 "/endpoint/pw/name"; 1792 } 1793 description "Related pseudowire"; 1794 } 1795 } 1796 augment "ac-or-pw-or-redundancy-grp/redundancy-grp/" + 1797 "primary/primary-ac" { 1798 description "Augment for primary-ac"; 1799 leaf primary-ac { 1800 type leafref { 1801 path "/l2vpn/instances/instance" + 1802 "[name=current()/../l2vpn-instance-name]" + 1803 "[type=current()/../l2vpn-instance-type]" + 1804 "/endpoint/primary-ac/name"; 1805 } 1806 description "Related primary attachment circuit"; 1807 } 1808 } 1809 augment "ac-or-pw-or-redundancy-grp/redundancy-grp/" + 1810 "primary/primary-pw" { 1811 description "Augment for primary-pw"; 1812 leaf primary-pw { 1813 type leafref { 1814 path "/l2vpn/instances/instance" + 1815 "[name=current()/../l2vpn-instance-name]" + 1816 "[type=current()/../l2vpn-instance-type]" + 1817 "/endpoint/primary-pw/name"; 1818 } 1819 description "Related primary pseudowire"; 1820 } 1821 } 1822 augment "ac-or-pw-or-redundancy-grp/redundancy-grp/" + 1823 "backup/backup-ac" { 1824 description "Augment for backup-ac"; 1825 leaf backup-ac { 1826 type leafref { 1827 path "/l2vpn/instances/instance" + 1828 "[name=current()/../l2vpn-instance-name]" + 1829 "[type=current()/../l2vpn-instance-type]" + 1830 "/endpoint/backup-ac/name"; 1831 } 1832 description "Related backup attachment circuit"; 1833 } 1834 } 1835 augment "ac-or-pw-or-redundancy-grp/redundancy-grp/" + 1836 "backup/backup-pw" { 1837 description "Augment for backup-pw"; 1838 leaf backup-pw { 1839 type leafref { 1840 path "/l2vpn/instances/instance" + 1841 "[name=current()/../l2vpn-instance-name]" + 1842 "[type=current()/../l2vpn-instance-type]" + 1843 "/endpoint/backup-pw/name"; 1844 } 1845 description "Related backup pseudowire"; 1846 } 1847 } 1848 } 1849 leaf state { 1850 type identityref { 1851 base l2vpn-notification-state; 1852 } 1853 description "State change notification"; 1854 } 1855 } 1857 } 1859 1861 Figure 3 1863 5. Security Considerations 1865 The configuration, state, action and notification data defined in 1866 this document are designed to be accessed via the NETCONF protocol 1867 [RFC6241]. The lowest NETCONF layer is the secure transport layer 1868 and the mandatory-to-implement secure transport is SSH [RFC6242]. 1869 The NETCONF access control model [RFC6536] provides means to restrict 1870 access for particular NETCONF users to a pre-configured subset of all 1871 available NETCONF protocol operations and content. 1873 The security concerns listed above are, however, no different than 1874 faced by other routing protocols. Hence, this draft does not change 1875 any underlying security issues inherent in [I-D.ietf-netmod-routing- 1876 cfg] 1878 6. IANA Considerations 1880 None. 1882 7. Acknowledgments 1884 The authors would like to acknowledge Giles Heron and others for 1885 their useful comments. 1887 8. References 1889 8.1. Normative References 1891 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1892 Requirement Levels", BCP 14, RFC 2119, 1893 DOI 10.17487/RFC2119, March 1997, 1894 . 1896 8.2. Informative References 1898 [RFC3916] Xiao, X., Ed., McPherson, D., Ed., and P. Pate, Ed., 1899 "Requirements for Pseudo-Wire Emulation Edge-to-Edge 1900 (PWE3)", RFC 3916, DOI 10.17487/RFC3916, September 2004, 1901 . 1903 [RFC3985] Bryant, S., Ed. and P. Pate, Ed., "Pseudo Wire Emulation 1904 Edge-to-Edge (PWE3) Architecture", RFC 3985, 1905 DOI 10.17487/RFC3985, March 2005, 1906 . 1908 [RFC4385] Bryant, S., Swallow, G., Martini, L., and D. McPherson, 1909 "Pseudowire Emulation Edge-to-Edge (PWE3) Control Word for 1910 Use over an MPLS PSN", RFC 4385, DOI 10.17487/RFC4385, 1911 February 2006, . 1913 [RFC4446] Martini, L., "IANA Allocations for Pseudowire Edge to Edge 1914 Emulation (PWE3)", BCP 116, RFC 4446, 1915 DOI 10.17487/RFC4446, April 2006, 1916 . 1918 [RFC4447] Martini, L., Ed., Rosen, E., El-Aawar, N., Smith, T., and 1919 G. Heron, "Pseudowire Setup and Maintenance Using the 1920 Label Distribution Protocol (LDP)", RFC 4447, 1921 DOI 10.17487/RFC4447, April 2006, 1922 . 1924 [RFC4448] Martini, L., Ed., Rosen, E., El-Aawar, N., and G. Heron, 1925 "Encapsulation Methods for Transport of Ethernet over MPLS 1926 Networks", RFC 4448, DOI 10.17487/RFC4448, April 2006, 1927 . 1929 [RFC4664] Andersson, L., Ed. and E. Rosen, Ed., "Framework for Layer 1930 2 Virtual Private Networks (L2VPNs)", RFC 4664, 1931 DOI 10.17487/RFC4664, September 2006, 1932 . 1934 [RFC4665] Augustyn, W., Ed. and Y. Serbest, Ed., "Service 1935 Requirements for Layer 2 Provider-Provisioned Virtual 1936 Private Networks", RFC 4665, DOI 10.17487/RFC4665, 1937 September 2006, . 1939 [RFC4761] Kompella, K., Ed. and Y. Rekhter, Ed., "Virtual Private 1940 LAN Service (VPLS) Using BGP for Auto-Discovery and 1941 Signaling", RFC 4761, DOI 10.17487/RFC4761, January 2007, 1942 . 1944 [RFC4762] Lasserre, M., Ed. and V. Kompella, Ed., "Virtual Private 1945 LAN Service (VPLS) Using Label Distribution Protocol (LDP) 1946 Signaling", RFC 4762, DOI 10.17487/RFC4762, January 2007, 1947 . 1949 [RFC5003] Metz, C., Martini, L., Balus, F., and J. Sugimoto, 1950 "Attachment Individual Identifier (AII) Types for 1951 Aggregation", RFC 5003, DOI 10.17487/RFC5003, September 1952 2007, . 1954 [RFC5254] Bitar, N., Ed., Bocci, M., Ed., and L. Martini, Ed., 1955 "Requirements for Multi-Segment Pseudowire Emulation Edge- 1956 to-Edge (PWE3)", RFC 5254, DOI 10.17487/RFC5254, October 1957 2008, . 1959 [RFC5659] Bocci, M. and S. Bryant, "An Architecture for Multi- 1960 Segment Pseudowire Emulation Edge-to-Edge", RFC 5659, 1961 DOI 10.17487/RFC5659, October 2009, 1962 . 1964 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 1965 the Network Configuration Protocol (NETCONF)", RFC 6020, 1966 DOI 10.17487/RFC6020, October 2010, 1967 . 1969 [RFC6073] Martini, L., Metz, C., Nadeau, T., Bocci, M., and M. 1970 Aissaoui, "Segmented Pseudowire", RFC 6073, 1971 DOI 10.17487/RFC6073, January 2011, 1972 . 1974 [RFC6074] Rosen, E., Davie, B., Radoaca, V., and W. Luo, 1975 "Provisioning, Auto-Discovery, and Signaling in Layer 2 1976 Virtual Private Networks (L2VPNs)", RFC 6074, 1977 DOI 10.17487/RFC6074, January 2011, 1978 . 1980 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 1981 and A. Bierman, Ed., "Network Configuration Protocol 1982 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 1983 . 1985 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 1986 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 1987 . 1989 [RFC6391] Bryant, S., Ed., Filsfils, C., Drafz, U., Kompella, V., 1990 Regan, J., and S. Amante, "Flow-Aware Transport of 1991 Pseudowires over an MPLS Packet Switched Network", 1992 RFC 6391, DOI 10.17487/RFC6391, November 2011, 1993 . 1995 [RFC6423] Li, H., Martini, L., He, J., and F. Huang, "Using the 1996 Generic Associated Channel Label for Pseudowire in the 1997 MPLS Transport Profile (MPLS-TP)", RFC 6423, 1998 DOI 10.17487/RFC6423, November 2011, 1999 . 2001 [RFC6478] Martini, L., Swallow, G., Heron, G., and M. Bocci, 2002 "Pseudowire Status for Static Pseudowires", RFC 6478, 2003 DOI 10.17487/RFC6478, May 2012, 2004 . 2006 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 2007 Protocol (NETCONF) Access Control Model", RFC 6536, 2008 DOI 10.17487/RFC6536, March 2012, 2009 . 2011 [RFC6624] Kompella, K., Kothari, B., and R. Cherukuri, "Layer 2 2012 Virtual Private Networks Using BGP for Auto-Discovery and 2013 Signaling", RFC 6624, DOI 10.17487/RFC6624, May 2012, 2014 . 2016 [RFC7041] Balus, F., Ed., Sajassi, A., Ed., and N. Bitar, Ed., 2017 "Extensions to the Virtual Private LAN Service (VPLS) 2018 Provider Edge (PE) Model for Provider Backbone Bridging", 2019 RFC 7041, DOI 10.17487/RFC7041, November 2013, 2020 . 2022 [RFC7361] Dutta, P., Balus, F., Stokes, O., Calvignac, G., and D. 2023 Fedyk, "LDP Extensions for Optimized MAC Address 2024 Withdrawal in a Hierarchical Virtual Private LAN Service 2025 (H-VPLS)", RFC 7361, DOI 10.17487/RFC7361, September 2014, 2026 . 2028 Appendix A. Example Configuration 2030 This section shows an example configuration using the YANG data model 2031 defined in the document. 2033 Appendix B. Contributors 2035 The editors gratefully acknowledge the following people for their 2036 contributions to this document. 2038 Reshad Rahman 2039 Cisco Systems, Inc. 2040 Email: rrahman@cisco.com 2042 Kamran Raza 2043 Cisco Systems, Inc. 2044 Email: skraza@cisco.com 2046 Giles Heron 2047 Cisco Systems, Inc. 2048 Email: giheron@cisco.com 2050 Tapraj Singh 2051 Cisco Systems, Inc. 2052 Email: tsingh@cisco.com 2054 Zhenbin Li 2055 Huawei Technologies 2056 Email: lizhenbin@huawei.com 2058 Zhuang Shunwan 2059 Huawei Technologies 2060 Email: Zhuangshunwan@huawei.com 2062 Wang Haibo 2063 Huawei Technologies 2064 Email: rainsword.wang@huawei.com 2066 Sajjad Ahmed 2067 Ericsson 2068 Email: sajjad.ahmed@ericsson.com 2070 Matthew Bocci 2071 Nokia 2072 Email: matthew.bocci@nokia.com 2074 Jorge Rabadan 2075 Nokia 2076 Email: jorge.rabadan@nokia.com 2078 Jonathan Hardwick 2079 Metaswitch 2080 Email: jonathan.hardwick@metaswitch.com 2082 Santosh Esale 2083 Juniper Networks 2084 Email: sesale@juniper.net 2086 Nick Delregno 2087 Verizon 2088 Email: nick.deregno@verizon.com 2090 Luay Jalil 2091 Verizon 2092 Email: luay.jalil@verizon.com 2094 Maria Joecylyn 2095 Verizon 2096 Email: joecylyn.malit@verizon.com 2098 Figure 4 2100 Authors' Addresses 2102 Himanshu Shah 2103 Ciena Corporation 2105 Email: hshah@ciena.com 2107 Patrice Brissette 2108 Cisco Systems, Inc. 2110 Email: pbrisset@cisco.com 2111 Ing-When Chen 2112 Jabil 2114 Email: ing-wher_chen@jabil.com 2116 Iftekar Hussain 2117 Infinera Corporation 2119 Email: ihussain@infinera.com 2121 Bin Wen 2122 Comcast 2124 Email: Bin_Wen@cable.comcast.com 2126 Kishore Tiruveedhula 2127 Juniper Networks 2129 Email: kishoret@juniper.net