idnits 2.17.1 draft-asechoud-rtgwg-qos-model-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == It seems as if not all pages are separated by form feeds - found 0 form feeds but 77 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 182 has weird spacing: '...cal-not boo...' == Line 204 has weird spacing: '...cal-not boo...' == Line 206 has weird spacing: '...on-type ide...' == Line 299 has weird spacing: '...cy-type ide...' == Line 300 has weird spacing: '...cy-name str...' == (24 more instances...) -- The document date (March 17, 2018) is 2232 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 (~~), 8 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Choudhary 3 Internet-Draft M. Jethanandani 4 Intended status: Standards Track Cisco Systems 5 Expires: September 18, 2018 N. Strahle 6 E. Aries 7 Juniper Networks 8 I. Chen 9 Jabil 10 March 17, 2018 12 YANG Model for QoS 13 draft-asechoud-rtgwg-qos-model-05 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 September 18, 2018. 37 Copyright Notice 39 Copyright (c) 2018 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 3. QoS Model Design . . . . . . . . . . . . . . . . . . . . . . 3 57 4. DiffServ Model Design . . . . . . . . . . . . . . . . . . . . 3 58 5. Modules Tree Structure . . . . . . . . . . . . . . . . . . . 4 59 6. Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 60 6.1. IETF-QOS-CLASSIFIER . . . . . . . . . . . . . . . . . . . 10 61 6.2. IETF-QOS-POLICY . . . . . . . . . . . . . . . . . . . . . 14 62 6.3. IETF-QOS-ACTION . . . . . . . . . . . . . . . . . . . . . 17 63 6.4. IETF-QOS-TARGET . . . . . . . . . . . . . . . . . . . . . 34 64 6.5. IETF-DIFFSERV . . . . . . . . . . . . . . . . . . . . . . 36 65 7. Security Considerations . . . . . . . . . . . . . . . . . . . 45 66 8. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 45 67 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 45 68 9.1. Normative References . . . . . . . . . . . . . . . . . . 45 69 9.2. Informative References . . . . . . . . . . . . . . . . . 46 70 Appendix A. Company A, Company B and Company C examples . . . . 46 71 A.1. Example of Company A Diffserv Model . . . . . . . . . . . 46 72 A.2. Example of Company B Diffserv Model . . . . . . . . . . . 55 73 A.3. Example of Company C Diffserv Model . . . . . . . . . . . 69 74 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 76 76 1. Introduction 78 This document defines a base YANG [RFC6020] data module for Quality 79 of Service (QoS) configuration parameters. Differentiated Services 80 (DiffServ) module is an augmentation of the base QoS model. Remote 81 Procedure Calls (RPC) or notification definition is currently not 82 part of this document and will be added later if necessary. QoS base 83 modules define a basic building blocks to define a classifier, 84 policy, action and target. The base modules have been augmented to 85 include packet match fields and action parameters to define the 86 DiffServ module. It is left up to individual vendors to stitch some 87 of the actions like queues, random-detect (RED) and vendor specific 88 parameters of the DiffServ policy definitions. Designing the module 89 in this manner allows for a very flexible and extensible module that 90 should fit in with most of the vendor requirements. The DiffServ 91 model is based on DiffServ architecture, and various references have 92 been made to available standard architecture documents. 94 DiffServ is a preferred approach for network service providers to 95 offer services to different customers based on their network Quality- 96 of-Service (QoS) objectives. The traffic streams are differentiated 97 based on DiffServ Code Points (DSCP) carried in the IP header of each 98 packet. The DSCP markings are applied by upstream node or by the 99 edge router on entry to the DiffServ network. 101 2. Terminology 103 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 104 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 105 document are to be interpreted as described in [RFC2119]. 107 3. QoS Model Design 109 A classifier consists of packets which may be grouped when a logical 110 set of rules are applied on different packet header fields. The 111 grouping may be based on different values or range of values of same 112 packet header field, presence or absence of some values or range of 113 values of a packet field or a combination thereof. The QoS 114 classifier is defined in the ietf-qos-classifier module. 116 A classifier entry contains one or more packet conditioning 117 functions. A packet conditioning function is typically based on 118 direction of traffic and may drop, mark or delay network packets. A 119 set of classifier entries with corresponding conditioning functions 120 when arranged in order of priority represents a QoS policy. A QoS 121 policy may contain one or more classifier entries. These are defined 122 in ietf-qos-policy module. 124 Actions are configured in line with respect to the policy module. 125 These include marking, dropping or shaping. Actions are defined in 126 the ietf-qos-action module. 128 A meter qualifies if the traffic arrival rate is based on agreed upon 129 rate and variability. A meter is modeled based on commonly used 130 alogrithms in industry, Single Rate Tri Color Marking (srTCM) 131 [RFC2697] meter, Two Rate Tri Color Marking (trTCM) [RFC2698] meter, 132 and Single Rate Two Color Marking meter. Different vendors can 133 extend it with other types of meters as well. 135 4. DiffServ Model Design 137 DiffServ architecture [RFC3289] and [RFC2475] describe the 138 architecture as a simple model where traffic entering a network is 139 classified and possibly conditioned at the boundary of the network 140 and assigned a different Behavior Aggregate (BA). Each BA is 141 identified by a specific value of DSCP, and is used to select a Per 142 Hop Behavior (PHB). 144 The packet classification policy identifies the subset of traffic 145 which may receive a DiffServ by being conditioned or mapped. Packet 146 classifiers select packets within a stream based on the content of 147 some portion of the packet header. There are two types of 148 classifiers, the BA classifier, and the Multi-Field (MF) classifier 149 which selects packets based on a value which is combination of one or 150 more header fields. In the ietf-diffserv module, this is realized by 151 augmenting the QoS classification module. 153 Traffic conditioning includes metering, shaping and/or marking. A 154 meter is used to measure the traffic against a given traffic profile. 155 The traffic profile specifies the temporal property of the traffic. 156 A packet that arrives is first determined to be in or out of the 157 profile, which will result in the action of marked, dropped or 158 shaped. This is realized in vendor specific modules based on the 159 parameters defined in action module. The metering parameters are 160 augmented to the QoS policy module when metering is defined inline, 161 and to the metering template when metering profile is referred in 162 policy module. 164 5. Modules Tree Structure 166 This document defines five YANG modules - four QoS base modules and 167 one DiffServ module. 169 ietf-qos-classifier consists of classifier entries identified by a 170 classifier entry name. Each entry MAY contain a list of filter 171 entries. When no filter entry is present in a classifier entry, it 172 matches all traffic. 174 module: ietf-qos-classifier 175 +--rw classifiers 176 +--rw classifier-entry* [classifier-entry-name] 177 +--rw classifier-entry-name string 178 +--rw classifier-entry-descr? string 179 +--rw classifier-entry-filter-operation? identityref 180 +--rw filter-entry* [filter-type filter-logical-not] 181 +--rw filter-type identityref 182 +--rw filter-logical-not boolean 184 An ietf-qos-policy module contains list of policy objects identified 185 by a policy name and policy type which MUST be provided. With 186 different values of policy types, each vendor MAY define their own 187 construct of policy for different QoS functionalities. Each vendor 188 MAY augment classifier entry in a policy definition with a set of 189 actions. 191 module: ietf-qos-policy 192 +--rw policies 193 +--rw policy-entry* [policy-name policy-type] 194 +--rw policy-name string 195 +--rw policy-type identityref 196 +--rw policy-descr? string 197 +--rw classifier-entry* [classifier-entry-name] 198 +--rw classifier-entry-name string 199 +--rw classifier-entry-inline? boolean 200 +--rw classifier-entry-filter-oper? identityref 201 +--rw filter-entry* [filter-type filter-logical-not] 202 {policy-inline-classifier-config}? 203 | +--rw filter-type identityref 204 | +--rw filter-logical-not boolean 205 +--rw classifier-action-entry-cfg* [action-type] 206 +--rw action-type identityref 207 +--rw (action-cfg-params)? 209 ietf-qos-action module contains grouping of set of QoS actions. 210 These include metering, marking, dropping and shaping. Marking sets 211 DiffServ codepoint value in the classified packet. Color-aware and 212 Color-blind meters are augmented by vendor specific modules based on 213 the parameters defined in action module. 215 module: ietf-qos-action 216 +--rw meter-template 217 +--rw meter-entry* [meter-name] {meter-template-support}? 218 +--rw meter-name string 219 +--rw (meter-type)? 220 +--:(one-rate-two-color-meter-type) 221 | +--rw one-rate-two-color-meter 222 | +--rw meter-rate? uint64 223 | +--rw meter-burst? uint64 224 | +--rw conform-action 225 | | +--rw conform-2color-meter-action-params* 226 [conform-2color-meter-action-type] 227 | | +--rw conform-2color-meter-action-type 228 identityref 229 | | +--rw (conform-2color-meter-action-val)? 230 | +--rw exceed-action 231 | +--rw exceed-2color-meter-action-params* 232 [exceed-2color-meter-action-type] 233 | +--rw exceed-2color-meter-action-type 234 identityref 235 | +--rw (exceed-2color-meter-action-val)? 236 +--:(one-rate-tri-color-meter-type) 237 | +--rw one-rate-tri-color-meter 238 | +--rw committed-rate? uint64 239 | +--rw committed-burst? uint64 240 | +--rw excess-burst? uint64 241 | +--rw conform-action 242 | | +--rw conform-3color-meter-action-params* 243 [conform-3color-meter-action-type] 244 | | +--rw conform-3color-meter-action-type 245 identityref 246 | | +--rw (conform-3color-meter-action-val)? 247 | +--rw exceed-action 248 | | +--rw exceed-3color-meter-action-params* 249 [exceed-3color-meter-action-type] 250 | | +--rw exceed-3color-meter-action-type 251 identityref 252 | | +--rw (exceed-3color-meter-action-val)? 253 | +--rw violate-action 254 | +--rw violate-3color-meter-action-params* 255 [violate-3color-meter-action-type] 256 | +--rw violate-3color-meter-action-type 257 identityref 258 | +--rw (violate-3color-meter-action-val)? 259 +--:(two-rate-tri-color-meter-type) 260 +--rw two-rate-tri-color-meter 261 +--rw committed-rate? uint64 262 +--rw committed-burst? uint64 263 +--rw peak-rate? uint64 264 +--rw peak-burst? uint64 265 +--rw conform-action 266 | +--rw conform-3color-meter-action-params* 267 [conform-3color-meter-action-type] 268 | +--rw conform-3color-meter-action-type 269 identityref 270 | +--rw (conform-3color-meter-action-val)? 271 +--rw exceed-action 272 | +--rw exceed-3color-meter-action-params* 273 [exceed-3color-meter-action-type] 274 | +--rw exceed-3color-meter-action-type 275 identityref 276 | +--rw (exceed-3color-meter-action-val)? 277 +--rw violate-action 278 +--rw violate-3color-meter-action-params* 279 [violate-3color-meter-action-type] 280 +--rw violate-3color-meter-action-type 281 identityref 282 +--rw (violate-3color-meter-action-val)? 284 ietf-qos-target module contains reference of qos-policy and augments 285 ietf-interfaces [RFC7223] module. A single policy of a particular 286 policy-type can be applied on an interface in each direction of 287 traffic. Policy-type is of type identity and is populated in a 288 vendor specific manner. This way it provides greater flexibility for 289 each vendor to define different policy types each with its own 290 capabilities and restrictions. 292 Classifier, metering and queuing counters are associated with a 293 target. 295 module: ietf-qos-target 296 augment /if:interfaces/if:interface: 297 +--rw qos-target-entry* [direction policy-type] 298 +--rw direction identityref 299 +--rw policy-type identityref 300 +--rw policy-name string 302 Diffserv module augments QoS classifier module. Many of the YANG 303 types defined in [RFC6991] are represented as leafs in the classifier 304 module. 306 Metering and marking actions are realized by augmenting the QoS 307 policy-module. Any queuing, AQM and scheduling actions are part of 308 vendor specific augmentation. Statistics are realized by augmenting 309 the QoS target module. 311 module: ietf-diffserv 312 augment "/classifier:classifiers/classifier:classifier-entry" + 313 "/classifier:filter-entry:" 314 +--rw (filter-param)? 315 +--:(dscp) 316 | +--rw dscp-cfg* [dscp-min dscp-max] 317 | +--rw dscp-min inet:dscp 318 | +--rw dscp-max inet:dscp 319 +--:(source-ipv4-address) 320 | +--rw source-ipv4-address-cfg* [source-ipv4-addr] 321 | +--rw source-ipv4-addr inet:ipv4-prefix 322 +--:(destination-ipv4-address) 323 | +--rw destination-ipv4-address-cfg* [destination-ipv4-addr] 324 | +--rw destination-ipv4-addr inet:ipv4-prefix 325 +--:(source-ipv6-address) 326 | +--rw source-ipv6-address-cfg* [source-ipv6-addr] 327 | +--rw source-ipv6-addr inet:ipv6-prefix 328 +--:(destination-ipv6-address) 329 | +--rw destination-ipv6-address-cfg* [destination-ipv6-addr] 330 | +--rw destination-ipv6-addr inet:ipv6-prefix 331 +--:(source-port) 332 | +--rw source-port-cfg* [source-port-min source-port-max] 333 | +--rw source-port-min inet:port-number 334 | +--rw source-port-max inet:port-number 335 +--:(destination-port) 336 | +--rw destination-port-cfg* 337 [destination-port-min destination-port-max] 338 | +--rw destination-port-min inet:port-number 339 | +--rw destination-port-max inet:port-number 340 +--:(protocol) 341 +--rw protocol-cfg* [protocol-min protocol-max] 342 +--rw protocol-min uint8 343 +--rw protocol-max uint8 344 augment "/policy:policies/policy:policy-entry/" + 345 "policy:classifier-entry/policy:filter-entry:" 346 +--rw (filter-params)? 347 +--:(dscp) 348 | +--rw dscp-cfg* [dscp-min dscp-max] 349 | +--rw dscp-min inet:dscp 350 | +--rw dscp-max inet:dscp 351 +--:(source-ipv4-address) 352 | +--rw source-ipv4-address-cfg* [source-ipv4-addr] 353 | +--rw source-ipv4-addr inet:ipv4-prefix 354 +--:(destination-ipv4-address) 355 | +--rw destination-ipv4-address-cfg* [destination-ipv4-addr] 356 | +--rw destination-ipv4-addr inet:ipv4-prefix 357 +--:(source-ipv6-address) 358 | +--rw source-ipv6-address-cfg* [source-ipv6-addr] 359 | +--rw source-ipv6-addr inet:ipv6-prefix 360 +--:(destination-ipv6-address) 361 | +--rw destination-ipv6-address-cfg* [destination-ipv6-addr] 362 | +--rw destination-ipv6-addr inet:ipv6-prefix 363 +--:(source-port) 364 | +--rw source-port-cfg* [source-port-min source-port-max] 365 | +--rw source-port-min inet:port-number 366 | +--rw source-port-max inet:port-number 367 +--:(destination-port) 368 | +--rw destination-port-cfg* 369 [destination-port-min destination-port-max] 370 | +--rw destination-port-min inet:port-number 371 | +--rw destination-port-max inet:port-number 372 +--:(protocol) 373 +--rw protocol-cfg* [protocol-min protocol-max] 374 +--rw protocol-min uint8 375 +--rw protocol-max uint8 376 augment "/policy:policies/policy:policy-entry/" + 377 "policy:classifier-entry/policy:classifier-action-entry-cfg:" 378 +--rw (action-cfg-params)? 379 +--:(dscp-marking) 380 | +--rw dscp-cfg 381 | +--rw dscp? inet:dscp 382 +--:(meter-inline) {action:meter-inline-feature}? 383 | +--rw (meter-type)? 384 | +--:(one-rate-two-color-meter-type) 385 | | +--rw one-rate-two-color-meter 386 | | +--rw meter-rate? uint64 387 | | +--rw meter-burst? uint64 388 | | +--rw conform-action 389 | | | +--rw conform-2color-meter-action-params* 390 [conform-2color-meter-action-type] 391 | | | +--rw conform-2color-meter-action-type 392 identityref 393 | | | +--rw (conform-2color-meter-action-val)? 394 | | +--rw exceed-action 395 | | +--rw exceed-2color-meter-action-params* 396 [exceed-2color-meter-action-type] 397 | | +--rw exceed-2color-meter-action-type 398 identityref 399 | | +--rw (exceed-2color-meter-action-val)? 400 | +--:(one-rate-tri-color-meter-type) 401 | | +--rw one-rate-tri-color-meter 402 | | +--rw committed-rate? uint64 403 | | +--rw committed-burst? uint64 404 | | +--rw excess-burst? uint64 405 | | +--rw conform-action 406 | | | +--rw conform-3color-meter-action-params* 407 [conform-3color-meter-action-type] 408 | | | +--rw conform-3color-meter-action-type 409 identityref 410 | | | +--rw (conform-3color-meter-action-val)? 411 | | +--rw exceed-action 412 | | | +--rw exceed-3color-meter-action-params* 413 [exceed-3color-meter-action-type] 414 | | | +--rw exceed-3color-meter-action-type 415 identityref 416 | | | +--rw (exceed-3color-meter-action-val)? 417 | | +--rw violate-action 418 | | +--rw violate-3color-meter-action-params* 419 [violate-3color-meter-action-type] 420 | | +--rw violate-3color-meter-action-type 421 identityref 422 | | +--rw (violate-3color-meter-action-val)? 423 | +--:(two-rate-tri-color-meter-type) 424 | +--rw two-rate-tri-color-meter 425 | +--rw committed-rate? uint64 426 | +--rw committed-burst? uint64 427 | +--rw peak-rate? uint64 428 | +--rw peak-burst? uint64 429 | +--rw conform-action 430 | | +--rw conform-3color-meter-action-params* 431 [conform-3color-meter-action-type] 432 | | +--rw conform-3color-meter-action-type 433 identityref 434 | | +--rw (conform-3color-meter-action-val)? 435 | +--rw exceed-action 436 | | +--rw exceed-3color-meter-action-params* 437 [exceed-3color-meter-action-type] 438 | | +--rw exceed-3color-meter-action-type 439 identityref 440 | | +--rw (exceed-3color-meter-action-val)? 441 | +--rw violate-action 442 | +--rw violate-3color-meter-action-params* 443 [violate-3color-meter-action-type] 444 | +--rw violate-3color-meter-action-type 445 identityref 446 | +--rw (violate-3color-meter-action-val)? 447 +--:(meter-reference) {action:meter-reference-feature}? 448 | +--rw meter-reference-cfg 449 | +--rw meter-reference-name? string 450 | +--rw meter-type identityref 451 +--:(child-policy) {action:child-policy-feature}? 452 | +--rw child-policy-cfg {child-policy-feature}? 453 | +--rw policy-name? string 454 +--:(count) {action:count-feature}? 455 | +--rw count-cfg 456 | +--rw count-action? empty 457 +--:(named-count) {action:named-counter-feature}? 458 +--rw named-counter-cfg 459 +--rw count-name-action? string 461 6. Modules 463 6.1. IETF-QOS-CLASSIFIER 465 file "ietf-qos-classifier@2018-03-03.yang" 466 module ietf-qos-classifier { 467 yang-version 1.1; 468 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-classifier"; 469 prefix classifier; 471 organization 472 "IETF RTG (Routing Area) Working Group"; 473 contact 474 "WG Web: 475 WG List: 476 WG Chair: Chris Bowers 477 478 WG Chair: Jeff Tantsura 479 480 Editor: Aseem Choudhary 481 482 Editor: Mahesh Jethanandani 483 484 Editor: Norm Strahle 485 "; 486 description 487 "This module contains a collection of YANG definitions for 488 configuring qos specification implementations. 489 Copyright (c) 2014 IETF Trust and the persons identified as 490 authors of the code. All rights reserved. 491 Redistribution and use in source and binary forms, with or 492 without modification, is permitted pursuant to, and subject 493 to the license terms contained in, the Simplified BSD License 494 set forth in Section 4.c of the IETF Trust's Legal Provisions 495 Relating to IETF Documents 496 (http://trustee.ietf.org/license-info). 497 This version of this YANG module is part of RFC XXXX; see 498 the RFC itself for full legal notices."; 500 revision 2018-03-03 { 501 description 502 "Latest revision of qos base classifier module"; 503 reference "RFC XXXX"; 504 } 506 feature policy-inline-classifier-config { 507 description 508 " This feature allows classifier configuration 509 directly under policy."; 510 } 512 feature classifier-template-feature { 513 description 514 " This feature allows classifier as template configuration 515 in a policy."; 516 } 518 feature match-any-filter-type-support { 519 description 520 " This feature allows classifier configuration 521 directly under policy."; 522 } 523 identity filter-type { 524 description 525 "This is identity of base filter-type"; 526 } 528 identity classifier-entry-filter-operation-type { 529 description 530 "Classifier entry filter logical operation"; 531 } 533 identity match-all-filter { 534 base classifier-entry-filter-operation-type; 535 description 536 "Classifier entry filter logical AND operation"; 537 } 539 identity match-any-filter { 540 base classifier-entry-filter-operation-type; 541 if-feature "match-any-filter-type-support"; 542 description 543 "Classifier entry filter logical OR operation"; 544 } 546 grouping filters { 547 description 548 "Filters types in a Classifier entry"; 549 leaf filter-type { 550 type identityref { 551 base filter-type; 552 } 553 description 554 "This leaf defines type of the filter"; 555 } 556 leaf filter-logical-not { 557 type boolean; 558 description 559 " 560 This is logical-not operator for a filter. When true, it 561 indicates filter looks for absence of a pattern defined 562 by the filter 563 "; 564 } 565 } 567 grouping classifier-entry-generic-attr { 568 description 569 " 570 Classifier generic attributes like name, 571 description, operation type 572 "; 573 leaf classifier-entry-name { 574 type string; 575 description 576 "classifier entry name"; 577 } 578 leaf classifier-entry-descr { 579 type string; 580 description 581 "classifier entry description statement"; 582 } 583 leaf classifier-entry-filter-operation { 584 type identityref { 585 base classifier-entry-filter-operation-type; 586 } 587 default "match-all-filter"; 588 description 589 "Filters are applicable as match-any or match-all filters"; 590 } 591 } 593 grouping classifier-entry-inline-attr { 594 description 595 "attributes of inline classifier in a policy"; 596 leaf classifier-entry-inline { 597 type boolean; 598 default "false"; 599 description 600 "Indication of inline classifier entry"; 601 } 602 leaf classifier-entry-filter-oper { 603 type identityref { 604 base classifier-entry-filter-operation-type; 605 } 606 default "match-all-filter"; 607 description 608 "Filters are applicable as match-any or match-all filters"; 609 } 610 list filter-entry { 611 if-feature "policy-inline-classifier-config"; 612 must " ../classifier-entry-inline = 'true' " { 613 description 614 "For inline filter configuration, inline attributemust 615 be true"; 616 } 617 key "filter-type filter-logical-not"; 618 uses filters; 619 description 620 "Filters configured inline in a policy"; 621 } 622 } 624 container classifiers { 625 if-feature "classifier-template-feature"; 626 description 627 "list of classifier entry"; 628 list classifier-entry { 629 key "classifier-entry-name"; 630 description 631 "each classifier entry contains a list of filters"; 632 uses classifier-entry-generic-attr; 633 list filter-entry { 634 key "filter-type filter-logical-not"; 635 uses filters; 636 description 637 "Filter entry configuration"; 638 } 639 } 640 } 641 } 642 644 6.2. IETF-QOS-POLICY 646 file "ietf-qos-policy@2016-03-03.yang" 647 module ietf-qos-policy { 648 yang-version 1; 649 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-policy"; 650 prefix policy; 651 import ietf-qos-classifier { 652 prefix classifier; 653 } 654 organization "IETF RTG (Routing Area) Working Group"; 655 contact 656 "WG Web: 657 WG List: 658 WG Chair: Chris Bowers 659 660 WG Chair: Jeff Tantsura 661 662 Editor: Aseem Choudhary 663 664 Editor: Mahesh Jethanandani 665 666 Editor: Norm Strahle 667 "; 668 description 669 "This module contains a collection of YANG definitions for 670 configuring qos specification implementations. 671 Copyright (c) 2014 IETF Trust and the persons identified as 672 authors of the code. All rights reserved. 673 Redistribution and use in source and binary forms, with or 674 without modification, is permitted pursuant to, and subject 675 to the license terms contained in, the Simplified BSD License 676 set forth in Section 4.c of the IETF Trust's Legal Provisions 677 Relating to IETF Documents 678 (http://trustee.ietf.org/license-info). 679 This version of this YANG module is part of RFC XXXX; see 680 the RFC itself for full legal notices."; 681 revision 2016-03-03 { 682 description 683 "Latest revision of qos policy"; 684 reference "RFC XXXX"; 685 } 686 identity policy-type { 687 description 688 "This base identity type defines policy-types"; 689 } 690 grouping policy-generic-attr { 691 description 692 "Policy Attributes"; 693 leaf policy-name { 694 type string; 695 description 696 "policy name"; 697 } 698 leaf policy-type { 699 type identityref { 700 base policy-type; 701 } 702 description 703 "policy type"; 704 } 705 leaf policy-descr { 706 type string; 707 description 708 "policy description"; 709 } 710 } 711 identity action-type { 712 description 713 "This base identity type defines action-types"; 714 } 715 grouping classifier-action-entry-cfg { 716 description 717 "List of Configuration of classifier & associated actions"; 718 list classifier-action-entry-cfg { 719 key "action-type"; 720 ordered-by user; 721 description 722 "Configuration of classifier & associated actions"; 723 leaf action-type { 724 type identityref { 725 base action-type; 726 } 727 description 728 "This defines action type "; 729 } 730 choice action-cfg-params { 731 description 732 "Choice of action types"; 733 } 734 } 735 } 736 container policies { 737 description 738 "list of policy templates"; 739 list policy-entry { 740 key "policy-name policy-type"; 741 description 742 "policy template"; 743 uses policy-generic-attr; 744 list classifier-entry { 745 key "classifier-entry-name"; 746 ordered-by user; 747 description 748 "Classifier entry configuration in a policy"; 749 leaf classifier-entry-name { 750 type string; 751 description 752 "classifier entry name"; 753 } 754 uses classifier:classifier-entry-inline-attr; 755 uses classifier-action-entry-cfg; 756 } 757 } 758 } 759 } 760 762 6.3. IETF-QOS-ACTION 764 file "ietf-qos-action@2018-03-17.yang" 765 module ietf-qos-action { 766 yang-version 1.1; 767 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-action"; 768 prefix action; 770 import ietf-inet-types { 771 prefix inet; 772 } 773 import ietf-qos-policy { 774 prefix policy; 775 } 777 organization 778 "IETF RTG (Routing Area) Working Group"; 779 contact 780 "WG Web: 781 WG List: 782 WG Chair: Chris Bowers 783 784 WG Chair: Jeff Tantsura 785 786 Editor: Aseem Choudhary 787 788 Editor: Mahesh Jethanandani 789 790 Editor: Norm Strahle 791 "; 792 description 793 "This module contains a collection of YANG definitions for 794 configuring qos specification implementations. 795 Copyright (c) 2014 IETF Trust and the persons identified as 796 authors of the code. All rights reserved. 797 Redistribution and use in source and binary forms, with or 798 without modification, is permitted pursuant to, and subject 799 to the license terms contained in, the Simplified BSD License 800 set forth in Section 4.c of the IETF Trust's Legal Provisions 801 Relating to IETF Documents 802 (http://trustee.ietf.org/license-info). 803 This version of this YANG module is part of RFC XXXX; see 804 the RFC itself for full legal notices."; 806 revision 2018-03-17 { 807 description 808 "Latest revision for qos actions"; 809 reference "RFC XXXX"; 811 } 813 feature meter-template-support { 814 description 815 " This feature allows support of meter-template."; 816 } 818 feature meter-inline-feature { 819 description 820 " This feature allows support of meter-inline configuration."; 821 } 823 feature meter-reference-feature { 824 description 825 " This feature allows support of meter by reference 826 configuration."; 827 } 829 feature min-rate-action-support { 830 description 831 " This feature allows support of min rate configuration 832 in policy."; 833 } 835 feature max-rate-action-support { 836 description 837 " This feature allows support of max rate configuration 838 in policy."; 839 } 841 feature queue-action-support { 842 description 843 " This feature allows support of queue action configuration 844 in policy."; 845 } 847 feature scheduler-action-support { 848 description 849 " This feature allows support of scheduler configuration 850 in policy."; 851 } 853 feature child-policy-feature { 854 description 855 " This feature allows configuration of hierarchical policy."; 856 } 858 feature count-feature { 859 description 860 "This feature allows action configuration to enable 861 counter in a classifier"; 862 } 864 feature named-counter-feature { 865 description 866 "This feature allows action configuration to enable 867 named counter in a classifier"; 868 } 870 identity rate-unit-type { 871 description 872 "base rate-unit type"; 873 } 875 identity bits-per-second { 876 base rate-unit-type; 877 description 878 "bits per second identity"; 879 } 881 identity kilo-bits-per-second { 882 base rate-unit-type; 883 description 884 "kilo bits per second identity"; 885 } 887 identity mega-bits-per-second { 888 base rate-unit-type; 889 description 890 "mega bits per second identity"; 891 } 893 identity giga-bits-per-second { 894 base rate-unit-type; 895 description 896 "mega bits per second identity"; 897 } 899 identity percent { 900 base rate-unit-type; 901 description 902 "percentage"; 903 } 905 identity dscp-marking { 906 base policy:action-type; 907 description 908 "dscp marking action type"; 909 } 911 identity meter-inline { 912 base policy:action-type; 913 if-feature "meter-inline-feature"; 914 description 915 "meter-inline action type"; 916 } 918 identity meter-reference { 919 base policy:action-type; 920 if-feature "meter-reference-feature"; 921 description 922 "meter reference action type"; 923 } 925 identity min-rate { 926 base policy:action-type; 927 description 928 "min-rate action type"; 929 } 931 identity max-rate { 932 base policy:action-type; 933 description 934 "max-rate action type"; 935 } 937 identity queue { 938 base policy:action-type; 939 description 940 "queue action type"; 941 } 943 identity schedular { 944 base policy:action-type; 945 description 946 "schedular action type"; 947 } 949 identity discard { 950 base policy:action-type; 951 description 952 "discard action type"; 953 } 954 identity child-policy { 955 base policy:action-type; 956 if-feature "child-policy-feature"; 957 description 958 "child-policy action type"; 959 } 961 identity count { 962 base policy:action-type; 963 if-feature "count-feature"; 964 description 965 "count action type"; 966 } 968 identity named-counter { 969 base policy:action-type; 970 if-feature "named-counter-feature"; 971 description 972 "name counter action type"; 973 } 975 identity meter-type { 976 description 977 "This base identity type defines meter types"; 978 } 980 identity one-rate-two-color-meter-type { 981 base meter-type; 982 description 983 "one rate two color meter type"; 984 } 986 identity one-rate-tri-color-meter-type { 987 base meter-type; 988 description 989 "one rate three color meter type"; 990 } 992 identity two-rate-tri-color-meter-type { 993 base meter-type; 994 description 995 "two rate three color meter action type"; 996 } 998 identity drop-type { 999 description 1000 "drop algorithm"; 1001 } 1002 identity tail-drop { 1003 base drop-type; 1004 description 1005 "tail drop algorithm"; 1006 } 1008 identity conform-2color-meter-action-type { 1009 description 1010 "action type in a meter"; 1011 } 1013 identity exceed-2color-meter-action-type { 1014 description 1015 "action type in a meter"; 1016 } 1018 identity conform-3color-meter-action-type { 1019 description 1020 "action type in a meter"; 1021 } 1023 identity exceed-3color-meter-action-type { 1024 description 1025 "action type in a meter"; 1026 } 1028 identity violate-3color-meter-action-type { 1029 description 1030 "action type in a meter"; 1031 } 1033 grouping rate-value-unit { 1034 leaf rate-value { 1035 type uint64; 1036 description 1037 "rate value"; 1038 } 1039 leaf rate-unit { 1040 type identityref { 1041 base rate-unit-type; 1042 } 1043 description 1044 "rate unit"; 1045 } 1046 description 1047 "rate value and unit grouping"; 1048 } 1049 grouping burst { 1050 description 1051 "burst size or interval configuration"; 1052 choice burst-type { 1053 case size { 1054 leaf burst-size { 1055 type uint64; 1056 units "bytes"; 1057 description 1058 "burst size"; 1059 } 1060 } 1061 case interval { 1062 leaf burst-interval { 1063 type uint64; 1064 units "microsecond"; 1065 description 1066 "burst interval"; 1067 } 1068 } 1069 description 1070 "Choice of burst type"; 1071 } 1072 } 1074 grouping threshold { 1075 description 1076 "Threshold Parameters"; 1077 container threshold { 1078 description 1079 "threshold"; 1080 choice threshold-type { 1081 case size { 1082 leaf threshold-size { 1083 type uint64; 1084 units "bytes"; 1085 description 1086 "Threshold size"; 1087 } 1088 } 1089 case interval { 1090 leaf threshold-interval { 1091 type uint64; 1092 units "microsecond"; 1093 description 1094 "Threshold interval"; 1095 } 1096 } 1097 description 1098 "Choice of threshold type"; 1099 } 1100 } 1101 } 1103 grouping drop { 1104 container drop-cfg { 1105 leaf drop-action { 1106 type empty; 1107 description 1108 "always drop algorithm"; 1109 } 1110 description 1111 "the drop action"; 1112 } 1113 description 1114 "always drop grouping"; 1115 } 1117 grouping queuelimit { 1118 container qlimit-thresh { 1119 uses threshold; 1120 description 1121 "the queue limit"; 1122 } 1123 description 1124 "the queue limit beyond which queue will not hold any packet"; 1125 } 1127 grouping conform-2color-meter-action-params { 1128 description 1129 "meter action parameters"; 1130 list conform-2color-meter-action-params { 1131 key "conform-2color-meter-action-type"; 1132 ordered-by user; 1133 description 1134 "Configuration of basic-meter & associated actions"; 1135 leaf conform-2color-meter-action-type { 1136 type identityref { 1137 base conform-2color-meter-action-type; 1138 } 1139 description 1140 "meter action type"; 1141 } 1142 choice conform-2color-meter-action-val { 1143 description 1144 " meter action based on choice of meter action type"; 1146 } 1147 } 1148 } 1150 grouping exceed-2color-meter-action-params { 1151 description 1152 "meter action parameters"; 1153 list exceed-2color-meter-action-params { 1154 key "exceed-2color-meter-action-type"; 1155 ordered-by user; 1156 description 1157 "Configuration of basic-meter & associated actions"; 1158 leaf exceed-2color-meter-action-type { 1159 type identityref { 1160 base exceed-2color-meter-action-type; 1161 } 1162 description 1163 "meter action type"; 1164 } 1165 choice exceed-2color-meter-action-val { 1166 description 1167 " meter action based on choice of meter action type"; 1168 } 1169 } 1170 } 1172 grouping conform-3color-meter-action-params { 1173 description 1174 "meter action parameters"; 1175 list conform-3color-meter-action-params { 1176 key "conform-3color-meter-action-type"; 1177 ordered-by user; 1178 description 1179 "Configuration of basic-meter & associated actions"; 1180 leaf conform-3color-meter-action-type { 1181 type identityref { 1182 base conform-3color-meter-action-type; 1183 } 1184 description 1185 "meter action type"; 1186 } 1187 choice conform-3color-meter-action-val { 1188 description 1189 " meter action based on choice of meter action type"; 1190 } 1191 } 1192 } 1193 grouping exceed-3color-meter-action-params { 1194 description 1195 "meter action parameters"; 1196 list exceed-3color-meter-action-params { 1197 key "exceed-3color-meter-action-type"; 1198 ordered-by user; 1199 description 1200 "Configuration of basic-meter & associated actions"; 1201 leaf exceed-3color-meter-action-type { 1202 type identityref { 1203 base exceed-3color-meter-action-type; 1204 } 1205 description 1206 "meter action type"; 1207 } 1208 choice exceed-3color-meter-action-val { 1209 description 1210 " meter action based on choice of meter action type"; 1211 } 1212 } 1213 } 1215 grouping violate-3color-meter-action-params { 1216 description 1217 "meter action parameters"; 1218 list violate-3color-meter-action-params { 1219 key "violate-3color-meter-action-type"; 1220 ordered-by user; 1221 description 1222 "Configuration of basic-meter & associated actions"; 1223 leaf violate-3color-meter-action-type { 1224 type identityref { 1225 base violate-3color-meter-action-type; 1226 } 1227 description 1228 "meter action type"; 1229 } 1230 choice violate-3color-meter-action-val { 1231 description 1232 " meter action based on choice of meter action type"; 1233 } 1234 } 1235 } 1237 grouping one-rate-two-color-meter { 1238 container one-rate-two-color-meter { 1239 description 1240 "single rate two color marker meter"; 1242 leaf meter-rate { 1243 type uint64; 1244 units "bits-per-second"; 1245 description 1246 "meter rate"; 1247 } 1248 leaf meter-burst { 1249 type uint64; 1250 units "byes"; 1251 description 1252 "burst size"; 1253 } 1254 container conform-action { 1255 uses conform-2color-meter-action-params; 1256 description 1257 "conform action"; 1258 } 1259 container exceed-action { 1260 uses exceed-2color-meter-action-params; 1261 description 1262 "exceed action"; 1263 } 1264 } 1265 description 1266 "single rate two color marker meter attributes"; 1267 } 1269 grouping one-rate-tri-color-meter { 1270 container one-rate-tri-color-meter { 1271 description 1272 "single rate three color meter"; 1273 leaf committed-rate { 1274 type uint64; 1275 units "bits-per-second"; 1276 description 1277 "meter rate"; 1278 } 1279 leaf committed-burst { 1280 type uint64; 1281 units "byes"; 1282 description 1283 "commited burst size"; 1284 } 1285 leaf excess-burst { 1286 type uint64; 1287 units "byes"; 1288 description 1289 "excess burst size"; 1291 } 1292 container conform-action { 1293 uses conform-3color-meter-action-params; 1294 description 1295 "conform, or green action"; 1296 } 1297 container exceed-action { 1298 uses exceed-3color-meter-action-params; 1299 description 1300 "exceed, or yellow action"; 1301 } 1302 container violate-action { 1303 uses violate-3color-meter-action-params; 1304 description 1305 "violate, or red action"; 1306 } 1307 } 1308 description 1309 "one-rate-tri-color-meter attributes"; 1310 } 1312 grouping two-rate-tri-color-meter { 1313 container two-rate-tri-color-meter { 1314 description 1315 "two rate three color meter"; 1316 leaf committed-rate { 1317 type uint64; 1318 units "bits-per-second"; 1319 description 1320 "meter rate"; 1321 } 1322 leaf committed-burst { 1323 type uint64; 1324 units "byes"; 1325 description 1326 "commited burst size"; 1327 } 1328 leaf peak-rate { 1329 type uint64; 1330 units "bits-per-second"; 1331 description 1332 "meter rate"; 1333 } 1334 leaf peak-burst { 1335 type uint64; 1336 units "byes"; 1337 description 1338 "commited burst size"; 1340 } 1341 container conform-action { 1342 uses conform-3color-meter-action-params; 1343 description 1344 "conform, or green action"; 1345 } 1346 container exceed-action { 1347 uses exceed-3color-meter-action-params; 1348 description 1349 "exceed, or yellow action"; 1350 } 1351 container violate-action { 1352 uses violate-3color-meter-action-params; 1353 description 1354 "exceed, or red action"; 1355 } 1356 } 1357 description 1358 "two-rate-tri-color-meter attributes"; 1359 } 1361 grouping meter { 1362 choice meter-type { 1363 case one-rate-two-color-meter-type { 1364 uses one-rate-two-color-meter; 1365 description 1366 "basic meter"; 1367 } 1368 case one-rate-tri-color-meter-type { 1369 uses one-rate-tri-color-meter; 1370 description 1371 "one rate tri-color meter"; 1372 } 1373 case two-rate-tri-color-meter-type { 1374 uses two-rate-tri-color-meter; 1375 description 1376 "two rate tri-color meter"; 1377 } 1378 description 1379 " meter action based on choice of meter action type"; 1380 } 1381 description 1382 "meter attributes"; 1383 } 1385 container meter-template { 1386 description 1387 "list of meter templates"; 1389 list meter-entry { 1390 if-feature "meter-template-support"; 1391 key "meter-name"; 1392 description 1393 "meter entry template"; 1394 leaf meter-name { 1395 type string; 1396 description 1397 "meter identifier"; 1398 } 1399 uses meter; 1400 } 1401 } 1403 grouping meter-reference { 1404 container meter-reference-cfg { 1405 leaf meter-reference-name { 1406 type string ; 1407 mandatory true; 1408 description 1409 "This leaf defines name of the meter referenced"; 1410 } 1411 leaf meter-type { 1412 type identityref { 1413 base meter-type; 1414 } 1415 mandatory true; 1416 description 1417 "This leaf defines type of the meter"; 1418 } 1419 description 1420 "meter reference name"; 1421 } 1422 description 1423 "meter reference"; 1424 } 1426 grouping count { 1427 container count-cfg { 1428 leaf count-action { 1429 type empty; 1430 description 1431 "count action"; 1432 } 1433 description 1434 "the count action"; 1435 } 1436 description 1437 "the count action grouping"; 1438 } 1440 grouping named-counter { 1441 container named-counter-cfg { 1442 leaf count-name-action { 1443 type string; 1444 description 1445 "count action"; 1446 } 1447 description 1448 "the count action"; 1449 } 1450 description 1451 "the count action grouping"; 1452 } 1454 grouping discard { 1455 container discard-cfg { 1456 leaf discard { 1457 type empty; 1458 description 1459 "discard action"; 1460 } 1461 description 1462 "discard action"; 1463 } 1464 description 1465 "discard grouping"; 1466 } 1468 grouping priority { 1469 container priority-cfg { 1470 leaf priority-level { 1471 type uint8; 1472 description 1473 "priority level"; 1474 } 1475 description 1476 "priority attributes"; 1477 } 1478 description 1479 "priority attributes grouping"; 1480 } 1482 grouping min-rate { 1483 container min-rate-cfg { 1484 uses rate-value-unit; 1485 description 1486 "min guaranteed bandwidth"; 1487 } 1488 description 1489 "minimum rate grouping"; 1490 } 1492 grouping dscp-marking { 1493 container dscp-cfg { 1494 leaf dscp { 1495 type inet:dscp; 1496 description 1497 "dscp marking"; 1498 } 1499 description 1500 "dscp marking container"; 1501 } 1502 description 1503 "dscp marking grouping"; 1504 } 1506 grouping child-policy { 1507 container child-policy-cfg { 1508 if-feature "child-policy-feature"; 1509 leaf policy-name { 1510 type string; 1511 description 1512 "Hierarchical Policy"; 1513 } 1514 description 1515 "Hierarchical Policy configuration container"; 1516 } 1517 description 1518 "Grouping of Hierarchical Policy configuration"; 1519 } 1521 grouping max-rate { 1522 container max-rate-cfg { 1523 uses rate-value-unit; 1524 uses burst; 1525 description 1526 "maximum rate attributes container"; 1527 } 1528 description 1529 "maximum rate attributes"; 1530 } 1532 grouping queue { 1533 container queue-cfg { 1534 uses priority; 1535 uses min-rate; 1536 uses max-rate; 1537 container algorithmic-drop-cfg { 1538 choice drop-algorithm { 1539 case tail-drop { 1540 container tail-drop-cfg { 1541 leaf tail-drop-alg { 1542 type empty; 1543 description 1544 "tail drop algorithm"; 1545 } 1546 description 1547 "Tail Drop configuration container"; 1548 } 1549 description 1550 "Tail Drop choice"; 1551 } 1552 description 1553 "Choice of Drop Algorithm"; 1554 } 1555 description 1556 "Algorithmic Drop configuration container"; 1557 } 1558 description 1559 "Queue configuration container"; 1560 } 1561 description 1562 "Queue grouping"; 1563 } 1565 grouping schedular { 1566 container schedular-cfg { 1567 uses min-rate; 1568 uses max-rate; 1569 description 1570 "Schedular configuration container"; 1571 } 1572 description 1573 "Schedular configuration grouping"; 1574 } 1575 } 1576 1578 6.4. IETF-QOS-TARGET 1580 file "ietf-qos-target@2017-12-12.yang" 1581 module ietf-qos-target { 1582 yang-version 1; 1583 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-target"; 1584 prefix target; 1586 import ietf-interfaces { 1587 prefix if; 1588 } 1589 import ietf-qos-policy { 1590 prefix policy; 1591 } 1593 organization 1594 "IETF NETMOD (Netmod Working Group) Working Group"; 1595 contact 1596 "WG Web: 1597 WG List: 1598 WG Chair: Jurgen Schonwalder 1599 1600 WG Chair: Lou Berger 1601 1602 WG Chair: Kent Watsen 1603 1604 Editor: Aseem Choudhary 1605 1606 Editor: Mahesh Jethanandani 1607 1679 6.5. IETF-DIFFSERV 1681 file "ietf-diffserv@2018-03-17.yang" 1682 module ietf-diffserv { 1683 yang-version 1.1; 1684 namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv"; 1685 prefix diffserv; 1687 import ietf-qos-classifier { 1688 prefix classifier; 1689 } 1690 import ietf-qos-policy { 1691 prefix policy; 1692 } 1693 import ietf-qos-action { 1694 prefix action; 1695 } 1696 import ietf-inet-types { 1697 prefix inet; 1698 } 1700 organization 1701 "IETF NETMOD (Netmod Working Group) Working Group"; 1702 contact 1703 "WG Web: 1704 WG List: 1705 WG Chair: Jurgen Schonwalder 1706 1707 WG Chair: Lou Berger 1708 1709 WG Chair: Kent Watsen 1710 1711 Editor: Aseem Choudhary 1712 1713 Editor: Mahesh Jethanandani 1714 2124 7. Security Considerations 2126 8. Acknowledgement 2128 9. References 2130 9.1. Normative References 2132 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2133 Requirement Levels", BCP 14, RFC 2119, 2134 DOI 10.17487/RFC2119, March 1997, 2135 . 2137 [RFC2697] Heinanen, J. and R. Guerin, "A Single Rate Three Color 2138 Marker", RFC 2697, DOI 10.17487/RFC2697, September 1999, 2139 . 2141 [RFC2698] Heinanen, J. and R. Guerin, "A Two Rate Three Color 2142 Marker", RFC 2698, DOI 10.17487/RFC2698, September 1999, 2143 . 2145 [RFC3289] Baker, F., Chan, K., and A. Smith, "Management Information 2146 Base for the Differentiated Services Architecture", 2147 RFC 3289, DOI 10.17487/RFC3289, May 2002, 2148 . 2150 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2151 the Network Configuration Protocol (NETCONF)", RFC 6020, 2152 DOI 10.17487/RFC6020, October 2010, 2153 . 2155 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2156 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2157 . 2159 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 2160 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 2161 . 2163 9.2. Informative References 2165 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 2166 and W. Weiss, "An Architecture for Differentiated 2167 Services", RFC 2475, DOI 10.17487/RFC2475, December 1998, 2168 . 2170 Appendix A. Company A, Company B and Company C examples 2172 Company A, Company B and Company C Diffserv modules augments all the 2173 filter types of the QoS classifier module as well as the QoS policy 2174 module that allow it to define marking, metering, min-rate, max-rate 2175 actions. Queuing and metering counters are realized by augmenting of 2176 the QoS target module. 2178 A.1. Example of Company A Diffserv Model 2180 The following Company A vendor example augments the qos and diffserv 2181 model, demonstrating some of the following functionality: 2183 - use of template based classifier definitions 2185 - use of single policy type modelling queue, scheduler policy, and a 2186 filter policy. All of these policies either augment the qos policy 2187 or the diffserv modules 2189 - use of inline actions in a policy 2191 - flexibility in marking dscp or metadata at ingress and/or egress. 2193 module example-compa-diffserv { 2194 namespace "urn:ietf:params:xml:ns:yang:example-compa-diffserv"; 2195 prefix example; 2197 import ietf-qos-classifier { 2198 prefix classifier; 2199 } 2200 import ietf-qos-policy { 2201 prefix policy; 2202 } 2203 import ietf-qos-action { 2204 prefix action; 2205 } 2206 import ietf-diffserv { 2207 prefix diffserv; 2208 } 2210 organization "Company A"; 2211 contact 2212 "Editor: XYZ 2213 "; 2214 description 2215 "This module contains a collection of YANG definitions of 2216 companyA diffserv specification extension."; 2217 revision 2016-03-03 { 2218 description 2219 "Initial revision for diffserv actions on network packets"; 2220 reference 2221 "RFC 6020: YANG - A Data Modeling Language for the 2222 Network Configuration Protocol (NETCONF)"; 2223 } 2225 identity default-policy-type { 2226 base policy:policy-type; 2227 description 2228 "This defines default policy-type"; 2229 } 2231 identity qos-group { 2232 base classifier:filter-type; 2233 description 2234 "qos-group filter-type"; 2235 } 2237 grouping qos-group-cfg { 2238 list qos-group-cfg { 2239 key "qos-group-min qos-group-max"; 2240 description 2241 "list of dscp ranges"; 2242 leaf qos-group-min { 2243 type uint8; 2244 description 2245 "Minimum value of qos-group range"; 2246 } 2247 leaf qos-group-max { 2248 type uint8; 2249 description 2250 "maximum value of qos-group range"; 2251 } 2252 } 2253 description 2254 "Filter containing list of qos-group ranges"; 2256 } 2258 grouping wred-threshold { 2259 container wred-min-thresh { 2260 uses action:threshold; 2261 description 2262 "Minimum threshold"; 2263 } 2264 container wred-max-thresh { 2265 uses action:threshold; 2266 description 2267 "Maximum threshold"; 2268 } 2269 leaf mark-probability { 2270 type uint32 { 2271 range "1..1000"; 2272 } 2273 description 2274 "Mark probability"; 2275 } 2276 description 2277 "WRED threshold attributes"; 2278 } 2280 grouping randomdetect { 2281 leaf exp-weighting-const { 2282 type uint32; 2283 description 2284 "Exponential weighting constant factor for wred profile"; 2285 } 2286 uses wred-threshold; 2287 description 2288 "Random detect attributes"; 2289 } 2291 augment "/classifier:classifiers/" + 2292 "classifier:classifier-entry/" + 2293 "classifier:filter-entry/diffserv:filter-param" { 2294 case qos-group { 2295 uses qos-group-cfg; 2296 description 2297 "Filter containing list of qos-group ranges. 2298 Qos-group represent packet metadata information 2299 in a device. "; 2300 } 2301 description 2302 "augmentation of classifier filters"; 2303 } 2304 augment "/policy:policies/policy:policy-entry/" + 2305 "policy:classifier-entry/" + 2306 "policy:classifier-action-entry-cfg/" + 2307 "policy:action-cfg-params" { 2308 case priority { 2309 uses action:priority; 2310 } 2311 case min-rate { 2312 uses action:min-rate; 2313 } 2314 case max-rate { 2315 uses action:max-rate; 2316 } 2317 case random-detect { 2318 uses randomdetect; 2319 } 2320 description 2321 "Augment the actions to policy entry"; 2322 } 2324 augment "/policy:policies" + 2325 "/policy:policy-entry" + 2326 "/policy:classifier-entry" + 2327 "/policy:classifier-action-entry-cfg" + 2328 "/policy:action-cfg-params" + 2329 "/diffserv:meter-inline" + 2330 "/diffserv:meter-type" + 2331 "/diffserv:one-rate-two-color-meter-type" + 2332 "/diffserv:one-rate-two-color-meter" + 2333 "/diffserv:conform-action" + 2334 "/diffserv:conform-2color-meter-action-params" + 2335 "/diffserv:conform-2color-meter-action-val" { 2337 description 2338 "augment the one-rate-two-color meter conform 2339 with actions"; 2340 case meter-action-drop { 2341 description 2342 "meter drop"; 2343 uses action:drop; 2344 } 2345 case meter-action-mark-dscp { 2346 description 2347 "meter action dscp marking"; 2348 uses action:dscp-marking; 2349 } 2350 } 2351 augment "/policy:policies" + 2352 "/policy:policy-entry" + 2353 "/policy:classifier-entry" + 2354 "/policy:classifier-action-entry-cfg" + 2355 "/policy:action-cfg-params" + 2356 "/diffserv:meter-inline" + 2357 "/diffserv:meter-type" + 2358 "/diffserv:one-rate-two-color-meter-type" + 2359 "/diffserv:one-rate-two-color-meter" + 2360 "/diffserv:exceed-action" + 2361 "/diffserv:exceed-2color-meter-action-params" + 2362 "/diffserv:exceed-2color-meter-action-val" { 2364 description 2365 "augment the one-rate-two-color meter exceed 2366 with actions"; 2367 case meter-action-drop { 2368 description 2369 "meter drop"; 2370 uses action:drop; 2371 } 2372 case meter-action-mark-dscp { 2373 description 2374 "meter action dscp marking"; 2375 uses action:dscp-marking; 2376 } 2377 } 2378 augment "/policy:policies" + 2379 "/policy:policy-entry" + 2380 "/policy:classifier-entry" + 2381 "/policy:classifier-action-entry-cfg" + 2382 "/policy:action-cfg-params" + 2383 "/diffserv:meter-inline" + 2384 "/diffserv:meter-type" + 2385 "/diffserv:one-rate-tri-color-meter-type" + 2386 "/diffserv:one-rate-tri-color-meter" + 2387 "/diffserv:conform-action" + 2388 "/diffserv:conform-3color-meter-action-params" + 2389 "/diffserv:conform-3color-meter-action-val" { 2391 description 2392 "augment the one-rate-tri-color meter conform 2393 with actions"; 2394 case meter-action-drop { 2395 description 2396 "meter drop"; 2397 uses action:drop; 2398 } 2399 case meter-action-mark-dscp { 2400 description 2401 "meter action dscp marking"; 2402 uses action:dscp-marking; 2403 } 2404 } 2405 augment "/policy:policies" + 2406 "/policy:policy-entry" + 2407 "/policy:classifier-entry" + 2408 "/policy:classifier-action-entry-cfg" + 2409 "/policy:action-cfg-params" + 2410 "/diffserv:meter-inline" + 2411 "/diffserv:meter-type" + 2412 "/diffserv:one-rate-tri-color-meter-type" + 2413 "/diffserv:one-rate-tri-color-meter" + 2414 "/diffserv:exceed-action" + 2415 "/diffserv:exceed-3color-meter-action-params" + 2416 "/diffserv:exceed-3color-meter-action-val" { 2418 description 2419 "augment the one-rate-tri-color meter exceed 2420 with actions"; 2421 case meter-action-drop { 2422 description 2423 "meter drop"; 2424 uses action:drop; 2425 } 2426 case meter-action-mark-dscp { 2427 description 2428 "meter action dscp marking"; 2429 uses action:dscp-marking; 2430 } 2431 } 2432 augment "/policy:policies" + 2433 "/policy:policy-entry" + 2434 "/policy:classifier-entry" + 2435 "/policy:classifier-action-entry-cfg" + 2436 "/policy:action-cfg-params" + 2437 "/diffserv:meter-inline" + 2438 "/diffserv:meter-type" + 2439 "/diffserv:one-rate-tri-color-meter-type" + 2440 "/diffserv:one-rate-tri-color-meter" + 2441 "/diffserv:violate-action" + 2442 "/diffserv:violate-3color-meter-action-params" + 2443 "/diffserv:violate-3color-meter-action-val" { 2444 description 2445 "augment the one-rate-tri-color meter conform 2446 with actions"; 2447 case meter-action-drop { 2448 description 2449 "meter drop"; 2450 uses action:drop; 2451 } 2452 case meter-action-mark-dscp { 2453 description 2454 "meter action dscp marking"; 2455 uses action:dscp-marking; 2456 } 2457 } 2459 augment "/policy:policies" + 2460 "/policy:policy-entry" + 2461 "/policy:classifier-entry" + 2462 "/policy:classifier-action-entry-cfg" + 2463 "/policy:action-cfg-params" + 2464 "/diffserv:meter-inline" + 2465 "/diffserv:meter-type" + 2466 "/diffserv:two-rate-tri-color-meter-type" + 2467 "/diffserv:two-rate-tri-color-meter" + 2468 "/diffserv:conform-action" + 2469 "/diffserv:conform-3color-meter-action-params" + 2470 "/diffserv:conform-3color-meter-action-val" { 2472 description 2473 "augment the one-rate-tri-color meter conform 2474 with actions"; 2475 case meter-action-drop { 2476 description 2477 "meter drop"; 2478 uses action:drop; 2479 } 2480 case meter-action-mark-dscp { 2481 description 2482 "meter action dscp marking"; 2483 uses action:dscp-marking; 2484 } 2485 } 2486 augment "/policy:policies" + 2487 "/policy:policy-entry" + 2488 "/policy:classifier-entry" + 2489 "/policy:classifier-action-entry-cfg" + 2490 "/policy:action-cfg-params" + 2491 "/diffserv:meter-inline" + 2492 "/diffserv:meter-type" + 2493 "/diffserv:two-rate-tri-color-meter-type" + 2494 "/diffserv:two-rate-tri-color-meter" + 2495 "/diffserv:exceed-action" + 2496 "/diffserv:exceed-3color-meter-action-params" + 2497 "/diffserv:exceed-3color-meter-action-val" { 2499 description 2500 "augment the two-rate-tri-color meter exceed 2501 with actions"; 2502 case meter-action-drop { 2503 description 2504 "meter drop"; 2505 uses action:drop; 2506 } 2507 case meter-action-mark-dscp { 2508 description 2509 "meter action dscp marking"; 2510 uses action:dscp-marking; 2511 } 2512 } 2513 augment "/policy:policies" + 2514 "/policy:policy-entry" + 2515 "/policy:classifier-entry" + 2516 "/policy:classifier-action-entry-cfg" + 2517 "/policy:action-cfg-params" + 2518 "/diffserv:meter-inline" + 2519 "/diffserv:meter-type" + 2520 "/diffserv:two-rate-tri-color-meter-type" + 2521 "/diffserv:two-rate-tri-color-meter" + 2522 "/diffserv:violate-action" + 2523 "/diffserv:violate-3color-meter-action-params" + 2524 "/diffserv:violate-3color-meter-action-val" { 2525 description 2526 "augment the two-rate-tri-color meter violate 2527 with actions"; 2528 case meter-action-drop { 2529 description 2530 "meter drop"; 2531 uses action:drop; 2532 } 2533 case meter-action-mark-dscp { 2534 description 2535 "meter action dscp marking"; 2536 uses action:dscp-marking; 2537 } 2538 } 2539 augment "/policy:policies" + 2540 "/policy:policy-entry" + 2541 "/policy:classifier-entry" + 2542 "/policy:classifier-action-entry-cfg" + 2543 "/policy:action-cfg-params" + 2544 "/diffserv:meter-inline" + 2545 "/diffserv:meter-type" + 2546 "/diffserv:one-rate-two-color-meter-type" + 2547 "/diffserv:one-rate-two-color-meter" { 2548 description 2549 "augment the one-rate-two-color meter with" + 2550 "color classifiers"; 2551 container conform-color { 2552 uses classifier:classifier-entry-generic-attr; 2553 description 2554 "conform color classifier container"; 2555 } 2556 container exceed-color { 2557 uses classifier:classifier-entry-generic-attr; 2558 description 2559 "exceed color classifier container"; 2560 } 2561 } 2562 augment "/policy:policies" + 2563 "/policy:policy-entry" + 2564 "/policy:classifier-entry" + 2565 "/policy:classifier-action-entry-cfg" + 2566 "/policy:action-cfg-params" + 2567 "/diffserv:meter-inline" + 2568 "/diffserv:meter-type" + 2569 "/diffserv:one-rate-tri-color-meter-type" + 2570 "/diffserv:one-rate-tri-color-meter" { 2571 description 2572 "augment the one-rate-tri-color meter with" + 2573 "color classifiers"; 2574 container conform-color { 2575 uses classifier:classifier-entry-generic-attr; 2576 description 2577 "conform color classifier container"; 2578 } 2579 container exceed-color { 2580 uses classifier:classifier-entry-generic-attr; 2581 description 2582 "exceed color classifier container"; 2583 } 2584 container violate-color { 2585 uses classifier:classifier-entry-generic-attr; 2586 description 2587 "violate color classifier container"; 2588 } 2589 } 2590 augment "/policy:policies" + 2591 "/policy:policy-entry" + 2592 "/policy:classifier-entry" + 2593 "/policy:classifier-action-entry-cfg" + 2594 "/policy:action-cfg-params" + 2595 "/diffserv:meter-inline" + 2596 "/diffserv:meter-type" + 2597 "/diffserv:two-rate-tri-color-meter-type" + 2598 "/diffserv:two-rate-tri-color-meter" { 2599 description 2600 "augment the two-rate-tri-color meter with" + 2601 "color classifiers"; 2602 container conform-color { 2603 uses classifier:classifier-entry-generic-attr; 2604 description 2605 "conform color classifier container"; 2606 } 2607 container exceed-color { 2608 uses classifier:classifier-entry-generic-attr; 2609 description 2610 "exceed color classifier container"; 2611 } 2612 container violate-color { 2613 uses classifier:classifier-entry-generic-attr; 2614 description 2615 "violate color classifier container"; 2616 } 2617 } 2618 } 2620 A.2. Example of Company B Diffserv Model 2622 The following vendor example augments the qos and diffserv model, 2623 demonstrating some of the following functionality: 2625 - use of inline classifier definitions (defined inline in the policy 2626 vs referencing an externally defined classifier) 2628 - use of mulitple policy types, e.g. a queue policy, a scheduler 2629 policy, and a filter policy. All of these policies either augment 2630 the qos policy or the diffserv modules 2632 - use of a queue module, which uses and extends the queue grouping 2633 from the ietf-qos-action module 2635 - use of meter templates (v.s. meter inline) 2637 - use of internal meta data for classification and marking 2639 module example-compb-diffserv-filter-policy { 2640 yang-version 1; 2641 namespace "urn:ietf:params:xml:ns:yang:" + 2642 "example-compb-diffserv-filter-policy"; 2643 prefix compb-filter-policy; 2645 import ietf-qos-classifier { 2646 prefix classifier; 2647 } 2648 import ietf-qos-policy { 2649 prefix policy; 2650 } 2651 import ietf-qos-action { 2652 prefix action; 2653 } 2654 import ietf-diffserv { 2655 prefix diffserv; 2656 } 2658 organization "Company B"; 2659 contact 2660 "Editor: XYZ 2661 "; 2663 description 2664 "This module contains a collection of YANG definitions for 2665 configuring diffserv specification implementations. 2667 Copyright (c) 2014 IETF Trust and the persons identified as 2668 authors of the code. All rights reserved. 2670 Redistribution and use in source and binary forms, with or 2671 without modification, is permitted pursuant to, and subject 2672 to the license terms contained in, the Simplified BSD License 2673 set forth in Section 4.c of the IETF Trust's Legal Provisions 2674 Relating to IETF Documents 2675 (http://trustee.ietf.org/license-info). 2677 This version of this YANG module is part of RFC XXXX; see 2678 the RFC itself for full legal notices."; 2680 revision 2015-04-07 { 2681 description 2682 "Latest revision of diffserv policy"; 2683 reference "RFC XXXX"; 2684 } 2686 /************************************************* 2687 * Classification types 2688 *************************************************/ 2690 identity forwarding-class { 2691 base classifier:filter-type; 2692 description 2693 "Forwarding class filter type"; 2694 } 2696 identity internal-loss-priority { 2697 base classifier:filter-type; 2698 description 2699 "Internal loss priority filter type"; 2700 } 2702 grouping forwarding-class-cfg { 2703 list forwarding-class-cfg { 2704 key "forwarding-class"; 2705 description 2706 "list of forwarding-classes"; 2707 leaf forwarding-class { 2708 type string; 2709 description 2710 "Forwarding class name"; 2711 } 2712 } 2713 description 2714 "Filter containing list of forwarding classes"; 2715 } 2717 grouping loss-priority-cfg { 2718 list loss-priority-cfg { 2719 key "loss-priority"; 2720 description 2721 "list of loss-priorities"; 2722 leaf loss-priority { 2723 type enumeration { 2724 enum high { 2725 description "High Loss Priority"; 2726 } 2727 enum medium-high { 2728 description "Medium-high Loss Priority"; 2729 } 2730 enum medium-low { 2731 description "Medium-low Loss Priority"; 2732 } 2733 enum low { 2734 description "Low Loss Priority"; 2736 } 2737 } 2738 description 2739 "Loss-priority"; 2740 } 2741 } 2742 description 2743 "Filter containing list of loss priorities"; 2744 } 2746 augment "/policy:policies" + 2747 "/policy:policy-entry" + 2748 "/policy:classifier-entry" + 2749 "/policy:filter-entry" + 2750 "/diffserv:filter-params" { 2751 case forwarding-class { 2752 uses forwarding-class-cfg; 2753 description 2754 "Filter Type Internal-loss-priority"; 2755 } 2756 case internal-loss-priority { 2757 uses loss-priority-cfg; 2758 description 2759 "Filter Type Internal-loss-priority"; 2760 } 2761 description 2762 "Augments Diffserv Classifier with vendor" + 2763 " specific types"; 2764 } 2766 /************************************************* 2767 * Actions 2768 *************************************************/ 2770 identity mark-fwd-class { 2771 base policy:action-type; 2772 description 2773 "mark forwarding class action type"; 2774 } 2776 identity mark-loss-priority { 2777 base policy:action-type; 2778 description 2779 "mark loss-priority action type"; 2780 } 2782 grouping mark-fwd-class { 2783 container mark-fwd-class-cfg { 2784 leaf forwarding-class { 2785 type string; 2786 description 2787 "Forwarding class name"; 2788 } 2789 description 2790 "mark-fwd-class container"; 2791 } 2792 description 2793 "mark-fwd-class grouping"; 2794 } 2796 grouping mark-loss-priority { 2797 container mark-loss-priority-cfg { 2798 leaf loss-priority { 2799 type enumeration { 2800 enum high { 2801 description "High Loss Priority"; 2802 } 2803 enum medium-high { 2804 description "Medium-high Loss Priority"; 2805 } 2806 enum medium-low { 2807 description "Medium-low Loss Priority"; 2808 } 2809 enum low { 2810 description "Low Loss Priority"; 2811 } 2812 } 2813 description 2814 "Loss-priority"; 2815 } 2816 description 2817 "mark-loss-priority container"; 2818 } 2819 description 2820 "mark-loss-priority grouping"; 2821 } 2823 identity exceed-2color-meter-action-drop { 2824 base action:exceed-2color-meter-action-type; 2825 description 2826 "drop action type in a meter"; 2827 } 2829 identity meter-action-mark-fwd-class { 2830 base action:exceed-2color-meter-action-type; 2831 description 2832 "mark forwarding class action type"; 2833 } 2835 identity meter-action-mark-loss-priority { 2836 base action:exceed-2color-meter-action-type; 2837 description 2838 "mark loss-priority action type"; 2839 } 2841 identity violate-3color-meter-action-drop { 2842 base action:violate-3color-meter-action-type; 2843 description 2844 "drop action type in a meter"; 2845 } 2847 augment "/policy:policies/policy:policy-entry/" + 2848 "policy:classifier-entry/" + 2849 "policy:classifier-action-entry-cfg/" + 2850 "policy:action-cfg-params" { 2851 case mark-fwd-class { 2852 uses mark-fwd-class; 2853 description 2854 "Mark forwarding class in the packet"; 2855 } 2856 case mark-loss-priority { 2857 uses mark-loss-priority; 2858 description 2859 "Mark loss priority in the packet"; 2860 } 2861 case discard { 2862 uses action:discard; 2863 description 2864 "Discard action"; 2865 } 2866 description 2867 "Augments common diffserv policy actions"; 2868 } 2870 augment "/action:meter-template" + 2871 "/action:meter-entry" + 2872 "/action:meter-type" + 2873 "/action:one-rate-tri-color-meter-type" + 2874 "/action:one-rate-tri-color-meter" { 2875 leaf one-rate-color-aware { 2876 type boolean; 2877 description 2878 "This defines if the meter is color-aware"; 2880 } 2881 } 2882 augment "/action:meter-template" + 2883 "/action:meter-entry" + 2884 "/action:meter-type" + 2885 "/action:two-rate-tri-color-meter-type" + 2886 "/action:two-rate-tri-color-meter" { 2887 leaf two-rate-color-aware { 2888 type boolean; 2889 description 2890 "This defines if the meter is color-aware"; 2891 } 2892 } 2894 /* example of augmenting a meter template with a 2895 /* vendor specific action */ 2896 augment "/action:meter-template" + 2897 "/action:meter-entry" + 2898 "/action:meter-type" + 2899 "/action:one-rate-two-color-meter-type" + 2900 "/action:one-rate-two-color-meter" + 2901 "/action:exceed-action" + 2902 "/action:exceed-2color-meter-action-params" + 2903 "/action:exceed-2color-meter-action-val" { 2905 case exceed-2color-meter-action-drop { 2906 description 2907 "meter drop"; 2908 uses action:drop; 2909 } 2910 case meter-action-mark-fwd-class { 2911 uses mark-fwd-class; 2912 description 2913 "Mark forwarding class in the packet"; 2914 } 2915 case meter-action-mark-loss-priority { 2916 uses mark-loss-priority; 2917 description 2918 "Mark loss priority in the packet"; 2919 } 2920 } 2922 augment "/action:meter-template" + 2923 "/action:meter-entry" + 2924 "/action:meter-type" + 2925 "/action:two-rate-tri-color-meter-type" + 2926 "/action:two-rate-tri-color-meter" + 2927 "/action:violate-action" + 2928 "/action:violate-3color-meter-action-params" + 2929 "/action:violate-3color-meter-action-val" { 2930 case exceed-3color-meter-action-drop { 2931 description 2932 "meter drop"; 2933 uses action:drop; 2934 } 2936 description 2937 "Augment the actions to the two-color meter"; 2938 } 2940 augment "/action:meter-template" + 2941 "/action:meter-entry" + 2942 "/action:meter-type" + 2943 "/action:one-rate-tri-color-meter-type" + 2944 "/action:one-rate-tri-color-meter" + 2945 "/action:violate-action" + 2946 "/action:violate-3color-meter-action-params" + 2947 "/action:violate-3color-meter-action-val" { 2948 case exceed-3color-meter-action-drop { 2949 description 2950 "meter drop"; 2951 uses action:drop; 2952 } 2954 description 2955 "Augment the actions to basic meter"; 2956 } 2958 } 2959 module example-compb-queue-policy { 2960 yang-version 1; 2961 namespace "urn:ietf:params:xml:ns:yang:example-compb-queue-policy"; 2962 prefix queue-plcy; 2964 import ietf-qos-classifier { 2965 prefix classifier; 2966 } 2967 import ietf-qos-policy { 2968 prefix policy; 2969 } 2971 organization "Company B"; 2972 contact 2973 "Editor: XYZ 2974 "; 2976 description 2977 "This module defines a queue policy. The classification 2978 is based on aforwarding class, and the actions are queues. 2979 Copyright (c) 2014 IETF Trust and the persons identified as 2980 authors of the code. All rights reserved. 2981 Redistribution and use in source and binary forms, with or 2982 without modification, is permitted pursuant to, and subject 2983 to the license terms contained in, the Simplified BSD License 2984 set forth in Section 4.c of the IETF Trust's Legal Provisions 2985 Relating to IETF Documents 2986 (http://trustee.ietf.org/license-info). 2987 This version of this YANG module is part of RFC XXXX; see 2988 the RFC itself for full legal notices."; 2990 revision 2015-04-07 { 2991 description 2992 "Latest revision of diffserv policy"; 2993 reference "RFC XXXX"; 2994 } 2996 identity forwarding-class { 2997 base classifier:filter-type; 2998 description 2999 "Forwarding class filter type"; 3000 } 3002 grouping forwarding-class-cfg { 3003 leaf forwarding-class-cfg { 3004 type string; 3005 description 3006 "forwarding-class name"; 3007 } 3008 description 3009 "Forwarding class filter"; 3010 } 3012 augment "/policy:policies" + 3013 "/policy:policy-entry" + 3014 "/policy:classifier-entry" + 3015 "/policy:filter-entry" { 3016 /* Does NOT support "logical-not" of forwarding class. 3017 Use "must"? */ 3018 choice filter-params { 3019 description 3020 "Choice of filters"; 3021 case forwarding-class-cfg { 3022 uses forwarding-class-cfg; 3023 description 3024 "Filter Type Internal-loss-priority"; 3025 } 3026 } 3027 description 3028 "Augments Diffserv Classifier with fwd class filter"; 3029 } 3031 identity compb-queue { 3032 base policy:action-type; 3033 description 3034 "compb-queue action type"; 3035 } 3037 grouping compb-queue-name { 3038 container queue-name { 3039 leaf name { 3040 type string; 3041 description 3042 "Queue class name"; 3043 } 3044 description 3045 "compb queue container"; 3046 } 3047 description 3048 "compb-queue grouping"; 3049 } 3051 augment "/policy:policies" + 3052 "/policy:policy-entry" + 3053 "/policy:classifier-entry" + 3054 "/policy:classifier-action-entry-cfg" { 3055 choice action-cfg-params { 3056 description 3057 "Choice of action types"; 3058 case compb-queue { 3059 uses compb-queue-name; 3060 } 3061 } 3062 description 3063 "Augment the queue actions to queue policy entry"; 3064 } 3065 } 3067 module example-compb-queue { 3068 yang-version 1; 3069 namespace "urn:ietf:params:xml:ns:yang:ietf-compb-queue"; 3070 prefix compb-queue; 3071 import ietf-qos-action { 3072 prefix action; 3073 } 3075 organization "Company B"; 3076 contact 3077 "Editor: XYZ 3078 "; 3080 description 3081 "This module describes a compb queue module. This is a 3082 template for a queue within a queue policy, referenced 3083 by name. 3085 This version of this YANG module is part of RFC XXXX; see 3086 the RFC itself for full legal notices."; 3088 revision 2015-04-07 { 3089 description 3090 "Latest revision of diffserv based classifier"; 3091 reference "RFC XXXX"; 3092 } 3094 container compb-queue { 3095 description 3096 "Queue used in compb architecture"; 3097 leaf name { 3098 type string; 3099 description 3100 "A unique name identifying this queue"; 3101 } 3102 uses action:queue; 3103 container excess-rate { 3104 choice excess-rate-type { 3105 case percent { 3106 leaf excess-rate-percent { 3107 type uint32 { 3108 range "1..100"; 3109 } 3110 description 3111 "excess-rate-percent"; 3112 } 3113 } 3114 case proportion { 3115 leaf excess-rate-poroportion { 3116 type uint32 { 3117 range "1..1000"; 3118 } 3119 description 3120 "excess-rate-poroportion"; 3121 } 3122 } 3123 description 3124 "Choice of excess-rate type"; 3125 } 3126 description 3127 "Excess rate value"; 3128 } 3129 leaf excess-priority { 3130 type enumeration { 3131 enum high { 3132 description "High Loss Priority"; 3133 } 3134 enum medium-high { 3135 description "Medium-high Loss Priority"; 3136 } 3137 enum medium-low { 3138 description "Medium-low Loss Priority"; 3139 } 3140 enum low { 3141 description "Low Loss Priority"; 3142 } 3143 enum none { 3144 description "No excess priority"; 3145 } 3146 } 3147 description 3148 "Priority of excess (above guaranted rate) traffic"; 3149 } 3150 container buffer-size { 3151 choice buffer-size-type { 3152 case percent { 3153 leaf buffer-size-percent { 3154 type uint32 { 3155 range "1..100"; 3156 } 3157 description 3158 "buffer-size-percent"; 3159 } 3160 } 3161 case temporal { 3162 leaf buffer-size-temporal { 3163 type uint64; 3164 units "microsecond"; 3165 description 3166 "buffer-size-temporal"; 3168 } 3169 } 3170 case remainder { 3171 leaf buffer-size-remainder { 3172 type empty; 3173 description 3174 "use remaining of buffer"; 3175 } 3176 } 3177 description 3178 "Choice of buffer size type"; 3179 } 3180 description 3181 "Buffer size value"; 3182 } 3183 } 3185 augment 3186 "/compb-queue" + 3187 "/queue-cfg" + 3188 "/algorithmic-drop-cfg" + 3189 "/drop-algorithm" { 3190 case random-detect { 3191 list drop-profile-list { 3192 key "priority"; 3193 description 3194 "map of priorities to drop-algorithms"; 3195 leaf priority { 3196 type enumeration { 3197 enum any { 3198 description "Any priority mapped here"; 3199 } 3200 enum high { 3201 description "High Priority Packet"; 3202 } 3203 enum medium-high { 3204 description "Medium-high Priority Packet"; 3205 } 3206 enum medium-low { 3207 description "Medium-low Priority Packet"; 3208 } 3209 enum low { 3210 description "Low Priority Packet"; 3211 } 3212 } 3213 description 3214 "Priority of guaranteed traffic"; 3215 } 3216 leaf drop-profile { 3217 type string; 3218 description 3219 "drop profile to use for this priority"; 3220 } 3221 } 3222 } 3223 description 3224 "compb random detect drop algorithm config"; 3225 } 3226 } 3228 module example-compb-scheduler-policy { 3229 yang-version 1; 3230 namespace "urn:ietf:params:xml:ns:yang:" + 3231 "example-compb-scheduler-policy"; 3232 prefix scheduler-plcy; 3234 import ietf-qos-action { 3235 prefix action; 3236 } 3238 import ietf-qos-policy { 3239 prefix policy; 3240 } 3242 organization "Company B"; 3243 contact 3244 "Editor: XYZ 3245 "; 3247 description 3248 "This module defines a scheduler policy. The classification 3249 is based on classifier-any, and the action is a scheduler."; 3251 revision 2015-04-07 { 3252 description 3253 "Latest revision of diffserv policy"; 3254 reference "RFC XXXX"; 3255 } 3257 identity queue-policy { 3258 base policy:action-type; 3259 description 3260 "forwarding-class-queue action type"; 3261 } 3263 grouping queue-policy-name { 3264 container compb-queue-policy-name { 3265 leaf name { 3266 type string; 3267 description 3268 "Queue policy name"; 3269 } 3270 description 3271 "compb-queue-policy container"; 3272 } 3273 description 3274 "compb-queue policy grouping"; 3275 } 3277 augment "/policy:policies" + 3278 "/policy:policy-entry" + 3279 "/policy:classifier-entry" + 3280 "/policy:classifier-action-entry-cfg" { 3281 choice action-cfg-params { 3282 case schedular { 3283 uses action:schedular; 3284 } 3285 case queue-policy { 3286 uses queue-policy-name; 3287 } 3288 description 3289 "Augment the scheduler policy with a queue policy"; 3290 } 3291 } 3292 } 3294 A.3. Example of Company C Diffserv Model 3296 Company C vendor augmentation is based on Ericsson's implementation 3297 differentiated QoS. This implementation first sorts traffic based on 3298 a classifier, which can sort traffic into one or more traffic 3299 forwarding classes. Then, a policer or meter policy references the 3300 classifier and its traffic forwarding classes to specify different 3301 service levels for each traffic forwarding class. 3303 Because each classifier sorts traffic into one or more traffic 3304 forwarding classes, this type of classifier does not align with ietf- 3305 qos-classifier.yang, which defines one traffic forwarding class per 3306 classifier. Additionally, Company C's policing and metering policies 3307 relies on the classifier's pre-defined traffic forwarding classes to 3308 provide differentiated services, rather than redefining the patterns 3309 within a policing or metering policy, as is defined in ietf- 3310 diffserv.yang. 3312 Due to these differences, even though Company C uses all the building 3313 blocks of classifier and policy, Company C's augmentation does not 3314 use ietf-diffserv.yang to provide differentiated service levels. 3315 Instead, Company C's augmentation uses the basic building blocks, 3316 ietf-qos-policy.yang to provide differentiated services. 3318 module example-compc-qos-policy { 3319 yang-version 1.1; 3320 namespace "urn:example-compc-qos-policy"; 3321 prefix "compcqos"; 3323 import ietf-qos-policy { 3324 prefix "pol"; 3325 } 3327 import ietf-qos-action { 3328 prefix "action"; 3329 } 3331 organization ""; 3332 contact ""; 3333 description ""; 3335 revision 2016-09-26 { 3336 description ""; 3337 reference ""; 3338 } 3340 /* identities */ 3342 identity compc-qos-policy { 3343 base pol:policy-type; 3344 } 3346 identity mdrr-queuing-policy { 3347 base compc-qos-policy; 3348 } 3350 identity pwfq-queuing-policy { 3351 base compc-qos-policy; 3352 } 3354 identity policing-policy { 3355 base compc-qos-policy; 3356 } 3358 identity metering-policy { 3359 base compc-qos-policy; 3361 } 3363 identity forwarding-policy { 3364 base compc-qos-policy; 3365 } 3367 identity overhead-profile-policy { 3368 base compc-qos-policy; 3369 } 3371 identity resource-profile-policy { 3372 base compc-qos-policy; 3373 } 3375 identity protocol-rate-limit-policy { 3376 base compc-qos-policy; 3377 } 3379 identity compc-qos-action { 3380 base pol:action-type; 3381 } 3383 /* groupings */ 3385 grouping redirect-action-grp { 3386 container redirect { 3387 /* Redirect options */ 3388 } 3389 } 3391 /* deviations */ 3393 deviation "/pol:policies/pol:policy-entry" { 3394 deviate add { 3395 must "pol:type = compc-qos-policy" { 3396 description 3397 "Only policy types drived from compc-qos-policy " + 3398 "are supported"; 3399 } 3400 } 3401 } 3403 deviation "/pol:policies/pol:policy-entry/pol:classifier-entry" { 3404 deviate add { 3405 must "../per-class-action = 'true'" { 3406 description 3407 "Only policies with per-class actions have classifiers"; 3408 } 3409 must "((../sub-type != 'mdrr-queuing-policy') and " + 3410 " (../sub-type != 'pwfq-queuing-policy')) or " + 3411 "(((../sub-type = 'mdrr-queuing-policy') or " + 3412 " (../sub-type = 'pwfq-queueing-policy')) and " + 3413 " ((classifier-entry-name = '0') or " + 3414 " (classifier-entry-name = '1') or " + 3415 " (classifier-entry-name = '2') or " + 3416 " (classifier-entry-name = '3') or " + 3417 " (classifier-entry-name = '4') or " + 3418 " (classifier-entry-name = '5') or " + 3419 " (classifier-entry-name = '6') or " + 3420 " (classifier-entry-name = '7') or " + 3421 " (classifier-entry-name = '8')))" { 3422 description 3423 "MDRR queuing policy's or PWFQ queuing policy's " + 3424 "classifier-entry-name is limited to the listed values"; 3425 } 3426 } 3427 } 3429 deviation "/pol:policies/pol:policy-entry/pol:classifier-entry" + 3430 "/pol:classifier-action-entry-cfg" { 3431 deviate add { 3432 max-elements 1; 3433 must "action-type = 'compc-qos-action'" { 3434 description 3435 "Only compc-qos-action is allowed"; 3436 } 3437 } 3438 } 3440 /* augments */ 3442 augment "/pol:policies/pol:policy-entry" { 3443 when "pol:type = 'compc-qos-policy')" { 3444 description 3445 "Additional nodes only for diffserv-policy"; 3446 } 3447 leaf sub-type { 3448 type identityref { 3449 base compc-qos-policy; 3450 } 3451 mandatory true; 3452 /* The value of this leaf must not change once configured */ 3453 } 3454 leaf per-class-action { 3455 mandatory true; 3456 type boolean; 3457 must "(((. = 'true') and " + 3458 " ((../sub-type = 'policing-policy') or " + 3459 " (../sub-type = 'metering-policy') or " + 3460 " (../sub-type = 'mdrr-queuing-policy') or " + 3461 " (../sub-type = 'pwfq-queuing-policy') or " + 3462 " (../sub-type = 'forwarding-policy'))) or " + 3463 " ((. = 'false') and " + 3464 " ((../sub-type = 'overhead-profile-policy') or " + 3465 " (../sub-type = 'resource-profile-policy') or " + 3466 " (../sub-type = 'protocol-rate-limit-policy')))" { 3467 description 3468 "Only certain policies have per-class action"; 3469 } 3470 } 3471 container traffic-classifier { 3472 presence true; 3473 when "../sub-type = 'policing-policy' or " + 3474 "../sub-type = 'metering-policy' or " + 3475 "../sub-type = 'forwarding-policy'" { 3476 description 3477 "A classifier for policing-policy or metering-policy"; 3478 } 3479 leaf name { 3480 type string; 3481 mandatory true; 3482 description 3483 "Traffic classifier name"; 3484 } 3485 leaf type { 3486 type enumeration { 3487 enum 'internal-dscp-only-classifier' { 3488 value 0; 3489 description 3490 "Classify traffic based on (internal) dscp only"; 3491 } 3492 enum 'ipv4-header-based-classifier' { 3493 value 1; 3494 description 3495 "Classify traffic based on IPv4 packet header fields"; 3496 } 3497 enum 'ipv6-header-based-classifier' { 3498 value 2; 3499 description 3500 "Classify traffic based on IPv6 packet header fields"; 3501 } 3502 } 3503 mandatory true; 3504 description 3505 "Traffic classifier type"; 3506 } 3507 } 3508 container traffic-queue { 3509 when "(../sub-type = 'mdrr-queuing-policy') or " + 3510 "(../sub-type = 'pwfq-queuing-policy')" { 3511 description 3512 "Queuing policy properties"; 3513 } 3514 leaf queue-map { 3515 type string; 3516 description 3517 "Traffic queue map for queuing policy"; 3518 } 3519 } 3520 container overhead-profile { 3521 when "../sub-type = 'overhead-profile-policy'" { 3522 description 3523 "Overhead profile policy properties"; 3524 } 3525 } 3526 container resource-profile { 3527 when "../sub-type = 'resource-profile-policy'" { 3528 description 3529 "Resource profile policy properties"; 3530 } 3531 } 3532 container protocol-rate-limit { 3533 when "../sub-type = 'protocol-rate-limit-policy'" { 3534 description 3535 "Protocol rate limit policy properties"; 3536 } 3537 } 3538 } 3540 augment "/pol:policies/pol:policy-entry/pol:classifier-entry" + 3541 "/pol:classifier-action-entry-cfg/pol:action-cfg-params" { 3542 when "../../../pol:type = 'compc-qos-policy')" { 3543 description 3544 "Configurations for a classifier-policy-type policy"; 3545 } 3546 case metering-or-policing-policy { 3547 when "../../../sub-type = 'policing-policy' or " 3548 + "../../../sub-type = 'metering-policy'" { 3549 } 3550 container dscp-marking { 3551 uses action:dscp-marking; 3552 } 3553 container precedence-marking { 3554 uses action:dscp-marking; 3555 } 3556 container priority-marking { 3557 uses action:priority; 3558 } 3559 container rate-limiting { 3560 uses action:one-rate-two-color-meter; 3561 } 3562 } 3563 case mdrr-queuing-policy { 3564 when "../../../sub-type = 'mdrr-queuing-policy'" { 3565 description 3566 "MDRR queue handling properties for the traffic " + 3567 "classified into current queue"; 3568 } 3569 leaf mdrr-queue-weight { 3570 type uint8 { 3571 range "20..100"; 3572 } 3573 units percentage; 3574 } 3575 } 3576 case pwfq-queuing-policy { 3577 when "../../../sub-type = 'pwfq-queuing-policy'" { 3578 description 3579 "PWFQ queue handling properties for traffic " + 3580 "classified into current queue"; 3581 } 3582 leaf pwfq-queue-weight { 3583 type uint8 { 3584 range "20..100"; 3585 } 3586 units percentage; 3587 } 3588 leaf pwfq-queue-priority { 3589 type uint8; 3590 } 3591 leaf pwfq-queue-rate { 3592 type uint8; 3593 } 3594 } 3595 case forwarding-policy { 3596 when "../../../sub-type = 'forwarding-policy'" { 3597 description 3598 "Forward policy handling properties for traffic " + 3599 "in this classifier"; 3600 } 3601 uses redirect-action-grp; 3602 } 3603 description 3604 "Add the classify action configuration"; 3605 } 3607 } 3609 Authors' Addresses 3611 Aseem Choudhary 3612 Cisco Systems 3613 170 W. Tasman Drive 3614 San Jose, CA 95134 3615 US 3617 Email: asechoud@cisco.com 3619 Mahesh Jethanandani 3620 Cisco Systems 3621 170 W. Tasman Drive 3622 San Jose, CA 95134 3623 US 3625 Email: mjethanandani@gmail.com 3627 Norm Strahle 3628 Juniper Networks 3629 1194 North Mathilda Avenue 3630 Sunnyvale, CA 94089 3631 US 3633 Email: nstrahle@juniper.net 3635 Ebben Aries 3636 Juniper Networks 3637 1194 North Mathilda Avenue 3638 Sunnyvale, CA 94089 3639 US 3641 Email: exa@juniper.net 3642 Ing-Wher Chen 3643 Jabil 3645 Email: ing-wher_chen@jabil.com