idnits 2.17.1 draft-asechoud-rtgwg-qos-model-04.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 03, 2018) is 2245 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 4, 2018 N. Strahle 6 E. Aries 7 Juniper Networks 8 I. Chen 9 Jabil 10 March 03, 2018 12 YANG Model for QoS 13 draft-asechoud-rtgwg-qos-model-04 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 4, 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 . . . . . . . . . . . . . . . . . . . . . 33 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 . . . . . . . . . . . 57 73 A.3. Example of Company C Diffserv Model . . . . . . . . . . . 70 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 +--:(child-policy) {action:child-policy-feature}? 451 | +--rw child-policy-cfg {child-policy-feature}? 452 | +--rw policy-name? string 453 +--:(count) {action:count-feature}? 454 | +--rw count-cfg 455 | +--rw count-action? empty 456 +--:(named-count) {action:named-counter-feature}? 457 +--rw named-counter-cfg 458 +--rw count-name-action? string 460 6. Modules 462 6.1. IETF-QOS-CLASSIFIER 464 file "ietf-qos-classifier@2018-03-03.yang" 465 module ietf-qos-classifier { 466 yang-version 1.1; 467 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-classifier"; 468 prefix classifier; 470 organization 471 "IETF RTG (Routing Area) Working Group"; 472 contact 473 "WG Web: 474 WG List: 475 WG Chair: Chris Bowers 476 477 WG Chair: Jeff Tantsura 478 479 Editor: Aseem Choudhary 480 481 Editor: Mahesh Jethanandani 482 483 Editor: Norm Strahle 484 "; 485 description 486 "This module contains a collection of YANG definitions for 487 configuring qos specification implementations. 488 Copyright (c) 2014 IETF Trust and the persons identified as 489 authors of the code. All rights reserved. 490 Redistribution and use in source and binary forms, with or 491 without modification, is permitted pursuant to, and subject 492 to the license terms contained in, the Simplified BSD License 493 set forth in Section 4.c of the IETF Trust's Legal Provisions 494 Relating to IETF Documents 495 (http://trustee.ietf.org/license-info). 496 This version of this YANG module is part of RFC XXXX; see 497 the RFC itself for full legal notices."; 499 revision 2018-03-03 { 500 description 501 "Latest revision of qos base classifier module"; 502 reference "RFC XXXX"; 503 } 505 feature policy-inline-classifier-config { 506 description 507 " This feature allows classifier configuration 508 directly under policy."; 509 } 511 feature classifier-template-feature { 512 description 513 " This feature allows classifier as template configuration 514 in a policy."; 515 } 517 feature match-any-filter-type-support { 518 description 519 " This feature allows classifier configuration 520 directly under policy."; 521 } 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 573 "; 574 leaf classifier-entry-name { 575 type string; 576 description 577 "classifier entry name"; 578 } 579 leaf classifier-entry-descr { 580 type string; 581 description 582 "classifier entry description statement"; 583 } 584 leaf classifier-entry-filter-operation { 585 type identityref { 586 base classifier-entry-filter-operation-type; 587 } 588 default "match-all-filter"; 589 description 590 "Filters are applicable as match-any or match-all filters"; 591 } 592 } 594 grouping classifier-entry-inline-attr { 595 description 596 "attributes of inline classifier in a policy"; 597 leaf classifier-entry-inline { 598 type boolean; 599 default "false"; 600 description 601 "Indication of inline classifier entry"; 602 } 603 leaf classifier-entry-filter-oper { 604 type identityref { 605 base classifier-entry-filter-operation-type; 606 } 607 default "match-all-filter"; 608 description 609 "Filters are applicable as match-any or match-all filters"; 610 } 611 list filter-entry { 612 if-feature "policy-inline-classifier-config"; 613 must " ../classifier-entry-inline = 'true' " { 614 description 615 "For inline filter configuration, inline attributemust 616 be true"; 617 } 618 key "filter-type filter-logical-not"; 619 uses filters; 620 description 621 "Filters configured inline in a policy"; 622 } 623 } 625 container classifiers { 626 if-feature "classifier-template-feature"; 627 description 628 "list of classifier entry"; 629 list classifier-entry { 630 key "classifier-entry-name"; 631 description 632 "each classifier entry contains a list of filters"; 633 uses classifier-entry-generic-attr; 634 list filter-entry { 635 key "filter-type filter-logical-not"; 636 uses filters; 637 description 638 "Filter entry configuration"; 639 } 640 } 641 } 642 } 643 645 6.2. IETF-QOS-POLICY 647 file "ietf-qos-policy@2016-03-03.yang" 648 module ietf-qos-policy { 649 yang-version 1; 650 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-policy"; 651 prefix policy; 652 import ietf-qos-classifier { 653 prefix classifier; 654 } 655 organization "IETF RTG (Routing Area) Working Group"; 656 contact 657 "WG Web: 658 WG List: 659 WG Chair: Chris Bowers 660 661 WG Chair: Jeff Tantsura 662 663 Editor: Aseem Choudhary 664 665 Editor: Mahesh Jethanandani 666 667 Editor: Norm Strahle 668 "; 670 description 671 "This module contains a collection of YANG definitions for 672 configuring qos specification implementations. 673 Copyright (c) 2014 IETF Trust and the persons identified as 674 authors of the code. All rights reserved. 675 Redistribution and use in source and binary forms, with or 676 without modification, is permitted pursuant to, and subject 677 to the license terms contained in, the Simplified BSD License 678 set forth in Section 4.c of the IETF Trust's Legal Provisions 679 Relating to IETF Documents 680 (http://trustee.ietf.org/license-info). 681 This version of this YANG module is part of RFC XXXX; see 682 the RFC itself for full legal notices."; 683 revision 2016-03-03 { 684 description 685 "Latest revision of qos policy"; 686 reference "RFC XXXX"; 687 } 688 identity policy-type { 689 description 690 "This base identity type defines policy-types"; 691 } 692 grouping policy-generic-attr { 693 description 694 "Policy Attributes"; 695 leaf policy-name { 696 type string; 697 description 698 "policy name"; 699 } 700 leaf policy-type { 701 type identityref { 702 base policy-type; 703 } 704 description 705 "policy type"; 706 } 707 leaf policy-descr { 708 type string; 709 description 710 "policy description"; 711 } 712 } 713 identity action-type { 714 description 715 "This base identity type defines action-types"; 716 } 717 grouping classifier-action-entry-cfg { 718 description 719 "List of Configuration of classifier & associated actions"; 720 list classifier-action-entry-cfg { 721 key "action-type"; 722 ordered-by user; 723 description 724 "Configuration of classifier & associated actions"; 725 leaf action-type { 726 type identityref { 727 base action-type; 728 } 729 description 730 "This defines action type "; 731 } 732 choice action-cfg-params { 733 description 734 "Choice of action types"; 735 } 736 } 737 } 738 container policies { 739 description 740 "list of policy templates"; 741 list policy-entry { 742 key "policy-name policy-type"; 743 description 744 "policy template"; 745 uses policy-generic-attr; 746 list classifier-entry { 747 key "classifier-entry-name"; 748 ordered-by user; 749 description 750 "Classifier entry configuration in a policy"; 751 leaf classifier-entry-name { 752 type string; 753 description 754 "classifier entry name"; 755 } 756 uses classifier:classifier-entry-inline-attr; 757 uses classifier-action-entry-cfg; 758 } 759 } 760 } 761 } 762 764 6.3. IETF-QOS-ACTION 766 file "ietf-qos-action@2018-03-03.yang" 767 module ietf-qos-action { 768 yang-version 1.1; 769 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-action"; 770 prefix action; 772 import ietf-inet-types { 773 prefix inet; 774 } 775 import ietf-qos-policy { 776 prefix policy; 777 } 779 organization 780 "IETF RTG (Routing Area) Working Group"; 781 contact 782 "WG Web: 783 WG List: 784 WG Chair: Chris Bowers 785 786 WG Chair: Jeff Tantsura 787 788 Editor: Aseem Choudhary 789 790 Editor: Mahesh Jethanandani 791 792 Editor: Norm Strahle 793 "; 794 description 795 "This module contains a collection of YANG definitions for 796 configuring qos specification implementations. 797 Copyright (c) 2014 IETF Trust and the persons identified as 798 authors of the code. All rights reserved. 799 Redistribution and use in source and binary forms, with or 800 without modification, is permitted pursuant to, and subject 801 to the license terms contained in, the Simplified BSD License 802 set forth in Section 4.c of the IETF Trust's Legal Provisions 803 Relating to IETF Documents 804 (http://trustee.ietf.org/license-info). 805 This version of this YANG module is part of RFC XXXX; see 806 the RFC itself for full legal notices."; 808 revision 2018-03-03 { 809 description 810 "Latest revision for qos actions"; 811 reference "RFC XXXX"; 813 } 815 feature meter-template-support { 816 description 817 " This feature allows support of meter-template."; 818 } 820 feature meter-inline-feature { 821 description 822 " This feature allows support of meter-inline configuration."; 823 } 825 feature meter-reference-feature { 826 description 827 " This feature allows support of meter by reference 828 configuration."; 829 } 831 feature min-rate-action-support { 832 description 833 " This feature allows support of min rate configuration 834 in policy."; 835 } 837 feature max-rate-action-support { 838 description 839 " This feature allows support of max rate configuration 840 in policy."; 841 } 843 feature queue-action-support { 844 description 845 " This feature allows support of queue action configuration 846 in policy."; 847 } 849 feature scheduler-action-support { 850 description 851 " This feature allows support of scheduler configuration 852 in policy."; 853 } 855 feature child-policy-feature { 856 description 857 " This feature allows configuration of hierarchical policy."; 858 } 860 feature count-feature { 861 description 862 "This feature allows action configuration to enable 863 counter in a classifier"; 864 } 866 feature named-counter-feature { 867 description 868 "This feature allows action configuration to enable 869 named counter in a classifier"; 870 } 872 identity rate-unit-type { 873 description 874 "base rate-unit type"; 875 } 877 identity bits-per-second { 878 base rate-unit-type; 879 description 880 "bits per second identity"; 881 } 883 identity kilo-bits-per-second { 884 base rate-unit-type; 885 description 886 "kilo bits per second identity"; 887 } 889 identity mega-bits-per-second { 890 base rate-unit-type; 891 description 892 "mega bits per second identity"; 893 } 895 identity giga-bits-per-second { 896 base rate-unit-type; 897 description 898 "mega bits per second identity"; 899 } 901 identity percent { 902 base rate-unit-type; 903 description 904 "percentage"; 905 } 907 identity dscp-marking { 908 base policy:action-type; 909 description 910 "dscp marking action type"; 911 } 913 identity meter-inline { 914 base policy:action-type; 915 if-feature "meter-inline-feature"; 916 description 917 "meter-inline action type"; 918 } 920 identity meter-reference { 921 base policy:action-type; 922 if-feature "meter-reference-feature"; 923 description 924 "meter reference action type"; 925 } 927 identity min-rate { 928 base policy:action-type; 929 description 930 "min-rate action type"; 931 } 933 identity max-rate { 934 base policy:action-type; 935 description 936 "max-rate action type"; 937 } 939 identity queue { 940 base policy:action-type; 941 description 942 "queue action type"; 943 } 945 identity schedular { 946 base policy:action-type; 947 description 948 "schedular action type"; 949 } 951 identity discard { 952 base policy:action-type; 953 description 954 "discard action type"; 955 } 956 identity child-policy { 957 base policy:action-type; 958 if-feature "child-policy-feature"; 959 description 960 "child-policy action type"; 961 } 963 identity count { 964 base policy:action-type; 965 if-feature "count-feature"; 966 description 967 "count action type"; 968 } 970 identity named-counter { 971 base policy:action-type; 972 if-feature "named-counter-feature"; 973 description 974 "name counter action type"; 975 } 977 identity meter-type { 978 description 979 "This base identity type defines meter types"; 980 } 982 identity one-rate-two-color-meter-type { 983 base meter-type; 984 description 985 "one rate two color meter type"; 986 } 988 identity one-rate-tri-color-meter-type { 989 base meter-type; 990 description 991 "one rate three color meter type"; 992 } 994 identity two-rate-tri-color-meter-type { 995 base meter-type; 996 description 997 "two rate three color meter action type"; 998 } 1000 identity drop-type { 1001 description 1002 "drop algorithm"; 1003 } 1004 identity tail-drop { 1005 base drop-type; 1006 description 1007 "tail drop algorithm"; 1008 } 1010 identity random-detect { 1011 base drop-type; 1012 description 1013 "random detect algorithm"; 1014 } 1016 identity conform-2color-meter-action-type { 1017 description 1018 "action type in a meter"; 1019 } 1021 identity exceed-2color-meter-action-type { 1022 description 1023 "action type in a meter"; 1024 } 1026 identity conform-3color-meter-action-type { 1027 description 1028 "action type in a meter"; 1029 } 1031 identity exceed-3color-meter-action-type { 1032 description 1033 "action type in a meter"; 1034 } 1036 identity violate-3color-meter-action-type { 1037 description 1038 "action type in a meter"; 1039 } 1041 grouping rate-value-unit { 1042 leaf rate-value { 1043 type uint64; 1044 description 1045 "rate value"; 1046 } 1047 leaf rate-unit { 1048 type identityref { 1049 base rate-unit-type; 1050 } 1051 description 1052 "rate unit"; 1053 } 1054 description 1055 "rate value and unit grouping"; 1056 } 1058 grouping burst { 1059 description 1060 "burst size or interval configuration"; 1061 choice burst-type { 1062 case size { 1063 leaf burst-size { 1064 type uint64; 1065 units "bytes"; 1066 description 1067 "burst size"; 1068 } 1069 } 1070 case interval { 1071 leaf burst-interval { 1072 type uint64; 1073 units "microsecond"; 1074 description 1075 "burst interval"; 1076 } 1077 } 1078 description 1079 "Choice of burst type"; 1080 } 1081 } 1083 grouping threshold { 1084 description 1085 "Threshold Parameters"; 1086 container threshold { 1087 description 1088 "threshold"; 1089 choice threshold-type { 1090 case size { 1091 leaf threshold-size { 1092 type uint64; 1093 units "bytes"; 1094 description 1095 "Threshold size"; 1096 } 1097 } 1098 case interval { 1099 leaf threshold-interval { 1100 type uint64; 1101 units "microsecond"; 1102 description 1103 "Threshold interval"; 1104 } 1105 } 1106 description 1107 "Choice of threshold type"; 1108 } 1109 } 1110 } 1112 grouping drop { 1113 container drop-cfg { 1114 leaf drop-action { 1115 type empty; 1116 description 1117 "always drop algorithm"; 1118 } 1119 description 1120 "the drop action"; 1121 } 1122 description 1123 "always drop grouping"; 1124 } 1126 grouping queuelimit { 1127 container qlimit-thresh { 1128 uses threshold; 1129 description 1130 "the queue limit"; 1131 } 1132 description 1133 "the queue limit beyond which queue will not hold any packet"; 1134 } 1136 grouping conform-2color-meter-action-params { 1137 description 1138 "meter action parameters"; 1139 list conform-2color-meter-action-params { 1140 key "conform-2color-meter-action-type"; 1141 ordered-by user; 1142 description 1143 "Configuration of basic-meter & associated actions"; 1144 leaf conform-2color-meter-action-type { 1145 type identityref { 1146 base conform-2color-meter-action-type; 1147 } 1148 description 1149 "meter action type"; 1150 } 1151 choice conform-2color-meter-action-val { 1152 description 1153 " meter action based on choice of meter action type"; 1154 } 1155 } 1156 } 1158 grouping exceed-2color-meter-action-params { 1159 description 1160 "meter action parameters"; 1161 list exceed-2color-meter-action-params { 1162 key "exceed-2color-meter-action-type"; 1163 ordered-by user; 1164 description 1165 "Configuration of basic-meter & associated actions"; 1166 leaf exceed-2color-meter-action-type { 1167 type identityref { 1168 base exceed-2color-meter-action-type; 1169 } 1170 description 1171 "meter action type"; 1172 } 1173 choice exceed-2color-meter-action-val { 1174 description 1175 " meter action based on choice of meter action type"; 1176 } 1177 } 1178 } 1180 grouping conform-3color-meter-action-params { 1181 description 1182 "meter action parameters"; 1183 list conform-3color-meter-action-params { 1184 key "conform-3color-meter-action-type"; 1185 ordered-by user; 1186 description 1187 "Configuration of basic-meter & associated actions"; 1188 leaf conform-3color-meter-action-type { 1189 type identityref { 1190 base conform-3color-meter-action-type; 1191 } 1192 description 1193 "meter action type"; 1194 } 1195 choice conform-3color-meter-action-val { 1196 description 1197 " meter action based on choice of meter action type"; 1198 } 1199 } 1200 } 1202 grouping exceed-3color-meter-action-params { 1203 description 1204 "meter action parameters"; 1205 list exceed-3color-meter-action-params { 1206 key "exceed-3color-meter-action-type"; 1207 ordered-by user; 1208 description 1209 "Configuration of basic-meter & associated actions"; 1210 leaf exceed-3color-meter-action-type { 1211 type identityref { 1212 base exceed-3color-meter-action-type; 1213 } 1214 description 1215 "meter action type"; 1216 } 1217 choice exceed-3color-meter-action-val { 1218 description 1219 " meter action based on choice of meter action type"; 1220 } 1221 } 1222 } 1224 grouping violate-3color-meter-action-params { 1225 description 1226 "meter action parameters"; 1227 list violate-3color-meter-action-params { 1228 key "violate-3color-meter-action-type"; 1229 ordered-by user; 1230 description 1231 "Configuration of basic-meter & associated actions"; 1232 leaf violate-3color-meter-action-type { 1233 type identityref { 1234 base violate-3color-meter-action-type; 1235 } 1236 description 1237 "meter action type"; 1238 } 1239 choice violate-3color-meter-action-val { 1240 description 1241 " meter action based on choice of meter action type"; 1242 } 1243 } 1245 } 1247 grouping one-rate-two-color-meter { 1248 container one-rate-two-color-meter { 1249 description 1250 "single rate two color marker meter"; 1251 leaf meter-rate { 1252 type uint64; 1253 units "bits-per-second"; 1254 description 1255 "meter rate"; 1256 } 1257 leaf meter-burst { 1258 type uint64; 1259 units "byes"; 1260 description 1261 "burst size"; 1262 } 1263 container conform-action { 1264 uses conform-2color-meter-action-params; 1265 description 1266 "conform action"; 1267 } 1268 container exceed-action { 1269 uses exceed-2color-meter-action-params; 1270 description 1271 "exceed action"; 1272 } 1273 } 1274 description 1275 "single rate two color marker meter attributes"; 1276 } 1278 grouping one-rate-tri-color-meter { 1279 container one-rate-tri-color-meter { 1280 description 1281 "single rate three color meter"; 1282 leaf committed-rate { 1283 type uint64; 1284 units "bits-per-second"; 1285 description 1286 "meter rate"; 1287 } 1288 leaf committed-burst { 1289 type uint64; 1290 units "byes"; 1291 description 1292 "commited burst size"; 1294 } 1295 leaf excess-burst { 1296 type uint64; 1297 units "byes"; 1298 description 1299 "excess burst size"; 1300 } 1301 container conform-action { 1302 uses conform-3color-meter-action-params; 1303 description 1304 "conform, or green action"; 1305 } 1306 container exceed-action { 1307 uses exceed-3color-meter-action-params; 1308 description 1309 "exceed, or yellow action"; 1310 } 1311 container violate-action { 1312 uses violate-3color-meter-action-params; 1313 description 1314 "violate, or red action"; 1315 } 1316 } 1317 description 1318 "one-rate-tri-color-meter attributes"; 1319 } 1321 grouping two-rate-tri-color-meter { 1322 container two-rate-tri-color-meter { 1323 description 1324 "two rate three color meter"; 1325 leaf committed-rate { 1326 type uint64; 1327 units "bits-per-second"; 1328 description 1329 "meter rate"; 1330 } 1331 leaf committed-burst { 1332 type uint64; 1333 units "byes"; 1334 description 1335 "commited burst size"; 1336 } 1337 leaf peak-rate { 1338 type uint64; 1339 units "bits-per-second"; 1340 description 1341 "meter rate"; 1343 } 1344 leaf peak-burst { 1345 type uint64; 1346 units "byes"; 1347 description 1348 "commited burst size"; 1349 } 1350 container conform-action { 1351 uses conform-3color-meter-action-params; 1352 description 1353 "conform, or green action"; 1354 } 1355 container exceed-action { 1356 uses exceed-3color-meter-action-params; 1357 description 1358 "exceed, or yellow action"; 1359 } 1360 container violate-action { 1361 uses violate-3color-meter-action-params; 1362 description 1363 "exceed, or red action"; 1364 } 1365 } 1366 description 1367 "two-rate-tri-color-meter attributes"; 1368 } 1370 grouping meter { 1371 choice meter-type { 1372 case one-rate-two-color-meter-type { 1373 uses one-rate-two-color-meter; 1374 description 1375 "basic meter"; 1376 } 1377 case one-rate-tri-color-meter-type { 1378 uses one-rate-tri-color-meter; 1379 description 1380 "one rate tri-color meter"; 1381 } 1382 case two-rate-tri-color-meter-type { 1383 uses two-rate-tri-color-meter; 1384 description 1385 "two rate tri-color meter"; 1386 } 1387 description 1388 " meter action based on choice of meter action type"; 1389 } 1390 description 1391 "meter attributes"; 1392 } 1394 container meter-template { 1395 description 1396 "list of meter templates"; 1397 list meter-entry { 1398 if-feature "meter-template-support"; 1399 key "meter-name"; 1400 description 1401 "meter entry template"; 1402 leaf meter-name { 1403 type string; 1404 description 1405 "meter identifier"; 1406 } 1407 uses meter; 1408 } 1409 } 1411 grouping meter-reference { 1412 container meter-reference-cfg { 1413 leaf meter-reference-name { 1414 type string; 1415 description 1416 "This leaf defines name of the meter referenced"; 1417 } 1418 description 1419 "meter reference name"; 1420 } 1421 description 1422 "meter reference"; 1423 } 1425 grouping count { 1426 container count-cfg { 1427 leaf count-action { 1428 type empty; 1429 description 1430 "count action"; 1431 } 1432 description 1433 "the count action"; 1434 } 1435 description 1436 "the count action grouping"; 1437 } 1438 grouping named-counter { 1439 container named-counter-cfg { 1440 leaf count-name-action { 1441 type string; 1442 description 1443 "count action"; 1444 } 1445 description 1446 "the count action"; 1447 } 1448 description 1449 "the count action grouping"; 1450 } 1452 grouping discard { 1453 container discard-cfg { 1454 leaf discard { 1455 type empty; 1456 description 1457 "discard action"; 1458 } 1459 description 1460 "discard action"; 1461 } 1462 description 1463 "discard grouping"; 1464 } 1466 grouping priority { 1467 container priority-cfg { 1468 leaf priority-level { 1469 type uint8; 1470 description 1471 "priority level"; 1472 } 1473 description 1474 "priority attributes"; 1475 } 1476 description 1477 "priority attributes grouping"; 1478 } 1480 grouping min-rate { 1481 container min-rate-cfg { 1482 uses rate-value-unit; 1483 description 1484 "min guaranteed bandwidth"; 1485 } 1486 description 1487 "minimum rate grouping"; 1488 } 1490 grouping dscp-marking { 1491 container dscp-cfg { 1492 leaf dscp { 1493 type inet:dscp; 1494 description 1495 "dscp marking"; 1496 } 1497 description 1498 "dscp marking container"; 1499 } 1500 description 1501 "dscp marking grouping"; 1502 } 1504 grouping child-policy { 1505 container child-policy-cfg { 1506 if-feature "child-policy-feature"; 1507 leaf policy-name { 1508 type string; 1509 description 1510 "Hierarchical Policy"; 1511 } 1512 description 1513 "Hierarchical Policy configuration container"; 1514 } 1515 description 1516 "Grouping of Hierarchical Policy configuration"; 1517 } 1519 grouping max-rate { 1520 container max-rate-cfg { 1521 uses rate-value-unit; 1522 uses burst; 1523 description 1524 "maximum rate attributes container"; 1525 } 1526 description 1527 "maximum rate attributes"; 1528 } 1530 grouping queue { 1531 container queue-cfg { 1532 uses priority; 1533 uses min-rate; 1534 uses max-rate; 1535 container algorithmic-drop-cfg { 1536 choice drop-algorithm { 1537 case tail-drop { 1538 container tail-drop-cfg { 1539 leaf tail-drop-alg { 1540 type empty; 1541 description 1542 "tail drop algorithm"; 1543 } 1544 description 1545 "Tail Drop configuration container"; 1546 } 1547 description 1548 "Tail Drop choice"; 1549 } 1550 description 1551 "Choice of Drop Algorithm"; 1552 } 1553 description 1554 "Algorithmic Drop configuration container"; 1555 } 1556 description 1557 "Queue configuration container"; 1558 } 1559 description 1560 "Queue grouping"; 1561 } 1563 grouping schedular { 1564 container schedular-cfg { 1565 uses min-rate; 1566 uses max-rate; 1567 description 1568 "Schedular configuration container"; 1569 } 1570 description 1571 "Schedular configuration grouping"; 1572 } 1573 } 1574 1576 6.4. IETF-QOS-TARGET 1578 file "ietf-qos-target@2017-12-12.yang" 1579 module ietf-qos-target { 1580 yang-version 1; 1581 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-target"; 1582 prefix target; 1584 import ietf-interfaces { 1585 prefix if; 1586 } 1587 import ietf-qos-policy { 1588 prefix policy; 1589 } 1591 organization 1592 "IETF NETMOD (Netmod Working Group) Working Group"; 1593 contact 1594 "WG Web: 1595 WG List: 1596 WG Chair: Jurgen Schonwalder 1597 1598 WG Chair: Lou Berger 1599 1600 WG Chair: Kent Watsen 1601 1602 Editor: Aseem Choudhary 1603 1604 Editor: Mahesh Jethanandani 1605 1674 6.5. IETF-DIFFSERV 1676 file "ietf-diffserv@2018-03-03.yang" 1677 module ietf-diffserv { 1678 yang-version 1.1; 1679 namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv"; 1680 prefix diffserv; 1682 import ietf-qos-classifier { 1683 prefix classifier; 1684 } 1685 import ietf-qos-policy { 1686 prefix policy; 1687 } 1688 import ietf-qos-action { 1689 prefix action; 1690 } 1691 import ietf-inet-types { 1692 prefix inet; 1693 } 1695 organization 1696 "IETF NETMOD (Netmod Working Group) Working Group"; 1697 contact 1698 "WG Web: 1699 WG List: 1700 WG Chair: Jurgen Schonwalder 1701 1702 WG Chair: Lou Berger 1703 1704 WG Chair: Kent Watsen 1705 1706 Editor: Aseem Choudhary 1707 1708 Editor: Mahesh Jethanandani 1709 2134 7. Security Considerations 2136 8. Acknowledgement 2138 9. References 2140 9.1. Normative References 2142 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2143 Requirement Levels", BCP 14, RFC 2119, 2144 DOI 10.17487/RFC2119, March 1997, 2145 . 2147 [RFC2697] Heinanen, J. and R. Guerin, "A Single Rate Three Color 2148 Marker", RFC 2697, DOI 10.17487/RFC2697, September 1999, 2149 . 2151 [RFC2698] Heinanen, J. and R. Guerin, "A Two Rate Three Color 2152 Marker", RFC 2698, DOI 10.17487/RFC2698, September 1999, 2153 . 2155 [RFC3289] Baker, F., Chan, K., and A. Smith, "Management Information 2156 Base for the Differentiated Services Architecture", 2157 RFC 3289, DOI 10.17487/RFC3289, May 2002, 2158 . 2160 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2161 the Network Configuration Protocol (NETCONF)", RFC 6020, 2162 DOI 10.17487/RFC6020, October 2010, 2163 . 2165 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2166 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2167 . 2169 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 2170 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 2171 . 2173 9.2. Informative References 2175 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 2176 and W. Weiss, "An Architecture for Differentiated 2177 Services", RFC 2475, DOI 10.17487/RFC2475, December 1998, 2178 . 2180 Appendix A. Company A, Company B and Company C examples 2182 Company A, Company B and Company C Diffserv modules augments all the 2183 filter types of the QoS classifier module as well as the QoS policy 2184 module that allow it to define marking, metering, min-rate, max-rate 2185 actions. Queuing and metering counters are realized by augmenting of 2186 the QoS target module. 2188 A.1. Example of Company A Diffserv Model 2190 The following Company A vendor example augments the qos and diffserv 2191 model, demonstrating some of the following functionality: 2193 - use of template based classifier definitions 2195 - use of single policy type modelling queue, scheduler policy, and a 2196 filter policy. All of these policies either augment the qos policy 2197 or the diffserv modules 2199 - support of hierarchial policy. 2201 - use of inline actions in a policy 2202 - flexibility in marking dscp or metadata at ingress and/or egress. 2204 module example-compa-diffserv { 2205 namespace "urn:ietf:params:xml:ns:yang:example-compa-diffserv"; 2206 prefix example; 2208 import ietf-interfaces { 2209 prefix if; 2210 } 2211 import ietf-qos-classifier { 2212 prefix classifier; 2213 } 2214 import ietf-qos-policy { 2215 prefix policy; 2216 } 2217 import ietf-qos-action { 2218 prefix action; 2219 } 2220 import ietf-qos-target { 2221 prefix target; 2222 } 2223 import ietf-diffserv { 2224 prefix diffserv; 2225 } 2227 organization "Company A"; 2228 contact 2229 "Editor: XYZ 2230 "; 2231 description 2232 "This module contains a collection of YANG definitions of 2233 companyA diffserv specification extension."; 2234 revision 2016-06-15 { 2235 description 2236 "Initial revision for diffserv actions on network packets"; 2237 reference 2238 "RFC 6020: YANG - A Data Modeling Language for the 2239 Network Configuration Protocol (NETCONF)"; 2240 } 2242 identity default-policy-type { 2243 base policy:policy-type; 2244 description 2245 "This defines default policy-type"; 2246 } 2248 identity qos-group { 2249 base classifier:filter-type; 2250 description 2251 "qos-group filter-type"; 2252 } 2254 grouping qos-group-cfg { 2255 list qos-group-cfg { 2256 key "qos-group-min qos-group-max"; 2257 description 2258 "list of dscp ranges"; 2259 leaf qos-group-min { 2260 type uint8; 2261 description 2262 "Minimum value of qos-group range"; 2263 } 2264 leaf qos-group-max { 2265 type uint8; 2266 description 2267 "maximum value of qos-group range"; 2268 } 2269 } 2270 description 2271 "Filter containing list of qos-group ranges"; 2272 } 2274 grouping wred-threshold { 2275 container wred-min-thresh { 2276 uses action:threshold; 2277 description 2278 "Minimum threshold"; 2279 } 2280 container wred-max-thresh { 2281 uses action:threshold; 2282 description 2283 "Maximum threshold"; 2284 } 2285 leaf mark-probability { 2286 type uint32 { 2287 range "1..1000"; 2288 } 2289 description 2290 "Mark probability"; 2291 } 2292 description 2293 "WRED threshold attributes"; 2294 } 2296 grouping randomdetect { 2297 leaf exp-weighting-const { 2298 type uint32; 2299 description 2300 "Exponential weighting constant factor for wred profile"; 2301 } 2302 uses wred-threshold; 2303 description 2304 "Random detect attributes"; 2305 } 2307 /************************************************* 2308 * Augmentation to Classifier Module 2309 *************************************************/ 2311 augment "/classifier:classifiers/" + 2312 "classifier:classifier-entry/" + 2313 "classifier:filter-entry/diffserv:filter-param" { 2314 case qos-group { 2315 uses qos-group-cfg; 2316 description 2317 "Filter containing list of qos-group ranges. 2318 Qos-group represent packet metadata information 2319 in a device. "; 2320 } 2321 description 2322 "augmentation of classifier filters"; 2323 } 2325 /************************************************* 2326 * Augmentation to Policy Module 2327 *************************************************/ 2329 augment "/policy:policies/policy:policy-entry/" + 2330 "policy:classifier-entry/" + 2331 "policy:classifier-action-entry-cfg/" + 2332 "policy:action-cfg-params" { 2333 case priority { 2334 uses action:priority; 2335 } 2336 case min-rate { 2337 uses action:min-rate; 2338 } 2339 case max-rate { 2340 uses action:max-rate; 2341 } 2342 case random-detect { 2343 uses randomdetect; 2344 } 2345 case meter-inline { 2346 uses action:meter; 2347 } 2348 case child-policy { 2349 leaf child-policy { 2350 type leafref { 2351 path "/policy:policies/policy:policy-entry/" + 2352 "policy:policy-name"; 2353 } 2354 description 2355 "Child Policy in the hierarchial configuration"; 2356 } 2357 } 2358 description 2359 "Augment the actions to policy entry"; 2360 } 2362 augment "/policy:policies" + 2363 "/policy:policy-entry" + 2364 "/policy:classifier-entry" + 2365 "/policy:classifier-action-entry-cfg" + 2366 "/policy:action-cfg-params" + 2367 "/example:meter-inline" + 2368 "/example:meter-type" + 2369 "/example:one-rate-two-color-meter-type" + 2370 "/example:one-rate-two-color-meter" + 2371 "/example:conform-action" + 2372 "/example:meter-action-params" + 2373 "/example:meter-action-val" { 2375 description 2376 "augment the one-rate-two-color meter conform 2377 with actions"; 2378 case meter-action-drop { 2379 description 2380 "meter drop"; 2381 uses action:drop; 2382 } 2383 case meter-action-mark-dscp { 2384 description 2385 "meter action dscp marking"; 2386 uses action:dscp-marking; 2387 } 2388 } 2389 augment "/policy:policies" + 2390 "/policy:policy-entry" + 2391 "/policy:classifier-entry" + 2392 "/policy:classifier-action-entry-cfg" + 2393 "/policy:action-cfg-params" + 2394 "/example:meter-inline" + 2395 "/example:meter-type" + 2396 "/example:one-rate-two-color-meter-type" + 2397 "/example:one-rate-two-color-meter" + 2398 "/example:exceed-action" + 2399 "/example:meter-action-params" + 2400 "/example:meter-action-val" { 2402 description 2403 "augment the one-rate-two-color meter exceed 2404 with actions"; 2405 case meter-action-drop { 2406 description 2407 "meter drop"; 2408 uses action:drop; 2409 } 2410 case meter-action-mark-dscp { 2411 description 2412 "meter action dscp marking"; 2413 uses action:dscp-marking; 2414 } 2415 } 2416 augment "/policy:policies" + 2417 "/policy:policy-entry" + 2418 "/policy:classifier-entry" + 2419 "/policy:classifier-action-entry-cfg" + 2420 "/policy:action-cfg-params" + 2421 "/example:meter-inline" + 2422 "/example:meter-type" + 2423 "/example:one-rate-tri-color-meter-type" + 2424 "/example:one-rate-tri-color-meter" + 2425 "/example:conform-action" + 2426 "/example:meter-action-params" + 2427 "/example:meter-action-val" { 2429 description 2430 "augment the one-rate-tri-color meter conform 2431 with actions"; 2432 case meter-action-drop { 2433 description 2434 "meter drop"; 2435 uses action:drop; 2436 } 2437 case meter-action-mark-dscp { 2438 description 2439 "meter action dscp marking"; 2440 uses action:dscp-marking; 2441 } 2443 } 2444 augment "/policy:policies" + 2445 "/policy:policy-entry" + 2446 "/policy:classifier-entry" + 2447 "/policy:classifier-action-entry-cfg" + 2448 "/policy:action-cfg-params" + 2449 "/example:meter-inline" + 2450 "/example:meter-type" + 2451 "/example:one-rate-tri-color-meter-type" + 2452 "/example:one-rate-tri-color-meter" + 2453 "/example:exceed-action" + 2454 "/example:meter-action-params" + 2455 "/example:meter-action-val" { 2457 description 2458 "augment the one-rate-tri-color meter exceed 2459 with actions"; 2460 case meter-action-drop { 2461 description 2462 "meter drop"; 2463 uses action:drop; 2464 } 2465 case meter-action-mark-dscp { 2466 description 2467 "meter action dscp marking"; 2468 uses action:dscp-marking; 2469 } 2470 } 2471 augment "/policy:policies" + 2472 "/policy:policy-entry" + 2473 "/policy:classifier-entry" + 2474 "/policy:classifier-action-entry-cfg" + 2475 "/policy:action-cfg-params" + 2476 "/example:meter-inline" + 2477 "/example:meter-type" + 2478 "/example:one-rate-tri-color-meter-type" + 2479 "/example:one-rate-tri-color-meter" + 2480 "/example:violate-action" + 2481 "/example:meter-action-params" + 2482 "/example:meter-action-val" { 2483 description 2484 "augment the one-rate-tri-color meter conform 2485 with actions"; 2486 case meter-action-drop { 2487 description 2488 "meter drop"; 2489 uses action:drop; 2490 } 2491 case meter-action-mark-dscp { 2492 description 2493 "meter action dscp marking"; 2494 uses action:dscp-marking; 2495 } 2496 } 2498 augment "/policy:policies" + 2499 "/policy:policy-entry" + 2500 "/policy:classifier-entry" + 2501 "/policy:classifier-action-entry-cfg" + 2502 "/policy:action-cfg-params" + 2503 "/example:meter-inline" + 2504 "/example:meter-type" + 2505 "/example:two-rate-tri-color-meter-type" + 2506 "/example:two-rate-tri-color-meter" + 2507 "/example:conform-action" + 2508 "/example:meter-action-params" + 2509 "/example:meter-action-val" { 2511 description 2512 "augment the one-rate-tri-color meter conform 2513 with actions"; 2514 case meter-action-drop { 2515 description 2516 "meter drop"; 2517 uses action:drop; 2518 } 2519 case meter-action-mark-dscp { 2520 description 2521 "meter action dscp marking"; 2522 uses action:dscp-marking; 2523 } 2524 } 2525 augment "/policy:policies" + 2526 "/policy:policy-entry" + 2527 "/policy:classifier-entry" + 2528 "/policy:classifier-action-entry-cfg" + 2529 "/policy:action-cfg-params" + 2530 "/example:meter-inline" + 2531 "/example:meter-type" + 2532 "/example:two-rate-tri-color-meter-type" + 2533 "/example:two-rate-tri-color-meter" + 2534 "/example:exceed-action" + 2535 "/example:meter-action-params" + 2536 "/example:meter-action-val" { 2538 description 2539 "augment the two-rate-tri-color meter exceed 2540 with actions"; 2541 case meter-action-drop { 2542 description 2543 "meter drop"; 2544 uses action:drop; 2545 } 2546 case meter-action-mark-dscp { 2547 description 2548 "meter action dscp marking"; 2549 uses action:dscp-marking; 2550 } 2551 } 2552 augment "/policy:policies" + 2553 "/policy:policy-entry" + 2554 "/policy:classifier-entry" + 2555 "/policy:classifier-action-entry-cfg" + 2556 "/policy:action-cfg-params" + 2557 "/example:meter-inline" + 2558 "/example:meter-type" + 2559 "/example:two-rate-tri-color-meter-type" + 2560 "/example:two-rate-tri-color-meter" + 2561 "/example:violate-action" + 2562 "/example:meter-action-params" + 2563 "/example:meter-action-val" { 2564 description 2565 "augment the two-rate-tri-color meter violate 2566 with actions"; 2567 case meter-action-drop { 2568 description 2569 "meter drop"; 2570 uses action:drop; 2571 } 2572 case meter-action-mark-dscp { 2573 description 2574 "meter action dscp marking"; 2575 uses action:dscp-marking; 2576 } 2577 } 2578 augment "/policy:policies" + 2579 "/policy:policy-entry" + 2580 "/policy:classifier-entry" + 2581 "/policy:classifier-action-entry-cfg" + 2582 "/policy:action-cfg-params" + 2583 "/example:meter-inline" + 2584 "/example:meter-type" + 2585 "/example:one-rate-two-color-meter-type" + 2586 "/example:one-rate-two-color-meter" { 2588 description 2589 "augment the one-rate-two-color meter with" + 2590 "color classifiers"; 2591 container conform-color { 2592 uses classifier:classifier-entry-generic-attr; 2593 description 2594 "conform color classifier container"; 2595 } 2596 container exceed-color { 2597 uses classifier:classifier-entry-generic-attr; 2598 description 2599 "exceed color classifier container"; 2600 } 2601 } 2602 augment "/policy:policies" + 2603 "/policy:policy-entry" + 2604 "/policy:classifier-entry" + 2605 "/policy:classifier-action-entry-cfg" + 2606 "/policy:action-cfg-params" + 2607 "/example:meter-inline" + 2608 "/example:meter-type" + 2609 "/example:one-rate-tri-color-meter-type" + 2610 "/example:one-rate-tri-color-meter" { 2611 description 2612 "augment the one-rate-tri-color meter with" + 2613 "color classifiers"; 2614 container conform-color { 2615 uses classifier:classifier-entry-generic-attr; 2616 description 2617 "conform color classifier container"; 2618 } 2619 container exceed-color { 2620 uses classifier:classifier-entry-generic-attr; 2621 description 2622 "exceed color classifier container"; 2623 } 2624 container violate-color { 2625 uses classifier:classifier-entry-generic-attr; 2626 description 2627 "violate color classifier container"; 2628 } 2629 } 2630 augment "/policy:policies" + 2631 "/policy:policy-entry" + 2632 "/policy:classifier-entry" + 2633 "/policy:classifier-action-entry-cfg" + 2634 "/policy:action-cfg-params" + 2635 "/example:meter-inline" + 2636 "/example:meter-type" + 2637 "/example:two-rate-tri-color-meter-type" + 2638 "/example:two-rate-tri-color-meter" { 2639 description 2640 "augment the two-rate-tri-color meter with" + 2641 "color classifiers"; 2642 container conform-color { 2643 uses classifier:classifier-entry-generic-attr; 2644 description 2645 "conform color classifier container"; 2646 } 2647 container exceed-color { 2648 uses classifier:classifier-entry-generic-attr; 2649 description 2650 "exceed color classifier container"; 2651 } 2652 container violate-color { 2653 uses classifier:classifier-entry-generic-attr; 2654 description 2655 "violate color classifier container"; 2656 } 2657 } 2659 /************************************************* 2660 * Augmentation to Target Module 2661 *************************************************/ 2663 augment "/if:interfaces/if:interface/" + 2664 "target:qos-target-entry/" + 2665 "target:qos-target-classifier-statistics/" + 2666 "diffserv:diffserv-action-statistics" { 2667 uses target:queuing-stats; 2668 description 2669 "Augment the statistics to policy entry"; 2670 } 2671 augment "/if:interfaces/if:interface/" + 2672 "target:qos-target-entry/" + 2673 "target:qos-target-classifier-statistics" { 2674 leaf relative-path { 2675 type string; 2676 description 2677 "Relative Path of the classifier entry in the 2678 hierarchial policy"; 2679 } 2680 description 2681 "Augment the statistics to policy entry"; 2682 } 2683 } 2685 A.2. Example of Company B Diffserv Model 2687 The following vendor example augments the qos and diffserv model, 2688 demonstrating some of the following functionality: 2690 - use of inline classifier definitions (defined inline in the policy 2691 vs referencing an externally defined classifier) 2693 - use of mulitple policy types, e.g. a queue policy, a scheduler 2694 policy, and a filter policy. All of these policies either augment 2695 the qos policy or the diffserv modules 2697 - use of a queue module, which uses and extends the queue grouping 2698 from the ietf-qos-action module 2700 - use of meter templates (v.s. meter inline) 2702 - use of internal meta data for classification and marking 2704 module example-compb-diffserv-filter-policy { 2705 yang-version 1; 2706 namespace "urn:ietf:params:xml:ns:yang:" + 2707 "example-compb-diffserv-filter-policy"; 2708 prefix compb-filter-policy; 2710 import ietf-qos-classifier { 2711 prefix classifier; 2712 } 2713 import ietf-qos-policy { 2714 prefix policy; 2715 } 2716 import ietf-qos-action { 2717 prefix action; 2718 } 2719 import ietf-diffserv { 2720 prefix diffserv; 2721 } 2723 organization "Company B"; 2724 contact 2725 "Editor: XYZ 2726 "; 2728 description 2729 "This module contains a collection of YANG definitions for 2730 configuring diffserv specification implementations. 2731 Copyright (c) 2014 IETF Trust and the persons identified as 2732 authors of the code. All rights reserved. 2734 Redistribution and use in source and binary forms, with or 2735 without modification, is permitted pursuant to, and subject 2736 to the license terms contained in, the Simplified BSD License 2737 set forth in Section 4.c of the IETF Trust's Legal Provisions 2738 Relating to IETF Documents 2739 (http://trustee.ietf.org/license-info). 2740 This version of this YANG module is part of RFC XXXX; see 2741 the RFC itself for full legal notices."; 2743 revision 2015-04-07 { 2744 description 2745 "Latest revision of diffserv policy"; 2746 reference "RFC XXXX"; 2747 } 2749 /* 2750 * The policy must be of either type v4 or v6. Corresponding 2751 * address types must be used. Enforce with "must" statement? 2752 */ 2753 identity v4-diffserv-policy-type { 2754 base policy:policy-type; 2755 description 2756 "This defines default policy-type"; 2757 } 2759 identity v6-diffserv-policy-type { 2760 base policy:policy-type; 2761 description 2762 "This defines default policy-type"; 2763 } 2765 /************************************************* 2766 * Classification types 2767 *************************************************/ 2769 identity forwarding-class { 2770 base classifier:filter-type; 2771 description 2772 "Forwarding class filter type"; 2773 } 2775 identity internal-loss-priority { 2776 base classifier:filter-type; 2777 description 2778 "Internal loss priority filter type"; 2779 } 2780 grouping forwarding-class-cfg { 2781 list forwarding-class-cfg { 2782 key "forwarding-class"; 2783 description 2784 "list of forwarding-classes"; 2785 leaf forwarding-class { 2786 type string; 2787 description 2788 "Forwarding class name"; 2789 } 2790 } 2791 description 2792 "Filter containing list of forwarding classes"; 2793 } 2795 grouping loss-priority-cfg { 2796 list loss-priority-cfg { 2797 key "loss-priority"; 2798 description 2799 "list of loss-priorities"; 2800 leaf loss-priority { 2801 type enumeration { 2802 enum high { 2803 description "High Loss Priority"; 2804 } 2805 enum medium-high { 2806 description "Medium-high Loss Priority"; 2807 } 2808 enum medium-low { 2809 description "Medium-low Loss Priority"; 2810 } 2811 enum low { 2812 description "Low Loss Priority"; 2813 } 2814 } 2815 description 2816 "Loss-priority"; 2817 } 2818 } 2819 description 2820 "Filter containing list of loss priorities"; 2821 } 2823 augment "/policy:policies" + 2824 "/policy:policy-entry" + 2825 "/policy:classifier-entry" + 2826 "/policy:filter-entry" + 2827 "/diffserv:filter-params" { 2829 case forwarding-class { 2830 uses forwarding-class-cfg; 2831 description 2832 "Filter Type Internal-loss-priority"; 2833 } 2834 case internal-loss-priority { 2835 uses loss-priority-cfg; 2836 description 2837 "Filter Type Internal-loss-priority"; 2838 } 2839 description 2840 "Augments Diffserv Classifier with vendor" + 2841 " specific types"; 2842 } 2844 /************************************************* 2845 * Actions 2846 *************************************************/ 2848 identity mark-fwd-class { 2849 base policy:action-type; 2850 description 2851 "mark forwarding class action type"; 2852 } 2854 identity mark-loss-priority { 2855 base policy:action-type; 2856 description 2857 "mark loss-priority action type"; 2858 } 2860 grouping mark-fwd-class { 2861 container mark-fwd-class-cfg { 2862 leaf forwarding-class { 2863 type string; 2864 description 2865 "Forwarding class name"; 2866 } 2867 description 2868 "mark-fwd-class container"; 2869 } 2870 description 2871 "mark-fwd-class grouping"; 2872 } 2874 grouping mark-loss-priority { 2875 container mark-loss-priority-cfg { 2876 leaf loss-priority { 2877 type enumeration { 2878 enum high { 2879 description "High Loss Priority"; 2880 } 2881 enum medium-high { 2882 description "Medium-high Loss Priority"; 2883 } 2884 enum medium-low { 2885 description "Medium-low Loss Priority"; 2886 } 2887 enum low { 2888 description "Low Loss Priority"; 2889 } 2890 } 2891 description 2892 "Loss-priority"; 2893 } 2894 description 2895 "mark-loss-priority container"; 2896 } 2897 description 2898 "mark-loss-priority grouping"; 2899 } 2901 augment "/policy:policies" + 2902 "/policy:policy-entry" + 2903 "/policy:classifier-entry" + 2904 "/policy:classifier-action-entry-cfg" + 2905 "/diffserv:action-cfg-params" { 2906 case mark-fwd-class { 2907 uses mark-fwd-class; 2908 description 2909 "Mark forwarding class in the packet"; 2910 } 2911 case mark-loss-priority { 2912 uses mark-loss-priority; 2913 description 2914 "Mark loss priority in the packet"; 2915 } 2916 case meter-reference { 2917 uses action:meter-reference; 2918 description 2919 "Assign a meter as an action"; 2920 } 2921 case discard { 2922 uses action:discard; 2923 description 2924 "Discard action"; 2926 } 2927 case count { 2928 uses action:count; 2929 description 2930 "Count action - explicit count configuration"; 2931 } 2932 description 2933 "Augments common diffserv policy actions"; 2934 } 2936 augment "/action:meter-template" + 2937 "/action:meter-entry" + 2938 "/action:meter-type" + 2939 "/action:one-rate-tri-color-meter-type" + 2940 "/action:one-rate-tri-color-meter" { 2941 leaf one-rate-color-aware { 2942 type boolean; 2943 description 2944 "This defines if the meter is color-aware"; 2945 } 2946 } 2947 augment "/action:meter-template" + 2948 "/action:meter-entry" + 2949 "/action:meter-type" + 2950 "/action:two-rate-tri-color-meter-type" + 2951 "/action:two-rate-tri-color-meter" { 2952 leaf two-rate-color-aware { 2953 type boolean; 2954 description 2955 "This defines if the meter is color-aware"; 2956 } 2957 } 2959 /* example of augmenting a meter template with a 2960 /* vendor specific action */ 2961 augment "/action:meter-template" + 2962 "/action:meter-entry" + 2963 "/action:meter-type" + 2964 "/action:one-rate-two-color-meter-type" + 2965 "/action:one-rate-two-color-meter" + 2966 "/action:exceed-action" + 2967 "/action:meter-action-params" + 2968 "/action:meter-action-val" { 2969 case meter-action-drop { 2970 description 2971 "meter drop"; 2972 uses action:drop; 2973 } 2974 description 2975 "Augment the actions to basic meter"; 2976 } 2978 } 2980 module example-compb-queue-policy { 2981 yang-version 1; 2982 namespace "urn:ietf:params:xml:ns:yang:example-compb-queue-policy"; 2983 prefix queue-plcy; 2985 import ietf-qos-classifier { 2986 prefix classifier; 2987 } 2988 import ietf-qos-policy { 2989 prefix policy; 2990 } 2992 organization "Company B"; 2993 contact 2994 "Editor: XYZ 2995 "; 2997 description 2998 "This module defines a queue policy. The classification 2999 is based on aforwarding class, and the actions are queues. 3000 Copyright (c) 2014 IETF Trust and the persons identified as 3001 authors of the code. All rights reserved. 3002 Redistribution and use in source and binary forms, with or 3003 without modification, is permitted pursuant to, and subject 3004 to the license terms contained in, the Simplified BSD License 3005 set forth in Section 4.c of the IETF Trust's Legal Provisions 3006 Relating to IETF Documents 3007 (http://trustee.ietf.org/license-info). 3008 This version of this YANG module is part of RFC XXXX; see 3009 the RFC itself for full legal notices."; 3011 revision 2015-04-07 { 3012 description 3013 "Latest revision of diffserv policy"; 3014 reference "RFC XXXX"; 3015 } 3017 identity forwarding-class { 3018 base classifier:filter-type; 3019 description 3020 "Forwarding class filter type"; 3021 } 3022 grouping forwarding-class-cfg { 3023 leaf forwarding-class-cfg { 3024 type string; 3025 description 3026 "forwarding-class name"; 3027 } 3028 description 3029 "Forwarding class filter"; 3030 } 3032 augment "/policy:policies" + 3033 "/policy:policy-entry" + 3034 "/policy:classifier-entry" + 3035 "/policy:filter-entry" { 3036 /* Does NOT support "logical-not" of forwarding class. 3037 Use "must"? */ 3038 choice filter-params { 3039 description 3040 "Choice of filters"; 3041 case forwarding-class-cfg { 3042 uses forwarding-class-cfg; 3043 description 3044 "Filter Type Internal-loss-priority"; 3045 } 3046 } 3047 description 3048 "Augments Diffserv Classifier with fwd class filter"; 3049 } 3051 identity compb-queue { 3052 base policy:action-type; 3053 description 3054 "compb-queue action type"; 3055 } 3057 grouping compb-queue-name { 3058 container queue-name { 3059 leaf name { 3060 type string; 3061 description 3062 "Queue class name"; 3063 } 3064 description 3065 "compb queue container"; 3066 } 3067 description 3068 "compb-queue grouping"; 3069 } 3070 augment "/policy:policies" + 3071 "/policy:policy-entry" + 3072 "/policy:classifier-entry" + 3073 "/policy:classifier-action-entry-cfg" { 3074 choice action-cfg-params { 3075 description 3076 "Choice of action types"; 3077 case compb-queue { 3078 uses compb-queue-name; 3079 } 3080 } 3081 description 3082 "Augment the queue actions to queue policy entry"; 3083 } 3084 } 3086 module example-compb-queue { 3087 yang-version 1; 3088 namespace "urn:ietf:params:xml:ns:yang:ietf-compb-queue"; 3089 prefix compb-queue; 3091 import ietf-qos-action { 3092 prefix action; 3093 } 3095 organization "Company B"; 3096 contact 3097 "Editor: XYZ 3098 "; 3100 description 3101 "This module describes a compb queue module. This is a 3102 template for a queue within a queue policy, referenced 3103 by name. 3105 This version of this YANG module is part of RFC XXXX; see 3106 the RFC itself for full legal notices."; 3108 revision 2015-04-07 { 3109 description 3110 "Latest revision of diffserv based classifier"; 3111 reference "RFC XXXX"; 3112 } 3114 container compb-queue { 3115 description 3116 "Queue used in compb architecture"; 3117 leaf name { 3118 type string; 3119 description 3120 "A unique name identifying this queue"; 3121 } 3122 uses action:queue; 3123 container excess-rate { 3124 choice excess-rate-type { 3125 case percent { 3126 leaf excess-rate-percent { 3127 type uint32 { 3128 range "1..100"; 3129 } 3130 description 3131 "excess-rate-percent"; 3132 } 3133 } 3134 case proportion { 3135 leaf excess-rate-poroportion { 3136 type uint32 { 3137 range "1..1000"; 3138 } 3139 description 3140 "excess-rate-poroportion"; 3141 } 3142 } 3143 description 3144 "Choice of excess-rate type"; 3145 } 3146 description 3147 "Excess rate value"; 3148 } 3149 leaf excess-priority { 3150 type enumeration { 3151 enum high { 3152 description "High Loss Priority"; 3153 } 3154 enum medium-high { 3155 description "Medium-high Loss Priority"; 3156 } 3157 enum medium-low { 3158 description "Medium-low Loss Priority"; 3159 } 3160 enum low { 3161 description "Low Loss Priority"; 3162 } 3163 enum none { 3164 description "No excess priority"; 3165 } 3167 } 3168 description 3169 "Priority of excess (above guaranted rate) traffic"; 3170 } 3171 container buffer-size { 3172 choice buffer-size-type { 3173 case percent { 3174 leaf buffer-size-percent { 3175 type uint32 { 3176 range "1..100"; 3177 } 3178 description 3179 "buffer-size-percent"; 3180 } 3181 } 3182 case temporal { 3183 leaf buffer-size-temporal { 3184 type uint64; 3185 units "microsecond"; 3186 description 3187 "buffer-size-temporal"; 3188 } 3189 } 3190 case remainder { 3191 leaf buffer-size-remainder { 3192 type empty; 3193 description 3194 "use remaining of buffer"; 3195 } 3196 } 3197 description 3198 "Choice of buffer size type"; 3199 } 3200 description 3201 "Buffer size value"; 3202 } 3203 } 3205 augment 3206 "/compb-queue" + 3207 "/queue-cfg" + 3208 "/algorithmic-drop-cfg" + 3209 "/drop-algorithm" { 3210 case random-detect { 3211 list drop-profile-list { 3212 key "priority"; 3213 description 3214 "map of priorities to drop-algorithms"; 3216 leaf priority { 3217 type enumeration { 3218 enum any { 3219 description "Any priority mapped here"; 3220 } 3221 enum high { 3222 description "High Priority Packet"; 3223 } 3224 enum medium-high { 3225 description "Medium-high Priority Packet"; 3226 } 3227 enum medium-low { 3228 description "Medium-low Priority Packet"; 3229 } 3230 enum low { 3231 description "Low Priority Packet"; 3232 } 3233 } 3234 description 3235 "Priority of guaranteed traffic"; 3236 } 3237 leaf drop-profile { 3238 type string; 3239 description 3240 "drop profile to use for this priority"; 3241 } 3242 } 3243 } 3244 description 3245 "compb random detect drop algorithm config"; 3246 } 3247 } 3249 module example-compb-scheduler-policy { 3250 yang-version 1; 3251 namespace "urn:ietf:params:xml:ns:yang:" + 3252 "example-compb-scheduler-policy"; 3253 prefix scheduler-plcy; 3255 import ietf-qos-action { 3256 prefix action; 3257 } 3259 import ietf-qos-policy { 3260 prefix policy; 3261 } 3263 organization "Company B"; 3264 contact 3265 "Editor: XYZ 3266 "; 3268 description 3269 "This module defines a scheduler policy. The classification 3270 is based on classifier-any, and the action is a scheduler."; 3272 revision 2015-04-07 { 3273 description 3274 "Latest revision of diffserv policy"; 3275 reference "RFC XXXX"; 3276 } 3278 identity queue-policy { 3279 base policy:action-type; 3280 description 3281 "forwarding-class-queue action type"; 3282 } 3284 grouping queue-policy-name { 3285 container compb-queue-policy-name { 3286 leaf name { 3287 type string; 3288 description 3289 "Queue policy name"; 3290 } 3291 description 3292 "compb-queue-policy container"; 3293 } 3294 description 3295 "compb-queue policy grouping"; 3296 } 3298 augment "/policy:policies" + 3299 "/policy:policy-entry" + 3300 "/policy:classifier-entry" + 3301 "/policy:classifier-action-entry-cfg" { 3302 choice action-cfg-params { 3303 case schedular { 3304 uses action:schedular; 3305 } 3306 case queue-policy { 3307 uses queue-policy-name; 3308 } 3309 description 3310 "Augment the scheduler policy with a queue policy"; 3311 } 3313 } 3314 } 3316 A.3. Example of Company C Diffserv Model 3318 Company C vendor augmentation is based on Ericsson's implementation 3319 differentiated QoS. This implementation first sorts traffic based on 3320 a classifier, which can sort traffic into one or more traffic 3321 forwarding classes. Then, a policer or meter policy references the 3322 classifier and its traffic forwarding classes to specify different 3323 service levels for each traffic forwarding class. 3325 Because each classifier sorts traffic into one or more traffic 3326 forwarding classes, this type of classifier does not align with ietf- 3327 qos-classifier.yang, which defines one traffic forwarding class per 3328 classifier. Additionally, Company C's policing and metering policies 3329 relies on the classifier's pre-defined traffic forwarding classes to 3330 provide differentiated services, rather than redefining the patterns 3331 within a policing or metering policy, as is defined in ietf- 3332 diffserv.yang. 3334 Due to these differences, even though Company C uses all the building 3335 blocks of classifier and policy, Company C's augmentation does not 3336 use ietf-diffserv.yang to provide differentiated service levels. 3337 Instead, Company C's augmentation uses the basic building blocks, 3338 ietf-qos-policy.yang to provide differentiated services. 3340 module example-compc-qos-policy { 3341 yang-version 1.1; 3342 namespace "urn:example-compc-qos-policy"; 3343 prefix "compcqos"; 3345 import ietf-qos-policy { 3346 prefix "pol"; 3347 } 3349 import ietf-qos-action { 3350 prefix "action"; 3351 } 3353 organization ""; 3354 contact ""; 3355 description ""; 3357 revision 2016-09-26 { 3358 description ""; 3359 reference ""; 3360 } 3361 /* identities */ 3363 identity compc-qos-policy { 3364 base pol:policy-type; 3365 } 3367 identity mdrr-queuing-policy { 3368 base compc-qos-policy; 3369 } 3371 identity pwfq-queuing-policy { 3372 base compc-qos-policy; 3373 } 3375 identity policing-policy { 3376 base compc-qos-policy; 3377 } 3379 identity metering-policy { 3380 base compc-qos-policy; 3381 } 3383 identity forwarding-policy { 3384 base compc-qos-policy; 3385 } 3387 identity overhead-profile-policy { 3388 base compc-qos-policy; 3389 } 3391 identity resource-profile-policy { 3392 base compc-qos-policy; 3393 } 3395 identity protocol-rate-limit-policy { 3396 base compc-qos-policy; 3397 } 3399 identity compc-qos-action { 3400 base pol:action-type; 3401 } 3403 /* groupings */ 3405 grouping redirect-action-grp { 3406 container redirect { 3407 /* Redirect options */ 3408 } 3410 } 3412 /* deviations */ 3414 deviation "/pol:policies/pol:policy-entry" { 3415 deviate add { 3416 must "pol:type = compc-qos-policy" { 3417 description 3418 "Only policy types drived from compc-qos-policy " + 3419 "are supported"; 3420 } 3421 } 3422 } 3424 deviation "/pol:policies/pol:policy-entry/pol:classifier-entry" { 3425 deviate add { 3426 must "../per-class-action = 'true'" { 3427 description 3428 "Only policies with per-class actions have classifiers"; 3429 } 3430 must "((../sub-type != 'mdrr-queuing-policy') and " + 3431 " (../sub-type != 'pwfq-queuing-policy')) or " + 3432 "(((../sub-type = 'mdrr-queuing-policy') or " + 3433 " (../sub-type = 'pwfq-queueing-policy')) and " + 3434 " ((classifier-entry-name = '0') or " + 3435 " (classifier-entry-name = '1') or " + 3436 " (classifier-entry-name = '2') or " + 3437 " (classifier-entry-name = '3') or " + 3438 " (classifier-entry-name = '4') or " + 3439 " (classifier-entry-name = '5') or " + 3440 " (classifier-entry-name = '6') or " + 3441 " (classifier-entry-name = '7') or " + 3442 " (classifier-entry-name = '8')))" { 3443 description 3444 "MDRR queuing policy's or PWFQ queuing policy's " + 3445 "classifier-entry-name is limited to the listed values"; 3446 } 3447 } 3448 } 3450 deviation "/pol:policies/pol:policy-entry/pol:classifier-entry" + 3451 "/pol:classifier-action-entry-cfg" { 3452 deviate add { 3453 max-elements 1; 3454 must "action-type = 'compc-qos-action'" { 3455 description 3456 "Only compc-qos-action is allowed"; 3457 } 3459 } 3460 } 3462 /* augments */ 3464 augment "/pol:policies/pol:policy-entry" { 3465 when "pol:type = 'compc-qos-policy')" { 3466 description 3467 "Additional nodes only for diffserv-policy"; 3468 } 3469 leaf sub-type { 3470 type identityref { 3471 base compc-qos-policy; 3472 } 3473 mandatory true; 3474 /* The value of this leaf must not change once configured */ 3475 } 3476 leaf per-class-action { 3477 mandatory true; 3478 type boolean; 3479 must "(((. = 'true') and " + 3480 " ((../sub-type = 'policing-policy') or " + 3481 " (../sub-type = 'metering-policy') or " + 3482 " (../sub-type = 'mdrr-queuing-policy') or " + 3483 " (../sub-type = 'pwfq-queuing-policy') or " + 3484 " (../sub-type = 'forwarding-policy'))) or " + 3485 " ((. = 'false') and " + 3486 " ((../sub-type = 'overhead-profile-policy') or " + 3487 " (../sub-type = 'resource-profile-policy') or " + 3488 " (../sub-type = 'protocol-rate-limit-policy')))" { 3489 description 3490 "Only certain policies have per-class action"; 3491 } 3492 } 3493 container traffic-classifier { 3494 presence true; 3495 when "../sub-type = 'policing-policy' or " + 3496 "../sub-type = 'metering-policy' or " + 3497 "../sub-type = 'forwarding-policy'" { 3498 description 3499 "A classifier for policing-policy or metering-policy"; 3500 } 3501 leaf name { 3502 type string; 3503 mandatory true; 3504 description 3505 "Traffic classifier name"; 3506 } 3507 leaf type { 3508 type enumeration { 3509 enum 'internal-dscp-only-classifier' { 3510 value 0; 3511 description 3512 "Classify traffic based on (internal) dscp only"; 3513 } 3514 enum 'ipv4-header-based-classifier' { 3515 value 1; 3516 description 3517 "Classify traffic based on IPv4 packet header fields"; 3518 } 3519 enum 'ipv6-header-based-classifier' { 3520 value 2; 3521 description 3522 "Classify traffic based on IPv6 packet header fields"; 3523 } 3524 } 3525 mandatory true; 3526 description 3527 "Traffic classifier type"; 3528 } 3529 } 3530 container traffic-queue { 3531 when "(../sub-type = 'mdrr-queuing-policy') or " + 3532 "(../sub-type = 'pwfq-queuing-policy')" { 3533 description 3534 "Queuing policy properties"; 3535 } 3536 leaf queue-map { 3537 type string; 3538 description 3539 "Traffic queue map for queuing policy"; 3540 } 3541 } 3542 container overhead-profile { 3543 when "../sub-type = 'overhead-profile-policy'" { 3544 description 3545 "Overhead profile policy properties"; 3546 } 3547 } 3548 container resource-profile { 3549 when "../sub-type = 'resource-profile-policy'" { 3550 description 3551 "Resource profile policy properties"; 3552 } 3553 } 3554 container protocol-rate-limit { 3555 when "../sub-type = 'protocol-rate-limit-policy'" { 3556 description 3557 "Protocol rate limit policy properties"; 3558 } 3559 } 3560 } 3562 augment "/pol:policies/pol:policy-entry/pol:classifier-entry" + 3563 "/pol:classifier-action-entry-cfg/pol:action-cfg-params" { 3564 when "../../../pol:type = 'compc-qos-policy')" { 3565 description 3566 "Configurations for a classifier-policy-type policy"; 3567 } 3568 case metering-or-policing-policy { 3569 when "../../../sub-type = 'policing-policy' or " 3570 + "../../../sub-type = 'metering-policy'" { 3571 } 3572 container dscp-marking { 3573 uses action:dscp-marking; 3574 } 3575 container precedence-marking { 3576 uses action:dscp-marking; 3577 } 3578 container priority-marking { 3579 uses action:priority; 3580 } 3581 container rate-limiting { 3582 uses action:one-rate-two-color-meter; 3583 } 3584 } 3585 case mdrr-queuing-policy { 3586 when "../../../sub-type = 'mdrr-queuing-policy'" { 3587 description 3588 "MDRR queue handling properties for the traffic " + 3589 "classified into current queue"; 3590 } 3591 leaf mdrr-queue-weight { 3592 type uint8 { 3593 range "20..100"; 3594 } 3595 units percentage; 3596 } 3597 } 3598 case pwfq-queuing-policy { 3599 when "../../../sub-type = 'pwfq-queuing-policy'" { 3600 description 3601 "PWFQ queue handling properties for traffic " + 3602 "classified into current queue"; 3604 } 3605 leaf pwfq-queue-weight { 3606 type uint8 { 3607 range "20..100"; 3608 } 3609 units percentage; 3610 } 3611 leaf pwfq-queue-priority { 3612 type uint8; 3613 } 3614 leaf pwfq-queue-rate { 3615 type uint8; 3616 } 3617 } 3618 case forwarding-policy { 3619 when "../../../sub-type = 'forwarding-policy'" { 3620 description 3621 "Forward policy handling properties for traffic " + 3622 "in this classifier"; 3623 } 3624 uses redirect-action-grp; 3625 } 3626 description 3627 "Add the classify action configuration"; 3628 } 3630 } 3632 Authors' Addresses 3634 Aseem Choudhary 3635 Cisco Systems 3636 170 W. Tasman Drive 3637 San Jose, CA 95134 3638 US 3640 Email: asechoud@cisco.com 3642 Mahesh Jethanandani 3643 Cisco Systems 3644 170 W. Tasman Drive 3645 San Jose, CA 95134 3646 US 3648 Email: mjethanandani@gmail.com 3649 Norm Strahle 3650 Juniper Networks 3651 1194 North Mathilda Avenue 3652 Sunnyvale, CA 94089 3653 US 3655 Email: nstrahle@juniper.net 3657 Ebben Aries 3658 Juniper Networks 3659 1194 North Mathilda Avenue 3660 Sunnyvale, CA 94089 3661 US 3663 Email: exa@juniper.net 3665 Ing-Wher Chen 3666 Jabil 3668 Email: ing-wher_chen@jabil.com