YANG Model for Diffserv
draft-asechoud-netmod-diffserv-model-00
The information below is for an old version of the document.
| Document | Type | Active Internet-Draft (individual) | |
|---|---|---|---|
| Authors | Aseem Choudhary , Shitanshu Shah | ||
| Last updated | 2014-10-22 | ||
| Replaced by | draft-asechoud-netmod-qos-model | ||
| Stream | (None) | ||
| Formats | plain text htmlized pdfized bibtex | ||
| Stream | Stream state | (No stream defined) | |
| Consensus boilerplate | Unknown | ||
| RFC Editor Note | (None) | ||
| IESG | IESG state | I-D Exists | |
| Telechat date | (None) | ||
| Responsible AD | (None) | ||
| Send notices to | (None) |
draft-asechoud-netmod-diffserv-model-00
Network Working Group A. Choudhary
Internet-Draft S. Shah
Intended status: Standards Track Cisco Systems
Expires: April 25, 2015 October 22, 2014
YANG Model for Diffserv
draft-asechoud-netmod-diffserv-model-00
Abstract
This document describes a YANG model of Differentiated Services for
configuration and operations.
Status of This Memo
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 http://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 April 25, 2015.
Copyright Notice
Copyright (c) 2014 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
(http://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 Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Choudhary & Shah Expires April 25, 2015 [Page 1]
Internet-Draft YANG Model For Diffserv October 2014
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. Diffserv Model Design . . . . . . . . . . . . . . . . . . . . 3
4. Diffserv Model . . . . . . . . . . . . . . . . . . . . . . . 4
5. Diffserv Modules . . . . . . . . . . . . . . . . . . . . . . 9
5.1. IETF-DIFFSERV-CLASSIFIER . . . . . . . . . . . . . . . . 9
5.2. IETF-DIFFSERV-POLICY . . . . . . . . . . . . . . . . . . 14
5.3. IETF-DIFFSERV-ACTION . . . . . . . . . . . . . . . . . . 16
5.4. IETF-DIFFSERV-TARGET . . . . . . . . . . . . . . . . . . 24
6. Security Considerations . . . . . . . . . . . . . . . . . . . 25
7. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 25
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.1. Normative References . . . . . . . . . . . . . . . . . . 25
8.2. Informative References . . . . . . . . . . . . . . . . . 26
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26
1. Introduction
This document defines a YANG [RFC6020] data model for the
configuration, state data of Differentiated Services. Any RPC or
notification definition is not part of this document. As many
vendors have different object constructs to represent the same data,
it has been tried to design this model in a very flexible, extensible
and generic way to fit into most of the vendor requirements. The
model is based on Differentiated Services (Diffserv) architecture and
various references have been made to already available standard
architecture documents.
Diffserv is a preferred approach for network service providers to
offer services to different customers based on their different kinds
of network quality-of-service (QoS) objectives. The traffic streams
are differentiated based on Differentiated Services 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.
2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
Choudhary & Shah Expires April 25, 2015 [Page 2]
Internet-Draft YANG Model For Diffserv October 2014
3. Diffserv Model Design
Diffserv architecture [RFC3289] [RFC2475] describes network node
packet classification function and packet conditioning functions.
The complex classification is done at the edge of network and non-
edge network devices conditions appropriately marked aggregate
traffic based on per-hop behavior rules. Accordingly, a Multi-Field
classifier matches the different fields in a packet and a Behavior
Aggregated Classifier matches on DS codepoint field of a packet.
Packets MAY be grouped when a logical set of rules are applied on
different packet header fields. Also, packet grouping MAY be done
based on different values or range of values of same packet header
field. Packet grouping MAY also be done based on presence of some
values or range of values of a packet field or absence of such values
or ranges. This diffserv model is flexible enough to support such
logical grouping of packets.
A classifier entry can be stored as an object and used across
different interfaces for either of inbound or outbound traffic. Any
modification or deletion of such object will in turn results in such
changes to the classifier on the corresponding interfaces. A
classifier entry contains one or more packet conditioning functions.
A packet conditioning function is typically based on direction of
traffic and may drop, mark or delay network packets. A set of such
classifier entries with corresponding conditioning functions when
arranged in order of priority represents a diffserv policy. Any new
classifier entry in a policy MAY be inserted before or after any
other existing classifier-entry [RFC6020]. Such policies is stored
as an object and used across different network device interfaces.
A meter qualifies if the traffic arrival rate is based on agreed upon
rate and variability. A meter is generically modeled as qualifying
rate and variability defined as a token bucket. Single rate meter
[RFC2697] can be defined as two such token buckets with first
defining the rate and committed burst and excess burst for second
bucket. Similarly, two rates meter [RFC2698][RFC2859] can be defined
as two such token buckets with first and second defining the
committed rate and committed burst parameters and peak rate and peak
burst respectively. Different Vendors can extend it to have other
types of meters as well.
Metered traffic to each token bucket MAY either be marked or remarked
appropriately of the diffserv codepoint packet field or even MAY be
dropped. Classified packets through a classifier entry MAY directly
be marked.
Choudhary & Shah Expires April 25, 2015 [Page 3]
Internet-Draft YANG Model For Diffserv October 2014
Packets can be always dropped if exceed agreed upon rates or it could
be queued and then dropped based on any of various algorithms. Queue
dropping is based on the threshold configured and can head-drop,
tail-drop or dropped based on Active Queue Management algorithm like
Random Early Detection (RED). Packets can be scheduled out based on
priority with minimum-rate or WFQ with bandwidth sharing. Priority
scheduler allow queue to use the entire capacity of the interface
unless higher priority traffic is queued to be scheduled. If
combination of EF [RFC3246] and multiple AF [RFC3260] classes of
traffic needs to be scheduled, a combination of priority and WFQ
scheduler SHOULD be used. Traffic can be shaped by defining a max
rate and burst for a leaky bucket profile.
4. Diffserv Model
The model have four YANG modules. ietf-diffserv-classifier consists
of classifier entries identified by a classifier entry name. Each
such entry contains list of filter entries. Each filter entry
represent any of the filter type [RFC6991]` of a multi-field
classifier which can be logically AND/OR with other filter types in
the same classifier-entry. The model is flexible enough to take
multiple values of the same filter type.
Choudhary & Shah Expires April 25, 2015 [Page 4]
Internet-Draft YANG Model For Diffserv October 2014
module: ietf-diffserv-classifier
+--rw classifiers
+--rw classifier-entry* [classifier-entry-name]
+--rw classifier-entry-name string
+--rw classifier-entry-descr? string
+--rw classifier-entry-filter-operation? identityref
+--rw filter-entry* [filter-type filter-logical-not]
| +--rw filter-type identityref
| +--rw filter-logical-not boolean
| +--rw (filter-param)?
| +--:(dscp)
| | +--rw dscp-cfg* [dscp-min dscp-max]
| | +--rw dscp-min inet:dscp
| | +--rw dscp-max inet:dscp
| +--:(source-ip-address)
| | +--rw source-ip-address-cfg* [source-ip-addr]
| | +--rw source-ip-addr inet:ip-prefix
| +--:(destination-ip-address)
| | +--rw destination-ip-address-cfg*
[destination-ip-addr]
| | +--rw destination-ip-addr inet:ip-prefix
| +--:(source-port)
| | +--rw source-port-cfg*
[source-port-min source-port-max]
| | +--rw source-port-min inet:port-number
| | +--rw source-port-max inet:port-number
| +--:(destination-port)
| | +--rw destination-port-cfg*
[destination-port-min destination-port-max]
| | +--rw destination-port-min inet:port-number
| | +--rw destination-port-max inet:port-number
| +--:(protocol)
| +--rw protocol-cfg* [protocol-min protocol-max]
| +--rw protocol-min uint8
| +--rw protocol-max uint8
+--ro classifier-entry-statistics
+--ro classified-pkts? uint64
+--ro classified-bytes? uint64
+--ro classified-rate? uint64
An ietf-diffserv-policy module contains list of policy objects
identified by a policy name which MUST be provided. Each policy
object contains list of classifier-entries either configured inline
or referred as an object. Each such classifier entry is augmented by
set of actions. A policy object MAY contain a child-policy in each
classifier-entry. A child policy MAY further classify the traffic
and execute actions on classified packets.
Choudhary & Shah Expires April 25, 2015 [Page 5]
Internet-Draft YANG Model For Diffserv October 2014
module: ietf-diffserv-policy
+--rw policies
+--rw policy-entry* [policy-name]
+--rw policy-name string
+--rw policy-descr? string
+--rw classifier-entry* [classifier-entry-name]
+--rw classifier-entry-name leafref
+--rw classifier-entry-inline? boolean
+--rw classifier-entry-filter-oper? identityref
+--rw filter-entry* [filter-type filter-logical-not]
| +--rw filter-type identityref
| +--rw filter-logical-not boolean
| +--rw (filter-param)?
| +--:(dscp)
| | +--rw dscp-cfg* [dscp-min dscp-max]
| | +--rw dscp-min inet:dscp
| | +--rw dscp-max inet:dscp
| +--:(source-ip-address)
| | +--rw source-ip-address-cfg* [source-ip-addr]
| | +--rw source-ip-addr inet:ip-prefix
| +--:(destination-ip-address)
| | +--rw destination-ip-address-cfg*
[destination-ip-addr]
| | +--rw destination-ip-addr inet:ip-prefix
| +--:(source-port)
| | +--rw source-port-cfg*
[source-port-min source-port-max]
| | +--rw source-port-min inet:port-number
| | +--rw source-port-max inet:port-number
| +--:(destination-port)
| | +--rw destination-port-cfg*
[destination-port-min destination-port-max]
| | +--rw destination-port-min inet:port-number
| | +--rw destination-port-max inet:port-number
| +--:(protocol)
| +--rw protocol-cfg* [protocol-min protocol-max]
| +--rw protocol-min uint8
| +--rw protocol-max uint8
+--rw classifier-action-entry-cfg* [action-type]
| +--rw action-type identityref
| +--rw (action-cfg-params)?
+--rw child-policy? leafref
ietf-diffserv-action module contains set of diffserv actions which
are augmented to diffserv-policy module. Marking sets Diffserv
codepoint value in the classified packet. Color-aware and Color-
Choudhary & Shah Expires April 25, 2015 [Page 6]
Internet-Draft YANG Model For Diffserv October 2014
blind meters can be configured. Action counters are also augmented
to diffserv-policy module.
module: ietf-diffserv-action
augment /diffserv-policy:policies/diffserv-policy:policy-entry/
diffserv-policy:classifier-entry/
diffserv-policy:classifier-action-entry-cfg/
diffserv-policy:action-cfg-params:
+--:(marking)
| +--rw marking-cfg
| +--rw dscp? inet:dscp
+--:(priority)
| +--rw priority-cfg
| +--rw priority-level? uint8
| +--rw priority-rate? uint64
+--:(meter)
| +--rw meter-cfg
| +--rw meter-list* [meter-id]
| +--rw meter-id uint16
| +--rw meter-rate? uint64
| +--rw (burst-type)?
| | +--:(size)
| | | +--rw burst-size? uint64
| | +--:(interval)
| | +--rw burst-interval? uint64
| +--rw color
| | +--rw classifier-entry-name? string
| | +--rw classifier-entry-descr? string
| | +--rw classifier-entry-filter-operation? identityref
| +--rw meter-action-type? identityref
| +--rw (val)?
| | +--:(meter-action-mark)
| | | +--rw dscp? inet:dscp
| | +--:(meter-action-drop)
| | +--rw drop-action? boolean
| +--ro metered-pkts? uint64
| +--ro metered-bytes? uint64
| +--ro metered-rate? uint64
+--:(max-rate)
| +--rw max-rate-cfg
| +--rw absolute-rate? uint64
| +--rw (burst-type)?
| +--:(size)
| | +--rw burst-size? uint64
| +--:(interval)
| +--rw burst-interval? uint64
Choudhary & Shah Expires April 25, 2015 [Page 7]
Internet-Draft YANG Model For Diffserv October 2014
+--:(algorithmic-drop)
| +--rw (drop-algorithm)?
| +--:(always-drop)
| | +--rw drop-cfg
| | +--rw drop-action? boolean
| +--:(tail-drop)
| | +--rw tail-drop-cfg
| | +--rw qlimit-dscp-thresh* [dscp-min dscp-max]
| | +--rw dscp-min inet:dscp
| | +--rw dscp-max inet:dscp
| | +--rw threshold
| | +--rw (threshold-type)?
| | +--:(size)
| | | +--rw threshold-size? uint64
| | +--:(interval)
| | +--rw threshold-interval? uint64
| +--:(head-drop)
| | +--rw head-drop-cfg
| | +--rw qlimit-dscp-thresh* [dscp-min dscp-max]
| | +--rw dscp-min inet:dscp
| | +--rw dscp-max inet:dscp
| | +--rw threshold
| | +--rw (threshold-type)?
| | +--:(size)
| | | +--rw threshold-size? uint64
| | +--:(interval)
| | +--rw threshold-interval? uint64
| +--:(random-detect)
| +--rw random-detect-cfg
| +--rw exp-weighting-const? uint32
| +--rw mode-aggregate? boolean
| +--rw wred-dscp-thresh* [dscp-min dscp-max]
| +--rw dscp-min inet:dscp
| +--rw dscp-max inet:dscp
| +--rw wred-min-thresh
| | +--rw threshold
| | +--rw (threshold-type)?
| | +--:(size)
| | | +--rw threshold-size? uint64
| | +--:(interval)
| | +--rw threshold-interval? uint64
| +--rw wred-max-thresh
| | +--rw threshold
| | +--rw (threshold-type)?
| | +--:(size)
| | | +--rw threshold-size? uint64
| | +--:(interval)
| | +--rw threshold-interval? uint64
Choudhary & Shah Expires April 25, 2015 [Page 8]
Internet-Draft YANG Model For Diffserv October 2014
| +--rw mark-probability? uint32
+--:(min-rate)
+--rw min-rate-cfg
+--rw min-rate? uint64
augment /diffserv-policy:policies/diffserv-policy:policy-entry/
diffserv-policy:classifier-entry:
+--rw queuing-statistics
+--ro output-pkts? uint64
+--ro output-bytes? uint64
+--ro queue-size-pkts? uint64
+--ro queue-size-bytes? uint64
+--ro drop-pkts? uint64
+--ro drop-bytes? uint64
+--rw wred-statistics* [dscp-min dscp-max]
+--rw dscp-min inet:dscp
+--rw dscp-max inet:dscp
+--ro early-drop-pkts? uint64
+--ro early-drop-bytes? uint64
ietf-diffserv-target module contains reference of diffserv-policy for
either direction of network traffic and is augmented to ietf-
interfaces [RFC7223] module.
module: ietf-diffserv-target
augment /if:interfaces/if:interface:
+--rw diffserv-target-entry* [direction]
+--rw policy-name? string
+--rw policy-descr? string
+--rw direction identityref
5. Diffserv Modules
5.1. IETF-DIFFSERV-CLASSIFIER
module ietf-diffserv-classifier {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv-classifier";
prefix diffserv-classifier;
import ietf-inet-types {
prefix inet;
}
Choudhary & Shah Expires April 25, 2015 [Page 9]
Internet-Draft YANG Model For Diffserv October 2014
revision 2014-10-07 {
description
"First revision of diffserv based classifier";
}
identity filter-type {
description
" This is identity of base filter-type";
}
identity dscp {
base filter-type;
}
identity source-ip-address {
base filter-type;
}
identity destination-ip-address {
base filter-type;
}
identity source-port {
base filter-type;
}
identity destination-port {
base filter-type;
}
identity protocol {
base filter-type;
}
identity classifier-entry-filter-operation-type {
description
"Classifier entry filter logical operation";
}
identity match-any-filter {
base classifier-entry-filter-operation-type;
description
"Classifier entry filter logical OR operation";
}
identity match-all-filter {
base classifier-entry-filter-operation-type;
description
Choudhary & Shah Expires April 25, 2015 [Page 10]
Internet-Draft YANG Model For Diffserv October 2014
"Classifier entry filter logical AND operation";
}
grouping filters {
leaf filter-type {
type identityref {
base filter-type;
}
description
"This leaf defines type of the filter";
}
leaf filter-logical-not {
type boolean;
description
"
This is logical-not operator for a filter. When true, it
indicates filter looks for absence of a pattern defined
by the filter
";
}
choice filter-param {
case dscp {
list dscp-cfg {
key "dscp-min dscp-max";
leaf dscp-min {
type inet:dscp;
}
leaf dscp-max {
type inet:dscp;
}
}
description
"Filter containing list of dscp ranges";
}
case source-ip-address {
list source-ip-address-cfg {
key "source-ip-addr";
leaf source-ip-addr {
type inet:ip-prefix;
}
}
description
"Filter containing list of source ip addresses";
}
case destination-ip-address {
list destination-ip-address-cfg {
key "destination-ip-addr";
leaf destination-ip-addr {
Choudhary & Shah Expires April 25, 2015 [Page 11]
Internet-Draft YANG Model For Diffserv October 2014
type inet:ip-prefix;
}
}
description
"Filter containing list of destination ip address";
}
case source-port {
list source-port-cfg {
key "source-port-min source-port-max";
leaf source-port-min {
type inet:port-number;
}
leaf source-port-max {
type inet:port-number;
}
}
description
"Filter containing list of source-port ranges";
}
case destination-port {
list destination-port-cfg {
key "destination-port-min destination-port-max";
leaf destination-port-min {
type inet:port-number;
}
leaf destination-port-max {
type inet:port-number;
}
}
description
"Filter containing list of destination-port ranges";
}
case protocol {
list protocol-cfg {
key "protocol-min protocol-max";
leaf protocol-min {
type uint8 {
range "0..255";
}
}
leaf protocol-max {
type uint8 {
range "0..255";
}
}
}
description
"Filter Type Protocol";
Choudhary & Shah Expires April 25, 2015 [Page 12]
Internet-Draft YANG Model For Diffserv October 2014
}
}
}
grouping classifier-entry-generic-attr {
leaf classifier-entry-name {
type string;
description
"Diffserv classifier name";
}
leaf classifier-entry-descr {
type string;
description
"Description of the class template";
}
leaf classifier-entry-filter-operation {
type identityref {
base classifier-entry-filter-operation-type;
}
default "match-any-filter";
}
}
grouping classifier-entry-inline-attr {
leaf classifier-entry-inline {
type boolean;
description
"Indication of inline classifier entry";
default "false";
}
leaf classifier-entry-filter-oper {
type identityref {
base classifier-entry-filter-operation-type;
}
default "match-any-filter";
}
list filter-entry {
when "classifier-entry-inline == true";
key "filter-type filter-logical-not";
uses filters;
}
}
container classifiers {
description
"list of classifier entry";
list classifier-entry {
key "classifier-entry-name";
Choudhary & Shah Expires April 25, 2015 [Page 13]
Internet-Draft YANG Model For Diffserv October 2014
description
"classifier entry template";
uses classifier-entry-generic-attr;
list filter-entry {
key "filter-type filter-logical-not";
uses filters;
}
container classifier-entry-statistics {
config false;
description
"
This group defines the classifier filter statistics of
each classifier entry
";
leaf classified-pkts {
type uint64;
description
" Number of total packets which filtered
to the classifier-entry";
}
leaf classified-bytes {
type uint64;
description
" Number of total bytes which filtered
to the classifier-entry";
}
leaf classified-rate {
units "bits-per-second";
type uint64;
description
" Rate of average data flow through the
classifier-entry";
}
}
}
}
}
5.2. IETF-DIFFSERV-POLICY
module ietf-diffserv-policy {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv-policy";
prefix diffserv-policy;
import ietf-diffserv-classifier {
Choudhary & Shah Expires April 25, 2015 [Page 14]
Internet-Draft YANG Model For Diffserv October 2014
prefix classifier;
}
revision 2014-10-07 {
description
"First revision of diffserv policy";
}
grouping policy-generic-attr {
leaf policy-name {
type string;
description
"Diffserv policy name";
}
leaf policy-descr {
type string;
description
"Diffserv policy description";
}
}
identity action-type {
description
"This base identity type defines action-types";
}
container policies {
description
"list of policy templates";
list policy-entry {
key "policy-name";
description
"policy template";
uses policy-generic-attr;
list classifier-entry {
key "classifier-entry-name";
ordered-by user;
leaf classifier-entry-name {
type leafref {
path "/classifier:classifiers/classifier:classifier-entry/
classifier:classifier-entry-name";
}
}
uses classifier:classifier-entry-inline-attr;
list classifier-action-entry-cfg {
key "action-type";
ordered-by user;
leaf action-type {
Choudhary & Shah Expires April 25, 2015 [Page 15]
Internet-Draft YANG Model For Diffserv October 2014
type identityref {
base action-type;
}
description
"This defines action type ";
}
choice action-cfg-params;
}
leaf child-policy {
type leafref {
path "/policies/policy-entry/policy-name";
}
}
}
}
}
}
5.3. IETF-DIFFSERV-ACTION
module ietf-diffserv-action {
namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv-action";
prefix diffserv-action;
import ietf-inet-types {
prefix inet;
}
import ietf-diffserv-classifier {
prefix diffserv-classifier;
}
import ietf-diffserv-policy {
prefix diffserv-policy;
}
revision 2014-10-07 {
description
"Initial revision for diffserv actions on network packets";
}
grouping dscp-range {
leaf dscp-min {
type inet:dscp;
}
leaf dscp-max {
type inet:dscp;
}
}
Choudhary & Shah Expires April 25, 2015 [Page 16]
Internet-Draft YANG Model For Diffserv October 2014
grouping burst {
choice burst-type {
case size {
leaf burst-size {
units "bytes";
type uint64;
}
}
case interval {
leaf burst-interval {
units "microsecond";
type uint64;
}
}
}
}
grouping leaky-bucket {
leaf absolute-rate {
units "bits-per-second";
type uint64;
}
uses burst;
}
grouping threshold {
container threshold {
description
"threshold";
choice threshold-type {
case size {
leaf threshold-size {
units "bytes";
type uint64;
}
}
case interval {
leaf threshold-interval {
units "microsecond";
type uint64;
}
}
}
}
}
identity min-rate {
base diffserv-policy:action-type;
Choudhary & Shah Expires April 25, 2015 [Page 17]
Internet-Draft YANG Model For Diffserv October 2014
}
identity marking {
base diffserv-policy:action-type;
}
identity priority {
base diffserv-policy:action-type;
}
identity meter {
base diffserv-policy:action-type;
}
identity max-rate {
base diffserv-policy:action-type;
}
identity algorithmic-drop {
base diffserv-policy:action-type;
}
identity meter-action-type {
description
"conform/violate/exceed action type in a meter";
}
identity meter-action-drop {
base meter-action-type;
}
identity meter-action-set {
base meter-action-type;
}
grouping drop {
leaf drop-action {
type boolean;
}
description
"the drop action";
}
grouping queuelimit {
list qlimit-dscp-thresh {
key "dscp-min dscp-max";
uses dscp-range;
uses threshold;
Choudhary & Shah Expires April 25, 2015 [Page 18]
Internet-Draft YANG Model For Diffserv October 2014
}
}
grouping meter-action-params {
leaf meter-action-type {
type identityref {
base meter-action-type;
}
}
choice val {
case meter-action-mark {
uses marking;
description
"meter action: mark";
}
case meter-action-drop {
description
"meter action: drop";
uses drop;
}
}
}
grouping meter {
leaf meter-id {
type uint16;
}
leaf meter-rate {
units "bits-per-second";
type uint64;
}
uses burst;
container color {
uses diffserv-classifier:classifier-entry-generic-attr;
}
uses meter-action-params;
uses meter-action-statistics;
}
grouping priority {
leaf priority-level {
type uint8;
description
"priority level";
}
leaf priority-rate {
units "bits-per-second";
type uint64;
Choudhary & Shah Expires April 25, 2015 [Page 19]
Internet-Draft YANG Model For Diffserv October 2014
}
}
grouping min-rate {
leaf min-rate {
units "bits-per-second";
type uint64;
}
description
"min guanteed bandwidth";
}
grouping marking {
leaf dscp {
type inet:dscp;
}
}
grouping max-rate {
uses leaky-bucket;
}
grouping wred-threshold {
container wred-min-thresh {
uses threshold;
description
"Minimum threshold";
}
container wred-max-thresh {
uses threshold;
description
"Maximum threshold";
}
leaf mark-probability {
type uint32 {
range "1..1000";
}
description
"Mark probability";
}
}
grouping randomdetect {
leaf exp-weighting-const {
type uint32;
description
"Exponential weighting constant factor for wred profile ";
}
Choudhary & Shah Expires April 25, 2015 [Page 20]
Internet-Draft YANG Model For Diffserv October 2014
leaf mode-aggregate {
type boolean;
default "false";
description
"
Indicates aggregate mode or non-aggregate mode. Non-aggregate
the mode by default creates sub-class for each code-point
value with different min and max threshold. Aggregate mode
defaults to only one subclass unless explicitly configured
by the user
";
}
list wred-dscp-thresh {
key "dscp-min dscp-max";
uses dscp-range;
uses wred-threshold;
}
}
grouping meter-action-statistics {
description
"Meter statistics";
leaf metered-pkts {
type uint64;
config false;
description
"Number of packets counted by the meter";
}
leaf metered-bytes {
type uint64;
config false;
description
"Bytes of packets counted by the meter";
}
leaf metered-rate {
units "bits-per-second";
type uint64;
config false;
description
"Traffic Rate measured by the meter";
}
}
grouping wred-class-counts {
leaf early-drop-pkts {
type uint64;
config false;
description
Choudhary & Shah Expires April 25, 2015 [Page 21]
Internet-Draft YANG Model For Diffserv October 2014
"Early drop packets ";
}
leaf early-drop-bytes {
type uint64;
config false;
description
"Early drop bytes ";
}
}
augment "/diffserv-policy:policies/diffserv-policy:policy-entry/
diffserv-policy:classifier-entry/
diffserv-policy:classifier-action-entry-cfg/
diffserv-policy:action-cfg-params" {
case marking {
container marking-cfg {
uses marking;
}
}
case priority {
container priority-cfg {
uses priority;
}
}
case meter {
container meter-cfg {
list meter-list {
key "meter-id";
uses meter;
}
}
}
case max-rate {
container max-rate-cfg {
uses max-rate;
}
}
case algorithmic-drop {
choice drop-algorithm {
case always-drop {
container drop-cfg {
uses drop;
}
}
case tail-drop {
container tail-drop-cfg {
uses queuelimit;
Choudhary & Shah Expires April 25, 2015 [Page 22]
Internet-Draft YANG Model For Diffserv October 2014
}
}
case head-drop {
container head-drop-cfg {
uses queuelimit;
}
}
case random-detect {
container random-detect-cfg {
uses randomdetect;
}
}
}
}
case min-rate {
container min-rate-cfg {
uses min-rate;
}
}
}
augment "/diffserv-policy:policies/diffserv-policy:policy-entry/
diffserv-policy:classifier-entry" {
container queuing-statistics {
description
"queue related statistics ";
leaf output-pkts {
type uint64;
config false;
description
"Number of packets transmitted from queue ";
}
leaf output-bytes {
type uint64;
config false;
description
"Number of bytes transmitted from queue ";
}
leaf queue-size-pkts {
type uint64;
config false;
description
"Number of packets currently buffered ";
}
leaf queue-size-bytes {
type uint64;
config false;
description
"Number of bytes currently buffered ";
Choudhary & Shah Expires April 25, 2015 [Page 23]
Internet-Draft YANG Model For Diffserv October 2014
}
leaf drop-pkts {
type uint64;
config false;
description
"Total number of packets dropped ";
}
leaf drop-bytes {
type uint64;
config false;
description
"Total number of bytes dropped ";
}
list wred-statistics {
key "dscp-min dscp-max";
description
"WRED statistics for a dscp range ";
uses dscp-range;
uses wred-class-counts;
}
}
}
}
5.4. IETF-DIFFSERV-TARGET
module ietf-diffserv-target {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv-target";
prefix diffserv-target;
import ietf-interfaces {
prefix if;
}
import ietf-diffserv-policy {
prefix policy;
}
revision 2014-10-07 {
description
"First revision diffserv based policy applied to a target";
}
identity direction {
description
"This is identity of traffic direction";
}
Choudhary & Shah Expires April 25, 2015 [Page 24]
Internet-Draft YANG Model For Diffserv October 2014
identity inbound {
base direction;
description
"Direction of traffic coming into the network entry";
}
identity outbound {
base direction;
description
"Direction of traffic going out of the network entry";
}
grouping policy-target-generic-attr {
uses policy:policy-generic-attr;
leaf direction {
type identityref {
base direction;
}
}
}
augment "/if:interfaces/if:interface" {
list diffserv-target-entry {
key "direction";
description
"policy target for inbound or outbound direction";
uses policy-target-generic-attr;
}
}
}
6. Security Considerations
7. Acknowledgement
The editor of this document wishes to thank Fred Baker for
overviewing the document and provide useful comments.
8. References
8.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2697] Heinanen, J. and R. Guerin, "A Single Rate Three Color
Marker", RFC 2697, September 1999.
Choudhary & Shah Expires April 25, 2015 [Page 25]
Internet-Draft YANG Model For Diffserv October 2014
[RFC2698] Heinanen, J. and R. Guerin, "A Two Rate Three Color
Marker", RFC 2698, September 1999.
[RFC2859] Fang, W., Seddigh, N., and B. Nandy, "A Time Sliding
Window Three Colour Marker (TSWTCM)", RFC 2859, June 2000.
[RFC3246] Davie, B., Charny, A., Bennet, J., Benson, K., Le Boudec,
J., Courtney, W., Davari, S., Firoiu, V., and D.
Stiliadis, "An Expedited Forwarding PHB (Per-Hop
Behavior)", RFC 3246, March 2002.
[RFC3260] Grossman, D., "New Terminology and Clarifications for
Diffserv", RFC 3260, April 2002.
[RFC3289] Baker, F., Chan, K., and A. Smith, "Management Information
Base for the Differentiated Services Architecture", RFC
3289, May 2002.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)", RFC 6020,
October 2010.
[RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991,
July 2013.
[RFC7223] Bjorklund, M., "A YANG Data Model for Interface
Management", RFC 7223, May 2014.
8.2. Informative References
[RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z.,
and W. Weiss, "An Architecture for Differentiated
Services", RFC 2475, December 1998.
Authors' Addresses
Aseem Choudhary
Cisco Systems
170 W. Tasman Drive
San Jose, CA 95134
US
Email: asechoud@cisco.com
Choudhary & Shah Expires April 25, 2015 [Page 26]
Internet-Draft YANG Model For Diffserv October 2014
Shitanshu Shah
Cisco Systems
170 W. Tasman Drive
San Jose, CA 95134
US
Email: svshah@cisco.com
Choudhary & Shah Expires April 25, 2015 [Page 27]