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