idnits 2.17.1 draft-asechoud-rtgwg-qos-model-11.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: ---------------------------------------------------------------------------- == It seems as if not all pages are separated by form feeds - found 0 form feeds but 89 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 205 has weird spacing: '...cal-not boo...' == Line 227 has weird spacing: '...cal-not boo...' == Line 229 has weird spacing: '...on-type ide...' == Line 332 has weird spacing: '...cy-type ide...' == Line 333 has weird spacing: '...cy-name str...' == (28 more instances...) -- The document date (Sep 20, 2019) is 1674 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC8342' is defined on line 2727, but no explicit reference was found in the text == Unused Reference: 'RFC8340' is defined on line 2743, but no explicit reference was found in the text ** Downref: Normative reference to an Informational RFC: RFC 2697 ** Downref: Normative reference to an Informational RFC: RFC 2698 Summary: 2 errors (**), 0 flaws (~~), 10 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Choudhary 3 Internet-Draft M. Jethanandani 4 Intended status: Standards Track Cisco Systems 5 Expires: March 23, 2020 N. Strahle 6 E. Aries 7 Juniper Networks 8 I. Chen 9 Jabil 10 Sep 20, 2019 12 YANG Model for QoS 13 draft-asechoud-rtgwg-qos-model-11 15 Abstract 17 This document describes a YANG model for Quality of Service (QoS) 18 configuration and operational parameters. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on March 23, 2020. 37 Copyright Notice 39 Copyright (c) 2019 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 56 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 57 3. QoS Model Design . . . . . . . . . . . . . . . . . . . . . . 3 58 4. DiffServ Model Design . . . . . . . . . . . . . . . . . . . . 4 59 5. Modules Tree Structure . . . . . . . . . . . . . . . . . . . 4 60 6. Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 61 6.1. IETF-QOS-CLASSIFIER . . . . . . . . . . . . . . . . . . . 14 62 6.2. IETF-QOS-POLICY . . . . . . . . . . . . . . . . . . . . . 17 63 6.3. IETF-QOS-ACTION . . . . . . . . . . . . . . . . . . . . . 20 64 6.4. IETF-QOS-TARGET . . . . . . . . . . . . . . . . . . . . . 38 65 6.5. IETF-DIFFSERV . . . . . . . . . . . . . . . . . . . . . . 40 66 6.6. IETF-QUEUE-POLICY . . . . . . . . . . . . . . . . . . . . 50 67 6.7. IETF-SCHEDULER-POLICY . . . . . . . . . . . . . . . . . . 53 68 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 56 69 8. Security Considerations . . . . . . . . . . . . . . . . . . . 57 70 9. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 57 71 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 57 72 10.1. Normative References . . . . . . . . . . . . . . . . . . 57 73 10.2. Informative References . . . . . . . . . . . . . . . . . 58 74 Appendix A. Company A, Company B and Company C examples . . . . 58 75 A.1. Example of Company A Diffserv Model . . . . . . . . . . . 58 76 A.2. Example of Company B Diffserv Model . . . . . . . . . . . 68 77 A.3. Example of Company C Diffserv Model . . . . . . . . . . . 82 78 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 88 80 1. Introduction 82 This document defines a base YANG [RFC6020] [RFC7950] data module for 83 Quality of Service (QoS) configuration parameters. Differentiated 84 Services (DiffServ) module is an augmentation of the base QoS model. 85 Remote Procedure Calls (RPC) or notification definition is not part 86 of this document. QoS base modules define a basic building blocks to 87 define a classifier, policy, action and target. The base modules 88 have been augmented to include packet match fields and action 89 parameters to define the DiffServ module. Queues and schedulers are 90 stitched as part of diffserv policy itself or separate modules are 91 defined for creating Queue policy and Scheduling policy. The 92 DiffServ model is based on DiffServ architecture, and various 93 references have been made to available standard architecture 94 documents. 96 DiffServ is a preferred approach for network service providers to 97 offer services to different customers based on their network Quality- 98 of-Service (QoS) objectives. The traffic streams are differentiated 99 based on DiffServ Code Points (DSCP) carried in the IP header of each 100 packet. The DSCP markings are applied by upstream node or by the 101 edge router on entry to the DiffServ network. 103 Editorial Note: (To be removed by RFC Editor) 105 This draft contains several placeholder values that need to be 106 replaced with finalized values at the time of publication. Please 107 apply the following replacements: o "XXXX" --> the assigned RFC value 108 for this draft both in this draft and in the YANG models under the 109 revision statement. o The "revision" date in model, in the format 110 XXXX-XX-XX, needs to be updated with the date the draft gets 111 approved. 113 The YANG modules in this document conform to the Network Management 114 Datastore Architecture (NMDA) [RFC8342 [RFC8342]]. 116 1.1. Tree Diagrams 118 Tree diagrams used in this document follow the notation defined in 119 [RFC8340 [RFC8340]] 121 2. Terminology 123 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 124 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 125 "OPTIONAL" in this document are to be interpreted as described in BCP 126 14 [RFC2119] [RFC8174] when, and only when, they appear in all 127 capitals, as shown here. 129 3. QoS Model Design 131 A classifier consists of packets which may be grouped when a logical 132 set of rules are applied on different packet header fields. The 133 grouping may be based on different values or range of values of same 134 packet header field, presence or absence of some values or range of 135 values of a packet field or a combination thereof. The QoS 136 classifier is defined in the ietf-qos-classifier module. 138 A classifier entry contains one or more packet conditioning 139 functions. A packet conditioning function is typically based on 140 direction of traffic and may drop, mark or delay network packets. A 141 set of classifier entries with corresponding conditioning functions 142 when arranged in order of priority represents a QoS policy. A QoS 143 policy may contain one or more classifier entries. These are defined 144 in ietf-qos-policy module. 146 Actions are configured in line with respect to the policy module. 147 These include marking, dropping or shaping. Actions are defined in 148 the ietf-qos-action module. 150 A meter qualifies if the traffic arrival rate is based on agreed upon 151 rate and variability. A meter is modeled based on commonly used 152 alogrithms in industry, Single Rate Tri Color Marking (srTCM) 153 [RFC2697] meter, Two Rate Tri Color Marking (trTCM) [RFC2698] meter, 154 and Single Rate Two Color Marking meter. Different vendors can 155 extend it with other types of meters as well. 157 4. DiffServ Model Design 159 DiffServ architecture [RFC3289] and [RFC2475] describe the 160 architecture as a simple model where traffic entering a network is 161 classified and possibly conditioned at the boundary of the network 162 and assigned a different Behavior Aggregate (BA). Each BA is 163 identified by a specific value of DSCP, and is used to select a Per 164 Hop Behavior (PHB). 166 The packet classification policy identifies the subset of traffic 167 which may receive a DiffServ by being conditioned or mapped. Packet 168 classifiers select packets within a stream based on the content of 169 some portion of the packet header. There are two types of 170 classifiers, the BA classifier, and the Multi-Field (MF) classifier 171 which selects packets based on a value which is combination of one or 172 more header fields. In the ietf-diffserv module, this is realized by 173 augmenting the QoS classification module. 175 Traffic conditioning includes metering, shaping and/or marking. A 176 meter is used to measure the traffic against a given traffic profile. 177 The traffic profile specifies the temporal property of the traffic. 178 A packet that arrives is first determined to be in or out of the 179 profile, which will result in the action of marked, dropped or 180 shaped. This is realized in vendor specific modules based on the 181 parameters defined in action module. The metering parameters are 182 augmented to the QoS policy module when metering is defined inline, 183 and to the metering template when metering profile is referred in 184 policy module. 186 5. Modules Tree Structure 188 This document defines seven YANG modules - four QoS base modules, a 189 scheduler policy module, a queuing policy module and one DiffServ 190 module. 192 ietf-qos-classifier consists of classifier entries identified by a 193 classifier entry name. Each entry MAY contain a list of filter 194 entries. When no filter entry is present in a classifier entry, it 195 matches all traffic. 197 module: ietf-qos-classifier 198 +--rw classifiers 199 +--rw classifier-entry* [classifier-entry-name] 200 +--rw classifier-entry-name string 201 +--rw classifier-entry-descr? string 202 +--rw classifier-entry-filter-operation? identityref 203 +--rw filter-entry* [filter-type filter-logical-not] 204 +--rw filter-type identityref 205 +--rw filter-logical-not boolean 207 An ietf-qos-policy module contains list of policy objects identified 208 by a policy name and policy type which MUST be provided. With 209 different values of policy types, each vendor MAY define their own 210 construct of policy for different QoS functionalities. Each vendor 211 MAY augment classifier entry in a policy definition with a set of 212 actions. 214 module: ietf-qos-policy 215 +--rw policies 216 +--rw policy-entry* [policy-name policy-type] 217 +--rw policy-name string 218 +--rw policy-type identityref 219 +--rw policy-descr? string 220 +--rw classifier-entry* [classifier-entry-name] 221 +--rw classifier-entry-name string 222 +--rw classifier-entry-inline? boolean 223 +--rw classifier-entry-filter-oper? identityref 224 +--rw filter-entry* [filter-type filter-logical-not] 225 {policy-inline-classifier-config}? 226 | +--rw filter-type identityref 227 | +--rw filter-logical-not boolean 228 +--rw classifier-action-entry-cfg* [action-type] 229 +--rw action-type identityref 230 +--rw (action-cfg-params)? 232 ietf-qos-action module contains grouping of set of QoS actions. 233 These include metering, marking, dropping and shaping. Marking sets 234 DiffServ codepoint value in the classified packet. Color-aware and 235 Color-blind meters are augmented by vendor specific modules based on 236 the parameters defined in action module. 238 module: ietf-qos-action 239 +--rw meter-template 240 +--rw meter-entry* [meter-name] {meter-template-support}? 241 +--rw meter-name string 242 +--rw (meter-type)? 243 +--:(one-rate-two-color-meter-type) 244 | +--rw one-rate-two-color-meter 245 | +--rw committed-rate-value? uint64 246 | +--rw committed-rate-unit? identityref 247 | +--rw committed-burst-value? uint64 248 | +--rw committed-burst-unit? identityref 249 | +--rw conform-action 250 | | +--rw conform-2color-meter-action-params* 251 [conform-2color-meter-action-type] 252 | | +--rw conform-2color-meter-action-type 253 identityref 254 | | +--rw (conform-2color-meter-action-val)? 255 | +--rw exceed-action 256 | +--rw exceed-2color-meter-action-params* 257 [exceed-2color-meter-action-type] 258 | +--rw exceed-2color-meter-action-type 259 identityref 260 | +--rw (exceed-2color-meter-action-val)? 261 +--:(one-rate-tri-color-meter-type) 262 | +--rw one-rate-tri-color-meter 263 | +--rw committed-rate-value? uint64 264 | +--rw committed-rate-unit? identityref 265 | +--rw committed-burst-value? uint64 266 | +--rw committed-burst-unit? identityref 267 | +--rw excess-burst-value? uint64 268 | +--rw excess-burst-unit? identityref 269 | +--rw conform-action 270 | | +--rw conform-3color-meter-action-params* 271 [conform-3color-meter-action-type] 272 | | +--rw conform-3color-meter-action-type 273 identityref 274 | | +--rw (conform-3color-meter-action-val)? 275 | +--rw exceed-action 276 | | +--rw exceed-3color-meter-action-params* 277 [exceed-3color-meter-action-type] 278 | | +--rw exceed-3color-meter-action-type 279 identityref 280 | | +--rw (exceed-3color-meter-action-val)? 281 | +--rw violate-action 282 | +--rw violate-3color-meter-action-params* 283 [violate-3color-meter-action-type] 284 | +--rw violate-3color-meter-action-type 285 identityref 287 | +--rw (violate-3color-meter-action-val)? 288 +--:(two-rate-tri-color-meter-type) 289 +--rw two-rate-tri-color-meter 290 +--rw committed-rate-value? uint64 291 +--rw committed-rate-unit? identityref 292 +--rw committed-burst-value? uint64 293 +--rw committed-burst-unit? identityref 294 +--rw peak-rate-value? uint64 295 +--rw peak-rate-unit? identityref 296 +--rw peak-burst-value? uint64 297 +--rw peak-burst-unit? identityref 298 +--rw conform-action 299 | +--rw conform-3color-meter-action-params* 300 [conform-3color-meter-action-type] 301 | +--rw conform-3color-meter-action-type 302 identityref 303 | +--rw (conform-3color-meter-action-val)? 304 +--rw exceed-action 305 | +--rw exceed-3color-meter-action-params* 306 [exceed-3color-meter-action-type] 307 | +--rw exceed-3color-meter-action-type 308 identityref 309 | +--rw (exceed-3color-meter-action-val)? 310 +--rw violate-action 311 +--rw violate-3color-meter-action-params* 312 [violate-3color-meter-action-type] 313 +--rw violate-3color-meter-action-type 314 identityref 315 +--rw (violate-3color-meter-action-val)? 317 ietf-qos-target module contains reference of qos-policy and augments 318 ietf-interfaces [RFC8343] module. A single policy of a particular 319 policy-type can be applied on an interface in each direction of 320 traffic. Policy-type is of type identity and is populated in a 321 vendor specific manner. This way it provides greater flexibility for 322 each vendor to define different policy types each with its own 323 capabilities and restrictions. 325 Classifier, metering and queuing counters are associated with a 326 target. 328 module: ietf-qos-target 329 augment /if:interfaces/if:interface: 330 +--rw qos-target-entry* [direction policy-type] 331 +--rw direction identityref 332 +--rw policy-type identityref 333 +--rw policy-name string 335 Diffserv module augments QoS classifier module. Many of the YANG 336 types defined in [RFC6991] are represented as leafs in the classifier 337 module. 339 Metering and marking actions are realized by augmenting the QoS 340 policy-module. Any queuing, AQM and scheduling actions are part of 341 vendor specific augmentation. Statistics are realized by augmenting 342 the QoS target module. 344 module: ietf-diffserv 345 augment /classifier:classifiers/classifier:classifier-entry + 346 /classifier:filter-entry: 347 +--rw (filter-param)? 348 +--:(dscp) 349 | +--rw dscp-cfg* [dscp-min dscp-max] 350 | +--rw dscp-min inet:dscp 351 | +--rw dscp-max inet:dscp 352 +--:(source-ipv4-address) 353 | +--rw source-ipv4-address-cfg* [source-ipv4-addr] 354 | +--rw source-ipv4-addr inet:ipv4-prefix 355 +--:(destination-ipv4-address) 356 | +--rw destination-ipv4-address-cfg* [destination-ipv4-addr] 357 | +--rw destination-ipv4-addr inet:ipv4-prefix 358 +--:(source-ipv6-address) 359 | +--rw source-ipv6-address-cfg* [source-ipv6-addr] 360 | +--rw source-ipv6-addr inet:ipv6-prefix 361 +--:(destination-ipv6-address) 362 | +--rw destination-ipv6-address-cfg* [destination-ipv6-addr] 363 | +--rw destination-ipv6-addr inet:ipv6-prefix 364 +--:(source-port) 365 | +--rw source-port-cfg* [source-port-min source-port-max] 366 | +--rw source-port-min inet:port-number 367 | +--rw source-port-max inet:port-number 368 +--:(destination-port) 369 | +--rw destination-port-cfg* 370 [destination-port-min destination-port-max] 371 | +--rw destination-port-min inet:port-number 372 | +--rw destination-port-max inet:port-number 373 +--:(protocol) 374 | +--rw protocol-cfg* [protocol-min protocol-max] 375 | +--rw protocol-min uint8 376 | +--rw protocol-max uint8 377 +--:(traffic-group) 378 +--rw traffic-group-cfg 379 +--rw traffic-group-name? string 380 augment /policy:policies/policy:policy-entry + 381 /policy:classifier-entry/policy:filter-entry: 382 +--rw (filter-params)? 383 +--:(dscp) 384 | +--rw dscp-cfg* [dscp-min dscp-max] 385 | +--rw dscp-min inet:dscp 386 | +--rw dscp-max inet:dscp 387 +--:(source-ipv4-address) 388 | +--rw source-ipv4-address-cfg* [source-ipv4-addr] 389 | +--rw source-ipv4-addr inet:ipv4-prefix 390 +--:(destination-ipv4-address) 391 | +--rw destination-ipv4-address-cfg* [destination-ipv4-addr] 392 | +--rw destination-ipv4-addr inet:ipv4-prefix 393 +--:(source-ipv6-address) 394 | +--rw source-ipv6-address-cfg* [source-ipv6-addr] 395 | +--rw source-ipv6-addr inet:ipv6-prefix 396 +--:(destination-ipv6-address) 397 | +--rw destination-ipv6-address-cfg* [destination-ipv6-addr] 398 | +--rw destination-ipv6-addr inet:ipv6-prefix 399 +--:(source-port) 400 | +--rw source-port-cfg* [source-port-min source-port-max] 401 | +--rw source-port-min inet:port-number 402 | +--rw source-port-max inet:port-number 403 +--:(destination-port) 404 | +--rw destination-port-cfg* 405 [destination-port-min destination-port-max] 406 | +--rw destination-port-min inet:port-number 407 | +--rw destination-port-max inet:port-number 408 +--:(protocol) 409 | +--rw protocol-cfg* [protocol-min protocol-max] 410 | +--rw protocol-min uint8 411 | +--rw protocol-max uint8 412 +--:(traffic-group) 413 +--rw traffic-group-cfg 414 +--rw traffic-group-name? string 415 augment /policy:policies/policy:policy-entry + 416 /policy:classifier-entry + 417 /policy:classifier-action-entry-cfg + 418 /policy:action-cfg-params: 419 +--:(dscp-marking) 420 | +--rw dscp-cfg 421 | +--rw dscp? inet:dscp 422 +--:(meter-inline) {action:meter-inline-feature}? 423 | +--rw (meter-type)? 424 | +--:(one-rate-two-color-meter-type) 425 | | +--rw one-rate-two-color-meter 426 | | +--rw committed-rate-value? uint64 427 | | +--rw committed-rate-unit? identityref 428 | | +--rw committed-burst-value? uint64 429 | | +--rw committed-burst-unit? identityref 430 | | +--rw conform-action 431 | | | +--rw conform-2color-meter-action-params* 432 [conform-2color-meter-action-type] 433 | | | +--rw conform-2color-meter-action-type 434 identityref 435 | | | +--rw (conform-2color-meter-action-val)? 436 | | +--rw exceed-action 437 | | +--rw exceed-2color-meter-action-params* 438 [exceed-2color-meter-action-type] 439 | | +--rw exceed-2color-meter-action-type 440 identityref 441 | | +--rw (exceed-2color-meter-action-val)? 442 | +--:(one-rate-tri-color-meter-type) 443 | | +--rw one-rate-tri-color-meter 444 | | +--rw committed-rate-value? uint64 445 | | +--rw committed-rate-unit? identityref 446 | | +--rw committed-burst-value? uint64 447 | | +--rw committed-burst-unit? identityref 448 | | +--rw excess-burst-value? uint64 449 | | +--rw excess-burst-unit? identityref 450 | | +--rw conform-action 451 | | | +--rw conform-3color-meter-action-params* 452 [conform-3color-meter-action-type] 453 | | | +--rw conform-3color-meter-action-type 454 identityref 455 | | | +--rw (conform-3color-meter-action-val)? 456 | | +--rw exceed-action 457 | | | +--rw exceed-3color-meter-action-params* 458 [exceed-3color-meter-action-type] 459 | | | +--rw exceed-3color-meter-action-type 460 identityref 461 | | | +--rw (exceed-3color-meter-action-val)? 462 | | +--rw violate-action 463 | | +--rw violate-3color-meter-action-params* 464 [violate-3color-meter-action-type] 465 | | +--rw violate-3color-meter-action-type 466 identityref 467 | | +--rw (violate-3color-meter-action-val)? 468 | +--:(two-rate-tri-color-meter-type) 469 | +--rw two-rate-tri-color-meter 470 | +--rw committed-rate-value? uint64 471 | +--rw committed-rate-unit? identityref 472 | +--rw committed-burst-value? uint64 473 | +--rw committed-burst-unit? identityref 474 | +--rw peak-rate-value? uint64 475 | +--rw peak-rate-unit? identityref 476 | +--rw peak-burst-value? uint64 477 | +--rw peak-burst-unit? identityref 478 | +--rw conform-action 479 | | +--rw conform-3color-meter-action-params* 480 [conform-3color-meter-action-type] 481 | | +--rw conform-3color-meter-action-type 482 identityref 483 | | +--rw (conform-3color-meter-action-val)? 484 | +--rw exceed-action 485 | | +--rw exceed-3color-meter-action-params* 486 [exceed-3color-meter-action-type] 487 | | +--rw exceed-3color-meter-action-type 488 identityref 489 | | +--rw (exceed-3color-meter-action-val)? 490 | +--rw violate-action 491 | +--rw violate-3color-meter-action-params* 492 [violate-3color-meter-action-type] 493 | +--rw violate-3color-meter-action-type 494 identityref 495 | +--rw (violate-3color-meter-action-val)? 496 +--:(meter-reference) {action:meter-reference-feature}? 497 | +--rw meter-reference-cfg 498 | +--rw meter-reference-name string 499 | +--rw meter-type identityref 500 +--:(traffic-group-marking) {action:traffic-group-feature}? 501 | +--rw traffic-group-cfg 502 | +--rw traffic-group? string 503 +--:(child-policy) {action:child-policy-feature}? 504 | +--rw child-policy-cfg {child-policy-feature}? 505 | +--rw policy-name? string 506 +--:(count) {action:count-feature}? 507 | +--rw count-cfg {count-feature}? 508 | +--rw count-action? empty 509 +--:(named-count) {action:named-counter-feature}? 510 | +--rw named-counter-cfg {named-counter-feature}? 511 | +--rw count-name-action? string 512 +--:(queue-inline) {diffserv-queue-inline-support}? 513 | +--rw queue-cfg 514 | +--rw priority-cfg 515 | | +--rw priority-level? uint8 516 | +--rw min-rate-cfg 517 | | +--rw rate-value? uint64 518 | | +--rw rate-unit? identityref 519 | +--rw max-rate-cfg 520 | | +--rw rate-value? uint64 521 | | +--rw rate-unit? identityref 522 | | +--rw burst-value? uint64 523 | | +--rw burst-unit? identityref 524 | +--rw algorithmic-drop-cfg 525 | +--rw (drop-algorithm)? 526 | +--:(tail-drop) 527 | +--rw tail-drop-cfg 528 | +--rw tail-drop-alg? empty 529 +--:(scheduler-inline) {diffserv-scheduler-inline-support}? 530 +--rw scheduler-cfg 531 +--rw min-rate-cfg 532 | +--rw rate-value? uint64 533 | +--rw rate-unit? identityref 534 +--rw max-rate-cfg 535 +--rw rate-value? uint64 536 +--rw rate-unit? identityref 537 +--rw burst-value? uint64 538 +--rw burst-unit? identityref 540 module: ietf-queue-policy 541 +--rw queue-template {queue-policy-support}? 542 +--rw name? string 543 +--rw queue-cfg 544 +--rw priority-cfg 545 | +--rw priority-level? uint8 546 +--rw min-rate-cfg 547 | +--rw rate-value? uint64 548 | +--rw rate-unit? identityref 549 +--rw max-rate-cfg 550 | +--rw rate-value? uint64 551 | +--rw rate-unit? identityref 552 | +--rw burst-value? uint64 553 | +--rw burst-unit? identityref 554 +--rw algorithmic-drop-cfg 555 +--rw (drop-algorithm)? 556 +--:(tail-drop) 557 +--rw tail-drop-cfg 558 +--rw tail-drop-alg? empty 559 augment /policy:policies/policy:policy-entry + 560 /policy:classifier-entry/policy:filter-entry: 561 +--rw (filter-params)? {queue-policy-support}? 562 +--:(traffic-group-name) 563 +--rw traffic-group-reference-cfg 564 +--rw traffic-group-name string 565 augment /policy:policies/policy:policy-entry + 566 /policy:classifier-entry + 567 /policy:classifier-action-entry-cfg + 568 /policy:action-cfg-params: 569 +--:(queue-template-name) 570 {queue-template-support,queue-policy-support}? 571 | +--rw queue-template-reference-cfg 572 | +--rw queue-template-name string 573 +--:(queue-inline) 574 {queue-inline-support,queue-policy-support}? 576 +--rw queue-cfg 577 +--rw priority-cfg 578 | +--rw priority-level? uint8 579 +--rw min-rate-cfg 580 | +--rw rate-value? uint64 581 | +--rw rate-unit? identityref 582 +--rw max-rate-cfg 583 | +--rw rate-value? uint64 584 | +--rw rate-unit? identityref 585 | +--rw burst-value? uint64 586 | +--rw burst-unit? identityref 587 +--rw algorithmic-drop-cfg 588 +--rw (drop-algorithm)? 589 +--:(tail-drop) 590 +--rw tail-drop-cfg 591 +--rw tail-drop-alg? empty 593 module: ietf-scheduler-policy 594 augment /policy:policies/policy:policy-entry + 595 /policy:classifier-entry/policy:filter-entry: 596 +--rw (filter-params)? 597 +--:(filter-match-all) 598 +--rw match-all-cfg 599 +--rw match-all-action? empty 600 augment /policy:policies/policy:policy-entry + 601 /policy:classifier-entry + 602 /policy:classifier-action-entry-cfg + 603 /policy:action-cfg-params: 604 +--:(scheduler) 605 | +--rw scheduler-cfg 606 | +--rw min-rate-cfg 607 | | +--rw rate-value? uint64 608 | | +--rw rate-unit? identityref 609 | +--rw max-rate-cfg 610 | +--rw rate-value? uint64 611 | +--rw rate-unit? identityref 612 | +--rw burst-value? uint64 613 | +--rw burst-unit? identityref 614 +--:(queue-policy-name) 615 +--rw queue-policy-name 616 +--rw queue-policy string 618 6. Modules 619 6.1. IETF-QOS-CLASSIFIER 621 file "ietf-qos-classifier@2019-03-13.yang" 622 module ietf-qos-classifier { 623 yang-version 1.1; 624 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-classifier"; 625 prefix classifier; 627 organization 628 "IETF RTG (Routing Area) Working Group"; 629 contact 630 "WG Web: 631 WG List: 632 WG Chair: Chris Bowers 633 634 WG Chair: Jeff Tantsura 635 636 Editor: Aseem Choudhary 637 638 Editor: Mahesh Jethanandani 639 640 Editor: Norm Strahle 641 "; 642 description 643 "This module contains a collection of YANG definitions for 644 configuring qos specification implementations. 645 Copyright (c) 2019 IETF Trust and the persons identified as 646 authors of the code. All rights reserved. 647 Redistribution and use in source and binary forms, with or 648 without modification, is permitted pursuant to, and subject 649 to the license terms contained in, the Simplified BSD License 650 set forth in Section 4.c of the IETF Trust's Legal Provisions 651 Relating to IETF Documents 652 (http://trustee.ietf.org/license-info). 653 This version of this YANG module is part of RFC XXXX; see 654 the RFC itself for full legal notices."; 656 revision 2019-03-13 { 657 description 658 "Latest revision of qos base classifier module"; 659 reference "RFC XXXX: YANG Model for QoS"; 660 } 662 feature policy-inline-classifier-config { 663 description 664 " This feature allows classifier configuration 665 directly under policy."; 666 } 667 feature classifier-template-feature { 668 description 669 " This feature allows classifier as template configuration 670 in a policy."; 671 } 673 feature match-any-filter-type-support { 674 description 675 " This feature allows classifier configuration 676 directly under policy."; 677 } 679 identity filter-type { 680 description 681 "This is identity of base filter-type"; 682 } 684 identity classifier-entry-filter-operation-type { 685 description 686 "Classifier entry filter logical operation"; 687 } 689 identity match-all-filter { 690 base classifier-entry-filter-operation-type; 691 description 692 "Classifier entry filter logical AND operation"; 693 } 695 identity match-any-filter { 696 base classifier-entry-filter-operation-type; 697 if-feature "match-any-filter-type-support"; 698 description 699 "Classifier entry filter logical OR operation"; 700 } 702 grouping filters { 703 description 704 "Filters types in a Classifier entry"; 705 leaf filter-type { 706 type identityref { 707 base filter-type; 708 } 709 description 710 "This leaf defines type of the filter"; 711 } 712 leaf filter-logical-not { 713 type boolean; 714 description 715 " 716 This is logical-not operator for a filter. When true, it 717 indicates filter looks for absence of a pattern defined 718 by the filter 719 "; 720 } 721 } 723 grouping classifier-entry-generic-attr { 724 description 725 " 726 Classifier generic attributes like name, 727 description, operation type 728 "; 729 leaf classifier-entry-name { 730 type string; 731 description 732 "classifier entry name"; 733 } 734 leaf classifier-entry-descr { 735 type string; 736 description 737 "classifier entry description statement"; 738 } 739 leaf classifier-entry-filter-operation { 740 type identityref { 741 base classifier-entry-filter-operation-type; 742 } 743 default "match-all-filter"; 744 description 745 "Filters are applicable as match-any or match-all filters"; 746 } 747 } 749 grouping classifier-entry-inline-attr { 750 description 751 "attributes of inline classifier in a policy"; 752 leaf classifier-entry-inline { 753 type boolean; 754 default "false"; 755 description 756 "Indication of inline classifier entry"; 757 } 758 leaf classifier-entry-filter-oper { 759 type identityref { 760 base classifier-entry-filter-operation-type; 761 } 762 default "match-all-filter"; 763 description 764 "Filters are applicable as match-any or match-all filters"; 765 } 766 list filter-entry { 767 if-feature "policy-inline-classifier-config"; 768 must " ../classifier-entry-inline = 'true' " { 769 description 770 "For inline filter configuration, inline attributemust 771 be true"; 772 } 773 key "filter-type filter-logical-not"; 774 uses filters; 775 description 776 "Filters configured inline in a policy"; 777 } 778 } 780 container classifiers { 781 if-feature "classifier-template-feature"; 782 description 783 "list of classifier entry"; 784 list classifier-entry { 785 key "classifier-entry-name"; 786 description 787 "each classifier entry contains a list of filters"; 788 uses classifier-entry-generic-attr; 789 list filter-entry { 790 key "filter-type filter-logical-not"; 791 uses filters; 792 description 793 "Filter entry configuration"; 794 } 795 } 796 } 797 } 798 800 6.2. IETF-QOS-POLICY 802 file "ietf-qos-policy@2019-03-13.yang" 803 module ietf-qos-policy { 804 yang-version 1.1; 805 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-policy"; 806 prefix policy; 807 import ietf-qos-classifier { 808 prefix classifier; 809 reference "RFC XXXX: YANG Model for QoS"; 810 } 811 organization "IETF RTG (Routing Area) Working Group"; 812 contact 813 "WG Web: 814 WG List: 815 WG Chair: Chris Bowers 816 817 WG Chair: Jeff Tantsura 818 819 Editor: Aseem Choudhary 820 821 Editor: Mahesh Jethanandani 822 823 Editor: Norm Strahle 824 "; 825 description 826 "This module contains a collection of YANG definitions for 827 configuring qos specification implementations. 828 Copyright (c) 2019 IETF Trust and the persons identified as 829 authors of the code. All rights reserved. 830 Redistribution and use in source and binary forms, with or 831 without modification, is permitted pursuant to, and subject 832 to the license terms contained in, the Simplified BSD License 833 set forth in Section 4.c of the IETF Trust's Legal Provisions 834 Relating to IETF Documents 835 (http://trustee.ietf.org/license-info). 836 This version of this YANG module is part of RFC XXXX; see 837 the RFC itself for full legal notices."; 838 revision 2019-03-13 { 839 description 840 "Latest revision of qos policy"; 841 reference "RFC XXXX: YANG Model for QoS"; 842 } 843 identity policy-type { 844 description 845 "This base identity type defines policy-types"; 846 } 847 grouping policy-generic-attr { 848 description 849 "Policy Attributes"; 850 leaf policy-name { 851 type string; 852 description 853 "policy name"; 854 } 855 leaf policy-type { 856 type identityref { 857 base policy-type; 858 } 859 description 860 "policy type"; 861 } 862 leaf policy-descr { 863 type string; 864 description 865 "policy description"; 866 } 867 } 868 identity action-type { 869 description 870 "This base identity type defines action-types"; 871 } 872 grouping classifier-action-entry-cfg { 873 description 874 "List of Configuration of classifier & associated actions"; 875 list classifier-action-entry-cfg { 876 key "action-type"; 877 ordered-by user; 878 description 879 "Configuration of classifier & associated actions"; 880 leaf action-type { 881 type identityref { 882 base action-type; 883 } 884 description 885 "This defines action type "; 886 } 887 choice action-cfg-params { 888 description 889 "Choice of action types"; 890 } 891 } 892 } 893 container policies { 894 description 895 "list of policy templates"; 896 list policy-entry { 897 key "policy-name policy-type"; 898 description 899 "policy template"; 900 uses policy-generic-attr; 901 list classifier-entry { 902 key "classifier-entry-name"; 903 ordered-by user; 904 description 905 "Classifier entry configuration in a policy"; 906 leaf classifier-entry-name { 907 type string; 908 description 909 "classifier entry name"; 910 } 911 uses classifier:classifier-entry-inline-attr; 912 uses classifier-action-entry-cfg; 913 } 914 } 915 } 916 } 917 919 6.3. IETF-QOS-ACTION 921 file "ietf-qos-action@2019-03-13.yang" 922 module ietf-qos-action { 923 yang-version 1.1; 924 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-action"; 925 prefix action; 926 import ietf-inet-types { 927 prefix inet; 928 reference "RFC 6991: Common YANG Data Types"; 929 } 930 import ietf-qos-policy { 931 prefix policy; 932 reference "RFC XXXX: YANG Model for QoS"; 933 } 934 organization "IETF RTG (Routing Area) Working Group"; 935 contact 936 "WG Web: 937 WG List: 938 WG Chair: Chris Bowers 939 940 WG Chair: Jeff Tantsura 941 942 Editor: Aseem Choudhary 943 944 Editor: Mahesh Jethanandani 945 946 Editor: Norm Strahle 947 "; 948 description 949 "This module contains a collection of YANG definitions for 950 configuring qos specification implementations. 951 Copyright (c) 2019 IETF Trust and the persons identified as 952 authors of the code. All rights reserved. 953 Redistribution and use in source and binary forms, with or 954 without modification, is permitted pursuant to, and subject 955 to the license terms contained in, the Simplified BSD License 956 set forth in Section 4.c of the IETF Trust's Legal Provisions 957 Relating to IETF Documents 958 (http://trustee.ietf.org/license-info). 959 This version of this YANG module is part of RFC XXXX; see 960 the RFC itself for full legal notices."; 961 revision 2019-03-13 { 962 description 963 "Latest revision for qos actions"; 964 reference "RFC XXXX: YANG Model for QoS"; 965 } 966 feature meter-template-support { 967 description 968 " This feature allows support of meter-template."; 969 } 970 feature meter-inline-feature { 971 description 972 "This feature allows support of meter-inline configuration."; 973 } 974 feature meter-reference-feature { 975 description 976 "This feature allows support of meter by reference 977 configuration."; 978 } 979 feature queue-action-support { 980 description 981 " This feature allows support of queue action configuration 982 in policy."; 983 } 984 feature scheduler-action-support { 985 description 986 " This feature allows support of scheduler configuration 987 in policy."; 988 } 989 feature child-policy-feature { 990 description 991 " This feature allows configuration of hierarchical policy."; 992 } 993 feature count-feature { 994 description 995 "This feature allows action configuration to enable 996 counter in a classifier"; 997 } 998 feature named-counter-feature { 999 description 1000 "This feature allows action configuration to enable 1001 named counter in a classifier"; 1002 } 1003 feature traffic-group-feature { 1004 description 1005 "traffic-group action support"; 1006 } 1007 feature burst-time-unit-support { 1008 description 1009 "This feature allows burst unit to be configured as 1010 time duration."; 1011 } 1013 identity rate-unit-type { 1014 description 1015 "base rate-unit type"; 1016 } 1017 identity bits-per-second { 1018 base rate-unit-type; 1019 description 1020 "bits per second identity"; 1021 } 1022 identity kilo-bits-per-second { 1023 base rate-unit-type; 1024 description 1025 "kilo bits per second identity"; 1026 } 1027 identity mega-bits-per-second { 1028 base rate-unit-type; 1029 description 1030 "mega bits per second identity"; 1031 } 1032 identity giga-bits-per-second { 1033 base rate-unit-type; 1034 description 1035 "mega bits per second identity"; 1036 } 1037 identity percent { 1038 base rate-unit-type; 1039 description 1040 "percentage"; 1041 } 1042 identity burst-unit-type { 1043 description 1044 "base burst-unit type"; 1045 } 1046 identity bytes { 1047 base burst-unit-type; 1048 description 1049 "bytes"; 1050 } 1051 identity kilo-bytes { 1052 base burst-unit-type; 1053 description 1054 "kilo bytes"; 1055 } 1056 identity mega-bytes { 1057 base burst-unit-type; 1058 description 1059 "mega bytes"; 1060 } 1061 identity millisecond { 1062 base burst-unit-type; 1063 if-feature burst-time-unit-support; 1064 description 1065 "milli seconds"; 1066 } 1067 identity microsecond { 1068 base burst-unit-type; 1069 if-feature burst-time-unit-support; 1070 description 1071 "micro seconds"; 1072 } 1073 identity dscp-marking { 1074 base policy:action-type; 1075 description 1076 "dscp marking action type"; 1077 } 1078 identity meter-inline { 1079 base policy:action-type; 1080 if-feature meter-inline-feature; 1081 description 1082 "meter-inline action type"; 1083 } 1084 identity meter-reference { 1085 base policy:action-type; 1086 if-feature meter-reference-feature; 1087 description 1088 "meter reference action type"; 1089 } 1090 identity queue { 1091 base policy:action-type; 1092 if-feature queue-action-support; 1093 description 1094 "queue action type"; 1095 } 1096 identity scheduler { 1097 base policy:action-type; 1098 if-feature scheduler-action-support; 1099 description 1100 "scheduler action type"; 1101 } 1102 identity discard { 1103 base policy:action-type; 1104 description 1105 "discard action type"; 1106 } 1107 identity child-policy { 1108 base policy:action-type; 1109 if-feature child-policy-feature; 1110 description 1111 "child-policy action type"; 1112 } 1113 identity count { 1114 base policy:action-type; 1115 if-feature count-feature; 1116 description 1117 "count action type"; 1118 } 1119 identity named-counter { 1120 base policy:action-type; 1121 if-feature named-counter-feature; 1122 description 1123 "name counter action type"; 1124 } 1126 identity meter-type { 1127 description 1128 "This base identity type defines meter types"; 1129 } 1130 identity one-rate-two-color-meter-type { 1131 base meter-type; 1132 description 1133 "one rate two color meter type"; 1134 } 1135 identity one-rate-tri-color-meter-type { 1136 base meter-type; 1137 description 1138 "one rate three color meter type"; 1139 reference 1140 "RFC2697: A Single Rate Three Color Marker"; 1141 } 1142 identity two-rate-tri-color-meter-type { 1143 base meter-type; 1144 description 1145 "two rate three color meter action type"; 1146 reference 1147 "RFC2698: A Two Rate Three Color Marker"; 1148 } 1150 identity drop-type { 1151 description 1152 "drop algorithm"; 1153 } 1154 identity tail-drop { 1155 base drop-type; 1156 description 1157 "tail drop algorithm"; 1158 } 1160 identity conform-2color-meter-action-type { 1161 description 1162 "action type in a meter"; 1163 } 1164 identity exceed-2color-meter-action-type { 1165 description 1166 "action type in a meter"; 1167 } 1168 identity conform-3color-meter-action-type { 1169 description 1170 "action type in a meter"; 1171 } 1172 identity exceed-3color-meter-action-type { 1173 description 1174 "action type in a meter"; 1175 } 1176 identity violate-3color-meter-action-type { 1177 description 1178 "action type in a meter"; 1179 } 1181 grouping rate-value-unit { 1182 leaf rate-value { 1183 type uint64; 1184 description 1185 "rate value"; 1186 } 1187 leaf rate-unit { 1188 type identityref { 1189 base rate-unit-type; 1190 } 1191 description 1192 "rate unit"; 1193 } 1194 description 1195 "rate value and unit grouping"; 1196 } 1197 grouping burst { 1198 description 1199 "burst value and unit configuration"; 1200 leaf burst-value { 1201 type uint64; 1202 description 1203 "burst value"; 1204 } 1205 leaf burst-unit { 1206 type identityref { 1207 base burst-unit-type; 1208 } 1209 description 1210 "burst unit"; 1211 } 1212 } 1214 grouping threshold { 1215 description 1216 "Threshold Parameters"; 1217 container threshold { 1218 description 1219 "threshold"; 1220 choice threshold-type { 1221 case size { 1222 leaf threshold-size { 1223 type uint64; 1224 units "bytes"; 1225 description 1226 "Threshold size"; 1227 } 1228 } 1229 case interval { 1230 leaf threshold-interval { 1231 type uint64; 1232 units "microsecond"; 1233 description 1234 "Threshold interval"; 1235 } 1236 } 1237 description 1238 "Choice of threshold type"; 1239 } 1240 } 1241 } 1242 grouping drop { 1243 container drop-cfg { 1244 leaf drop-action { 1245 type empty; 1246 description 1247 "always drop algorithm"; 1248 } 1249 description 1250 "the drop action"; 1251 } 1252 description 1253 "always drop grouping"; 1254 } 1256 grouping queuelimit { 1257 container qlimit-thresh { 1258 uses threshold; 1259 description 1260 "the queue limit"; 1261 } 1262 description 1263 "the queue limit beyond which queue will not hold any packet"; 1264 } 1266 grouping conform-2color-meter-action-params { 1267 description 1268 "meter action parameters"; 1269 list conform-2color-meter-action-params { 1270 key "conform-2color-meter-action-type"; 1271 ordered-by user; 1272 description 1273 "Configuration of basic-meter & associated actions"; 1274 leaf conform-2color-meter-action-type { 1275 type identityref { 1276 base conform-2color-meter-action-type; 1277 } 1278 description 1279 "meter action type"; 1280 } 1281 choice conform-2color-meter-action-val { 1282 description 1283 " meter action based on choice of meter action type"; 1284 } 1285 } 1286 } 1288 grouping exceed-2color-meter-action-params { 1289 description 1290 "meter action parameters"; 1291 list exceed-2color-meter-action-params { 1292 key "exceed-2color-meter-action-type"; 1293 ordered-by user; 1294 description 1295 "Configuration of basic-meter & associated actions"; 1296 leaf exceed-2color-meter-action-type { 1297 type identityref { 1298 base exceed-2color-meter-action-type; 1299 } 1300 description 1301 "meter action type"; 1302 } 1303 choice exceed-2color-meter-action-val { 1304 description 1305 " meter action based on choice of meter action type"; 1306 } 1307 } 1308 } 1310 grouping conform-3color-meter-action-params { 1311 description 1312 "meter action parameters"; 1313 list conform-3color-meter-action-params { 1314 key "conform-3color-meter-action-type"; 1315 ordered-by user; 1316 description 1317 "Configuration of basic-meter & associated actions"; 1318 leaf conform-3color-meter-action-type { 1319 type identityref { 1320 base conform-3color-meter-action-type; 1321 } 1322 description 1323 "meter action type"; 1324 } 1325 choice conform-3color-meter-action-val { 1326 description 1327 " meter action based on choice of meter action type"; 1328 } 1329 } 1330 } 1332 grouping exceed-3color-meter-action-params { 1333 description 1334 "meter action parameters"; 1335 list exceed-3color-meter-action-params { 1336 key "exceed-3color-meter-action-type"; 1337 ordered-by user; 1338 description 1339 "Configuration of basic-meter & associated actions"; 1340 leaf exceed-3color-meter-action-type { 1341 type identityref { 1342 base exceed-3color-meter-action-type; 1343 } 1344 description 1345 "meter action type"; 1346 } 1347 choice exceed-3color-meter-action-val { 1348 description 1349 " meter action based on choice of meter action type"; 1350 } 1351 } 1352 } 1354 grouping violate-3color-meter-action-params { 1355 description 1356 "meter action parameters"; 1357 list violate-3color-meter-action-params { 1358 key "violate-3color-meter-action-type"; 1359 ordered-by user; 1360 description 1361 "Configuration of basic-meter & associated actions"; 1362 leaf violate-3color-meter-action-type { 1363 type identityref { 1364 base violate-3color-meter-action-type; 1365 } 1366 description 1367 "meter action type"; 1368 } 1369 choice violate-3color-meter-action-val { 1370 description 1371 " meter action based on choice of meter action type"; 1372 } 1373 } 1374 } 1376 grouping one-rate-two-color-meter { 1377 container one-rate-two-color-meter { 1378 description 1379 "single rate two color marker meter"; 1380 leaf committed-rate-value { 1381 type uint64; 1382 description 1383 "committed rate value"; 1384 } 1385 leaf committed-rate-unit { 1386 type identityref { 1387 base rate-unit-type; 1388 } 1389 description 1390 "committed rate unit"; 1391 } 1392 leaf committed-burst-value { 1393 type uint64; 1394 description 1395 "burst value"; 1396 } 1397 leaf committed-burst-unit { 1398 type identityref { 1399 base burst-unit-type; 1400 } 1401 description 1402 "committed burst unit"; 1403 } 1404 container conform-action { 1405 uses conform-2color-meter-action-params; 1406 description 1407 "conform action"; 1408 } 1409 container exceed-action { 1410 uses exceed-2color-meter-action-params; 1411 description 1412 "exceed action"; 1413 } 1414 } 1415 description 1416 "single rate two color marker meter attributes"; 1417 } 1419 grouping one-rate-tri-color-meter { 1420 container one-rate-tri-color-meter { 1421 description 1422 "single rate three color meter"; 1423 reference 1424 "RFC2697: A Single Rate Three Color Marker"; 1425 leaf committed-rate-value { 1426 type uint64; 1427 description 1428 "meter rate"; 1429 } 1430 leaf committed-rate-unit { 1431 type identityref { 1432 base rate-unit-type; 1434 } 1435 description 1436 "committed rate unit"; 1437 } 1438 leaf committed-burst-value { 1439 type uint64; 1440 description 1441 "committed burst size"; 1442 } 1443 leaf committed-burst-unit { 1444 type identityref { 1445 base burst-unit-type; 1446 } 1447 description 1448 "committed burst unit"; 1449 } 1450 leaf excess-burst-value { 1451 type uint64; 1452 description 1453 "excess burst size"; 1454 } 1455 leaf excess-burst-unit { 1456 type identityref { 1457 base burst-unit-type; 1458 } 1459 description 1460 "excess burst unit"; 1461 } 1462 container conform-action { 1463 uses conform-3color-meter-action-params; 1464 description 1465 "conform, or green action"; 1466 } 1467 container exceed-action { 1468 uses exceed-3color-meter-action-params; 1469 description 1470 "exceed, or yellow action"; 1471 } 1472 container violate-action { 1473 uses violate-3color-meter-action-params; 1474 description 1475 "violate, or red action"; 1476 } 1477 } 1478 description 1479 "one-rate-tri-color-meter attributes"; 1480 } 1481 grouping two-rate-tri-color-meter { 1482 container two-rate-tri-color-meter { 1483 description 1484 "two rate three color meter"; 1485 reference 1486 "RFC2698: A Two Rate Three Color Marker"; 1487 leaf committed-rate-value { 1488 type uint64; 1489 units "bits-per-second"; 1490 description 1491 "committed rate"; 1492 } 1493 leaf committed-rate-unit { 1494 type identityref { 1495 base rate-unit-type; 1496 } 1497 description 1498 "committed rate unit"; 1499 } 1500 leaf committed-burst-value { 1501 type uint64; 1502 description 1503 "commited burst size"; 1504 } 1505 leaf committed-burst-unit { 1506 type identityref { 1507 base burst-unit-type; 1508 } 1509 description 1510 "committed burst unit"; 1511 } 1512 leaf peak-rate-value { 1513 type uint64; 1514 description 1515 "peak rate"; 1516 } 1517 leaf peak-rate-unit { 1518 type identityref { 1519 base rate-unit-type; 1520 } 1521 description 1522 "committed rate unit"; 1523 } 1524 leaf peak-burst-value { 1525 type uint64; 1526 description 1527 "commited burst size"; 1528 } 1529 leaf peak-burst-unit { 1530 type identityref { 1531 base burst-unit-type; 1532 } 1533 description 1534 "peak burst unit"; 1535 } 1536 container conform-action { 1537 uses conform-3color-meter-action-params; 1538 description 1539 "conform, or green action"; 1540 } 1541 container exceed-action { 1542 uses exceed-3color-meter-action-params; 1543 description 1544 "exceed, or yellow action"; 1545 } 1546 container violate-action { 1547 uses violate-3color-meter-action-params; 1548 description 1549 "exceed, or red action"; 1550 } 1551 } 1552 description 1553 "two-rate-tri-color-meter attributes"; 1554 } 1556 grouping meter { 1557 choice meter-type { 1558 case one-rate-two-color-meter-type { 1559 uses one-rate-two-color-meter; 1560 description 1561 "basic meter"; 1562 } 1563 case one-rate-tri-color-meter-type { 1564 uses one-rate-tri-color-meter; 1565 description 1566 "one rate tri-color meter"; 1567 } 1568 case two-rate-tri-color-meter-type { 1569 uses two-rate-tri-color-meter; 1570 description 1571 "two rate tri-color meter"; 1572 } 1573 description 1574 " meter action based on choice of meter action type"; 1575 } 1576 description 1577 "meter attributes"; 1578 } 1580 container meter-template { 1581 description 1582 "list of meter templates"; 1583 list meter-entry { 1584 if-feature meter-template-support; 1585 key "meter-name"; 1586 description 1587 "meter entry template"; 1588 leaf meter-name { 1589 type string; 1590 description 1591 "meter identifier"; 1592 } 1593 uses meter; 1594 } 1595 } 1597 grouping meter-reference { 1598 container meter-reference-cfg { 1599 leaf meter-reference-name { 1600 type string ; 1601 mandatory true; 1602 description 1603 "This leaf defines name of the meter referenced"; 1604 } 1605 leaf meter-type { 1606 type identityref { 1607 base meter-type; 1608 } 1609 mandatory true; 1610 description 1611 "This leaf defines type of the meter"; 1612 } 1613 description 1614 "meter reference name"; 1615 } 1616 description 1617 "meter reference"; 1618 } 1620 grouping count { 1621 container count-cfg { 1622 if-feature count-feature; 1623 leaf count-action { 1624 type empty; 1625 description 1626 "count action"; 1627 } 1628 description 1629 "the count action"; 1630 } 1631 description 1632 "the count action grouping"; 1633 } 1635 grouping named-counter { 1636 container named-counter-cfg { 1637 if-feature named-counter-feature; 1638 leaf count-name-action { 1639 type string; 1640 description 1641 "count action"; 1642 } 1643 description 1644 "the count action"; 1645 } 1646 description 1647 "the count action grouping"; 1648 } 1650 grouping discard { 1651 container discard-cfg { 1652 leaf discard { 1653 type empty; 1654 description 1655 "discard action"; 1656 } 1657 description 1658 "discard action"; 1659 } 1660 description 1661 "discard grouping"; 1662 } 1664 grouping priority { 1665 container priority-cfg { 1666 leaf priority-level { 1667 type uint8; 1668 description 1669 "priority level"; 1670 } 1671 description 1672 "priority attributes"; 1674 } 1675 description 1676 "priority attributes grouping"; 1677 } 1678 grouping min-rate { 1679 container min-rate-cfg { 1680 uses rate-value-unit; 1681 description 1682 "min guaranteed bandwidth"; 1683 reference 1684 "RFC3289, section 3.5.3"; 1685 } 1686 description 1687 "minimum rate grouping"; 1688 } 1689 grouping dscp-marking { 1690 container dscp-cfg { 1691 leaf dscp { 1692 type inet:dscp; 1693 description 1694 "dscp marking"; 1695 } 1696 description 1697 "dscp marking container"; 1698 } 1699 description 1700 "dscp marking grouping"; 1701 } 1702 grouping traffic-group-marking { 1703 container traffic-group-cfg { 1704 leaf traffic-group { 1705 type string; 1706 description 1707 "traffic group marking"; 1708 } 1709 description 1710 "traffic group marking container"; 1711 } 1712 description 1713 "traffic group marking grouping"; 1714 } 1715 grouping child-policy { 1716 container child-policy-cfg { 1717 if-feature child-policy-feature; 1718 leaf policy-name { 1719 type string; 1720 description 1721 "Hierarchical Policy"; 1723 } 1724 description 1725 "Hierarchical Policy configuration container"; 1726 } 1727 description 1728 "Grouping of Hierarchical Policy configuration"; 1729 } 1730 grouping max-rate { 1731 container max-rate-cfg { 1732 uses rate-value-unit; 1733 uses burst; 1734 description 1735 "maximum rate attributes container"; 1736 reference 1737 "RFC3289, section 3.5.4"; 1738 } 1739 description 1740 "maximum rate attributes"; 1741 } 1742 grouping queue { 1743 container queue-cfg { 1744 uses priority; 1745 uses min-rate; 1746 uses max-rate; 1747 container algorithmic-drop-cfg { 1748 choice drop-algorithm { 1749 case tail-drop { 1750 container tail-drop-cfg { 1751 leaf tail-drop-alg { 1752 type empty; 1753 description 1754 "tail drop algorithm"; 1755 } 1756 description 1757 "Tail Drop configuration container"; 1758 } 1759 description 1760 "Tail Drop choice"; 1761 } 1762 description 1763 "Choice of Drop Algorithm"; 1764 } 1765 description 1766 "Algorithmic Drop configuration container"; 1767 } 1768 description 1769 "Queue configuration container"; 1770 } 1771 description 1772 "Queue grouping"; 1773 } 1774 grouping scheduler { 1775 container scheduler-cfg { 1776 uses min-rate; 1777 uses max-rate; 1778 description 1779 "Schedular configuration container"; 1780 } 1781 description 1782 "Schedular configuration grouping"; 1783 } 1784 } 1785 1787 6.4. IETF-QOS-TARGET 1789 file "ietf-qos-target@2019-03-13.yang" 1790 module ietf-qos-target { 1791 yang-version 1.1; 1792 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-target"; 1793 prefix target; 1795 import ietf-interfaces { 1796 prefix if; 1797 reference "RFC8343: A YANG Data Model for Interface Management"; 1798 } 1799 import ietf-qos-policy { 1800 prefix policy; 1801 reference "RFC XXXX: YANG Model for QoS"; 1802 } 1804 organization "IETF RTG (Routing Area) Working Group"; 1805 contact 1806 "WG Web: 1807 WG List: 1808 WG Chair: Chris Bowers 1809 1810 WG Chair: Jeff Tantsura 1811 1812 Editor: Aseem Choudhary 1813 1814 Editor: Mahesh Jethanandani 1815 1816 Editor: Norm Strahle 1817 "; 1818 description 1819 "This module contains a collection of YANG definitions for 1820 configuring qos specification implementations. 1821 Copyright (c) 2019 IETF Trust and the persons identified as 1822 authors of the code. All rights reserved. 1823 Redistribution and use in source and binary forms, with or 1824 without modification, is permitted pursuant to, and subject 1825 to the license terms contained in, the Simplified BSD License 1826 set forth in Section 4.c of the IETF Trust's Legal Provisions 1827 Relating to IETF Documents 1828 (http://trustee.ietf.org/license-info). 1829 This version of this YANG module is part of RFC XXXX; see 1830 the RFC itself for full legal notices."; 1832 revision 2019-03-13 { 1833 description 1834 "Latest revision qos based policy applied to a target"; 1835 reference "RFC XXXX: YANG Model for QoS"; 1836 } 1838 identity direction { 1839 description 1840 "This is identity of traffic direction"; 1841 } 1843 identity inbound { 1844 base direction; 1845 description 1846 "Direction of traffic coming into the network entry"; 1847 } 1849 identity outbound { 1850 base direction; 1851 description 1852 "Direction of traffic going out of the network entry"; 1853 } 1855 augment "/if:interfaces/if:interface" { 1856 description 1857 "Augments Diffserv Target Entry to Interface module"; 1858 list qos-target-entry { 1859 key "direction policy-type"; 1860 description 1861 "policy target for inbound or outbound direction"; 1862 leaf direction { 1863 type identityref { 1864 base direction; 1865 } 1866 description 1867 "Direction fo the traffic flow either inbound or outbound"; 1868 } 1869 leaf policy-type { 1870 type identityref { 1871 base policy:policy-type; 1872 } 1873 description 1874 "Policy entry type"; 1875 } 1876 leaf policy-name { 1877 type string; 1878 mandatory true; 1879 description 1880 "Policy entry name"; 1881 } 1882 } 1883 } 1884 } 1885 1887 6.5. IETF-DIFFSERV 1889 file "ietf-diffserv@2019-03-13.yang" 1890 module ietf-diffserv { 1891 yang-version 1.1; 1892 namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv"; 1893 prefix diffserv; 1895 import ietf-qos-classifier { 1896 prefix classifier; 1897 reference "RFC XXXX: YANG Model for QoS"; 1898 } 1899 import ietf-qos-policy { 1900 prefix policy; 1901 reference "RFC XXXX: YANG Model for QoS"; 1902 } 1903 import ietf-qos-action { 1904 prefix action; 1905 reference "RFC XXXX: YANG Model for QoS"; 1906 } 1907 import ietf-inet-types { 1908 prefix inet; 1909 reference "RFC 6991: Common YANG Data Types"; 1910 } 1912 organization "IETF RTG (Routing Area) Working Group"; 1913 contact 1914 "WG Web: 1915 WG List: 1916 WG Chair: Chris Bowers 1917 1918 WG Chair: Jeff Tantsura 1919 1920 Editor: Aseem Choudhary 1921 1922 Editor: Mahesh Jethanandani 1923 1924 Editor: Norm Strahle 1925 "; 1926 description 1927 "This module contains a collection of YANG definitions for 1928 configuring diffserv specification implementations. 1929 Copyright (c) 2019 IETF Trust and the persons identified as 1930 authors of the code. All rights reserved. 1931 Redistribution and use in source and binary forms, with or 1932 without modification, is permitted pursuant to, and subject 1933 to the license terms contained in, the Simplified BSD License 1934 set forth in Section 4.c of the IETF Trust's Legal Provisions 1935 Relating to IETF Documents 1936 (http://trustee.ietf.org/license-info). 1937 This version of this YANG module is part of RFC XXXX; see 1938 the RFC itself for full legal notices."; 1940 revision 2019-03-13 { 1941 description 1942 "Latest revision of diffserv based classifier"; 1943 reference "RFC XXXX: YANG Model for QoS"; 1944 } 1946 feature diffserv-queue-inline-support { 1947 description 1948 "Queue inline support in diffserv policy"; 1949 } 1950 feature diffserv-scheduler-inline-support { 1951 description 1952 "scheduler inline support in diffserv policy"; 1953 } 1954 identity diffserv-policy-type { 1955 base policy:policy-type; 1956 description 1957 "This defines ip policy-type"; 1958 } 1959 identity ipv4-diffserv-policy-type { 1960 base policy:policy-type; 1961 description 1962 "This defines ipv4 policy-type"; 1964 } 1965 identity ipv6-diffserv-policy-type { 1966 base policy:policy-type; 1967 description 1968 "This defines ipv6 policy-type"; 1969 } 1971 identity dscp { 1972 base classifier:filter-type; 1973 description 1974 "Differentiated services code point filter-type"; 1975 } 1976 identity source-ipv4-address { 1977 base classifier:filter-type; 1978 description 1979 "source ipv4 address filter-type"; 1980 } 1981 identity destination-ipv4-address { 1982 base classifier:filter-type; 1983 description 1984 "destination ipv4 address filter-type"; 1985 } 1986 identity source-ipv6-address { 1987 base classifier:filter-type; 1988 description 1989 "source ipv6 address filter-type"; 1990 } 1991 identity destination-ipv6-address { 1992 base classifier:filter-type; 1993 description 1994 "destination ipv6 address filter-type"; 1995 } 1996 identity source-port { 1997 base classifier:filter-type; 1998 description 1999 "source port filter-type"; 2000 } 2001 identity destination-port { 2002 base classifier:filter-type; 2003 description 2004 "destination port filter-type"; 2005 } 2006 identity protocol { 2007 base classifier:filter-type; 2008 description 2009 "protocol type filter-type"; 2010 } 2011 identity traffic-group-name { 2012 base classifier:filter-type; 2013 description 2014 "traffic-group filter type"; 2015 } 2017 identity meter-type { 2018 description 2019 "This base identity type defines meter types"; 2020 } 2021 identity one-rate-two-color-meter-type { 2022 base meter-type; 2023 description 2024 "one rate two color meter type"; 2025 } 2026 identity one-rate-tri-color-meter-type { 2027 base meter-type; 2028 description 2029 "one rate three color meter type"; 2030 } 2031 identity two-rate-tri-color-meter-type { 2032 base meter-type; 2033 description 2034 "two rate three color meter action type"; 2035 } 2036 grouping dscp-cfg { 2037 list dscp-cfg { 2038 key "dscp-min dscp-max"; 2039 description 2040 "list of dscp ranges"; 2041 leaf dscp-min { 2042 type inet:dscp; 2043 description 2044 "Minimum value of dscp min-max range"; 2045 } 2046 leaf dscp-max { 2047 type inet:dscp; 2048 description 2049 "maximum value of dscp min-max range"; 2050 } 2051 } 2052 description 2053 "Filter grouping containing list of dscp ranges"; 2054 } 2055 grouping source-ipv4-address-cfg { 2056 list source-ipv4-address-cfg { 2057 key "source-ipv4-addr"; 2058 description 2059 "list of source ipv4 address"; 2061 leaf source-ipv4-addr { 2062 type inet:ipv4-prefix; 2063 description 2064 "source ipv4 prefix"; 2065 } 2066 } 2067 description 2068 "Filter grouping containing list of source ipv4 addresses"; 2069 } 2070 grouping destination-ipv4-address-cfg { 2071 list destination-ipv4-address-cfg { 2072 key "destination-ipv4-addr"; 2073 description 2074 "list of destination ipv4 address"; 2075 leaf destination-ipv4-addr { 2076 type inet:ipv4-prefix; 2077 description 2078 "destination ipv4 prefix"; 2079 } 2080 } 2081 description 2082 "Filter grouping containing list of destination ipv4 address"; 2083 } 2084 grouping source-ipv6-address-cfg { 2085 list source-ipv6-address-cfg { 2086 key "source-ipv6-addr"; 2087 description 2088 "list of source ipv6 address"; 2089 leaf source-ipv6-addr { 2090 type inet:ipv6-prefix; 2091 description 2092 "source ipv6 prefix"; 2093 } 2094 } 2095 description 2096 "Filter grouping containing list of source ipv6 addresses"; 2097 } 2098 grouping destination-ipv6-address-cfg { 2099 list destination-ipv6-address-cfg { 2100 key "destination-ipv6-addr"; 2101 description 2102 "list of destination ipv4 or ipv6 address"; 2103 leaf destination-ipv6-addr { 2104 type inet:ipv6-prefix; 2105 description 2106 "destination ipv6 prefix"; 2107 } 2108 } 2109 description 2110 "Filter grouping containing list of destination ipv6 address"; 2111 } 2112 grouping source-port-cfg { 2113 list source-port-cfg { 2114 key "source-port-min source-port-max"; 2115 description 2116 "list of ranges of source port"; 2117 leaf source-port-min { 2118 type inet:port-number; 2119 description 2120 "minimum value of source port range"; 2121 } 2122 leaf source-port-max { 2123 type inet:port-number; 2124 description 2125 "maximum value of source port range"; 2126 } 2127 } 2128 description 2129 "Filter grouping containing list of source port ranges"; 2130 } 2131 grouping destination-port-cfg { 2132 list destination-port-cfg { 2133 key "destination-port-min destination-port-max"; 2134 description 2135 "list of ranges of destination port"; 2136 leaf destination-port-min { 2137 type inet:port-number; 2138 description 2139 "minimum value of destination port range"; 2140 } 2141 leaf destination-port-max { 2142 type inet:port-number; 2143 description 2144 "maximum value of destination port range"; 2145 } 2146 } 2147 description 2148 "Filter grouping containing list of destination port ranges"; 2149 } 2150 grouping protocol-cfg { 2151 list protocol-cfg { 2152 key "protocol-min protocol-max"; 2153 description 2154 "list of ranges of protocol values"; 2155 leaf protocol-min { 2156 type uint8 { 2157 range "0..255"; 2158 } 2159 description 2160 "minimum value of protocol range"; 2161 } 2162 leaf protocol-max { 2163 type uint8 { 2164 range "0..255"; 2165 } 2166 description 2167 "maximum value of protocol range"; 2168 } 2169 } 2170 description 2171 "Filter grouping containing list of Protocol ranges"; 2172 } 2173 grouping traffic-group-cfg { 2174 container traffic-group-cfg { 2175 leaf traffic-group-name { 2176 type string ; 2177 description 2178 "This leaf defines name of the traffic group referenced"; 2179 } 2180 description 2181 "traffic group container"; 2182 } 2183 description 2184 "traffic group grouping"; 2185 } 2187 augment "/classifier:classifiers/classifier:classifier-entry" + 2188 "/classifier:filter-entry" { 2189 choice filter-param { 2190 description 2191 "Choice of filter types"; 2192 case dscp { 2193 uses dscp-cfg; 2194 description 2195 "Filter containing list of dscp ranges"; 2196 } 2197 case source-ipv4-address { 2198 uses source-ipv4-address-cfg; 2199 description 2200 "Filter containing list of source ipv4 addresses"; 2201 } 2202 case destination-ipv4-address { 2203 uses destination-ipv4-address-cfg; 2204 description 2205 "Filter containing list of destination ipv4 address"; 2206 } 2207 case source-ipv6-address { 2208 uses source-ipv6-address-cfg; 2209 description 2210 "Filter containing list of source ipv6 addresses"; 2211 } 2212 case destination-ipv6-address { 2213 uses destination-ipv6-address-cfg; 2214 description 2215 "Filter containing list of destination ipv6 address"; 2216 } 2217 case source-port { 2218 uses source-port-cfg; 2219 description 2220 "Filter containing list of source-port ranges"; 2221 } 2222 case destination-port { 2223 uses destination-port-cfg; 2224 description 2225 "Filter containing list of destination-port ranges"; 2226 } 2227 case protocol { 2228 uses protocol-cfg; 2229 description 2230 "Filter Type Protocol"; 2231 } 2232 case traffic-group { 2233 uses traffic-group-cfg; 2234 description 2235 "Filter Type traffic-group"; 2236 } 2237 } 2238 description 2239 "augments diffserv filters to qos classifier"; 2240 } 2241 augment "/policy:policies/policy:policy-entry" + 2242 "/policy:classifier-entry/policy:filter-entry" { 2243 when "../../policy:policy-type = 2244 'diffserv:ipv4-diffserv-policy-type' or 2245 ../../policy:policy-type = 2246 'diffserv:ipv6-diffserv-policy-type' or 2247 ../../policy:policy-type = 2248 'diffserv:diffserv-policy-type'" { 2249 description 2250 "Filters can be augmented if policy type is 2251 ipv4, ipv6 or default diffserv policy types "; 2252 } 2253 description 2254 "Augments Diffserv Classifier with common filter types"; 2255 choice filter-params { 2256 description 2257 "Choice of action types"; 2258 case dscp { 2259 uses dscp-cfg; 2260 description 2261 "Filter containing list of dscp ranges"; 2262 } 2263 case source-ipv4-address { 2264 when "../../policy:policy-type != 2265 'diffserv:ipv6-diffserv-policy-type'" { 2266 description 2267 "If policy type is v6, this filter cannot be used."; 2268 } 2269 uses source-ipv4-address-cfg; 2270 description 2271 "Filter containing list of source ipv4 addresses"; 2272 } 2273 case destination-ipv4-address { 2274 when "../../policy:policy-type != 2275 'diffserv:ipv6-diffserv-policy-type'" { 2276 description 2277 "If policy type is v6, this filter cannot be used."; 2278 } 2279 uses destination-ipv4-address-cfg; 2280 description 2281 "Filter containing list of destination ipv4 address"; 2282 } 2283 case source-ipv6-address { 2284 when "../../policy:policy-type != 2285 'diffserv:ipv4-diffserv-policy-type'" { 2286 description 2287 "If policy type is v4, this filter cannot be used."; 2288 } 2289 uses source-ipv6-address-cfg; 2290 description 2291 "Filter containing list of source ipv6 addresses"; 2292 } 2293 case destination-ipv6-address { 2294 when "../../policy:policy-type != 2295 'diffserv:ipv4-diffserv-policy-type'" { 2296 description 2297 "If policy type is v4, this filter cannot be used."; 2298 } 2299 uses destination-ipv6-address-cfg; 2300 description 2301 "Filter containing list of destination ipv6 address"; 2302 } 2303 case source-port { 2304 uses source-port-cfg; 2305 description 2306 "Filter containing list of source-port ranges"; 2307 } 2308 case destination-port { 2309 uses destination-port-cfg; 2310 description 2311 "Filter containing list of destination-port ranges"; 2312 } 2313 case protocol { 2314 uses protocol-cfg; 2315 description 2316 "Filter Type Protocol"; 2317 } 2318 case traffic-group { 2319 uses traffic-group-cfg; 2320 description 2321 "Filter Type traffic-group"; 2322 } 2323 } 2324 } 2325 augment "/policy:policies/policy:policy-entry" + 2326 "/policy:classifier-entry" + 2327 "/policy:classifier-action-entry-cfg" + 2328 "/policy:action-cfg-params" { 2329 when "../../policy:policy-type = 2330 'diffserv:ipv4-diffserv-policy-type' or 2331 ../../policy:policy-type = 2332 'diffserv:ipv6-diffserv-policy-type' or 2333 ../../policy:policy-type = 2334 'diffserv:diffserv-policy-type' " { 2335 description 2336 "Actions can be augmented if policy type is ipv4, 2337 ipv6 or default diffserv policy types "; 2338 } 2339 description 2340 "Augments Diffserv Policy with action configuration"; 2341 case dscp-marking { 2342 uses action:dscp-marking; 2343 } 2344 case meter-inline { 2345 if-feature action:meter-inline-feature; 2346 uses action:meter; 2347 } 2348 case meter-reference { 2349 if-feature action:meter-reference-feature; 2350 uses action:meter-reference; 2351 } 2352 case child-policy { 2353 if-feature action:child-policy-feature; 2354 uses action:child-policy; 2355 } 2356 case count { 2357 if-feature action:count-feature; 2358 uses action:count; 2359 } 2360 case named-count { 2361 if-feature action:named-counter-feature; 2362 uses action:named-counter; 2363 } 2364 case queue-inline { 2365 if-feature diffserv-queue-inline-support; 2366 uses action:queue; 2367 } 2368 case scheduler-inline { 2369 if-feature diffserv-scheduler-inline-support; 2370 uses action:scheduler; 2371 } 2372 } 2373 } 2374 2376 6.6. IETF-QUEUE-POLICY 2378 file "ietf-queue-policy@2019-03-13.yang" 2379 module ietf-queue-policy { 2380 yang-version 1.1; 2381 namespace "urn:ietf:params:xml:ns:yang:ietf-queue-policy"; 2382 prefix queue-policy; 2384 import ietf-qos-policy { 2385 prefix policy; 2386 reference "RFC XXXX: YANG Model for QoS"; 2387 } 2388 import ietf-qos-action { 2389 prefix action; 2390 reference "RFC XXXX: YANG Model for QoS"; 2391 } 2392 import ietf-diffserv { 2393 prefix diffserv; 2394 reference "RFC XXXX: YANG Model for QoS"; 2395 } 2396 organization "IETF RTG (Routing Area) Working Group"; 2397 contact 2398 "WG Web: 2399 WG List: 2400 WG Chair: Chris Bowers 2401 2402 WG Chair: Jeff Tantsura 2403 2404 Editor: Aseem Choudhary 2405 2406 Editor: Mahesh Jethanandani 2407 2408 Editor: Norm Strahle 2409 "; 2410 description 2411 "This module contains a collection of YANG definitions for 2412 configuring diffserv specification implementations. 2413 Copyright (c) 2019 IETF Trust and the persons identified as 2414 authors of the code. All rights reserved. 2415 Redistribution and use in source and binary forms, with or 2416 without modification, is permitted pursuant to, and subject 2417 to the license terms contained in, the Simplified BSD License 2418 set forth in Section 4.c of the IETF Trust's Legal Provisions 2419 Relating to IETF Documents 2420 (http://trustee.ietf.org/license-info). 2421 This version of this YANG module is part of RFC XXXX; see 2422 the RFC itself for full legal notices."; 2424 revision 2019-03-13 { 2425 description 2426 "Latest revision of queuing policy module"; 2427 reference "RFC XXXX: YANG Model for QoS"; 2428 } 2430 feature queue-policy-support { 2431 description 2432 " This feature allows queue policy configuration 2433 as a separate policy type support."; 2434 } 2436 feature queue-inline-support { 2437 description 2438 "Queue inline support in Queue policy"; 2439 } 2441 feature queue-template-support { 2442 description 2443 "Queue template support in Queue policy"; 2445 } 2447 identity queue-policy-type { 2448 base policy:policy-type; 2449 description 2450 "This defines queue policy-type"; 2451 } 2453 augment "/policy:policies/policy:policy-entry" + 2454 "/policy:classifier-entry/policy:filter-entry" { 2455 when "../../policy:policy-type = 2456 'queue-policy:queue-policy-type'" { 2457 description 2458 "If policy type is v6, this filter cannot be used."; 2459 } 2460 if-feature queue-policy-support; 2461 choice filter-params { 2462 description 2463 "Choice of action types"; 2464 case traffic-group-name { 2465 uses diffserv:traffic-group-cfg; 2466 description 2467 "traffic group name"; 2468 } 2469 } 2470 description 2471 "Augments Queue policy Classifier with common filter types"; 2472 } 2474 identity queue-template-name { 2475 base policy:action-type; 2476 description 2477 "queue template name"; 2478 } 2480 grouping queue-template-reference { 2481 container queue-template-reference-cfg { 2482 leaf queue-template-name { 2483 type string ; 2484 mandatory true; 2485 description 2486 "This leaf defines name of the queue template referenced"; 2487 } 2488 description 2489 "queue template reference"; 2490 } 2491 description 2492 "queue template reference grouping"; 2494 } 2496 container queue-template { 2497 if-feature queue-policy-support; 2498 description 2499 "Queue template"; 2500 leaf name { 2501 type string; 2502 description 2503 "A unique name identifying this queue template"; 2504 } 2505 uses action:queue; 2506 } 2508 augment "/policy:policies/policy:policy-entry" + 2509 "/policy:classifier-entry" + 2510 "/policy:classifier-action-entry-cfg" + 2511 "/policy:action-cfg-params" { 2512 when "../../policy:policy-type = 2513 'queue-policy:queue-policy-type'" { 2514 description 2515 "queue policy actions."; 2516 } 2517 if-feature queue-policy-support; 2518 case queue-template-name { 2519 if-feature queue-template-support; 2520 uses queue-template-reference; 2521 } 2522 case queue-inline { 2523 if-feature queue-inline-support; 2524 uses action:queue; 2525 } 2526 description 2527 "augments queue template reference to queue policy"; 2528 } 2529 } 2530 2532 6.7. IETF-SCHEDULER-POLICY 2534 file "ietf-scheduler-policy@2019-03-13.yang" 2535 module ietf-scheduler-policy { 2536 yang-version 1.1; 2537 namespace "urn:ietf:params:xml:ns:yang:ietf-scheduler-policy"; 2538 prefix scheduler-policy; 2540 import ietf-qos-classifier { 2541 prefix classifier; 2542 reference "RFC XXXX: YANG Model for QoS"; 2543 } 2544 import ietf-qos-policy { 2545 prefix policy; 2546 reference "RFC XXXX: YANG Model for QoS"; 2547 } 2548 import ietf-qos-action { 2549 prefix action; 2550 reference "RFC XXXX: YANG Model for QoS"; 2551 } 2553 organization "IETF RTG (Routing Area) Working Group"; 2554 contact 2555 "WG Web: 2556 WG List: 2557 WG Chair: Chris Bowers 2558 2559 WG Chair: Jeff Tantsura 2560 2561 Editor: Norm Strahle 2562 2563 Editor: Aseem Choudhary 2564 "; 2565 description 2566 "This module contains a collection of YANG definitions for 2567 configuring diffserv specification implementations. 2568 Copyright (c) 2019 IETF Trust and the persons identified as 2569 authors of the code. All rights reserved. 2570 Redistribution and use in source and binary forms, with or 2571 without modification, is permitted pursuant to, and subject 2572 to the license terms contained in, the Simplified BSD License 2573 set forth in Section 4.c of the IETF Trust's Legal Provisions 2574 Relating to IETF Documents 2575 (http://trustee.ietf.org/license-info). 2576 This version of this YANG module is part of RFC XXXX; see 2577 the RFC itself for full legal notices."; 2579 revision 2019-03-13 { 2580 description 2581 "Latest revision of scheduler policy module"; 2582 reference "RFC XXXX: YANG Model for QoS"; 2583 } 2584 feature scheduler-policy-support { 2585 description 2586 " This feature allows sheduler policy configuration 2587 as a separate policy type support."; 2588 } 2589 identity scheduler-policy-type { 2590 base policy:policy-type; 2591 description 2592 "This defines scheduler policy-type"; 2593 } 2595 identity filter-match-all { 2596 base classifier:filter-type; 2597 description 2598 "Traffic-group filter type"; 2599 } 2601 grouping filter-match-all-cfg { 2602 container match-all-cfg { 2603 leaf match-all-action { 2604 type empty; 2605 description 2606 "match all packets"; 2607 } 2608 description 2609 "the match-all action"; 2610 } 2611 description 2612 "the match-all filter grouping"; 2613 } 2615 augment "/policy:policies/policy:policy-entry" + 2616 "/policy:classifier-entry/policy:filter-entry" { 2617 when "../../policy:policy-type = 2618 'scheduler-policy:scheduler-policy-type'" { 2619 description 2620 "Only when policy type is scheduler-policy"; 2621 } 2622 choice filter-params { 2623 description 2624 "Choice of action types"; 2625 case filter-match-all { 2626 uses filter-match-all-cfg; 2627 description 2628 "filter match-all"; 2629 } 2630 } 2631 description 2632 "Augments Queue policy Classifier with common filter types"; 2633 } 2635 identity queue-policy-name { 2636 base policy:action-type; 2637 description 2638 "queue policy name"; 2639 } 2641 grouping queue-policy-name-cfg { 2642 container queue-policy-name { 2643 leaf queue-policy { 2644 type string ; 2645 mandatory true; 2646 description 2647 "This leaf defines name of the queue-policy"; 2648 } 2649 description 2650 "container for queue-policy name"; 2651 } 2652 description 2653 "queue-policy name grouping"; 2654 } 2656 augment "/policy:policies/policy:policy-entry" + 2657 "/policy:classifier-entry" + 2658 "/policy:classifier-action-entry-cfg" + 2659 "/policy:action-cfg-params" { 2660 when "../../policy:policy-type = 2661 'scheduler-policy:scheduler-policy-type'" { 2662 description 2663 "Only when policy type is scheduler-policy"; 2664 } 2665 case scheduler { 2666 uses action:scheduler; 2667 } 2668 case queue-policy-name { 2669 uses queue-policy-name-cfg; 2670 } 2671 description 2672 "augments scheduler template reference to scheduler policy"; 2673 } 2674 } 2675 2677 7. IANA Considerations 2679 TBD 2681 8. Security Considerations 2683 9. Acknowledgement 2685 The authors wish to thank Ruediger Geib, Fred Baker, Greg Misky, Tom 2686 Petch, many others for their helpful comments. 2688 10. References 2690 10.1. Normative References 2692 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2693 Requirement Levels", BCP 14, RFC 2119, 2694 DOI 10.17487/RFC2119, March 1997, 2695 . 2697 [RFC2697] Heinanen, J. and R. Guerin, "A Single Rate Three Color 2698 Marker", RFC 2697, DOI 10.17487/RFC2697, September 1999, 2699 . 2701 [RFC2698] Heinanen, J. and R. Guerin, "A Two Rate Three Color 2702 Marker", RFC 2698, DOI 10.17487/RFC2698, September 1999, 2703 . 2705 [RFC3289] Baker, F., Chan, K., and A. Smith, "Management Information 2706 Base for the Differentiated Services Architecture", 2707 RFC 3289, DOI 10.17487/RFC3289, May 2002, 2708 . 2710 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2711 the Network Configuration Protocol (NETCONF)", RFC 6020, 2712 DOI 10.17487/RFC6020, October 2010, 2713 . 2715 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2716 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2717 . 2719 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 2720 RFC 7950, DOI 10.17487/RFC7950, August 2016, 2721 . 2723 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2724 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2725 May 2017, . 2727 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 2728 and R. Wilton, "Network Management Datastore Architecture 2729 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 2730 . 2732 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 2733 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 2734 . 2736 10.2. Informative References 2738 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 2739 and W. Weiss, "An Architecture for Differentiated 2740 Services", RFC 2475, DOI 10.17487/RFC2475, December 1998, 2741 . 2743 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 2744 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 2745 . 2747 Appendix A. Company A, Company B and Company C examples 2749 Company A, Company B and Company C Diffserv modules augments all the 2750 filter types of the QoS classifier module as well as the QoS policy 2751 module that allow it to define marking, metering, min-rate, max-rate 2752 actions. Queuing and metering counters are realized by augmenting of 2753 the QoS target module. 2755 A.1. Example of Company A Diffserv Model 2757 The following Company A vendor example augments the qos and diffserv 2758 model, demonstrating some of the following functionality: 2760 - use of template based classifier definitions 2762 - use of single policy type modelling queue, scheduler policy, and a 2763 filter policy. All of these policies either augment the qos policy 2764 or the diffserv modules 2766 - use of inline actions in a policy 2768 - flexibility in marking dscp or metadata at ingress and/or egress. 2770 module example-compa-diffserv { 2771 yang-version 1.1; 2772 namespace "urn:ietf:params:xml:ns:yang:example-compa-diffserv"; 2773 prefix example; 2774 import ietf-qos-classifier { 2775 prefix classifier; 2776 reference "RFC XXXX: YANG Model for QoS"; 2777 } 2778 import ietf-qos-policy { 2779 prefix policy; 2780 reference "RFC XXXX: YANG Model for QoS"; 2781 } 2782 import ietf-qos-action { 2783 prefix action; 2784 reference "RFC XXXX: YANG Model for QoS"; 2785 } 2786 import ietf-diffserv { 2787 prefix diffserv; 2788 reference "RFC XXXX: YANG Model for QoS"; 2789 } 2791 organization "Company A"; 2792 contact 2793 "Editor: XYZ 2794 "; 2795 description 2796 "This module contains a collection of YANG definitions of 2797 companyA diffserv specification extension."; 2798 Copyright (c) 2019 IETF Trust and the persons identified as 2799 authors of the code. All rights reserved. 2800 Redistribution and use in source and binary forms, with or 2801 without modification, is permitted pursuant to, and subject 2802 to the license terms contained in, the Simplified BSD License 2803 set forth in Section 4.c of the IETF Trust's Legal Provisions 2804 Relating to IETF Documents 2805 (http://trustee.ietf.org/license-info). 2807 This version of this YANG module is part of RFC XXXX; see 2808 the RFC itself for full legal notices."; 2810 revision 2019-03-13 { 2811 description 2812 "Initial revision for diffserv actions on network packets"; 2813 reference 2814 "RFC 6020: YANG - A Data Modeling Language for the 2815 Network Configuration Protocol (NETCONF)"; 2816 } 2818 identity default-policy-type { 2819 base policy:policy-type; 2820 description 2821 "This defines default policy-type"; 2823 } 2825 identity qos-group { 2826 base classifier:filter-type; 2827 description 2828 "qos-group filter-type"; 2829 } 2831 grouping qos-group-cfg { 2832 list qos-group-cfg { 2833 key "qos-group-min qos-group-max"; 2834 description 2835 "list of dscp ranges"; 2836 leaf qos-group-min { 2837 type uint8; 2838 description 2839 "Minimum value of qos-group range"; 2840 } 2841 leaf qos-group-max { 2842 type uint8; 2843 description 2844 "maximum value of qos-group range"; 2845 } 2846 } 2847 description 2848 "Filter containing list of qos-group ranges"; 2849 } 2851 grouping wred-threshold { 2852 container wred-min-thresh { 2853 uses action:threshold; 2854 description 2855 "Minimum threshold"; 2856 } 2857 container wred-max-thresh { 2858 uses action:threshold; 2859 description 2860 "Maximum threshold"; 2861 } 2862 leaf mark-probability { 2863 type uint32 { 2864 range "1..1000"; 2865 } 2866 description 2867 "Mark probability"; 2868 } 2869 description 2870 "WRED threshold attributes"; 2872 } 2874 grouping randomdetect { 2875 leaf exp-weighting-const { 2876 type uint32; 2877 description 2878 "Exponential weighting constant factor for wred profile"; 2879 } 2880 uses wred-threshold; 2881 description 2882 "Random detect attributes"; 2883 } 2885 augment "/classifier:classifiers/" + 2886 "classifier:classifier-entry/" + 2887 "classifier:filter-entry/diffserv:filter-param" { 2888 case qos-group { 2889 uses qos-group-cfg; 2890 description 2891 "Filter containing list of qos-group ranges. 2892 Qos-group represent packet metadata information 2893 in a device. "; 2894 } 2895 description 2896 "augmentation of classifier filters"; 2897 } 2898 augment "/policy:policies/policy:policy-entry/" + 2899 "policy:classifier-entry/" + 2900 "policy:classifier-action-entry-cfg/" + 2901 "policy:action-cfg-params" { 2902 case random-detect { 2903 uses randomdetect; 2904 } 2905 description 2906 "Augment the actions to policy entry"; 2907 } 2909 augment "/policy:policies" + 2910 "/policy:policy-entry" + 2911 "/policy:classifier-entry" + 2912 "/policy:classifier-action-entry-cfg" + 2913 "/policy:action-cfg-params" + 2914 "/diffserv:meter-inline" + 2915 "/diffserv:meter-type" + 2916 "/diffserv:one-rate-two-color-meter-type" + 2917 "/diffserv:one-rate-two-color-meter" + 2918 "/diffserv:conform-action" + 2919 "/diffserv:conform-2color-meter-action-params" + 2920 "/diffserv:conform-2color-meter-action-val" { 2922 description 2923 "augment the one-rate-two-color meter conform 2924 with actions"; 2925 case meter-action-drop { 2926 description 2927 "meter drop"; 2928 uses action:drop; 2929 } 2930 case meter-action-mark-dscp { 2931 description 2932 "meter action dscp marking"; 2933 uses action:dscp-marking; 2934 } 2935 } 2936 augment "/policy:policies" + 2937 "/policy:policy-entry" + 2938 "/policy:classifier-entry" + 2939 "/policy:classifier-action-entry-cfg" + 2940 "/policy:action-cfg-params" + 2941 "/diffserv:meter-inline" + 2942 "/diffserv:meter-type" + 2943 "/diffserv:one-rate-two-color-meter-type" + 2944 "/diffserv:one-rate-two-color-meter" + 2945 "/diffserv:exceed-action" + 2946 "/diffserv:exceed-2color-meter-action-params" + 2947 "/diffserv:exceed-2color-meter-action-val" { 2949 description 2950 "augment the one-rate-two-color meter exceed 2951 with actions"; 2952 case meter-action-drop { 2953 description 2954 "meter drop"; 2955 uses action:drop; 2956 } 2957 case meter-action-mark-dscp { 2958 description 2959 "meter action dscp marking"; 2960 uses action:dscp-marking; 2961 } 2962 } 2963 augment "/policy:policies" + 2964 "/policy:policy-entry" + 2965 "/policy:classifier-entry" + 2966 "/policy:classifier-action-entry-cfg" + 2967 "/policy:action-cfg-params" + 2968 "/diffserv:meter-inline" + 2969 "/diffserv:meter-type" + 2970 "/diffserv:one-rate-tri-color-meter-type" + 2971 "/diffserv:one-rate-tri-color-meter" + 2972 "/diffserv:conform-action" + 2973 "/diffserv:conform-3color-meter-action-params" + 2974 "/diffserv:conform-3color-meter-action-val" { 2976 description 2977 "augment the one-rate-tri-color meter conform 2978 with actions"; 2979 case meter-action-drop { 2980 description 2981 "meter drop"; 2982 uses action:drop; 2983 } 2984 case meter-action-mark-dscp { 2985 description 2986 "meter action dscp marking"; 2987 uses action:dscp-marking; 2988 } 2989 } 2990 augment "/policy:policies" + 2991 "/policy:policy-entry" + 2992 "/policy:classifier-entry" + 2993 "/policy:classifier-action-entry-cfg" + 2994 "/policy:action-cfg-params" + 2995 "/diffserv:meter-inline" + 2996 "/diffserv:meter-type" + 2997 "/diffserv:one-rate-tri-color-meter-type" + 2998 "/diffserv:one-rate-tri-color-meter" + 2999 "/diffserv:exceed-action" + 3000 "/diffserv:exceed-3color-meter-action-params" + 3001 "/diffserv:exceed-3color-meter-action-val" { 3003 description 3004 "augment the one-rate-tri-color meter exceed 3005 with actions"; 3006 case meter-action-drop { 3007 description 3008 "meter drop"; 3009 uses action:drop; 3010 } 3011 case meter-action-mark-dscp { 3012 description 3013 "meter action dscp marking"; 3014 uses action:dscp-marking; 3015 } 3017 } 3018 augment "/policy:policies" + 3019 "/policy:policy-entry" + 3020 "/policy:classifier-entry" + 3021 "/policy:classifier-action-entry-cfg" + 3022 "/policy:action-cfg-params" + 3023 "/diffserv:meter-inline" + 3024 "/diffserv:meter-type" + 3025 "/diffserv:one-rate-tri-color-meter-type" + 3026 "/diffserv:one-rate-tri-color-meter" + 3027 "/diffserv:violate-action" + 3028 "/diffserv:violate-3color-meter-action-params" + 3029 "/diffserv:violate-3color-meter-action-val" { 3030 description 3031 "augment the one-rate-tri-color meter conform 3032 with actions"; 3033 case meter-action-drop { 3034 description 3035 "meter drop"; 3036 uses action:drop; 3037 } 3038 case meter-action-mark-dscp { 3039 description 3040 "meter action dscp marking"; 3041 uses action:dscp-marking; 3042 } 3043 } 3045 augment "/policy:policies" + 3046 "/policy:policy-entry" + 3047 "/policy:classifier-entry" + 3048 "/policy:classifier-action-entry-cfg" + 3049 "/policy:action-cfg-params" + 3050 "/diffserv:meter-inline" + 3051 "/diffserv:meter-type" + 3052 "/diffserv:two-rate-tri-color-meter-type" + 3053 "/diffserv:two-rate-tri-color-meter" + 3054 "/diffserv:conform-action" + 3055 "/diffserv:conform-3color-meter-action-params" + 3056 "/diffserv:conform-3color-meter-action-val" { 3058 description 3059 "augment the one-rate-tri-color meter conform 3060 with actions"; 3061 case meter-action-drop { 3062 description 3063 "meter drop"; 3064 uses action:drop; 3066 } 3067 case meter-action-mark-dscp { 3068 description 3069 "meter action dscp marking"; 3070 uses action:dscp-marking; 3071 } 3072 } 3073 augment "/policy:policies" + 3074 "/policy:policy-entry" + 3075 "/policy:classifier-entry" + 3076 "/policy:classifier-action-entry-cfg" + 3077 "/policy:action-cfg-params" + 3078 "/diffserv:meter-inline" + 3079 "/diffserv:meter-type" + 3080 "/diffserv:two-rate-tri-color-meter-type" + 3081 "/diffserv:two-rate-tri-color-meter" + 3082 "/diffserv:exceed-action" + 3083 "/diffserv:exceed-3color-meter-action-params" + 3084 "/diffserv:exceed-3color-meter-action-val" { 3086 description 3087 "augment the two-rate-tri-color meter exceed 3088 with actions"; 3089 case meter-action-drop { 3090 description 3091 "meter drop"; 3092 uses action:drop; 3093 } 3094 case meter-action-mark-dscp { 3095 description 3096 "meter action dscp marking"; 3097 uses action:dscp-marking; 3098 } 3099 } 3100 augment "/policy:policies" + 3101 "/policy:policy-entry" + 3102 "/policy:classifier-entry" + 3103 "/policy:classifier-action-entry-cfg" + 3104 "/policy:action-cfg-params" + 3105 "/diffserv:meter-inline" + 3106 "/diffserv:meter-type" + 3107 "/diffserv:two-rate-tri-color-meter-type" + 3108 "/diffserv:two-rate-tri-color-meter" + 3109 "/diffserv:violate-action" + 3110 "/diffserv:violate-3color-meter-action-params" + 3111 "/diffserv:violate-3color-meter-action-val" { 3112 description 3113 "augment the two-rate-tri-color meter violate 3114 with actions"; 3115 case meter-action-drop { 3116 description 3117 "meter drop"; 3118 uses action:drop; 3119 } 3120 case meter-action-mark-dscp { 3121 description 3122 "meter action dscp marking"; 3123 uses action:dscp-marking; 3124 } 3125 } 3126 augment "/policy:policies" + 3127 "/policy:policy-entry" + 3128 "/policy:classifier-entry" + 3129 "/policy:classifier-action-entry-cfg" + 3130 "/policy:action-cfg-params" + 3131 "/diffserv:meter-inline" + 3132 "/diffserv:meter-type" + 3133 "/diffserv:one-rate-two-color-meter-type" + 3134 "/diffserv:one-rate-two-color-meter" { 3135 description 3136 "augment the one-rate-two-color meter with" + 3137 "color classifiers"; 3138 container conform-color { 3139 uses classifier:classifier-entry-generic-attr; 3140 description 3141 "conform color classifier container"; 3142 } 3143 container exceed-color { 3144 uses classifier:classifier-entry-generic-attr; 3145 description 3146 "exceed color classifier container"; 3147 } 3148 } 3149 augment "/policy:policies" + 3150 "/policy:policy-entry" + 3151 "/policy:classifier-entry" + 3152 "/policy:classifier-action-entry-cfg" + 3153 "/policy:action-cfg-params" + 3154 "/diffserv:meter-inline" + 3155 "/diffserv:meter-type" + 3156 "/diffserv:one-rate-tri-color-meter-type" + 3157 "/diffserv:one-rate-tri-color-meter" { 3158 description 3159 "augment the one-rate-tri-color meter with" + 3160 "color classifiers"; 3161 container conform-color { 3162 uses classifier:classifier-entry-generic-attr; 3163 description 3164 "conform color classifier container"; 3165 } 3166 container exceed-color { 3167 uses classifier:classifier-entry-generic-attr; 3168 description 3169 "exceed color classifier container"; 3170 } 3171 container violate-color { 3172 uses classifier:classifier-entry-generic-attr; 3173 description 3174 "violate color classifier container"; 3175 } 3176 } 3177 augment "/policy:policies" + 3178 "/policy:policy-entry" + 3179 "/policy:classifier-entry" + 3180 "/policy:classifier-action-entry-cfg" + 3181 "/policy:action-cfg-params" + 3182 "/diffserv:meter-inline" + 3183 "/diffserv:meter-type" + 3184 "/diffserv:two-rate-tri-color-meter-type" + 3185 "/diffserv:two-rate-tri-color-meter" { 3186 description 3187 "augment the two-rate-tri-color meter with" + 3188 "color classifiers"; 3189 container conform-color { 3190 uses classifier:classifier-entry-generic-attr; 3191 description 3192 "conform color classifier container"; 3193 } 3194 container exceed-color { 3195 uses classifier:classifier-entry-generic-attr; 3196 description 3197 "exceed color classifier container"; 3198 } 3199 container violate-color { 3200 uses classifier:classifier-entry-generic-attr; 3201 description 3202 "violate color classifier container"; 3203 } 3204 } 3205 } 3207 A.2. Example of Company B Diffserv Model 3209 The following vendor example augments the qos and diffserv model, 3210 demonstrating some of the following functionality: 3212 - use of inline classifier definitions (defined inline in the policy 3213 vs referencing an externally defined classifier) 3215 - use of mulitple policy types, e.g. a queue policy, a scheduler 3216 policy, and a filter policy. All of these policies either augment 3217 the qos policy or the diffserv modules 3219 - use of a queue module, which uses and extends the queue grouping 3220 from the ietf-qos-action module 3222 - use of meter templates (v.s. meter inline) 3224 - use of internal meta data for classification and marking 3226 module example-compb-diffserv-filter-policy { 3227 yang-version 1.1; 3228 namespace "urn:ietf:params:xml:ns:yang:" + 3229 "example-compb-diffserv-filter-policy"; 3230 prefix compb-filter-policy; 3232 import ietf-qos-classifier { 3233 prefix classifier; 3234 reference "RFC XXXX: YANG Model for QoS"; 3235 } 3236 import ietf-qos-policy { 3237 prefix policy; 3238 reference "RFC XXXX: YANG Model for QoS"; 3239 } 3240 import ietf-qos-action { 3241 prefix action; 3242 reference "RFC XXXX: YANG Model for QoS"; 3243 } 3244 import ietf-diffserv { 3245 prefix diffserv; 3246 reference "RFC XXXX: YANG Model for QoS"; 3247 } 3249 organization "Company B"; 3250 contact 3251 "Editor: XYZ 3252 "; 3254 description 3255 "This module contains a collection of YANG definitions for 3256 configuring diffserv specification implementations. 3257 Copyright (c) 2019 IETF Trust and the persons identified as 3258 authors of the code. All rights reserved. 3259 Redistribution and use in source and binary forms, with or 3260 without modification, is permitted pursuant to, and subject 3261 to the license terms contained in, the Simplified BSD License 3262 set forth in Section 4.c of the IETF Trust's Legal Provisions 3263 Relating to IETF Documents 3264 (http://trustee.ietf.org/license-info). 3266 This version of this YANG module is part of RFC XXXX; see 3267 the RFC itself for full legal notices."; 3269 revision 2019-03-13 { 3270 description 3271 "Latest revision of diffserv policy"; 3272 reference "RFC XXXX"; 3273 } 3275 /************************************************* 3276 * Classification types 3277 *************************************************/ 3279 identity forwarding-class { 3280 base classifier:filter-type; 3281 description 3282 "Forwarding class filter type"; 3283 } 3285 identity internal-loss-priority { 3286 base classifier:filter-type; 3287 description 3288 "Internal loss priority filter type"; 3289 } 3291 grouping forwarding-class-cfg { 3292 list forwarding-class-cfg { 3293 key "forwarding-class"; 3294 description 3295 "list of forwarding-classes"; 3296 leaf forwarding-class { 3297 type string; 3298 description 3299 "Forwarding class name"; 3300 } 3301 } 3302 description 3303 "Filter containing list of forwarding classes"; 3304 } 3306 grouping loss-priority-cfg { 3307 list loss-priority-cfg { 3308 key "loss-priority"; 3309 description 3310 "list of loss-priorities"; 3311 leaf loss-priority { 3312 type enumeration { 3313 enum high { 3314 description "High Loss Priority"; 3315 } 3316 enum medium-high { 3317 description "Medium-high Loss Priority"; 3318 } 3319 enum medium-low { 3320 description "Medium-low Loss Priority"; 3321 } 3322 enum low { 3323 description "Low Loss Priority"; 3324 } 3325 } 3326 description 3327 "Loss-priority"; 3328 } 3329 } 3330 description 3331 "Filter containing list of loss priorities"; 3332 } 3334 augment "/policy:policies" + 3335 "/policy:policy-entry" + 3336 "/policy:classifier-entry" + 3337 "/policy:filter-entry" + 3338 "/diffserv:filter-params" { 3339 case forwarding-class { 3340 uses forwarding-class-cfg; 3341 description 3342 "Filter Type Internal-loss-priority"; 3343 } 3344 case internal-loss-priority { 3345 uses loss-priority-cfg; 3346 description 3347 "Filter Type Internal-loss-priority"; 3348 } 3349 description 3350 "Augments Diffserv Classifier with vendor" + 3351 " specific types"; 3352 } 3354 /************************************************* 3355 * Actions 3356 *************************************************/ 3358 identity mark-fwd-class { 3359 base policy:action-type; 3360 description 3361 "mark forwarding class action type"; 3362 } 3364 identity mark-loss-priority { 3365 base policy:action-type; 3366 description 3367 "mark loss-priority action type"; 3368 } 3370 grouping mark-fwd-class { 3371 container mark-fwd-class-cfg { 3372 leaf forwarding-class { 3373 type string; 3374 description 3375 "Forwarding class name"; 3376 } 3377 description 3378 "mark-fwd-class container"; 3379 } 3380 description 3381 "mark-fwd-class grouping"; 3382 } 3384 grouping mark-loss-priority { 3385 container mark-loss-priority-cfg { 3386 leaf loss-priority { 3387 type enumeration { 3388 enum high { 3389 description "High Loss Priority"; 3390 } 3391 enum medium-high { 3392 description "Medium-high Loss Priority"; 3393 } 3394 enum medium-low { 3395 description "Medium-low Loss Priority"; 3396 } 3397 enum low { 3398 description "Low Loss Priority"; 3399 } 3400 } 3401 description 3402 "Loss-priority"; 3403 } 3404 description 3405 "mark-loss-priority container"; 3406 } 3407 description 3408 "mark-loss-priority grouping"; 3409 } 3411 identity exceed-2color-meter-action-drop { 3412 base action:exceed-2color-meter-action-type; 3413 description 3414 "drop action type in a meter"; 3415 } 3417 identity meter-action-mark-fwd-class { 3418 base action:exceed-2color-meter-action-type; 3419 description 3420 "mark forwarding class action type"; 3421 } 3423 identity meter-action-mark-loss-priority { 3424 base action:exceed-2color-meter-action-type; 3425 description 3426 "mark loss-priority action type"; 3427 } 3429 identity violate-3color-meter-action-drop { 3430 base action:violate-3color-meter-action-type; 3431 description 3432 "drop action type in a meter"; 3433 } 3435 augment "/policy:policies/policy:policy-entry/" + 3436 "policy:classifier-entry/" + 3437 "policy:classifier-action-entry-cfg/" + 3438 "policy:action-cfg-params" { 3439 case mark-fwd-class { 3440 uses mark-fwd-class; 3441 description 3442 "Mark forwarding class in the packet"; 3443 } 3444 case mark-loss-priority { 3445 uses mark-loss-priority; 3447 description 3448 "Mark loss priority in the packet"; 3449 } 3450 case discard { 3451 uses action:discard; 3452 description 3453 "Discard action"; 3454 } 3455 description 3456 "Augments common diffserv policy actions"; 3457 } 3459 augment "/action:meter-template" + 3460 "/action:meter-entry" + 3461 "/action:meter-type" + 3462 "/action:one-rate-tri-color-meter-type" + 3463 "/action:one-rate-tri-color-meter" { 3464 leaf one-rate-color-aware { 3465 type boolean; 3466 description 3467 "This defines if the meter is color-aware"; 3468 } 3469 } 3470 augment "/action:meter-template" + 3471 "/action:meter-entry" + 3472 "/action:meter-type" + 3473 "/action:two-rate-tri-color-meter-type" + 3474 "/action:two-rate-tri-color-meter" { 3475 leaf two-rate-color-aware { 3476 type boolean; 3477 description 3478 "This defines if the meter is color-aware"; 3479 } 3480 } 3482 /* example of augmenting a meter template with a 3483 /* vendor specific action */ 3484 augment "/action:meter-template" + 3485 "/action:meter-entry" + 3486 "/action:meter-type" + 3487 "/action:one-rate-two-color-meter-type" + 3488 "/action:one-rate-two-color-meter" + 3489 "/action:exceed-action" + 3490 "/action:exceed-2color-meter-action-params" + 3491 "/action:exceed-2color-meter-action-val" { 3493 case exceed-2color-meter-action-drop { 3494 description 3495 "meter drop"; 3496 uses action:drop; 3497 } 3498 case meter-action-mark-fwd-class { 3499 uses mark-fwd-class; 3500 description 3501 "Mark forwarding class in the packet"; 3502 } 3503 case meter-action-mark-loss-priority { 3504 uses mark-loss-priority; 3505 description 3506 "Mark loss priority in the packet"; 3507 } 3508 } 3510 augment "/action:meter-template" + 3511 "/action:meter-entry" + 3512 "/action:meter-type" + 3513 "/action:two-rate-tri-color-meter-type" + 3514 "/action:two-rate-tri-color-meter" + 3515 "/action:violate-action" + 3516 "/action:violate-3color-meter-action-params" + 3517 "/action:violate-3color-meter-action-val" { 3518 case exceed-3color-meter-action-drop { 3519 description 3520 "meter drop"; 3521 uses action:drop; 3522 } 3524 description 3525 "Augment the actions to the two-color meter"; 3526 } 3528 augment "/action:meter-template" + 3529 "/action:meter-entry" + 3530 "/action:meter-type" + 3531 "/action:one-rate-tri-color-meter-type" + 3532 "/action:one-rate-tri-color-meter" + 3533 "/action:violate-action" + 3534 "/action:violate-3color-meter-action-params" + 3535 "/action:violate-3color-meter-action-val" { 3536 case exceed-3color-meter-action-drop { 3537 description 3538 "meter drop"; 3539 uses action:drop; 3540 } 3541 description 3542 "Augment the actions to basic meter"; 3543 } 3545 } 3546 module example-compb-queue-policy { 3547 yang-version 1.1; 3548 namespace "urn:ietf:params:xml:ns:yang:example-compb-queue-policy"; 3549 prefix queue-plcy; 3551 import ietf-qos-classifier { 3552 prefix classifier; 3553 reference "RFC XXXX: YANG Model for QoS"; 3554 } 3555 import ietf-qos-policy { 3556 prefix policy; 3557 reference "RFC XXXX: YANG Model for QoS"; 3558 } 3560 organization "Company B"; 3561 contact 3562 "Editor: XYZ 3563 "; 3565 description 3566 "This module defines a queue policy. The classification 3567 is based on aforwarding class, and the actions are queues. 3568 Copyright (c) 2019 IETF Trust and the persons identified as 3569 authors of the code. All rights reserved. 3570 Redistribution and use in source and binary forms, with or 3571 without modification, is permitted pursuant to, and subject 3572 to the license terms contained in, the Simplified BSD License 3573 set forth in Section 4.c of the IETF Trust's Legal Provisions 3574 Relating to IETF Documents 3575 (http://trustee.ietf.org/license-info). 3576 This version of this YANG module is part of RFC XXXX; see 3577 the RFC itself for full legal notices."; 3579 revision 2019-03-13 { 3580 description 3581 "Latest revision of diffserv policy"; 3582 reference "RFC XXXX"; 3583 } 3585 identity forwarding-class { 3586 base classifier:filter-type; 3587 description 3588 "Forwarding class filter type"; 3590 } 3592 grouping forwarding-class-cfg { 3593 leaf forwarding-class-cfg { 3594 type string; 3595 description 3596 "forwarding-class name"; 3597 } 3598 description 3599 "Forwarding class filter"; 3600 } 3602 augment "/policy:policies" + 3603 "/policy:policy-entry" + 3604 "/policy:classifier-entry" + 3605 "/policy:filter-entry" { 3606 /* Does NOT support "logical-not" of forwarding class. 3607 Use "must"? */ 3608 choice filter-params { 3609 description 3610 "Choice of filters"; 3611 case forwarding-class-cfg { 3612 uses forwarding-class-cfg; 3613 description 3614 "Filter Type Internal-loss-priority"; 3615 } 3616 } 3617 description 3618 "Augments Diffserv Classifier with fwd class filter"; 3619 } 3621 identity compb-queue { 3622 base policy:action-type; 3623 description 3624 "compb-queue action type"; 3625 } 3627 grouping compb-queue-name { 3628 container queue-name { 3629 leaf name { 3630 type string; 3631 description 3632 "Queue class name"; 3633 } 3634 description 3635 "compb queue container"; 3636 } 3637 description 3638 "compb-queue grouping"; 3639 } 3641 augment "/policy:policies" + 3642 "/policy:policy-entry" + 3643 "/policy:classifier-entry" + 3644 "/policy:classifier-action-entry-cfg" { 3645 choice action-cfg-params { 3646 description 3647 "Choice of action types"; 3648 case compb-queue { 3649 uses compb-queue-name; 3650 } 3651 } 3652 description 3653 "Augment the queue actions to queue policy entry"; 3654 } 3655 } 3657 module example-compb-queue { 3658 yang-version 1.1; 3659 namespace "urn:ietf:params:xml:ns:yang:ietf-compb-queue"; 3660 prefix compb-queue; 3662 import ietf-qos-action { 3663 prefix action; 3664 reference "RFC XXXX: YANG Model for QoS"; 3665 } 3667 organization "Company B"; 3668 contact 3669 "Editor: XYZ 3670 "; 3672 description 3673 "This module describes a compb queue module. This is a 3674 template for a queue within a queue policy, referenced 3675 by name. 3677 This version of this YANG module is part of RFC XXXX; see 3678 the RFC itself for full legal notices."; 3680 revision 2019-03-13 { 3681 description 3682 "Latest revision of diffserv based classifier"; 3683 reference "RFC XXXX"; 3684 } 3685 container compb-queue { 3686 description 3687 "Queue used in compb architecture"; 3688 leaf name { 3689 type string; 3690 description 3691 "A unique name identifying this queue"; 3692 } 3693 uses action:queue; 3694 container excess-rate { 3695 choice excess-rate-type { 3696 case percent { 3697 leaf excess-rate-percent { 3698 type uint32 { 3699 range "1..100"; 3700 } 3701 description 3702 "excess-rate-percent"; 3703 } 3704 } 3705 case proportion { 3706 leaf excess-rate-poroportion { 3707 type uint32 { 3708 range "1..1000"; 3709 } 3710 description 3711 "excess-rate-poroportion"; 3712 } 3713 } 3714 description 3715 "Choice of excess-rate type"; 3716 } 3717 description 3718 "Excess rate value"; 3719 } 3720 leaf excess-priority { 3721 type enumeration { 3722 enum high { 3723 description "High Loss Priority"; 3724 } 3725 enum medium-high { 3726 description "Medium-high Loss Priority"; 3727 } 3728 enum medium-low { 3729 description "Medium-low Loss Priority"; 3730 } 3731 enum low { 3732 description "Low Loss Priority"; 3734 } 3735 enum none { 3736 description "No excess priority"; 3737 } 3738 } 3739 description 3740 "Priority of excess (above guaranted rate) traffic"; 3741 } 3742 container buffer-size { 3743 choice buffer-size-type { 3744 case percent { 3745 leaf buffer-size-percent { 3746 type uint32 { 3747 range "1..100"; 3748 } 3749 description 3750 "buffer-size-percent"; 3751 } 3752 } 3753 case temporal { 3754 leaf buffer-size-temporal { 3755 type uint64; 3756 units "microsecond"; 3757 description 3758 "buffer-size-temporal"; 3759 } 3760 } 3761 case remainder { 3762 leaf buffer-size-remainder { 3763 type empty; 3764 description 3765 "use remaining of buffer"; 3766 } 3767 } 3768 description 3769 "Choice of buffer size type"; 3770 } 3771 description 3772 "Buffer size value"; 3773 } 3774 } 3776 augment 3777 "/compb-queue" + 3778 "/queue-cfg" + 3779 "/algorithmic-drop-cfg" + 3780 "/drop-algorithm" { 3781 case random-detect { 3782 list drop-profile-list { 3783 key "priority"; 3784 description 3785 "map of priorities to drop-algorithms"; 3786 leaf priority { 3787 type enumeration { 3788 enum any { 3789 description "Any priority mapped here"; 3790 } 3791 enum high { 3792 description "High Priority Packet"; 3793 } 3794 enum medium-high { 3795 description "Medium-high Priority Packet"; 3796 } 3797 enum medium-low { 3798 description "Medium-low Priority Packet"; 3799 } 3800 enum low { 3801 description "Low Priority Packet"; 3802 } 3803 } 3804 description 3805 "Priority of guaranteed traffic"; 3806 } 3807 leaf drop-profile { 3808 type string; 3809 description 3810 "drop profile to use for this priority"; 3811 } 3812 } 3813 } 3814 description 3815 "compb random detect drop algorithm config"; 3816 } 3817 } 3819 module example-compb-scheduler-policy { 3820 yang-version 1.1; 3821 namespace "urn:ietf:params:xml:ns:yang:" + 3822 "example-compb-scheduler-policy"; 3823 prefix scheduler-plcy; 3825 import ietf-qos-action { 3826 prefix action; 3827 reference "RFC XXXX: YANG Model for QoS"; 3828 } 3829 import ietf-qos-policy { 3830 prefix policy; 3831 reference "RFC XXXX: YANG Model for QoS"; 3832 } 3834 organization "Company B"; 3835 contact 3836 "Editor: XYZ 3837 "; 3839 description 3840 "This module defines a scheduler policy. The classification 3841 is based on classifier-any, and the action is a scheduler."; 3843 revision 2019-03-13 { 3844 description 3845 "Latest revision of diffserv policy"; 3846 reference "RFC XXXX"; 3847 } 3849 identity queue-policy { 3850 base policy:action-type; 3851 description 3852 "forwarding-class-queue action type"; 3853 } 3855 grouping queue-policy-name { 3856 container compb-queue-policy-name { 3857 leaf name { 3858 type string; 3859 description 3860 "Queue policy name"; 3861 } 3862 description 3863 "compb-queue-policy container"; 3864 } 3865 description 3866 "compb-queue policy grouping"; 3867 } 3869 augment "/policy:policies" + 3870 "/policy:policy-entry" + 3871 "/policy:classifier-entry" + 3872 "/policy:classifier-action-entry-cfg" { 3873 choice action-cfg-params { 3874 case schedular { 3875 uses action:schedular; 3876 } 3877 case queue-policy { 3878 uses queue-policy-name; 3879 } 3880 description 3881 "Augment the scheduler policy with a queue policy"; 3882 } 3883 } 3884 } 3886 A.3. Example of Company C Diffserv Model 3888 Company C vendor augmentation is based on Ericsson's implementation 3889 differentiated QoS. This implementation first sorts traffic based on 3890 a classifier, which can sort traffic into one or more traffic 3891 forwarding classes. Then, a policer or meter policy references the 3892 classifier and its traffic forwarding classes to specify different 3893 service levels for each traffic forwarding class. 3895 Because each classifier sorts traffic into one or more traffic 3896 forwarding classes, this type of classifier does not align with ietf- 3897 qos-classifier.yang, which defines one traffic forwarding class per 3898 classifier. Additionally, Company C's policing and metering policies 3899 relies on the classifier's pre-defined traffic forwarding classes to 3900 provide differentiated services, rather than redefining the patterns 3901 within a policing or metering policy, as is defined in ietf- 3902 diffserv.yang. 3904 Due to these differences, even though Company C uses all the building 3905 blocks of classifier and policy, Company C's augmentation does not 3906 use ietf-diffserv.yang to provide differentiated service levels. 3907 Instead, Company C's augmentation uses the basic building blocks, 3908 ietf-qos-policy.yang to provide differentiated services. 3910 module example-compc-qos-policy { 3911 yang-version 1.1; 3912 namespace "urn:example-compc-qos-policy"; 3913 prefix "compcqos"; 3915 import ietf-qos-policy { 3916 prefix "pol"; 3917 reference "RFC XXXX: YANG Model for QoS"; 3918 } 3920 import ietf-qos-action { 3921 prefix "action"; 3922 reference "RFC XXXX: YANG Model for QoS"; 3923 } 3924 organization ""; 3925 contact ""; 3926 description ""; 3928 revision 2019-03-13 { 3929 description ""; 3930 reference ""; 3931 } 3933 /* identities */ 3935 identity compc-qos-policy { 3936 base pol:policy-type; 3937 } 3939 identity mdrr-queuing-policy { 3940 base compc-qos-policy; 3941 } 3943 identity pwfq-queuing-policy { 3944 base compc-qos-policy; 3945 } 3947 identity policing-policy { 3948 base compc-qos-policy; 3949 } 3951 identity metering-policy { 3952 base compc-qos-policy; 3953 } 3955 identity forwarding-policy { 3956 base compc-qos-policy; 3957 } 3959 identity overhead-profile-policy { 3960 base compc-qos-policy; 3961 } 3963 identity resource-profile-policy { 3964 base compc-qos-policy; 3965 } 3967 identity protocol-rate-limit-policy { 3968 base compc-qos-policy; 3969 } 3971 identity compc-qos-action { 3972 base pol:action-type; 3973 } 3975 /* groupings */ 3977 grouping redirect-action-grp { 3978 container redirect { 3979 /* Redirect options */ 3980 } 3981 } 3983 /* deviations */ 3985 deviation "/pol:policies/pol:policy-entry" { 3986 deviate add { 3987 must "pol:type = compc-qos-policy" { 3988 description 3989 "Only policy types drived from compc-qos-policy " + 3990 "are supported"; 3991 } 3992 } 3993 } 3995 deviation "/pol:policies/pol:policy-entry/pol:classifier-entry" { 3996 deviate add { 3997 must "../per-class-action = 'true'" { 3998 description 3999 "Only policies with per-class actions have classifiers"; 4000 } 4001 must "((../sub-type != 'mdrr-queuing-policy') and " + 4002 " (../sub-type != 'pwfq-queuing-policy')) or " + 4003 "(((../sub-type = 'mdrr-queuing-policy') or " + 4004 " (../sub-type = 'pwfq-queueing-policy')) and " + 4005 " ((classifier-entry-name = '0') or " + 4006 " (classifier-entry-name = '1') or " + 4007 " (classifier-entry-name = '2') or " + 4008 " (classifier-entry-name = '3') or " + 4009 " (classifier-entry-name = '4') or " + 4010 " (classifier-entry-name = '5') or " + 4011 " (classifier-entry-name = '6') or " + 4012 " (classifier-entry-name = '7') or " + 4013 " (classifier-entry-name = '8')))" { 4014 description 4015 "MDRR queuing policy's or PWFQ queuing policy's " + 4016 "classifier-entry-name is limited to the listed values"; 4017 } 4018 } 4019 } 4020 deviation "/pol:policies/pol:policy-entry/pol:classifier-entry" + 4021 "/pol:classifier-action-entry-cfg" { 4022 deviate add { 4023 max-elements 1; 4024 must "action-type = 'compc-qos-action'" { 4025 description 4026 "Only compc-qos-action is allowed"; 4027 } 4028 } 4029 } 4031 /* augments */ 4033 augment "/pol:policies/pol:policy-entry" { 4034 when "pol:type = 'compc-qos-policy')" { 4035 description 4036 "Additional nodes only for diffserv-policy"; 4037 } 4038 leaf sub-type { 4039 type identityref { 4040 base compc-qos-policy; 4041 } 4042 mandatory true; 4043 /* The value of this leaf must not change once configured */ 4044 } 4045 leaf per-class-action { 4046 mandatory true; 4047 type boolean; 4048 must "(((. = 'true') and " + 4049 " ((../sub-type = 'policing-policy') or " + 4050 " (../sub-type = 'metering-policy') or " + 4051 " (../sub-type = 'mdrr-queuing-policy') or " + 4052 " (../sub-type = 'pwfq-queuing-policy') or " + 4053 " (../sub-type = 'forwarding-policy'))) or " + 4054 " ((. = 'false') and " + 4055 " ((../sub-type = 'overhead-profile-policy') or " + 4056 " (../sub-type = 'resource-profile-policy') or " + 4057 " (../sub-type = 'protocol-rate-limit-policy')))" { 4058 description 4059 "Only certain policies have per-class action"; 4060 } 4061 } 4062 container traffic-classifier { 4063 presence true; 4064 when "../sub-type = 'policing-policy' or " + 4065 "../sub-type = 'metering-policy' or " + 4066 "../sub-type = 'forwarding-policy'" { 4067 description 4068 "A classifier for policing-policy or metering-policy"; 4069 } 4070 leaf name { 4071 type string; 4072 mandatory true; 4073 description 4074 "Traffic classifier name"; 4075 } 4076 leaf type { 4077 type enumeration { 4078 enum 'internal-dscp-only-classifier' { 4079 value 0; 4080 description 4081 "Classify traffic based on (internal) dscp only"; 4082 } 4083 enum 'ipv4-header-based-classifier' { 4084 value 1; 4085 description 4086 "Classify traffic based on IPv4 packet header fields"; 4087 } 4088 enum 'ipv6-header-based-classifier' { 4089 value 2; 4090 description 4091 "Classify traffic based on IPv6 packet header fields"; 4092 } 4093 } 4094 mandatory true; 4095 description 4096 "Traffic classifier type"; 4097 } 4098 } 4099 container traffic-queue { 4100 when "(../sub-type = 'mdrr-queuing-policy') or " + 4101 "(../sub-type = 'pwfq-queuing-policy')" { 4102 description 4103 "Queuing policy properties"; 4104 } 4105 leaf queue-map { 4106 type string; 4107 description 4108 "Traffic queue map for queuing policy"; 4109 } 4110 } 4111 container overhead-profile { 4112 when "../sub-type = 'overhead-profile-policy'" { 4113 description 4114 "Overhead profile policy properties"; 4115 } 4117 } 4118 container resource-profile { 4119 when "../sub-type = 'resource-profile-policy'" { 4120 description 4121 "Resource profile policy properties"; 4122 } 4123 } 4124 container protocol-rate-limit { 4125 when "../sub-type = 'protocol-rate-limit-policy'" { 4126 description 4127 "Protocol rate limit policy properties"; 4128 } 4129 } 4130 } 4132 augment "/pol:policies/pol:policy-entry/pol:classifier-entry" + 4133 "/pol:classifier-action-entry-cfg/pol:action-cfg-params" { 4134 when "../../../pol:type = 'compc-qos-policy')" { 4135 description 4136 "Configurations for a classifier-policy-type policy"; 4137 } 4138 case metering-or-policing-policy { 4139 when "../../../sub-type = 'policing-policy' or " 4140 + "../../../sub-type = 'metering-policy'" { 4141 } 4142 container dscp-marking { 4143 uses action:dscp-marking; 4144 } 4145 container precedence-marking { 4146 uses action:dscp-marking; 4147 } 4148 container priority-marking { 4149 uses action:priority; 4150 } 4151 container rate-limiting { 4152 uses action:one-rate-two-color-meter; 4153 } 4154 } 4155 case mdrr-queuing-policy { 4156 when "../../../sub-type = 'mdrr-queuing-policy'" { 4157 description 4158 "MDRR queue handling properties for the traffic " + 4159 "classified into current queue"; 4160 } 4161 leaf mdrr-queue-weight { 4162 type uint8 { 4163 range "20..100"; 4164 } 4165 units percentage; 4166 } 4167 } 4168 case pwfq-queuing-policy { 4169 when "../../../sub-type = 'pwfq-queuing-policy'" { 4170 description 4171 "PWFQ queue handling properties for traffic " + 4172 "classified into current queue"; 4173 } 4174 leaf pwfq-queue-weight { 4175 type uint8 { 4176 range "20..100"; 4177 } 4178 units percentage; 4179 } 4180 leaf pwfq-queue-priority { 4181 type uint8; 4182 } 4183 leaf pwfq-queue-rate { 4184 type uint8; 4185 } 4186 } 4187 case forwarding-policy { 4188 when "../../../sub-type = 'forwarding-policy'" { 4189 description 4190 "Forward policy handling properties for traffic " + 4191 "in this classifier"; 4192 } 4193 uses redirect-action-grp; 4194 } 4195 description 4196 "Add the classify action configuration"; 4197 } 4199 } 4201 Authors' Addresses 4203 Aseem Choudhary 4204 Cisco Systems 4205 170 W. Tasman Drive 4206 San Jose, CA 95134 4207 US 4209 Email: asechoud@cisco.com 4210 Mahesh Jethanandani 4211 Cisco Systems 4212 170 W. Tasman Drive 4213 San Jose, CA 95134 4214 US 4216 Email: mjethanandani@gmail.com 4218 Norm Strahle 4219 Juniper Networks 4220 1194 North Mathilda Avenue 4221 Sunnyvale, CA 94089 4222 US 4224 Email: nstrahle@juniper.net 4226 Ebben Aries 4227 Juniper Networks 4228 1194 North Mathilda Avenue 4229 Sunnyvale, CA 94089 4230 US 4232 Email: exa@juniper.net 4234 Ing-Wher Chen 4235 Jabil 4237 Email: ing-wher_chen@jabil.com