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