This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task
Force (IETF). Note that other groups may also distribute working
documents as Internet-Drafts. The list of current Internet-Drafts is
at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 25 January 2024.¶
Copyright (c) 2023 IETF Trust and the persons identified as the
document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Revised BSD License text as described in
Section 4.e of the Trust Legal Provisions and are provided without
warranty as described in the Revised BSD License.¶
This document defines a YANG
1.1 [RFC7950] model for Quality of Service (QoS) configuration and
statistics parameters. Traffic Policy module defines the basic
building blocks to define a classifier, policy and target. QoS
Action module defines QoS action related parameters. Traffic
policy is augmented to include packet match and action
parameters to define the Differentiated Services (DiffServ)
policy, Queues policy and Scheduler policy. Each of these
policies are defined as separate modules. The DiffServ module is
based on DiffServ architecture, and various references have been
made to available standard architecture documents. QoS
statistics counters are defined in QoS Operational module.¶
DiffServ is a preferred approach for network service
providers to offer services to different customers based on
their network Quality-of-Service (QoS) objectives. The traffic
streams are differentiated based on DiffServ Code Points (DSCP)
carried in the IP header of each packet. The DSCP markings are
applied by upstream node or by the edge router on entry to the
DiffServ network.¶
This draft contains several placeholder values that need
to be replaced with finalized values at the time of
publication. Please apply the following replacements:¶
"XXXX" --> the assigned RFC value for this draft both in
this draft and in the yang modules under the revision
statement.¶
The "revision" date in model, in the format XXXX-XX-XX,
needs to be updated with the date the draft gets
approved.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in BCP 14 [RFC2119][RFC8174] when, and only when, they appear in
all capitals, as shown here.¶
Active Queue Management (AQM): An activity that marks
or drops packets before the queue is full.¶
Behavior Aggregate (BA): A DS behavior aggregate.¶
Classifier: an entity which selects packets based on
the content of packet headers according to defined
rules.¶
DS behavior aggregate: A collection of packets with
the same DS codepoint crossing a link in a particular
direction.¶
DS code point: A specific value of the DSCP portion of
the DS field, used to select a PHB.¶
DiffServ: Differentiated Services enhancements to
the Internet protocol are intended to enable scalable
service discrimination in the Internet without the need
for per-flow state and signaling at every hop. A
variety of services may be built from a small,
well-defined set of building blocks which are deployed
in network nodes.¶
Marking: the process of setting the DS codepoint in
a packet based on defined rules; pre-marking, re-marking.¶
Metering: the process of measuring the temporal
properties (e.g., rate) of a traffic stream
selected by a classifier. The instantaneous state of
this process may be used to affect the operation of a
marker, shaper, or dropper, and/or may be used for
accounting and measurement purposes.¶
MF Classifier: A multi-field (MF) classifier which
selects packets based on the content of some arbitrary
number of header fields; typically some combination of
source address, destination address, DS field, protocol
ID, source port and destination port.¶
Per-Hop-Behavior (PHB): The externally observable
forwarding behavior applied at a DS-compliant node to a DS
behavior aggregate.¶
Policing: the process of
discarding packets (by a dropper) within a traffic stream
in accordance with the state of a corresponding meter
enforcing a traffic profile.¶
The overall objective of this model design is to offer a
base set of modules that can then be further augmented to
provide other models, such as Differentiated Services (DiffServ)
and Policy Based Routing (PBR). Those models
would augment the base modules defined in this draft to define
their own model. This document defines one such model, DiffServ. The
design also takes into consideration that vendors might want to
extend the model to add their own extensions, such as to extend
Traffic Policy module, to provide constructs of policy for
different QoS functionalities."¶
The above diagram depicts the design of the QoS model. It
uses Traffic Policy and QoS Action as base modules, which are
augmented by the remaining modules on the top to define
different aspects of QoS.¶
The Classifier is defined as part of Traffic Policy Module. A
classifier consists of set of filters and an operation that is
performed on those filters. Each filter defines a rule on a
particular packet header or packet metadata field that dictate
how the packet will be classified based on that particular
field, e.g. whether it will be classified based on DSCP, or will
be classified based on source IPv4 address prefix. The operation
defines whether these filters are logically AND or OR. The
filters may be based on a combination of values or range of
values of different packet header fields or packet metadata
fields. An example of how these filter definitions are used can
be seen in the DiffServ model. The DiffServ model augments the
filter node in the Classifier to add in DiffServ specific filter
parameters.¶
One or more packet conditioning functions may be applied
to a classifier which may drop, mark, or delay packets.
These are defined in the QoS Action module. A set of
classifiers with corresponding conditioning functions when
arranged in order of priority represent a QoS policy.
These policies are defined in Traffic Policy module.¶
The QoS Action module defines marking, metering and
queuing. QoS actions are configured in line or referred to in
DiffServ, Queuing, and Scheduling Policy modules.¶
A Meter meters each packet and passes the packet and the
metering result to the Marker. Meter is modeled based on
commonly used algorithms in industry, A
Single Rate Three Color Marker (srTCM) [RFC2697], A Two Rate Three Color Marker (trTCM) [RFC2698],
and A Single Rate Two Color Marker. Different vendors can extend
it with other types of meters as well. Meter is defined in QoS
Action module.¶
Queue Policy module allows queues to be referred in a
policy. The match is based on traffic group and action
parameters are used as defined in QoS Action module.¶
Scheduling Policy module defines a set of scheduling
parameters and associates Queue Policy with it.¶
QoS counters are defined in QoS Operational module. It includes
counters for Classifiers, Meters and Queues associated with a QoS
policy applied in each direction of traffic. To modularize and for
reusability, grouping have been defined for various counters of
Classifier, Meters and Queues. The target is assumed to be
interface but the groupings can be used for any other target
type where QoS policy is applied.¶
Definition of the Differentiated
Services Field (DS Field) in the IPv4 and IPv6 Headers [RFC2475]
describes the architecture as a simple model where traffic
entering a network is classified and possibly conditioned at the
boundary of the network and assigned a different Behavior
Aggregate (BA). Each BA is identified by a specific value of
DSCP, and is used to select a Per Hop Behavior (PHB).¶
The packet classification policy identifies the subset of
traffic which may receive a DiffServ by being conditioned or
mapped. Packet classifiers select packets within a stream based
on the content of some portion of the packet header. There are
two types of classifiers, the BA classifier, and the Multi-Field
(MF) classifier which selects packets based on a value which is
combination of one or more header fields. In the DiffServ Policy
module, this is realized by augmenting the classifier in
Traffic Policy module.¶
Traffic conditioning includes metering, shaping and/or
marking. A Meter is used to measure the traffic against a given
traffic profile. The traffic profile specifies the temporal
property of the traffic. A packet that arrives is first
determined to be in or out of the profile, which will result in
the action of marked, dropped or shaped. This is realized in
vendor specific modules based on the parameters defined in
action module. The metering parameters are augmented to the QoS
policy module when metering is defined inline, and to the
metering template when metering profile is referred in policy
module.¶
This document defines support for A
Single Rate Three Color Marker (srTCM) [RFC2697], which is one of
the components in a An Architecture for
Differentiated Services [RFC2475]. The srTCM meters a traffic
stream and marks its packets according to three traffic
parameters, Committed Information Rate (CIR), Committed Burst
Size (CBS), and Excess Burst Size (EBS), to be either green,
yellow, or red. A packet is marked green if it doesn't exceed
the CBS, yellow if it does exceed the CBS, but not the EBS,
and red otherwise.¶
This document defines support for A
Two Rate Three Color Marker (trTCM) [RFC2698], which is one of
the components in a An Architecture for
Differentiated Services [RFC2475]. The trTCM meters a traffic
stream and marks its packets according to two rates, Peak
Information Rate (PIR), the Committed Information Rate (CIR),
and their associated burst sizes to either green, yellow, or
red. A packet is marked red if it exceeds the PIR. Otherwise,
it is marked yellow or green depending on whether it exceeds
or does not exceed the CIR.¶
Traffic Policy module contains list of classifiers
identified by a classifier name. Each classifier MAY contain a
list of filters.¶
This module also contains list of policy objects identified
by a policy name and policy type which MUST be
provided. Policy-type is of type identity and is populated in
a vendor specific manner. With different values of policy
types, each vendor MAY define their own construct of policy
for different QoS functionalities. Each vendor MAY augment
classifier entry in a policy definition with a set of
actions.¶
The module also augments A YANG Data
Model for Interface Management [RFC8343] module to add a target
policy. A single policy of a particular policy-type can be
applied on an interface in each direction of traffic.¶
QoS Action module includes actions such marking, metering,
or queuing. Metering, marking, queuing, and scheduling actions
are realized by augmenting the Traffic Policy module. Marking
sets DiffServ codepoint value in the classified
packet.¶
QoS Operational module contains all operational
statistics. It contains statistics related to classifier,
metering, queueing, and named.¶
Classifier statistics consist of list of classifier entries
identified by a classifier entry name. Classifier counters
include matched packets and bytes, and average rate of traffic
matching a particular classifier.¶
Metering statistics consist of meters identified by an
identifier. Metering counters include conform, exceed,
violate, drop packets, and bytes.¶
Queuing counters include instantaneous, peak, average queue
length, as well as output conform, exceed, tail drop packets
and bytes.¶
Named statistics is defined as statistics which is tagged
by a name. This could be aggregated or non-aggregated.
Aggregated named statistics is defined as counters which are
aggregated across classifier entries in a policy applied to an
interface in a particular direction. Non-aggregated named
statistics are counters of classifier, metering or queuing
which have the same tag name but maintained separately.¶
A clear action is provided to clear all statistics
or statistics of a particular kind.¶
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.¶
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.¶
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.¶
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <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, , <https://www.rfc-editor.org/info/rfc6020>.
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <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, , <https://www.rfc-editor.org/info/rfc8342>.
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, , <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, , <https://www.rfc-editor.org/info/rfc2475>.
Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, , <https://www.rfc-editor.org/info/rfc6241>.
Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487/RFC8341, , <https://www.rfc-editor.org/info/rfc8341>.
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].¶
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.¶
- 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¶
- 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).";
}
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 2023-07-20 {
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.";
}
}
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.";
}
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.";
}
}
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.";
}
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.";
}
}
}
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 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;
}
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 2023-07-20 {
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 {
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;
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;
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 {
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 2023-07-20 {
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";
}
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
by name.
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
revision 2023-07-20 {
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 {
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";
}
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 {
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 2023-07-20 {
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";
}
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";
}
}