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