idnits 2.17.1 draft-asechoud-netmod-qos-model-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 179 has weird spacing: '...cal-not boo...' == Line 201 has weird spacing: '...cal-not boo...' == Line 203 has weird spacing: '...on-type ide...' == Line 382 has weird spacing: '...scp-min ine...' == Line 383 has weird spacing: '...scp-max ine...' == (8 more instances...) -- The document date (April 4, 2016) is 2941 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 2697 ** Downref: Normative reference to an Informational RFC: RFC 2698 ** Obsolete normative reference: RFC 7223 (Obsoleted by RFC 8343) Summary: 4 errors (**), 0 flaws (~~), 7 warnings (==), 1 comment (--). 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: October 6, 2016 April 4, 2016 7 YANG Model for QoS 8 draft-asechoud-netmod-qos-model-00 10 Abstract 12 This document describes a YANG model for Quality of Service (QoS) 13 configuration and operational parameters. 15 Status of This Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at http://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on October 6, 2016. 32 Copyright Notice 34 Copyright (c) 2016 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (http://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 50 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 3. QoS Model Design . . . . . . . . . . . . . . . . . . . . . . 3 52 4. DiffServ Model Design . . . . . . . . . . . . . . . . . . . . 3 53 5. Modules Tree Structure . . . . . . . . . . . . . . . . . . . 4 54 6. Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 55 6.1. IETF-QOS-CLASSIFIER . . . . . . . . . . . . . . . . . . . 13 56 6.2. IETF-QOS-POLICY . . . . . . . . . . . . . . . . . . . . . 20 57 6.3. IETF-QOS-ACTION . . . . . . . . . . . . . . . . . . . . . 22 58 6.4. IETF-QOS-TARGET . . . . . . . . . . . . . . . . . . . . . 35 59 6.5. IETF-DIFFSERV . . . . . . . . . . . . . . . . . . . . . . 42 60 7. Security Considerations . . . . . . . . . . . . . . . . . . . 44 61 8. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 45 62 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 45 63 9.1. Normative References . . . . . . . . . . . . . . . . . . 45 64 9.2. Informative References . . . . . . . . . . . . . . . . . 45 65 Appendix A. Open Items . . . . . . . . . . . . . . . . . . . . . 46 66 Appendix B. Company A example . . . . . . . . . . . . . . . . . 46 67 B.1. EXAMPLE-COMPA-DIFFSERV . . . . . . . . . . . . . . . . . 46 68 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 50 70 1. Introduction 72 This document defines a base YANG [RFC6020] data module for Quality 73 of Service (QoS) configuration and operational parameters. 74 Differentiated Services (DiffServ) module is an augmentation of the 75 base QoS model. Remote Procedure Calls (RPC) or notification 76 definition is currently not part of this document and will be added 77 later if necessary. QoS base module defines a basic building blocks 78 to define a classifier, policy, action and target. The base module 79 has been augmented to include packet match fields, action parameters, 80 and statistics data to define the DiffServ module. It is left up to 81 individual vendors to stitch actions like queues, random-detect (RED) 82 and vendor specific parameters of the DiffServ policy definitions. 83 Designing the module in this manner allows for a very flexible and 84 extensible module that should fit in with most of the vendor 85 requirements. The DiffServ model is based on DiffServ architecture, 86 and various references have been made to available standard 87 architecture documents. 89 DiffServ is a preferred approach for network service providers to 90 offer services to different customers based on their network Quality- 91 of-Service (QoS) objectives. The traffic streams are differentiated 92 based on DiffServ Code Points (DSCP) carried in the IP header of each 93 packet. The DSCP markings are applied by upstream node or by the 94 edge router on entry to the DiffServ network. 96 2. Terminology 98 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 99 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 100 document are to be interpreted as described in [RFC2119]. 102 3. QoS Model Design 104 A classifier consists of packets which may be grouped when a logical 105 set of rules are applied on different packet header fields. The 106 grouping may be based on different values or range of values of same 107 packet header field, presence or absence of some values or range of 108 values of a packet field or a combination thereof. The QoS 109 classifier is defined in the ietf-qos-classifier module. 111 A classifier entry contains one or more packet conditioning 112 functions. A packet conditioning function is typically based on 113 direction of traffic and may drop, mark or delay network packets. A 114 set of classifier entries with corresponding conditioning functions 115 when arranged in order of priority represents a QoS policy. A QoS 116 policy may contain one or more classifier entries. These are defined 117 in ietf-qos-policy module. 119 Actions are configured in line with respect to the policy module. 120 These include marking, dropping or shaping. Actions are defined in 121 the ietf-qos-action module. 123 A meter qualifies if the traffic arrival rate is based on agreed upon 124 rate and variability. A meter is generally modeled with qualifying 125 rate and variability defined as a token bucket. Different vendors 126 can extend it to have other types of generic meters as well. Single 127 Rate Tri Color Marking (srTCM) [RFC2697] meter and Two Rate Tri Color 128 Marking (trTCM) [RFC2698] meter are defined separately in the ietf- 129 qos-action module, along with generic-meter. 131 4. DiffServ Model Design 133 DiffServ architecture [RFC3289] and [RFC2475] describe the 134 architecture as a simple model where traffic entering a network is 135 classified and possibly conditioned at the boundary of the network 136 and assigned a different Behavior Aggregate (BA). Each BA is 137 identified by a specific value of DSCP, and is used to select a Per 138 Hop Behavior (PHB). 140 The packet classification policy identifies the subset of traffic 141 which may receive a DiffServ by being conditioned or mapped. Packet 142 classifiers select packets within a stream based on the content of 143 some portion of the packet header. There are two types of 144 classifiers, the BA classifier, and the Multi-Field (MF) classifier 145 which selects packets based on a value which is combination of one or 146 more header fields. In the ietf-diffserv module, this is realized by 147 augmenting the QoS classification module. 149 Traffic conditioning includes metering, shaping, policing and/or 150 marking. A meter is used to measure the traffic against a given 151 traffic profile. The traffic profile specifies the temporal property 152 of the traffic. A packet that arrives is first determined to be in 153 or out of the profile, which will result in the action of marked, 154 dropped or shaped. This is realized in ietf-diffserv module by 155 augmenting the QoS policy module, which includes the QoS action 156 module. 158 Finally, statistics are realized in the ietf-diffserv module by 159 augmenting the QoS target module. 161 5. Modules Tree Structure 163 This document defines five YANG modules - four QoS base modules and 164 one DiffServ module. 166 ietf-qos-classifier consists of classifier entries identified by a 167 classifier entry name. Each entry MAY contain a list of filter 168 entries. When no filter entry is present in a classifier entry, it 169 matches all traffic. 171 module: ietf-qos-classifier 172 +--rw classifiers 173 +--rw classifier-entry* [classifier-entry-name] 174 +--rw classifier-entry-name string 175 +--rw classifier-entry-descr? string 176 +--rw classifier-entry-filter-operation? identityref 177 +--rw filter-entry* [filter-type filter-logical-not] 178 +--rw filter-type identityref 179 +--rw filter-logical-not boolean 181 An ietf-qos-policy module contains list of policy objects identified 182 by a policy name and policy type which MUST be provided. With 183 different values of policy types, each vendor MAY define their own 184 construct of policy for different QoS functionalities. Each vendor 185 MAY augment classifier entry in a policy definition with a set of 186 actions. 188 module: ietf-qos-policy 189 +--rw policies 190 +--rw policy-entry* [policy-name policy-type] 191 +--rw policy-name string 192 +--rw policy-type identityref 193 +--rw policy-descr? string 194 +--rw classifier-entry* [classifier-entry-name] 195 +--rw classifier-entry-name string 196 +--rw classifier-entry-inline? boolean 197 +--rw classifier-entry-filter-oper? identityref 198 +--rw filter-entry* [filter-type filter-logical-not] 199 {policy-inline-classifier-config}? 200 | +--rw filter-type identityref 201 | +--rw filter-logical-not boolean 202 +--rw classifier-action-entry-cfg* [action-type] 203 +--rw action-type identityref 204 +--rw (action-cfg-params)? 206 ietf-qos-action module contains grouping of set of QoS actions. 207 These include metering, marking, dropping and shaping. Marking sets 208 DiffServ codepoint value in the classified packet. Color-aware and 209 Color-blind meters can also be configured in the action module. 211 module: ietf-qos-action 212 +--rw meter-template {meter-template-support}? 213 +--rw meter-entry* [meter-name] 214 +--rw meter-name string 215 +--rw (meter-type)? 216 +--:(srtcm) 217 | +--rw srtcm 218 | +--rw committed-rate? uint64 219 | +--rw committed-burst? uint64 220 | +--rw excess-burst? uint64 221 | +--rw conform-action 222 | | +--rw meter-action-type? identityref 223 | | +--rw (val)? 224 | | +--:(meter-action-dscp-mark) 225 | | | +--rw dscp-cfg 226 | | | +--rw dscp? inet:dscp 227 | | +--:(meter-action-drop) 228 | | +--rw drop-cfg 229 | | +--rw drop-action? empty 230 | +--rw conform-color 231 | | +--rw classifier-entry-name? string 232 | | +--rw classifier-entry-descr? string 233 | | +--rw classifier-entry-filter-operation? 234 identityref 236 | +--rw exceed-action 237 | | +--rw meter-action-type? identityref 238 | | +--rw (val)? 239 | | +--:(meter-action-dscp-mark) 240 | | | +--rw dscp-cfg 241 | | | +--rw dscp? inet:dscp 242 | | +--:(meter-action-drop) 243 | | +--rw drop-cfg 244 | | +--rw drop-action? empty 245 | +--rw exceed-color 246 | | +--rw classifier-entry-name? string 247 | | +--rw classifier-entry-descr? string 248 | | +--rw classifier-entry-filter-operation? 249 identityref 250 | +--rw violate-action 251 | | +--rw meter-action-type? identityref 252 | | +--rw (val)? 253 | | +--:(meter-action-dscp-mark) 254 | | | +--rw dscp-cfg 255 | | | +--rw dscp? inet:dscp 256 | | +--:(meter-action-drop) 257 | | +--rw drop-cfg 258 | | +--rw drop-action? empty 259 | +--rw violate-color 260 | +--rw classifier-entry-name? string 261 | +--rw classifier-entry-descr? string 262 | +--rw classifier-entry-filter-operation? 263 identityref 264 +--:(trtcm) 265 | +--rw trtcm 266 | +--rw committed-rate? uint64 267 | +--rw committed-burst? uint64 268 | +--rw peak-rate? uint64 269 | +--rw peak-burst? uint64 270 | +--rw conform-action 271 | | +--rw meter-action-type? identityref 272 | | +--rw (val)? 273 | | +--:(meter-action-dscp-mark) 274 | | | +--rw dscp-cfg 275 | | | +--rw dscp? inet:dscp 276 | | +--:(meter-action-drop) 277 | | +--rw drop-cfg 278 | | +--rw drop-action? empty 279 | +--rw conform-color 280 | | +--rw classifier-entry-name? string 281 | | +--rw classifier-entry-descr? string 282 | | +--rw classifier-entry-filter-operation? 283 identityref 285 | +--rw exceed-action 286 | | +--rw meter-action-type? identityref 287 | | +--rw (val)? 288 | | +--:(meter-action-dscp-mark) 289 | | | +--rw dscp-cfg 290 | | | +--rw dscp? inet:dscp 291 | | +--:(meter-action-drop) 292 | | +--rw drop-cfg 293 | | +--rw drop-action? empty 294 | +--rw exceed-color 295 | | +--rw classifier-entry-name? string 296 | | +--rw classifier-entry-descr? string 297 | | +--rw classifier-entry-filter-operation? 298 identityref 299 | +--rw violate-action 300 | | +--rw meter-action-type? identityref 301 | | +--rw (val)? 302 | | +--:(meter-action-dscp-mark) 303 | | | +--rw dscp-cfg 304 | | | +--rw dscp? inet:dscp 305 | | +--:(meter-action-drop) 306 | | +--rw drop-cfg 307 | | +--rw drop-action? empty 308 | +--rw violate-color 309 | +--rw classifier-entry-name? string 310 | +--rw classifier-entry-descr? string 311 | +--rw classifier-entry-filter-operation? 312 identityref 313 +--:(generic-meter) 314 +--rw generic-meter-cfg 315 +--rw meter-list* [meter-id] 316 +--rw meter-id uint16 317 +--rw rate-value? uint64 318 +--rw rate-unit? identityref 319 +--rw (burst-type)? 320 | +--:(size) 321 | | +--rw burst-size? uint64 322 | +--:(interval) 323 | +--rw burst-interval? uint64 324 +--rw color 325 | +--rw classifier-entry-name? string 326 | +--rw classifier-entry-descr? string 327 | +--rw classifier-entry-filter-operation? 328 identityref 329 +--rw succeed-action 330 | +--rw meter-action-type? identityref 331 | +--rw (val)? 332 | | +--:(meter-action-dscp-mark) 333 | | | +--rw dscp-cfg 334 | | | +--rw dscp? inet:dscp 335 | | +--:(meter-action-drop) 336 | | +--rw drop-cfg 337 | | +--rw drop-action? empty 338 | +--rw next-meter-id? uint16 339 +--rw fail-action 340 +--rw meter-action-type? identityref 341 +--rw (val)? 342 | +--:(meter-action-dscp-mark) 343 | | +--rw dscp-cfg 344 | | +--rw dscp? inet:dscp 345 | +--:(meter-action-drop) 346 | +--rw drop-cfg 347 | +--rw drop-action? empty 348 +--rw next-meter-id? uint16 350 ietf-qos-target module contains reference of qos-policy for either 351 direction of network traffic and augments ietf-interfaces [RFC7223] 352 module. Classifier counters are associated with a target. 354 module: ietf-qos-target 355 augment /if:interfaces/if:interface: 356 +--rw qos-target-entry* [direction policy-type] 357 +--rw direction identityref 358 +--rw policy-type identityref 359 +--rw policy-name string 360 +--ro qos-target-classifier-statistics* 361 +--ro classifier-entry-name? string 362 +--ro classifier-entry-statistics 363 +--ro classified-pkts? uint64 364 +--ro classified-bytes? uint64 365 +--ro classified-rate? uint64 367 Diffserv module augments QoS classifier module. Many of the YANG 368 types defined in [RFC6991] are represented as leafs in the classifier 369 module. 371 Metering and marking actions are realized by augmenting the QoS 372 policy-module. Any queuing, AQM and scheduling actions are part of 373 vendor specific augmentation. Statistics are realized by augmenting 374 the QoS target module. 376 module: ietf-diffserv 377 augment /classifier:classifiers/classifier:classifier-entry 378 /classifier:filter-entry: 379 +--rw (filter-param)? 380 +--:(dscp) 381 | +--rw dscp-cfg* [dscp-min dscp-max] 382 | +--rw dscp-min inet:dscp 383 | +--rw dscp-max inet:dscp 384 +--:(source-ip-address) 385 | +--rw source-ip-address-cfg* [source-ip-addr] 386 | +--rw source-ip-addr inet:ip-prefix 387 +--:(destination-ip-address) 388 | +--rw destination-ip-address-cfg* [destination-ip-addr] 389 | +--rw destination-ip-addr inet:ip-prefix 390 +--:(source-port) 391 | +--rw source-port-cfg* [source-port-min source-port-max] 392 | +--rw source-port-min inet:port-number 393 | +--rw source-port-max inet:port-number 394 +--:(destination-port) 395 | +--rw destination-port-cfg* 396 [destination-port-min destination-port-max] 397 | +--rw destination-port-min inet:port-number 398 | +--rw destination-port-max inet:port-number 399 +--:(protocol) 400 +--rw protocol-cfg* [protocol-min protocol-max] 401 +--rw protocol-min uint8 402 +--rw protocol-max uint8 403 augment /policy:policies/policy:policy-entry/policy:classifier-entry 404 /policy:classifier-action-entry-cfg: 405 +--rw (action-cfg-params)? 406 +--:(dscp-marking) 407 | +--rw dscp-cfg 408 | +--rw dscp? inet:dscp 409 +--:(meter) 410 +--rw (meter-type)? 411 +--:(srtcm) 412 | +--rw srtcm 413 | +--rw committed-rate? uint64 414 | +--rw committed-burst? uint64 415 | +--rw excess-burst? uint64 416 | +--rw conform-action 417 | | +--rw meter-action-type? identityref 418 | | +--rw (val)? 419 | | +--:(meter-action-dscp-mark) 420 | | | +--rw dscp-cfg 421 | | | +--rw dscp? inet:dscp 422 | | +--:(meter-action-drop) 423 | | +--rw drop-cfg 424 | | +--rw drop-action? empty 425 | +--rw conform-color 426 | | +--rw classifier-entry-name? string 427 | | +--rw classifier-entry-descr? string 428 | | +--rw classifier-entry-filter-operation? 429 identityref 430 | +--rw exceed-action 431 | | +--rw meter-action-type? identityref 432 | | +--rw (val)? 433 | | +--:(meter-action-dscp-mark) 434 | | | +--rw dscp-cfg 435 | | | +--rw dscp? inet:dscp 436 | | +--:(meter-action-drop) 437 | | +--rw drop-cfg 438 | | +--rw drop-action? empty 439 | +--rw exceed-color 440 | | +--rw classifier-entry-name? string 441 | | +--rw classifier-entry-descr? string 442 | | +--rw classifier-entry-filter-operation? 443 identityref 444 | +--rw violate-action 445 | | +--rw meter-action-type? identityref 446 | | +--rw (val)? 447 | | +--:(meter-action-dscp-mark) 448 | | | +--rw dscp-cfg 449 | | | +--rw dscp? inet:dscp 450 | | +--:(meter-action-drop) 451 | | +--rw drop-cfg 452 | | +--rw drop-action? empty 453 | +--rw violate-color 454 | +--rw classifier-entry-name? string 455 | +--rw classifier-entry-descr? string 456 | +--rw classifier-entry-filter-operation? 457 identityref 458 +--:(trtcm) 459 | +--rw trtcm 460 | +--rw committed-rate? uint64 461 | +--rw committed-burst? uint64 462 | +--rw peak-rate? uint64 463 | +--rw peak-burst? uint64 464 | +--rw conform-action 465 | | +--rw meter-action-type? identityref 466 | | +--rw (val)? 467 | | +--:(meter-action-dscp-mark) 468 | | | +--rw dscp-cfg 469 | | | +--rw dscp? inet:dscp 470 | | +--:(meter-action-drop) 471 | | +--rw drop-cfg 472 | | +--rw drop-action? empty 473 | +--rw conform-color 474 | | +--rw classifier-entry-name? string 475 | | +--rw classifier-entry-descr? string 476 | | +--rw classifier-entry-filter-operation? 477 identityref 478 | +--rw exceed-action 479 | | +--rw meter-action-type? identityref 480 | | +--rw (val)? 481 | | +--:(meter-action-dscp-mark) 482 | | | +--rw dscp-cfg 483 | | | +--rw dscp? inet:dscp 484 | | +--:(meter-action-drop) 485 | | +--rw drop-cfg 486 | | +--rw drop-action? empty 487 | +--rw exceed-color 488 | | +--rw classifier-entry-name? string 489 | | +--rw classifier-entry-descr? string 490 | | +--rw classifier-entry-filter-operation? 491 identityref 492 | +--rw violate-action 493 | | +--rw meter-action-type? identityref 494 | | +--rw (val)? 495 | | +--:(meter-action-dscp-mark) 496 | | | +--rw dscp-cfg 497 | | | +--rw dscp? inet:dscp 498 | | +--:(meter-action-drop) 499 | | +--rw drop-cfg 500 | | +--rw drop-action? empty 501 | +--rw violate-color 502 | +--rw classifier-entry-name? string 503 | +--rw classifier-entry-descr? string 504 | +--rw classifier-entry-filter-operation? 505 identityref 506 +--:(generic-meter) 507 +--rw generic-meter-cfg 508 +--rw meter-list* [meter-id] 509 +--rw meter-id uint16 510 +--rw rate-value? uint64 511 +--rw rate-unit? identityref 512 +--rw (burst-type)? 513 | +--:(size) 514 | | +--rw burst-size? uint64 515 | +--:(interval) 516 | +--rw burst-interval? uint64 517 +--rw color 518 | +--rw classifier-entry-name? string 519 | +--rw classifier-entry-descr? string 520 | +--rw classifier-entry-filter-operation? 521 identityref 522 +--rw succeed-action 523 | +--rw meter-action-type? identityref 524 | +--rw (val)? 525 | | +--:(meter-action-dscp-mark) 526 | | | +--rw dscp-cfg 527 | | | +--rw dscp? inet:dscp 528 | | +--:(meter-action-drop) 529 | | +--rw drop-cfg 530 | | +--rw drop-action? empty 531 | +--rw next-meter-id? uint16 532 +--rw fail-action 533 +--rw meter-action-type? identityref 534 +--rw (val)? 535 | +--:(meter-action-dscp-mark) 536 | | +--rw dscp-cfg 537 | | +--rw dscp? inet:dscp 538 | +--:(meter-action-drop) 539 | +--rw drop-cfg 540 | +--rw drop-action? empty 541 +--rw next-meter-id? uint16 542 augment /if:interfaces/if:interface/target:qos-target-entry 543 /target:qos-target-classifier-statistics: 544 +--ro diffserv-action-statistics 545 +--ro generic-meter-statistics* [meter-id] 546 | +--ro meter-id uint16 547 | +--ro metered-pkts? uint64 548 | +--ro metered-bytes? uint64 549 | +--ro metered-rate? uint64 550 +--ro srtcm-meter-statistics 551 | +--ro conform-pkts? uint64 552 | +--ro conform-bytes? uint64 553 | +--ro conform-rate? uint64 554 | +--ro exceed-pkts? uint64 555 | +--ro exceed-bytes? uint64 556 | +--ro exceed-rate? uint64 557 | +--ro violate-pkts? uint64 558 | +--ro violate-bytes? uint64 559 | +--ro violate-rate? uint64 560 +--ro trtcm-meter-statistics 561 +--ro conform-pkts? uint64 562 +--ro conform-bytes? uint64 563 +--ro conform-rate? uint64 564 +--ro exceed-pkts? uint64 565 +--ro exceed-bytes? uint64 566 +--ro exceed-rate? uint64 567 +--ro violate-pkts? uint64 568 +--ro violate-bytes? uint64 569 +--ro violate-rate? uint64 571 6. Modules 573 6.1. IETF-QOS-CLASSIFIER 575 file "ietf-qos-classifier@2016-03-03.yang" 577 module ietf-qos-classifier { 578 yang-version 1; 579 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-classifier"; 580 prefix classifier; 582 import ietf-inet-types { 583 prefix inet; 584 } 586 organization "IETF NETMOD (Netmod Working Group) Working Group"; 587 contact 588 "WG Web: 589 WG List: 591 WG Chair: Jurgen Schonwalder 592 594 WG Chair: Lou Berger 595 597 WG Chair: Kent Watsen 598 600 Editor: Aseem Choudhary 601 603 Editor: Mahesh Jethanandani 604 "; 606 description 607 "This module contains a collection of YANG definitions for 608 configuring qos specification implementations. 610 Copyright (c) 2014 IETF Trust and the persons identified as 611 authors of the code. All rights reserved. 613 Redistribution and use in source and binary forms, with or 614 without modification, is permitted pursuant to, and subject 615 to the license terms contained in, the Simplified BSD License 616 set forth in Section 4.c of the IETF Trust's Legal Provisions 617 Relating to IETF Documents 618 (http://trustee.ietf.org/license-info). 620 This version of this YANG module is part of RFC XXXX; see 621 the RFC itself for full legal notices."; 623 revision 2016-03-03 { 624 description 625 "Latest revision of qos base classifier module"; 626 reference "RFC XXXX"; 627 } 629 feature policy-inline-classifier-config { 630 description 631 " This feature allows classifier configuration 632 directly under policy."; 633 } 635 identity filter-type { 636 description 637 "This is identity of base filter-type"; 638 } 640 identity dscp { 641 base filter-type; 642 description 643 "Differentiated services code point filter-type"; 644 } 646 identity source-ip-address { 647 base filter-type; 648 description 649 "source ipv4 and ipv6 address filter-type"; 650 } 652 identity destination-ip-address { 653 base filter-type; 654 description 655 "destination ipv4 and ipv6 address filter-type"; 656 } 658 identity source-port { 659 base filter-type; 660 description 661 "source port filter-type"; 662 } 663 identity destination-port { 664 base filter-type; 665 description 666 "destination port filter-type"; 667 } 669 identity protocol { 670 base filter-type; 671 description 672 "protocol type filter-type"; 673 } 675 identity classifier-entry-filter-operation-type { 676 description 677 "Classifier entry filter logical operation"; 678 } 680 identity match-any-filter { 681 base classifier-entry-filter-operation-type; 682 description 683 "Classifier entry filter logical OR operation"; 684 } 686 identity match-all-filter { 687 base classifier-entry-filter-operation-type; 688 description 689 "Classifier entry filter logical AND operation"; 690 } 692 grouping dscp-cfg { 693 list dscp-cfg { 694 key "dscp-min dscp-max"; 695 description 696 "list of dscp ranges"; 697 leaf dscp-min { 698 type inet:dscp; 699 description 700 "Minimum value of dscp min-max range"; 701 } 702 leaf dscp-max { 703 type inet:dscp; 704 description 705 "maximum value of dscp min-max range"; 706 } 707 } 708 description 709 "Filter grouping containing list of dscp ranges"; 710 } 711 grouping source-ip-address-cfg { 712 list source-ip-address-cfg { 713 key "source-ip-addr"; 714 description 715 "list of source ipv4 or ipv6 address"; 716 leaf source-ip-addr { 717 type inet:ip-prefix; 718 description 719 "source ipv4 or ipv6 prefix"; 720 } 721 } 722 description 723 "Filter grouping containing list of source ip addresses"; 724 } 726 grouping destination-ip-address-cfg { 727 list destination-ip-address-cfg { 728 key "destination-ip-addr"; 729 description 730 "list of destination ipv4 or ipv6 address"; 731 leaf destination-ip-addr { 732 type inet:ip-prefix; 733 description 734 "destination ipv4 or ipv6 prefix"; 735 } 736 } 737 description 738 "Filter grouping containing list of destination ip address"; 739 } 741 grouping source-port-cfg { 742 list source-port-cfg { 743 key "source-port-min source-port-max"; 744 description 745 "list of ranges of source port"; 746 leaf source-port-min { 747 type inet:port-number; 748 description 749 "minimum value of source port range"; 750 } 751 leaf source-port-max { 752 type inet:port-number; 753 description 754 "maximum value of source port range"; 755 } 756 } 757 description 758 "Filter grouping containing list of source port ranges"; 760 } 762 grouping destination-port-cfg { 763 list destination-port-cfg { 764 key "destination-port-min destination-port-max"; 765 description 766 "list of ranges of destination port"; 767 leaf destination-port-min { 768 type inet:port-number; 769 description 770 "minimum value of destination port range"; 771 } 772 leaf destination-port-max { 773 type inet:port-number; 774 description 775 "maximum value of destination port range"; 776 } 777 } 778 description 779 "Filter grouping containing list of destination port ranges"; 780 } 782 grouping protocol-cfg { 783 list protocol-cfg { 784 key "protocol-min protocol-max"; 785 description 786 "list of ranges of protocol values"; 787 leaf protocol-min { 788 type uint8 { 789 range "0..255"; 790 } 791 description 792 "minimum value of protocol range"; 793 } 794 leaf protocol-max { 795 type uint8 { 796 range "0..255"; 797 } 798 description 799 "maximum value of protocol range"; 800 } 801 } 802 description 803 "Filter grouping containing list of Protocol ranges"; 804 } 806 grouping filters { 807 description 808 "Filters types in a Classifier entry"; 809 leaf filter-type { 810 type identityref { 811 base filter-type; 812 } 813 description 814 "This leaf defines type of the filter"; 815 } 816 leaf filter-logical-not { 817 type boolean; 818 description 819 " 820 This is logical-not operator for a filter. When true, it 821 indicates filter looks for absence of a pattern defined 822 by the filter 823 "; 824 } 825 } 827 grouping classifier-entry-generic-attr { 828 description 829 " 830 Classifier generic attributes like name, 831 description, operation type 832 "; 833 leaf classifier-entry-name { 834 type string; 835 description 836 "classifier entry name"; 837 } 838 leaf classifier-entry-descr { 839 type string; 840 description 841 "classifier entry description statement"; 842 } 843 leaf classifier-entry-filter-operation { 844 type identityref { 845 base classifier-entry-filter-operation-type; 846 } 847 default "match-any-filter"; 848 description 849 "Filters are applicable as match-any or match-all filters"; 850 } 851 } 853 grouping classifier-entry-inline-attr { 854 description 855 "attributes of inline classifier in a policy"; 857 leaf classifier-entry-inline { 858 type boolean; 859 default "false"; 860 description 861 "Indication of inline classifier entry"; 862 } 863 leaf classifier-entry-filter-oper { 864 type identityref { 865 base classifier-entry-filter-operation-type; 866 } 867 default "match-all-filter"; 868 description 869 "Filters are applicable as match-any or match-all filters"; 870 } 871 list filter-entry { 872 if-feature policy-inline-classifier-config; 873 must "classifier-entry-inline == true" { 874 description 875 "For inline filter configuration, inline attribute 876 must be true"; 877 } 878 key "filter-type filter-logical-not"; 879 uses filters; 880 description 881 "Filters configured inline in a policy"; 882 } 883 } 885 container classifiers { 886 description 887 "list of classifier entry"; 888 list classifier-entry { 889 key "classifier-entry-name"; 890 description 891 "each classifier entry contains a list of filters"; 892 uses classifier-entry-generic-attr; 893 list filter-entry { 894 key "filter-type filter-logical-not"; 895 uses filters; 896 description 897 "Filter entry configuration"; 898 } 899 } 900 } 901 } 903 905 6.2. IETF-QOS-POLICY 907 file "ietf-qos-policy@2016-03-03.yang" 909 module ietf-qos-policy { 910 yang-version 1; 911 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-policy"; 912 prefix policy; 914 import ietf-qos-classifier { 915 prefix classifier; 916 } 918 organization "IETF NETMOD (Netmod Working Group) Working Group"; 919 contact 920 "WG Web: 921 WG List: 923 WG Chair: Jurgen Schonwalder 924 926 WG Chair: Lou Berger 927 929 WG Chair: Kent Watsen 930 932 Editor: Aseem Choudhary 933 935 Editor: Mahesh Jethanandani 936 "; 938 description 939 "This module contains a collection of YANG definitions for 940 configuring qos specification implementations. 942 Copyright (c) 2014 IETF Trust and the persons identified as 943 authors of the code. All rights reserved. 945 Redistribution and use in source and binary forms, with or 946 without modification, is permitted pursuant to, and subject 947 to the license terms contained in, the Simplified BSD License 948 set forth in Section 4.c of the IETF Trust's Legal Provisions 949 Relating to IETF Documents 950 (http://trustee.ietf.org/license-info). 951 This version of this YANG module is part of RFC XXXX; see 952 the RFC itself for full legal notices."; 954 revision 2016-03-03 { 955 description 956 "Latest revision of qos policy"; 957 reference "RFC XXXX"; 958 } 960 identity policy-type { 961 description 962 "This base identity type defines policy-types"; 963 } 965 grouping policy-generic-attr { 966 description 967 "Policy Attributes"; 968 leaf policy-name { 969 type string; 970 description 971 "policy name"; 972 } 973 leaf policy-type { 974 type identityref { 975 base policy-type; 976 } 977 description 978 "policy type"; 979 } 980 leaf policy-descr { 981 type string; 982 description 983 "policy description"; 984 } 985 } 987 identity action-type { 988 description 989 "This base identity type defines action-types"; 990 } 992 grouping classifier-action-entry-cfg { 993 description 994 "List of Configuration of classifier & associated actions"; 995 list classifier-action-entry-cfg { 996 key "action-type"; 997 ordered-by user; 998 description 999 "Configuration of classifier & associated actions"; 1000 leaf action-type { 1001 type identityref { 1002 base action-type; 1003 } 1004 description 1005 "This defines action type "; 1006 } 1007 choice action-cfg-params { 1008 description 1009 "Choice of action types"; 1010 } 1011 } 1012 } 1014 container policies { 1015 description 1016 "list of policy templates"; 1017 list policy-entry { 1018 key "policy-name policy-type"; 1019 description 1020 "policy template"; 1021 uses policy-generic-attr; 1022 list classifier-entry { 1023 key "classifier-entry-name"; 1024 ordered-by user; 1025 description 1026 "Classifier entry configuration in a policy"; 1027 leaf classifier-entry-name { 1028 type string; 1029 description 1030 "classifier entry name"; 1031 } 1032 uses classifier:classifier-entry-inline-attr; 1033 uses classifier-action-entry-cfg; 1034 } 1035 } 1036 } 1037 } 1039 1041 6.3. IETF-QOS-ACTION 1043 file "ietf-qos-action@2016-03-03.yang" 1044 module ietf-qos-action { 1045 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-action"; 1046 prefix action; 1048 import ietf-inet-types { 1049 prefix inet; 1050 } 1051 import ietf-qos-classifier { 1052 prefix classifier; 1053 } 1054 import ietf-qos-policy { 1055 prefix policy; 1056 } 1058 organization "IETF NETMOD (Netmod Working Group) Working Group"; 1059 contact 1060 "WG Web: 1061 WG List: 1063 WG Chair: Jurgen Schonwalder 1064 1066 WG Chair: Lou Berger 1067 1069 WG Chair: Kent Watsen 1070 1072 Editor: Aseem Choudhary 1073 1075 Editor: Mahesh Jethanandani 1076 "; 1078 description 1079 "This module contains a collection of YANG definitions for 1080 configuring qos specification implementations. 1082 Copyright (c) 2014 IETF Trust and the persons identified as 1083 authors of the code. All rights reserved. 1085 Redistribution and use in source and binary forms, with or 1086 without modification, is permitted pursuant to, and subject 1087 to the license terms contained in, the Simplified BSD License 1088 set forth in Section 4.c of the IETF Trust's Legal Provisions 1089 Relating to IETF Documents 1090 (http://trustee.ietf.org/license-info). 1091 This version of this YANG module is part of RFC XXXX; see 1092 the RFC itself for full legal notices."; 1094 revision 2016-03-03 { 1095 description 1096 "Latest revision for qos actions"; 1097 reference "RFC XXXX"; 1098 } 1100 feature meter-template-support { 1101 description 1102 " This feature allows support of meter-template."; 1103 } 1105 grouping burst { 1106 description 1107 "burst size or interval configuration"; 1108 choice burst-type { 1109 case size { 1110 leaf burst-size { 1111 type uint64; 1112 units "bytes"; 1113 description 1114 "burst size"; 1115 } 1116 } 1117 case interval { 1118 leaf burst-interval { 1119 type uint64; 1120 units "microsecond"; 1121 description 1122 "burst interval"; 1123 } 1124 } 1125 description 1126 "Choice of burst type"; 1127 } 1128 } 1130 grouping threshold { 1131 description 1132 "Threshold Parameters"; 1133 container threshold { 1134 description 1135 "threshold"; 1136 choice threshold-type { 1137 case size { 1138 leaf threshold-size { 1139 type uint64; 1140 units "bytes"; 1141 description 1142 "Threshold size"; 1143 } 1144 } 1145 case interval { 1146 leaf threshold-interval { 1147 type uint64; 1148 units "microsecond"; 1149 description 1150 "Threshold interval"; 1151 } 1152 } 1153 description 1154 "Choice of threshold type"; 1155 } 1156 } 1157 } 1159 identity rate-unit-type { 1160 description 1161 "base rate-unit type"; 1162 } 1164 identity bits-per-second { 1165 base rate-unit-type; 1166 description 1167 "bits per second identity"; 1168 } 1170 identity kilo-bits-per-second { 1171 base rate-unit-type; 1172 description 1173 "kilo bits per second identity"; 1174 } 1176 identity mega-bits-per-second { 1177 base rate-unit-type; 1178 description 1179 "mega bits per second identity"; 1180 } 1182 identity giga-bits-per-second { 1183 base rate-unit-type; 1184 description 1185 "mega bits per second identity"; 1186 } 1187 identity percent { 1188 base rate-unit-type; 1189 description 1190 "percentage"; 1191 } 1193 grouping rate-value-unit { 1194 leaf rate-value { 1195 type uint64; 1196 description 1197 "rate value"; 1198 } 1199 leaf rate-unit { 1200 type identityref { 1201 base rate-unit-type; 1202 } 1203 description 1204 "rate unit"; 1205 } 1206 description 1207 "rate value and unit grouping"; 1208 } 1210 identity queue { 1211 base policy:action-type; 1212 description 1213 "queue action type"; 1214 } 1216 identity dscp-marking { 1217 base policy:action-type; 1218 description 1219 "dscp marking action type"; 1220 } 1222 identity meter { 1223 base policy:action-type; 1224 description 1225 "meter action type"; 1226 } 1228 identity srtcm-meter { 1229 base policy:action-type; 1230 description 1231 "single rate three color meter action type"; 1232 } 1234 identity trtcm-meter { 1235 base policy:action-type; 1236 description 1237 "two rate three color meter action type"; 1238 } 1240 identity schedular { 1241 base policy:action-type; 1242 description 1243 "schedular action type"; 1244 } 1246 identity always-drop { 1247 base policy:action-type; 1248 description 1249 "always drop algorithm"; 1250 } 1252 identity tail-drop { 1253 base policy:action-type; 1254 description 1255 "tail drop algorithm"; 1256 } 1258 identity random-detect { 1259 base policy:action-type; 1260 description 1261 "random detect algorithm"; 1262 } 1264 identity meter-action-type { 1265 description 1266 "action type in a meter"; 1267 } 1269 identity meter-action-drop { 1270 base meter-action-type; 1271 description 1272 "drop action type in a meter"; 1273 } 1275 identity meter-action-dscp-set { 1276 base meter-action-type; 1277 description 1278 "dscp mark action type in a meter"; 1279 } 1281 grouping drop { 1282 container drop-cfg { 1283 leaf drop-action { 1284 type empty; 1285 description 1286 "always drop algorithm"; 1287 } 1288 description 1289 "the drop action"; 1290 } 1291 description 1292 "always drop grouping"; 1293 } 1295 grouping queuelimit { 1296 container qlimit-thresh { 1297 uses threshold; 1298 description 1299 "the queue limit"; 1300 } 1301 description 1302 "the queue limit beyond which queue will not hold any packet"; 1303 } 1305 grouping meter-action-params { 1306 leaf meter-action-type { 1307 type identityref { 1308 base meter-action-type; 1309 } 1310 description 1311 "meter action type"; 1312 } 1313 choice val { 1314 case meter-action-dscp-mark { 1315 uses dscp-marking; 1316 description 1317 "meter action: mark"; 1318 } 1319 case meter-action-drop { 1320 description 1321 "meter action: drop"; 1322 uses drop; 1323 } 1324 description 1325 " meter action based on choice of meter action type"; 1326 } 1327 description 1328 "meter action parameters"; 1329 } 1330 grouping generic-meter { 1331 leaf meter-id { 1332 type uint16; 1333 description 1334 "meter identifier"; 1335 } 1336 uses rate-value-unit; 1337 uses burst; 1338 container color { 1339 uses classifier:classifier-entry-generic-attr; 1340 description 1341 "color aware & color blind attributes container"; 1342 } 1343 container succeed-action { 1344 uses meter-action-params; 1345 leaf next-meter-id { 1346 type uint16; 1347 description 1348 "next meter identifier"; 1349 } 1350 description 1351 "confirm action"; 1352 } 1353 container fail-action { 1354 uses meter-action-params; 1355 leaf next-meter-id { 1356 type uint16; 1357 description 1358 "next meter identifier"; 1359 } 1360 description 1361 "exceed action"; 1362 } 1363 description 1364 "meter attributes"; 1365 } 1367 grouping one-rate-tri-color-meter { 1368 container srtcm { 1369 leaf committed-rate { 1370 type uint64; 1371 units "bits-per-second"; 1372 description 1373 "committed meter rate"; 1374 } 1375 leaf committed-burst { 1376 type uint64; 1377 units "byes"; 1378 description 1379 "commited burst size"; 1380 } 1381 leaf excess-burst { 1382 type uint64; 1383 units "byes"; 1384 description 1385 "excess burst size"; 1386 } 1387 container conform-action { 1388 uses meter-action-params; 1389 description 1390 "conform action"; 1391 } 1392 container conform-color { 1393 uses classifier:classifier-entry-generic-attr; 1394 description 1395 "color aware & color blind attributes container"; 1396 } 1397 container exceed-action { 1398 uses meter-action-params; 1399 description 1400 "exceed action"; 1401 } 1402 container exceed-color { 1403 uses classifier:classifier-entry-generic-attr; 1404 description 1405 "color aware & color blind attributes container"; 1406 } 1407 container violate-action { 1408 uses meter-action-params; 1409 description 1410 "violate action"; 1411 } 1412 container violate-color { 1413 uses classifier:classifier-entry-generic-attr; 1414 description 1415 "color aware & color blind attributes container"; 1416 } 1417 description 1418 "one-rate-tri-color-meter attributes"; 1419 } 1420 description 1421 "one-rate-tri-color-meter grouping"; 1422 } 1424 grouping two-rate-tri-color-meter { 1425 container trtcm { 1426 leaf committed-rate { 1427 type uint64; 1428 units "bits-per-second"; 1429 description 1430 "committed meter rate"; 1431 } 1432 leaf committed-burst { 1433 type uint64; 1434 units "byes"; 1435 description 1436 "commited burst size"; 1437 } 1438 leaf peak-rate { 1439 type uint64; 1440 units "bits-per-second"; 1441 description 1442 "peak meter rate"; 1443 } 1444 leaf peak-burst { 1445 type uint64; 1446 units "byes"; 1447 description 1448 "peak burst size"; 1449 } 1450 container conform-action { 1451 uses meter-action-params; 1452 description 1453 "conform action"; 1454 } 1455 container conform-color { 1456 uses classifier:classifier-entry-generic-attr; 1457 description 1458 "color aware & color blind attributes container"; 1459 } 1460 container exceed-action { 1461 uses meter-action-params; 1462 description 1463 "exceed action"; 1464 } 1465 container exceed-color { 1466 uses classifier:classifier-entry-generic-attr; 1467 description 1468 "color aware & color blind attributes container"; 1469 } 1470 container violate-action { 1471 uses meter-action-params; 1472 description 1473 "violate action"; 1475 } 1476 container violate-color { 1477 uses classifier:classifier-entry-generic-attr; 1478 description 1479 "color aware & color blind attributes container"; 1480 } 1481 description 1482 "two-rate-tri-color-meter attributes"; 1483 } 1484 description 1485 "two-rate-tri-color-meter grouping"; 1486 } 1488 grouping priority { 1489 container priority-cfg { 1490 leaf priority-level { 1491 type uint8; 1492 description 1493 "priority level"; 1494 } 1495 description 1496 "priority attributes"; 1497 } 1498 description 1499 "priority attributes grouping"; 1500 } 1502 grouping min-rate { 1503 container min-rate-cfg { 1504 uses rate-value-unit; 1505 description 1506 "min guaranteed bandwidth"; 1507 } 1508 description 1509 "minimum rate grouping"; 1510 } 1512 grouping dscp-marking { 1513 container dscp-cfg { 1514 leaf dscp { 1515 type inet:dscp; 1516 description 1517 "dscp marking"; 1518 } 1519 description 1520 "dscp marking container"; 1521 } 1522 description 1523 "dscp marking grouping"; 1524 } 1526 grouping max-rate { 1527 container max-rate-cfg { 1528 uses rate-value-unit; 1529 uses burst; 1530 description 1531 "maximum rate attributes container"; 1532 } 1533 description 1534 "maximum rate attributes"; 1535 } 1537 grouping queue { 1538 container queue-cfg { 1539 uses priority; 1540 uses min-rate; 1541 uses max-rate; 1542 container algorithmic-drop-cfg { 1543 choice drop-algorithm { 1544 case always-drop { 1545 uses drop; 1546 description 1547 "Always Drop configuration container"; 1548 } 1549 case tail-drop { 1550 container tail-drop-cfg { 1551 uses queuelimit; 1552 description 1553 "Tail Drop configuration container"; 1554 } 1555 } 1556 description 1557 "Choice of Drop Algorithm"; 1558 } 1559 description 1560 "Algorithmic Drop configuration container"; 1561 } 1562 description 1563 "Queue configuration container"; 1564 } 1565 description 1566 "Queue configuration grouping"; 1567 } 1569 grouping schedular { 1570 container schedular-cfg { 1571 uses min-rate; 1572 uses max-rate; 1573 description 1574 "Schedular configuration container"; 1575 } 1576 description 1577 "Schedular configuration grouping"; 1578 } 1580 grouping generic-metering { 1581 container generic-meter-cfg { 1582 list meter-list { 1583 key "meter-id"; 1584 uses generic-meter; 1585 description 1586 "Generic Meter configuration"; 1587 } 1588 description 1589 "Generic Meter list configuration container"; 1590 } 1591 description 1592 "Generic Meter configuration container grouping"; 1593 } 1595 grouping metering { 1596 choice meter-type { 1597 case srtcm { 1598 uses one-rate-tri-color-meter; 1599 description 1600 "one rate tri-color meter"; 1601 } 1602 case trtcm { 1603 uses two-rate-tri-color-meter; 1604 description 1605 "two rate tri-color meter"; 1606 } 1607 case generic-meter { 1608 uses generic-metering; 1609 description 1610 "generic meter"; 1611 } 1612 description 1613 " meter action based on choice of meter action type"; 1614 } 1615 description 1616 "meter attributes"; 1617 } 1618 container meter-template { 1619 if-feature meter-template-support; 1620 description 1621 "list of meter-entry templates"; 1622 list meter-entry { 1623 key "meter-name"; 1624 description 1625 "meter entry template"; 1626 leaf meter-name { 1627 type string; 1628 description 1629 "basic meter identifier"; 1630 } 1631 uses metering; 1632 } 1633 } 1634 } 1635 1637 6.4. IETF-QOS-TARGET 1639 file "ietf-qos-target@2016-03-03.yang" 1641 module ietf-qos-target { 1642 yang-version 1; 1643 namespace "urn:ietf:params:xml:ns:yang:ietf-qos-target"; 1644 prefix target; 1646 import ietf-interfaces { 1647 prefix if; 1648 } 1649 import ietf-qos-policy { 1650 prefix policy; 1651 } 1653 organization "IETF NETMOD (Netmod Working Group) Working Group"; 1654 contact 1655 "WG Web: 1656 WG List: 1658 WG Chair: Jurgen Schonwalder 1659 1661 WG Chair: Lou Berger 1662 1664 WG Chair: Kent Watsen 1665 1667 Editor: Aseem Choudhary 1668 1670 Editor: Mahesh Jethanandani 1671 1948 6.5. IETF-DIFFSERV 1950 file "ietf-diffserv@2016-03-03.yang" 1952 module ietf-diffserv { 1953 yang-version 1; 1954 namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv"; 1955 prefix diffserv; 1957 import ietf-interfaces { 1958 prefix if; 1959 } 1960 import ietf-qos-classifier { 1961 prefix classifier; 1962 } 1963 import ietf-qos-policy { 1964 prefix policy; 1965 } 1966 import ietf-qos-action { 1967 prefix action; 1968 } 1969 import ietf-qos-target { 1970 prefix target; 1971 } 1973 organization "IETF NETMOD (Netmod Working Group) Working Group"; 1974 contact 1975 "WG Web: 1976 WG List: 1978 WG Chair: Jurgen Schonwalder 1979 1981 WG Chair: Lou Berger 1982 1984 WG Chair: Kent Watsen 1985 1987 Editor: Aseem Choudhary 1988 1990 Editor: Mahesh Jethanandani 1991 2085 7. Security Considerations 2086 8. Acknowledgement 2088 The editors of this document wishes to thank Fred Baker for 2089 overviewing the document and provide useful comments, Andrew Mao for 2090 the guidance and support, Fred Yip and Aleksandr Zhdankin for helpful 2091 suggestions and contributions. 2093 9. References 2095 9.1. Normative References 2097 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2098 Requirement Levels", BCP 14, RFC 2119, 2099 DOI 10.17487/RFC2119, March 1997, 2100 . 2102 [RFC2697] Heinanen, J. and R. Guerin, "A Single Rate Three Color 2103 Marker", RFC 2697, DOI 10.17487/RFC2697, September 1999, 2104 . 2106 [RFC2698] Heinanen, J. and R. Guerin, "A Two Rate Three Color 2107 Marker", RFC 2698, DOI 10.17487/RFC2698, September 1999, 2108 . 2110 [RFC3289] Baker, F., Chan, K., and A. Smith, "Management Information 2111 Base for the Differentiated Services Architecture", 2112 RFC 3289, DOI 10.17487/RFC3289, May 2002, 2113 . 2115 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2116 the Network Configuration Protocol (NETCONF)", RFC 6020, 2117 DOI 10.17487/RFC6020, October 2010, 2118 . 2120 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2121 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2122 . 2124 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 2125 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 2126 . 2128 9.2. Informative References 2130 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 2131 and W. Weiss, "An Architecture for Differentiated 2132 Services", RFC 2475, DOI 10.17487/RFC2475, December 1998, 2133 . 2135 Appendix A. Open Items 2137 The current model represents hierarchical QoS with leaf and non-leaf 2138 nodes in a scheduling hierarchy without any restrictions of actions, 2139 such as AQM. Normally, that should not be allowed at non-leaf nodes. 2140 This will be addressed in a subsequent revision. 2142 Appendix B. Company A example 2144 Company A Diffserv module augments all the filter types of the QoS 2145 classifier module as well as the QoS policy module that allow it to 2146 define marking, metering, min-rate, max-rate actions. Queuing and 2147 metering counters are realized by augmenting of the QoS target 2148 module. 2150 B.1. EXAMPLE-COMPA-DIFFSERV 2152 module example-compa-diffserv { 2153 namespace "urn:ietf:params:xml:ns:yang:example-compa-diffserv"; 2154 prefix example; 2156 import ietf-interfaces { 2157 prefix if; 2158 } 2159 import ietf-qos-classifier { 2160 prefix classifier; 2161 } 2162 import ietf-qos-policy { 2163 prefix policy; 2164 } 2165 import ietf-qos-action { 2166 prefix action; 2167 } 2168 import ietf-qos-target { 2169 prefix target; 2170 } 2171 import ietf-diffserv { 2172 prefix diffserv; 2173 } 2175 organization "Company A"; 2176 contact 2177 "Editor: XYZ 2178 "; 2179 description 2180 "This module contains a collection of YANG definitions of 2181 companyA diffserv specification extension."; 2183 revision 2016-03-03 { 2184 description 2185 "Initial revision for diffserv actions on network packets"; 2186 reference 2187 "RFC 6020: YANG - A Data Modeling Language for the 2188 Network Configuration Protocol (NETCONF)"; 2189 } 2191 identity default-policy-type { 2192 base policy:policy-type; 2193 description 2194 "This defines default policy-type"; 2195 } 2197 identity min-rate { 2198 base policy:action-type; 2199 description 2200 "min-rate action type"; 2201 } 2203 identity max-rate { 2204 base policy:action-type; 2205 description 2206 "max-rate action type"; 2207 } 2209 identity child-policy { 2210 base policy:action-type; 2211 description 2212 "child-policy action type"; 2213 } 2215 identity qos-group { 2216 base classifier:filter-type; 2217 description 2218 "qos-group filter-type"; 2219 } 2221 grouping qos-group-cfg { 2222 list qos-group-cfg { 2223 key "qos-group-min qos-group-max"; 2224 description 2225 "list of dscp ranges"; 2226 leaf qos-group-min { 2227 type uint8; 2228 description 2229 "Minimum value of qos-group range"; 2230 } 2231 leaf qos-group-max { 2232 type uint8; 2233 description 2234 "maximum value of qos-group range"; 2235 } 2236 } 2237 description 2238 "Filter containing list of qos-group ranges"; 2239 } 2241 grouping wred-threshold { 2242 container wred-min-thresh { 2243 uses action:threshold; 2244 description 2245 "Minimum threshold"; 2246 } 2247 container wred-max-thresh { 2248 uses action:threshold; 2249 description 2250 "Maximum threshold"; 2251 } 2252 leaf mark-probability { 2253 type uint32 { 2254 range "1..1000"; 2255 } 2256 description 2257 "Mark probability"; 2258 } 2259 description 2260 "WRED threshold attributes"; 2261 } 2263 grouping randomdetect { 2264 leaf exp-weighting-const { 2265 type uint32; 2266 description 2267 "Exponential weighting constant factor for wred profile "; 2268 } 2269 uses wred-threshold; 2270 description 2271 "Random detect attributes"; 2272 } 2274 augment "/classifier:classifiers/classifier:classifier-entry/" + 2275 "classifier:filter-entry/diffserv:filter-param" { 2276 case qos-group { 2277 uses qos-group-cfg; 2278 description 2279 "Filter containing list of qos-group ranges. 2280 Qos-group represent packet metadata information 2281 in a device. "; 2282 } 2283 description 2284 "augmentation of classifier filters"; 2285 } 2286 augment "/policy:policies/policy:policy-entry/" + 2287 "policy:classifier-entry/" + 2288 "policy:classifier-action-entry-cfg/" + 2289 "diffserv:action-cfg-params" { 2290 case priority { 2291 uses action:priority; 2292 } 2293 case min-rate { 2294 uses action:min-rate; 2295 } 2296 case max-rate { 2297 uses action:max-rate; 2298 } 2299 case random-detect { 2300 uses randomdetect; 2301 } 2302 case child-policy { 2303 leaf child-policy { 2304 type leafref { 2305 path "/policy:policies/policy:policy-entry/" + 2306 "policy:policy-name"; 2307 } 2308 description 2309 "Child Policy in the hierarchial configuration"; 2310 } 2311 } 2312 description 2313 "Augment the actions to policy entry"; 2314 } 2315 augment "/if:interfaces/if:interface/target:qos-target-entry/" + 2316 "target:qos-target-classifier-statistics/" + 2317 "diffserv:diffserv-action-statistics" { 2318 uses target:queuing-stats; 2319 description 2320 "Augment the statistics to policy entry"; 2321 } 2322 augment "/if:interfaces/if:interface/target:qos-target-entry/" + 2323 "target:qos-target-classifier-statistics" { 2324 leaf relative-path { 2325 type string; 2326 description 2327 "Relative Path of the classifier entry in the 2328 hierarchial policy"; 2329 } 2330 description 2331 "Augment the statistics to policy entry"; 2332 } 2333 } 2335 Authors' Addresses 2337 Aseem Choudhary 2338 Cisco Systems 2339 170 W. Tasman Drive 2340 San Jose, CA 95134 2341 US 2343 Email: asechoud@cisco.com 2345 Mahesh Jethanandani 2346 Cisco Systems 2347 170 W. Tasman Drive 2348 San Jose, CA 95134 2349 US 2351 Email: mjethanandani@gmail.com