idnits 2.17.1 draft-hu-bess-l2vpn-service-yang-01.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 84 instances of too long lines in the document, the longest one being 36 characters in excess of 72. ** The abstract seems to contain references ([I-D.shah-bess-l2vpn-yang]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 176 has weird spacing: '...te-name str...' == Line 178 has weird spacing: '...ap-name str...' == Line 180 has weird spacing: '...elation enu...' == Line 192 has weird spacing: '...p-value uin...' == Line 196 has weird spacing: '...c-value uin...' == (23 more instances...) -- The document date (August 3, 2016) is 2821 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) No issues found here. Summary: 2 errors (**), 0 flaws (~~), 7 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 BESS WG Fangwei. Hu 3 Internet-Draft Ran. Chen 4 Intended status: Standards Track Jie. Yao 5 Expires: February 4, 2017 ZTE Corporation 6 Chang. Cao 7 Chinaunicom 8 August 3, 2016 10 L2VPN Service YANG Model 11 draft-hu-bess-l2vpn-service-yang-01.txt 13 Abstract 15 This document defines a YANG data model that can be used to deliver a 16 Layer 2 Provider Provisioned VPN service. These services include 17 Virtual Private Wire Service (VPWS) and Virtual Private LAN service 18 (VPLS). This model is intended to be instantiated at management 19 system to deliver the L2VPN service, and is not a configuration model 20 to be used directly on network elements. 22 This model provides an abstracted view of the Layer 2 VPN service 23 configuration components. It will be up to a management 24 system(orchestrator) to take this as an input and use specific 25 configurations models to configure the different network elements to 26 deliver the service. It is called as north bound L2VPN Service YANG 27 data model. How configuration of network elements is out of scope of 28 the document, and is defined in document[I-D.shah-bess-l2vpn-yang]. 30 Status of This Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at http://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on February 4, 2017. 47 Copyright Notice 49 Copyright (c) 2016 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (http://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with respect 57 to this document. Code Components extracted from this document must 58 include Simplified BSD License text as described in Section 4.e of 59 the Trust Legal Provisions and are provided without warranty as 60 described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 65 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 66 3. Typical Scenario . . . . . . . . . . . . . . . . . . . . . . 3 67 4. L2VPN Service Common . . . . . . . . . . . . . . . . . . . . 4 68 4.1. PW-Template . . . . . . . . . . . . . . . . . . . . . . . 4 69 4.2. QoS Policy Template . . . . . . . . . . . . . . . . . . . 4 70 5. ELINE and ELAN Service . . . . . . . . . . . . . . . . . . . 6 71 5.1. PW List . . . . . . . . . . . . . . . . . . . . . . . . . 6 72 5.2. AC List . . . . . . . . . . . . . . . . . . . . . . . . . 7 73 5.3. Service Policy . . . . . . . . . . . . . . . . . . . . . 7 74 5.4. Tunnel Policy . . . . . . . . . . . . . . . . . . . . . . 8 75 5.5. Tree Design for ELINE Service YANG Data Model . . . . . . 8 76 5.6. Tree Design for ELAN Service YANG Data Model . . . . . . 10 77 6. L2VPN Service YANG Data Model . . . . . . . . . . . . . . . . 13 78 7. Security Considerations . . . . . . . . . . . . . . . . . . . 47 79 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 47 80 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 47 81 10. Normative References . . . . . . . . . . . . . . . . . . . . 47 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 47 84 1. Introduction 86 YANG[RFC6020]is a data definition language that was introduced to 87 define the contents of a conceptual data store that allows networked 88 devices to be managed using NETCONF [RFC6241]. YANG [RFC6020] is a 89 modular language that represents data structures in an XML or JSON 90 tree format, and is used as a data modeling language for the NETCONF. 92 This document defines a YANG data model for Layer 2 Provider 93 Provisioned VPN service configuration. These services include 94 Virtual Private Wire Service (VPWS) and Virtual Private LAN service 95 (VPLS). 97 2. Terminology 99 3. Typical Scenario 101 The idea of the Lay 2 VPN service model is to propose an abstracted 102 interface to manage configuration of components of a Lay 2 VPN 103 service. A typical usage is to use this model as an input for an 104 orchestration layer who will be responsible to translate it to 105 orchestrated configuration of network elements which will be part of 106 the service. 108 Figure 1 is the typical scenario for the SDN based layer 2 VPN 109 Service. The Layer 2 service YANG data model is used between the 110 orchestration and controller 1 and controller2 and as the input for 111 the orchestrator which is responsible to translate the application 112 service to configure the network elements. The interfaces between 113 controller and orchestration are called north bound interfaces, so 114 the YANG data model defined in this document is also called north 115 bound YANG service data model for Lay 2 VPN. The interfaces between 116 controller and element networks are called south bound interfaces, 117 and the YANG data model as the input of controller to configure the 118 network elements is defined in document [I-D.shah-bess-l2vpn-yang]. 120 There are two network element domains in the figure: domain A and 121 domain C. The network elements in domain A are A11, A12, A21, A22, 122 and A31 and A32. A31 and A32 are ASBRs, which are the edge routers 123 connect to the other domains. Network elements C11, C12, C21, C22, 124 C31, and C32 are in the domain C, and C31 and C32 are ASBRs in domain 125 C. 127 +----------+ 128 | APP | 129 +-----+----+ 130 | 131 +----------+-------------+ 132 | Orchestration | 133 +------------------------+ 134 / \ <- L2vpn Service YANG data model 135 / \ 136 +-------------+ +---------------+ 137 | Controller1 | | Controller2 | 138 +-------------+ +---------------+ 139 / \ 140 / \ 141 +------------------------+ +------------------------+ 142 | Domain A ASBR | | ASBR Domain C | 143 | +----+ +----+ +----+ | | +----+ +----+ +----+ | 144 | |A11 |-| A21|---| A31| | | | C31|---| C21|-| C11| | 145 | +----+ +----+ +----+ | | +----+ +----+ +----+ | 146 | | | ASBR | | ASBR | | | 147 | +----+ +----+ +----+ | | +----+ +----+ +----+ | 148 | |A12 |-| A22|---| A32| | | | C32|---| C22|-| C12| | 149 | +----+ +----+ +----+ | | +----+ +----+ +----+ | 150 +------------------------+ +------------------------+ 151 Figure 1 Typical Scenario for SDN based L2VPN Service 153 4. L2VPN Service Common 155 4.1. PW-Template 157 The pw-templates container contains a list of pw-template. Each pw- 158 template defines a list of common pseudowire attributes such as PW 159 MTU, control word negotiation, cc, cv etc. 161 +--rw pw-template* [name] 162 +--rw name string 163 +--rw mtu? uint32 164 +--rw cw-negotiation? cw-negotiation-type 165 +--rw cc cc-type 166 +--rw cv cv-type 168 4.2. QoS Policy Template 170 The QoS policy template defines the mapping policy, car policy and 171 queue-schedule-policy. The QoS policy template is referenced by ac 172 container. 174 | +--rw qos-policy-templates 175 | +--rw mapping-policy* [mapping-template-name] 176 | | +--rw mapping-template-name string 177 | | +--rw policy-map* [policy-map-name] 178 | | | +--rw policy-map-name string 179 | | | +--rw class-policy 180 | | | | +--rw match-relation enumeration 181 | | | | +--rw match-elements 182 | | | | +--rw dscp-value? qos-dscp-bitmap 183 | | | | +--rw precedence-value? qos-prec-bitmap 184 | | | | +--rw mpls-exp-value? qos-mpls-bitmap 185 | | | | +--rw vni? vni-bitmap 186 | | | | +--rw vlan-value? qos-vlan-bitmap 187 | | | | +--rw out-8021p-value? qos-8021p-bitmap 188 | | | +--rw action 189 | | | +--rw dscp! 190 | | | | +--rw (method) 191 | | | | +--:(set-value) 192 | | | | +--rw dscp-value uint16 193 | | | +--rw ip-precedence! 194 | | | | +--rw (method) 195 | | | | +--:(set-value) 196 | | | | +--rw prec-value uint16 197 | | | +--rw mpls-exp! 198 | | | | +--rw (method) 199 | | | | +--:(set-value) 200 | | | | +--rw mpls-exp-value uint16 201 | | | +--rw pbts! 202 | | | +--rw pbts-value uint8 203 | | +--rw binding-interface* [node interface-name traffic-direction] 204 | | +--rw node string 205 | | +--rw interface-name string 206 | | +--rw traffic-direction traffic-direction-type 207 | +--rw car-policy* [car-template-name] 208 | | +--rw car-template-name string 209 | | +--rw policy-map* [policy-map-name] 210 | | | +--rw policy-map-name string 211 | | | +--rw class-policy 212 | | | | +--rw match-relation enumeration 213 | | | | +--rw match-elements 214 | | | | +--rw dscp-value? qos-dscp-bitmap 215 | | | | +--rw precedence-value? qos-prec-bitmap 216 | | | | +--rw mpls-exp-value? qos-mpls-bitmap 217 | | | | +--rw vni? vni-bitmap 218 | | | | +--rw vlan-value? qos-vlan-bitmap 219 | | | | +--rw out-8021p-value? qos-8021p-bitmap 220 | | | +--rw action 221 | | | +--rw cir uint32 222 | | | +--rw cbs uint32 223 | | | +--rw pir uint32 224 | | | +--rw pbs uint32 225 | | +--rw binding-interface* [node interface-name traffic-direction] 226 | | +--rw node string 227 | | +--rw interface-name string 228 | | +--rw traffic-direction traffic-direction-type 229 | +--rw queue-schedule-policy* [queue-schedule-template-name] 230 | +--rw queue-schedule-template-name string 231 | +--rw policy-map* [policy-map-name] 232 | | +--rw policy-map-name string 233 | | +--rw class-policy 234 | | | +--rw match-relation enumeration 235 | | | +--rw match-elements 236 | | | +--rw dscp-value? qos-dscp-bitmap 237 | | | +--rw precedence-value? qos-prec-bitmap 238 | | | +--rw mpls-exp-value? qos-mpls-bitmap 239 | | | +--rw vni? vni-bitmap 240 | | | +--rw vlan-value? qos-vlan-bitmap 241 | | | +--rw out-8021p-value? qos-8021p-bitmap 242 | | +--rw action 243 | | +--rw (method)? 244 | | +--:(wfq) 245 | | | +--rw percentage uint16 246 | | +--:(pq) 247 | | +--rw priority-value uint16 248 | +--rw binding-interface* [node interface-name traffic-direction] 249 | +--rw node string 250 | +--rw interface-name string 251 | +--rw traffic-direction traffic-direction-type 253 5. ELINE and ELAN Service 255 5.1. PW List 257 If the L2VPN Service(ELINE service or ELAN service) needs to cross 258 the AS domain, the PW container is configured as the following tree 259 structure. If the L2VPN service is established in one domain, it is 260 no need to configure PW container. 262 The asbr-id leaf is used to configure the edge ASBR of the domain. 263 As the figure 1 shows, there are two ASBRs in the domain A, so it is 264 required to indicate which exit ASBR it is when the controller 265 establishes the cross PW. 267 If the L2VPN service is ELAN service, it is necessary to configure 268 the split-horizon-group for the PW list. 270 +--rw pw* [name] 271 +--rw name string 272 +--rw asbr-id? string 273 +--rw peer? inet:ip-address 274 +--rw vcid? uint32 275 +--rw type? pw-type 276 +--rw tunnel-policy? string 277 +--rw request-vlanid? uint16 278 +--rw vlan-tpid? string 279 +--ro cw-negotiation? cw-negotiation-type 280 +--ro cc? cc-type 281 +--ro cv? cv-type 283 5.2. AC List 285 Each ELINE and ELAN services define a list of AC that are 286 participating members of the given service instance. The leaf ne-id 287 is used to configure the ingress and egress ac of the end to end 288 L2VPN service tunnel. The access type of ac could be port, dot1q, 289 qinq, etc. 291 5.3. Service Policy 293 Service policy is only used in a single AS domain. The service type, 294 singnaling type, pw type and oam policy are defined in the service 295 policy container. The tree structure of service policy is designed 296 as following: 298 | +--rw service-policy 299 | | +--rw service-type? l2vpn-service-type 300 | | +--rw signaling-type l2vpn-signaling-type 301 | | +--rw type? pw-type 302 | | +--rw pw-template? string 303 | | +--rw network? network-type 304 | | +--rw oam-policy 305 | | +--rw (detect-type)? 306 | | +--:(undetect) 307 | | +--:(BFD) 308 | | +--rw local-discriminator? int32 309 | | +--rw remote-discriminator? int32 310 | | +--rw tx-interval? int32 311 | | +--rw rx-interval? int32 312 | | +--rw multiplier? int32 314 5.4. Tunnel Policy 316 The tunnel policy is used to configured the L2VPN underlay network's 317 parameters. The signal type, tunnel mode and protect type are 318 defined in the container.The tree structure of tunnel policy is 319 designed as following: 321 | +--rw tunnel-config 322 | | +--rw tunnel-policy 323 | | +--rw tunnel-signaling-type? tunnel-signaling-type 324 | | +--rw tunnel-mode? tunnel-mode 325 | | +--rw protect-type? protect-type 326 | | +--rw receive-mode? receive-mode 327 | | +--rw (revertive-type)? 328 | | +--:(never) 329 | | +--:(wtr) 330 | | +--rw revert-delay? uint16 332 5.5. Tree Design for ELINE Service YANG Data Model 334 The tree design for VPWS instance is as following: 336 +--rw eline-service 337 | +--rw eline-instance* [name] 338 | +--rw name string 339 | +--rw description? string 340 | +--rw pw* [name] 341 | | +--rw name string 342 | | +--rw asbr-id? string 343 | | +--rw node-role? node-role 344 | | +--rw peer? inet:ip-address 345 | | +--rw vcid? uint32 346 | | +--rw type? pw-type 347 | | +--rw tunnel-policy? string 348 | | +--rw request-vlanid? uint16 349 | | +--rw vlan-tpid? string 350 | | +--rw pw-template? string 351 | | +--ro cw-negotiation? cw-negotiation-type 352 | | +--ro cc? cc-type 353 | | +--ro cv? cv-type 354 | | +--rw pw-oam-policy 355 | | +--rw (detect-type)? 356 | | +--:(undetect) 357 | | +--:(BFD) 358 | | +--rw local-discriminator? int32 359 | | +--rw remote-discriminator? int32 360 | | +--rw tx-interval? int32 361 | | +--rw rx-interval? int32 362 | | +--rw multiplier? int32 363 | +--rw ac* [name] 364 | | +--rw name string 365 | | +--rw qos-input-templates 366 | | | +--rw templates* [template-name] 367 | | | +--rw template-name string 368 | | | +--rw template-type? template-type 369 | | +--rw qos-output-templates 370 | | | +--rw templates* [template-name] 371 | | | +--rw template-name string 372 | | | +--rw template-type? template-type 373 | | +--rw node-role? node-role 374 | | +--rw pipe-type? pipe-mode 375 | | +--rw link-discovery-protocol-type? link-discovery-protocol-type 376 | | +--rw (access-type)? 377 | | | +--:(port) 378 | | | +--:(dot1q) 379 | | | | +--rw dot1q-vlan-bitmap? int32 380 | | | +--:(qinq) 381 | | | +--rw qinq-svlan-bitmap? int32 382 | | | +--rw qinq-cvlan-bitmap? int32 383 | | +--rw (access-action)? 384 | | | +--:(keep) 385 | | | +--:(push) 386 | | | | +--rw push-vlan-id? int32 387 | | | +--:(pop) 388 | | | +--:(swap) 389 | | | +--rw swap-vlan-id? int32 390 | | +--rw service-redundancy 391 | | +--rw primary-pw 392 | | | +--rw nodeid? string 393 | | | +--rw pw-name? string 394 | | +--rw backup-pw 395 | | | +--rw nodeid? string 396 | | | +--rw pw-name? string 397 | | +--rw communicate-unit? int32 398 | | +--rw protect-policy 399 | | +--rw protect-object? enumeration 400 | | +--rw protect-type? enumeration 401 | | +--rw receive-mode? enumeration 402 | | +--rw revertive-type? enumeration 403 | | +--rw wtr? uint8 404 | +--rw service-policy 405 | | +--rw service-type? l2vpn-service-type 406 | | +--rw signaling-type l2vpn-signaling-type 407 | | +--rw type? pw-type 408 | | +--rw pw-template? string 409 | | +--rw network? network-type 410 | | +--rw oam-policy 411 | | +--rw (detect-type)? 412 | | +--:(undetect) 413 | | +--:(BFD) 414 | | +--rw local-discriminator? int32 415 | | +--rw remote-discriminator? int32 416 | | +--rw tx-interval? int32 417 | | +--rw rx-interval? int32 418 | | +--rw multiplier? int32 419 | +--rw tunnel-config 420 | | +--rw tunnel-policy 421 | | +--rw tunnel-signaling-type? tunnel-signaling-type 422 | | +--rw tunnel-mode? tunnel-mode 423 | | +--rw protect-type? protect-type 424 | | +--rw receive-mode? receive-mode 425 | | +--rw (revertive-type)? 426 | | +--:(never) 427 | | +--:(wtr) 428 | | +--rw revert-delay? uint16 429 | +--rw master-mspw-path 430 | | +--rw pw-path* [serialNumber source destination] 431 | | +--rw serialNumber int16 432 | | +--rw source string 433 | | +--rw destination string 434 | | +--rw signaling-type? l2vpn-signaling-type 435 | +--rw slave-mspw-path 436 | +--rw pw-path* [serialNumber source destination] 437 | +--rw serialNumber int16 438 | +--rw source string 439 | +--rw destination string 440 | +--rw signaling-type? l2vpn-signaling-type 442 5.6. Tree Design for ELAN Service YANG Data Model 444 The tree design for VPLS instance is as following: 446 +--rw elan-service 447 +--rw elan-instance* [name] 448 +--rw name string 449 +--rw description? string 450 +--rw mac-withdraw? boolean 451 +--rw bgp-parameters 452 | +--rw route-distinguisher? string 453 | +--rw vpn-targets* [rt-value] 454 | | +--rw rt-value string 455 | | +--rw rt-type bgp-rt-type 456 | +--rw discovery 457 | +--rw vpn-id? string 458 +--rw service-type? l2vpn-service-type 459 +--rw signaling-type l2vpn-signaling-type 460 +--rw pw* [name] 461 | +--rw name string 462 | +--rw asbr-id? string 463 | +--rw node-role? node-role 464 | +--rw peer? inet:ip-address 465 | +--rw vcid? uint32 466 | +--rw type? pw-type 467 | +--rw tunnel-policy? string 468 | +--rw request-vlanid? uint16 469 | +--rw vlan-tpid? string 470 | +--rw pw-template? string 471 | +--ro cw-negotiation? cw-negotiation-type 472 | +--ro cc? cc-type 473 | +--ro cv? cv-type 474 | +--rw pw-oam-policy 475 | | +--rw (detect-type)? 476 | | +--:(undetect) 477 | | +--:(BFD) 478 | | +--rw local-discriminator? int32 479 | | +--rw remote-discriminator? int32 480 | | +--rw tx-interval? int32 481 | | +--rw rx-interval? int32 482 | | +--rw multiplier? int32 483 | +--rw hub-spoken? hub-spoken 484 +--rw ac* [name] 485 | +--rw name string 486 | +--rw qos-input-templates 487 | | +--rw templates* [template-name] 488 | | +--rw template-name string 489 | | +--rw template-type? template-type 490 | +--rw qos-output-templates 491 | | +--rw templates* [template-name] 492 | | +--rw template-name string 493 | | +--rw template-type? template-type 494 | +--rw node-role? node-role 495 | +--rw pipe-type? pipe-mode 496 | +--rw link-discovery-protocol-type? link-discovery-protocol-type 497 | +--rw (access-type)? 498 | | +--:(port) 499 | | +--:(dot1q) 500 | | | +--rw dot1q-vlan-bitmap? int32 501 | | +--:(qinq) 502 | | +--rw qinq-svlan-bitmap? int32 503 | | +--rw qinq-cvlan-bitmap? int32 504 | +--rw (access-action)? 505 | | +--:(keep) 506 | | +--:(push) 507 | | | +--rw push-vlan-id? int32 508 | | +--:(pop) 509 | | +--:(swap) 510 | | +--rw swap-vlan-id? int32 511 | +--rw service-redundancy 512 | | +--rw primary-pw 513 | | | +--rw nodeid? string 514 | | | +--rw pw-name? string 515 | | +--rw backup-pw 516 | | | +--rw nodeid? string 517 | | | +--rw pw-name? string 518 | | +--rw communicate-unit? int32 519 | | +--rw protect-policy 520 | | +--rw protect-object? enumeration 521 | | +--rw protect-type? enumeration 522 | | +--rw receive-mode? enumeration 523 | | +--rw revertive-type? enumeration 524 | | +--rw wtr? uint8 525 | +--rw split-horizon-group? string 526 +--rw split-horizon-group? string 527 +--rw pw-type? pw-type 528 +--rw oam-policy 529 | +--rw (detect-type)? 530 | +--:(undetect) 531 | +--:(BFD) 532 | +--rw local-discriminator? int32 533 | +--rw remote-discriminator? int32 534 | +--rw tx-interval? int32 535 | +--rw rx-interval? int32 536 | +--rw multiplier? int32 537 +--rw tunnel-policy 538 | +--rw tunnel-signaling-type? tunnel-signaling-type 539 | +--rw tunnel-mode? tunnel-mode 540 | +--rw protect-type? protect-type 541 | +--rw receive-mode? receive-mode 542 | +--rw (revertive-type)? 543 | +--:(never) 544 | +--:(wtr) 545 | +--rw revert-delay? uint16 546 +--rw master-mspw-path 547 | +--rw pw-path* [serialNumber source destination] 548 | +--rw serialNumber int16 549 | +--rw source string 550 | +--rw destination string 551 | +--rw signaling-type? l2vpn-signaling-type 552 +--rw slave-mspw-path 553 +--rw pw-path* [serialNumber source destination] 554 +--rw serialNumber int16 555 +--rw source string 556 +--rw destination string 557 +--rw signaling-type? l2vpn-signaling-type 559 6. L2VPN Service YANG Data Model 561 file "ietf-mpls-l2vpn-svc@2016-08-03.yang" 562 module ietf-mpls-l2vpn-svc { 563 namespace "urn:ietf:params:xml:ns:yang:ietf-mpls-l2vpn-svc"; 564 prefix "mpls-l2vpn-svc"; 566 import ietf-inet-types 567 { 568 prefix inet; 569 } 571 organization "ietf"; 572 contact "ietf"; 573 description "mpls-l2vpn-svc"; 575 revision "2016-08-03" { 576 description "update the QoS policy templates."; 577 reference "draft-hu-bess-l2vpn-service-yang-0`.txt"; 578 } 580 revision "2016-03-17" { 581 description "Initial revision of mpls-l2vpn-service model."; 582 reference "draft-hu-bess-l2vpn-service-yang-00.txt"; 583 } 585 /* identities */ 587 identity link-discovery-protocol { 588 description "Base identiy from which identities describing link discovery protocols are derived."; 589 } 591 identity lacp { 592 base "link-discovery-protocol"; 593 description "This identity represents LACP"; 594 } 596 identity lldp { 597 base "link-discovery-protocol"; 598 description "This identity represents LLDP"; 599 } 601 identity bpdu { 602 base "link-discovery-protocol"; 603 description "This identity represens BPDU"; 604 } 606 identity cpd { 607 base "link-discovery-protocol"; 608 description "This identity represents CPD"; 609 } 611 identity udld { 612 base "link-discovery-protocol"; 613 description "This identity represens UDLD"; 614 } 616 /* typedefs */ 618 typedef bitmap { 619 type string { 620 pattern '^(((([0-9]+-[0-9]+)|([0-9]+)),){0,}(([0-9]+-[0-9]+)|([0-9]+)){1,' 621 + '1})$'; 622 } 623 description "This typedef provide the capability that user can use it to in" 624 + "put multi-sections parameter and these parameters will be stor" 625 + "ed with bit style. For example,\"1-300,400,450-500\",etc. The" 626 + " format of one section is \"from-to\" or a fixed digit, \"from" 627 + "\" and \"to\" are also a digit and \"to\" must be greater than" 628 + " \"from\", the next section's \"from\" or fixed digit must be 629 " 630 + "greater than the previous's \"to\" or fixed digit. sections ar" 631 + "e concatenated by comma(\",\")."; 632 } 634 typedef qos-dscp-bitmap { 635 type bitmap { 636 pattern '^(((((([1-9][0-9]{0,0})|0|([1-5][0-9]{1,1})|(6[0-2])|63)-(([1-9]' 637 + '[0-9]{0,0})|0|([1-5][0-9]{1,1})|(6[0-2])|63))|(([1-9][0-9]{0,0})' 638 + '|0|([1-5][0-9]{1,1})|(6[0-2])|63)),){0,3}(((([1-9][0-9]{0,0})|0|' 639 + '([1-5][0-9]{1,1})|(6[0-2])|63)-(([1-9][0-9]{0,0})|0|([1-5][0-9]{' 640 + '1,1})|(6[0-2])|63))|(([1-9][0-9]{0,0})|0|([1-5][0-9]{1,1})|(6[0-' 641 + '2])|63)){1,1})$' { 642 description 'Configure DSCP in range mode, support single DSCP value or' 643 + ' range(max num:4;spacing mark:,) in <0-63>.'; 644 } 645 } 646 description 'The definition of QoS dscp in range mode, support single DSCP 647 ' 648 + 'value or range(max num:4;spacing mark:,) in <0-63>. For exampl' 649 + 'e,"6,10-30,40,50-60",etc.'; 650 } 652 typedef vni-bitmap { 653 type string ; 654 description 'The definition of vni in range mode, support single vni' 655 + 'value or range(max num:4;spacing mark:,) in <1-16777215>. For exampl' 656 + 'e,"6,10-30,40,50-60",etc.'; 657 } 659 typedef qos-prec-bitmap { 660 type bitmap { 661 pattern '^(((([0-7]-[0-7])|[0-7]),){0,3}(([0-7]-[0-7])|([0-7])){1,1})$' { 662 description 'Configure IP-Precedence in range mode, support single prec' 663 + 'edence value or range(max num:4;spacing mark:,) in <0-7>.'; 664 } 665 } 666 description 'The definition of QoS IP-Precedence in range mode, support sin' 667 + 'gle precedence value or range(max num:4;spacing mark:,) in <0-' 668 + '7>. For example,"0,4-7",etc.'; 669 } 671 typedef qos-mpls-bitmap { 672 type bitmap { 673 pattern '^(((([0-7]-[0-7])|[0-7]),){0,3}(([0-7]-[0-7])|([0-7])){1,1})$' { 674 description 'Configure MPLS-EXP in range mode, support single MPLS-EXP ' 675 + 'value or range(max num:4;spacing mark:,) in <0-7>.'; 676 } 677 } 678 description 'The definition of QoS MPLS-EXP in range mode, support single 679 M' 680 + 'PLS-EXP value or range(max num:4;spacing mark:,) in <0-7>. For' 681 + ' example,"0,3-5,7",etc.'; 682 } 684 typedef qos-vlan-bitmap { 685 type bitmap { 686 pattern '^(((((([1-9][0-9]{1,2})|([2-9][0-9]{0,0})|1|([1-3][0-9]{3,3})|(4' 687 + '0[0-8][0-9]{1,1})|(409[0-3])|4094)-(([1-9][0-9]{1,2})|([2-9][0-9' 688 + ']{0,0})|1|([1-3][0-9]{3,3})|(40[0-8][0-9]{1,1})|(409[0-3])|4094)' 689 + ')|(([1-9][0-9]{1,2})|([2-9][0-9]{0,0})|1|([1-3][0-9]{3,3})|(40[0' 690 + '-8][0-9]{1,1})|(409[0-3])|4094)),){0,3}(((([1-9][0-9]{1,2})|([2-' 691 + '9][0-9]{0,0})|1|([1-3][0-9]{3,3})|(40[0-8][0-9]{1,1})|(409[0-3])' 692 + '|4094)-(([1-9][0-9]{1,2})|([2-9][0-9]{0,0})|1|([1-3][0-9]{3,3})|' 693 + '(40[0-8][0-9]{1,1})|(409[0-3])|4094))|(([1-9][0-9]{1,2})|([2-9][' 694 + '0-9]{0,0})|1|([1-3][0-9]{3,3})|(40[0-8][0-9]{1,1})|(409[0-3])|40' 695 + '94)){1,1})$' 696 { 697 description 'Configure VLAN in range mode, support single VLAN value or' 698 + ' range(max num:4;spacing mark:,) in <1-4094>.'; 699 } 700 } 701 description 'The definition of QoS VLAN in range mode, support single VLAN ' 702 + 'value or range(max num:4;spacing mark:,) in <1-4094>. For exam' 703 + 'ple,"1-300,400,450-500",etc.'; 704 } 706 typedef qos-8021p-bitmap { 707 type bitmap { 708 pattern '^(((([0-7]-[0-7])|[0-7]),){0,3}(([0-7]-[0-7])|([0-7])){1,1})$' 709 { 710 description 'Configure 802.1p in range mode, support single 802.1p valu' 711 + 'e or range(max num:4;spacing mark:,) in <0-7>.'; 712 } 713 } 714 description 'The definition of QoS 802.1p in range mode, support single 802' 715 + '.1p value or range(max num:4;spacing mark:,) in <0-7>. For exa' 716 + 'mple,"0,3-5,7",etc.'; 717 } 719 typedef traffic-direction-type { 720 type enumeration { 721 enum input { 722 value 1 ; 723 description "input."; 724 } 725 enum output { 726 value 2 ; 727 description "output."; 728 } 729 } 730 description "traffic direction type"; 731 } 732 typedef template-type { 733 type enumeration { 734 enum car-template { 735 value 1 ; 736 description "car template."; 737 } 738 enum mapping-template { 739 value 2 ; 740 description "mapping template."; 741 } 742 enum queue-template { 743 value 3 ; 744 description "queue template."; 745 } 746 } 747 description "template type"; 748 } 750 typedef l2vpn-service-type { 751 type enumeration { 752 enum ethernet { 753 value 0; 754 description "Ethernet service"; 755 } 756 enum ATM { 757 value 1; 758 description "Asynchronous Transfer Mode"; 759 } 760 enum FR { 761 value 2; 762 description "Frame-Relay"; 763 } 764 enum TDM { 765 value 3; 766 description "Time Division Multiplexing"; 767 } 768 } 769 description "L2VPN service type"; 770 } 772 typedef network-type { 773 type enumeration { 774 enum simple { 775 value 0; 776 description "simple p2p"; 777 } 778 enum simple-protection { 779 value 1; 780 description "p2p with protection"; 781 } 782 enum add-2drop { 783 value 2; 784 description "3AC"; 785 } 786 enum double-inter-connect { 787 value 3; 788 description "DNI-PW 3AC"; 789 } 790 enum l2l3bridge { 791 value 4; 792 description "l2l3bridge"; 793 } 794 } 795 description "L2VPN service type"; 796 } 798 typedef l2vpn-signaling-type { 799 type enumeration { 800 enum static { 801 value 0; 802 description "Static configuration of labels (no signaling)"; 803 } 804 enum ldp { 805 value 1; 806 description "Label Distribution Protocol (LDP) signaling"; 807 } 808 enum bgp { 809 value 2; 810 description "Border Gateway Protocol (BGP) signaling"; 811 } 812 enum mixed { 813 value 3; 814 description "Mixed"; 815 } 816 } 817 description "L2VPN signaling type"; 818 } 820 typedef tunnel-signaling-type { 821 type enumeration { 822 enum static { 823 value 0 ; 824 description "static" ; 825 } 826 enum RSVP-TE { 827 value 1 ; 828 description "RSVP-TE" ; 829 } 830 enum LDP { 831 value 2 ; 832 description "LDP" ; 833 } 834 } 835 description "tunnel signaling type." ; 836 } 838 typedef bgp-rt-type { 839 type enumeration { 840 enum import { 841 value 0; 842 description "For import"; 843 } 844 enum export { 845 value 1; 846 description "For export"; 847 } 848 enum both { 849 value 2; 850 description "For both import and export"; 851 } 852 } 853 description "BGP route-target type. Import from BGP YANG"; 854 } 856 typedef cw-negotiation-type { 857 type enumeration { 858 enum "non-preferred" { 859 value 0; 860 description "No preference for control-word"; 861 } 862 enum "preferred" { 863 value 1; 864 description "Prefer to have control-word negotiation"; 865 } 866 } 867 description "control-word negotiation preference type"; 868 } 870 typedef link-discovery-protocol-type { 871 type identityref { 872 base "link-discovery-protocol"; 873 } 874 description "This type is used to identify link discovery protocol"; 875 } 876 typedef cc-type { 877 type enumeration { 878 enum pw-ach { 879 value 0; 880 description "PWE3 Control Word with 0001b as first nibble (PW-ACH, see [RFC4385])"; 881 } 882 enum alert-label { 883 value 1; 884 description "MPLS Router Alert Label"; 885 } 886 enum ttl { 887 value 2; 888 description "MPLS PW Label with TTL == 1"; 889 } 890 enum ach-alert-ttl { 891 value 3; 892 description "all"; 893 } 894 } 895 description "The defined values for CC(Control Channel) Types for MPLS PWs."; 896 } 898 typedef cv-type { 899 type enumeration { 900 enum BFD-basic-ip { 901 value 0; 902 description "BFD basic ip"; 903 } 904 enum BFD-basic-raw { 905 value 1; 906 description "BFD basic raw "; 907 } 908 enum BFD-signalling-ip { 909 value 2; 910 description "BFD signalling ip"; 911 } 912 enum BFD-signalling-raw { 913 value 3; 914 description "BFD signalling raw"; 915 } 916 } 917 description "The defined values for CV(Connectivity Verification) Types for MPLS PWs"; 918 } 920 typedef pipe-mode{ 921 type enumeration { 922 enum "pipe" { 923 value 0; 924 description "regular pipe mode"; 925 } 926 enum "short-pipe" { 927 value 1; 928 description "short pipe mode"; 929 } 930 enum "uniform" { 931 value 2; 932 description "uniform pipe mode"; 933 } 934 } 935 description " "; 936 } 938 typedef pw-type { 939 type enumeration { 940 enum unknown { 941 value 0 ; 942 description "The PW type is unknown"; 943 } 944 enum dlciOld { 945 value 1 ; 946 description "The PW type is dlciOld"; 947 } 948 enum atmSdu { 949 value 2 ; 950 description "The PW type is atmSdu"; 951 } 952 enum atmCell { 953 value 3 ; 954 description "The PW type is atmCell"; 955 } 956 enum vlan { 957 value 4 ; 958 description "The PW type is vlan"; 959 } 960 enum ethernet { 961 value 5 ; 962 description "The PW type is ethernet"; 963 } 964 enum hdlc { 965 value 6 ; 966 description "The PW type is hdlc"; 967 } 968 enum ppp { 969 value 7 ; 970 description "The PW type is ppp"; 971 } 972 enum sdhCESoM { 973 value 8 ; 974 description "The PW type is sdhCESoM"; 975 } 976 enum atmVCCn { 977 value 9 ; 978 description "The PW type is atmVCCn"; 979 } 980 enum atmVPCn { 981 value 10 ; 982 description "The PW type is atmVPCn"; 983 } 984 enum ipL2 { 985 value 11 ; 986 description "The PW type is ipL2"; 987 } 988 enum atmVCC1 { 989 value 12 ; 990 description "The PW type is atmVCC1"; 991 } 992 enum atmVPC1 { 993 value 13 ; 994 description "The PW type is atmVPC1"; 995 } 996 enum atmPDU { 997 value 14 ; 998 description "The PW type is atmPDU"; 999 } 1000 enum frPort { 1001 value 15 ; 1002 description "The PW type is frPort"; 1003 } 1004 enum sdhCEoP { 1005 value 16 ; 1006 description "The PW type is sdhCEoP"; 1007 } 1008 enum saTopE1 { 1009 value 17 ; 1010 description "The PW type is saTopE1"; 1011 } 1012 enum saTopT1 { 1013 value 18 ; 1014 description "The PW type is saTopT1"; 1015 } 1016 enum saTopE3 { 1017 value 19 ; 1018 description "The PW type is saTopE3"; 1019 } 1020 enum saTopT3 { 1021 value 20 ; 1022 description "The PW type is saTopT3"; 1023 } 1024 enum ceSoPSNB { 1025 value 21 ; 1026 description "The PW type is ceSoPSNB"; 1027 } 1028 enum tdmAAL1 { 1029 value 22 ; 1030 description "The PW type is tdmAAL1"; 1031 } 1032 enum ceSoPSNC { 1033 value 23 ; 1034 description "The PW type is ceSoPSNC"; 1035 } 1036 enum tdmAAL2 { 1037 value 24 ; 1038 description "The PW type is tdmAAL2"; 1039 } 1040 enum dlciNew { 1041 value 25 ; 1042 description "The PW type is dlciNew"; 1043 } 1044 } 1045 description "The PW type of the PW."; 1046 } 1048 typedef node-role{ 1049 type enumeration { 1050 enum "none" { 1051 value 0; 1052 description ""; 1053 } 1054 enum "master" { 1055 value 1; 1056 description ""; 1057 } 1058 enum "slave" { 1059 value 2; 1060 description ""; 1061 } 1062 } 1063 default none; 1064 description "node-role"; 1065 } 1066 typedef protect-type { 1067 type enumeration { 1068 enum unprotected { 1069 value 0 ; 1070 description "unprotected." ; 1071 } 1072 enum 1to1 { 1073 value 1 ; 1074 description "protect type is 1:1"; 1075 } 1076 enum 1plus1 { 1077 value 2 ; 1078 description "protect type is 1+1"; 1079 } 1080 enum dni-pw { 1081 value 3 ; 1082 description "protect type is dni-pw"; 1083 } 1084 enum dni-ac { 1085 value 4 ; 1086 description "protect type is dni-ac"; 1087 } 1089 } 1090 description "define the protect type"; 1091 } 1093 typedef receive-mode { 1094 type enumeration { 1095 enum selective { 1096 value 0 ; 1097 description "receive mode is selective"; 1098 } 1099 enum both { 1100 value 1 ; 1101 description "receive mode is both"; 1102 } 1103 } 1104 description "define the receive mode"; 1105 } 1107 typedef tunnel-mode { 1108 type enumeration { 1109 enum static { 1110 value 2 ; 1111 description "static tunnel" ; 1112 } 1113 enum RSVP-TE { 1114 value 0 ; 1115 description "RSVP-TE" ; 1116 } 1117 enum LDP { 1118 value 1 ; 1119 description "LDP" ; 1120 } 1122 } 1123 description "define the tunnel mode"; 1124 } 1126 typedef hub-spoken { 1127 type enumeration { 1128 enum hub { 1129 value 0 ; 1130 description "the hub role in the network" ; 1131 } 1132 enum spoken { 1133 value 1 ; 1134 description "the spokend role in the network" ; 1135 } 1136 } 1137 description "define the hub spoken type"; 1138 } 1140 grouping match-criteria { 1141 leaf match-relation { 1143 type enumeration { 1144 enum match-all { 1145 value 1 ; 1146 description 'Packets meet all of the match criteria' ; 1147 } 1148 enum match-any { 1149 value 2 ; 1150 description 'Packets meet any of the match criteria' ; 1151 } 1152 } 1153 mandatory true ; 1154 description 'The type of packets matching, see bellow: ' 1155 + ' ' + "\n" 1156 + ' match-all Packets meet all of the match criteria' 1157 + '' + "\n" 1158 + ' match-any Packets meet any of the match criteria'; 1159 } 1160 description "match-criteria"; 1161 } 1163 grouping rule { 1165 container match-elements { 1166 leaf dscp-value { 1167 type qos-dscp-bitmap ; 1168 description 'Configure QoS dscp in range mode, support si' 1169 + 'ngle DSCP value or range(max num:4;spacing m' 1170 + 'ark:,) in <0-63>. For example,"6,10-30,40,50' 1171 + '-60",etc.'; 1172 } 1174 leaf precedence-value { 1176 type qos-prec-bitmap; 1177 description 'Configure QoS IP Precedence in range mode, s' 1178 + 'upport single precedence value or range(max ' 1179 + 'num:4;spacing mark:,) in <0-7>. For example,' 1180 + '"0,2-4,7",etc.'; 1181 } 1183 leaf mpls-exp-value { 1185 type qos-mpls-bitmap ; 1186 description 'Configure QoS MPLS-EXP value in range mode, su' 1187 + 'pport single MPLS-EXP value or range(max num:4' 1188 + ';spacing mark:,) in <0-7>. For example,"0,2-4,' 1189 + '7",etc.'; 1190 } 1192 leaf vni { 1193 type vni-bitmap; 1194 description ""; 1195 } 1197 leaf vlan-value { 1199 type qos-vlan-bitmap; 1200 description 'Configure outer-VLAN value in range mode, supp' 1201 + 'ort single outer-VLAN value or range(max num:4' 1202 + ';spacing mark:,) in <1-4094>. For example,"1,3' 1203 + '00-400,1000,2000-4000",etc.'; 1204 } 1206 leaf out-8021p-value { 1207 type qos-8021p-bitmap ; 1208 description 'Configure out 802.1p value in range mode, su' 1209 + 'pport single 802.1p value or range(max num:4;s' 1210 + 'pacing mark:,) in <0-7>. For example,"0,2-4,7"' 1211 + ',etc.'; 1212 } 1213 description 'Set value as match criteria,no ruls means match all traffic'; 1214 } 1215 description "rule "; 1216 } 1218 grouping set{ 1220 container dscp { 1221 presence 'Select DSCP as mark typ' ; 1222 choice method { 1223 mandatory true ; 1224 case set-value { 1225 leaf dscp-value { 1226 type uint16 { 1227 range 0..63 { 1228 description 'DSCP value, support <0-63>' ; 1229 } 1230 } 1231 mandatory true ; 1232 description 'DSCP value, support <0-63>' ; 1233 } 1234 description 'Set the DSCP value directly' ; 1235 } 1236 description 'Specify the method to set DSCP' ; 1237 } 1238 description 'Select DSCP as mark type' ; 1239 } 1241 container ip-precedence { 1243 presence 'Select precedence as mark type' ; 1244 choice method { 1245 mandatory true ; 1246 case set-value { 1248 leaf prec-value { 1249 type uint16 { 1250 range 0..7 { 1251 description 'IP Precedence value, support <0-7>' ; 1252 } 1253 } 1254 mandatory true ; 1255 description 'IP Precedence value, support <0-7>' ; 1256 } 1257 description 'Set the IP Precedence value directly' ; 1258 } 1259 description 'Specify the method to set IP Precedence' ; 1260 } 1261 description 'Select precedence as mark type' ; 1262 } 1264 container mpls-exp { 1265 presence 'Select MPLS-EXP as mark type' ; 1266 choice method { 1267 mandatory true ; 1268 case set-value { 1270 leaf mpls-exp-value { 1272 type uint16 { 1273 range 0..7 { 1274 description 'MPLS-EXP value, support <0-7>' ; 1275 } 1276 } 1277 mandatory true ; 1278 description 'MPLS-EXP value, support <0-7>' ; 1279 } 1280 description 'Set the MPLS-EXP value directly' ; 1281 } 1282 description 'Specify the method to set MPLS-EXP' ; 1283 } 1284 description 'Select MPLS-EXP as mark type' ; 1285 } 1287 container pbts { 1288 presence 'Select PBTS as mark type'; 1289 leaf pbts-value { 1291 type uint8 { 1292 range 0..7 { 1293 description 'PBTS value, support <0-7>'; 1294 } 1295 } 1296 mandatory true ; 1297 description 'PBTS value, support <0-7>'; 1298 } 1299 description 'Select PBTS as mark type'; 1300 } 1301 description 'Mark a packet'; 1302 } 1303 grouping interface-key { 1304 leaf node { 1305 type string; 1306 description "node name"; 1307 } 1308 leaf interface-name { 1309 type string; 1310 description "interface name"; 1311 } 1312 leaf traffic-direction { 1313 type traffic-direction-type; 1314 description "traffic dirction"; 1315 } 1316 description "interface-key"; 1317 } 1319 grouping car { 1320 leaf cir { 1321 type uint32 { 1322 range 8..400000000 { 1323 description 'The CIR value (default: kilobits per sec' 1324 + 'ond),support <8-400000000>'; 1325 } 1326 } 1327 mandatory true ; 1328 description 'Configure the CIR(Committed Information Rate' 1329 + ') value (kilobits per second)'; 1330 } 1331 leaf cbs { 1333 type uint32 { 1334 range 15000..2000000000 { 1335 description 'The CBS(Committed Burst Size) size (defa' 1336 + 'ult: byte), support <15000-2000000000>' 1337 ; 1338 } 1339 } 1340 mandatory true ; 1341 description 'Configure the CBS(Committed Burst Size) size' 1342 + ' (default: byte)'; 1343 } 1344 leaf pir { 1345 type uint32 { 1346 range 8..400000000 { 1347 description 'The PIR value,pir must >= cir, (default: kilobits per sec' 1348 + 'ond),support <8-400000000>'; 1349 } 1350 } 1351 mandatory true ; 1352 description 'Configure the PIR(Committed Information Rate' 1353 + ') value (kilobits per second)'; 1355 } 1356 leaf pbs { 1358 type uint32 { 1359 range 15000..2000000000 { 1360 description 'The PBS(Peak Burst Size) size (default: byte), support <15000-2000000000>' 1361 ; 1362 } 1363 } 1364 mandatory true ; 1365 description 'Configure the PBS(Peak Burst Size) size (d' 1366 + 'efault: byte)'; 1367 } 1368 description 'set car parameter' ; 1369 } 1371 grouping schedule-policy { 1372 choice method { 1373 case wfq { 1374 leaf percentage { 1375 type uint16 { 1376 range 1..100 { 1377 description 'The exact bandwidth percentage, support ' 1378 + '<1-100>'; 1379 } 1380 } 1381 mandatory true; 1382 description 'Set the exact bandwidth percentage, support ' 1383 + '<1-100>'; 1384 } 1385 } 1386 case pq { 1387 leaf priority-value { 1388 type uint16 { 1389 range 1..4 { 1390 description 'The priority level of PQ, support <1-4>'; 1391 } 1392 } 1393 mandatory true; 1394 description 'Set the priority level of PQ, support <1-4>'; 1395 } 1396 } 1397 description 'Specify the method to set schedule-policy' ; 1398 } 1399 description 'set schedule-policy,support PQ or WFQ or PQ+WFQ' ; 1400 } 1402 grouping car-template { 1403 leaf car-template-name { 1404 type string; 1405 description "car template name."; 1406 } 1407 list policy-map { 1408 key "policy-map-name"; 1409 leaf policy-map-name { 1410 type string; 1411 description "policy map name"; 1412 } 1413 container class-policy { 1414 uses match-criteria; 1415 uses rule; 1416 description "class policy."; 1417 } 1418 container action { 1419 uses car; 1420 description "action."; 1421 } 1422 description "policy map list"; 1423 } 1424 description "car template"; 1425 } 1427 grouping queue-schedule-template { 1428 leaf queue-schedule-template-name { 1429 type string; 1430 description "name"; 1431 } 1432 list policy-map { 1433 key "policy-map-name"; 1434 leaf policy-map-name { 1435 type string; 1436 description "policy map name"; 1437 } 1438 container class-policy { 1439 uses match-criteria; 1440 uses rule; 1441 description "class policy"; 1442 } 1443 container action { 1444 uses schedule-policy; 1445 description "action"; 1446 } 1448 description "policy map list"; 1449 } 1451 description "queue-schedule-template"; 1452 } 1454 grouping mapping-template { 1455 leaf mapping-template-name { 1456 type string; 1457 description "mapping template name."; 1458 } 1459 list policy-map { 1460 key "policy-map-name"; 1461 leaf policy-map-name { 1462 type string; 1463 description "policy map name"; 1464 } 1465 container class-policy { 1466 uses match-criteria; 1467 uses rule; 1468 description "class policy."; 1469 } 1470 container action { 1471 uses set; 1472 description "action."; 1473 } 1474 description "policy map"; 1475 } 1476 description "mapping template"; 1477 } 1479 grouping template{ 1480 list templates { 1481 key "template-name"; 1482 leaf template-name { 1483 type string; 1484 description "template name"; 1485 } 1486 leaf template-type { 1487 type template-type; 1488 description "template type"; 1489 } 1490 description "template list"; 1491 } 1492 description "template"; 1493 } 1494 grouping oam-policy{ 1495 choice detect-type { 1496 case undetect { 1497 description "unprotected." ; 1498 } 1499 case BFD { 1500 description "bfd." ; 1501 leaf local-discriminator { 1502 type int32; 1503 description "local-discriminator" ; 1504 } 1505 leaf remote-discriminator { 1506 type int32; 1507 description "remote-discriminator" ; 1508 } 1509 leaf tx-interval { 1510 type int32; 1511 description "tx-interval" ; 1512 } 1513 leaf rx-interval { 1514 type int32; 1515 description "rx-interval" ; 1516 } 1517 leaf multiplier { 1518 type int32; 1519 description "detect-interval" ; 1520 } 1521 } 1522 description "OAM type"; 1523 } 1524 description "oam type" ; 1525 } 1527 grouping pw-template{ 1528 description "pw-template"; 1529 leaf name { 1530 type string; 1531 description "name"; 1532 } 1534 leaf cw-negotiation { 1535 type cw-negotiation-type; 1536 default "preferred"; 1537 description "control-word negotiation preference"; 1538 } 1540 leaf cc { 1541 type cc-type; 1542 description "Control Channel Types"; 1543 } 1544 leaf cv { 1545 type cv-type; 1546 description "Connectivity Verification Types"; 1547 } 1548 } 1550 grouping pseudowire{ 1551 description "pseudowire"; 1552 leaf name { 1553 type string; 1554 description "pseudowire name"; 1555 } 1557 leaf asbr-id { 1558 type string; 1559 description "asbr name for the cross domain lsp"; 1560 } 1562 leaf node-role{ 1563 type node-role; 1564 description "node role."; 1565 } 1567 leaf peer { 1568 type inet:ip-address; 1569 description "pw peer address, use IPv4"; 1570 } 1572 leaf vcid { 1573 type uint32; 1574 description "pseudo-wire vcid"; 1575 } 1577 leaf type { 1578 type pw-type; 1579 description "pseudo-wire type"; 1580 } 1582 leaf tunnel-policy { 1583 type string; 1584 description "Used to override the tunnel policy name specified in the pseduowire template"; 1585 } 1587 leaf request-vlanid { 1588 type uint16; 1589 description "request vlanid"; 1590 } 1591 leaf vlan-tpid { 1592 type string; 1593 description "vlan tpid"; 1594 } 1596 leaf pw-template { 1597 type string; 1598 description "pw templet name"; 1599 } 1601 leaf cw-negotiation { 1602 type cw-negotiation-type; 1603 default "preferred"; 1604 config false; 1605 description "control-word negotiation preference"; 1606 } 1608 leaf cc { 1609 type cc-type; 1610 config false; 1611 description "Control Channel Types"; 1612 } 1614 leaf cv { 1615 type cv-type; 1616 config false; 1617 description "Connectivity Verification Types"; 1618 } 1620 container pw-oam-policy{ 1622 uses oam-policy; 1623 description "pw-oam-policy"; 1624 } 1626 } 1628 grouping attachment-circuit{ 1629 description "attachment circuit"; 1630 leaf name { 1631 type string; 1632 description "name"; 1633 } 1635 container qos-input-templates{ 1636 uses template; 1637 description "qos templates."; 1638 } 1639 container qos-output-templates{ 1640 uses template; 1641 description "qos templates. "; 1642 } 1643 leaf node-role{ 1644 type node-role; 1645 description "node role."; 1646 } 1648 leaf pipe-type{ 1649 type pipe-mode; 1650 description "pipe mode. Can update."; 1651 } 1653 leaf link-discovery-protocol-type{ 1654 type link-discovery-protocol-type; 1655 description "link discovery protocol"; 1656 } 1658 choice access-type{ 1659 description "access-type"; 1660 case port{ 1661 description "port."; 1662 } 1664 case dot1q { 1665 description "Dot1Q"; 1666 leaf dot1q-vlan-bitmap { 1667 type int32 { 1668 range "1..4094"; 1669 } 1670 description "Dot1Q Vlan Bitmap." ; 1671 } 1672 } 1674 case qinq { 1675 description "QinQ"; 1676 leaf qinq-svlan-bitmap { 1677 type int32 { 1678 range "1..4094"; 1679 } 1680 description "QinQ svlan Bitmap." ; 1681 } 1683 leaf qinq-cvlan-bitmap { 1684 type int32 { 1685 range "1..4094"; 1686 } 1687 description "QinQ cvlan Bitmap." ; 1688 } 1689 } 1690 } 1692 choice access-action { 1693 description "access type." ; 1694 case keep { 1695 description "keep." ; 1696 } 1697 case push { 1698 description "push." ; 1699 leaf push-vlan-id { 1700 type int32 { 1701 range "1..4094"; 1702 } 1703 description "action vlan id." ; 1704 } 1705 } 1706 case pop { 1707 description "pop." ; 1708 } 1709 case swap { 1710 description "swap." ; 1711 leaf swap-vlan-id { 1712 type int32 { 1713 range "1..4094"; 1714 } 1715 description "action vlan id." ; 1716 } 1717 } 1718 } 1719 container service-redundancy { 1720 uses redundancy-policy; 1721 description "service redundancy"; 1722 } 1723 } 1725 grouping protect-policy-grp { 1726 leaf protect-type { 1727 type protect-type; 1728 description "protection-type"; 1729 } 1731 leaf receive-mode { 1732 type receive-mode; 1733 description "receive-mode"; 1734 } 1736 choice revertive-type { 1737 description "revertive-type"; 1738 case never { 1739 description "never type"; 1740 } 1741 case wtr { 1742 leaf revert-delay { 1743 type uint16; 1744 description "the revertive type is wtr"; 1745 } 1746 } 1747 } 1749 description "define the group of protect-policy."; 1750 } 1752 grouping redundancy-policy{ 1753 container primary-pw{ 1754 description "primary options"; 1755 leaf nodeid{ 1756 type string; 1757 description "The nodeid of the policy."; 1758 } 1760 leaf pw-name { 1761 type string; 1762 description "Reference a pseudowire"; 1763 } 1764 } 1766 container backup-pw { 1767 description "backup options"; 1768 leaf nodeid{ 1769 type string; 1770 description "The nodeid of the policy."; 1771 } 1773 leaf pw-name { 1774 type string; 1775 description "Reference a pseudowire"; 1776 } 1777 } 1779 leaf communicate-unit{ 1780 type int32; 1781 description "communicate id for dni-pw"; 1782 } 1783 container protect-policy{ 1784 description "protect-policy"; 1785 leaf protect-object{ 1786 type enumeration { 1787 enum ac-policy { 1788 value 0; 1789 description "ac-policy for dni-pw"; 1790 } 1791 enum pw-policy { 1792 value 1; 1793 description "pw-policy for master-slave pw"; 1794 } 1795 } 1796 description "protect object"; 1797 } 1798 uses protect-policy; 1799 } 1800 description "redundancy-policy"; 1801 } 1803 grouping protect-policy { 1804 leaf protect-type { 1806 type enumeration { 1807 enum unprotected { 1808 value 0; 1809 description "unprotected." ; 1810 } 1811 enum 1to1 { 1812 value 1; 1813 description "1to1 protection." ; 1814 } 1815 enum 1plus1 { 1816 value 2; 1817 description "1plus1 protection." ; 1818 } 1819 enum loadbalance { 1820 value 3; 1821 description "loadbalance for ac protection." ; 1822 } 1823 } 1824 description "protection type" ; 1825 } 1827 leaf receive-mode { 1828 type enumeration { 1829 enum selective { 1830 value 0 ; 1831 description "selective." ; 1832 } 1833 enum both { 1834 value 1 ; 1835 description "both." ; 1836 } 1837 } 1838 description "receive mode" ; 1839 } 1841 leaf revertive-type { 1842 type enumeration { 1843 enum no-revertive { 1844 value 0 ; 1845 description "unprotected." ; 1846 } 1847 enum revertive { 1848 value 1 ; 1849 description "protection." ; 1850 } 1851 } 1852 description "revertive mode. Can update." ; 1853 } 1855 leaf wtr { 1856 type uint8 { 1857 range "0..12"; 1858 } 1859 default 5; 1860 description "WTR.unit:m. Can update." ; 1861 } 1862 description "protect policy"; 1863 } 1865 grouping vpws-service-policy-grp { 1866 leaf service-type { 1867 type l2vpn-service-type; 1868 default ethernet; 1869 description "eline service type"; 1870 } 1872 leaf signaling-type { 1873 type l2vpn-signaling-type; 1874 mandatory true; 1875 description "eline signaling type"; 1876 } 1878 leaf type { 1879 type pw-type; 1880 description "pseudo-wire type"; 1881 } 1883 leaf pw-template { 1884 type string; 1885 description "pw templet name"; 1886 } 1888 leaf network { 1889 type network-type; 1890 description "network-type"; 1891 } 1893 container oam-policy{ 1894 uses oam-policy; 1895 description "bfd param"; 1896 } 1897 description "vpws service policy group"; 1898 } 1900 grouping vpls-service-policy-grp { 1901 leaf split-horizon-group { 1902 type string; 1903 description "split horizon group for the vpls instance"; 1904 } 1906 leaf pw-type { 1907 type pw-type; 1908 description "the pseudowires type"; 1909 } 1911 container oam-policy{ 1912 uses oam-policy; 1913 description "bfd param"; 1914 } 1915 description "vpls service policy group"; 1916 } 1918 grouping tunnel-policy-grp { 1919 container tunnel-policy { 1920 leaf tunnel-signaling-type { 1921 type tunnel-signaling-type; 1922 description "signaling-type"; 1923 } 1924 leaf tunnel-mode { 1925 type tunnel-mode; 1926 description "tunnel-mode"; 1928 } 1929 uses protect-policy-grp; 1930 description "tunnel policy"; 1931 } 1932 description "tunnel policy group"; 1933 } 1935 grouping mspw-path{ 1936 list pw-path{ 1937 key "serialNumber source destination"; 1939 leaf serialNumber { 1940 type int16; 1941 description "serial number of link." ; 1942 } 1944 leaf source{ 1945 type string; 1946 description "the source node id "; 1947 } 1949 leaf destination{ 1950 type string; 1951 description "the destination node id "; 1952 } 1954 leaf signaling-type { 1955 type l2vpn-signaling-type; 1956 description "eline signaling type"; 1957 } 1959 description "pw path."; 1960 } 1961 description "multi-segment pw path"; 1962 } 1964 container l2vpn { 1965 description "l2vpn"; 1966 container common { 1967 container pw-templates { 1968 description "pw-templates"; 1969 list pw-template { 1970 key "name"; 1971 uses pw-template; 1972 description "pw-templates"; 1973 } 1974 } 1976 container qos-policy-templates { 1977 list mapping-policy { 1978 uses mapping-template; 1979 key 'mapping-template-name'; 1980 list binding-interface { 1981 key "node interface-name traffic-direction"; 1982 uses interface-key; 1983 description "binding-interface list."; 1984 } 1985 description "mapping policy list."; 1986 } 1988 list car-policy { 1989 uses car-template; 1990 key 'car-template-name'; 1991 list binding-interface { 1992 key "node interface-name traffic-direction"; 1993 uses interface-key; 1994 description "binding-interface list."; 1995 } 1996 description "car policy list."; 1997 } 1999 list queue-schedule-policy { 2000 uses queue-schedule-template; 2001 key 'queue-schedule-template-name'; 2002 list binding-interface { 2003 key "node interface-name traffic-direction"; 2004 uses interface-key; 2005 description "binding-interface list."; 2006 } 2007 description "queue schedule policy list."; 2008 } 2010 description "qos policy template"; 2011 } 2013 description "common l2pn attributes"; 2014 } 2016 container eline-service { 2017 description "configure elan-instances"; 2018 list elan-instance { 2019 key "name"; 2020 leaf name { 2021 type string; 2022 description "the name of a eline service instance"; 2023 } 2025 leaf description { 2026 type string; 2027 description "Description of the eline service instance"; 2028 } 2030 list pw{ 2031 key "name"; 2032 uses pseudowire; 2033 description "pseudowires"; 2034 } 2036 list ac{ 2037 key "name"; 2038 uses attachment-circuit; 2039 description "attachment-circuit"; 2040 } 2042 container service-policy{ 2043 uses vpws-service-policy-grp; 2044 description "The service-policy of the eline."; 2045 } 2047 container tunnel-config{ 2048 uses tunnel-policy-grp; 2049 description "The tunnel-policy of the eline."; 2050 } 2052 container master-mspw-path{ 2053 description "master mspw path."; 2054 uses mspw-path; 2055 } 2057 container slave-mspw-path{ 2058 description "slave mspw path."; 2059 uses mspw-path; 2060 } 2062 description "vpws service instance list"; 2064 } 2065 } 2067 container elan-service { 2068 description "configure elan-instances"; 2069 list elan-instance { 2070 key "name"; 2071 leaf name { 2072 type string; 2073 description "the name of a elan service instance"; 2074 } 2076 leaf description { 2077 type string; 2078 description "Description of the elan service instance"; 2079 } 2081 leaf mac-withdraw { 2082 type boolean; 2083 description "Withdraw MAC"; 2084 } 2086 container bgp-parameters { 2087 leaf route-distinguisher { 2088 type string; 2089 description "BGP RD"; 2090 } 2092 list vpn-targets { 2093 key rt-value; 2094 description "Route Targets"; 2096 leaf rt-value { 2097 type string; 2098 description "Route-Target value"; 2099 } 2101 leaf rt-type { 2102 type bgp-rt-type; 2103 mandatory true; 2104 description "Type of RT"; 2105 } 2106 } 2108 container discovery { 2109 description "BGP parameters for discovery"; 2110 leaf vpn-id { 2111 type string; 2112 description "VPN ID"; 2113 } 2114 } 2115 description "Parameters for BGP"; 2116 } 2118 leaf service-type { 2119 type l2vpn-service-type; 2120 default ethernet; 2121 description "vpls service type"; 2122 } 2124 leaf signaling-type { 2125 type l2vpn-signaling-type; 2126 mandatory true; 2127 description "vpls signaling type"; 2128 } 2130 list pw{ 2131 key "name"; 2132 uses pseudowire; 2133 leaf hub-spoken { 2134 type hub-spoken; 2135 description "hub-spoken role"; 2136 } 2137 description "pseudowires"; 2138 } 2140 list ac{ 2141 key "name"; 2142 uses attachment-circuit; 2143 leaf split-horizon-group { 2144 type string; 2145 description "split horizon group for the vpls instance"; 2146 } 2147 description "attachment-circuit"; 2149 } 2151 container service-policy{ 2152 uses vpls-service-policy-grp; 2153 description "The service-policy of the elan."; 2154 } 2156 container tunnel-config{ 2157 uses tunnel-policy-grp; 2158 description "The tunnel-policy of the elan."; 2159 } 2161 container master-mspw-path{ 2162 description "master mspw path."; 2163 uses mspw-path; 2164 } 2166 container slave-mspw-path{ 2167 description "slave mspw path."; 2168 uses mspw-path; 2169 } 2171 description "vpls service instance list"; 2172 } 2173 } 2174 } 2175 } 2176 2178 7. Security Considerations 2180 8. Acknowledgements 2182 9. IANA Considerations 2184 This document requires no IANA Actions. Please remove this section 2185 before RFC publication. 2187 10. Normative References 2189 [I-D.shah-bess-l2vpn-yang] 2190 Shah, H., Brissette, P., Rahman, R., Raza, K., Li, Z., 2191 Zhuang, S., Wang, H., Chen, I., Ahmed, S., Bocci, M., 2192 Hardwick, J., Esale, S., Tiruveedhula, K., 2193 tsingh@juniper.net, t., Hussain, I., Wen, B., Walker, J., 2194 Delregno, N., Jalil, L., and M. Joecylyn, "YANG Data Model 2195 for MPLS-based L2VPN", draft-shah-bess-l2vpn-yang-01 (work 2196 in progress), March 2016. 2198 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2199 the Network Configuration Protocol (NETCONF)", RFC 6020, 2200 DOI 10.17487/RFC6020, October 2010, 2201 . 2203 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 2204 and A. Bierman, Ed., "Network Configuration Protocol 2205 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 2206 . 2208 Authors' Addresses 2209 Fangwei Hu 2210 ZTE Corporation 2211 No.889 Bibo Rd 2212 Shanghai 201203 2213 China 2215 Phone: +86 21 68896273 2216 Email: hu.fangwei@zte.com.cn 2218 Ran Chen 2219 ZTE Corporation 2220 No.50 Software Avenue,Yuhuatai District 2221 Nanjing, Jiangsu Province 210012 2222 China 2224 Phone: +86 025 88014636 2225 Email: chen.ran@zte.com.cn 2227 Jie Yao 2228 ZTE Corporation 2229 Zijinghua Rd. Yuhuatai District 2230 Nanjing, Jiangsu Province 210012 2231 China 2233 Email: yao.jie@zte.com.cn 2235 Cao Chang 2236 Chinaunicom 2237 Beijing 2238 China 2240 Email: caochang@chinaunicom.cn