idnits 2.17.1 draft-asechoud-netmod-diffserv-model-03.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 36 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 188 has weird spacing: '...scp-min ine...' == Line 189 has weird spacing: '...scp-max ine...' == Line 192 has weird spacing: '...ip-addr ine...' == Line 196 has weird spacing: '...ip-addr ine...' == Line 200 has weird spacing: '...ort-min ine...' == (15 more instances...) -- The document date (June 24, 2015) is 3227 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 ** Downref: Normative reference to an Experimental RFC: RFC 2859 ** Downref: Normative reference to an Informational RFC: RFC 3260 ** Obsolete normative reference: RFC 7223 (Obsoleted by RFC 8343) Summary: 6 errors (**), 0 flaws (~~), 8 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 S. Shah 4 Intended status: Standards Track Cisco Systems 5 Expires: December 26, 2015 M. Jethanandani 6 Ciena Corporation 7 Y. Yan 8 B. Liu 9 Huawei Technologies 10 N. Strahle 11 Juniper Networks 12 June 24, 2015 14 YANG Model for Diffserv 15 draft-asechoud-netmod-diffserv-model-03 17 Abstract 19 This document describes a YANG model of Differentiated Services for 20 configuration and operations. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on December 26, 2015. 39 Copyright Notice 41 Copyright (c) 2015 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 3. Diffserv Model Design . . . . . . . . . . . . . . . . . . . . 3 59 4. Diffserv Model . . . . . . . . . . . . . . . . . . . . . . . 4 60 5. Diffserv Modules . . . . . . . . . . . . . . . . . . . . . . 9 61 5.1. IETF-DIFFSERV-CLASSIFIER . . . . . . . . . . . . . . . . 9 62 5.2. IETF-DIFFSERV-POLICY . . . . . . . . . . . . . . . . . . 16 63 5.3. IETF-DIFFSERV-ACTION . . . . . . . . . . . . . . . . . . 19 64 5.4. IETF-DIFFSERV-TARGET . . . . . . . . . . . . . . . . . . 28 65 6. Security Considerations . . . . . . . . . . . . . . . . . . . 34 66 7. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 34 67 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 68 8.1. Normative References . . . . . . . . . . . . . . . . . . 34 69 8.2. Informative References . . . . . . . . . . . . . . . . . 35 70 Appendix A. Open Items . . . . . . . . . . . . . . . . . . . . . 35 71 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 73 1. Introduction 75 This document defines a YANG [RFC6020] data model for the 76 configuration, state data of Differentiated Services. Any RPC or 77 notification definition is not part of this document. As many 78 vendors have different object constructs to represent the same data, 79 it has been tried to design this model in a very flexible, extensible 80 and generic way to fit into most of the vendor requirements. The 81 model is based on Differentiated Services (Diffserv) architecture and 82 various references have been made to already available standard 83 architecture documents. 85 Diffserv is a preferred approach for network service providers to 86 offer services to different customers based on their different kinds 87 of network quality-of-service (QoS) objectives. The traffic streams 88 are differentiated based on Differentiated Services Code Points 89 (DSCP) carried in the IP header of each packet. The DSCP markings 90 are applied by upstream node or by the edge router on entry to the 91 Diffserv network. 93 2. Terminology 95 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 96 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 97 document are to be interpreted as described in [RFC2119]. 99 3. Diffserv Model Design 101 Diffserv architecture [RFC3289] [RFC2475] describes network node 102 packet classification function and packet conditioning functions. 104 The complex classification is done at the edge of network and non- 105 edge network devices conditions appropriately marked aggregate 106 traffic based on per-hop behavior rules. Accordingly, a Multi-Field 107 classifier matches the different fields in a packet and a Behavior 108 Aggregated Classifier matches on DS codepoint field of a packet. 110 Packets MAY be grouped when a logical set of rules are applied on 111 different packet header fields. Also, packet grouping MAY be done 112 based on different values or range of values of same packet header 113 field. Packet grouping MAY also be done based on presence of some 114 values or range of values of a packet field or absence of such values 115 or ranges. This diffserv model is flexible enough to support such 116 logical grouping of packets. 118 A classifier entry can be stored as an object and used across 119 different interfaces for either of inbound or outbound traffic. Any 120 modification or deletion of such object will in turn results in such 121 changes to the classifier on the corresponding interfaces. A 122 classifier entry contains one or more packet conditioning functions. 123 A packet conditioning function is typically based on direction of 124 traffic and may drop, mark or delay network packets. A set of such 125 classifier entries with corresponding conditioning functions when 126 arranged in order of priority represents a diffserv policy. A 127 diffserv policy MAY contain one or more classifier entries. Actions 128 are configured as inline as compared of classifier entry which can be 129 stored as object or configured inline in a diffserv policy. This is 130 mainly because actions generally contain more specific parameters 131 like meter rate, or RED threshold. Any new classifier entry in a 132 policy MAY be inserted before or after any other existing classifier- 133 entry [RFC6020]. Such policies is stored as an object and used 134 across different network device interfaces. 136 A meter qualifies if the traffic arrival rate is based on agreed upon 137 rate and variability. A meter is generically modeled as qualifying 138 rate and variability defined as a token bucket. Single rate meter 139 [RFC2697] can be defined as two such token buckets with first 140 defining the rate and committed burst and excess burst for second 141 bucket. Similarly, two rates meter [RFC2698][RFC2859] can be defined 142 as two such token buckets with first and second defining the 143 committed rate and committed burst parameters and peak rate and peak 144 burst respectively. Different Vendors can extend it to have other 145 types of meters as well. 147 Metered traffic to each token bucket MAY either be marked or remarked 148 appropriately of the diffserv codepoint packet field or even MAY be 149 dropped. Classified packets through a classifier entry MAY directly 150 be marked. 152 Packets can be always dropped if exceed agreed upon rates or it could 153 be queued and then dropped based on any of various algorithms. Queue 154 dropping is based on the threshold configured and can head-drop, 155 tail-drop or dropped based on Active Queue Management algorithm like 156 Random Early Detection (RED). Packets can be scheduled out based on 157 priority with minimum-rate or WFQ with bandwidth sharing. Priority 158 scheduler allow queue to use the entire capacity of the interface 159 unless higher priority traffic is queued to be scheduled. If 160 combination of EF [RFC3246] and multiple AF [RFC3260] classes of 161 traffic needs to be scheduled, a combination of priority and WFQ 162 scheduler SHOULD be used. Traffic can be shaped by defining a max 163 rate and burst for a leaky bucket profile. 165 4. Diffserv Model 167 The model have four YANG modules. ietf-diffserv-classifier consists 168 of classifier entries identified by a classifier entry name. Each 169 such entry contains list of filter entries. When no filter entry is 170 present in a classifier entry, it matches all traffic. Each filter 171 entry represent any of the filter type [RFC6991] of a multi-field 172 classifier which can be logically AND/OR with other filter types in 173 the same classifier-entry. The model is flexible enough to take 174 multiple values of the same filter type. 176 module: ietf-diffserv-classifier 177 +--rw classifiers 178 +--rw classifier-entry* [classifier-entry-name] 179 +--rw classifier-entry-name string 180 +--rw classifier-entry-descr? string 181 +--rw classifier-entry-filter-operation? identityref 182 +--rw filter-entry* [filter-type filter-logical-not] 183 +--rw filter-type identityref 184 +--rw filter-logical-not boolean 185 +--rw (filter-param)? 186 +--:(dscp) 187 | +--rw dscp-cfg* [dscp-min dscp-max] 188 | +--rw dscp-min inet:dscp 189 | +--rw dscp-max inet:dscp 190 +--:(source-ip-address) 191 | +--rw source-ip-address-cfg* [source-ip-addr] 192 | +--rw source-ip-addr inet:ip-prefix 193 +--:(destination-ip-address) 194 | +--rw destination-ip-address-cfg* 195 [destination-ip-addr] 196 | +--rw destination-ip-addr inet:ip-prefix 197 +--:(source-port) 198 | +--rw source-port-cfg* 199 [source-port-min source-port-max] 200 | +--rw source-port-min inet:port-number 201 | +--rw source-port-max inet:port-number 202 +--:(destination-port) 203 | +--rw destination-port-cfg* 204 [destination-port-min destination-port-max] 205 | +--rw destination-port-min inet:port-number 206 | +--rw destination-port-max inet:port-number 207 +--:(protocol) 208 +--rw protocol-cfg* [protocol-min protocol-max] 209 +--rw protocol-min uint8 210 +--rw protocol-max uint8 212 An ietf-diffserv-policy module contains list of policy objects 213 identified by a policy name which MUST be provided. Each policy 214 object contains list of classifier-entries either configured inline 215 or referred as an object. Each such classifier entry is augmented by 216 set of actions. A policy object MAY contain a child-policy in each 217 classifier-entry. A child policy MAY further classify the traffic 218 and execute actions on classified packets. 220 module: ietf-diffserv-policy 221 +--rw policies 222 +--rw policy-entry* [policy-name] 223 +--rw policy-name string 224 +--rw policy-descr? string 225 +--rw classifier-entry* [classifier-entry-name] 226 +--rw classifier-entry-name string 227 +--rw classifier-entry-inline? boolean 228 +--rw classifier-entry-filter-oper? identityref 229 +--rw filter-entry* [filter-type filter-logical-not] 230 {policy-inline-classifier-config}? 231 | +--rw filter-type identityref 232 | +--rw filter-logical-not boolean 233 | +--rw (filter-param)? 234 | +--:(dscp) 235 | | +--rw dscp-cfg* [dscp-min dscp-max] 236 | | +--rw dscp-min inet:dscp 237 | | +--rw dscp-max inet:dscp 238 | +--:(source-ip-address) 239 | | +--rw source-ip-address-cfg* [source-ip-addr] 240 | | +--rw source-ip-addr inet:ip-prefix 241 | +--:(destination-ip-address) 242 | | +--rw destination-ip-address-cfg* 243 [destination-ip-addr] 244 | | +--rw destination-ip-addr inet:ip-prefix 245 | +--:(source-port) 246 | | +--rw source-port-cfg* 247 [source-port-min source-port-max] 248 | | +--rw source-port-min inet:port-number 249 | | +--rw source-port-max inet:port-number 250 | +--:(destination-port) 251 | | +--rw destination-port-cfg* 252 [destination-port-min destination-port-max] 253 | | +--rw destination-port-min inet:port-number 254 | | +--rw destination-port-max inet:port-number 255 | +--:(protocol) 256 | +--rw protocol-cfg* [protocol-min protocol-max] 257 | +--rw protocol-min uint8 258 | +--rw protocol-max uint8 259 +--rw classifier-action-entry-cfg* [action-type] 260 | +--rw action-type identityref 261 | +--rw (action-cfg-params)? 262 | +--:(marking) 263 | | +--rw action:marking-cfg 264 | | +--rw action:dscp? inet:dscp 265 | +--:(priority) 266 | | +--rw action:priority-cfg 267 | | +--rw action:priority-level? uint8 268 | +--:(meter) 269 | | +--rw action:meter-cfg 270 | | +--rw action:meter-list* [meter-id] 271 | | +--rw action:meter-id uint16 272 | | +--rw action:meter-rate? uint64 273 | | +--rw (burst-type)? 274 | | | +--:(size) 275 | | | | +--rw action:burst-size? uint64 276 | | | +--:(interval) 277 | | | +--rw action:burst-interval? uint64 278 | | +--rw action:color 279 | | | +--rw action:classifier-entry-name? 280 string 281 | | | +--rw action:classifier-entry-descr? 282 string 283 | | | +--rw action: 284 classifier-entry-filter-operation? 285 identityref 286 | | +--rw action:succeed-action 287 | | | +--rw action:meter-action-type? 288 identityref 289 | | | +--rw action:next-meter-id? uint16 290 | | | +--rw (val)? 291 | | | +--:(meter-action-mark) 292 | | | | +--rw action:dscp? inet:dscp 293 | | | +--:(meter-action-drop) 294 | | | +--rw action:drop-action? empty 295 | | +--rw action:fail-action 296 | | +--rw action:meter-action-type? 297 identityref 298 | | +--rw action:next-meter-id? uint16 299 | | +--rw (val)? 300 | | +--:(meter-action-mark) 301 | | | +--rw action:dscp? inet:dscp 302 | | +--:(meter-action-drop) 303 | | +--rw action:drop-action? empty 304 | +--:(min-rate) 305 | | +--rw action:min-rate-cfg 306 | | +--rw action:min-rate? uint64 307 | +--:(max-rate) 308 | | +--rw action:max-rate-cfg 309 | | +--rw action:absolute-rate? uint64 310 | | +--rw (burst-type)? 311 | | +--:(size) 312 | | | +--rw action:burst-size? uint64 313 | | +--:(interval) 314 | | +--rw action:burst-interval? uint64 315 | +--:(algorithmic-drop) 316 | +--rw (drop-algorithm)? 317 | +--:(always-drop) 318 | | +--rw action:drop-cfg 319 | | +--rw action:drop-action? empty 320 | +--:(tail-drop) 321 | | +--rw action:tail-drop-cfg 322 | | +--rw action:qlimit-dscp-thresh* 323 [dscp-min dscp-max] 324 | | +--rw action:dscp-min inet:dscp 325 | | +--rw action:dscp-max inet:dscp 326 | | +--rw action:threshold 327 | | +--rw (threshold-type)? 328 | | +--:(size) 329 | | | +--rw action:threshold-size? 330 uint64 331 | | +--:(interval) 332 | | +--rw action: 333 threshold-interval? 334 uint64 335 | +--:(random-detect) 336 | +--rw action:random-detect-cfg 337 {aqm-red-support}? 338 | +--rw action:exp-weighting-const? uint32 339 | +--rw action:red-min-thresh 340 | | +--rw action:threshold 341 | | +--rw (threshold-type)? 342 | | +--:(size) 343 | | | +--rw action:threshold-size? 344 uint64 345 | | +--:(interval) 346 | | +--rw action: 347 threshold-interval? 348 uint64 349 | +--rw action:red-max-thresh 350 | | +--rw action:threshold 351 | | +--rw (threshold-type)? 352 | | +--:(size) 353 | | | +--rw action:threshold-size? 354 uint64 355 | | +--:(interval) 356 | | +--rw action: 357 threshold-interval? 358 uint64 359 | +--rw action:mark-probability? uint32 360 +--rw child-policy? leafref {hierarchial-policy-support}? 362 ietf-diffserv-action module contains set of diffserv actions which 363 are augmented to ietf-diffserv-policy module and to ietf-diffserv- 364 target module. Marking sets Diffserv codepoint value in the 365 classified packet. Color-aware and Color-blind meters can be 366 configured. Action counters are defined as grouping and are 367 currently not augmented to any diffserv module. 369 ietf-diffserv-target module contains reference of diffserv-policy for 370 either direction of network traffic and is augmented to ietf- 371 interfaces [RFC7223] module. 373 module: ietf-diffserv-target 374 augment /if:interfaces/if:interface: 375 +--rw diffserv-target-entry* [direction policy-name] 376 +--rw direction identityref 377 +--rw policy-name string 378 +--ro diffserv-target-classifier-statistics* 379 [classifier-entry-name parent-path] 380 +--ro classifier-entry-name string 381 +--ro parent-path string 382 +--ro classifier-entry-statistics 383 | +--ro classified-pkts? uint64 384 | +--ro classified-bytes? uint64 385 | +--ro classified-rate? uint64 386 +--ro meter-statistics* [meter-id] 387 | +--ro meter-id uint16 388 | +--ro meter-succeed-pkts? uint64 389 | +--ro meter-succeed-bytes? uint64 390 | +--ro meter-failed-pkts? uint64 391 | +--ro meter-failed-bytes? uint64 392 +--ro queuing-statistics 393 +--ro output-pkts? uint64 394 +--ro output-bytes? uint64 395 +--ro queue-size-pkts? uint64 396 +--ro queue-size-bytes? uint64 397 +--ro drop-pkts? uint64 398 +--ro drop-bytes? uint64 399 +--ro red-stats 400 +--ro early-drop-pkts? uint64 401 +--ro early-drop-bytes? uint64 403 5. Diffserv Modules 405 5.1. IETF-DIFFSERV-CLASSIFIER 407 file "ietf-diffserv-classifier@2015-04-07.yang" 408 module ietf-diffserv-classifier { 409 yang-version 1; 410 namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv-classifier"; 411 prefix classifier; 413 import ietf-inet-types { 414 prefix inet; 415 } 417 organization "IETF NETMOD (Netmod Working Group) Working Group"; 418 contact 419 "WG Web: 420 WG List: 422 WG Chair: Jurgen Schonwalder 423 425 WG Chair: Tom Nadeau 426 428 Editor: Aseem Choudhary 429 431 Editor: Shitanshu Shah 432 "; 433 description 434 "This module contains a collection of YANG definitions for 435 configuring diffserv specification implementations. 437 Copyright (c) 2014 IETF Trust and the persons identified as 438 authors of the code. All rights reserved. 440 Redistribution and use in source and binary forms, with or 441 without modification, is permitted pursuant to, and subject 442 to the license terms contained in, the Simplified BSD License 443 set forth in Section 4.c of the IETF Trust's Legal Provisions 444 Relating to IETF Documents 445 (http://trustee.ietf.org/license-info). 447 This version of this YANG module is part of RFC XXXX; see 448 the RFC itself for full legal notices."; 450 revision 2015-04-07 { 451 description 452 "Latest revision of diffserv based classifier"; 453 reference "RFC XXXX"; 454 } 456 feature policy-inline-classifier-config { 457 description 458 " This feature allows classifier configuration 459 directly under policy."; 460 } 462 identity filter-type { 463 description 464 " This is identity of base filter-type"; 465 } 467 identity dscp { 468 base filter-type; 469 description 470 "DSCP filter-type"; 471 } 473 identity source-ip-address { 474 base filter-type; 475 description 476 "source-ip-address filter-type"; 477 } 479 identity destination-ip-address { 480 base filter-type; 481 description 482 "destination-ip-address filter-type"; 483 } 485 identity source-port { 486 base filter-type; 487 description 488 "source-port filter-type"; 489 } 491 identity destination-port { 492 base filter-type; 493 description 494 "destination-port filter-type"; 495 } 497 identity protocol { 498 base filter-type; 499 description 500 "protocol filter-type"; 501 } 503 identity classifier-entry-filter-operation-type { 504 description 505 "Classifier entry filter logical operation"; 507 } 509 identity match-any-filter { 510 base classifier-entry-filter-operation-type; 511 description 512 "Classifier entry filter logical OR operation"; 513 } 515 identity match-all-filter { 516 base classifier-entry-filter-operation-type; 517 description 518 "Classifier entry filter logical AND operation"; 519 } 521 grouping filters { 522 description 523 "Filters in a Classifier entry"; 524 leaf filter-type { 525 type identityref { 526 base filter-type; 527 } 528 description 529 "This leaf defines type of the filter"; 530 } 531 leaf filter-logical-not { 532 type boolean; 533 description 534 " 535 This is logical-not operator for a filter. When true, it 536 indicates filter looks for absence of a pattern defined 537 by the filter 538 "; 539 } 540 choice filter-param { 541 description 542 "Choice of filter types"; 543 case dscp { 544 list dscp-cfg { 545 key "dscp-min dscp-max"; 546 description 547 "list of dscp ranges"; 548 leaf dscp-min { 549 type inet:dscp; 550 description 551 "Minimum value of dscp range"; 552 } 553 leaf dscp-max { 554 type inet:dscp; 555 description 556 "maximum value of dscp range"; 557 } 558 } 559 description 560 "Filter containing list of dscp ranges"; 561 } 562 case source-ip-address { 563 list source-ip-address-cfg { 564 key "source-ip-addr"; 565 description 566 "list of source ip address"; 567 leaf source-ip-addr { 568 type inet:ip-prefix; 569 description 570 "source ip prefix"; 571 } 572 } 573 description 574 "Filter containing list of source ip addresses"; 575 } 576 case destination-ip-address { 577 list destination-ip-address-cfg { 578 key "destination-ip-addr"; 579 description 580 "list of destination ip address"; 581 leaf destination-ip-addr { 582 type inet:ip-prefix; 583 description 584 "destination ip prefix"; 585 } 586 } 587 description 588 "Filter containing list of destination ip address"; 589 } 590 case source-port { 591 list source-port-cfg { 592 key "source-port-min source-port-max"; 593 description 594 "list of ranges of source port"; 595 leaf source-port-min { 596 type inet:port-number; 597 description 598 "minimum value of source port range"; 599 } 600 leaf source-port-max { 601 type inet:port-number; 602 description 603 "maximum value of source port range"; 604 } 605 } 606 description 607 "Filter containing list of source-port ranges"; 608 } 609 case destination-port { 610 list destination-port-cfg { 611 key "destination-port-min destination-port-max"; 612 description 613 "list of ranges of destination port"; 614 leaf destination-port-min { 615 type inet:port-number; 616 description 617 "minimum value of destination port range"; 618 } 619 leaf destination-port-max { 620 type inet:port-number; 621 description 622 "maximum value of destination port range"; 623 } 624 } 625 description 626 "Filter containing list of destination-port ranges"; 627 } 628 case protocol { 629 list protocol-cfg { 630 key "protocol-min protocol-max"; 631 description 632 "list of ranges of protocol values"; 633 leaf protocol-min { 634 type uint8 { 635 range "0..255"; 636 } 637 description 638 "minimum value of protocol range"; 639 } 640 leaf protocol-max { 641 type uint8 { 642 range "0..255"; 643 } 644 description 645 "maximum value of protocol range"; 646 } 647 } 648 description 649 "Filter Type Protocol"; 650 } 652 } 653 } 655 grouping classifier-entry-generic-attr { 656 description 657 "Classifier attributes"; 658 leaf classifier-entry-name { 659 type string; 660 description 661 "Diffserv classifier name"; 662 } 663 leaf classifier-entry-descr { 664 type string; 665 description 666 "Description of the class template"; 667 } 668 leaf classifier-entry-filter-operation { 669 type identityref { 670 base classifier-entry-filter-operation-type; 671 } 672 default "match-any-filter"; 673 description 674 "Filters are applicable as any or all filters"; 675 } 676 } 678 grouping classifier-entry-inline-attr { 679 description 680 "Classifier inline attributes"; 681 leaf classifier-entry-inline { 682 type boolean; 683 default "false"; 684 description 685 "Indication of inline classifier entry"; 686 } 687 leaf classifier-entry-filter-oper { 688 type identityref { 689 base classifier-entry-filter-operation-type; 690 } 691 default "match-any-filter"; 692 description 693 "Filters are applicable as any or all filters"; 694 } 695 list filter-entry { 696 if-feature policy-inline-classifier-config; 697 must "classifier-entry-inline == true" { 698 description 699 "For inline filter configuration, inline attribute 700 must be true"; 701 } 702 key "filter-type filter-logical-not"; 703 uses filters; 704 description 705 "Filters configured inline in a policy"; 706 } 707 } 709 container classifiers { 710 description 711 "list of classifier entry"; 712 list classifier-entry { 713 key "classifier-entry-name"; 714 description 715 "classifier entry template"; 716 uses classifier-entry-generic-attr; 717 list filter-entry { 718 key "filter-type filter-logical-not"; 719 uses filters; 720 description 721 "Filter configuration"; 722 } 723 } 724 } 725 } 726 728 5.2. IETF-DIFFSERV-POLICY 730 file "ietf-diffserv-policy@2015-04-07.yang" 731 module ietf-diffserv-policy { 732 yang-version 1; 733 namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv-policy"; 734 prefix policy; 736 import ietf-diffserv-classifier { 737 prefix classifier; 738 } 740 organization "IETF NETMOD (Netmod Working Group) Working Group"; 741 contact 742 "WG Web: 743 WG List: 745 WG Chair: Jurgen Schonwalder 746 748 WG Chair: Tom Nadeau 749 751 Editor: Aseem Choudhary 752 754 Editor: Shitanshu Shah 755 "; 756 description 757 "This module contains a collection of YANG definitions for 758 configuring diffserv specification implementations. 760 Copyright (c) 2014 IETF Trust and the persons identified as 761 authors of the code. All rights reserved. 763 Redistribution and use in source and binary forms, with or 764 without modification, is permitted pursuant to, and subject 765 to the license terms contained in, the Simplified BSD License 766 set forth in Section 4.c of the IETF Trust's Legal Provisions 767 Relating to IETF Documents 768 (http://trustee.ietf.org/license-info). 770 This version of this YANG module is part of RFC XXXX; see 771 the RFC itself for full legal notices."; 773 revision 2015-04-07 { 774 description 775 "Latest revision of diffserv policy"; 776 reference "RFC XXXX"; 777 } 779 feature hierarchial-policy-support { 780 description 781 " This feature allows hierarchial policy to be configured"; 782 } 784 grouping policy-generic-attr { 785 description 786 "Policy Attributes"; 787 leaf policy-name { 788 type string; 789 description 790 "Diffserv policy name"; 791 } 792 leaf policy-descr { 793 type string; 794 description 795 "Diffserv policy description"; 796 } 797 } 799 identity action-type { 800 description 801 "This base identity type defines action-types"; 802 } 804 grouping classifier-action-entry-cfg { 805 description 806 "List of Configuration of classifier & associated actions"; 807 list classifier-action-entry-cfg { 808 key "action-type"; 809 ordered-by user; 810 description 811 "Configuration of classifier & associated actions"; 812 leaf action-type { 813 type identityref { 814 base action-type; 815 } 816 description 817 "This defines action type "; 818 } 819 choice action-cfg-params { 820 description 821 "Choice of action types"; 822 } 823 } 824 } 826 container policies { 827 description 828 "list of policy templates"; 829 list policy-entry { 830 key "policy-name"; 831 description 832 "policy template"; 833 uses policy-generic-attr; 834 list classifier-entry { 835 key "classifier-entry-name"; 836 ordered-by user; 837 description 838 "Classifier entry configuration in a policy"; 839 leaf classifier-entry-name { 840 type string; 841 description 842 "Diffserv classifier entry name"; 843 } 844 uses classifier:classifier-entry-inline-attr; 845 uses classifier-action-entry-cfg; 846 leaf child-policy { 847 if-feature hierarchial-policy-support; 848 type leafref { 849 path "/policies/policy-entry/policy-name"; 850 } 851 description 852 "Child Policy in the hierarchial configuration"; 853 } 854 } 855 } 856 } 857 } 858 860 5.3. IETF-DIFFSERV-ACTION 862 file "ietf-diffserv-action@2015-04-07.yang" 863 module ietf-diffserv-action { 864 namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv-action"; 865 prefix action; 867 import ietf-inet-types { 868 prefix inet; 869 } 870 import ietf-diffserv-classifier { 871 prefix classifier; 872 } 873 import ietf-diffserv-policy { 874 prefix policy; 875 } 877 organization "IETF NETMOD (Netmod Working Group) Working Group"; 878 contact 879 "WG Web: 880 WG List: 882 WG Chair: Jurgen Schonwalder 883 885 WG Chair: Tom Nadeau 886 888 Editor: Aseem Choudhary 889 891 Editor: Shitanshu Shah 892 "; 893 description 894 "This module contains a collection of YANG definitions for 895 configuring diffserv specification implementations. 897 Copyright (c) 2014 IETF Trust and the persons identified as 898 authors of the code. All rights reserved. 900 Redistribution and use in source and binary forms, with or 901 without modification, is permitted pursuant to, and subject 902 to the license terms contained in, the Simplified BSD License 903 set forth in Section 4.c of the IETF Trust's Legal Provisions 904 Relating to IETF Documents 905 (http://trustee.ietf.org/license-info). 907 This version of this YANG module is part of RFC XXXX; see 908 the RFC itself for full legal notices."; 910 revision 2015-04-07 { 911 description 912 "Latest revision for diffserv actions"; 913 reference "RFC XXXX"; 914 } 916 feature hierarchial-policy-support { 917 description 918 " This feature allows hierarchial policy to be configured"; 919 } 921 feature aqm-red-support { 922 description 923 " This feature allows AQM RED to be configured"; 924 } 926 grouping dscp-range { 927 description 928 "dscp range definition"; 929 leaf dscp-min { 930 type inet:dscp; 931 description 932 "Minimum of dscp range"; 933 } 934 leaf dscp-max { 935 type inet:dscp; 936 description 937 "Maximum of dscp range"; 938 } 939 } 941 grouping burst { 942 description 943 "burst size or interval configuration"; 944 choice burst-type { 945 case size { 946 leaf burst-size { 947 type uint64; 948 units "bytes"; 949 description 950 "burst size"; 951 } 952 } 953 case interval { 954 leaf burst-interval { 955 type uint64; 956 units "microsecond"; 957 description 958 "burst interval"; 959 } 960 } 961 description 962 "Choice of burst type"; 963 } 964 } 966 grouping threshold { 967 description 968 "Threshold Parameters"; 969 container threshold { 970 description 971 "threshold"; 972 choice threshold-type { 973 case size { 974 leaf threshold-size { 975 type uint64; 976 units "bytes"; 977 description 978 "Threshold size"; 979 } 980 } 981 case interval { 982 leaf threshold-interval { 983 type uint64; 984 units "microsecond"; 985 description 986 "Threshold interval"; 987 } 988 } 989 description 990 "Choice of threshold type"; 991 } 992 } 993 } 995 identity marking { 996 base policy:action-type; 997 description 998 "marking action type"; 999 } 1001 identity meter { 1002 base policy:action-type; 1003 description 1004 "meter action type"; 1005 } 1007 identity priority { 1008 base policy:action-type; 1009 description 1010 "priority action type"; 1011 } 1013 identity min-rate { 1014 base policy:action-type; 1015 description 1016 "min-rate action type"; 1017 } 1019 identity max-rate { 1020 base policy:action-type; 1021 description 1022 "max-rate action type"; 1023 } 1025 identity algorithmic-drop { 1026 base policy:action-type; 1027 description 1028 "algorithmic-drop action type"; 1029 } 1031 identity drop-type { 1032 description 1033 "drop algorithm"; 1034 } 1036 identity always-drop { 1037 base drop-type; 1038 description 1039 "always drop algorithm"; 1040 } 1042 identity tail-drop { 1043 base drop-type; 1044 description 1045 "tail drop algorithm"; 1046 } 1048 identity random-detect { 1049 base drop-type; 1050 description 1051 "random detect algorithm"; 1052 } 1054 identity meter-action-type { 1055 description 1056 "action type in a meter"; 1057 } 1059 identity meter-action-drop { 1060 base meter-action-type; 1061 description 1062 "drop action type in a meter"; 1063 } 1065 identity meter-action-set { 1066 base meter-action-type; 1067 description 1068 "mark action type in a meter"; 1069 } 1071 grouping drop { 1072 leaf drop-action { 1073 type empty; 1074 description 1075 "always drop algorithm"; 1076 } 1077 description 1078 "the drop action"; 1079 } 1080 grouping queuelimit { 1081 list qlimit-dscp-thresh { 1082 key "dscp-min dscp-max"; 1083 uses dscp-range; 1084 uses threshold; 1085 description 1086 "the queue limit per dscp range"; 1087 } 1088 description 1089 "the queue limit beyond which queue will not hold any packet"; 1090 } 1092 grouping meter-action-params { 1093 leaf meter-action-type { 1094 type identityref { 1095 base meter-action-type; 1096 } 1097 description 1098 "meter action type"; 1099 } 1100 leaf next-meter-id { 1101 type uint16; 1102 description 1103 "next meter identifier"; 1104 } 1105 choice val { 1106 case meter-action-mark { 1107 uses marking; 1108 description 1109 "meter action: mark"; 1110 } 1111 case meter-action-drop { 1112 description 1113 "meter action: drop"; 1114 uses drop; 1115 } 1116 description 1117 " meter action based on choice of meter action type"; 1118 } 1119 description 1120 "meter action parameters"; 1121 } 1123 grouping meter { 1124 leaf meter-id { 1125 type uint16; 1126 description 1127 "meter identifier"; 1129 } 1130 leaf meter-rate { 1131 type uint64; 1132 units "bits-per-second"; 1133 description 1134 "meter rate"; 1135 } 1136 uses burst; 1137 container color { 1138 uses classifier:classifier-entry-generic-attr; 1139 description 1140 "color aware & color blind attributes container"; 1141 } 1142 container succeed-action { 1143 uses meter-action-params; 1144 description 1145 "confirm action"; 1146 } 1147 container fail-action { 1148 uses meter-action-params; 1149 description 1150 "exceed action"; 1151 } 1152 description 1153 "meter attributes"; 1154 } 1156 grouping priority { 1157 leaf priority-level { 1158 type uint8; 1159 description 1160 "priority level"; 1161 } 1162 description 1163 "priority attributes"; 1164 } 1166 grouping min-rate { 1167 leaf min-rate { 1168 type uint64; 1169 units "bits-per-second"; 1170 description 1171 "minimum rate"; 1172 } 1173 description 1174 "minimum rate grouping"; 1175 } 1176 grouping marking { 1177 leaf dscp { 1178 type inet:dscp; 1179 description 1180 "dscp marking"; 1181 } 1182 description 1183 "marking grouping"; 1184 } 1186 grouping max-rate { 1187 leaf absolute-rate { 1188 type uint64; 1189 units "bits-per-second"; 1190 description 1191 "rate in bits per second"; 1192 } 1193 uses burst; 1194 description 1195 "maximum rate attributes"; 1196 } 1198 grouping red-threshold { 1199 container red-min-thresh { 1200 uses threshold; 1201 description 1202 "Minimum threshold"; 1203 } 1204 container red-max-thresh { 1205 uses threshold; 1206 description 1207 "Maximum threshold"; 1208 } 1209 leaf mark-probability { 1210 type uint32 { 1211 range "1..1000"; 1212 } 1213 description 1214 "Mark probability"; 1215 } 1216 description 1217 "RED threshold attributes"; 1218 } 1220 grouping randomdetect { 1221 leaf exp-weighting-const { 1222 type uint32; 1223 description 1224 "Exponential weighting constant factor for red profile "; 1225 } 1226 uses red-threshold; 1227 description 1228 "Random detect attributes"; 1229 } 1231 augment "/policy:policies/policy:policy-entry" + 1232 "/policy:classifier-entry" + 1233 "/policy:classifier-action-entry-cfg" + 1234 "/policy:action-cfg-params" { 1235 case marking { 1236 container marking-cfg { 1237 uses marking; 1238 description 1239 "Marking configuration container"; 1240 } 1241 } 1242 case priority { 1243 container priority-cfg { 1244 uses priority; 1245 description 1246 "priority attributes container"; 1247 } 1248 } 1249 case meter { 1250 container meter-cfg { 1251 list meter-list { 1252 key "meter-id"; 1253 uses meter; 1254 description 1255 "Meter configuration"; 1256 } 1257 description 1258 "Meter list configuration container"; 1259 } 1260 } 1261 case min-rate { 1262 container min-rate-cfg { 1263 uses min-rate; 1264 description 1265 "min guaranteed bandwidth"; 1266 } 1267 } 1268 case max-rate { 1269 container max-rate-cfg { 1270 uses max-rate; 1271 description 1272 "maximum rate attributes"; 1273 } 1274 } 1275 case algorithmic-drop { 1276 choice drop-algorithm { 1277 case always-drop { 1278 container drop-cfg { 1279 uses drop; 1280 description 1281 "Always Drop configuration container"; 1282 } 1283 } 1284 case tail-drop { 1285 container tail-drop-cfg { 1286 uses queuelimit; 1287 description 1288 "Tail Drop configuration container"; 1289 } 1290 } 1291 case random-detect { 1292 container random-detect-cfg { 1293 if-feature aqm-red-support; 1294 uses randomdetect; 1295 description 1296 "Random Detect configuration container"; 1297 } 1298 } 1299 description 1300 "Choice of Drop Algorithm"; 1301 } 1302 } 1303 description 1304 "Augment the actions to policy entry"; 1305 } 1306 } 1307 1309 5.4. IETF-DIFFSERV-TARGET 1311 file "ietf-diffserv-target@2015-04-07.yang" 1312 module ietf-diffserv-target { 1313 yang-version 1; 1314 namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv-target"; 1315 prefix target; 1317 import ietf-interfaces { 1318 prefix if; 1319 } 1321 organization "IETF NETMOD (Netmod Working Group) Working Group"; 1322 contact 1323 "WG Web: 1324 WG List: 1326 WG Chair: Jurgen Schonwalder 1327 1329 WG Chair: Tom Nadeau 1330 1332 Editor: Aseem Choudhary 1333 1335 Editor: Shitanshu Shah 1336 "; 1337 description 1338 "This module contains a collection of YANG definitions for 1339 configuring diffserv specification implementations. 1341 Copyright (c) 2014 IETF Trust and the persons identified as 1342 authors of the code. All rights reserved. 1344 Redistribution and use in source and binary forms, with or 1345 without modification, is permitted pursuant to, and subject 1346 to the license terms contained in, the Simplified BSD License 1347 set forth in Section 4.c of the IETF Trust's Legal Provisions 1348 Relating to IETF Documents 1349 (http://trustee.ietf.org/license-info). 1351 This version of this YANG module is part of RFC XXXX; see 1352 the RFC itself for full legal notices."; 1354 revision 2015-04-07 { 1355 description 1356 "Latest revision diffserv based policy applied to a target"; 1357 reference "RFC XXXX"; 1358 } 1360 identity direction { 1361 description 1362 "This is identity of traffic direction"; 1363 } 1365 identity inbound { 1366 base direction; 1367 description 1368 "Direction of traffic coming into the network entry"; 1369 } 1371 identity outbound { 1372 base direction; 1373 description 1374 "Direction of traffic going out of the network entry"; 1375 } 1377 feature target-inline-policy-config { 1378 description 1379 "This feature allows the policy configuration 1380 directly under a target."; 1381 } 1383 grouping red-stats { 1384 description 1385 "RED Counters"; 1386 leaf early-drop-pkts { 1387 type uint64; 1388 description 1389 "Early drop packets "; 1390 } 1391 leaf early-drop-bytes { 1392 type uint64; 1393 description 1394 "Early drop bytes "; 1395 } 1396 } 1398 grouping classifier-entry-stats { 1399 description 1400 "Classifier Counters"; 1401 container classifier-entry-statistics { 1402 config false; 1403 description 1404 " 1405 This group defines the classifier filter statistics of 1406 each classifier entry 1408 "; 1409 leaf classified-pkts { 1410 type uint64; 1411 description 1412 " Number of total packets which filtered 1413 to the classifier-entry"; 1415 } 1416 leaf classified-bytes { 1417 type uint64; 1418 description 1419 " Number of total bytes which filtered 1420 to the classifier-entry"; 1421 } 1422 leaf classified-rate { 1423 type uint64; 1424 units "bits-per-second"; 1425 description 1426 " Rate of average data flow through the 1427 classifier-entry"; 1428 } 1429 } 1430 } 1432 grouping queuing-stats { 1433 description 1434 "Queuing Counters"; 1435 container queuing-statistics { 1436 description 1437 "queue related statistics "; 1438 leaf output-pkts { 1439 type uint64; 1440 description 1441 "Number of packets transmitted from queue "; 1442 } 1443 leaf output-bytes { 1444 type uint64; 1445 description 1446 "Number of bytes transmitted from queue "; 1447 } 1448 leaf queue-size-pkts { 1449 type uint64; 1450 description 1451 "Number of packets currently buffered "; 1452 } 1453 leaf queue-size-bytes { 1454 type uint64; 1455 description 1456 "Number of bytes currently buffered "; 1457 } 1458 leaf drop-pkts { 1459 type uint64; 1460 description 1461 "Total number of packets dropped "; 1462 } 1463 leaf drop-bytes { 1464 type uint64; 1465 description 1466 "Total number of bytes dropped "; 1467 } 1468 container red-stats { 1469 uses red-stats; 1470 description 1471 "Container for RED statistics"; 1472 } 1473 } 1474 } 1476 grouping meter-stats { 1477 description 1478 "Metering Counters"; 1479 list meter-statistics { 1480 key "meter-id"; 1481 description 1482 "Meter statistics"; 1483 leaf meter-id { 1484 type uint16; 1485 description 1486 "Meter Identifier"; 1487 } 1488 leaf meter-succeed-pkts { 1489 type uint64; 1490 description 1491 "Number of packets which succeed the meter"; 1492 } 1493 leaf meter-succeed-bytes { 1494 type uint64; 1495 description 1496 "Bytes of packets which succeed the meter"; 1497 } 1498 leaf meter-failed-pkts { 1499 type uint64; 1500 description 1501 "Number of packets which failed the meter"; 1502 } 1503 leaf meter-failed-bytes { 1504 type uint64; 1505 description 1506 "Bytes of packets which failed the meter"; 1507 } 1508 } 1509 } 1510 augment "/if:interfaces/if:interface" { 1511 description 1512 "Augments Diffserv Target Entry to Interface module"; 1513 list diffserv-target-entry { 1514 key "direction policy-name"; 1515 description 1516 "policy target for inbound or outbound direction"; 1517 leaf direction { 1518 type identityref { 1519 base direction; 1520 } 1521 description 1522 "Direction fo the traffic flow either inbound or outbound"; 1523 } 1524 leaf policy-name { 1525 type string; 1526 description 1527 "Policy entry name"; 1528 } 1529 list diffserv-target-classifier-statistics { 1530 key "classifier-entry-name parent-path"; 1531 config false; 1532 description 1533 "Statistics for each Classifier Entry in a Policy"; 1534 leaf classifier-entry-name { 1535 type string; 1536 description 1537 "Classifier Entry Name"; 1538 } 1539 leaf parent-path { 1540 type string; 1541 description 1542 "Path of the Classifier Entry in a hierarchial policy "; 1543 } 1544 uses classifier-entry-stats; 1545 uses meter-stats; 1546 uses queuing-stats; 1547 } 1548 } 1549 } 1550 } 1551 1553 6. Security Considerations 1555 7. Acknowledgement 1557 The editor of this document wishes to thank Fred Baker for 1558 overviewing the document and provide useful comments, Andrew Mao for 1559 the guidance and support, Fred Yip and Aleksandr Zhdankin for helpful 1560 suggestions and contributions. 1562 8. References 1564 8.1. Normative References 1566 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1567 Requirement Levels", BCP 14, RFC 2119, March 1997. 1569 [RFC2697] Heinanen, J. and R. Guerin, "A Single Rate Three Color 1570 Marker", RFC 2697, September 1999. 1572 [RFC2698] Heinanen, J. and R. Guerin, "A Two Rate Three Color 1573 Marker", RFC 2698, September 1999. 1575 [RFC2859] Fang, W., Seddigh, N., and B. Nandy, "A Time Sliding 1576 Window Three Colour Marker (TSWTCM)", RFC 2859, June 2000. 1578 [RFC3246] Davie, B., Charny, A., Bennet, J., Benson, K., Le Boudec, 1579 J., Courtney, W., Davari, S., Firoiu, V., and D. 1580 Stiliadis, "An Expedited Forwarding PHB (Per-Hop 1581 Behavior)", RFC 3246, March 2002. 1583 [RFC3260] Grossman, D., "New Terminology and Clarifications for 1584 Diffserv", RFC 3260, April 2002. 1586 [RFC3289] Baker, F., Chan, K., and A. Smith, "Management Information 1587 Base for the Differentiated Services Architecture", RFC 1588 3289, May 2002. 1590 [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the 1591 Network Configuration Protocol (NETCONF)", RFC 6020, 1592 October 2010. 1594 [RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, 1595 July 2013. 1597 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 1598 Management", RFC 7223, May 2014. 1600 8.2. Informative References 1602 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 1603 and W. Weiss, "An Architecture for Differentiated 1604 Services", RFC 2475, December 1998. 1606 Appendix A. Open Items 1608 The current model represents hierarchical QoS alike with the non-leaf 1609 and leaf nodes, in a scheduling hierarchy, without any restrictions 1610 of actions, such as AQM, that should not be allowed at non-leaf 1611 nodes. This is to be addressed in subsequent revisions. 1613 Authors' Addresses 1615 Aseem Choudhary 1616 Cisco Systems 1617 170 W. Tasman Drive 1618 San Jose, CA 95134 1619 US 1621 Email: asechoud@cisco.com 1623 Shitanshu Shah 1624 Cisco Systems 1625 170 W. Tasman Drive 1626 San Jose, CA 95134 1627 US 1629 Email: svshah@cisco.com 1631 Mahesh Jethanandani 1632 Ciena Corporation 1633 3939 North 1st Street 1634 San Jose, CA 95134 1635 US 1637 Email: mjethanandani@gmail.com 1638 Gang Yan 1639 Huawei Technologies 1640 Huawei Bld., No. 156 Beiqing Rd 1641 Beijing 100095 1642 China 1644 Email: yangang@huawei.com 1646 Bing Liu 1647 Huawei Technologies 1648 Q14, Huawei Campus, No.156 Beiqing Rd 1649 Beijing 100095 1650 China 1652 Email: Leo.liubing@huawei.com 1654 Norm Strahle 1655 Juniper Networks 1656 1194 North Mathilda Avenue 1657 Sunnyvale, CA 94089 1658 US 1660 Email: nstrahle@juniper.net