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