Network Working Group V. Vassilev
Internet-Draft Transpacket
Intended status: Standards Track July 5, 2019
Expires: January 6, 2020
A YANG Data Model for Network Bridge Management
draft-vassilev-netmod-network-bridge-02
Abstract
This document introduces new YANG model of a network bridge.
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 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 January 6, 2020.
Copyright Notice
Copyright (c) 2019 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 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.
Vassilev Expires January 6, 2020 [Page 1]
Internet-Draft NETWORK-BRIDGE-02 July 2019
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1. YANG . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . 3
1.2. Problem Statement . . . . . . . . . . . . . . . . . . . . 3
1.3. Solution . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.1. Forwarding . . . . . . . . . . . . . . . . . . . . . 4
1.3.2. Scheduling . . . . . . . . . . . . . . . . . . . . . 4
2. Network Bridge Module Tree Diagram . . . . . . . . . . . . . 7
3. Network Bridge Flows Module Tree Diagram . . . . . . . . . . 7
4. Network Bridge Scheduler Module Tree Diagram . . . . . . . . 10
5. Network Bridge Module YANG . . . . . . . . . . . . . . . . . 12
6. Network Bridge Flows Module YANG . . . . . . . . . . . . . . 13
7. Network Bridge Scheduler Module YANG . . . . . . . . . . . . 21
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29
8.1. NETWORK BRIDGE YANG Modules . . . . . . . . . . . . . . . 29
9. Security Considerations . . . . . . . . . . . . . . . . . . . 30
10. Normative References . . . . . . . . . . . . . . . . . . . . 30
Appendix A. Example . . . . . . . . . . . . . . . . . . . . . . 31
A.1. Model . . . . . . . . . . . . . . . . . . . . . . . . . . 31
A.2. Scheduler diagram . . . . . . . . . . . . . . . . . . . . 33
A.3. Topology . . . . . . . . . . . . . . . . . . . . . . . . 34
A.4. CLI listing . . . . . . . . . . . . . . . . . . . . . . . 34
A.5. Configuration Data Instance . . . . . . . . . . . . . . . 36
A.6. Companion YANG Data Model for Implementations Not
Compliant with NMDA . . . . . . . . . . . . . . . . . . . 46
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 48
1. Introduction
There is a need for a YANG model for management of network bridges.
The model should allow the variety of existing forwarding and
scheduling technologies to be defined as interoperable modules that
can be interconnected and extended.
1.1. Terminology
The keywords "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].
Vassilev Expires January 6, 2020 [Page 2]
Internet-Draft NETWORK-BRIDGE-02 July 2019
1.1.1. YANG
The following terms are defined in [RFC7950]:
o must statement
o augment statement
o context node
o container
o data node
o key leaf
o leaf
o leaf-list
o list
1.1.2. Tree Diagrams
Tree diagrams used in this document follow the notation defined in
[RFC8340].
1.2. Problem Statement
This document attempts to address the problem of defining YANG model
of a network bridge that can be used as common framework by different
forwarding and scheduling implementations.
1.3. Solution
A Network bridge has more then 1 ingress and 1 or more egress ports.
It has 1 or more traffic classes. The proposed model splits the
design into 2 components - 1) Forwarding component and 2) Scheduling
component. The forwarding component is connected to all ingress
ports and forwards traffic from them to the scheduler instances
connected to the egress ports. The scheduling component is a set of
scheduler instances - topologies of interconnected aggregators and
filters connected to a single egress port and as many as
ingress_ports_count*traffic_class_count datapaths from the forwarding
component.
Vassilev Expires January 6, 2020 [Page 3]
Internet-Draft NETWORK-BRIDGE-02 July 2019
1.3.1. Forwarding
The simple idea of creating a YANG model for a subset of the original
[OpenFlow] specification is used as base for the model for management
of the Forwarding Information Base (FIB) of the bridge.
1.3.2. Scheduling
The scheduler(s) have 1 or more input datapaths and 1 output. To
each datapath the forwarding component can forward flows. Many
different scheduler implementations have structure based on common
modular abstractions flow meters, delay lines, queues, gates and gate
control logic that determines the gate states based on variables
defined in the flow meter, the delay line or the queue or signals and
timers available to the gate control logic algorithm. The concept is
illustrated with the following model of a 2 ingress ports, 2 traffic
classes implementation of a 2 class strict priority scheduling
bridge:
Vassilev Expires January 6, 2020 [Page 4]
Internet-Draft NETWORK-BRIDGE-02 July 2019
ingress0 ingress1
V V
| |
+------------------------------+
| FIB |
| class0 class1 |
| 0->0 1->0 0->0 1->0 |
+------------------------------+
| | | |
{M} {M} {M} {M}
| | | |
\ / \ /
\ / \ /
+-------+ +-------+
| Queue | | Queue |
|=======| |=======|
|=======| |=======|
|=======| |=======|
|=======| |=======|
+-------+ +-------+
| |
G0 G1
+-----------------------------+
| C |
| strict-priority |
+-----------------------------+
|
V
egress*
The common structure of a scheduler module (S) consisting of topology
of consecutive flow-meters (M), gates (G) connected to a common gate
control - (C) with a single egress port. A new module type
representing delay line (D) is added to the structure of the
scheduler before Q. The delay line (D) is important for time-
sensitive scheduler models where propagation delays, store-and-
forward delays and even programmable delays in some cases need to be
represented. For certain time sensitive applications it is important
to differentiate between different ports due to rate conversion,
store and forward and other factors influencing the behavior of the
bridge. This is why the concept of a port class is introduced in the
model.
Vassilev Expires January 6, 2020 [Page 5]
Internet-Draft NETWORK-BRIDGE-02 July 2019
v v
| |
{M0} {Mn}
| |
+---+ +---+
| D | | D |
| e | | e |
| l | | l |
| a | | a |
| y | | y |
+---+ +---+
| |
+-----+ +-----+
| Q0 | | Qn |
|=====| |=====|
|=====| ... |=====|
|=====| |=====|
|=====| |=====|
+-----+ +-----+
| |
G0 Gn
+--------------------+
| C |
+--------------------+
|
v
Depending on the scheduler design the ingress flows can specify
different D and Q parameters e.g. D.time=0 means no delay, Q.len=0
means no buffering and immediate drop of packets in case the gate is
closed. With the submodules collapsed to an integral generic gate
controller module (GC) the diagram becomes much simpler.
Vassilev Expires January 6, 2020 [Page 6]
Internet-Draft NETWORK-BRIDGE-02 July 2019
ingress0 ingress1
V V
| |
+------------------------------+
| FIB |
| class0 class1 |
| 0->0 1->0 0->0 1->0 |
+------------------------------+
| | | |
+-----------------------------+
| GC |
+-----------------------------+
|
V
egress0
Complex scheduler designs exist that can combine several different
gate controllers into complex topology. This concept is demonstrated
in the example bridge.
2. Network Bridge Module Tree Diagram
module: ietf-network-bridge
+--rw bridge
+--rw ports
+--rw port* [name]
+--rw name string
+--rw index? uint64
augment /if:interfaces/if:interface:
+--rw port-name? -> /bridge/ports/port/name
3. Network Bridge Flows Module Tree Diagram
module: ietf-network-bridge-flows
+--rw packet-in-message
| +--rw packet-in-reason? identityref
| +--rw ingress? netbr:port-ref
| +--rw payload? binary
| +--rw match
| +--rw in-port? netbr:port-ref
| +--rw ethernet-match
| | +--rw ethernet-source!
| | | +--rw address yang:mac-address
| | | +--rw mask? yang:mac-address
| | +--rw ethernet-destination!
| | | +--rw address yang:mac-address
Vassilev Expires January 6, 2020 [Page 7]
Internet-Draft NETWORK-BRIDGE-02 July 2019
| | | +--rw mask? yang:mac-address
| | +--rw ethernet-type!
| | +--rw type ether-type
| +--rw vlan-match
| +--rw vlan-id!
| | +--rw vlan-id-present? boolean
| | +--rw vlan-id? vlan-id
| +--rw vlan-pcp? vlan-pcp
+--rw flows
+--rw flow* [id]
+--rw id flow-id
+--rw match
| +--rw in-port? netbr:port-ref
| +--rw ethernet-match
| | +--rw ethernet-source!
| | | +--rw address yang:mac-address
| | | +--rw mask? yang:mac-address
| | +--rw ethernet-destination!
| | | +--rw address yang:mac-address
| | | +--rw mask? yang:mac-address
| | +--rw ethernet-type!
| | +--rw type ether-type
| +--rw vlan-match
| +--rw vlan-id!
| | +--rw vlan-id-present? boolean
| | +--rw vlan-id? vlan-id
| +--rw vlan-pcp? vlan-pcp
+--rw actions
| +--rw action* [order]
| +--rw order int32
| +--rw (action)?
| +--:(output-action-case)
| | +--rw output-action
| | +--rw out-port? netbr:port-ref
| | +--rw max-length? uint16
| +--:(controller-action-case)
| | +--rw controller-action
| | +--rw max-length? uint16
| +--:(drop-action-case)
| | +--rw drop-action!
| +--:(pop-vlan-action-case)
| | +--rw pop-vlan-action!
| +--:(push-vlan-action-case)
| | +--rw push-vlan-action
| | +--rw ethernet-type? uint16
| | +--rw tag? int32
| | +--rw pcp? int32
| | +--rw cfi? vlan-cfi
Vassilev Expires January 6, 2020 [Page 8]
Internet-Draft NETWORK-BRIDGE-02 July 2019
| | +--rw vlan-id? vlan-id
| +--:(set-vlan-cfi-action-case)
| | +--rw set-vlan-cfi-action
| | +--rw vlan-cfi? vlan-cfi
| +--:(set-vlan-id-action-case)
| | +--rw set-vlan-id-action
| | +--rw vlan-id? vlan-id
| +--:(set-vlan-pcp-action-case)
| | +--rw set-vlan-pcp-action
| | +--rw vlan-pcp? vlan-pcp
| +--:(strip-vlan-action-case)
| +--rw strip-vlan-action!
+--rw priority? uint16
+--rw container-name? string
+--rw flow-name? string
+--ro flow-statistics
+--ro packet-count? yang:counter64
+--ro byte-count? yang:counter64
rpcs:
+---x transmit-packet
+---w input
+---w egress? netbr:port-ref
+---w ingress? netbr:port-ref
+---w payload? binary
+---w action* [order]
+---w order int32
+---w (action)?
+--:(output-action-case)
| +---w output-action
| +---w out-port? netbr:port-ref
| +---w max-length? uint16
+--:(controller-action-case)
| +---w controller-action
| +---w max-length? uint16
+--:(drop-action-case)
| +---w drop-action!
+--:(pop-vlan-action-case)
| +---w pop-vlan-action!
+--:(push-vlan-action-case)
| +---w push-vlan-action
| +---w ethernet-type? uint16
| +---w tag? int32
| +---w pcp? int32
| +---w cfi? vlan-cfi
| +---w vlan-id? vlan-id
+--:(set-vlan-cfi-action-case)
| +---w set-vlan-cfi-action
Vassilev Expires January 6, 2020 [Page 9]
Internet-Draft NETWORK-BRIDGE-02 July 2019
| +---w vlan-cfi? vlan-cfi
+--:(set-vlan-id-action-case)
| +---w set-vlan-id-action
| +---w vlan-id? vlan-id
+--:(set-vlan-pcp-action-case)
| +---w set-vlan-pcp-action
| +---w vlan-pcp? vlan-pcp
+--:(strip-vlan-action-case)
+---w strip-vlan-action!
notifications:
+---n packet-received
+--ro packet-in-reason? identityref
+--ro ingress? netbr:port-ref
+--ro payload? binary
+--ro match
+--ro in-port? netbr:port-ref
+--ro ethernet-match
| +--ro ethernet-source!
| | +--ro address yang:mac-address
| | +--ro mask? yang:mac-address
| +--ro ethernet-destination!
| | +--ro address yang:mac-address
| | +--ro mask? yang:mac-address
| +--ro ethernet-type!
| +--ro type ether-type
+--ro vlan-match
+--ro vlan-id!
| +--ro vlan-id-present? boolean
| +--ro vlan-id? vlan-id
+--ro vlan-pcp? vlan-pcp
4. Network Bridge Scheduler Module Tree Diagram
module: ietf-network-bridge-scheduler
augment /flow:flows/flow:flow:
+--rw traffic-class?
-> /netbr:bridge/sched:traffic-classes/traffic-class
augment /netbr:bridge/netbr:ports/netbr:port:
+--rw class? port-class-ref
+--rw class-instance-index? uint32
augment /netbr:bridge:
+--rw default-traffic-class? traffic-class-ref
+--rw default-port-class? traffic-class-ref
+--rw traffic-classes
| +--rw traffic-class* identityref
+--rw port-classes
+--rw port-class* identityref
Vassilev Expires January 6, 2020 [Page 10]
Internet-Draft NETWORK-BRIDGE-02 July 2019
augment /if:interfaces/if:interface:
+--rw scheduler
+--rw gate-controllers
+--rw gate-controller* [id]
+--rw id string
+--rw type identityref
+--rw inputs
| +--rw input* [class index]
| +--rw class identityref
| +--rw index uint32
| +--ro queued-pkts? uint64
| +--ro queued-bytes? uint64
| +--ro discards? uint64
| +--ro overflow-discards? uint64
| +--ro error-discards? uint64
+--rw input-classes
+--rw input-class* [class]
+--rw class identityref
+--ro queued-pkts? uint64
+--ro queued-bytes? uint64
+--ro discards? uint64
+--ro overflow-discards? uint64
+--ro error-discards? uint64
augment /netbr:bridge:
+--rw scheduler-classes
+--rw scheduler-class* [egress-port-class]
+--rw egress-port-class sched:port-class-ref
+--rw inputs
| +--rw input* [traffic-class ingress-port-class]
| +--rw traffic-class traffic-class-ref
| +--rw ingress-port-class port-class-ref
| +--rw gate-controller? leafref
| +--rw input-class? leafref
| +--rw base-index? uint32
+--rw gate-controllers
+--rw gate-controller* [id]
+--rw id string
+--rw type identityref
+--rw inputs
| +--rw input* [class]
| +--rw class identityref
| +--rw instance-count? uint32
| +--rw constant-propagation-delay? uint64
| +--rw configurable-delay-line? uint64
| +--rw queue-len? uint32
+--rw output
+--rw gate-controller?
| -> ../../../gate-controller/id
Vassilev Expires January 6, 2020 [Page 11]
Internet-Draft NETWORK-BRIDGE-02 July 2019
+--rw input-class? leafref
+--rw index? uint32
5. Network Bridge Module YANG
<CODE BEGINS> file "ietf-network-bridge@2019-07-05.yang"
module ietf-network-bridge {
namespace "urn:ietf:params:xml:ns:yang:ietf-network-bridge";
prefix netbr;
import ietf-interfaces {
prefix if;
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
Editor: Vladimir Vassilev
<mailto:vladimir@transpacket.com>";
description
"This module contains a collection of YANG definitions for
description and management of network bridges.
Copyright (c) 2019 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 2019-07-05 {
description
"Initial revision.";
reference "RFC XXXX: Network Bridge";
}
container bridge {
description "Bridge parameters.";
Vassilev Expires January 6, 2020 [Page 12]
Internet-Draft NETWORK-BRIDGE-02 July 2019
container ports {
description "Member ports.";
list port {
key "name";
description
"The list of bridge ports on the device.";
unique "index";
leaf name {
type string;
}
leaf index {
type uint64;
}
}
}
}
augment "/if:interfaces/if:interface" {
leaf port-name {
type leafref {
path "/netbr:bridge/netbr:ports/netbr:port/netbr:name";
}
}
}
typedef port-ref {
type leafref {
path "/if:interfaces/if:interface/netbr:port-name";
}
description
"This type is used by data models that need to reference
configured bridge ports.";
}
}
<CODE ENDS>
6. Network Bridge Flows Module YANG
<CODE BEGINS> file "ietf-network-bridge-flows@2019-07-05.yang"
module ietf-network-bridge-flows {
namespace "urn:ietf:params:xml:ns:yang:ietf-network-bridge-flows";
prefix flow;
import ietf-network-bridge {
prefix netbr;
}
import ietf-inet-types {
Vassilev Expires January 6, 2020 [Page 13]
Internet-Draft NETWORK-BRIDGE-02 July 2019
prefix inet;
revision-date 2013-07-15;
}
import ietf-yang-types {
prefix yang;
revision-date 2013-07-15;
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
Editor: Vladimir Vassilev
<mailto:vladimir@transpacket.com>";
description
"This module contains a collection of YANG definitions for
description and management of network bridge based on
flows.
Copyright (c) 2019 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 2019-07-05 {
description
"Unreleased revision.";
reference
"RFC XXXX: Network Bridge";
}
typedef vlan-pcp {
type uint8 {
range "0..7";
}
description
"IEEE 802.1p priority. It indicates the frame priority level.
Values are from 0 (best effort) to 7 (highest);
Vassilev Expires January 6, 2020 [Page 14]
Internet-Draft NETWORK-BRIDGE-02 July 2019
1 represents the lowest priority.";
}
typedef vlan-id {
type uint16 {
range "0..4095";
}
}
typedef ether-type {
type uint32;
}
typedef vlan-cfi {
type int32;
}
grouping address {
choice address {
case ipv4 {
leaf ipv4-address {
type inet:ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type inet:ipv6-prefix;
}
}
}
}
grouping ordered {
leaf order {
type int32;
}
}
grouping action-list {
list action {
key "order";
uses ordered;
uses action;
}
}
grouping action {
choice action {
Vassilev Expires January 6, 2020 [Page 15]
Internet-Draft NETWORK-BRIDGE-02 July 2019
case output-action-case {
container output-action {
leaf out-port {
type netbr:port-ref;
}
leaf max-length {
type uint16;
}
}
}
case controller-action-case {
container controller-action {
leaf max-length {
type uint16;
}
}
}
case drop-action-case {
container drop-action {
presence "no content action";
}
}
case pop-vlan-action-case {
container pop-vlan-action {
presence "no content action";
}
}
case push-vlan-action-case {
container push-vlan-action {
leaf ethernet-type {
type uint16;
}
leaf tag {
type int32;
}
leaf pcp {
type int32;
}
leaf cfi {
type vlan-cfi;
}
leaf vlan-id {
type vlan-id;
}
}
}
case set-vlan-cfi-action-case {
container set-vlan-cfi-action {
Vassilev Expires January 6, 2020 [Page 16]
Internet-Draft NETWORK-BRIDGE-02 July 2019
leaf vlan-cfi {
type vlan-cfi;
}
}
}
case set-vlan-id-action-case {
container set-vlan-id-action {
leaf vlan-id {
type vlan-id;
}
}
}
case set-vlan-pcp-action-case {
container set-vlan-pcp-action {
leaf vlan-pcp {
type vlan-pcp;
}
}
}
case strip-vlan-action-case {
container strip-vlan-action {
presence "no content action";
}
}
}
}
grouping mac-address-filter {
leaf address {
type yang:mac-address;
mandatory true;
}
leaf mask {
type yang:mac-address;
}
}
grouping ethernet-match-fields {
container ethernet-source {
presence "Match field is active and set";
description
"Ethernet source address.";
uses mac-address-filter;
}
container ethernet-destination {
presence "Match field is active and set";
description
"Ethernet destination address.";
Vassilev Expires January 6, 2020 [Page 17]
Internet-Draft NETWORK-BRIDGE-02 July 2019
uses mac-address-filter;
}
container ethernet-type {
presence "Match field is active and set";
description
"Ethernet frame type.";
leaf type {
type ether-type;
mandatory true;
}
}
}
grouping vlan-match-fields {
container vlan-id {
presence "Match field is active and set";
description
"VLAN id.";
leaf vlan-id-present {
type boolean;
}
leaf vlan-id {
type vlan-id;
}
}
leaf vlan-pcp {
type vlan-pcp;
description
"VLAN priority.";
}
}
grouping match {
leaf in-port {
type netbr:port-ref;
}
container ethernet-match {
uses ethernet-match-fields;
}
container vlan-match {
uses vlan-match-fields;
}
}
grouping raw-packet {
description
"Basic packet structure.";
leaf ingress {
Vassilev Expires January 6, 2020 [Page 18]
Internet-Draft NETWORK-BRIDGE-02 July 2019
type netbr:port-ref;
}
leaf payload {
type binary;
}
}
grouping packet-in {
leaf packet-in-reason {
type identityref {
base packet-in-reason;
}
}
uses raw-packet;
}
grouping ethernet-packet {
description
"Ethernet packet headers structure.";
leaf source {
type yang:mac-address;
}
leaf destination {
type yang:mac-address;
}
}
identity packet-in-reason {
description
"Base identity for all the available packet in reasons.";
}
identity no-match {
base packet-in-reason;
description
"No matching flow in the classifier";
}
identity send-to-controller {
base packet-in-reason;
description
"Explicit instruction to send packet to controller";
}
identity invalid-ttl {
base packet-in-reason;
description
"Packet with invalid TTL";
Vassilev Expires January 6, 2020 [Page 19]
Internet-Draft NETWORK-BRIDGE-02 July 2019
}
notification packet-received {
description
"Delivery of incoming packet.";
uses packet-in;
container match {
uses match;
}
}
rpc transmit-packet {
description
"Sending packet out.";
input {
leaf egress {
type netbr:port-ref;
}
uses raw-packet;
uses action-list;
}
}
container packet-in-message {
uses packet-in;
container match {
uses match;
}
}
grouping flow {
container match {
uses match;
}
container actions {
uses action-list;
}
leaf priority {
type uint16;
}
leaf container-name {
type string;
}
leaf flow-name {
type string;
}
}
Vassilev Expires January 6, 2020 [Page 20]
Internet-Draft NETWORK-BRIDGE-02 July 2019
typedef flow-id {
type inet:uri;
}
container flows {
list flow {
key "id";
leaf id {
type flow-id;
}
uses flow;
container flow-statistics {
config false;
leaf packet-count {
type yang:counter64;
}
leaf byte-count {
type yang:counter64;
}
}
}
}
}
<CODE ENDS>
7. Network Bridge Scheduler Module YANG
<CODE BEGINS> file "ietf-network-bridge-scheduler@2019-07-05.yang"
module ietf-network-bridge-scheduler {
namespace "urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler";
prefix sched;
import ietf-network-bridge {
prefix netbr;
}
import ietf-network-bridge-flows {
prefix flow;
}
import ietf-interfaces {
prefix if;
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
Vassilev Expires January 6, 2020 [Page 21]
Internet-Draft NETWORK-BRIDGE-02 July 2019
WG List: <mailto:netmod@ietf.org>
Editor: Vladimir Vassilev
<mailto:vladimir@transpacket.com>";
description
"This module contains a collection of YANG definitions for
description and management of network bridge schedulers.
Copyright (c) 2019 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 2019-07-05 {
description
"Initial revision.";
reference
"RFC XXXX: Network Bridge";
}
identity gate-controller {
description
"Represents the gate control block type e.g. round-robin,
priority-based, time-aware-802dot1qbv etc.";
}
identity aggregator {
base gate-controller;
description
"Abstract identity that all gate control blocks with multiple
inputs and single output use as basetype e.g. round-robin,
priority-based, time-aware-802dot1qbv etc.";
}
identity filter {
base gate-controller;
description
"Abstract identity that all gate control blocks with corresponding
input and output instances use as basetype e.g. rate-limiters,
simple propagation delays, shapers etc.";
Vassilev Expires January 6, 2020 [Page 22]
Internet-Draft NETWORK-BRIDGE-02 July 2019
}
identity gate-controller-input {
description
"Identifies gate controller input type.";
}
identity private-queue-aggregator-input {
base gate-controller-input;
description
"Abstract input identifier for gate controller
inputs of the aggregator type where all
instances of the input types derived from
this identifier have their own private queue.";
}
identity shared-queue-aggregator-input {
base gate-controller-input;
description
"Abstract input identifier for gate controller
inputs of the aggregator type where all
instances of the input types derived from
this identifier have shared queue.";
}
identity filter-input {
base gate-controller-input;
description
"Abstract input identifier for gate controller
inputs of the filter type.";
}
identity traffic-class {
description
"Identifies traffic class.";
}
identity port-class {
description
"Identifies port class. Ports that belong to a class
will have the same scheduler-class on their egress
and have identical flow path through the rest of
the scheduler classes.";
}
typedef port-class-ref {
type leafref {
path "/netbr:bridge/sched:port-classes/sched:port-class";
Vassilev Expires January 6, 2020 [Page 23]
Internet-Draft NETWORK-BRIDGE-02 July 2019
}
description
"This type is used by data models that need to reference
configured port-class.";
}
typedef traffic-class-ref {
type leafref {
path "/netbr:bridge/sched:traffic-classes/sched:traffic-class";
}
description
"This type is used by data models that need to reference
configured traffic-class.";
}
augment "/flow:flows/flow:flow" {
leaf traffic-class {
type leafref {
path "/netbr:bridge/sched:traffic-classes/sched:traffic-class";
}
description
"Specifies the traffic class of a flow.
When not present the default traffic class is used.";
}
}
augment "/netbr:bridge/netbr:ports/netbr:port" {
leaf class {
type port-class-ref;
}
leaf class-instance-index {
type uint32;
}
}
augment "/netbr:bridge" {
leaf default-traffic-class {
type traffic-class-ref;
description
"Specifies the traffic-class for flows without
/flow:flows/flow:flow/sched:traffic-class leaf.";
}
leaf default-port-class {
type traffic-class-ref;
description
"Specifies the traffic-class for flows without
/flow:flows/flow:flow/sched:traffic-class leaf.";
}
Vassilev Expires January 6, 2020 [Page 24]
Internet-Draft NETWORK-BRIDGE-02 July 2019
container traffic-classes {
leaf-list traffic-class {
type identityref {
base traffic-class;
}
}
}
container port-classes {
leaf-list port-class {
type identityref {
base port-class;
}
}
}
}
grouping gate-controller-input-config {
leaf constant-propagation-delay {
type uint64;
units "picoseconds";
description
"Constant delay attributed to delays in the gate-controller.";
}
leaf configurable-delay-line {
type uint64;
units "picoseconds";
description
"Some gate controllers can delay the flow of packets with
configurable delay which is added to the constant
propagation-delay. Only inputs with zero queue lengths
have deterministic delays equal to the sum of the
constant-propagation-delay and the configurable-delay-line
leafs. Inputs with queues have variable higher delay with
dynamic component based on the controllers logic.";
}
leaf queue-len {
type uint32;
units "bytes";
}
}
grouping gate-controller-queue-state {
leaf queued-pkts {
type uint64;
config false;
}
leaf queued-bytes {
type uint64;
Vassilev Expires January 6, 2020 [Page 25]
Internet-Draft NETWORK-BRIDGE-02 July 2019
config false;
}
leaf discards {
type uint64;
config false;
description
"The total number of discarded packets that were
received on this input. This includes but is not
limited to the overflow-discards. For example
gate-controllers can start discarding certain
packets before the input queue is filled. These
discards are not registered as overflow-discards.
The lower 32 bits of the sum of all discards
counters part of a scheduler are equal to the
/if:interfaces/if:interface/if:statistics/if:out-discards
counter for the corresponding interface.";
}
leaf overflow-discards {
type uint64;
config false;
description
"Unintended discard caused by overflow of
the input queue of the gate controller.";
}
leaf error-discards {
type uint64;
config false;
}
}
augment "/if:interfaces/if:interface" {
container scheduler {
container gate-controllers {
list gate-controller {
key "id";
leaf id {
type string;
}
leaf type {
type identityref {
base gate-controller;
}
mandatory true;
}
container inputs {
list input {
key "class index";
Vassilev Expires January 6, 2020 [Page 26]
Internet-Draft NETWORK-BRIDGE-02 July 2019
leaf class {
type identityref {
base gate-controller-input;
}
}
leaf index {
type uint32;
}
uses gate-controller-queue-state;
}
}
container input-classes {
list input-class {
key "class";
leaf class {
type identityref {
base gate-controller-input;
}
}
uses gate-controller-queue-state;
}
}
}
}
}
}
augment "/netbr:bridge" {
container scheduler-classes {
list scheduler-class {
key "egress-port-class";
leaf egress-port-class {
type sched:port-class-ref;
}
container inputs {
list input {
key "traffic-class ingress-port-class";
leaf traffic-class {
type traffic-class-ref;
}
leaf ingress-port-class {
type port-class-ref;
}
leaf gate-controller {
type leafref {
path "../../../gate-controllers/gate-controller/id";
}
}
Vassilev Expires January 6, 2020 [Page 27]
Internet-Draft NETWORK-BRIDGE-02 July 2019
leaf input-class {
type leafref {
path "../../../gate-controllers/gate-controller"
+ "[id=current()/../gate-controller]"
+ "/inputs/input/class";
}
}
leaf base-index {
type uint32;
default "0";
}
}
}
container gate-controllers {
list gate-controller {
key "id";
leaf id {
type string;
}
leaf type {
type identityref {
base gate-controller;
}
mandatory true;
}
container inputs {
list input {
key "class";
leaf class {
type identityref {
base gate-controller-input;
}
mandatory true;
}
leaf instance-count {
type uint32;
}
uses gate-controller-input-config;
}
}
container output {
leaf gate-controller {
type leafref {
path "../../../gate-controller/id";
}
}
leaf input-class {
type leafref {
Vassilev Expires January 6, 2020 [Page 28]
Internet-Draft NETWORK-BRIDGE-02 July 2019
path "../../../gate-controller"
+ "[id=current()/../gate-controller]/"
+ "inputs/input/class";
}
}
leaf index {
type uint32;
description
"In case the gate-controller is aggregator this is the
index of the only input it is connected to from the
specified class.
If the gate-controller is filter with more then one
input-output pairs this is the base index and the
remaining indexes are connected to consecutive input
indexes of the specified input class.";
}
}
}
}
}
}
}
}
<CODE ENDS>
8. IANA Considerations
8.1. NETWORK BRIDGE YANG Modules
This document registers 3 YANG modules in the YANG Module Names
registry [RFC7950].
name: ietf-network-bridge
namespace:
urn:ietf:params:xml:ns:yang:ietf-network-bridge
prefix: netbr
// RFC Ed. remove this line and replace XXXX in next line
reference: RFC XXXX
name: ietf-network-bridge-flows
namespace:
urn:ietf:params:xml:ns:yang:ietf-network-bridge-flows
prefix: flow
// RFC Ed. remove this line and replace XXXX in next line
reference: RFC XXXX
Vassilev Expires January 6, 2020 [Page 29]
Internet-Draft NETWORK-BRIDGE-02 July 2019
name: ietf-network-bridge-scheduler
namespace:
urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler
prefix: sched
// RFC Ed. remove this line and replace XXXX in next line
reference: RFC XXXX
9. Security Considerations
This document does not introduce any new security concerns in
addition to those specified in [RFC7950], section 15.
10. Normative References
[OpenFlow]
"Open Networking Foundation", ""OpenFlow Switch
Specification"", December 2009,
<https://www.opennetworking.org/images/stories/downloads/
sdn-resources/onf-specifications/openflow/
openflow-spec-v1.0.0.pdf>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
January 2004.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, June 2011.
[RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991,
July 2013.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016,
<http://www.rfc-editor.org/info/rfc7950>.
[RFC8340] Bjorklund, M., Ed. and L. Berger, Ed., "YANG Tree
Diagrams", RFC 8340, DOI 10.17487/RFC8340, March 2018,
<http://www.rfc-editor.org/info/rfc8340>.
[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>.
Vassilev Expires January 6, 2020 [Page 30]
Internet-Draft NETWORK-BRIDGE-02 July 2019
Appendix A. Example
Example bridge with signaling, video0, video1 and best-effort traffic
classes.
A.1. Model
module example-bridge {
yang-version 1.1;
namespace "http://example.com/ns/example-bridge";
prefix example;
import ietf-network-bridge {
prefix netbr;
}
import ietf-network-bridge-scheduler {
prefix sched;
}
organization
"example.com";
description
"Example of bridge.";
revision 2018-07-15 {
description
"Initial.";
}
identity video0 {
base sched:traffic-class;
}
identity video1 {
base sched:traffic-class;
}
identity signaling {
base sched:traffic-class;
}
identity best-effort {
base sched:traffic-class;
}
identity default-port {
base sched:port-class;
}
Vassilev Expires January 6, 2020 [Page 31]
Internet-Draft NETWORK-BRIDGE-02 July 2019
//Strict priority aggregator with 3 classes:
identity strict-priority-aggregator {
base sched:aggregator;
}
identity pri0 {
base sched:shared-queue-aggregator-input;
base strict-priority-aggregator;
}
identity pri1 {
base sched:shared-queue-aggregator-input;
base strict-priority-aggregator;
}
identity pri2 {
base sched:shared-queue-aggregator-input;
base strict-priority-aggregator;
}
//Cyclic timeslot schedule aggregator with 2 timeslots:
identity cyclic-timeslot-schedule-aggregator {
base sched:aggregator;
}
identity timeslot0 {
base sched:shared-queue-aggregator-input;
base cyclic-timeslot-schedule-aggregator;
}
identity timeslot1 {
base sched:shared-queue-aggregator-input;
base cyclic-timeslot-schedule-aggregator;
}
augment "/netbr:bridge/sched:scheduler-classes/sched:scheduler-class"
+ "/sched:gate-controllers/sched:gate-controller" {
when "./sched:type = 'example:cyclic-timeslot-schedule-aggregator'";
leaf period {
type uint32;
units "nanoseconds";
}
leaf time-slot0-interval {
type uint32;
units "nanoseconds";
}
leaf time-slot1-interval {
type uint32;
Vassilev Expires January 6, 2020 [Page 32]
Internet-Draft NETWORK-BRIDGE-02 July 2019
units "nanoseconds";
}
}
//Rate limiter - filter:
identity rate-limiter {
base sched:filter;
}
identity in {
base sched:filter-input;
base rate-limiter;
}
augment "/netbr:bridge/sched:scheduler-classes/sched:scheduler-class"
+ "/sched:gate-controllers/sched:gate-controller" {
when "./sched:type = 'example:rate-limiter'";
leaf interval {
type uint32;
units "nanoseconds";
}
leaf limit {
type uint32;
units "octets";
}
}
}
A.2. Scheduler diagram
The scheduler toplogy and the gate controller instances are specified
in the operational configuration data that can be modified or not
depending on the underlying implementation. The single letter
identifiers for the gate-controllers have the following identities:
o r1,r2 - rate-limiter instances
o a - trivial aggregator instance (implemented using strict-
priority-aggregator)
o t - cyclic-timeslot-schedule-aggregator instance
o p - strict-priority-aggregator instance
Vassilev Expires January 6, 2020 [Page 33]
Internet-Draft NETWORK-BRIDGE-02 July 2019
signaling video0 video1 best-effort
v v v v
| | | |
+--+ +-----------+ /
|r1| | t | /
+--+ +-----------+ /
| | /
+-+ | /
|a| | /
+-+ | /
| / /
+--+ / /
|r2| / /
+--+ / /
| / /
+---------------+
| p |
+---------------+
|
v
A.3. Topology
The example flow configuration is for the topology in the diagram
below.
+-------+ p0 +-------+ p1 +-------+
| host0 |------| br0 |-----| host1 |
+-------+ +-------+ +-------+
p2|
+-------+
| host2 |
+-------+
A.4. CLI listing
CLI commands configuring flows and assigning flows to traffic-
classes:
Vassilev Expires January 6, 2020 [Page 34]
Internet-Draft NETWORK-BRIDGE-02 July 2019
> create /flows/flow[id='video0'] -- \
match/vlan-match/vlan-id/vlan-id=10 \
actions/action[order='0']/output-action/out-port=p2
> merge /flows/flow[id='video0'] -- traffic-class=video0
> create /flows/flow[id='video1'] -- \
match/vlan-match/vlan-id/vlan-id=11 \
actions/action[order='0']/output-action/out-port=p2
> merge /flows/flow[id='video1'] -- traffic-class=video1
> create /flows/flow[id='best-effort-to-host0'] -- \
match/ethernet-match/ethernet-destination\
/address=00:01:02:03:00:00 \
actions/action[order='0']/output-action/out-port=p0
> merge /flows/flow[id='best-effort-to-host0'] -- \
traffic-class=best-effort
> create /flows/flow[id='best-effort-to-host1'] -- \
match/ethernet-match/ethernet-destination\
/address=00:01:02:03:00:01 \
actions/action[order='0']/output-action/out-port=p1
> merge /flows/flow[id='best-effort-to-host1'] -- \
traffic-class=best-effort
> create /flows/flow[id='best-effort-to-host2'] -- \
match/ethernet-match/ethernet-destination\
/address=00:01:02:03:00:02 \
actions/action[order='0']/output-action/out-port=p2
> merge /flows/flow[id='best-effort-to-host2'] -- \
traffic-class=best-effort
> create /flows/flow[id='ptp-to-host0'] -- \
match/ethernet-match/ethernet-destination\
/address=00:01:02:03:00:00 \
actions/action[order='0']/output-action/out-port=p0
> merge /flows/flow[id='ptp-to-host0'] -- \
traffic-class=signaling
> create /flows/flow[id='ptp-to-host1'] -- \
match/ethernet-match/ethernet-destination\
/address=00:01:02:03:00:01 \
actions/action[order='0']/output-action/out-port=p1
> merge /flows/flow[id='ptp-to-host1'] -- \
traffic-class=signaling
> create /flows/flow[id='ptp-to-host2'] -- \
match/ethernet-match/ethernet-destination\
/address=00:01:02:03:00:02 \
actions/action[order='0']/output-action/out-port=p2
> merge /flows/flow[id='ptp-to-host2'] -- \
traffic-class=signaling
> commit
CLI commands configuring and monitorig the scheduler:
Vassilev Expires January 6, 2020 [Page 35]
Internet-Draft NETWORK-BRIDGE-02 July 2019
> replace /bridge/scheduler-classes/scheduler-class/gate-controllers\
/gate-controller[id='p']/inputs/input/queue-len value=1048576
> replace /bridge/scheduler-classes/scheduler-class/gate-controllers\
/gate-controller[id='t']/time-slot0-interval value=5000000
> commit
> xget /interfaces/interface[name='if2']/scheduler/gate-controllers\
/gate-controller[id='r1']/inputs/input[index='1']/overflow-discards
...
overflow-discards 33
...
> xget /interfaces/interface[name='if2']/scheduler/gate-controllers\
/gate-controller[id='p']/input-classes/
input-class[class='pri2']/overflow-discards
...
overflow-discards 1000000
...
A.5. Configuration Data Instance
<?xml version="1.0" encoding="utf-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<bridge xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge">
<ports>
<port>
<name>p0</name>
<index>0</index>
<class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:default-port</class>
<class-instance-index
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler">
0</class-instance-index>
</port>
<port>
<name>p1</name>
<index>1</index>
<class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:default-port</class>
<class-instance-index
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler">
1</class-instance-index>
</port>
<port>
<name>p2</name>
<index>2</index>
Vassilev Expires January 6, 2020 [Page 36]
Internet-Draft NETWORK-BRIDGE-02 July 2019
<class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:default-port</class>
<class-instance-index
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler">
2</class-instance-index>
</port>
</ports>
<default-traffic-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:best-effort</default-traffic-class>
<default-port-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:best-effort</default-port-class>
<traffic-classes
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler">
<traffic-class
xmlns:example="http://example.com/ns/example-bridge">
example:best-effort</traffic-class>
<traffic-class
xmlns:example="http://example.com/ns/example-bridge">
example:signaling</traffic-class>
<traffic-class
xmlns:example="http://example.com/ns/example-bridge">
example:video0</traffic-class>
<traffic-class
xmlns:example="http://example.com/ns/example-bridge">
example:video1</traffic-class>
</traffic-classes>
<port-classes
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler">
<port-class xmlns:example="http://example.com/ns/example-bridge">
example:default-port</port-class>
</port-classes>
<scheduler-classes
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler">
<scheduler-class>
<egress-port-class
xmlns:example="http://example.com/ns/example-bridge">
example:default-port</egress-port-class>
<inputs>
<input>
Vassilev Expires January 6, 2020 [Page 37]
Internet-Draft NETWORK-BRIDGE-02 July 2019
<traffic-class
xmlns:example="http://example.com/ns/example-bridge">
example:best-effort</traffic-class>
<ingress-port-class
xmlns:example="http://example.com/ns/example-bridge">
example:default-port</ingress-port-class>
<gate-controller>p</gate-controller>
<input-class
xmlns:example="http://example.com/ns/example-bridge">
example:pri2</input-class>
<base-index>0</base-index>
</input>
<input>
<traffic-class
xmlns:example="http://example.com/ns/example-bridge">
example:signaling</traffic-class>
<ingress-port-class
xmlns:example="http://example.com/ns/example-bridge">
example:default-port</ingress-port-class>
<gate-controller>r1</gate-controller>
<input-class
xmlns:example="http://example.com/ns/example-bridge">
example:in</input-class>
<base-index>0</base-index>
</input>
<input>
<traffic-class
xmlns:example="http://example.com/ns/example-bridge">
example:video0</traffic-class>
<ingress-port-class
xmlns:example="http://example.com/ns/example-bridge">
example:default-port</ingress-port-class>
<gate-controller>t</gate-controller>
<input-class
xmlns:example="http://example.com/ns/example-bridge">
example:timeslot0</input-class>
<base-index>0</base-index>
</input>
<input>
<traffic-class
xmlns:example="http://example.com/ns/example-bridge">
example:video1</traffic-class>
<ingress-port-class
xmlns:example="http://example.com/ns/example-bridge">
example:default-port</ingress-port-class>
<gate-controller>t</gate-controller>
<input-class
xmlns:example="http://example.com/ns/example-bridge">
Vassilev Expires January 6, 2020 [Page 38]
Internet-Draft NETWORK-BRIDGE-02 July 2019
example:timeslot1</input-class>
<base-index>0</base-index>
</input>
</inputs>
<gate-controllers>
<gate-controller>
<id>a</id>
<type
xmlns:example="http://example.com/ns/example-bridge">
example:strict-priority-aggregator</type>
<inputs>
<input>
<class
xmlns:example="http://example.com/ns/example-bridge">
example:pri0</class>
<instance-count>3</instance-count>
<queue-len>2048</queue-len>
</input>
</inputs>
<output>
<gate-controller>r2</gate-controller>
<input-class
xmlns:example="http://example.com/ns/example-bridge">
example:in</input-class>
<index>0</index>
</output>
</gate-controller>
<gate-controller>
<id>p</id>
<type xmlns:example="http://example.com/ns/example-bridge">
example:strict-priority-aggregator</type>
<inputs>
<input>
<class
xmlns:example="http://example.com/ns/example-bridge">
example:pri0</class>
<instance-count>1</instance-count>
<queue-len>2048</queue-len>
</input>
<input>
<class
xmlns:example="http://example.com/ns/example-bridge">
example:pri1</class>
<instance-count>1</instance-count>
<queue-len>32768</queue-len>
</input>
<input>
<class
Vassilev Expires January 6, 2020 [Page 39]
Internet-Draft NETWORK-BRIDGE-02 July 2019
xmlns:example="http://example.com/ns/example-bridge">
example:pri2</class>
<instance-count>3</instance-count>
<queue-len>1048576</queue-len>
</input>
</inputs>
</gate-controller>
<gate-controller>
<id>r1</id>
<type
xmlns:example="http://example.com/ns/example-bridge">
example:rate-limiter</type>
<inputs>
<input>
<class
xmlns:example="http://example.com/ns/example-bridge">
example:in</class>
<instance-count>3</instance-count>
</input>
</inputs>
<output>
<gate-controller>a</gate-controller>
<input-class
xmlns:example="http://example.com/ns/example-bridge">
example:pri0</input-class>
<index>0</index>
</output>
<interval xmlns="http://example.com/ns/example-bridge">
10000000</interval>
<limit xmlns="http://example.com/ns/example-bridge">
12500</limit>
</gate-controller>
<gate-controller>
<id>r2</id>
<type xmlns:example="http://example.com/ns/example-bridge">
example:rate-limiter</type>
<inputs>
<input>
<class
xmlns:example="http://example.com/ns/example-bridge">
example:in</class>
<instance-count>1</instance-count>
</input>
</inputs>
<output>
<gate-controller>p</gate-controller>
<input-class
xmlns:example="http://example.com/ns/example-bridge">
Vassilev Expires January 6, 2020 [Page 40]
Internet-Draft NETWORK-BRIDGE-02 July 2019
example:pri0</input-class>
<index>0</index>
</output>
<interval xmlns="http://example.com/ns/example-bridge">
10000000</interval>
<limit xmlns="http://example.com/ns/example-bridge">
125000</limit>
</gate-controller>
<gate-controller>
<id>t</id>
<type xmlns:example="http://example.com/ns/example-bridge">
example:cyclic-timeslot-schedule-aggregator</type>
<inputs>
<input>
<class
xmlns:example="http://example.com/ns/example-bridge">
example:timeslot0</class>
<instance-count>3</instance-count>
<queue-len>1048576</queue-len>
</input>
<input>
<class
xmlns:example="http://example.com/ns/example-bridge">
example:timeslot1</class>
<instance-count>3</instance-count>
<queue-len>1048576</queue-len>
</input>
</inputs>
<output>
<gate-controller>p</gate-controller>
<input-class
xmlns:example="http://example.com/ns/example-bridge">
example:pri0</input-class>
<index>2</index>
</output>
<period xmlns="http://example.com/ns/example-bridge">
10000000</period>
<time-slot0-interval
xmlns="http://example.com/ns/example-bridge">
5000000</time-slot0-interval>
<time-slot1-interval
xmlns="http://example.com/ns/example-bridge">
5000000</time-slot1-interval>
</gate-controller>
</gate-controllers>
</scheduler-class>
</scheduler-classes>
</bridge>
Vassilev Expires January 6, 2020 [Page 41]
Internet-Draft NETWORK-BRIDGE-02 July 2019
<flows xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-flows">
<flow>
<id>best-effort-to-host0</id>
<match>
<ethernet-match>
<ethernet-destination>
<address>00:01:02:03:00:00</address>
</ethernet-destination>
</ethernet-match>
</match>
<actions>
<action>
<order>0</order>
<output-action>
<out-port>p0</out-port>
</output-action>
</action>
</actions>
<traffic-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:best-effort</traffic-class>
</flow>
<flow>
<id>best-effort-to-host1</id>
<match>
<ethernet-match>
<ethernet-destination>
<address>00:01:02:03:00:01</address>
</ethernet-destination>
</ethernet-match>
</match>
<actions>
<action>
<order>0</order>
<output-action>
<out-port>p1</out-port>
</output-action>
</action>
</actions>
<traffic-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:best-effort</traffic-class>
</flow>
<flow>
<id>best-effort-to-host2</id>
<match>
Vassilev Expires January 6, 2020 [Page 42]
Internet-Draft NETWORK-BRIDGE-02 July 2019
<ethernet-match>
<ethernet-destination>
<address>00:01:02:03:00:02</address>
</ethernet-destination>
</ethernet-match>
</match>
<actions>
<action>
<order>0</order>
<output-action>
<out-port>p2</out-port>
</output-action>
</action>
</actions>
<traffic-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:best-effort</traffic-class>
</flow>
<flow>
<id>ptp-to-host0</id>
<match>
<ethernet-match>
<ethernet-destination>
<address>00:01:02:03:00:00</address>
</ethernet-destination>
</ethernet-match>
</match>
<actions>
<action>
<order>0</order>
<output-action>
<out-port>p0</out-port>
</output-action>
</action>
</actions>
<traffic-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:signaling</traffic-class>
</flow>
<flow>
<id>ptp-to-host1</id>
<match>
<ethernet-match>
<ethernet-destination>
<address>00:01:02:03:00:01</address>
</ethernet-destination>
Vassilev Expires January 6, 2020 [Page 43]
Internet-Draft NETWORK-BRIDGE-02 July 2019
</ethernet-match>
</match>
<actions>
<action>
<order>0</order>
<output-action>
<out-port>p1</out-port>
</output-action>
</action>
</actions>
<traffic-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:signaling</traffic-class>
</flow>
<flow>
<id>ptp-to-host2</id>
<match>
<ethernet-match>
<ethernet-destination>
<address>00:01:02:03:00:02</address>
</ethernet-destination>
</ethernet-match>
</match>
<actions>
<action>
<order>0</order>
<output-action>
<out-port>p2</out-port>
</output-action>
</action>
</actions>
<traffic-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:signaling</traffic-class>
</flow>
<flow>
<id>video0</id>
<match>
<vlan-match>
<vlan-id>
<vlan-id>10</vlan-id>
</vlan-id>
</vlan-match>
</match>
<actions>
<action>
Vassilev Expires January 6, 2020 [Page 44]
Internet-Draft NETWORK-BRIDGE-02 July 2019
<order>0</order>
<output-action>
<out-port>p2</out-port>
</output-action>
</action>
</actions>
<traffic-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:video0</traffic-class>
</flow>
<flow>
<id>video1</id>
<match>
<vlan-match>
<vlan-id>
<vlan-id>11</vlan-id>
</vlan-id>
</vlan-match>
</match>
<actions>
<action>
<order>0</order>
<output-action>
<out-port>p2</out-port>
</output-action>
</action>
</actions>
<traffic-class
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"
xmlns:example="http://example.com/ns/example-bridge">
example:video1</traffic-class>
</flow>
</flows>
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>if0</name>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">
ianaift:ethernetCsmacd</type>
<port-name
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge">
p0</port-name>
</interface>
<interface>
<name>if1</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">
ianaift:ethernetCsmacd</type>
Vassilev Expires January 6, 2020 [Page 45]
Internet-Draft NETWORK-BRIDGE-02 July 2019
<port-name
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge">
p1</port-name>
</interface>
<interface>
<name>if2</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">
ianaift:ethernetCsmacd</type>
<port-name
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-bridge">
p2</port-name>
</interface>
</interfaces>
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
</nacm>
</config>
A.6. Companion YANG Data Model for Implementations Not Compliant with
NMDA
The YANG modules defined in this document are designed to be used in
conjunction with implementations that support the Network Management
Datastore Architecture (NMDA) as defined in [RFC8342]. In order to
allow implementations to use the data model even in cases when NMDA
is not supported, the following companion module is defined.
<CODE BEGINS> file "ietf-network-bridge-scheduler-
state@2019-07-05.yang"
module ietf-network-bridge-scheduler-state {
namespace
"urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler-state";
prefix sched-state;
import ietf-interfaces {
prefix if;
}
import ietf-network-bridge-scheduler {
prefix sched;
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
Editor: Vladimir Vassilev
Vassilev Expires January 6, 2020 [Page 46]
Internet-Draft NETWORK-BRIDGE-02 July 2019
<mailto:vladimir@transpacket.com>";
description
"This module contains /if:interfaces-state/if:interface
augmentation which mirrors the 'scheduler' container
as the one part of the 'ietf-network-bridge-scheduler'
but contains only read-only state data. The data model is
not needed when the underlying implementation infrastructure
supports the Network Management Datastore Architecture (NMDA).
Copyright (c) 2019 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 2019-07-05 {
description
"Initial revision.";
reference
"RFC XXXX: Network Bridge";
}
augment "/if:interfaces-state/if:interface" {
container scheduler {
container gate-controllers {
list gate-controller {
key "id type";
leaf id {
type string;
}
leaf type {
type identityref {
base sched:gate-controller;
}
mandatory true;
}
container inputs {
list input {
key "class index";
leaf class {
type identityref {
Vassilev Expires January 6, 2020 [Page 47]
Internet-Draft NETWORK-BRIDGE-02 July 2019
base sched:gate-controller-input;
}
}
leaf index {
type uint32;
}
uses sched:gate-controller-queue-state;
}
}
container input-classes {
list input-class {
key "class";
leaf class {
type identityref {
base sched:gate-controller-input;
}
}
uses sched:gate-controller-queue-state;
}
}
}
}
}
}
}
<CODE ENDS>
Author's Address
Vladimir Vassilev
Transpacket
Email: vladimir@transpacket.com
Vassilev Expires January 6, 2020 [Page 48]