<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-wang-ccamp-flexe-yang-cm-03"
     ipr="trust200902">
  <front>
    <title abbrev="draft-wang-ccamp-flexe-yang">YANG Data Model for FlexE
    Management</title>

    <author fullname="Minxue Wang" initials="M" surname="Wang">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>No.32 Xuanwumen west street</street>

          <code>100053</code>

          <region>Beijing</region>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>wangminxue@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Liuyan Han" initials="L" surname="Han">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>No.32 Xuanwumen west street</street>

          <code>100053</code>

          <region>Beijing</region>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>hanliuyan@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Fan Yang" initials="F" surname="Yang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Rd.</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>shirley.yangfan@huawei.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Xiaobing Niu" initials="X" surname="Niu">
      <organization>ZTE</organization>

      <address>
        <postal>
          <street>ZTE, No.5 Anding Road.</street>

          <city>Beijing</city>

          <region/>

          <code>100029</code>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>niu.xiaobing@zte.com.cn</email>

        <uri/>
      </address>
    </author>

    <author fullname="Luis M. Contreras" initials="LM." surname="Contreras">
      <organization>Telefonica</organization>

      <address>
        <postal>
          <street>Ronda de la Comunicacion, s/n</street>

          <street>Sur-3 building, 3rd floor</street>

          <city>Madrid</city>

          <region/>

          <code>28050</code>

          <country>Spain</country>
        </postal>

        <email>luismiguel.contrerasmurillo@telefonica.com</email>

        <uri>http://lmcontreras.com/</uri>
      </address>
    </author>

    <author fullname="Xufeng Liu" initials="X" surname="Liu">
      <organization>IBM Corporation</organization>

      <address>
        <postal>
          <street>2300 Dulles Station Blvd.</street>

          <city>Herndon, VA 20171</city>

          <region/>

          <code/>

          <country>United States of America</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>xufeng.liu.ietf@gmail.com</email>

        <uri/>
      </address>
    </author>

    <date day="16" month="May" year="2022"/>

    <workgroup>CCAMP Working Group</workgroup>

    <abstract>
      <t>This document defines a service provider targeted YANG data model for
      the configuration and management of a Flex Ethernet (FlexE) network,
      including FlexE groups. It also supports the configuration of each FlexE
      client as an interface. The YANG module in this document conforms to the
      Network Management Datastore Architecture (NMDA).</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>From a service provider's point of view, a transport network with
      Flex Ethernet (FlexE) support is usually deployed with all FlexE Groups
      configured at first, and then FlexE clients are added one by one at a
      later stage. This document defines a service provider targeted YANG data
      model for the configuration and management of FlexE, including FlexE
      groups and FlexE clients. It supports the configuration of FlexE client
      as an interface as the data model of FlexE client is augmented based on
      the generic interfaces data model as defined in <xref
      target="RFC8343"/>. Furthermore, when a FlexE transport network is used
      to backhaul 5G mobile services, synchronization channel can also be
      imbedded in a FlexE PHY. The specific PHY used for synchronization
      channel can be retrieved for management. Other FlexE attributes are
      based on the FlexE 2.1 Implementation Agreement as specified in <xref
      target="FLEXE"/>.</t>

      <t>Note that this document would only focus on the configuration and
      maintenance of the FlexE interfaces. Cross connection of FlexE timeslots
      in a network node is tentatively out of the scope of this document.</t>

      <t>The YANG modules in this document conforms to the Network Management
      Datastore Architecture (NMDA) <xref target="RFC8342"/>.</t>

      <section title="Conventions used in this document">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
        "OPTIONAL" in this document are to be interpreted as described in BCP
        14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
        when, they appear in all capitals, as shown here.</t>
      </section>

      <section title="Terminology">
        <t>A simplified graphical representation of the data model is used in
        this document. The meaning of the symbols in the YANG data tree
        presented later in this document is defined in <xref
        target="RFC8340"/>. They are provided below for reference.</t>

        <t>o Brackets "[" and "]" enclose list keys.</t>

        <t>o Abbreviations before data node names: "rw" means configuration
        (read-write) and "ro" state data (read-only).</t>

        <t>o Symbols after data node names: "?" means an optional node, "!"
        means a presence container, and "*" denotes a list and leaf-list</t>

        <t>o Parentheses enclose choice and case nodes, and case nodes are
        also marked with a colon (":").</t>

        <t>o Ellipsis ("...") stands for contents of subtrees that are not
        shown.</t>

        <t>o Some of the key terms used in this document are listed as
        follow.</t>

        <t>The terminology for describing YANG data models is found in <xref
        target="RFC7950"/>.</t>

        <section title="FlexE terminology used in this document">
          <t>Most terminologies used in this document are extracted from
          [FLEXE].</t>

          <t>Calendar: The total capacity of a FlexE Group is represented as a
          collection of slots. The calendar for a FlexE Group composed of n
          PHYs is represented in each PHY as an array of slots (e.g., each
          representing 5Gbps of bandwidth), i.e., timeslot-list string.</t>

          <t>Ethernet PHY: an entity representing Ethernet Physical Coding
          Sublayer (PCS), Physical Media Attachment (PMA), and Physical Media
          Dependent (PMD) layers. Each PHY is consisted of one or more FlexE
          Instance (e.g., a 400GBASE-R PHY has four FlexE Instances).</t>

          <t>FlexE: Flex Ethernet.</t>

          <t>FlexE Client: An Ethernet flow based on a MAC data rate that may
          or may not correspond to any Ethernet PHY rate.</t>

          <t>FlexE Group: A FlexE Group is composed of from 1 to n Ethernet
          PHYs.</t>

          <t>FlexE PHY: 50GBASE-R, 100GBASE-R, 200GBASE-R, 400GBASE-R are
          defined as FlexE PHY by OIF FlexE IA.</t>

          <t/>
        </section>
      </section>
    </section>

    <section title="Requirements of FlexE configuration">
      <t>In following sections, the requirements are summarized according to
      the descriptions in OIF FlexE Implementation Agreement and ITU-T FlexE
      related standards e.g. <xref target="ITU-T_G.8023"/>. FlexE YANG data
      model targets to provide the configurations of the functions, as well as
      to report the real states and verify the consistency between the
      configuration and the real states. The requirements of FlexE groups and
      FlexE clients are summarized and illustrated as follows.</t>

      <section title="Requirements">
        <t>Requirements of the FlexE group include,</t>

        <t>R-Group-01 The model SHALL support the management of the FlexE
        group, consisting of one or more Ethernet PHY(s).</t>

        <t>R-Group-02 The model SHOULD be able to verify that the collection
        of Ethernet PHY(s) included in a FlexE group have the same
        characteristics (e.g. number of PHYs, timeslots of PHYs, etc.) at the
        local FlexE shims. If inconsistency exists, notifications (e.g.
        errors) SHOULD be invoked.</t>

        <t><vspace/></t>

        <t>Requirements of the FlexE client include,</t>

        <t>R-Client-01 The model SHALL support to assign required calendar
        slots to transport the FlexE clients. The assigned calendar slots MAY
        be in different FlexE timeslots with different ETH PHYs.</t>

        <t>R-Client-02 The model SHALL support to add FlexE client(s) into or
        remove FlexE client(s) from the FlexE group, without affecting the
        other existing FlexE clients whose size and calendar slot assignments
        are not changed.</t>
      </section>
    </section>

    <section title="Hierarchy of YANG Model for FlexE">
      <t>This section describes the hierarchy of the YANG modules for the
      FlexE management.</t>

      <t>Configuration management of FlexE group includes:</t>

      <t><list style="symbols">
          <t>flexe-groups specifies management configuration of all FlexE
          groups</t>

          <t>flexe-phys specifies management configuration of a list of PHYs
          in a specific FlexE group</t>
        </list></t>

      <t>Configuration management of a FlexE client includes:</t>

      <t><list style="symbols">
          <t>flexe-client specifies the FlexE slots used for the FlexE Client
          in FlexE group</t>
        </list></t>

      <section title="Tree Diagram of FlexE Group">
        <t>A simplified YANG tree diagram <xref target="RFC8340"/>
        representing the data model is typically used by YANG modules. This
        document uses the same tree diagram syntax as described in <xref
        target="RFC8340"/>.</t>

        <t>A tree diagram of FlexE group is depicted as the following:</t>

        <figure align="left">
            <preamble/>

            <artwork><![CDATA[   module: ietf-flexe
      +--rw flexe
         +--rw flexe-groups
            +--rw flexe-group* [index]
               +--rw index              uint32
               +--rw group-num          uint32
               +--rw negotiation-mode   negotiation-mode-type
               +--ro total-bandwidth    string
               +--ro free-bandwidth?    string
               +--ro sync-phy-number    uint32
               +--rw flexe-phys
                 +--rw flexe-phy-list* [port-name]
                     +--rw port-name        if:interface-ref
                     +--rw phy-number       uint32
                     +--ro free-timeslot-list  string
                     +--ro used-timeslot-list  string
]]></artwork>

            <postamble/>
          </figure>
      </section>

      <section title="Tree Diagram of FlexE Client">
        <t>A tree diagram of FlexE client is depicted as the following:</t>

        <figure align="left">
            <preamble/>

            <artwork><![CDATA[    augment /if:interfaces/if:interface:
        +--rw flexe-client
           +--rw client-index         uint32
           +--rw group-index          leafref
           +--rw client-num           uint32
           +--rw timeslot-lists
              +--rw timeslot-list*    [port-name]
                 +--rw port-name      if:interface-ref
                 +--rw time-slot      string
]]></artwork>

            <postamble/>
          </figure>
      </section>
    </section>

    <section title="YANG Module of FlexE Management">
      <t>The following YANG data module augments the interface container
      defined in <xref target="RFC8343"/> for a FlexE group interface. It
      imports iana-if-type <xref target="RFC7224"/> and ietf-interfaces <xref
      target="RFC8343"/>.</t>

      <t/>

      <section title="YANG Module of FlexE Group">
        <figure>
            <preamble/>

            <artwork><![CDATA[   <CODE BEGINS> file "ietf-flexe@2022-05-16.yang"
   module ietf-flexe {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-flexe";
     prefix "flexe";

     import iana-if-type {
       prefix ianaift;
     }
     import ietf-interfaces {
       prefix if;
       reference
       "RFC8343: A YANG Data Model for Interface Management";
     }

     organization "IETF CCAMP Working Group";
     contact
      "WG Web:   http://tools.ietf.org/wg/ccamp/
       WG List:  <mailto:ccamp@ietf.org>
       Author:   Minxue Wang
                 <mailto: wangminxue@chinamobile.com>
       Author:   Liuyan Han
                 <mailto: hanliuyan@chinamobile.com>
       Author:   Fan Yang
                 <mailto:shirley.yangfan@huawei.com>
       Author:   Xiaobing Niu
                 <mailto: niu.xiaobing@zte.com.cn>                     
       Author:   Luis M. Contreras 
                 <mailto:luismiguel.contrerasmurillo@telefonica.com>
       Author:   Xufeng Liu
                 <mailto:xufeng.liu.ietf@gmail.com>";
     description
      "This YANG module defines a data model for the configuration
       of a FlexE network.";

     revision "2022-05-16" {
       description "the third version";
       reference
       "draft-wang-ccamp-flexe-yang-cm-03: YANG Data Model for FlexE
        Management";
     }

     typedef negotiation-mode-type {
       type enumeration {
         enum "dynamic" {
           value 1;
           description
             "Dynamic mode.";
         }
         enum "static" {
           value 2;
           description
             "Static mode.";
         }
       }
       description
         "Negotiation mode of a FlexE group.";
     }

     container flexe {
       description
         "Specify FlexE configuration information.";
       container flexe-groups {
         description
           "List of FlexE groups.";
         list flexe-group {
           key "index";
           description
             "Configure FlexE group.";
           leaf index {
             type uint32 {
               range "1..65535";
             }
             description
               "FlexE group index.";
           }
           leaf group-num {
             type uint32 {
               range "1..1048574";
             }
             mandatory true;
             description
               "FlexE group number, as specified in OIF FlexE 2.1.";
           }
           leaf negotiation-mode {
             type negotiation-mode-type;
             mandatory true;
             description
               "FlexE group calendar negotiation mode, the default 
                value is 'dynamic'.";
           }
           leaf total-bandwidth {
             type string {
               length "1..9";
             }
             config false;
             mandatory true;
             description
               "FlexE group total bandwidth in Gbit/s, such as 10.";
           }
           leaf free-bandwidth {
             type string {
               length "1..9";
             }
             config false;
             description
               "FlexE group free bandwidth in Gbit/s, such as 100.";
           }
           leaf sync-phy-number {
             type uint32 {
               range "1..254";
             }
             config false;
             mandatory true;
             description
               "The FlexE PHY number used for synchronization management
                channel in a FlexE group, which is one of the PHY number 
                value in a FlexE group.";
           }
           container flexe-phys {
             description
               "List of physical port information in a FlexE Group.";
             list flexe-phy {
               key "port-name";
               description
                 "FlexE PHY port name.";
               leaf port-name {
                 type if:interface-ref;
                 description
                   "Physical port name. ";
               }
               leaf phy-number {
                 type uint32 {
                   range "1..254";
                 }
                 mandatory true;
                 description
                   "Number of a FlexE physical port. The PHY number of
                 a 100G port is an integer ranging from 1 to 254.
                 The PHY number of a 50G port is an integer ranging
                 from 1 to 126.";
               }
               leaf free-timeslot-list {
                 type string {
                   length "1..199";
                 }
                 config false;
                 mandatory true;
                 description
                  "Free timeslots of a FlexE PHY. The string 
                  consists of one or more numbers separated by 
                  commas (,) or hyphens (-), e.g.'1-5' indicates
                  1,2,3,4,5 timeslots, '0,5,7-10' indicates
                  0,5,7,8,9,10 timeslots.";
               }
               leaf used-timeslot-list {
                 type string {
                   length "1..199";
                 }
                 config false;
                 mandatory true;
                 description
                  "Used timeslots of a FlexE PHY. The string 
                  consists of one or more numbers separated by 
                  commas (,) or hyphens (-), e.g.'1-5' indicates
                  1,2,3,4,5 timeslots, '0,5,7-10' indicates
                  0,5,7,8,9,10 timeslots.";
               }
             }
           }
         }
       }
     }
   }
   <CODE ENDS>
]]></artwork>

            <postamble/>
          </figure>
      </section>

      <section title="YANG Module of FlexE Client">
        <t/>

        <figure>
            <preamble/>

            <artwork><![CDATA[   <CODE BEGINS> file "ietf-flexe@2022-05-16.yang"
   module ietf-flexe {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-flexe";
     prefix "flexe";

     import iana-if-type {
       prefix ianaift;
     }
     import ietf-interfaces {
       prefix if;
       reference
       "RFC8343: A YANG Data Model for Interface Management";
     }

     organization "IETF CCAMP Working Group";
     contact
      "WG Web:   http://tools.ietf.org/wg/ccamp/
       WG List:  <mailto:ccamp@ietf.org>
       Author:   Minxue Wang
                 <mailto: wangminxue@chinamobile.com>
       Author:   Liuyan Han
                 <mailto: hanliuyan@chinamobile.com>
       Author:   Fan Yang
                 <mailto:shirley.yangfan@huawei.com>
       Author:   Xiaobing Niu
                 <mailto: niu.xiaobing@zte.com.cn>                      
       Author:   Luis M. Contreras 
                 <mailto:luismiguel.contrerasmurillo@telefonica.com>
       Author:   Xufeng Liu
                 <mailto:xufeng.liu.ietf@gmail.com>";
     description
      "This YANG module defines a data model for the configuration
       of a FlexE client.";

     revision "2022-05-16" {
       description "the third version";
       reference
       "draft-wang-ccamp-flexe-yang-cm-03: YANG Data Model for FlexE
        Management";
     }

     augment "/if:interfaces/if:interface" {
       when "if:type = 'ianaift:flexEclient'" {
         description "Applies to FlexE client interfaces";
       }

       description
         "Augment interface model with FlexE client interface specific
         configuration nodes. Each flexe client interface represents a
         FlexE client configured in a device.";

       container flexe-client {
         description
           "FlexE client.";
         leaf client-index {
           type uint32 {
             range "1..65535";
           }
           mandatory true;
           description
             "FlexE client index.";
         }
         leaf group-index {
           type leafref {
           path "/flexe:flexe/flexe:flexe-groups"
            + "/flexe:flexe-group/flexe:index";
           }
           mandatory true;
           description
             "A local FlexE group index configured for a client on one 
              equipment for the sake of simplicity on configuration and
              management.";
         }
         leaf client-num {
           type uint32 {
             range "1..65534";
           }
           mandatory true;
           description
             "FlexE Client number.";
         }
         container timeslot-lists {
           description
             "List of binding timeslots.";
           list timeslot-list {
             key "port-name";
             description
               "Configure binding timeslots.";
             leaf port-name {
               type if:interface-ref;
               description
                 "FlexE physical port name.";
             }
             leaf time-slot {
               type string {
                 length "1..199";
               }
               mandatory true;
               description            
                 "Timeslot allocated for a FlexE client. The string 
                  consists of one or more numbers separated by 
                  commas (,) or hyphens (-), e.g.'1-5' indicates
                  1,2,3,4,5 timeslots, '0,5,7-10' indicates
                  0,5,7,8,9,10 timeslots.";
             }
           }
         }
       }
     }
   }
   <CODE ENDS>
]]></artwork>

            <postamble/>
          </figure>

        <t/>
      </section>
    </section>

    <section title="Security Considerations">
      <t>The YANG module specified in this document defines a schema for data
      that is designed to be accessed via network management protocols such as
      NETCONF <xref target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>.
      The lowest NETCONF layer is the secure transport layer, and the
      mandatory-to-implement secure transport is Secure Shell (SSH) <xref
      target="RFC6242"/>. The lowest RESTCONF layer is HTTPS, and the
      mandatory-to-implement secure transport is TLS <xref
      target="RFC8446"/>.</t>

      <t>The NETCONF access control model <xref target="RFC8341"/> provides
      the means to restrict access for particular NETCONF or RESTCONF users to
      a preconfigured subset of all available NETCONF or RESTCONF protocol
      operations and content.</t>

      <t>There are a number of data nodes defined in the YANG data modules in
      this document are writable, and the involved subtrees that are sensitive
      include:</t>

      <t><list style="symbols">
          <t>/flexe/flexe-groups/flexe-group</t>

          <t>/flexe/flexe-groups/flexe-group/flexe-phys/flexe-phy-list</t>

          <t>/flexe-client/timeslot-lists</t>
        </list></t>

      <t>Write operations (e.g., edit-config) to these data nodes without
      proper protection can have a negative effect on network operations.
      Specifically, an inappropriate configuration of them may cause an
      interrupt of a FlexE client flow, drop of all Ethernet frames of a FlexE
      client, or even break down of a whole FlexE group interface.</t>
    </section>

    <section title="IANA Considerations">
      <t>It is proposed that IANA should assign new URIs from the "IETF XML
      Registry" <xref target="RFC3688"/> as follows:</t>

      <figure>
        <artwork><![CDATA[   URI: urn:ietf:params:xml:ns:yang:ietf-flexe  
   Registrant Contact: The IESG 
   XML: N/A; the requested URI is an XML namespace

   URI: urn:ietf:params:xml:ns:yang:ietf-interfaces-flexe-client 
   Registrant Contact: The IESG
   XML: N/A; the requested URI is an XML namespace

]]></artwork>
      </figure>

      <t/>

      <t>It is proposed that IANA register the following YANG module in the
      "YANG Module Names" registry:</t>

      <figure>
          <artwork><![CDATA[   Name: ietf-flexe 
   Namespace: 
   Prefix: flexe 
   Reference: this document 

]]></artwork>
        </figure>
      <t>It is proposed that IANA register the following YANG module
      in the "YANG Module Names" registry:</t>
      <figure>
          <artwork><![CDATA[   Name: ietf-interfaces-flexe-client 
   Namespace: urn:ietf:params:xml:ns:yang:ietf-interfaces-flexe-client 
   Prefix: flexecl 
   Reference: this document 

]]></artwork>
        </figure>

      <t>It is proposed that IANA register a new IANAifType TBD for the
      interface type of Flex Ethernet client in the "IANA Interface Type YANG
      Module" <xref target="RFC7224"/>.</t>
    </section>

    <section title="Acknowledgement">
      <t>The authors would like to thank Weiqiang Cheng and Yuanlong Jiang for
      their valuable suggestions.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.6242"?>

      <?rfc include="reference.RFC.8446"?>

      <?rfc include="reference.RFC.3688"?>

      <?rfc ?>

      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.7224"?>

      <?rfc include="reference.RFC.7950"?>

      <?rfc include="reference.RFC.8174"
?>

      <?rfc include="reference.RFC.8341"?>

      <?rfc include="reference.RFC.6241"?>

      <?rfc include="reference.RFC.8342"?>

      <?rfc include="reference.RFC.8343"
?>

      <?rfc include="reference.RFC.8040"
?>

      <reference anchor="FLEXE">
        <!-- the following is the minimum to make xml2rfc happy -->

        <front>
          <title>Flex Ethernet 2.1 Implementation Agreement</title>

          <author fullname="OIF">
            <organization>ITU-T</organization>
          </author>

          <date month="July" year="2019"/>
        </front>

        <seriesInfo name="" value=""/>
      </reference>

      <reference anchor="ITU-T_G.8023">
        <!-- the following is the minimum to make xml2rfc happy -->

        <front>
          <title>ITU-T G.8023: Characteristics of equipment functional blocks
          supporting Ethernet physical layer and Flex Ethernet interfaces;
          11/2018</title>

          <author>
            <organization>ITU-T</organization>
          </author>

          <date month="November" year="2018"/>
        </front>

        <seriesInfo name="" value="https://www.itu.int/rec/T-REC-G.8023"/>
      </reference>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.8340'
?>

      <?rfc ?>

      <?rfc ?>
    </references>

    <section anchor="Example-application"
             title="Appendix: FlexE configuration model illustration">
      <t>A FlexE group must be configured first before any client signals are
      carried over it. The initial configuration commands could be from
      external management system, SDN controller etc.</t>

      <t>Currently, the FlexE configuration model shows the necessary
      parameters about the FlexE group and the FlexE client. That is the base
      model for further augments or extensions.</t>

      <t>In this section, more details about parameters in the model are
      elaborated, and some examples are illustrated based on following
      figure.</t>

      <figure align="left" anchor="FlexE-mux-demux-client" title="">
        <preamble/>

        <artwork align="left"><![CDATA[
            

              +--------+                      +---------+
              |        | 1    FlexE group   1 |         |
FlexE client1-|        +----------------------+         |-FlexE client1
              |  FlexE | 2                  2 | FlexeE  |
FlexE client2-|   mux  +----------------------+  demux  |-FlexE client2   
              |        | 3                  3 |         |   
              |        +----------------------+         |
              |        | 4                  4 |         | 
              |        +----------------------+         |
              +--------+                      +---------+   

            
        ]]></artwork>

        <postamble/>
      </figure>

      <section title="Configuration Example of the FlexE group">
        <t>The FlexE group YANG tree is shown in section 4. More explanations
        for the flexe-group data node include,</t>

        <t><list style="letters">
            <t>The leaf index provides an index to the FlexE group. The value
            of the index may be generated by local network device or network
            management system, so the values in FlexE mux and demux may be
            different.</t>

            <t>The leaf group-num is transported between FlexE mux and FlexE
            demux.</t>

            <t>The leaf negotiation-mode includes dynamic mode and static
            mode, and the default value is dynamic mode. For the dynamic mode,
            the calendar slot information for the FlexE client is only sent to
            the FlexE mux. While for the static mode, the calendar slot
            information for the FlexE client is configured both to the FlexE
            mux and demux.</t>

            <t>The leaf sync-phy-number is used for the synchronization
            management channel.</t>

            <t>The list flexe-phys includes all the PHYs bonded in a FlexE
            group. Each of the PHYs is identified by the port-name and
            phy-number in the group. Both ends of each PHY in the FlexE group
            should use the same PHY number.</t>
          </list></t>

        <figure align="left" anchor="Configuring-FlexE-group-in-mux" title="">
          <preamble/>

          <artwork align="left"><![CDATA[
                
    <flexe-group>
        <index>20221</index>
        <group-num>2222</group-num>
        <negotiation-mode>static</negotiation-mode>
        <flexe-phys>
            <flexe-phy>
                <port-name>ifa001</port-name>
                <phy-number>1</phy-number>
            </flexe-phy>   
            <flexe-phy>
                <port-name>ifa002</port-name>
                <phy-number>2</phy-number>
            </flexe-phy>   
            <flexe-phy>
                <port-name>ifa003</port-name>
                <phy-number>3</phy-number>
            </flexe-phy>
            <flexe-phy>              
                <port-name>ifa004</port-name>
                <phy-number>4</phy-number>
            </flexe-phy>  
        </flexe-phys>
    </flexe-group>
                
            ]]></artwork>

          <postamble/>
        </figure>

        <t>While in the FlexE demux, part of the configuration for FlexE group
        is shown as follows,</t>

        <figure align="left" anchor="Configuring-FlexE-group-in-demux"
                title="">
          <preamble/>

          <artwork align="left"><![CDATA[
                
    <flexe-group>
        <index>3001</index>
        <group-num>2222</group-num>
        <negotiation-mode>static</negotiation-mode>
        <flexe-phys>
            <flexe-phy>
                <port-name>ifb001</port-name>
                <phy-number>1</phy-number>
            </flexe-phy>                              
            <flexe-phy>
                <port-name>ifb002</port-name>
                <phy-number>2</phy-number>
            </flexe-phy>                              
            <flexe-phy>
                <port-name>ifb003</port-name>
                <phy-number>3</phy-number>
            </flexe-phy>                              
            <flexe-phy>
                <port-name>ifb004</port-name>
                <phy-number>4</phy-number>
            </flexe-phy> 
        </flexe-phys>
    </flexe-group>
                
            ]]></artwork>

          <postamble/>
        </figure>

        <t>Based on the configuration above, the running states in the FlexE
        device can be gotten by using NETCONF Get command. To FlexE group, the
        running states include total-bandwidth and free-bandwidth of the FlexE
        group, and free-timeslot-list and used-timeslot-list of each PHY in
        the FlexE group.</t>
      </section>

      <section title="Configuration Example of the FlexE client">
        <t>he FlexE client YANG tree is shown in section 4. More explanations
        for the flexe-client data node include,</t>

        <t><list style="letters">
            <t>The leaf client-index provides an index to the FlexE client.
            The value of the client-index may be configured by the network
            device or network management system or controller, and the values
            in FlexE mux and demux may be different.</t>

            <t>The leafref group-index references the FlexE group with the
            specific group index. It means that the FlexE group should be
            created before configuring the FlexE client, and the FlexE client
            will be transported by the specific FlexE group.</t>

            <t>The leaf client-num is used to indicate the FlexE client. The
            value of the client-num should be configured by the network
            management system or controller, and the values in FlexE mux and
            demux should be the same.</t>

            <t>The container timeslot-lists shows all the calendar slots
            assigned to the FlexE client. In the list timeslot-list, the total
            assignment of slots in each PHY, which is indicated by the leaf
            port-name, are indicated by the slots in the leaf time-slot.</t>
          </list></t>

        <t>For example, two FlexE clients are configured to be transported by
        the FlexE group in section 4.1.</t>

        <t>The bandwidth of the first FlexE client is 10Gb/s, and the assigned
        calendar slots include two 5G slots.</t>

        <t>The bandwidth of the second FlexE client is 200Gb/s, and the
        assigned calendar slots include 40 5G slots, exactly located in two
        100G PHYs. This configuration shows the capability of FlexE
        bonding.</t>

        <t>Part of the configuration for the first and second FlexE client in
        FlexE mux is shown as follows,</t>

        <figure align="left" anchor="Configuring-FlexE-client-in-mux" title="">
          <preamble/>

          <artwork align="left"><![CDATA[
                
    <flexe-client> 
        <client-index>6001</client-index>
        <group-index>20221</group-index>
        <client-num>1001</client-num>
        <timeslot-lists>
            <timeslot-list>
                <port-num>ifa001</port-num>
                <time-slot>1-2</time-slot> 
            </timeslot-list>          
        </timeslot-lists>
    </flexe-client>

    <flexe-client> 
        <client-index>6002</client-index>
        <group-index>20221</group-index>
        <client-num>1002</client-num>
        <timeslot-lists>
            <timeslot-list>
                <port-num>ifa002</port-num>
                <time-slot>1-20</time-slot> 
            </timeslot-list>                  
            <timeslot-list>
                <port-num>ifa003</port-num>
                <time-slot>1-20</time-slot> 
            </timeslot-list>        
        </timeslot-lists>
    </flexe-client>                       
                
                
            ]]></artwork>

          <postamble/>
        </figure>

        <t>Part of the configuration for the first and second FlexE client in
        FlexE demux is shown as follows,</t>

        <figure align="left" anchor="Configuring-FlexE-client-in-demux"
                title="">
          <preamble/>

          <artwork align="left"><![CDATA[
                
    <flexe-client> 
        <client-index>7001</client-index>
        <group-index>3001</group-index>
        <client-num>1001</client-num>
        <timeslot-lists>
            <timeslot-list>
                <port-num>ifb001</port-num>
                <time-slot>1-2</time-slot> 
            </timeslot-list>          
        </timeslot-lists>
    </flexe-client>
                
    <flexe-client> 
        <client-index>7002</client-index>
        <group-index>3001</group-index>
        <client-num>1002</client-num>
         <timeslot-lists>
            <timeslot-list>
                <port-num>ifb002</port-num>
                <time-slot>1-20</time-slot> 
            </timeslot-list>                   
            <timeslot-list>
                <port-num>ifb003</port-num>
                <time-slot>1-20</time-slot> 
            </timeslot-list>        
        </timeslot-lists>
    </flexe-client>                      
                
                
            ]]></artwork>

          <postamble/>
        </figure>
      </section>
    </section>
  </back>
</rfc>