idnits 2.17.1 draft-asechoud-netmod-qos-model-01.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 66 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 186 has weird spacing: '...cal-not boo...' == Line 208 has weird spacing: '...cal-not boo...' == Line 210 has weird spacing: '...on-type ide...' == Line 230 has weird spacing: '...on-type ide...' == Line 234 has weird spacing: '...on-type ide...' == (26 more instances...) -- The document date (July 15, 2016) is 2842 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: January 16, 2017 N. Strahle 6 E. Aries 7 Juniper Networks 8 July 15, 2016 10 YANG Model for QoS 11 draft-asechoud-netmod-qos-model-01 13 Abstract 15 This document describes a YANG model for Quality of Service (QoS) 16 configuration and operational parameters. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on January 16, 2017. 35 Copyright Notice 37 Copyright (c) 2016 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 3. QoS Model Design . . . . . . . . . . . . . . . . . . . . . . 3 55 4. DiffServ Model Design . . . . . . . . . . . . . . . . . . . . 3 56 5. Modules Tree Structure . . . . . . . . . . . . . . . . . . . 4 57 6. Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 58 6.1. IETF-QOS-CLASSIFIER . . . . . . . . . . . . . . . . . . . 9 59 6.2. IETF-QOS-POLICY . . . . . . . . . . . . . . . . . . . . . 15 60 6.3. IETF-QOS-ACTION . . . . . . . . . . . . . . . . . . . . . 18 61 6.4. IETF-QOS-TARGET . . . . . . . . . . . . . . . . . . . . . 30 62 6.5. IETF-DIFFSERV . . . . . . . . . . . . . . . . . . . . . . 36 63 7. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 40 64 8. Security Considerations . . . . . . . . . . . . . . . . . . . 40 65 9. Revision Tracking . . . . . . . . . . . . . . . . . . . . . . 40 66 9.1. Changes since Revision 00 . . . . . . . . . . . . . . . . 40 67 10. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 40 68 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 40 69 11.1. Normative References . . . . . . . . . . . . . . . . . . 40 70 11.2. Informative References . . . . . . . . . . . . . . . . . 41 71 Appendix A. Company A and Company B examples . . . . . . . . . . 41 72 A.1. Example of Company A Diffserv Model . . . . . . . . . . . 41 73 A.2. Example of Company B Diffserv Model . . . . . . . . . . . 52 74 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 65 76 1. Introduction 78 This document defines a base YANG [RFC6020] data module for Quality 79 of Service (QoS) configuration and operational parameters. 80 Differentiated Services (DiffServ) module is an augmentation of the 81 base QoS model. Remote Procedure Calls (RPC) or notification 82 definition is currently not part of this document and will be added 83 later if necessary. QoS base modules define a basic building blocks 84 to define a classifier, policy, action and target. The base modules 85 have been augmented to include packet match fields, action 86 parameters, and statistics data to define the DiffServ module. It is 87 left up to individual vendors to stitch actions like queues, random- 88 detect (RED) and vendor specific parameters of the DiffServ policy 89 definitions. Designing the module in this manner allows for a very 90 flexible and extensible module that should fit in with most of the 91 vendor requirements. The DiffServ model is based on DiffServ 92 architecture, and various references have been made to available 93 standard architecture documents. 95 DiffServ is a preferred approach for network service providers to 96 offer services to different customers based on their network Quality- 97 of-Service (QoS) objectives. The traffic streams are differentiated 98 based on DiffServ Code Points (DSCP) carried in the IP header of each 99 packet. The DSCP markings are applied by upstream node or by the 100 edge router on entry to the DiffServ network. 102 2. Terminology 104 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 105 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 106 document are to be interpreted as described in [RFC2119]. 108 3. QoS Model Design 110 A classifier consists of packets which may be grouped when a logical 111 set of rules are applied on different packet header fields. The 112 grouping may be based on different values or range of values of same 113 packet header field, presence or absence of some values or range of 114 values of a packet field or a combination thereof. The QoS 115 classifier is defined in the ietf-qos-classifier module. 117 A classifier entry contains one or more packet conditioning 118 functions. A packet conditioning function is typically based on 119 direction of traffic and may drop, mark or delay network packets. A 120 set of classifier entries with corresponding conditioning functions 121 when arranged in order of priority represents a QoS policy. A QoS 122 policy may contain one or more classifier entries. These are defined 123 in ietf-qos-policy module. 125 Actions are configured in line with respect to the policy module. 126 These include marking, dropping or shaping. Actions are defined in 127 the ietf-qos-action module. 129 A meter qualifies if the traffic arrival rate is based on agreed upon 130 rate and variability. A meter is modeled based on commonly used 131 alogrithms in industry, Single Rate Tri Color Marking (srTCM) 132 [RFC2697] meter, Two Rate Tri Color Marking (trTCM) [RFC2698] meter, 133 and Single Rate Two Color Marking meter. Different vendors can 134 extend it with other types of meters as well. 136 4. DiffServ Model Design 138 DiffServ architecture [RFC3289] and [RFC2475] describe the 139 architecture as a simple model where traffic entering a network is 140 classified and possibly conditioned at the boundary of the network 141 and assigned a different Behavior Aggregate (BA). Each BA is 142 identified by a specific value of DSCP, and is used to select a Per 143 Hop Behavior (PHB). 145 The packet classification policy identifies the subset of traffic 146 which may receive a DiffServ by being conditioned or mapped. Packet 147 classifiers select packets within a stream based on the content of 148 some portion of the packet header. There are two types of 149 classifiers, the BA classifier, and the Multi-Field (MF) classifier 150 which selects packets based on a value which is combination of one or 151 more header fields. In the ietf-diffserv module, this is realized by 152 augmenting the QoS classification module. 154 Traffic conditioning includes metering, shaping and/or marking. A 155 meter is used to measure the traffic against a given traffic profile. 156 The traffic profile specifies the temporal property of the traffic. 157 A packet that arrives is first determined to be in or out of the 158 profile, which will result in the action of marked, dropped or 159 shaped. This is realized in vendor specific modules based on the 160 parameters defined in action module. The metering parameters are 161 augmented to the QoS policy module when metering is defined inline, 162 and to the metering template when metering profile is referred in 163 policy module. 165 Finally, statistics are realized in the ietf-diffserv module by 166 augmenting the QoS target module. 168 5. Modules Tree Structure 170 This document defines five YANG modules - four QoS base modules and 171 one DiffServ module. 173 ietf-qos-classifier consists of classifier entries identified by a 174 classifier entry name. Each entry MAY contain a list of filter 175 entries. When no filter entry is present in a classifier entry, it 176 matches all traffic. 178 module: ietf-qos-classifier 179 +--rw classifiers 180 +--rw classifier-entry* [classifier-entry-name] 181 +--rw classifier-entry-name string 182 +--rw classifier-entry-descr? string 183 +--rw classifier-entry-filter-operation? identityref 184 +--rw filter-entry* [filter-type filter-logical-not] 185 +--rw filter-type identityref 186 +--rw filter-logical-not boolean 188 An ietf-qos-policy module contains list of policy objects identified 189 by a policy name and policy type which MUST be provided. With 190 different values of policy types, each vendor MAY define their own 191 construct of policy for different QoS functionalities. Each vendor 192 MAY augment classifier entry in a policy definition with a set of 193 actions. 195 module: ietf-qos-policy 196 +--rw policies 197 +--rw policy-entry* [policy-name policy-type] 198 +--rw policy-name string 199 +--rw policy-type identityref 200 +--rw policy-descr? string 201 +--rw classifier-entry* [classifier-entry-name] 202 +--rw classifier-entry-name string 203 +--rw classifier-entry-inline? boolean 204 +--rw classifier-entry-filter-oper? identityref 205 +--rw filter-entry* [filter-type filter-logical-not] 206 {policy-inline-classifier-config}? 207 | +--rw filter-type identityref 208 | +--rw filter-logical-not boolean 209 +--rw classifier-action-entry-cfg* [action-type] 210 +--rw action-type identityref 211 +--rw (action-cfg-params)? 213 ietf-qos-action module contains grouping of set of QoS actions. 214 These include metering, marking, dropping and shaping. Marking sets 215 DiffServ codepoint value in the classified packet. Color-aware and 216 Color-blind meters are augmented by vendor specific modules based on 217 the parameters defined in action module. 219 module: ietf-qos-action 220 +--rw meter-template 221 +--rw meter-entry* [meter-name] {meter-template-support}? 222 +--rw meter-name string 223 +--rw (meter-type)? 224 +--:(one-rate-two-color-meter-type) 225 | +--rw one-rate-two-color-meter 226 | +--rw meter-rate? uint64 227 | +--rw meter-burst? uint64 228 | +--rw conform-action 229 | | +--rw meter-action-params* [meter-action-type] 230 | | +--rw meter-action-type identityref 231 | | +--rw (meter-action-val)? 232 | +--rw exceed-action 233 | +--rw meter-action-params* [meter-action-type] 234 | +--rw meter-action-type identityref 235 | +--rw (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 meter-action-params* [meter-action-type] 243 | | +--rw meter-action-type identityref 244 | | +--rw (meter-action-val)? 245 | +--rw exceed-action 246 | | +--rw meter-action-params* [meter-action-type] 247 | | +--rw meter-action-type identityref 248 | | +--rw (meter-action-val)? 249 | +--rw violate-action 250 | +--rw meter-action-params* [meter-action-type] 251 | +--rw meter-action-type identityref 252 | +--rw (meter-action-val)? 253 +--:(two-rate-tri-color-meter-type) 254 +--rw two-rate-tri-color-meter 255 +--rw committed-rate? uint64 256 +--rw committed-burst? uint64 257 +--rw peak-rate? uint64 258 +--rw peak-burst? uint64 259 +--rw conform-action 260 | +--rw meter-action-params* [meter-action-type] 261 | +--rw meter-action-type identityref 262 | +--rw (meter-action-val)? 263 +--rw exceed-action 264 | +--rw meter-action-params* [meter-action-type] 265 | +--rw meter-action-type identityref 266 | +--rw (meter-action-val)? 267 +--rw violate-action 268 +--rw meter-action-params* [meter-action-type] 269 +--rw meter-action-type identityref 270 +--rw (meter-action-val)? 272 ietf-qos-target module contains reference of qos-policy for either 273 direction of network traffic and augments ietf-interfaces [RFC7223] 274 module. Classifier counters are associated with a target. 276 module: ietf-qos-target 277 augment /if:interfaces/if:interface: 278 +--rw qos-target-entry* [direction policy-type] 279 +--rw direction identityref 280 +--rw policy-type identityref 281 +--rw policy-name string 282 +--ro qos-target-classifier-statistics* 283 +--ro classifier-entry-name? string 284 +--ro classifier-entry-statistics 285 +--ro classified-pkts? uint64 286 +--ro classified-bytes? uint64 287 +--ro classified-rate? uint64 289 Diffserv module augments QoS classifier module. Many of the YANG 290 types defined in [RFC6991] are represented as leafs in the classifier 291 module. 293 Metering and marking actions are realized by augmenting the QoS 294 policy-module. Any queuing, AQM and scheduling actions are part of 295 vendor specific augmentation. Statistics are realized by augmenting 296 the QoS target module. 298 module: ietf-diffserv 299 augment /classifier:classifiers/classifier:classifier-entry 300 /classifier:filter-entry: 301 +--rw (filter-param)? 302 +--:(dscp) 303 | +--rw dscp-cfg* [dscp-min dscp-max] 304 | +--rw dscp-min inet:dscp 305 | +--rw dscp-max inet:dscp 306 +--:(source-ip-address) 307 | +--rw source-ip-address-cfg* [source-ip-addr] 308 | +--rw source-ip-addr inet:ip-prefix 309 +--:(destination-ip-address) 310 | +--rw destination-ip-address-cfg* [destination-ip-addr] 311 | +--rw destination-ip-addr inet:ip-prefix 312 +--:(source-port) 313 | +--rw source-port-cfg* [source-port-min source-port-max] 314 | +--rw source-port-min inet:port-number 315 | +--rw source-port-max inet:port-number 316 +--:(destination-port) 317 | +--rw destination-port-cfg* 318 [destination-port-min destination-port-max] 319 | +--rw destination-port-min inet:port-number 320 | +--rw destination-port-max inet:port-number 321 +--:(protocol) 322 +--rw protocol-cfg* [protocol-min protocol-max] 323 +--rw protocol-min uint8 324 +--rw protocol-max uint8 325 augment /policy:policies/policy:policy-entry 326 /policy:classifier-entry/policy:filter-entry: 327 +--rw (filter-params)? 328 +--:(dscp) 329 | +--rw dscp-cfg* [dscp-min dscp-max] 330 | +--rw dscp-min inet:dscp 331 | +--rw dscp-max inet:dscp 332 +--:(source-ip-address) 333 | +--rw source-ip-address-cfg* [source-ip-addr] 334 | +--rw source-ip-addr inet:ip-prefix 335 +--:(destination-ip-address) 336 | +--rw destination-ip-address-cfg* [destination-ip-addr] 337 | +--rw destination-ip-addr inet:ip-prefix 338 +--:(source-port) 339 | +--rw source-port-cfg* [source-port-min source-port-max] 340 | +--rw source-port-min inet:port-number 341 | +--rw source-port-max inet:port-number 342 +--:(destination-port) 343 | +--rw destination-port-cfg* 344 [destination-port-min destination-port-max] 345 | +--rw destination-port-min inet:port-number 346 | +--rw destination-port-max inet:port-number 347 +--:(protocol) 348 +--rw protocol-cfg* [protocol-min protocol-max] 349 +--rw protocol-min uint8 350 +--rw protocol-max uint8 351 augment /policy:policies/policy:policy-entry 352 /policy:classifier-entry/policy:classifier-action-entry-cfg: 353 +--rw (action-cfg-params)? 354 +--:(dscp-marking) 355 +--rw dscp-cfg 356 +--rw dscp? inet:dscp 357 augment /if:interfaces/if:interface/target:qos-target-entry 358 /target:qos-target-classifier-statistics: 359 +--ro diffserv-action-statistics 360 +--ro one-rate-two-color-meter-statistics 361 | +--ro conform-pkts? uint64 362 | +--ro conform-bytes? uint64 363 | +--ro conform-rate? uint64 364 | +--ro exceed-pkts? uint64 365 | +--ro exceed-bytes? uint64 366 | +--ro exceed-rate? uint64 367 +--ro one-rate-tri-color-meter-statistics 368 | +--ro conform-pkts? uint64 369 | +--ro conform-bytes? uint64 370 | +--ro conform-rate? uint64 371 | +--ro exceed-pkts? uint64 372 | +--ro exceed-bytes? uint64 373 | +--ro exceed-rate? uint64 374 | +--ro violate-pkts? uint64 375 | +--ro violate-bytes? uint64 376 | +--ro violate-rate? uint64 377 +--ro two-rate-tri-color-meter-statistics 378 +--ro conform-pkts? uint64 379 +--ro conform-bytes? uint64 380 +--ro conform-rate? uint64 381 +--ro exceed-pkts? uint64 382 +--ro exceed-bytes? uint64 383 +--ro exceed-rate? uint64 384 +--ro violate-pkts? uint64 385 +--ro violate-bytes? uint64 386 +--ro violate-rate? uint64 388 6. Modules 390 6.1. IETF-QOS-CLASSIFIER 392 file "ietf-qos-classifier@2016-03-03.yang" 393 module ietf-qos-classifier { 394 yang-version 1; 395 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-classifier"; 396 prefix classifier; 397 import ietf-inet-types { 398 prefix inet; 399 } 400 organization "IETF NETMOD (Netmod Working Group) Working Group"; 401 contact 402 "WG Web: 403 WG List: 404 WG Chair: Lou Berger 405 406 WG Chair: Kent Watsen 407 408 Editor: Aseem Choudhary 409 410 Editor: Mahesh Jethanandani 411 412 Editor: Norm Strahle 413 "; 414 description 415 "This module contains a collection of YANG definitions for 416 configuring qos specification implementations. 417 Copyright (c) 2014 IETF Trust and the persons identified as 418 authors of the code. All rights reserved. 419 Redistribution and use in source and binary forms, with or 420 without modification, is permitted pursuant to, and subject 421 to the license terms contained in, the Simplified BSD License 422 set forth in Section 4.c of the IETF Trust's Legal Provisions 423 Relating to IETF Documents 424 (http://trustee.ietf.org/license-info). 425 This version of this YANG module is part of RFC XXXX; see 426 the RFC itself for full legal notices."; 427 revision 2016-03-03 { 428 description 429 "Latest revision of qos base classifier module"; 430 reference "RFC XXXX"; 431 } 432 feature policy-inline-classifier-config { 433 description 434 " This feature allows classifier configuration 435 directly under policy."; 436 } 437 identity filter-type { 438 description 439 "This is identity of base filter-type"; 440 } 441 identity dscp { 442 base filter-type; 443 description 444 "Differentiated services code point filter-type"; 445 } 446 identity source-ip-address { 447 base filter-type; 448 description 449 "source ipv4 and ipv6 address filter-type"; 450 } 451 identity destination-ip-address { 452 base filter-type; 453 description 454 "destination ipv4 and ipv6 address filter-type"; 455 } 456 identity source-port { 457 base filter-type; 458 description 459 "source port filter-type"; 460 } 461 identity destination-port { 462 base filter-type; 463 description 464 "destination port filter-type"; 465 } 466 identity protocol { 467 base filter-type; 468 description 469 "protocol type filter-type"; 470 } 471 identity classifier-entry-filter-operation-type { 472 description 473 "Classifier entry filter logical operation"; 474 } 475 identity match-any-filter { 476 base classifier-entry-filter-operation-type; 477 description 478 "Classifier entry filter logical OR operation"; 479 } 480 identity match-all-filter { 481 base classifier-entry-filter-operation-type; 482 description 483 "Classifier entry filter logical AND operation"; 484 } 485 grouping dscp-cfg { 486 list dscp-cfg { 487 key "dscp-min dscp-max"; 488 description 489 "list of dscp ranges"; 490 leaf dscp-min { 491 type inet:dscp; 492 description 493 "Minimum value of dscp min-max range"; 494 } 495 leaf dscp-max { 496 type inet:dscp; 497 description 498 "maximum value of dscp min-max range"; 499 } 500 } 501 description 502 "Filter grouping containing list of dscp ranges"; 503 } 504 grouping source-ip-address-cfg { 505 list source-ip-address-cfg { 506 key "source-ip-addr"; 507 description 508 "list of source ipv4 or ipv6 address"; 509 leaf source-ip-addr { 510 type inet:ip-prefix; 511 description 512 "source ipv4 or ipv6 prefix"; 513 } 514 } 515 description 516 "Filter grouping containing list of source ip addresses"; 517 } 518 grouping destination-ip-address-cfg { 519 list destination-ip-address-cfg { 520 key "destination-ip-addr"; 521 description 522 "list of destination ipv4 or ipv6 address"; 523 leaf destination-ip-addr { 524 type inet:ip-prefix; 525 description 526 "destination ipv4 or ipv6 prefix"; 527 } 528 } 529 description 530 "Filter grouping containing list of destination ip address"; 531 } 532 grouping source-port-cfg { 533 list source-port-cfg { 534 key "source-port-min source-port-max"; 535 description 536 "list of ranges of source port"; 537 leaf source-port-min { 538 type inet:port-number; 539 description 540 "minimum value of source port range"; 541 } 542 leaf source-port-max { 543 type inet:port-number; 544 description 545 "maximum value of source port range"; 546 } 547 } 548 description 549 "Filter grouping containing list of source port ranges"; 550 } 551 grouping destination-port-cfg { 552 list destination-port-cfg { 553 key "destination-port-min destination-port-max"; 554 description 555 "list of ranges of destination port"; 556 leaf destination-port-min { 557 type inet:port-number; 558 description 559 "minimum value of destination port range"; 560 } 561 leaf destination-port-max { 562 type inet:port-number; 563 description 564 "maximum value of destination port range"; 565 } 566 } 567 description 568 "Filter grouping containing list of destination port ranges"; 569 } 570 grouping protocol-cfg { 571 list protocol-cfg { 572 key "protocol-min protocol-max"; 573 description 574 "list of ranges of protocol values"; 575 leaf protocol-min { 576 type uint8 { 577 range "0..255"; 578 } 579 description 580 "minimum value of protocol range"; 581 } 582 leaf protocol-max { 583 type uint8 { 584 range "0..255"; 585 } 586 description 587 "maximum value of protocol range"; 588 } 589 } 590 description 591 "Filter grouping containing list of Protocol ranges"; 592 } 593 grouping filters { 594 description 595 "Filters types in a Classifier entry"; 596 leaf filter-type { 597 type identityref { 598 base filter-type; 599 } 600 description 601 "This leaf defines type of the filter"; 602 } 603 leaf filter-logical-not { 604 type boolean; 605 description 606 " 607 This is logical-not operator for a filter. When true, it 608 indicates filter looks for absence of a pattern defined 609 by the filter 610 "; 611 } 613 } 614 grouping classifier-entry-generic-attr { 615 description 616 " 617 Classifier generic attributes like name, 618 description, operation type 619 "; 620 leaf classifier-entry-name { 621 type string; 622 description 623 "classifier entry name"; 624 } 625 leaf classifier-entry-descr { 626 type string; 627 description 628 "classifier entry description statement"; 629 } 630 leaf classifier-entry-filter-operation { 631 type identityref { 632 base classifier-entry-filter-operation-type; 633 } 634 default "match-any-filter"; 635 description 636 "Filters are applicable as match-any or match-all filters"; 637 } 638 } 639 grouping classifier-entry-inline-attr { 640 description 641 "attributes of inline classifier in a policy"; 642 leaf classifier-entry-inline { 643 type boolean; 644 default "false"; 645 description 646 "Indication of inline classifier entry"; 647 } 648 leaf classifier-entry-filter-oper { 649 type identityref { 650 base classifier-entry-filter-operation-type; 651 } 652 default "match-all-filter"; 653 description 654 "Filters are applicable as match-any or match-all filters"; 655 } 656 list filter-entry { 657 if-feature policy-inline-classifier-config; 658 must "../classifier-entry-inline = 'true'" { 659 description 660 "For inline filter configuration, inline attribute 661 must be true"; 662 } 663 key "filter-type filter-logical-not"; 664 uses filters; 665 description 666 "Filters configured inline in a policy"; 667 } 668 } 669 container classifiers { 670 description 671 "list of classifier entry"; 672 list classifier-entry { 673 key "classifier-entry-name"; 674 description 675 "each classifier entry contains a list of filters"; 676 uses classifier-entry-generic-attr; 677 list filter-entry { 678 key "filter-type filter-logical-not"; 679 uses filters; 680 description 681 "Filter entry configuration"; 682 } 683 } 684 } 685 } 686 688 6.2. IETF-QOS-POLICY 690 file "ietf-qos-policy@2016-03-03.yang" 691 module ietf-qos-policy { 692 yang-version 1; 693 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-policy"; 694 prefix policy; 695 import ietf-qos-classifier { 696 prefix classifier; 697 } 698 organization "IETF NETMOD (Netmod Working Group) Working Group"; 699 contact 700 "WG Web: 701 WG List: 702 WG Chair: Lou Berger 703 704 WG Chair: Kent Watsen 705 706 Editor: Aseem Choudhary 707 708 Editor: Mahesh Jethanandani 709 710 Editor: Norm Strahle 711 "; 712 description 713 "This module contains a collection of YANG definitions for 714 configuring qos specification implementations. 715 Copyright (c) 2014 IETF Trust and the persons identified as 716 authors of the code. All rights reserved. 717 Redistribution and use in source and binary forms, with or 718 without modification, is permitted pursuant to, and subject 719 to the license terms contained in, the Simplified BSD License 720 set forth in Section 4.c of the IETF Trust's Legal Provisions 721 Relating to IETF Documents 722 (http://trustee.ietf.org/license-info). 723 This version of this YANG module is part of RFC XXXX; see 724 the RFC itself for full legal notices."; 725 revision 2016-03-03 { 726 description 727 "Latest revision of qos policy"; 728 reference "RFC XXXX"; 729 } 730 identity policy-type { 731 description 732 "This base identity type defines policy-types"; 733 } 734 grouping policy-generic-attr { 735 description 736 "Policy Attributes"; 737 leaf policy-name { 738 type string; 739 description 740 "policy name"; 741 } 742 leaf policy-type { 743 type identityref { 744 base policy-type; 745 } 746 description 747 "policy type"; 748 } 749 leaf policy-descr { 750 type string; 751 description 752 "policy description"; 753 } 754 } 755 identity action-type { 756 description 757 "This base identity type defines action-types"; 758 } 759 grouping classifier-action-entry-cfg { 760 description 761 "List of Configuration of classifier & associated actions"; 762 list classifier-action-entry-cfg { 763 key "action-type"; 764 ordered-by user; 765 description 766 "Configuration of classifier & associated actions"; 767 leaf action-type { 768 type identityref { 769 base action-type; 770 } 771 description 772 "This defines action type "; 773 } 774 choice action-cfg-params { 775 description 776 "Choice of action types"; 777 } 778 } 779 } 780 container policies { 781 description 782 "list of policy templates"; 783 list policy-entry { 784 key "policy-name policy-type"; 785 description 786 "policy template"; 787 uses policy-generic-attr; 788 list classifier-entry { 789 key "classifier-entry-name"; 790 ordered-by user; 791 description 792 "Classifier entry configuration in a policy"; 793 leaf classifier-entry-name { 794 type string; 795 description 796 "classifier entry name"; 797 } 798 uses classifier:classifier-entry-inline-attr; 799 uses classifier-action-entry-cfg; 800 } 801 } 802 } 803 } 804 806 6.3. IETF-QOS-ACTION 808 file "ietf-qos-action@2016-06-15.yang" 809 module ietf-qos-action { 810 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-action"; 811 prefix action; 812 import ietf-inet-types { 813 prefix inet; 814 } 815 import ietf-qos-policy { 816 prefix policy; 817 } 818 organization "IETF NETMOD (Netmod Working Group) Working Group"; 819 contact 820 "WG Web: 821 WG List: 822 WG Chair: Lou Berger 823 824 WG Chair: Kent Watsen 825 826 Editor: Aseem Choudhary 827 828 Editor: Mahesh Jethanandani 829 830 Editor: Norm Strahle 831 "; 832 description 833 "This module contains a collection of YANG definitions for 834 configuring qos specification implementations. 835 Copyright (c) 2014 IETF Trust and the persons identified as 836 authors of the code. All rights reserved. 837 Redistribution and use in source and binary forms, with or 838 without modification, is permitted pursuant to, and subject 839 to the license terms contained in, the Simplified BSD License 840 set forth in Section 4.c of the IETF Trust's Legal Provisions 841 Relating to IETF Documents 842 (http://trustee.ietf.org/license-info). 843 This version of this YANG module is part of RFC XXXX; see 844 the RFC itself for full legal notices."; 845 revision 2016-06-15 { 846 description 847 "Latest revision for qos actions"; 848 reference "RFC XXXX"; 849 } 850 feature meter-template-support { 851 description 852 " This feature allows support of meter-template."; 853 } 854 identity rate-unit-type { 855 description 856 "base rate-unit type"; 857 } 858 identity bits-per-second { 859 base rate-unit-type; 860 description 861 "bits per second identity"; 862 } 863 identity kilo-bits-per-second { 864 base rate-unit-type; 865 description 866 "kilo bits per second identity"; 867 } 868 identity mega-bits-per-second { 869 base rate-unit-type; 870 description 871 "mega bits per second identity"; 872 } 873 identity giga-bits-per-second { 874 base rate-unit-type; 875 description 876 "mega bits per second identity"; 877 } 878 identity percent { 879 base rate-unit-type; 880 description 881 "percentage"; 882 } 884 identity dscp-marking { 885 base policy:action-type; 886 description 887 "dscp marking action type"; 888 } 889 identity meter-inline { 890 base policy:action-type; 891 description 892 "meter-inline action type"; 893 } 894 identity meter-reference { 895 base policy:action-type; 896 description 897 "meter reference action type"; 898 } 899 identity min-rate { 900 base policy:action-type; 901 description 902 "min-rate action type"; 903 } 904 identity max-rate { 905 base policy:action-type; 906 description 907 "max-rate action type"; 908 } 909 identity queue { 910 base policy:action-type; 911 description 912 "queue action type"; 913 } 914 identity schedular { 915 base policy:action-type; 916 description 917 "schedular action type"; 918 } 919 identity discard { 920 base policy:action-type; 921 description 922 "discard action type"; 923 } 924 identity child-policy { 925 base policy:action-type; 926 description 927 "child-policy action type"; 928 } 929 identity count { 930 base policy:action-type; 931 description 932 "discard action type"; 933 } 935 identity meter-type { 936 description 937 "This base identity type defines meter types"; 938 } 939 identity one-rate-two-color-meter-type { 940 base meter-type; 941 description 942 "one rate two color meter type"; 943 } 944 identity one-rate-tri-color-meter-type { 945 base meter-type; 946 description 947 "one rate three color meter type"; 948 } 949 identity two-rate-tri-color-meter-type { 950 base meter-type; 951 description 952 "two rate three color meter action type"; 953 } 955 identity drop-type { 956 description 957 "drop algorithm"; 958 } 959 identity tail-drop { 960 base drop-type; 961 description 962 "tail drop algorithm"; 963 } 964 identity random-detect { 965 base drop-type; 966 description 967 "random detect algorithm"; 968 } 970 identity meter-action-type { 971 description 972 "action type in a meter"; 973 } 974 identity meter-action-drop { 975 base meter-action-type; 976 description 977 "drop action type in a meter"; 978 } 979 identity meter-action-mark-dscp { 980 base meter-action-type; 981 description 982 "dscp mark action type in a meter"; 983 } 985 grouping rate-value-unit { 986 leaf rate-value { 987 type uint64; 988 description 989 "rate value"; 990 } 991 leaf rate-unit { 992 type identityref { 993 base rate-unit-type; 994 } 995 description 996 "rate unit"; 997 } 998 description 999 "rate value and unit grouping"; 1000 } 1001 grouping burst { 1002 description 1003 "burst size or interval configuration"; 1004 choice burst-type { 1005 case size { 1006 leaf burst-size { 1007 type uint64; 1008 units "bytes"; 1009 description 1010 "burst size"; 1011 } 1012 } 1013 case interval { 1014 leaf burst-interval { 1015 type uint64; 1016 units "microsecond"; 1017 description 1018 "burst interval"; 1019 } 1020 } 1021 description 1022 "Choice of burst type"; 1023 } 1024 } 1026 grouping threshold { 1027 description 1028 "Threshold Parameters"; 1029 container threshold { 1030 description 1031 "threshold"; 1032 choice threshold-type { 1033 case size { 1034 leaf threshold-size { 1035 type uint64; 1036 units "bytes"; 1037 description 1038 "Threshold size"; 1039 } 1040 } 1041 case interval { 1042 leaf threshold-interval { 1043 type uint64; 1044 units "microsecond"; 1045 description 1046 "Threshold interval"; 1047 } 1048 } 1049 description 1050 "Choice of threshold type"; 1051 } 1052 } 1053 } 1055 grouping drop { 1056 container drop-cfg { 1057 leaf drop-action { 1058 type empty; 1059 description 1060 "always drop algorithm"; 1061 } 1062 description 1063 "the drop action"; 1064 } 1065 description 1066 "always drop grouping"; 1067 } 1069 grouping queuelimit { 1070 container qlimit-thresh { 1071 uses threshold; 1072 description 1073 "the queue limit"; 1074 } 1075 description 1076 "the queue limit beyond which queue will not hold any packet"; 1077 } 1079 grouping meter-action-params { 1080 description 1081 "meter action parameters"; 1082 list meter-action-params { 1083 key "meter-action-type"; 1084 ordered-by user; 1085 description 1086 "Configuration of basic-meter & associated actions"; 1087 leaf meter-action-type { 1088 type identityref { 1089 base meter-action-type; 1090 } 1091 description 1092 "meter action type"; 1093 } 1094 choice meter-action-val { 1095 description 1096 " meter action based on choice of meter action type"; 1097 } 1098 } 1099 } 1101 grouping one-rate-two-color-meter { 1102 container one-rate-two-color-meter { 1103 description 1104 "single rate two color marker meter"; 1105 leaf meter-rate { 1106 type uint64; 1107 units "bits-per-second"; 1108 description 1109 "meter rate"; 1110 } 1111 leaf meter-burst { 1112 type uint64; 1113 units "byes"; 1114 description 1115 "burst size"; 1116 } 1117 container conform-action { 1118 uses meter-action-params; 1119 description 1120 "conform action"; 1121 } 1122 container exceed-action { 1123 uses meter-action-params; 1124 description 1125 "exceed action"; 1126 } 1127 } 1128 description 1129 "single rate two color marker meter attributes"; 1130 } 1132 grouping one-rate-tri-color-meter { 1133 container one-rate-tri-color-meter { 1134 description 1135 "single rate three color meter"; 1136 leaf committed-rate { 1137 type uint64; 1138 units "bits-per-second"; 1139 description 1140 "meter rate"; 1141 } 1142 leaf committed-burst { 1143 type uint64; 1144 units "byes"; 1145 description 1146 "commited burst size"; 1147 } 1148 leaf excess-burst { 1149 type uint64; 1150 units "byes"; 1151 description 1152 "excess burst size"; 1153 } 1154 container conform-action { 1155 uses meter-action-params; 1156 description 1157 "conform, or green action"; 1158 } 1159 container exceed-action { 1160 uses meter-action-params; 1161 description 1162 "exceed, or yellow action"; 1163 } 1164 container violate-action { 1165 uses meter-action-params; 1166 description 1167 "violate, or red action"; 1168 } 1169 } 1170 description 1171 "one-rate-tri-color-meter attributes"; 1172 } 1174 grouping two-rate-tri-color-meter { 1175 container two-rate-tri-color-meter { 1176 description 1177 "two rate three color meter"; 1178 leaf committed-rate { 1179 type uint64; 1180 units "bits-per-second"; 1181 description 1182 "meter rate"; 1183 } 1184 leaf committed-burst { 1185 type uint64; 1186 units "byes"; 1187 description 1188 "commited burst size"; 1189 } 1190 leaf peak-rate { 1191 type uint64; 1192 units "bits-per-second"; 1193 description 1194 "meter rate"; 1195 } 1196 leaf peak-burst { 1197 type uint64; 1198 units "byes"; 1199 description 1200 "commited burst size"; 1201 } 1202 container conform-action { 1203 uses meter-action-params; 1204 description 1205 "conform, or green action"; 1206 } 1207 container exceed-action { 1208 uses meter-action-params; 1209 description 1210 "exceed, or yellow action"; 1211 } 1212 container violate-action { 1213 uses meter-action-params; 1214 description 1215 "exceed, or red action"; 1216 } 1217 } 1218 description 1219 "two-rate-tri-color-meter attributes"; 1220 } 1222 grouping meter { 1223 choice meter-type { 1224 case one-rate-two-color-meter-type { 1225 uses one-rate-two-color-meter; 1226 description 1227 "basic meter"; 1228 } 1229 case one-rate-tri-color-meter-type { 1230 uses one-rate-tri-color-meter; 1231 description 1232 "one rate tri-color meter"; 1233 } 1234 case two-rate-tri-color-meter-type { 1235 uses two-rate-tri-color-meter; 1236 description 1237 "two rate tri-color meter"; 1239 } 1240 description 1241 " meter action based on choice of meter action type"; 1242 } 1243 description 1244 "meter attributes"; 1245 } 1247 container meter-template { 1248 description 1249 "list of meter templates"; 1250 list meter-entry { 1251 if-feature meter-template-support; 1252 key "meter-name"; 1253 description 1254 "meter entry template"; 1255 leaf meter-name { 1256 type string; 1257 description 1258 "meter identifier"; 1259 } 1260 uses meter; 1261 } 1262 } 1264 grouping meter-reference { 1265 container meter-reference-cfg { 1266 leaf meter-type { 1267 type identityref { 1268 base meter-type; 1269 } 1270 description 1271 "This leaf defines type of the filter"; 1272 } 1273 description 1274 "meter reference"; 1275 } 1276 description 1277 "meter reference"; 1278 } 1280 grouping count { 1281 container count-cfg { 1282 leaf count-action { 1283 type empty; 1284 description 1285 "count action"; 1286 } 1287 description 1288 "the count action"; 1289 } 1290 description 1291 "the count action grouping"; 1292 } 1294 grouping discard { 1295 container discard-cfg { 1296 leaf discard { 1297 type empty; 1298 description 1299 "discard action"; 1300 } 1301 description 1302 "discard action"; 1303 } 1304 description 1305 "discard grouping"; 1306 } 1307 grouping priority { 1308 container priority-cfg { 1309 leaf priority-level { 1310 type uint8; 1311 description 1312 "priority level"; 1313 } 1314 description 1315 "priority attributes"; 1316 } 1317 description 1318 "priority attributes grouping"; 1319 } 1320 grouping min-rate { 1321 container min-rate-cfg { 1322 uses rate-value-unit; 1323 description 1324 "min guaranteed bandwidth"; 1325 } 1326 description 1327 "minimum rate grouping"; 1328 } 1329 grouping dscp-marking { 1330 container dscp-cfg { 1331 leaf dscp { 1332 type inet:dscp; 1333 description 1334 "dscp marking"; 1336 } 1337 description 1338 "dscp marking container"; 1339 } 1340 description 1341 "dscp marking grouping"; 1342 } 1343 grouping max-rate { 1344 container max-rate-cfg { 1345 uses rate-value-unit; 1346 uses burst; 1347 description 1348 "maximum rate attributes container"; 1349 } 1350 description 1351 "maximum rate attributes"; 1352 } 1353 grouping queue { 1354 container queue-cfg { 1355 uses priority; 1356 uses min-rate; 1357 uses max-rate; 1358 container algorithmic-drop-cfg { 1359 choice drop-algorithm { 1360 case tail-drop { 1361 container tail-drop-cfg { 1362 leaf tail-drop-alg { 1363 type empty; 1364 description 1365 "tail drop algorithm"; 1366 } 1367 description 1368 "Tail Drop configuration container"; 1369 } 1370 description 1371 "Tail Drop choice"; 1372 } 1373 description 1374 "Choice of Drop Algorithm"; 1375 } 1376 description 1377 "Algorithmic Drop configuration container"; 1378 } 1379 description 1380 "Queue configuration container"; 1381 } 1382 description 1383 "Queue grouping"; 1385 } 1386 grouping schedular { 1387 container schedular-cfg { 1388 uses min-rate; 1389 uses max-rate; 1390 description 1391 "Schedular configuration container"; 1392 } 1393 description 1394 "Schedular configuration grouping"; 1395 } 1396 } 1397 1399 6.4. IETF-QOS-TARGET 1401 file "ietf-qos-target@2016-06-15.yang" 1402 module ietf-qos-target { 1403 yang-version 1; 1404 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-target"; 1405 prefix target; 1406 import ietf-interfaces { 1407 prefix if; 1408 } 1409 import ietf-qos-policy { 1410 prefix policy; 1411 } 1412 organization "IETF NETMOD (Netmod Working Group) Working Group"; 1413 contact 1414 "WG Web: 1415 WG List: 1416 WG Chair: Lou Berger 1417 1418 WG Chair: Kent Watsen 1419 1420 Editor: Aseem Choudhary 1421 1422 Editor: Mahesh Jethanandani 1423 "; 1426 description 1427 "This module contains a collection of YANG definitions for 1428 configuring qos specification implementations. 1429 Copyright (c) 2014 IETF Trust and the persons identified as 1430 authors of the code. All rights reserved. 1431 Redistribution and use in source and binary forms, with or 1432 without modification, is permitted pursuant to, and subject 1433 to the license terms contained in, the Simplified BSD License 1434 set forth in Section 4.c of the IETF Trust's Legal Provisions 1435 Relating to IETF Documents 1436 (http://trustee.ietf.org/license-info). 1437 This version of this YANG module is part of RFC XXXX; see 1438 the RFC itself for full legal notices."; 1439 revision 2016-06-15 { 1440 description 1441 "Latest revision qos based policy applied to a target"; 1442 reference "RFC XXXX"; 1443 } 1444 identity direction { 1445 description 1446 "This is identity of traffic direction"; 1447 } 1448 identity inbound { 1449 base direction; 1450 description 1451 "Direction of traffic coming into the network entry"; 1452 } 1453 identity outbound { 1454 base direction; 1455 description 1456 "Direction of traffic going out of the network entry"; 1457 } 1458 feature target-inline-policy-config { 1459 description 1460 "This feature allows the policy configuration 1461 directly under a target."; 1462 } 1463 grouping wred-stats { 1464 description 1465 "WRED Counters"; 1466 leaf early-drop-pkts { 1467 type uint64; 1468 description 1469 "Early drop packets "; 1470 } 1471 leaf early-drop-bytes { 1472 type uint64; 1473 description 1474 "Early drop bytes "; 1475 } 1476 } 1477 grouping classifier-entry-stats { 1478 description 1479 "Classifier Counters"; 1480 container classifier-entry-statistics { 1481 config false; 1482 description 1483 " 1484 This group defines the classifier filter statistics of 1485 each classifier entry 1486 "; 1487 leaf classified-pkts { 1488 type uint64; 1489 description 1490 " Number of total packets which filtered 1491 to the classifier-entry"; 1492 } 1493 leaf classified-bytes { 1494 type uint64; 1495 description 1496 " Number of total bytes which filtered 1497 to the classifier-entry"; 1498 } 1499 leaf classified-rate { 1500 type uint64; 1501 units "bits-per-second"; 1502 description 1503 " Rate of average data flow through the 1504 classifier-entry"; 1505 } 1506 } 1507 } 1508 grouping queuing-stats { 1509 description 1510 "Queuing Counters"; 1511 container queuing-statistics { 1512 description 1513 "queue related statistics "; 1514 leaf output-pkts { 1515 type uint64; 1516 description 1517 "Number of packets transmitted from queue "; 1518 } 1519 leaf output-bytes { 1520 type uint64; 1521 description 1522 "Number of bytes transmitted from queue "; 1523 } 1524 leaf queue-size-pkts { 1525 type uint64; 1526 description 1527 "Number of packets currently buffered "; 1528 } 1529 leaf queue-size-bytes { 1530 type uint64; 1531 description 1532 "Number of bytes currently buffered "; 1533 } 1534 leaf drop-pkts { 1535 type uint64; 1536 description 1537 "Total number of packets dropped "; 1538 } 1539 leaf drop-bytes { 1540 type uint64; 1541 description 1542 "Total number of bytes dropped "; 1543 } 1544 container wred-stats { 1545 uses wred-stats; 1546 description 1547 "Container for WRED statistics"; 1548 } 1549 } 1550 } 1551 grouping two-color-marking-meter-stats { 1552 description 1553 "Two-Color-Marking Metering Counters"; 1554 leaf conform-pkts { 1555 type uint64; 1556 description 1557 "Number of conform packets"; 1558 } 1559 leaf conform-bytes { 1560 type uint64; 1561 description 1562 "Bytes of conform packets"; 1563 } 1564 leaf conform-rate { 1565 type uint64; 1566 units "bits-per-second"; 1567 description 1568 "Traffic Rate measured as conformimg"; 1569 } 1570 leaf exceed-pkts { 1571 type uint64; 1572 description 1573 "Number of packets counted as exceeding"; 1574 } 1575 leaf exceed-bytes { 1576 type uint64; 1577 description 1578 "Bytes of packets counted as exceeding"; 1579 } 1580 leaf exceed-rate { 1581 type uint64; 1582 units "bits-per-second"; 1583 description 1584 "Traffic Rate measured as exceeding"; 1585 } 1586 } 1587 grouping tri-color-marking-meter-stats { 1588 description 1589 "Tri-Color-Marking Metering Counters"; 1590 leaf conform-pkts { 1591 type uint64; 1592 description 1593 "Number of conform packets"; 1594 } 1595 leaf conform-bytes { 1596 type uint64; 1597 description 1598 "Bytes of conform packets"; 1599 } 1600 leaf conform-rate { 1601 type uint64; 1602 units "bits-per-second"; 1603 description 1604 "Traffic Rate measured as conformimg"; 1605 } 1606 leaf exceed-pkts { 1607 type uint64; 1608 description 1609 "Number of packets counted as exceeding"; 1610 } 1611 leaf exceed-bytes { 1612 type uint64; 1613 description 1614 "Bytes of packets counted as exceeding"; 1615 } 1616 leaf exceed-rate { 1617 type uint64; 1618 units "bits-per-second"; 1619 description 1620 "Traffic Rate measured as exceeding"; 1621 } 1622 leaf violate-pkts { 1623 type uint64; 1624 description 1625 "Number of packets counted as violating"; 1626 } 1627 leaf violate-bytes { 1628 type uint64; 1629 description 1630 "Bytes of packets counted as violating"; 1631 } 1632 leaf violate-rate { 1633 type uint64; 1634 units "bits-per-second"; 1635 description 1636 "Traffic Rate measured as violating"; 1637 } 1638 } 1639 grouping meter-stats { 1640 description 1641 "Metering Counters"; 1642 container one-rate-two-color-meter-statistics { 1643 uses two-color-marking-meter-stats; 1644 description 1645 "One rate two color marker meter statistics"; 1646 } 1647 container one-rate-tri-color-meter-statistics { 1648 uses tri-color-marking-meter-stats; 1649 description 1650 "One rate tri color marker meter statistics"; 1651 } 1652 container two-rate-tri-color-meter-statistics { 1653 uses tri-color-marking-meter-stats; 1654 description 1655 "Two rate tri color marker meter statistics"; 1656 } 1657 } 1658 augment "/if:interfaces/if:interface" { 1659 description 1660 "Augments Diffserv Target Entry to Interface module"; 1661 list qos-target-entry { 1662 key "direction policy-type"; 1663 description 1664 "policy target for inbound or outbound direction"; 1665 leaf direction { 1666 type identityref { 1667 base direction; 1668 } 1669 description 1670 "Direction fo the traffic flow either inbound or outbound"; 1671 } 1672 leaf policy-type { 1673 type identityref { 1674 base policy:policy-type; 1675 } 1676 description 1677 "Policy entry type"; 1678 } 1679 leaf policy-name { 1680 type string; 1681 mandatory true; 1682 description 1683 "Policy entry name"; 1684 } 1685 list qos-target-classifier-statistics { 1686 config false; 1687 description 1688 "Statistics for each Classifier Entry in a Policy"; 1689 leaf classifier-entry-name { 1690 type string; 1691 description 1692 "Classifier Entry Name"; 1693 } 1694 uses classifier-entry-stats; 1695 } 1696 } 1697 } 1698 } 1699 1701 6.5. IETF-DIFFSERV 1703 file "ietf-diffserv@2016-06-15.yang" 1704 module ietf-diffserv { 1705 yang-version 1; 1706 namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv"; 1707 prefix diffserv; 1708 import ietf-interfaces { 1709 prefix if; 1710 } 1711 import ietf-qos-classifier { 1712 prefix classifier; 1713 } 1714 import ietf-qos-policy { 1715 prefix policy; 1716 } 1717 import ietf-qos-action { 1718 prefix action; 1719 } 1720 import ietf-qos-target { 1721 prefix target; 1722 } 1723 organization "IETF NETMOD (Netmod Working Group) Working Group"; 1724 contact 1725 "WG Web: 1726 WG List: 1727 WG Chair: Lou Berger 1728 1729 WG Chair: Kent Watsen 1730 1731 Editor: Aseem Choudhary 1732 1733 Editor: Mahesh Jethanandani 1734 "; 1737 description 1738 "This module contains a collection of YANG definitions for 1739 configuring diffserv specification implementations. 1740 Copyright (c) 2014 IETF Trust and the persons identified as 1741 authors of the code. All rights reserved. 1742 Redistribution and use in source and binary forms, with or 1743 without modification, is permitted pursuant to, and subject 1744 to the license terms contained in, the Simplified BSD License 1745 set forth in Section 4.c of the IETF Trust's Legal Provisions 1746 Relating to IETF Documents 1747 (http://trustee.ietf.org/license-info). 1748 This version of this YANG module is part of RFC XXXX; see 1749 the RFC itself for full legal notices."; 1750 revision 2016-06-15 { 1751 description 1752 "Latest revision of diffserv based classifier"; 1753 reference "RFC XXXX"; 1754 } 1755 augment "/classifier:classifiers/classifier:classifier-entry/" + 1756 "classifier:filter-entry" { 1757 choice filter-param { 1758 description 1759 "Choice of filter types"; 1760 case dscp { 1761 uses classifier:dscp-cfg; 1762 description 1763 "Filter containing list of dscp ranges"; 1764 } 1765 case source-ip-address { 1766 uses classifier:source-ip-address-cfg; 1767 description 1768 "Filter containing list of source ip addresses"; 1770 } 1771 case destination-ip-address { 1772 uses classifier:destination-ip-address-cfg; 1773 description 1774 "Filter containing list of destination ip address"; 1775 } 1776 case source-port { 1777 uses classifier:source-port-cfg; 1778 description 1779 "Filter containing list of source-port ranges"; 1780 } 1781 case destination-port { 1782 uses classifier:destination-port-cfg; 1783 description 1784 "Filter containing list of destination-port ranges"; 1785 } 1786 case protocol { 1787 uses classifier:protocol-cfg; 1788 description 1789 "Filter Type Protocol"; 1790 } 1791 } 1792 description 1793 "augments diffserv filters to qos classifier"; 1794 } 1796 augment "/policy:policies" + 1797 "/policy:policy-entry" + 1798 "/policy:classifier-entry" + 1799 "/policy:filter-entry" { 1800 choice filter-params { 1801 description 1802 "Choice of action types"; 1803 case dscp { 1804 uses classifier:dscp-cfg; 1805 description 1806 "Filter containing list of dscp ranges"; 1807 } 1808 case source-ip-address { 1809 uses classifier:source-ip-address-cfg; 1810 description 1811 "Filter containing list of source ip addresses"; 1812 } 1813 case destination-ip-address { 1814 uses classifier:destination-ip-address-cfg; 1815 description 1816 "Filter containing list of destination ip address"; 1817 } 1818 case source-port { 1819 uses classifier:source-port-cfg; 1820 description 1821 "Filter containing list of source-port ranges"; 1822 } 1823 case destination-port { 1824 uses classifier:destination-port-cfg; 1825 description 1826 "Filter containing list of destination-port ranges"; 1827 } 1828 case protocol { 1829 uses classifier:protocol-cfg; 1830 description 1831 "Filter Type Protocol"; 1832 } 1833 } 1834 description 1835 "Augments Diffserv Classifier with common filter types"; 1836 } 1837 augment "/policy:policies/policy:policy-entry/" + 1838 "policy:classifier-entry/" + 1839 "policy:classifier-action-entry-cfg" { 1840 choice action-cfg-params { 1841 description 1842 "Choice of action types"; 1843 case dscp-marking { 1844 uses action:dscp-marking; 1845 } 1846 } 1847 description 1848 "augments dscp-marking and meter to qos policy"; 1849 } 1850 augment "/if:interfaces/if:interface/target:qos-target-entry/" + 1851 "target:qos-target-classifier-statistics" { 1852 container diffserv-action-statistics { 1853 uses target:meter-stats; 1854 description 1855 "meter statistics"; 1856 } 1857 description 1858 "augments meter stats to qos target module"; 1859 } 1860 } 1861 1863 7. Open Issues 1865 The model is still work in progress, and the authors are working on 1866 further refinements. List of open issues. 1868 o Support of reading statistics, e.g. classifier and queue 1869 statistics. 1871 o Interface bindings. We need more agreement, e.g. on handling 1872 multiple policies of same type on an interface. 1874 o Continued discussion on what can go into the base modes, what will 1875 fall into DiffServ model and what will have to go into the vendor 1876 specific model. While we strive to find common ground, the 1877 differences in the provisioning and the underlying architecture 1878 differences leave us no option but to move things into vendor 1879 specific models. 1881 o Security considerations. 1883 8. Security Considerations 1885 9. Revision Tracking 1887 9.1. Changes since Revision 00 1889 o In action module, modification to meter definition. Removed 1890 generic meter type and added one-rate-two-color meter. Some 1891 associated modifications to all 3 meter types. Moved color-aware 1892 to vendor specific. 1894 o The queue definition modifications - removed "always drop", moved 1895 queue size handling to vendor specific. 1897 o In target module, generic meter stats removed, added stats for the 1898 one-rate-two-color meter. 1900 10. Acknowledgement 1902 11. References 1904 11.1. Normative References 1906 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1907 Requirement Levels", BCP 14, RFC 2119, 1908 DOI 10.17487/RFC2119, March 1997, 1909 . 1911 [RFC2697] Heinanen, J. and R. Guerin, "A Single Rate Three Color 1912 Marker", RFC 2697, DOI 10.17487/RFC2697, September 1999, 1913 . 1915 [RFC2698] Heinanen, J. and R. Guerin, "A Two Rate Three Color 1916 Marker", RFC 2698, DOI 10.17487/RFC2698, September 1999, 1917 . 1919 [RFC3289] Baker, F., Chan, K., and A. Smith, "Management Information 1920 Base for the Differentiated Services Architecture", 1921 RFC 3289, DOI 10.17487/RFC3289, May 2002, 1922 . 1924 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 1925 the Network Configuration Protocol (NETCONF)", RFC 6020, 1926 DOI 10.17487/RFC6020, October 2010, 1927 . 1929 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1930 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1931 . 1933 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 1934 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 1935 . 1937 11.2. Informative References 1939 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 1940 and W. Weiss, "An Architecture for Differentiated 1941 Services", RFC 2475, DOI 10.17487/RFC2475, December 1998, 1942 . 1944 Appendix A. Company A and Company B examples 1946 Company A and Company B Diffserv modules augments all the filter 1947 types of the QoS classifier module as well as the QoS policy module 1948 that allow it to define marking, metering, min-rate, max-rate 1949 actions. Queuing and metering counters are realized by augmenting of 1950 the QoS target module. 1952 A.1. Example of Company A Diffserv Model 1954 The following Company A vendor example augments the qos and diffserv 1955 model, demonstrating some of the following functionality: 1957 - use of template based classifier definitions 1958 - use of single policy type modelling queue, scheduler policy, and a 1959 filter policy. All of these policies either augment the qos policy 1960 or the diffserv modules 1962 - support of hierarchial policy. 1964 - use of inline actions in a policy 1966 - flexibility in marking dscp or metadata at ingress and/or egress. 1968 module example-compa-diffserv { 1969 namespace "urn:ietf:params:xml:ns:yang:example-compa-diffserv"; 1970 prefix example; 1972 import ietf-interfaces { 1973 prefix if; 1974 } 1975 import ietf-qos-classifier { 1976 prefix classifier; 1977 } 1978 import ietf-qos-policy { 1979 prefix policy; 1980 } 1981 import ietf-qos-action { 1982 prefix action; 1983 } 1984 import ietf-qos-target { 1985 prefix target; 1986 } 1987 import ietf-diffserv { 1988 prefix diffserv; 1989 } 1991 organization "Company A"; 1992 contact 1993 "Editor: XYZ 1994 "; 1995 description 1996 "This module contains a collection of YANG definitions of 1997 companyA diffserv specification extension."; 1998 revision 2016-06-15 { 1999 description 2000 "Initial revision for diffserv actions on network packets"; 2001 reference 2002 "RFC 6020: YANG - A Data Modeling Language for the 2003 Network Configuration Protocol (NETCONF)"; 2004 } 2005 identity default-policy-type { 2006 base policy:policy-type; 2007 description 2008 "This defines default policy-type"; 2009 } 2011 identity qos-group { 2012 base classifier:filter-type; 2013 description 2014 "qos-group filter-type"; 2015 } 2017 grouping qos-group-cfg { 2018 list qos-group-cfg { 2019 key "qos-group-min qos-group-max"; 2020 description 2021 "list of dscp ranges"; 2022 leaf qos-group-min { 2023 type uint8; 2024 description 2025 "Minimum value of qos-group range"; 2026 } 2027 leaf qos-group-max { 2028 type uint8; 2029 description 2030 "maximum value of qos-group range"; 2031 } 2032 } 2033 description 2034 "Filter containing list of qos-group ranges"; 2035 } 2037 grouping wred-threshold { 2038 container wred-min-thresh { 2039 uses action:threshold; 2040 description 2041 "Minimum threshold"; 2042 } 2043 container wred-max-thresh { 2044 uses action:threshold; 2045 description 2046 "Maximum threshold"; 2047 } 2048 leaf mark-probability { 2049 type uint32 { 2050 range "1..1000"; 2051 } 2052 description 2053 "Mark probability"; 2054 } 2055 description 2056 "WRED threshold attributes"; 2057 } 2059 grouping randomdetect { 2060 leaf exp-weighting-const { 2061 type uint32; 2062 description 2063 "Exponential weighting constant factor for wred profile"; 2064 } 2065 uses wred-threshold; 2066 description 2067 "Random detect attributes"; 2068 } 2070 /************************************************* 2071 * Augmentation to Classifier Module 2072 *************************************************/ 2074 augment "/classifier:classifiers/" + 2075 "classifier:classifier-entry/" + 2076 "classifier:filter-entry/diffserv:filter-param" { 2077 case qos-group { 2078 uses qos-group-cfg; 2079 description 2080 "Filter containing list of qos-group ranges. 2081 Qos-group represent packet metadata information 2082 in a device. "; 2083 } 2084 description 2085 "augmentation of classifier filters"; 2086 } 2088 /************************************************* 2089 * Augmentation to Policy Module 2090 *************************************************/ 2092 augment "/policy:policies/policy:policy-entry/" + 2093 "policy:classifier-entry/" + 2094 "policy:classifier-action-entry-cfg/" + 2095 "policy:action-cfg-params" { 2096 case priority { 2097 uses action:priority; 2098 } 2099 case min-rate { 2100 uses action:min-rate; 2102 } 2103 case max-rate { 2104 uses action:max-rate; 2105 } 2106 case random-detect { 2107 uses randomdetect; 2108 } 2109 case meter-inline { 2110 uses action:meter; 2111 } 2112 case child-policy { 2113 leaf child-policy { 2114 type leafref { 2115 path "/policy:policies/policy:policy-entry/" + 2116 "policy:policy-name"; 2117 } 2118 description 2119 "Child Policy in the hierarchial configuration"; 2120 } 2121 } 2122 description 2123 "Augment the actions to policy entry"; 2124 } 2126 augment "/policy:policies" + 2127 "/policy:policy-entry" + 2128 "/policy:classifier-entry" + 2129 "/policy:classifier-action-entry-cfg" + 2130 "/policy:action-cfg-params" + 2131 "/example:meter-inline" + 2132 "/example:meter-type" + 2133 "/example:one-rate-two-color-meter-type" + 2134 "/example:one-rate-two-color-meter" + 2135 "/example:conform-action" + 2136 "/example:meter-action-params" + 2137 "/example:meter-action-val" { 2139 description 2140 "augment the one-rate-two-color meter conform 2141 with actions"; 2142 case meter-action-drop { 2143 description 2144 "meter drop"; 2145 uses action:drop; 2146 } 2147 case meter-action-mark-dscp { 2148 description 2149 "meter action dscp marking"; 2150 uses action:dscp-marking; 2151 } 2152 } 2153 augment "/policy:policies" + 2154 "/policy:policy-entry" + 2155 "/policy:classifier-entry" + 2156 "/policy:classifier-action-entry-cfg" + 2157 "/policy:action-cfg-params" + 2158 "/example:meter-inline" + 2159 "/example:meter-type" + 2160 "/example:one-rate-two-color-meter-type" + 2161 "/example:one-rate-two-color-meter" + 2162 "/example:exceed-action" + 2163 "/example:meter-action-params" + 2164 "/example:meter-action-val" { 2166 description 2167 "augment the one-rate-two-color meter exceed 2168 with actions"; 2169 case meter-action-drop { 2170 description 2171 "meter drop"; 2172 uses action:drop; 2173 } 2174 case meter-action-mark-dscp { 2175 description 2176 "meter action dscp marking"; 2177 uses action:dscp-marking; 2178 } 2179 } 2180 augment "/policy:policies" + 2181 "/policy:policy-entry" + 2182 "/policy:classifier-entry" + 2183 "/policy:classifier-action-entry-cfg" + 2184 "/policy:action-cfg-params" + 2185 "/example:meter-inline" + 2186 "/example:meter-type" + 2187 "/example:one-rate-tri-color-meter-type" + 2188 "/example:one-rate-tri-color-meter" + 2189 "/example:conform-action" + 2190 "/example:meter-action-params" + 2191 "/example:meter-action-val" { 2193 description 2194 "augment the one-rate-tri-color meter conform 2195 with actions"; 2196 case meter-action-drop { 2197 description 2198 "meter drop"; 2199 uses action:drop; 2200 } 2201 case meter-action-mark-dscp { 2202 description 2203 "meter action dscp marking"; 2204 uses action:dscp-marking; 2205 } 2206 } 2207 augment "/policy:policies" + 2208 "/policy:policy-entry" + 2209 "/policy:classifier-entry" + 2210 "/policy:classifier-action-entry-cfg" + 2211 "/policy:action-cfg-params" + 2212 "/example:meter-inline" + 2213 "/example:meter-type" + 2214 "/example:one-rate-tri-color-meter-type" + 2215 "/example:one-rate-tri-color-meter" + 2216 "/example:exceed-action" + 2217 "/example:meter-action-params" + 2218 "/example:meter-action-val" { 2220 description 2221 "augment the one-rate-tri-color meter exceed 2222 with actions"; 2223 case meter-action-drop { 2224 description 2225 "meter drop"; 2226 uses action:drop; 2227 } 2228 case meter-action-mark-dscp { 2229 description 2230 "meter action dscp marking"; 2231 uses action:dscp-marking; 2232 } 2233 } 2234 augment "/policy:policies" + 2235 "/policy:policy-entry" + 2236 "/policy:classifier-entry" + 2237 "/policy:classifier-action-entry-cfg" + 2238 "/policy:action-cfg-params" + 2239 "/example:meter-inline" + 2240 "/example:meter-type" + 2241 "/example:one-rate-tri-color-meter-type" + 2242 "/example:one-rate-tri-color-meter" + 2243 "/example:violate-action" + 2244 "/example:meter-action-params" + 2245 "/example:meter-action-val" { 2247 description 2248 "augment the one-rate-tri-color meter conform 2249 with actions"; 2250 case meter-action-drop { 2251 description 2252 "meter drop"; 2253 uses action:drop; 2254 } 2255 case meter-action-mark-dscp { 2256 description 2257 "meter action dscp marking"; 2258 uses action:dscp-marking; 2259 } 2260 } 2262 augment "/policy:policies" + 2263 "/policy:policy-entry" + 2264 "/policy:classifier-entry" + 2265 "/policy:classifier-action-entry-cfg" + 2266 "/policy:action-cfg-params" + 2267 "/example:meter-inline" + 2268 "/example:meter-type" + 2269 "/example:two-rate-tri-color-meter-type" + 2270 "/example:two-rate-tri-color-meter" + 2271 "/example:conform-action" + 2272 "/example:meter-action-params" + 2273 "/example:meter-action-val" { 2275 description 2276 "augment the one-rate-tri-color meter conform 2277 with actions"; 2278 case meter-action-drop { 2279 description 2280 "meter drop"; 2281 uses action:drop; 2282 } 2283 case meter-action-mark-dscp { 2284 description 2285 "meter action dscp marking"; 2286 uses action:dscp-marking; 2287 } 2288 } 2289 augment "/policy:policies" + 2290 "/policy:policy-entry" + 2291 "/policy:classifier-entry" + 2292 "/policy:classifier-action-entry-cfg" + 2293 "/policy:action-cfg-params" + 2294 "/example:meter-inline" + 2295 "/example:meter-type" + 2296 "/example:two-rate-tri-color-meter-type" + 2297 "/example:two-rate-tri-color-meter" + 2298 "/example:exceed-action" + 2299 "/example:meter-action-params" + 2300 "/example:meter-action-val" { 2302 description 2303 "augment the two-rate-tri-color meter exceed 2304 with actions"; 2305 case meter-action-drop { 2306 description 2307 "meter drop"; 2308 uses action:drop; 2309 } 2310 case meter-action-mark-dscp { 2311 description 2312 "meter action dscp marking"; 2313 uses action:dscp-marking; 2314 } 2315 } 2316 augment "/policy:policies" + 2317 "/policy:policy-entry" + 2318 "/policy:classifier-entry" + 2319 "/policy:classifier-action-entry-cfg" + 2320 "/policy:action-cfg-params" + 2321 "/example:meter-inline" + 2322 "/example:meter-type" + 2323 "/example:two-rate-tri-color-meter-type" + 2324 "/example:two-rate-tri-color-meter" + 2325 "/example:violate-action" + 2326 "/example:meter-action-params" + 2327 "/example:meter-action-val" { 2328 description 2329 "augment the two-rate-tri-color meter violate 2330 with actions"; 2331 case meter-action-drop { 2332 description 2333 "meter drop"; 2334 uses action:drop; 2335 } 2336 case meter-action-mark-dscp { 2337 description 2338 "meter action dscp marking"; 2339 uses action:dscp-marking; 2340 } 2341 } 2342 augment "/policy:policies" + 2343 "/policy:policy-entry" + 2344 "/policy:classifier-entry" + 2345 "/policy:classifier-action-entry-cfg" + 2346 "/policy:action-cfg-params" + 2347 "/example:meter-inline" + 2348 "/example:meter-type" + 2349 "/example:one-rate-two-color-meter-type" + 2350 "/example:one-rate-two-color-meter" { 2351 description 2352 "augment the one-rate-two-color meter with" + 2353 "color classifiers"; 2354 container conform-color { 2355 uses classifier:classifier-entry-generic-attr; 2356 description 2357 "conform color classifier container"; 2358 } 2359 container exceed-color { 2360 uses classifier:classifier-entry-generic-attr; 2361 description 2362 "exceed color classifier container"; 2363 } 2364 } 2365 augment "/policy:policies" + 2366 "/policy:policy-entry" + 2367 "/policy:classifier-entry" + 2368 "/policy:classifier-action-entry-cfg" + 2369 "/policy:action-cfg-params" + 2370 "/example:meter-inline" + 2371 "/example:meter-type" + 2372 "/example:one-rate-tri-color-meter-type" + 2373 "/example:one-rate-tri-color-meter" { 2374 description 2375 "augment the one-rate-tri-color meter with" + 2376 "color classifiers"; 2377 container conform-color { 2378 uses classifier:classifier-entry-generic-attr; 2379 description 2380 "conform color classifier container"; 2381 } 2382 container exceed-color { 2383 uses classifier:classifier-entry-generic-attr; 2384 description 2385 "exceed color classifier container"; 2386 } 2387 container violate-color { 2388 uses classifier:classifier-entry-generic-attr; 2389 description 2390 "violate color classifier container"; 2392 } 2393 } 2394 augment "/policy:policies" + 2395 "/policy:policy-entry" + 2396 "/policy:classifier-entry" + 2397 "/policy:classifier-action-entry-cfg" + 2398 "/policy:action-cfg-params" + 2399 "/example:meter-inline" + 2400 "/example:meter-type" + 2401 "/example:two-rate-tri-color-meter-type" + 2402 "/example:two-rate-tri-color-meter" { 2403 description 2404 "augment the two-rate-tri-color meter with" + 2405 "color classifiers"; 2406 container conform-color { 2407 uses classifier:classifier-entry-generic-attr; 2408 description 2409 "conform color classifier container"; 2410 } 2411 container exceed-color { 2412 uses classifier:classifier-entry-generic-attr; 2413 description 2414 "exceed color classifier container"; 2415 } 2416 container violate-color { 2417 uses classifier:classifier-entry-generic-attr; 2418 description 2419 "violate color classifier container"; 2420 } 2421 } 2423 /************************************************* 2424 * Augmentation to Target Module 2425 *************************************************/ 2427 augment "/if:interfaces/if:interface/" + 2428 "target:qos-target-entry/" + 2429 "target:qos-target-classifier-statistics/" + 2430 "diffserv:diffserv-action-statistics" { 2431 uses target:queuing-stats; 2432 description 2433 "Augment the statistics to policy entry"; 2434 } 2435 augment "/if:interfaces/if:interface/" + 2436 "target:qos-target-entry/" + 2437 "target:qos-target-classifier-statistics" { 2438 leaf relative-path { 2439 type string; 2440 description 2441 "Relative Path of the classifier entry in the 2442 hierarchial policy"; 2443 } 2444 description 2445 "Augment the statistics to policy entry"; 2446 } 2447 } 2449 A.2. Example of Company B Diffserv Model 2451 The following vendor example augments the qos and diffserv model, 2452 demonstrating some of the following functionality: 2454 - use of inline classifier definitions (defined inline in the policy 2455 vs referencing an externally defined classifier) 2457 - use of mulitple policy types, e.g. a queue policy, a scheduler 2458 policy, and a filter policy. All of these policies either augment 2459 the qos policy or the diffserv modules 2461 - use of a queue module, which uses and extends the queue grouping 2462 from the ietf-qos-action module 2464 - use of meter templates (v.s. meter inline) 2466 - use of internal meta data for classification and marking 2468 module example-compb-diffserv-filter-policy { 2469 yang-version 1; 2470 namespace "urn:ietf:params:xml:ns:yang:" + 2471 "example-compb-diffserv-filter-policy"; 2472 prefix compb-filter-policy; 2474 import ietf-qos-classifier { 2475 prefix classifier; 2476 } 2477 import ietf-qos-policy { 2478 prefix policy; 2479 } 2480 import ietf-qos-action { 2481 prefix action; 2482 } 2483 import ietf-diffserv { 2484 prefix diffserv; 2485 } 2487 organization "Company B"; 2488 contact 2489 "Editor: XYZ 2490 "; 2492 description 2493 "This module contains a collection of YANG definitions for 2494 configuring diffserv specification implementations. 2495 Copyright (c) 2014 IETF Trust and the persons identified as 2496 authors of the code. All rights reserved. 2497 Redistribution and use in source and binary forms, with or 2498 without modification, is permitted pursuant to, and subject 2499 to the license terms contained in, the Simplified BSD License 2500 set forth in Section 4.c of the IETF Trust's Legal Provisions 2501 Relating to IETF Documents 2502 (http://trustee.ietf.org/license-info). 2503 This version of this YANG module is part of RFC XXXX; see 2504 the RFC itself for full legal notices."; 2506 revision 2015-04-07 { 2507 description 2508 "Latest revision of diffserv policy"; 2509 reference "RFC XXXX"; 2510 } 2512 /* 2513 * The policy must be of either type v4 or v6. Corresponding 2514 * address types must be used. Enforce with "must" statement? 2515 */ 2516 identity v4-diffserv-policy-type { 2517 base policy:policy-type; 2518 description 2519 "This defines default policy-type"; 2520 } 2522 identity v6-diffserv-policy-type { 2523 base policy:policy-type; 2524 description 2525 "This defines default policy-type"; 2526 } 2528 /************************************************* 2529 * Classification types 2530 *************************************************/ 2532 identity forwarding-class { 2533 base classifier:filter-type; 2534 description 2535 "Forwarding class filter type"; 2536 } 2538 identity internal-loss-priority { 2539 base classifier:filter-type; 2540 description 2541 "Internal loss priority filter type"; 2542 } 2544 grouping forwarding-class-cfg { 2545 list forwarding-class-cfg { 2546 key "forwarding-class"; 2547 description 2548 "list of forwarding-classes"; 2549 leaf forwarding-class { 2550 type string; 2551 description 2552 "Forwarding class name"; 2553 } 2554 } 2555 description 2556 "Filter containing list of forwarding classes"; 2557 } 2559 grouping loss-priority-cfg { 2560 list loss-priority-cfg { 2561 key "loss-priority"; 2562 description 2563 "list of loss-priorities"; 2564 leaf loss-priority { 2565 type enumeration { 2566 enum high { 2567 description "High Loss Priority"; 2568 } 2569 enum medium-high { 2570 description "Medium-high Loss Priority"; 2571 } 2572 enum medium-low { 2573 description "Medium-low Loss Priority"; 2574 } 2575 enum low { 2576 description "Low Loss Priority"; 2577 } 2578 } 2579 description 2580 "Loss-priority"; 2581 } 2582 } 2583 description 2584 "Filter containing list of loss priorities"; 2585 } 2587 augment "/policy:policies" + 2588 "/policy:policy-entry" + 2589 "/policy:classifier-entry" + 2590 "/policy:filter-entry" + 2591 "/diffserv:filter-params" { 2592 case forwarding-class { 2593 uses forwarding-class-cfg; 2594 description 2595 "Filter Type Internal-loss-priority"; 2596 } 2597 case internal-loss-priority { 2598 uses loss-priority-cfg; 2599 description 2600 "Filter Type Internal-loss-priority"; 2601 } 2602 description 2603 "Augments Diffserv Classifier with vendor" + 2604 " specific types"; 2605 } 2607 /************************************************* 2608 * Actions 2609 *************************************************/ 2611 identity mark-fwd-class { 2612 base policy:action-type; 2613 description 2614 "mark forwarding class action type"; 2615 } 2617 identity mark-loss-priority { 2618 base policy:action-type; 2619 description 2620 "mark loss-priority action type"; 2621 } 2623 grouping mark-fwd-class { 2624 container mark-fwd-class-cfg { 2625 leaf forwarding-class { 2626 type string; 2627 description 2628 "Forwarding class name"; 2629 } 2630 description 2631 "mark-fwd-class container"; 2632 } 2633 description 2634 "mark-fwd-class grouping"; 2635 } 2637 grouping mark-loss-priority { 2638 container mark-loss-priority-cfg { 2639 leaf loss-priority { 2640 type enumeration { 2641 enum high { 2642 description "High Loss Priority"; 2643 } 2644 enum medium-high { 2645 description "Medium-high Loss Priority"; 2646 } 2647 enum medium-low { 2648 description "Medium-low Loss Priority"; 2649 } 2650 enum low { 2651 description "Low Loss Priority"; 2652 } 2653 } 2654 description 2655 "Loss-priority"; 2656 } 2657 description 2658 "mark-loss-priority container"; 2659 } 2660 description 2661 "mark-loss-priority grouping"; 2662 } 2664 augment "/policy:policies" + 2665 "/policy:policy-entry" + 2666 "/policy:classifier-entry" + 2667 "/policy:classifier-action-entry-cfg" + 2668 "/diffserv:action-cfg-params" { 2669 case mark-fwd-class { 2670 uses mark-fwd-class; 2671 description 2672 "Mark forwarding class in the packet"; 2673 } 2674 case mark-loss-priority { 2675 uses mark-loss-priority; 2676 description 2677 "Mark loss priority in the packet"; 2678 } 2679 case meter-reference { 2680 uses action:meter-reference; 2681 description 2682 "Assign a meter as an action"; 2683 } 2684 case discard { 2685 uses action:discard; 2686 description 2687 "Discard action"; 2688 } 2689 case count { 2690 uses action:count; 2691 description 2692 "Count action - explicit count configuration"; 2693 } 2694 description 2695 "Augments common diffserv policy actions"; 2696 } 2698 augment "/action:meter-template" + 2699 "/action:meter-entry" + 2700 "/action:meter-type" + 2701 "/action:one-rate-tri-color-meter-type" + 2702 "/action:one-rate-tri-color-meter" { 2703 leaf one-rate-color-aware { 2704 type boolean; 2705 description 2706 "This defines if the meter is color-aware"; 2707 } 2708 } 2709 augment "/action:meter-template" + 2710 "/action:meter-entry" + 2711 "/action:meter-type" + 2712 "/action:two-rate-tri-color-meter-type" + 2713 "/action:two-rate-tri-color-meter" { 2714 leaf two-rate-color-aware { 2715 type boolean; 2716 description 2717 "This defines if the meter is color-aware"; 2718 } 2719 } 2721 /* example of augmenting a meter template with a 2722 /* vendor specific action */ 2723 augment "/action:meter-template" + 2724 "/action:meter-entry" + 2725 "/action:meter-type" + 2726 "/action:one-rate-two-color-meter-type" + 2727 "/action:one-rate-two-color-meter" + 2728 "/action:exceed-action" + 2729 "/action:meter-action-params" + 2730 "/action:meter-action-val" { 2731 case meter-action-drop { 2732 description 2733 "meter drop"; 2734 uses action:drop; 2735 } 2737 description 2738 "Augment the actions to basic meter"; 2739 } 2741 } 2743 module example-compb-queue-policy { 2744 yang-version 1; 2745 namespace "urn:ietf:params:xml:ns:yang:example-compb-queue-policy"; 2746 prefix queue-plcy; 2748 import ietf-qos-classifier { 2749 prefix classifier; 2750 } 2751 import ietf-qos-policy { 2752 prefix policy; 2753 } 2755 organization "Company B"; 2756 contact 2757 "Editor: XYZ 2758 "; 2760 description 2761 "This module defines a queue policy. The classification 2762 is based on aforwarding class, and the actions are queues. 2763 Copyright (c) 2014 IETF Trust and the persons identified as 2764 authors of the code. All rights reserved. 2765 Redistribution and use in source and binary forms, with or 2766 without modification, is permitted pursuant to, and subject 2767 to the license terms contained in, the Simplified BSD License 2768 set forth in Section 4.c of the IETF Trust's Legal Provisions 2769 Relating to IETF Documents 2770 (http://trustee.ietf.org/license-info). 2771 This version of this YANG module is part of RFC XXXX; see 2772 the RFC itself for full legal notices."; 2774 revision 2015-04-07 { 2775 description 2776 "Latest revision of diffserv policy"; 2777 reference "RFC XXXX"; 2778 } 2780 identity forwarding-class { 2781 base classifier:filter-type; 2782 description 2783 "Forwarding class filter type"; 2784 } 2786 grouping forwarding-class-cfg { 2787 leaf forwarding-class-cfg { 2788 type string; 2789 description 2790 "forwarding-class name"; 2791 } 2792 description 2793 "Forwarding class filter"; 2794 } 2796 augment "/policy:policies" + 2797 "/policy:policy-entry" + 2798 "/policy:classifier-entry" + 2799 "/policy:filter-entry" { 2800 /* Does NOT support "logical-not" of forwarding class. 2801 Use "must"? */ 2802 choice filter-params { 2803 description 2804 "Choice of filters"; 2805 case forwarding-class-cfg { 2806 uses forwarding-class-cfg; 2807 description 2808 "Filter Type Internal-loss-priority"; 2809 } 2810 } 2811 description 2812 "Augments Diffserv Classifier with fwd class filter"; 2813 } 2815 identity compb-queue { 2816 base policy:action-type; 2817 description 2818 "compb-queue action type"; 2819 } 2821 grouping compb-queue-name { 2822 container queue-name { 2823 leaf name { 2824 type string; 2825 description 2826 "Queue class name"; 2827 } 2828 description 2829 "compb queue container"; 2830 } 2831 description 2832 "compb-queue grouping"; 2833 } 2835 augment "/policy:policies" + 2836 "/policy:policy-entry" + 2837 "/policy:classifier-entry" + 2838 "/policy:classifier-action-entry-cfg" { 2839 choice action-cfg-params { 2840 description 2841 "Choice of action types"; 2842 case compb-queue { 2843 uses compb-queue-name; 2844 } 2845 } 2846 description 2847 "Augment the queue actions to queue policy entry"; 2848 } 2849 } 2851 module example-compb-queue { 2852 yang-version 1; 2853 namespace "urn:ietf:params:xml:ns:yang:ietf-compb-queue"; 2854 prefix compb-queue; 2856 import ietf-qos-action { 2857 prefix action; 2858 } 2860 organization "Company B"; 2861 contact 2862 "Editor: XYZ 2863 "; 2865 description 2866 "This module describes a compb queue module. This is a 2867 template for a queue within a queue policy, referenced 2868 by name. 2870 This version of this YANG module is part of RFC XXXX; see 2871 the RFC itself for full legal notices."; 2873 revision 2015-04-07 { 2874 description 2875 "Latest revision of diffserv based classifier"; 2876 reference "RFC XXXX"; 2877 } 2879 container compb-queue { 2880 description 2881 "Queue used in compb architecture"; 2882 leaf name { 2883 type string; 2884 description 2885 "A unique name identifying this queue"; 2886 } 2887 uses action:queue; 2888 container excess-rate { 2889 choice excess-rate-type { 2890 case percent { 2891 leaf excess-rate-percent { 2892 type uint32 { 2893 range "1..100"; 2894 } 2895 description 2896 "excess-rate-percent"; 2897 } 2898 } 2899 case proportion { 2900 leaf excess-rate-poroportion { 2901 type uint32 { 2902 range "1..1000"; 2903 } 2904 description 2905 "excess-rate-poroportion"; 2906 } 2907 } 2908 description 2909 "Choice of excess-rate type"; 2910 } 2911 description 2912 "Excess rate value"; 2913 } 2914 leaf excess-priority { 2915 type enumeration { 2916 enum high { 2917 description "High Loss Priority"; 2918 } 2919 enum medium-high { 2920 description "Medium-high Loss Priority"; 2921 } 2922 enum medium-low { 2923 description "Medium-low Loss Priority"; 2924 } 2925 enum low { 2926 description "Low Loss Priority"; 2927 } 2928 enum none { 2929 description "No excess priority"; 2930 } 2931 } 2932 description 2933 "Priority of excess (above guaranted rate) traffic"; 2934 } 2935 container buffer-size { 2936 choice buffer-size-type { 2937 case percent { 2938 leaf buffer-size-percent { 2939 type uint32 { 2940 range "1..100"; 2941 } 2942 description 2943 "buffer-size-percent"; 2944 } 2945 } 2946 case temporal { 2947 leaf buffer-size-temporal { 2948 type uint64; 2949 units "microsecond"; 2950 description 2951 "buffer-size-temporal"; 2952 } 2953 } 2954 case remainder { 2955 leaf buffer-size-remainder { 2956 type empty; 2957 description 2958 "use remaining of buffer"; 2959 } 2960 } 2961 description 2962 "Choice of buffer size type"; 2963 } 2964 description 2965 "Buffer size value"; 2966 } 2968 } 2970 augment 2971 "/compb-queue" + 2972 "/queue-cfg" + 2973 "/algorithmic-drop-cfg" + 2974 "/drop-algorithm" { 2975 case random-detect { 2976 list drop-profile-list { 2977 key "priority"; 2978 description 2979 "map of priorities to drop-algorithms"; 2980 leaf priority { 2981 type enumeration { 2982 enum any { 2983 description "Any priority mapped here"; 2984 } 2985 enum high { 2986 description "High Priority Packet"; 2987 } 2988 enum medium-high { 2989 description "Medium-high Priority Packet"; 2990 } 2991 enum medium-low { 2992 description "Medium-low Priority Packet"; 2993 } 2994 enum low { 2995 description "Low Priority Packet"; 2996 } 2997 } 2998 description 2999 "Priority of guaranteed traffic"; 3000 } 3001 leaf drop-profile { 3002 type string; 3003 description 3004 "drop profile to use for this priority"; 3005 } 3006 } 3007 } 3008 description 3009 "compb random detect drop algorithm config"; 3010 } 3011 } 3013 module example-compb-scheduler-policy { 3014 yang-version 1; 3015 namespace "urn:ietf:params:xml:ns:yang:" + 3016 "example-compb-scheduler-policy"; 3017 prefix scheduler-plcy; 3019 import ietf-qos-action { 3020 prefix action; 3021 } 3023 import ietf-qos-policy { 3024 prefix policy; 3025 } 3027 organization "Company B"; 3028 contact 3029 "Editor: XYZ 3030 "; 3032 description 3033 "This module defines a scheduler policy. The classification 3034 is based on classifier-any, and the action is a scheduler."; 3036 revision 2015-04-07 { 3037 description 3038 "Latest revision of diffserv policy"; 3039 reference "RFC XXXX"; 3040 } 3042 identity queue-policy { 3043 base policy:action-type; 3044 description 3045 "forwarding-class-queue action type"; 3046 } 3048 grouping queue-policy-name { 3049 container compb-queue-policy-name { 3050 leaf name { 3051 type string; 3052 description 3053 "Queue policy name"; 3054 } 3055 description 3056 "compb-queue-policy container"; 3057 } 3058 description 3059 "compb-queue policy grouping"; 3060 } 3062 augment "/policy:policies" + 3063 "/policy:policy-entry" + 3064 "/policy:classifier-entry" + 3065 "/policy:classifier-action-entry-cfg" { 3066 choice action-cfg-params { 3067 case schedular { 3068 uses action:schedular; 3069 } 3070 case queue-policy { 3071 uses queue-policy-name; 3072 } 3073 description 3074 "Augment the scheduler policy with a queue policy"; 3075 } 3076 } 3077 } 3079 Authors' Addresses 3081 Aseem Choudhary 3082 Cisco Systems 3083 170 W. Tasman Drive 3084 San Jose, CA 95134 3085 US 3087 Email: asechoud@cisco.com 3089 Mahesh Jethanandani 3090 Cisco Systems 3091 170 W. Tasman Drive 3092 San Jose, CA 95134 3093 US 3095 Email: mjethanandani@gmail.com 3097 Norm Strahle 3098 Juniper Networks 3099 1194 North Mathilda Avenue 3100 Sunnyvale, CA 94089 3101 US 3103 Email: nstrahle@juniper.net 3104 Ebben Aries 3105 Juniper Networks 3106 1194 North Mathilda Avenue 3107 Sunnyvale, CA 94089 3108 US 3110 Email: exa@juniper.net