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