YANG Models for Quality of Service (QoS)
draft-ietf-rtgwg-qos-model-12
draft-ietf-rtgwg-qos-model-12
Internet-Draft YANG Models for QoS January 2024 "Number of packets that conform to the rate and burst."; } leaf conform-bytes { type yang:zero-based-counter64; description "Total bytes count that conform to the rate and burst."; } leaf conform-rate { type yang:gauge64; units "bits-per-second"; description "Traffic Rate measured as conformimg."; } leaf exceed-pkts { type yang:zero-based-counter64; description "Number of packets that exceed the peak rate and peak burst."; } leaf exceed-bytes { type yang:zero-based-counter64; description "Total number of bytes which exceed the peak rate and peak burst."; } leaf exceed-rate { type yang:gauge64; units "bits-per-second"; description "Traffic Rate measured as exceeding."; } leaf violate-pkts { type yang:zero-based-counter64; description "Number of packets that were beyond peak rate and peak burst."; } leaf violate-bytes { type yang:zero-based-counter64; description "Total number of bytes which were beyond peak rate and Choudhary, et al. Expires 3 August 2024 [Page 48] Internet-Draft YANG Models for QoS January 2024 peak burst."; } leaf violate-rate { type yang:gauge64; units "bits-per-second"; description "Traffic Rate measured as violating."; } leaf drop-pkts { type yang:zero-based-counter64; description "Number of packets dropped by meter."; } leaf drop-bytes { type yang:zero-based-counter64; description "Number of bytes dropped by meter."; } } augment "/if:interfaces/if:interface" { description "Augments interface module to add QoS Target entry."; container qos-interface-statistics { config false; description "QoS Interface statistics."; list stats-per-direction { description "QoS interface statistics in ingress or egress direction."; leaf direction { type identityref { base qos-types:direction; } description "Direction of the traffic flow. Either ingress or egress."; } leaf policy-name { type string; description Choudhary, et al. Expires 3 August 2024 [Page 49] Internet-Draft YANG Models for QoS January 2024 "Policy name for single level policy as well as for Hierarchical policies. For Hierarchical policies, this represent relative path as well as the last level policy name."; } list classifier { description "Statistics for each Classifier in a Policy applied in a particular direction."; uses classifier-statistics; } list named { description "Statistics for a statistics-name."; leaf name { type string; description "A name for statistics."; } container aggregated { description "Matched aggregated statistics for a statistics-name."; leaf pkts { type yang:zero-based-counter64; description "Number of total matched packets associated with a statistics name."; } leaf bytes { type yang:zero-based-counter64; description "Number of total matched bytes associated with a statistics name."; } leaf rate { type yang:gauge64; units "bits-per-second"; description "Rate of average matched data which is associated to a statistics name."; } Choudhary, et al. Expires 3 August 2024 [Page 50] Internet-Draft YANG Models for QoS January 2024 } container non-aggregated { description "Statistics for non-aggregated statistics-name."; list classifier { description "Statistics for each Classifier in a Policy applied in a particular direction."; uses classifier-statistics; } list metering { description "Statistics for each Meter associated with the Policy."; reference "RFC2697: A Single Rate Three Color Marker RFC2698: A Two Rate Three Color Marker."; uses metering-stats; } list queueing { description "Statistics for each Queue associated with the Policy."; uses queuing-stats; } } } list metering { description "Statistics for each Meter associated with the Policy."; reference "RFC2697: A Single Rate Three Color Marker RFC2698: A Two Rate Three Color Marker."; uses metering-stats; } list queueing { description "Statistics for each Queue associated with the Policy."; uses queuing-stats; } } Choudhary, et al. Expires 3 August 2024 [Page 51] Internet-Draft YANG Models for QoS January 2024 action clear { description "Clear statistics action command. Execution of this command should result in all the QoS interface counters to be cleared and set to 0."; input { leaf category { type identityref { base qos-types:clear-counters-type; } description "Category of counters which is being cleared."; } leaf started-at { type yang:date-and-time; description "The date and time when the counters should be cleared."; } } output { leaf finished-at { type yang:date-and-time; description "The date and time when the counters finished clearing."; } } } } } } <CODE ENDS> Figure 9: ietf-qos-oper module 4.5. Scheduler Policy Module Scheduling Policy module defines a set of scheduling parameters and associates a Queue Policy with it. Choudhary, et al. Expires 3 August 2024 [Page 52] Internet-Draft YANG Models for QoS January 2024 module: ietf-scheduler-policy augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:inline /traffic-policy:filter: +--rw (filter-params)? +--:(filter-match-all) +--rw match-all ... augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:action: +--rw (action-params)? +--:(scheduler) | +--rw scheduler | ... +--:(queue-policy-name) +--rw queue-policy-name ... Figure 10: ietf-scheduler-policy abridged abridged tree diagram <CODE BEGINS> file "ietf-scheduler-policy@2024-01-31.yang" module ietf-scheduler-policy { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-scheduler-policy"; prefix scheduler-policy; import ietf-traffic-policy { prefix traffic-policy; } import ietf-qos-action { prefix qos-action; } import ietf-diffserv { prefix diffserv; } import iana-qos-types { prefix qos-types; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } organization "IETF Routing Area Working Group."; contact "WG Web: <https://datatracker.ietf.org/wg/rtgwg/> Choudhary, et al. Expires 3 August 2024 [Page 53] Internet-Draft YANG Models for QoS January 2024 WG List: <mailto:rtgwg@ietf.org> Editor: Aseem Choudhary <mailto:achoudhary@aviatrix.com> Editor: Mahesh Jethanandani <mailto:mjethanandani@gmail.com>"; description "This module contains a collection of YANG definitions for configuring QoS scheduler policies. Copyright (c) 2023 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision 2024-01-31 { description "Initial version."; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } augment "/traffic-policy:policies/traffic-policy:policy" + "/traffic-policy:classifier/traffic-policy:inline" + "/traffic-policy:filter" { when "derived-from-or-self(../../../traffic-policy:type, " + "'qos-types:scheduler-policy-type')" { description "This filter can be used only when policy type is scheduler-policy."; } choice filter-params { description "Choice of filter parameters."; case filter-match-all { uses diffserv:filter-match-all; description "A filter that matches all packets."; } Choudhary, et al. Expires 3 August 2024 [Page 54] Internet-Draft YANG Models for QoS January 2024 } description "Augments Queue Policy Classifier to add filter parameters."; } augment "/traffic-policy:policies/traffic-policy:policy/" + "traffic-policy:classifier/traffic-policy:action" { when "derived-from-or-self(../../traffic-policy:type, " + "'qos-types:scheduler-policy-type')" { description "These actions apply only when policy type is scheduler-policy."; } choice action-params { description "Choice of action parameters that can be taken."; case scheduler { uses qos-action:scheduler; } case queue-policy-name { container queue-policy-name { leaf queue-policy { type leafref { path "/traffic-policy:policies/" + "traffic-policy:policy/traffic-policy:name"; } must "derived-from-or-self(/traffic-policy:policies" + "/traffic-policy:policy/traffic-policy:type," + "'qos-types:queue-policy-type')"; mandatory true; description "This leafref refers to Queue Policy name."; } description "Container for Queue Policy name."; } } } description "Augments Queue Policy Classifier to add in Action parameters for Scheduler policy."; } } <CODE ENDS> Choudhary, et al. Expires 3 August 2024 [Page 55] Internet-Draft YANG Models for QoS January 2024 Figure 11: ietf-scheduler-policy module 4.6. Queue Policy Module Queue Policy module augments the Traffic Policy module. It augments to allow queues to be referred to in a policy. The match is based on Traffic group and action parameters which are defined in QoS Action module. module: ietf-queue-policy augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:inline /traffic-policy:filter: +--rw (filter-params)? +--:(traffic-group) | +--rw traffic-group | ... +--:(filter-match-all) +--rw match-all ... augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:action: +--rw (action-params)? +--:(queue-template-name) | +--rw queue-reference | ... +--:(queue-inline) +--rw queue ... Figure 12: ietf-queue-policy abridged tree diagram <CODE BEGINS> file "ietf-queue-policy@2024-01-31.yang" module ietf-queue-policy { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-queue-policy"; prefix queue-policy; import ietf-traffic-policy { prefix traffic-policy; } import ietf-qos-action { prefix qos-action; } import ietf-diffserv { prefix diffserv; Choudhary, et al. Expires 3 August 2024 [Page 56] Internet-Draft YANG Models for QoS January 2024 } import iana-qos-types { prefix qos-types; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } organization "IETF Routing Area Working Group."; contact "WG Web: <https://datatracker.ietf.org/wg/rtgwg/> WG List: <mailto:rtgwg@ietf.org> Editor: Aseem Choudhary <mailto:achoudhary@aviatrix.com> Editor: Mahesh Jethanandani <mailto:mjethanandani@gmail.com>"; description "This module contains a collection of YANG definitions for QoS Queue policies. Copyright (c) 2023 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision 2024-01-31 { description "Initial version."; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } augment "/traffic-policy:policies/traffic-policy:policy" + "/traffic-policy:classifier/traffic-policy:inline" + "/traffic-policy:filter" { when "derived-from-or-self(../../../traffic-policy:type, " + "'qos-types:queue-policy-type')" { Choudhary, et al. Expires 3 August 2024 [Page 57] Internet-Draft YANG Models for QoS January 2024 description "If policy type is Queue Policy, this filter can be used."; } choice filter-params { description "Choice of Action types."; case traffic-group { uses diffserv:traffic-group; description "Traffic group name."; } case filter-match-all { uses diffserv:filter-match-all; description "When the filter type is set to match all packets."; } } description "Augments Queue Policy to add filter types."; } augment "/traffic-policy:policies/traffic-policy:policy" + "/traffic-policy:classifier/traffic-policy:action" { when "derived-from-or-self(../../traffic-policy:type," + "'qos-types:queue-policy-type')" { description "Queue Policy actions."; } choice action-params { description "Choice of different action parameters that can be taken."; case queue-template-name { uses qos-action:queue-reference; } case queue-inline { uses qos-action:queue; } } description "Augments Queue Policy action to add Queue template reference or Queue inline."; } } <CODE ENDS> Choudhary, et al. Expires 3 August 2024 [Page 58] Internet-Draft YANG Models for QoS January 2024 Figure 13: ietf-queue-policy module 4.7. IANA QoS Types Module The QoS Types module contains all the type definitions used by the other QoS modules. <CODE BEGINS> file "iana-qos-types@2024-01-31.yang" module iana-qos-types { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:iana-qos-types"; prefix qos-types; organization "IETF Routing Area Working Group"; contact "WG Web: <https://datatracker.ietf.org/wg/rtgwg/> WG List: <mailto:rtgwg@ietf.org> Editor: Aseem Choudhary <mailto:asechoud@cisco.com> Editor: Mahesh Jethanandani <mailto:mjethanandani@gmail.com>"; description "This module contains type definitions for all QoS types. Copyright (c) 2022 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision 2024-01-31 { description "Initial version"; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } Choudhary, et al. Expires 3 August 2024 [Page 59] Internet-Draft YANG Models for QoS January 2024 /* * Features. */ feature child-policy { description " This feature allows configuration of hierarchical policy."; } feature count { description "This feature allows action configuration to enable counter in a classifier"; } feature named-counter { description "This feature allows action configuration to enable named counter in a classifier"; } /* * Identities. */ identity policy-type { description "Base identity for policy type."; } identity diffserv-policy-type { base policy-type; description "Policy type defined as DiffServ."; } identity ipv4-diffserv-policy-type { base policy-type; description "Policy type defined as a DiffServ IPv4 policy type."; } identity ipv6-diffserv-policy-type { base policy-type; description "Policy type defined as a DiffServ IPv6 policy type."; } identity queue-policy-type { base policy-type; description "Policy type defined as a queue policy type."; } identity scheduler-policy-type { base policy-type; description Choudhary, et al. Expires 3 August 2024 [Page 60] Internet-Draft YANG Models for QoS January 2024 "Policy type defined as a scheduler policy type."; } identity action-type { description "Base identity for the action type."; } identity dscp-marking { base action-type; description "Action type defined as DSCP marking."; } identity meter-inline { base action-type; description "Action type defined as meter inline."; } identity meter-reference { base action-type; description "Action type defined as meter reference."; } identity queue { base action-type; description "Action type defined as queue."; } identity scheduler { base action-type; description "Action type defined as scheduler."; } identity discard { base action-type; description "Action type defined as discard."; } identity child-policy { if-feature child-policy; base action-type; description "Action type defined as child policy."; } identity count { if-feature count; base action-type; description "Action type defined as count."; Choudhary, et al. Expires 3 August 2024 [Page 61] Internet-Draft YANG Models for QoS January 2024 } identity named-counter { if-feature named-counter; base action-type; description "Action type specified as a named counter."; } identity queue-policy-name { base action-type; description "Action type specified as a queue policy name."; } identity meter-type { description "Base identity for types of meter."; } identity one-rate-two-color { base meter-type; description "Meter type specified as one rate two color meter."; } identity one-rate-tri-color { base meter-type; description "Meter type specified as one rate three color meter."; } identity two-rate-tri-color { base meter-type; description "Meter type specified as two rate three color meter."; } identity drop-type { description "Base identity for drop algorithm."; } identity tail-drop { base drop-type; description "Drop algorithm specified as tail drop."; } identity red { base drop-type; description "Drop algorithm specified as RED."; } identity wred { Choudhary, et al. Expires 3 August 2024 [Page 62] Internet-Draft YANG Models for QoS January 2024 base drop-type; description "Drop algorithm specified as WRED."; } identity rate-unit-type { description "Base definition for the type of rate unit."; } identity bits-per-second { base rate-unit-type; description "Rate specified in bits per second."; } identity percent { base rate-unit-type; description "Rate specified as a percentage of queue depth."; } identity burst-unit-type { description "Base definition for burst specification."; } identity bytes { base burst-unit-type; description "Burst specified in bytes."; } identity microsecond { base burst-unit-type; description "Burst specified in microseconds."; } identity red-threshold-unit { description "Base definition for RED threshold specification."; } identity red-threshold-bytes { base red-threshold-unit; description "RED threshold specified in bytes."; } identity red-threshold-us { base red-threshold-unit; description "RED threshold specified in microseconds."; Choudhary, et al. Expires 3 August 2024 [Page 63] Internet-Draft YANG Models for QoS January 2024 } identity red-threshold-pc { base red-threshold-unit; description "RED threshold specified as a percentage."; } identity red-theshold-pt { base red-threshold-unit; description "RED threshold specified per-thousand."; } identity wred-color-type { description "Base identity for WRED color type."; } identity wred-color-dscp { base wred-color-type; description "WRED color specified by DSCP."; } identity probability-unit { description "Base definition for probability unit."; } identity probability-pc { base probability-unit; description "Probability specified in percentage."; } identity probability-pt { base probability-unit; description "Probability specified in unit of per thousand."; } identity probability-denominator { base probability-unit; description "Probability value specified as a denominator value while numerator is always 1."; } identity filter-type { description "Base identity for filter type."; } Choudhary, et al. Expires 3 August 2024 [Page 64] Internet-Draft YANG Models for QoS January 2024 identity dscp { base filter-type; description "Filter type specified as DSCP."; } identity source-ipv4-prefix { base filter-type; description "Filter type specified as source IPv4 prefix."; } identity destination-ipv4-prefix { base filter-type; description "Filter type specified as destination IPv4 prefix."; } identity source-ipv6-prefix { base filter-type; description "Filter type specified as source IPv6 prefix."; } identity destination-ipv6-prefix { base filter-type; description "Filter type specified as destination IPv6 prefix."; } identity source-port { base filter-type; description "Filter type specified as source port."; } identity destination-port { base filter-type; description "Filter type specified as destination port."; } identity protocol { base filter-type; description "Filter type specified as protocol."; } identity traffic-group-name { base filter-type; description "Filter type specified as traffic group name."; } identity filter-match-all { base filter-type; description Choudhary, et al. Expires 3 August 2024 [Page 65] Internet-Draft YANG Models for QoS January 2024 "Filter type specified as match all."; } typedef match-operation-type { type enumeration { enum match-all { description "Classifier entry filters logical AND operation"; } enum match-any { description "Classifier entry filters logical OR operation"; } } default "match-all"; description "Filter match logical operation type"; } identity direction { description "Base identity for traffic direction"; } identity ingress { base direction; description "Direction of traffic coming into the network entry"; } identity egress { base direction; description "Direction of traffic going out of the network entry"; } identity meter-action-type { description "Base identify for actions related to metering"; } identity action-drop { base meter-action-type; description "Drop packets that conform/exceed/violate to the set value."; } identity action-transmit { base meter-action-type; description "Transmit packets that conform/exceed/violate to the set value."; Choudhary, et al. Expires 3 August 2024 [Page 66] Internet-Draft YANG Models for QoS January 2024 } identity action-mark { base meter-action-type; description "Mark packets that conform/exceed/violate to the set value."; } identity clear-counters-type { description "Base identify for clear interface counters related options"; } identity all-counters { base clear-counters-type; description "Clear all counters in both directions."; } identity inbound-counters { base clear-counters-type; description "Clear counters in inbound direction."; } identity outbound-counters { base clear-counters-type; description "Clear counters in outbound direction."; } } <CODE ENDS> Figure 14: iana-qos-types module 5. IANA Considerations This document registers seven URIs and seven YANG modules. 5.1. URI Registration Following the format in the IETF XML registry [RFC3688], the following registration is requested to be made: URI: urn:ietf:params:xml:ns:yang:iana-qos-types URI: urn:ietf:params:xml:ns:yang:ietf-diffserv URI: urn:ietf:params:xml:ns:yang:ietf-qos-action URI: urn:ietf:params:xml:ns:yang:ietf-qos-oper URI: urn:ietf:params:xml:ns:yang:ietf-queue-policy URI: urn:ietf:params:xml:ns:yang:ietf-scheduler-policy URI: urn:ietf:params:xml:ns:yang:ietf-traffic-policy Choudhary, et al. Expires 3 August 2024 [Page 67] Internet-Draft YANG Models for QoS January 2024 Registrant Contact: The IESG. XML: N/A, the requested URI is an XML namespace. 5.2. YANG Module Name Registration This document registers seven YANG modules in the YANG Module Names registry YANG [RFC6020]. name: iana-qos-types namespace: urn:ietf:params:xml:ns:yang:iana-qos-types prefix: qos-types reference: RFC XXXX name: ietf-diffserv namespace: urn:ietf:params:xml:ns:yang:ietf-diffserv prefix: diffserv reference: RFC XXXX name: ietf-qos-action namespace: urn:ietf:params:xml:ns:yang:ietf-qos-action prefix: action reference: RFC XXXX name: ietf-qos-oper namespace: urn:ietf:params:xml:ns:yang:ietf-qos-oper prefix: oper reference: RFC XXXX name: ietf-queue-policy namespace: urn:ietf:params:xml:ns:yang:ietf-queue-policy prefix: queue-policy reference: RFC XXXX name: ietf-scheduler-policy namespace: urn:ietf:params:xml:ns:yang:ietf-scheduler-policy prefix: scheduler-policy reference: RFC XXXX name: ietf-traffic-policy namespace: urn:ietf:params:xml:ns:yang:ietf-traffic-policy prefix: policy reference: RFC XXXX Choudhary, et al. Expires 3 August 2024 [Page 68] Internet-Draft YANG Models for QoS January 2024 6. Security Considerations The YANG module specified in this document defines a schema for data that is designed to be accessed via network management protocols such as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport layer, and the mandatory-to-implement secure transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the mandatory-to-implement secure transport is TLS [RFC8446]. The NETCONF Access Control Model (NACM) [RFC8341] provides the means to restrict access for particular NETCONF or RESTCONF users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content. There are a number of data nodes defined in this YANG module that are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive or vulnerable in some network environments. Write operations (e.g., edit-config) to these data nodes without proper protection can have a negative effect on network operations. Some of the subtrees and data nodes and their sensitivity/vulnerability are described here. - 'filter-operation' and 'filter'. 'filter-operation' includes the ability to 'match all', which is a logical AND operation or 'match any', which is a logical OR operation. Both the operations have an impact on the traffic that is being classified. Similarly, the 'filter' list decides what parts of the packet will examined, which will also impact the traffic that is being classified. - 'action'. The 'action' decides what action will be taken on the packet. That includes whether the packet will be marked, queued, or just discarded. Some of the readable data nodes in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control read access (e.g., via get, get-config, or notification) to these data nodes. Some of the subtrees and data nodes and their sensitivity/vulnerability are: - 'conform-pkts', 'conform-bytes', 'exceed-pkts', 'exceed-bytes', 'voilate-pkts' or 'voilate-bytes'. All these statistics combined with their 'meter-id' are an indication of what is happening in the network, and can allow for an intruder insight into how to disrupt the traffic. - 'tail-drop-pkts', 'red-drop-bytes', 'wred-stats' are examples of statistics that indicate the kind of traffic that is being profiled for drop or marked for Explicit Congestion Notification (ECN), and can give an insight into the operation of a network. Choudhary, et al. Expires 3 August 2024 [Page 69] Internet-Draft YANG Models for QoS January 2024 Some of the RPC operations in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control access to these operations. These are the operations and their sensitivity/vulnerability: - The model allows for statistics to be cleared by the 'clear' RPC operation, causing all the individual statistics to be cleared. 7. Acknowledgement The authors wish to thank Ruediger Geib, Fred Baker, Greg Mirsky, Tom Petch, Acee Lindem, many others for their helpful comments. 8. Contributors The following people have substantially contributed to the editing of this document: Norm Strahle Email: nstrahle@juniper.net . Shitanshu Shah Email: svshah@cisco.com . 9. References 9.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>. [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010, <https://www.rfc-editor.org/info/rfc6020>. [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6991, DOI 10.17487/RFC6991, July 2013, <https://www.rfc-editor.org/info/rfc6991>. [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016, <https://www.rfc-editor.org/info/rfc7950>. Choudhary, et al. Expires 3 August 2024 [Page 70] Internet-Draft YANG Models for QoS January 2024 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>. [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, <https://www.rfc-editor.org/info/rfc8342>. [RFC8343] Bjorklund, M., "A YANG Data Model for Interface Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, <https://www.rfc-editor.org/info/rfc8343>. 9.2. Informative References [RFC2474] Nichols, K., Blake, S., Baker, F., and D. Black, "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers", RFC 2474, DOI 10.17487/RFC2474, December 1998, <https://www.rfc-editor.org/info/rfc2474>. [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., and W. Weiss, "An Architecture for Differentiated Services", RFC 2475, DOI 10.17487/RFC2475, December 1998, <https://www.rfc-editor.org/info/rfc2475>. [RFC2697] Heinanen, J. and R. Guerin, "A Single Rate Three Color Marker", RFC 2697, DOI 10.17487/RFC2697, September 1999, <https://www.rfc-editor.org/info/rfc2697>. [RFC2698] Heinanen, J. and R. Guerin, "A Two Rate Three Color Marker", RFC 2698, DOI 10.17487/RFC2698, September 1999, <https://www.rfc-editor.org/info/rfc2698>. [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004, <https://www.rfc-editor.org/info/rfc3688>. [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, <https://www.rfc-editor.org/info/rfc6241>. [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, <https://www.rfc-editor.org/info/rfc6242>. Choudhary, et al. Expires 3 August 2024 [Page 71] Internet-Draft YANG Models for QoS January 2024 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, <https://www.rfc-editor.org/info/rfc8040>. [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, <https://www.rfc-editor.org/info/rfc8340>. [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487/RFC8341, March 2018, <https://www.rfc-editor.org/info/rfc8341>. [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, <https://www.rfc-editor.org/info/rfc8446>. Appendix A. Complete tree Diagrams This section carries complete tree diagrams of each module defined in this draft. The tree diagrams use the notation defined in YANG Tree Diagrams [RFC8340]. A.1. Traffic Policy Module Tree Diagram Choudhary, et al. Expires 3 August 2024 [Page 72] Internet-Draft YANG Models for QoS January 2024 module: ietf-traffic-policy +--rw classifiers | +--rw classifier* [name] | +--rw name string | +--rw description? string | +--rw filter-operation? qos-types:match-operation-type | +--rw filter* [type logical-not] | +--rw type identityref | +--rw logical-not boolean +--rw policies +--rw policy* [name type] +--rw name string +--rw type identityref +--rw description? string +--rw classifier* [name] +--rw name string +--rw inline! | +--rw filter-operation? | | qos-types:match-operation-type | +--rw filter* [type logical-not] | +--rw type identityref | +--rw logical-not boolean +--rw action* [type] +--rw type identityref augment /if:interfaces/if:interface: +--rw qos-target-policy* [direction type] +--rw direction identityref +--rw type identityref +--rw name string Figure 15: Traffic Policy Tree Diagram A.2. QoS Action Module Tree Diagram module: ietf-qos-action +--rw meters | +--rw meter* [name] | +--rw name string | +--rw (meter-types)? | +--:(single-rate-two-color-meter-type) | | +--rw single-rate-two-color-meter | | +--rw committed-information-rate? uint64 | | +--rw committed-burst-size? uint64 | | +--rw conform-action | | | +--rw action-type? identityref | | | +--rw dscp-mark? inet:dscp | | | +--rw traffic-group-mark? string Choudhary, et al. Expires 3 August 2024 [Page 73] Internet-Draft YANG Models for QoS January 2024 | | +--rw exceed-action | | +--rw action-type? identityref | | +--rw dscp-mark? inet:dscp | | +--rw traffic-group-mark? string | +--:(single-rate-three-color-meter-type) | | +--rw single-rate-three-color-meter | | +--rw committed-information-rate? uint64 | | +--rw committed-burst-size? uint64 | | +--rw excess-burst-size? uint64 | | +--rw conform-action | | | +--rw action-type? identityref | | | +--rw dscp-mark? inet:dscp | | | +--rw traffic-group-mark? string | | +--rw exceed-action | | | +--rw action-type? identityref | | | +--rw dscp-mark? inet:dscp | | | +--rw traffic-group-mark? string | | +--rw violate-action | | +--rw action-type? identityref | | +--rw dscp-mark? inet:dscp | | +--rw traffic-group-mark? string | +--:(two-rate-three-color-meter-type) | +--rw two-rate-three-color-meter | +--rw committed-information-rate? uint64 | +--rw committed-burst-size? uint64 | +--rw peak-information-rate? uint64 | +--rw peak-burst-size? uint64 | +--rw conform-action | | +--rw action-type? identityref | | +--rw dscp-mark? inet:dscp | | +--rw traffic-group-mark? string | +--rw exceed-action | | +--rw action-type? identityref | | +--rw dscp-mark? inet:dscp | | +--rw traffic-group-mark? string | +--rw violate-action | +--rw action-type? identityref | +--rw dscp-mark? inet:dscp | +--rw traffic-group-mark? string +--rw queues +--rw queue* [name] +--rw name string +--rw queue +--rw priority | +--rw level? uint8 +--rw min-rate | +--rw value? uint64 | +--rw unit? identityref Choudhary, et al. Expires 3 August 2024 [Page 74] Internet-Draft YANG Models for QoS January 2024 +--rw max-rate | +--rw value? uint64 | +--rw unit? identityref | +--rw burst-value? uint64 | +--rw burst-unit? identityref +--rw algorithmic-drop +--rw (drop-algorithm)? +--:(tail-drop) | +--rw tail-drop | +--rw tail-drop? empty +--:(red) | +--rw red | +--rw min-threshold-val? uint64 | +--rw min-threshold-unit? identityref | +--rw max-threshold-val? uint64 | +--rw max-threshold-unit? identityref | +--rw weight? uint8 | +--rw max-probability-val? uint64 | +--rw max-probability-unit? identityref | +--rw ecn-enabled? boolean +--:(wred) +--rw wred +--rw wred* [profile] | +--rw profile uint8 | +--rw color-type? identityref | +--rw color-val* [min max] | | +--rw min uint8 | | +--rw max uint8 | +--rw min-threshold-val? uint64 | +--rw min-threshold-unit? identityref | +--rw max-threshold-val? uint64 | +--rw max-threshold-unit? identityref | +--rw weight? uint8 | +--rw max-probability-val? uint64 | +--rw max-probability-unit? identityref +--rw ecn-enabled? boolean Figure 16: QoS Action Module Tree Diagram A.3. DiffServ Module Tree Diagram module: ietf-diffserv augment /traffic-policy:classifiers/traffic-policy:classifier /traffic-policy:filter: +--rw (filter-param)? +--:(dscp) | +--rw dscp* [min max] Choudhary, et al. Expires 3 August 2024 [Page 75] Internet-Draft YANG Models for QoS January 2024 | +--rw min inet:dscp | +--rw max inet:dscp +--:(source-ipv4-prefix) | +--rw source-ipv4-prefix* [prefix] | +--rw prefix inet:ipv4-prefix +--:(destination-ipv4-prefix) | +--rw destination-ipv4-prefix* [prefix] | +--rw prefix inet:ipv4-prefix +--:(source-ipv6-prefix) | +--rw source-ipv6-prefix* [prefix] | +--rw prefix inet:ipv6-prefix +--:(destination-ipv6-prefix) | +--rw destination-ipv6-prefix* [prefix] | +--rw prefix inet:ipv6-prefix +--:(source-port) | +--rw source-port* [min max] | +--rw min inet:port-number | +--rw max inet:port-number +--:(destination-port) | +--rw destination-port* [min max] | +--rw min inet:port-number | +--rw max inet:port-number +--:(protocol) | +--rw protocol* [min max] | +--rw min uint8 | +--rw max uint8 +--:(traffic-group) | +--rw traffic-group | +--rw name? string +--:(filter-match-all) +--rw match-all +--rw action? empty augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:inline /traffic-policy:filter: +--rw (filter-params)? +--:(dscp) | +--rw dscp* [min max] | +--rw min inet:dscp | +--rw max inet:dscp +--:(source-ipv4-prefix) | +--rw source-ipv4-prefix* [prefix] | +--rw prefix inet:ipv4-prefix +--:(destination-ipv4-prefix) | +--rw destination-ipv4-prefix* [prefix] | +--rw prefix inet:ipv4-prefix +--:(source-ipv6-prefix) | +--rw source-ipv6-prefix* [prefix] Choudhary, et al. Expires 3 August 2024 [Page 76] Internet-Draft YANG Models for QoS January 2024 | +--rw prefix inet:ipv6-prefix +--:(destination-ipv6-prefix) | +--rw destination-ipv6-prefix* [prefix] | +--rw prefix inet:ipv6-prefix +--:(source-port) | +--rw source-port* [min max] | +--rw min inet:port-number | +--rw max inet:port-number +--:(destination-port) | +--rw destination-port* [min max] | +--rw min inet:port-number | +--rw max inet:port-number +--:(protocol) | +--rw protocol* [min max] | +--rw min uint8 | +--rw max uint8 +--:(traffic-group) | +--rw traffic-group | +--rw name? string +--:(filter-match-all) +--rw match-all +--rw action? empty augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:action: +--rw (action-params)? +--:(dscp-marking) | +--rw dscp | +--rw dscp? inet:dscp +--:(meter-inline) | +--rw (meter-types)? | +--:(single-rate-two-color-meter-type) | | +--rw single-rate-two-color-meter | | +--rw committed-information-rate? uint64 | | +--rw committed-burst-size? uint64 | | +--rw conform-action | | | +--rw action-type? identityref | | | +--rw dscp-mark? inet:dscp | | | +--rw traffic-group-mark? string | | +--rw exceed-action | | +--rw action-type? identityref | | +--rw dscp-mark? inet:dscp | | +--rw traffic-group-mark? string | +--:(single-rate-three-color-meter-type) | | +--rw single-rate-three-color-meter | | +--rw committed-information-rate? uint64 | | +--rw committed-burst-size? uint64 | | +--rw excess-burst-size? uint64 | | +--rw conform-action Choudhary, et al. Expires 3 August 2024 [Page 77] Internet-Draft YANG Models for QoS January 2024 | | | +--rw action-type? identityref | | | +--rw dscp-mark? inet:dscp | | | +--rw traffic-group-mark? string | | +--rw exceed-action | | | +--rw action-type? identityref | | | +--rw dscp-mark? inet:dscp | | | +--rw traffic-group-mark? string | | +--rw violate-action | | +--rw action-type? identityref | | +--rw dscp-mark? inet:dscp | | +--rw traffic-group-mark? string | +--:(two-rate-three-color-meter-type) | +--rw two-rate-three-color-meter | +--rw committed-information-rate? uint64 | +--rw committed-burst-size? uint64 | +--rw peak-information-rate? uint64 | +--rw peak-burst-size? uint64 | +--rw conform-action | | +--rw action-type? identityref | | +--rw dscp-mark? inet:dscp | | +--rw traffic-group-mark? string | +--rw exceed-action | | +--rw action-type? identityref | | +--rw dscp-mark? inet:dscp | | +--rw traffic-group-mark? string | +--rw violate-action | +--rw action-type? identityref | +--rw dscp-mark? inet:dscp | +--rw traffic-group-mark? string +--:(meter-reference) | +--rw meter | +--rw name string | +--rw type identityref +--:(traffic-group-marking) | +--rw traffic-group | +--rw traffic-group? string +--:(child-policy) {qos-types:child-policy}? | +--rw child-policy {qos-types:child-policy}? | +--rw name? string +--:(count) {qos-types:count}? | +--rw count {qos-types:count}? | +--rw count-action? empty +--:(named-count) {qos-types:named-counter}? | +--rw named-counter {qos-types:named-counter}? | +--rw count-name-action? string +--:(queue-inline) | +--rw queue | +--rw priority Choudhary, et al. Expires 3 August 2024 [Page 78] Internet-Draft YANG Models for QoS January 2024 | | +--rw level? uint8 | +--rw min-rate | | +--rw value? uint64 | | +--rw unit? identityref | +--rw max-rate | | +--rw value? uint64 | | +--rw unit? identityref | | +--rw burst-value? uint64 | | +--rw burst-unit? identityref | +--rw algorithmic-drop | +--rw (drop-algorithm)? | +--:(tail-drop) | | +--rw tail-drop | | +--rw tail-drop? empty | +--:(red) | | +--rw red | | +--rw min-threshold-val? uint64 | | +--rw min-threshold-unit? identityref | | +--rw max-threshold-val? uint64 | | +--rw max-threshold-unit? identityref | | +--rw weight? uint8 | | +--rw max-probability-val? uint64 | | +--rw max-probability-unit? identityref | | +--rw ecn-enabled? boolean | +--:(wred) | +--rw wred | +--rw wred* [profile] | | +--rw profile uint8 | | +--rw color-type? identityref | | +--rw color-val* [min max] | | | +--rw min uint8 | | | +--rw max uint8 | | +--rw min-threshold-val? uint64 | | +--rw min-threshold-unit? identityref | | +--rw max-threshold-val? uint64 | | +--rw max-threshold-unit? identityref | | +--rw weight? uint8 | | +--rw max-probability-val? uint64 | | +--rw max-probability-unit? identityref | +--rw ecn-enabled? boolean +--:(scheduler-inline) +--rw scheduler +--rw min-rate | +--rw value? uint64 | +--rw unit? identityref +--rw max-rate +--rw value? uint64 +--rw unit? identityref Choudhary, et al. Expires 3 August 2024 [Page 79] Internet-Draft YANG Models for QoS January 2024 +--rw burst-value? uint64 +--rw burst-unit? identityref Figure 17: DiffServ Module Tree Diagram A.4. QoS Operational Module Tree Diagram module: ietf-qos-oper augment /if:interfaces/if:interface: +--ro qos-interface-statistics +--ro stats-per-direction* [] | +--ro direction? identityref | +--ro policy-name? string | +--ro classifier* [] | | +--ro name? string | | +--ro classified-pkts? yang:zero-based-counter64 | | +--ro classified-bytes? yang:zero-based-counter64 | | +--ro classified-rate? yang:gauge64 | +--ro named* [] | | +--ro name? string | | +--ro aggregated | | | +--ro pkts? yang:zero-based-counter64 | | | +--ro bytes? yang:zero-based-counter64 | | | +--ro rate? yang:gauge64 | | +--ro non-aggregated | | +--ro classifier* [] | | | +--ro name? string | | | +--ro classified-pkts? | | | | yang:zero-based-counter64 | | | +--ro classified-bytes? | | | | yang:zero-based-counter64 | | | +--ro classified-rate? yang:gauge64 | | +--ro metering* [] | | | +--ro meter-id? string | | | +--ro conform-pkts? yang:zero-based-counter64 | | | +--ro conform-bytes? yang:zero-based-counter64 | | | +--ro conform-rate? yang:gauge64 | | | +--ro exceed-pkts? yang:zero-based-counter64 | | | +--ro exceed-bytes? yang:zero-based-counter64 | | | +--ro exceed-rate? yang:gauge64 | | | +--ro violate-pkts? yang:zero-based-counter64 | | | +--ro violate-bytes? yang:zero-based-counter64 | | | +--ro violate-rate? yang:gauge64 | | | +--ro drop-pkts? yang:zero-based-counter64 | | | +--ro drop-bytes? yang:zero-based-counter64 | | +--ro queueing* [] | | +--ro queue-id? string Choudhary, et al. Expires 3 August 2024 [Page 80] Internet-Draft YANG Models for QoS January 2024 | | +--ro transmit-pkts? | | | yang:zero-based-counter64 | | +--ro transmit-bytes? | | | yang:zero-based-counter64 | | +--ro queue-current-size-bytes? yang:gauge64 | | +--ro queue-average-size-bytes? yang:gauge64 | | +--ro queue-peak-size-bytes? yang:gauge64 | | +--ro tail-drop-pkts? | | | yang:zero-based-counter64 | | +--ro tail-drop-bytes? | | | yang:zero-based-counter64 | | +--ro red-drop-pkts? | | | yang:zero-based-counter64 | | +--ro red-drop-bytes? | | | yang:zero-based-counter64 | | +--ro red-ecn-marked-pkts? | | | yang:zero-based-counter64 | | +--ro red-ecn-marked-bytes? | | | yang:zero-based-counter64 | | +--ro wred-stats* [] | | +--ro profile? uint8 | | +--ro drop-pkts? | | | yang:zero-based-counter64 | | +--ro drop-bytes? | | | yang:zero-based-counter64 | | +--ro ecn-marked-pkts? | | | yang:zero-based-counter64 | | +--ro ecn-marked-bytes? | | yang:zero-based-counter64 | +--ro metering* [] | | +--ro meter-id? string | | +--ro conform-pkts? yang:zero-based-counter64 | | +--ro conform-bytes? yang:zero-based-counter64 | | +--ro conform-rate? yang:gauge64 | | +--ro exceed-pkts? yang:zero-based-counter64 | | +--ro exceed-bytes? yang:zero-based-counter64 | | +--ro exceed-rate? yang:gauge64 | | +--ro violate-pkts? yang:zero-based-counter64 | | +--ro violate-bytes? yang:zero-based-counter64 | | +--ro violate-rate? yang:gauge64 | | +--ro drop-pkts? yang:zero-based-counter64 | | +--ro drop-bytes? yang:zero-based-counter64 | +--ro queueing* [] | +--ro queue-id? string | +--ro transmit-pkts? | | yang:zero-based-counter64 | +--ro transmit-bytes? | | yang:zero-based-counter64 Choudhary, et al. Expires 3 August 2024 [Page 81] Internet-Draft YANG Models for QoS January 2024 | +--ro queue-current-size-bytes? yang:gauge64 | +--ro queue-average-size-bytes? yang:gauge64 | +--ro queue-peak-size-bytes? yang:gauge64 | +--ro tail-drop-pkts? | | yang:zero-based-counter64 | +--ro tail-drop-bytes? | | yang:zero-based-counter64 | +--ro red-drop-pkts? | | yang:zero-based-counter64 | +--ro red-drop-bytes? | | yang:zero-based-counter64 | +--ro red-ecn-marked-pkts? | | yang:zero-based-counter64 | +--ro red-ecn-marked-bytes? | | yang:zero-based-counter64 | +--ro wred-stats* [] | +--ro profile? uint8 | +--ro drop-pkts? yang:zero-based-counter64 | +--ro drop-bytes? yang:zero-based-counter64 | +--ro ecn-marked-pkts? yang:zero-based-counter64 | +--ro ecn-marked-bytes? yang:zero-based-counter64 +---x clear +---w input | +---w category? identityref | +---w started-at? yang:date-and-time +--ro output +--ro finished-at? yang:date-and-time Figure 18: QoS Operational Module Tree Diagram A.5. Scheduler Policy Module Tree Diagram Choudhary, et al. Expires 3 August 2024 [Page 82] Internet-Draft YANG Models for QoS January 2024 module: ietf-scheduler-policy augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:inline /traffic-policy:filter: +--rw (filter-params)? +--:(filter-match-all) +--rw match-all +--rw action? empty augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:action: +--rw (action-params)? +--:(scheduler) | +--rw scheduler | +--rw min-rate | | +--rw value? uint64 | | +--rw unit? identityref | +--rw max-rate | +--rw value? uint64 | +--rw unit? identityref | +--rw burst-value? uint64 | +--rw burst-unit? identityref +--:(queue-policy-name) +--rw queue-policy-name +--rw queue-policy -> /traffic-policy:policies/policy/name Figure 19: Scheduler Policy Module Tree Diagram A.6. Queue Policy Module Tree Diagram module: ietf-queue-policy augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:inline /traffic-policy:filter: +--rw (filter-params)? +--:(traffic-group) | +--rw traffic-group | +--rw name? string +--:(filter-match-all) +--rw match-all +--rw action? empty augment /traffic-policy:policies/traffic-policy:policy /traffic-policy:classifier/traffic-policy:action: +--rw (action-params)? +--:(queue-template-name) | +--rw queue-reference Choudhary, et al. Expires 3 August 2024 [Page 83] Internet-Draft YANG Models for QoS January 2024 | +--rw queue-name string +--:(queue-inline) +--rw queue +--rw priority | +--rw level? uint8 +--rw min-rate | +--rw value? uint64 | +--rw unit? identityref +--rw max-rate | +--rw value? uint64 | +--rw unit? identityref | +--rw burst-value? uint64 | +--rw burst-unit? identityref +--rw algorithmic-drop +--rw (drop-algorithm)? +--:(tail-drop) | +--rw tail-drop | +--rw tail-drop? empty +--:(red) | +--rw red | +--rw min-threshold-val? uint64 | +--rw min-threshold-unit? identityref | +--rw max-threshold-val? uint64 | +--rw max-threshold-unit? identityref | +--rw weight? uint8 | +--rw max-probability-val? uint64 | +--rw max-probability-unit? identityref | +--rw ecn-enabled? boolean +--:(wred) +--rw wred +--rw wred* [profile] | +--rw profile uint8 | +--rw color-type? identityref | +--rw color-val* [min max] | | +--rw min uint8 | | +--rw max uint8 | +--rw min-threshold-val? uint64 | +--rw min-threshold-unit? identityref | +--rw max-threshold-val? uint64 | +--rw max-threshold-unit? identityref | +--rw weight? uint8 | +--rw max-probability-val? uint64 | +--rw max-probability-unit? identityref +--rw ecn-enabled? boolean Figure 20: Queue Policy Module Tree Diagram Choudhary, et al. Expires 3 August 2024 [Page 84] Internet-Draft YANG Models for QoS January 2024 Appendix B. Company A and Company B examples Company A and Company B DiffServ modules augments all the filter types of the QoS Classifier module as well as the QoS Policy module that allow it to define marking, metering, min-rate, max-rate actions. Queueing and metering counters are realized by augmenting of the QoS Target module. B.1. Example of Company A DiffServ Model The following Company A vendor example augments the QoS and DiffServ model, demonstrating some of the following functionality: - use of template based classifier definitions - use of single policy type modelling queue, scheduler policy, and a filter policy. All of these policies either augment the QoS policy or the DiffServ modules - use of inline actions in a policy - flexibility in marking dscp or metadata at ingress and/or egress. module example-compa-diffserv { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:example-compa-diffserv"; prefix example; import iana-qos-types { prefix qos-types; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } import ietf-traffic-policy { prefix traffic-policy; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } import ietf-qos-action { prefix qos-action; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } import ietf-diffserv { prefix diffserv; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } Choudhary, et al. Expires 3 August 2024 [Page 85] Internet-Draft YANG Models for QoS January 2024 organization "Company A"; contact "Editor: XYZ <mailto:xyz@compa.com>"; description "This module contains a collection of YANG definitions of companyA diffserv specification extension."; revision 2024-01-31 { description "Initial revision for diffserv actions on network packets."; reference "RFC XXXX: A YANG Data Model for Quality of Service (QoS)."; } identity default-policy-type { base qos-types:policy-type; description "This defines default policy-type."; } identity qos-group { base qos-types:filter-type; description "Filter-type to match on packet metadata. This metadata can be used for packet marking, queuing for traffic in egress direction."; } grouping qos-group { list qos-group { key "min max"; description "List of qos-groups to match on. A QoS group is a set of packets tagged as group."; leaf min { type uint8; description "Minimum value of qos-group range."; } leaf max { type uint8; must ". >= ../min" { error-message "The qos-group max must be greater than or equal to qos-group min."; } description "Maximum value of qos-group range."; Choudhary, et al. Expires 3 August 2024 [Page 86] Internet-Draft YANG Models for QoS January 2024 } } description "Filter containing list of qos-group ranges."; } grouping bw-remaining-percent { container bw-remaining-percent { leaf value { type uint8; units "percentage"; description "Percentage of the remaining bandwidth present."; } description "Remaining bandwidth of the link in percent."; } description "Grouping for bandwidth remaining after reserved and priority bandwidth."; } grouping qos-group-marking { container qos-group { leaf qos-group { type uint8; description "Mark metadata information in the network packet"; } description "Container for QoS-Group marking."; } description "Grouping for QoS-Group marking."; } augment "/traffic-policy:classifiers/" + "traffic-policy:classifier/" + "traffic-policy:filter/diffserv:filter-param" { case qos-group { uses qos-group; description "Filter containing list of qos-group ranges. QoS-group represent packet metadata information in a network packet."; } description "Augmentation of classifier filters."; } Choudhary, et al. Expires 3 August 2024 [Page 87] Internet-Draft YANG Models for QoS January 2024 augment "/traffic-policy:policies/traffic-policy:policy/" + "traffic-policy:classifier/" + "traffic-policy:action" { choice action-params { case priority { uses qos-action:priority; } case min-rate { uses qos-action:min-rate; } case max-rate { uses qos-action:max-rate; } case bw-remaining { uses bw-remaining-percent; } case mark-qos-group { uses qos-group-marking; } description "Choice of action parameters."; } description "Augments policy entry to add action parameters."; } augment "/traffic-policy:policies" + "/traffic-policy:policy" + "/traffic-policy:classifier" + "/traffic-policy:action" + "/diffserv:action-params" + "/diffserv:meter-inline" + "/diffserv:meter-types" + "/diffserv:single-rate-two-color-meter-type" + "/diffserv:single-rate-two-color-meter" { description "Augment the single-rate-two-color meter to add" + "color classifiers."; container conform-color { uses traffic-policy:generic-classifier-attr; description "Conform color classifier container."; } container exceed-color { uses traffic-policy:generic-classifier-attr; description "Exceed color classifier container."; } Choudhary, et al. Expires 3 August 2024 [Page 88] Internet-Draft YANG Models for QoS January 2024 } augment "/traffic-policy:policies" + "/traffic-policy:policy" + "/traffic-policy:classifier" + "/traffic-policy:action" + "/diffserv:action-params" + "/diffserv:meter-inline" + "/diffserv:meter-types" + "/diffserv:single-rate-three-color-meter-type" + "/diffserv:single-rate-three-color-meter" { description "Augment the one-rate-tri-color meter to add" + "color classifiers."; container conform-color { uses traffic-policy:generic-classifier-attr; description "Conform color classifier container."; } container exceed-color { uses traffic-policy:generic-classifier-attr; description "Exceed color classifier container."; } container violate-color { uses traffic-policy:generic-classifier-attr; description "Violate color classifier container."; } } augment "/traffic-policy:policies" + "/traffic-policy:policy" + "/traffic-policy:classifier" + "/traffic-policy:action" + "/diffserv:action-params" + "/diffserv:meter-inline" + "/diffserv:meter-types" + "/diffserv:two-rate-three-color-meter-type" + "/diffserv:two-rate-three-color-meter" { description "Augment the two-rate-tri-color meter to add" + "color classifiers."; container conform-color { uses traffic-policy:generic-classifier-attr; description "Conform color classifier container."; } Choudhary, et al. Expires 3 August 2024 [Page 89] Internet-Draft YANG Models for QoS January 2024 container exceed-color { uses traffic-policy:generic-classifier-attr; description "Exceed color classifier container."; } container violate-color { uses traffic-policy:generic-classifier-attr; description "Violate color classifier container."; } } } B.2. Example of Company B DiffServ Model The following vendor example augments the QoS and DiffServ model, demonstrating some of the following functionality: - use of inline classifier definitions (defined inline in the policy vs referencing an externally defined classifier) - use of mulitple policy types, e.g. a queue policy, a scheduler policy, and a filter policy. All of these policies either augment the QoS policy or the DiffServ modules - use of a queue module, which uses and extends the queue grouping from the QoS Action module - use of meter templates (v.s. meter inline) - use of internal meta data for classification and marking module example-compb-diffserv-filter-policy { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:" + "example-compb-diffserv-filter-policy"; prefix compb-filter-policy; import iana-qos-types { prefix qos-types; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } import ietf-traffic-policy { prefix traffic-policy; } import ietf-qos-action { prefix qos-action; Choudhary, et al. Expires 3 August 2024 [Page 90] Internet-Draft YANG Models for QoS January 2024 } import ietf-diffserv { prefix diffserv; } organization "Company B"; contact "Editor: XYZ <mailto:xyz@compb.com>"; description "This module contains a collection of YANG definitions for configuring diffserv specification implementations. Copyright (c) 2022 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision 2024-01-31 { description "Initial revision of diffserv policy for Company B."; reference "RFC XXXX: YANG Data Model for QoS."; } /************************************************* * Classification types *************************************************/ identity internal-loss-priority { base qos-types:filter-type; description "Internal loss priority filter type."; } grouping loss-priority { Choudhary, et al. Expires 3 August 2024 [Page 91] Internet-Draft YANG Models for QoS January 2024 list loss-priority { key "loss-priority"; description "list of loss-priorities"; leaf loss-priority { type enumeration { enum high { description "High loss Priority."; } enum medium-high { description "Medium to high loss priority."; } enum medium-low { description "Medium to low loss priority."; } enum low { description "Low loss priority."; } } description "Loss priority."; } } description "Filter containing list of loss priorities"; } augment "/traffic-policy:policies" + "/traffic-policy:policy" + "/traffic-policy:classifier" + "/traffic-policy:inline/traffic-policy:filter" + "/diffserv:filter-params" { case internal-loss-priority { uses loss-priority; description "Filter Type Internal-loss-priority"; } description "Augments Diffserv Classifier with vendor " + "specific types."; } /************************************************* * Actions *************************************************/ identity mark-loss-priority { base qos-types:action-type; Choudhary, et al. Expires 3 August 2024 [Page 92] Internet-Draft YANG Models for QoS January 2024 description "Mark loss-priority action type."; } grouping mark-loss-priority { container mark-loss-priority { leaf loss-priority { type enumeration { enum high { description "High loss Priority."; } enum medium-high { description "Medium to high loss priority."; } enum medium-low { description "Medium to low loss priority."; } enum low { description "Low loss priority."; } } description "Loss priority."; } description "Mark loss priority container."; } description "Mark loss priority grouping."; } augment "/traffic-policy:policies" + "/traffic-policy:policy" + "/traffic-policy:classifier" + "/traffic-policy:action" + "/diffserv:action-params" { case traffic-group-marking { uses qos-action:traffic-group-marking; description "Mark traffic group in the packet."; } case mark-loss-priority { uses mark-loss-priority; description "Mark loss priority in the packet."; } case meter-reference { uses qos-action:meter-reference; Choudhary, et al. Expires 3 August 2024 [Page 93] Internet-Draft YANG Models for QoS January 2024 description "Assign a meter as an action."; } case discard { uses qos-action:discard; description "Discard action."; } case count { uses qos-action:count; description "Count action - explicit count configuration."; } description "Augments common diffserv policy actions"; } augment "/qos-action:meters" + "/qos-action:meter" + "/qos-action:meter-types" + "/qos-action:single-rate-three-color-meter-type" + "/qos-action:single-rate-three-color-meter" { leaf one-rate-color-aware { type boolean; description "This defines if the meter is color-aware."; } description "Augmentation of color-aware flag."; } augment "/qos-action:meters" + "/qos-action:meter" + "/qos-action:meter-types" + "/qos-action:two-rate-three-color-meter-type" + "/qos-action:two-rate-three-color-meter" { leaf two-rate-color-aware { type boolean; description "This defines if the meter is color-aware."; } description "Augmentation of color-aware flag."; } } module example-compb-queue-policy { Choudhary, et al. Expires 3 August 2024 [Page 94] Internet-Draft YANG Models for QoS January 2024 yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:example-compb-queue-policy"; prefix queue-plcy; import iana-qos-types { prefix qos-types; reference "RFC XXXX: YANG Models for Quality of Service (QoS)."; } import ietf-traffic-policy { prefix traffic-policy; } organization "Company B"; contact "Editor: XYZ <mailto:xyz@compb.com>"; description "This module defines a queue policy. The classification is based on aforwarding class, and the actions are queues. Copyright (c) 2014 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision 2024-01-31 { description "Initial revision of diffserv policy"; reference "RFC XXXX: A YANG Data Model for Quality of Service (QoS)."; } identity compb-queue { base qos-types:action-type; description "compb-queue action type"; } Choudhary, et al. Expires 3 August 2024 [Page 95] Internet-Draft YANG Models for QoS January 2024 grouping compb-queue-name { container queue-name { leaf name { type string; description "Queue class name"; } description "compb queue container"; } description "compb-queue grouping"; } augment "/traffic-policy:policies" + "/traffic-policy:policy" + "/traffic-policy:classifier" + "/traffic-policy:action" { choice action-params { description "Choice of action types"; case compb-queue { uses compb-queue-name; } } description "Augment the queue actions to queue policy entry"; } } module example-compb-queue { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-compb-queue"; prefix compb-queue; import ietf-qos-action { prefix qos-action; reference "RFC XXXX: YANG Model for QoS"; } organization "Company B"; contact "Editor: XYZ <mailto:xyz@compb.com>"; description "This module describes a compb queue module. This is a template for a queue within a queue policy, referenced Choudhary, et al. Expires 3 August 2024 [Page 96] Internet-Draft YANG Models for QoS January 2024 by name. This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision 2024-01-31 { description "Initial revision of diffserv based classifier"; reference "RFC XXXX: YANG Data Model for Quality of Service (QoS)."; } container compb-queue { description "Queue used in compb architecture"; leaf name { type string; description "A unique name identifying this queue"; } uses qos-action:queue; container excess-rate { choice excess-rate-type { case percent { leaf excess-rate-percent { type uint32 { range "1..100"; } description "excess-rate-percent"; } } case proportion { leaf excess-rate-poroportion { type uint32 { range "1..1000"; } description "excess-rate-poroportion"; } } description "Choice of excess-rate type"; } description "Excess rate value"; } leaf excess-priority { Choudhary, et al. Expires 3 August 2024 [Page 97] Internet-Draft YANG Models for QoS January 2024 type enumeration { enum high { description "High Loss Priority"; } enum medium-high { description "Medium-high Loss Priority"; } enum medium-low { description "Medium-low Loss Priority"; } enum low { description "Low Loss Priority"; } enum none { description "No excess priority"; } } description "Priority of excess (above guaranted rate) traffic"; } container buffer-size { choice buffer-size-type { case percent { leaf buffer-size-percent { type uint32 { range "1..100"; } description "buffer-size-percent"; } } case temporal { leaf buffer-size-temporal { type uint64; units "microsecond"; description "buffer-size-temporal"; } } case remainder { leaf buffer-size-remainder { type empty; description "use remaining of buffer"; } } description "Choice of buffer size type"; Choudhary, et al. Expires 3 August 2024 [Page 98] Internet-Draft YANG Models for QoS January 2024 } description "Buffer size value"; } } augment "/compb-queue/queue/algorithmic-drop" + "/drop-algorithm" { case random-detect { list drop-profile-list { key "priority"; description "map of priorities to drop-algorithms"; leaf priority { type enumeration { enum any { description "Any priority mapped here"; } enum high { description "High Priority Packet"; } enum medium-high { description "Medium-high Priority Packet"; } enum medium-low { description "Medium-low Priority Packet"; } enum low { description "Low Priority Packet"; } } description "Priority of guaranteed traffic"; } leaf drop-profile { type string; description "drop profile to use for this priority"; } } } description "compb random detect drop algorithm config"; } } module example-compb-scheduler-policy { Choudhary, et al. Expires 3 August 2024 [Page 99] Internet-Draft YANG Models for QoS January 2024 yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:" + "example-compb-scheduler-policy"; prefix scheduler-plcy; import ietf-qos-action { prefix qos-action; reference "RFC XXXX: A YANG Data Model for Quality of Service (QoS)."; } import ietf-traffic-policy { prefix traffic-policy; reference "RFC XXXX: A YANG Data Model for Quality of Service (QoS)."; } organization "Company B"; contact "Editor: XYZ <mailto:xyz@compb.com>"; description "This module defines a scheduler policy. The classification is based on classifier-any, and the action is a scheduler."; revision 2024-01-31 { description "Initial revision of diffserv policy"; reference "RFC XXXX: A YANG Data Model for Quality of Service (QoS)."; } grouping queue-policy-name { container compb-queue-policy-name { leaf name { type string; description "Queue policy name"; } description "compb-queue-policy container"; } description "compb-queue policy grouping"; } Choudhary, et al. Expires 3 August 2024 [Page 100] Internet-Draft YANG Models for QoS January 2024 augment "/traffic-policy:policies" + "/traffic-policy:policy" + "/traffic-policy:classifier" + "/traffic-policy:action" { choice action-params { case scheduler { uses qos-action:scheduler; } case queue-policy { uses queue-policy-name; } description "Augment the scheduler policy with a queue policy"; } description "Augmentation of the scheduler policy with a queue policy"; } } Appendix C. Configuration examples This section describes several examples of how the models defined in this draft can be used for configuration. C.1. Configuration example for QoS Classifier Choudhary, et al. Expires 3 August 2024 [Page 101] Internet-Draft YANG Models for QoS January 2024 <!-- This example shows a QoS classifier configuration. This classifier will match on any packet which has dscp value not in the range of 11-13 and source-port value which is in the range of either 10000-10300 or 17540-19800. In other words, packets with dscp value 0-10 or 14-63 and source-port value 10000-10300 or 17540-19800 --> <?xml version="1.0" encoding="UTF-8"?> <classifiers xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types"> <classifier> <name>my-classifier</name> <filter-operation>match-all</filter-operation> <filter> <type>qt:dscp</type> <logical-not>true</logical-not> <dscp xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <min>11</min> <max>13</max> </dscp> </filter> <filter> <type>qt:source-port</type> <logical-not>false</logical-not> <source-port xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <min>10000</min> <max>10300</max> </source-port> <source-port xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <min>17540</min> <max>19800</max> </source-port> </filter> </classifier> </classifiers> Figure 21: Configuration example for QoS Classifier C.2. Configuration example for QoS Policy Choudhary, et al. Expires 3 August 2024 [Page 102] Internet-Draft YANG Models for QoS January 2024 <!-- This example shows a QoS policy configuration. --> <?xml version="1.0" encoding="UTF-8"?> <policies xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types"> <policy> <name>my-policy</name> <type>qt:diffserv-policy-type</type> <classifier> <name>my-classifier</name> <inline> <filter> <type>qt:dscp</type> <logical-not>false</logical-not> <dscp xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <min>21</min> <max>22</max> </dscp> </filter> </inline> <action> <type>qt:dscp-marking</type> <dscp xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <dscp>23</dscp> </dscp> </action> </classifier> </policy> </policies> Figure 22: Configuration example for QoS Policy C.3. Configuration example for QoS Policing <!-- This example shows a QoS policy configuration for a single rate two color policing. For a description of the problem refer to: https://networklessons.com/quality-of-service/ policing-configuration-example --> <?xml version="1.0" encoding="UTF-8"?> <classifiers Choudhary, et al. Expires 3 August 2024 [Page 103] Internet-Draft YANG Models for QoS January 2024 xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types"> <classifier> <name>ICMP</name> <description>class-map definition for ICMP</description> <filter> <type>qt:protocol</type> <logical-not>false</logical-not> <protocol xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <min>4</min> <max>4</max> </protocol> </filter> </classifier> </classifiers> <policies xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types"> <policy> <name>SINGLE-RATE-TWO-COLOR</name> <type>qt:diffserv-policy-type</type> <classifier> <name>ICMP</name> <action> <type>qt:meter-inline</type> <single-rate-two-color-meter xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <committed-information-rate>128000</committed-information-rate> <conform-action> <action-type>qt:action-transmit</action-type> </conform-action> <exceed-action> <action-type>qt:action-drop</action-type> </exceed-action> </single-rate-two-color-meter> </action> </classifier> </policy> </policies> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types" xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type"> <interface> <name>FastEthernet 0/0</name> Choudhary, et al. Expires 3 August 2024 [Page 104] Internet-Draft YANG Models for QoS January 2024 <type>ianaift:ethernetCsmacd</type> <qos-target-policy xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy"> <direction>qt:ingress</direction> <type>qt:diffserv-policy-type</type> <name>SINGLE-RATE-TWO-COLOR</name> </qos-target-policy> </interface> </interfaces> Figure 23: Configuration example for QoS Policing C.4. Configuration example for QoS Queueing <!-- This example shows a QoS policy configuration for queuing. For a description of the problem refer to: https://networklessons.com/quality-of-service/ queuing-configuration-example --> <?xml version="1.0" encoding="UTF-8"?> <classifiers xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types"> <classifier> <name>VOICE</name> <description>class-map definition for VOICE</description> <filter> <type>qt:protocol</type> <logical-not>false</logical-not> <dscp xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <min>46</min> <max>46</max> </dscp> </filter> </classifier> <classifier> <name>VIDEO</name> <description>class-map definition for VIDEO</description> <filter> <type>qt:protocol</type> <logical-not>false</logical-not> <dscp xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <min>34</min> <max>34</max> Choudhary, et al. Expires 3 August 2024 [Page 105] Internet-Draft YANG Models for QoS January 2024 </dscp> </filter> </classifier> <classifier> <name>DATA</name> <description>class-map definition for DATA</description> <filter> <type>qt:protocol</type> <logical-not>false</logical-not> <dscp xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <min>10</min> <max>10</max> </dscp> </filter> </classifier> </classifiers> <policies xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types"> <policy> <name>QUEUEING-POLICY</name> <type>qt:diffserv-policy-type</type> <classifier> <name>VOICE</name> <action> <type>qt:queue</type> <queue xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <priority> <level>1</level> </priority> <min-rate> <value>2000000</value> <unit>qt:bits-per-second</unit> </min-rate> <max-rate> <value>4000000</value> <unit>qt:bits-per-second</unit> </max-rate> </queue> </action> </classifier> <classifier> <name>VIDEO</name> <action> <type>qt:queue</type> Choudhary, et al. Expires 3 August 2024 [Page 106] Internet-Draft YANG Models for QoS January 2024 <queue xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <priority> <level>2</level> </priority> <min-rate> <value>10000000</value> <unit>qt:bits-per-second</unit> </min-rate> <max-rate> <value>30000000</value> <unit>qt:bits-per-second</unit> </max-rate> </queue> </action> </classifier> <classifier> <name>DATA</name> <action> <type>qt:queue</type> <queue xmlns="urn:ietf:params:xml:ns:yang:ietf-diffserv"> <priority> <level>2</level> </priority> <min-rate> <value>8000000</value> <unit>qt:bits-per-second</unit> </min-rate> <max-rate> <value>18000000</value> <unit>qt:bits-per-second</unit> </max-rate> </queue> </action> </classifier> </policy> </policies> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types" xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type"> <interface> <name>FastEthernet 0/0</name> <type>ianaift:ethernetCsmacd</type> <qos-target-policy xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy"> Choudhary, et al. Expires 3 August 2024 [Page 107] Internet-Draft YANG Models for QoS January 2024 <direction>qt:egress</direction> <type>qt:diffserv-policy-type</type> <name>QUEUEING-POLICY</name> </qos-target-policy> </interface> </interfaces> Figure 24: Configuration example for QoS Queueing C.5. Configuration example for QoS Scheduling <!-- This example shows a QoS policy configuration for scheduling. --> <?xml version="1.0" encoding="UTF-8"?> <policies xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy" xmlns:qp="urn:ietf:params:xml:ns:yang:ietf-queue-policy" xmlns:sp="urn:ietf:params:xml:ns:yang:ietf-scheduler-policy" xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-diffserv" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types"> <policy> <name>QUEUEING-POLICY</name> <type>qt:queue-policy-type</type> <classifier> <name>VOICE</name> <inline> <filter> <type>qt:traffic-group-name</type> <logical-not>false</logical-not> <traffic-group xmlns="urn:ietf:params:xml:ns:yang:ietf-queue-policy"> <name>voice</name> </traffic-group> </filter> </inline> <action> <type>qt:queue</type> <queue xmlns="urn:ietf:params:xml:ns:yang:ietf-queue-policy"> <priority> <level>1</level> </priority> <min-rate> <value>2000000</value> <unit>qt:bits-per-second</unit> Choudhary, et al. Expires 3 August 2024 [Page 108] Internet-Draft YANG Models for QoS January 2024 </min-rate> <max-rate> <value>4000000</value> <unit>qt:bits-per-second</unit> </max-rate> </queue> </action> </classifier> <classifier> <name>VIDEO</name> <inline> <filter> <type>qt:traffic-group-name</type> <logical-not>false</logical-not> <traffic-group xmlns="urn:ietf:params:xml:ns:yang:ietf-queue-policy"> <name>video</name> </traffic-group> </filter> </inline> <action> <type>qt:queue</type> <queue xmlns="urn:ietf:params:xml:ns:yang:ietf-queue-policy"> <priority> <level>2</level> </priority> <min-rate> <value>10000000</value> <unit>qt:bits-per-second</unit> </min-rate> <max-rate> <value>30000000</value> <unit>qt:bits-per-second</unit> </max-rate> </queue> </action> </classifier> <classifier> <name>DATA</name> <inline> <filter> <type>qt:traffic-group-name</type> <logical-not>false</logical-not> <traffic-group xmlns="urn:ietf:params:xml:ns:yang:ietf-queue-policy"> <name>data</name> </traffic-group> Choudhary, et al. Expires 3 August 2024 [Page 109] Internet-Draft YANG Models for QoS January 2024 </filter> </inline> <action> <type>qt:queue</type> <queue xmlns="urn:ietf:params:xml:ns:yang:ietf-queue-policy"> <priority> <level>2</level> </priority> <min-rate> <value>8000000</value> <unit>qt:bits-per-second</unit> </min-rate> <max-rate> <value>18000000</value> <unit>qt:bits-per-second</unit> </max-rate> </queue> </action> </classifier> </policy> <policy> <name>SCHEDULING-POLICY</name> <type>qt:scheduler-policy-type</type> <classifier> <name>ALL</name> <inline> <filter> <type>qt:filter-match-all</type> <logical-not>false</logical-not> <sp:match-all> <sp:action></sp:action> </sp:match-all> </filter> </inline> <action> <type>qt:scheduler</type> <scheduler xmlns="urn:ietf:params:xml:ns:yang:ietf-scheduler-policy"> <min-rate> <value>20000000</value> <unit>qt:bits-per-second</unit> </min-rate> <max-rate> <value>50000000</value> <unit>qt:bits-per-second</unit> </max-rate> </scheduler> Choudhary, et al. Expires 3 August 2024 [Page 110] Internet-Draft YANG Models for QoS January 2024 </action> <action> <type>qt:queue-policy-name</type> <queue-policy-name xmlns="urn:ietf:params:xml:ns:yang:ietf-scheduler-policy"> <queue-policy>QUEUEING-POLICY</queue-policy> </queue-policy-name> </action> </classifier> </policy> </policies> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:qt="urn:ietf:params:xml:ns:yang:iana-qos-types" xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type"> <interface> <name>FastEthernet 0/0</name> <type>ianaift:ethernetCsmacd</type> <qos-target-policy xmlns="urn:ietf:params:xml:ns:yang:ietf-traffic-policy"> <direction>qt:egress</direction> <type>qt:scheduler-policy-type</type> <name>SCHEDULING-POLICY</name> </qos-target-policy> </interface> </interfaces> Figure 25: Configuration example for QoS Scheduling Authors' Addresses Aseem Choudhary Aviatrix Systems 2901 Tasman Drive #109 Santa Clara, CA 95054 United States of America Email: achoudhary@aviatrix.com Mahesh Jethanandani Kloud Services Email: mjethanandani@gmail.com Choudhary, et al. Expires 3 August 2024 [Page 111] Internet-Draft YANG Models for QoS January 2024 Ebben Aries Juniper Networks 1194 North Mathilda Avenue Sunnyvale, CA 94089 United States of America Email: exa@juniper.net Ing-Wher Chen The MITRE Corporation Email: ingwherchen@mitre.org Choudhary, et al. Expires 3 August 2024 [Page 112]