Network Working Group V. Vassilev Internet-Draft Transpacket Intended status: Standards Track July 14, 2018 Expires: January 15, 2019 A YANG Data Model for Network Bridge Management draft-vassilev-netmod-network-bridge-00 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 15, 2019. Copyright Notice Copyright (c) 2018 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 15, 2019 [Page 1] Internet-Draft NETWORK-BIRDGE-00 July 2018 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.1. YANG . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . 3 1.2. Problem Statement . . . . . . . . . . . . . . . . . . . . 3 1.3. Solution . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.1. Forwarding . . . . . . . . . . . . . . . . . . . . . 3 1.3.2. Scheduling . . . . . . . . . . . . . . . . . . . . . 4 2. Network Bridge Module Tree Diagram . . . . . . . . . . . . . 6 3. Network Bridge Flows Module Tree Diagram . . . . . . . . . . 6 4. Network Bridge Scheduler Module Tree Diagram . . . . . . . . 9 5. Network Bridge Module YANG . . . . . . . . . . . . . . . . . 11 6. Network Bridge Flows Module YANG . . . . . . . . . . . . . . 12 7. Network Bridge Scheduler Module YANG . . . . . . . . . . . . 19 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 8.1. NETWORK BRIDGE YANG Modules . . . . . . . . . . . . . . . 27 9. Security Considerations . . . . . . . . . . . . . . . . . . . 28 10. Normative References . . . . . . . . . . . . . . . . . . . . 28 Appendix A. Example . . . . . . . . . . . . . . . . . . . . . . 29 A.1. Model . . . . . . . . . . . . . . . . . . . . . . . . . . 29 A.2. Scheduler diagram . . . . . . . . . . . . . . . . . . . . 31 A.3. Topology . . . . . . . . . . . . . . . . . . . . . . . . 32 A.4. CLI listing . . . . . . . . . . . . . . . . . . . . . . . 32 A.5. Configuration Data Instance . . . . . . . . . . . . . . . 34 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 44 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]. 1.1.1. YANG The following terms are defined in [RFC7950]: o must statement Vassilev Expires January 15, 2019 [Page 2] Internet-Draft NETWORK-BIRDGE-00 July 2018 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. 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. Vassilev Expires January 15, 2019 [Page 3] Internet-Draft NETWORK-BIRDGE-00 July 2018 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: 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 Vassilev Expires January 15, 2019 [Page 4] Internet-Draft NETWORK-BIRDGE-00 July 2018 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. 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 15, 2019 [Page 5] Internet-Draft NETWORK-BIRDGE-00 July 2018 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 15, 2019 [Page 6] Internet-Draft NETWORK-BIRDGE-00 July 2018 | | | +--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 | +--(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 15, 2019 [Page 7] Internet-Draft NETWORK-BIRDGE-00 July 2018 | | +--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 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 +--(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 | +---w vlan-cfi? vlan-cfi +--:(set-vlan-id-action-case) | +---w set-vlan-id-action Vassilev Expires January 15, 2019 [Page 8] Internet-Draft NETWORK-BIRDGE-00 July 2018 | +---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 augment /if:interfaces/if:interface: +--rw scheduler +--rw gate-controllers Vassilev Expires January 15, 2019 [Page 9] Internet-Draft NETWORK-BIRDGE-00 July 2018 +--rw gate-controller* [id type] +--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 +--rw input-class? leafref +--rw index? uint32 Vassilev Expires January 15, 2019 [Page 10] Internet-Draft NETWORK-BIRDGE-00 July 2018 5. Network Bridge Module YANG file "ietf-network-bridge@2018-07-15.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: WG List: Editor: Vladimir Vassilev "; description "This module contains a collection of YANG definitions for description and management of network bridges. Copyright (c) 2015 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 2018-07-15 { description "Initial revision."; reference "RFC XXXX: Network Bridge"; } container bridge { container ports { list port { key "name"; unique "index"; Vassilev Expires January 15, 2019 [Page 11] Internet-Draft NETWORK-BIRDGE-00 July 2018 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."; } } 6. Network Bridge Flows Module YANG file "ietf-network-bridge-flows@2018-07-15.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 { prefix inet; revision-date 2013-07-15; } import ietf-yang-types { prefix yang; revision-date 2013-07-15; } Vassilev Expires January 15, 2019 [Page 12] Internet-Draft NETWORK-BIRDGE-00 July 2018 organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: WG List: Editor: Vladimir Vassilev "; description "This module contains a collection of YANG definitions for description and management of network bridge based on flows."; revision 2018-07-15 { description "Unreleased revision."; reference "RFC XXXX: Network Bridge"; } 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"; Vassilev Expires January 15, 2019 [Page 13] Internet-Draft NETWORK-BIRDGE-00 July 2018 uses ordered; uses action; } } grouping action { choice action { 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; } Vassilev Expires January 15, 2019 [Page 14] Internet-Draft NETWORK-BIRDGE-00 July 2018 leaf vlan-id { type vlan-id; } } } case set-vlan-cfi-action-case { container set-vlan-cfi-action { 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"; } } } } typedef vlan-pcp { description "IEEE 802.1p priority. It indicates the frame priority level. Values are from 0 (best effort) to 7 (highest); 1 represents the lowest priority."; type uint8 { range "0..7"; } } typedef vlan-id { type uint16 { range "0..4095"; } Vassilev Expires January 15, 2019 [Page 15] Internet-Draft NETWORK-BIRDGE-00 July 2018 } typedef ether-type { type uint32; } grouping mac-address-filter { leaf address { mandatory true; type yang:mac-address; } leaf mask { type yang:mac-address; } } grouping ethernet-match-fields { container ethernet-source { description "Ethernet source address."; presence "Match field is active and set"; uses mac-address-filter; } container ethernet-destination { description "Ethernet destination address."; presence "Match field is active and set"; uses mac-address-filter; } container ethernet-type { description "Ethernet frame type."; presence "Match field is active and set"; leaf type { mandatory true; type ether-type; } } } grouping vlan-match-fields { container vlan-id { description "VLAN id."; presence "Match field is active and set"; leaf vlan-id-present { type boolean; } Vassilev Expires January 15, 2019 [Page 16] Internet-Draft NETWORK-BIRDGE-00 July 2018 leaf vlan-id { type vlan-id; } } leaf vlan-pcp { description "VLAN priority."; type vlan-pcp; } } 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 { 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; Vassilev Expires January 15, 2019 [Page 17] Internet-Draft NETWORK-BIRDGE-00 July 2018 } 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"; } 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; } } Vassilev Expires January 15, 2019 [Page 18] Internet-Draft NETWORK-BIRDGE-00 July 2018 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; } } typedef flow-id { type inet:uri; } container flows { list flow { key "id"; leaf id { type flow-id; } uses flow; } } } 7. Network Bridge Scheduler Module YANG file "ietf-network-bridge-scheduler@2018-07-15.yang" module ietf-network-bridge-scheduler { namespace "urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"; Vassilev Expires January 15, 2019 [Page 19] Internet-Draft NETWORK-BIRDGE-00 July 2018 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: WG List: Editor: Vladimir Vassilev "; description "This module contains a collection of YANG definitions for description and management of network bridge schedulers. Copyright (c) 2015 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 2018-07-15 { 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."; } Vassilev Expires January 15, 2019 [Page 20] Internet-Draft NETWORK-BIRDGE-00 July 2018 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."; } 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 Vassilev Expires January 15, 2019 [Page 21] Internet-Draft NETWORK-BIRDGE-00 July 2018 "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"; } 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" { Vassilev Expires January 15, 2019 [Page 22] Internet-Draft NETWORK-BIRDGE-00 July 2018 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."; } 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; description "Constant delay attributed to delays in the gate-controller."; units "picoseconds"; } leaf configurable-delay-line { type uint64; 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."; units "picoseconds"; } leaf queue-len { Vassilev Expires January 15, 2019 [Page 23] Internet-Draft NETWORK-BIRDGE-00 July 2018 type uint32; units "bytes"; } } grouping gate-controller-queue-state { leaf queued-pkts { config false; type uint64; } leaf queued-bytes { config false; type uint64; } leaf discards { config false; type uint64; 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."; } leaf overflow-discards { config false; type uint64; description "Unintended discard caused by overflow of the input queue of the gate controller."; } leaf error-discards { config false; type uint64; } } augment "/if:interfaces/if:interface" { container scheduler { container gate-controllers { list gate-controller { key "id type"; leaf id { type string; } leaf type { type identityref { Vassilev Expires January 15, 2019 [Page 24] Internet-Draft NETWORK-BIRDGE-00 July 2018 base gate-controller; } mandatory true; } container inputs { list input { key "class index"; 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; Vassilev Expires January 15, 2019 [Page 25] Internet-Draft NETWORK-BIRDGE-00 July 2018 } leaf gate-controller { type leafref { path "../../../gate-controllers/gate-controller/id"; } } 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 { Vassilev Expires January 15, 2019 [Page 26] Internet-Draft NETWORK-BIRDGE-00 July 2018 type leafref { path "../../../gate-controller/id"; } } leaf input-class { type leafref { 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."; } } } } } } } } 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 Vassilev Expires January 15, 2019 [Page 27] Internet-Draft NETWORK-BIRDGE-00 July 2018 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 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, . [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, . [RFC8340] Bjorklund, M., Ed. and L. Berger, Ed., "YANG Tree Diagrams", RFC 8340, DOI 10.17487/RFC8340, March 2018, . Vassilev Expires January 15, 2019 [Page 28] Internet-Draft NETWORK-BIRDGE-00 July 2018 [XSD] Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes Second Edition", World Wide Web Consortium Recommendation REC-xmlschema-2-20041028, October 2004, . Appendix A. Example Example bridge with signaling, video0, video1 and best-effort traffic classes. A.1. Model file "example-bridge@2018-07-15.yang" 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; } Vassilev Expires January 15, 2019 [Page 29] Internet-Draft NETWORK-BIRDGE-00 July 2018 identity best-effort { base sched:traffic-class; } identity default-port { base sched:port-class; } //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 { Vassilev Expires January 15, 2019 [Page 30] Internet-Draft NETWORK-BIRDGE-00 July 2018 type uint32; units "nanoseconds"; } leaf time-slot0-interval { type uint32; units "nanoseconds"; } leaf time-slot1-interval { type uint32; 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 Vassilev Expires January 15, 2019 [Page 31] Internet-Draft NETWORK-BIRDGE-00 July 2018 o a - trivial aggregator instance (implemented using strict- priority-aggregator) o t - cyclic-timeslot-schedule-aggregator instance o p - strict-priority-aggregator instance 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 15, 2019 [Page 32] Internet-Draft NETWORK-BIRDGE-00 July 2018 > 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 15, 2019 [Page 33] Internet-Draft NETWORK-BIRDGE-00 July 2018 > 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 p0 0 example:default-port 0 p1 1 example:default-port 1 p2 2 Vassilev Expires January 15, 2019 [Page 34] Internet-Draft NETWORK-BIRDGE-00 July 2018 example:default-port 2 example:best-effort example:best-effort example:best-effort example:signaling example:video0 example:video1 example:default-port example:default-port Vassilev Expires January 15, 2019 [Page 35] Internet-Draft NETWORK-BIRDGE-00 July 2018 example:best-effort example:default-port p example:pri2 0 example:signaling example:default-port r1 example:in 0 example:video0 example:default-port t example:timeslot0 0 example:video1 example:default-port t Vassilev Expires January 15, 2019 [Page 36] Internet-Draft NETWORK-BIRDGE-00 July 2018 example:timeslot1 0 a example:strict-priority-aggregator example:pri0 3 2048 r2 example:in 0 p example:strict-priority-aggregator example:pri0 1 2048 example:pri1 1 32768 example:pri2 3 1048576 r1 example:rate-limiter example:in 3 a example:pri0 0 10000000 12500 r2 example:rate-limiter example:in 1 p Vassilev Expires January 15, 2019 [Page 38] Internet-Draft NETWORK-BIRDGE-00 July 2018 example:pri0 0 10000000 125000 t example:cyclic-timeslot-schedule-aggregator example:timeslot0 3 1048576 example:timeslot1 3 1048576 p example:pri0 2 10000000 5000000 5000000 Vassilev Expires January 15, 2019 [Page 39] Internet-Draft NETWORK-BIRDGE-00 July 2018 best-effort-to-host0
00:01:02:03:00:00
0 p0 example:best-effort
best-effort-to-host1
00:01:02:03:00:01
0 p1 example:best-effort
best-effort-to-host2 Vassilev Expires January 15, 2019 [Page 40] Internet-Draft NETWORK-BIRDGE-00 July 2018
00:01:02:03:00:02
0 p2 example:best-effort
ptp-to-host0
00:01:02:03:00:00
0 p0 example:signaling
ptp-to-host1
00:01:02:03:00:01
Vassilev Expires January 15, 2019 [Page 41] Internet-Draft NETWORK-BIRDGE-00 July 2018
0 p1 example:signaling
ptp-to-host2
00:01:02:03:00:02
0 p2 example:signaling
video0 10 Vassilev Expires January 15, 2019 [Page 42] Internet-Draft NETWORK-BIRDGE-00 July 2018 0 p2 example:video0 video1 11 0 p2 example:video1
if0 ianaift:ethernetCsmacd p0 if1 ianaift:ethernetCsmacd Vassilev Expires January 15, 2019 [Page 43] Internet-Draft NETWORK-BIRDGE-00 July 2018 p1 if2 ianaift:ethernetCsmacd p2
Author's Address Vladimir Vassilev Transpacket Email: vladimir@transpacket.com Vassilev Expires January 15, 2019 [Page 44]