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