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