Skip to main content

A Layer 2 VPN Network YANG Model
draft-ietf-opsawg-l2nm-01

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft that was ultimately published as RFC 9291.
Authors Samier Barguil , Oscar Gonzalez de Dios , Mohamed Boucadair , Luis Angel Munoz , Luay Jalil , Jichun Ma
Last updated 2020-11-02
Replaces draft-barguil-opsawg-l2sm-l2nm
RFC stream Internet Engineering Task Force (IETF)
Formats
Reviews
Additional resources Mailing list discussion
Stream WG state WG Document
Document shepherd (None)
IESG IESG state Became RFC 9291 (Proposed Standard)
Consensus boilerplate Yes
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-ietf-opsawg-l2nm-01
Internet Engineering Task Force                          S. Barguil, Ed.
Internet-Draft                                  O. Gonzalez de Dios, Ed.
Intended status: Standards Track                              Telefonica
Expires: May 6, 2021                                        M. Boucadair
                                                                  Orange
                                                                L. Munoz
                                                                Vodafone
                                                                L. Jalil
                                                                 Verizon
                                                                   J. Ma
                                                            China Unicom
                                                       November 02, 2020

                    A Layer 2 VPN Network YANG Model
                       draft-ietf-opsawg-l2nm-01

Abstract

   This document defines a YANG Data model (called, L2NM) that can be
   used to manage the provisioning of Layer 2 VPN services within a
   Service Provider Network.  This YANG module provides representation
   of the Layer 2 VPN Service from a network standpoint.  The module is
   meant to be used by a Network Controller to derive the configuration
   information that will be sent to relevant network devices.

   The L2NM YANG Data model complements the Layer 2 Service Model
   (RFC8466) by providing a network-centric view of the service that is
   internal to a Service Provider.

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 May 6, 2021.

Barguil, et al.            Expires May 6, 2021                  [Page 1]
Internet-Draft                    L2NM                     November 2020

Copyright Notice

   Copyright (c) 2020 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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
     1.2.  Requirements Language . . . . . . . . . . . . . . . . . .   4
   2.  Reference architecture  . . . . . . . . . . . . . . . . . . .   4
   3.  Description of the L2NM YANG Module . . . . . . . . . . . . .   8
     3.1.  Structure of the Module . . . . . . . . . . . . . . . . .   8
     3.2.  VPN Profiles  . . . . . . . . . . . . . . . . . . . . . .   8
     3.3.  L2 VPN Service  . . . . . . . . . . . . . . . . . . . . .   9
       3.3.1.  L2 VPN Service Types  . . . . . . . . . . . . . . . .  11
       3.3.2.  Underlying Transport Selection  . . . . . . . . . . .  11
       3.3.3.  VPN Node  . . . . . . . . . . . . . . . . . . . . . .  11
         3.3.3.1.  Signaling options . . . . . . . . . . . . . . . .  13
         3.3.3.2.  VPN Network Access  . . . . . . . . . . . . . . .  15
           3.3.3.2.1.  Connection  . . . . . . . . . . . . . . . . .  18
           3.3.3.2.2.  Layer 2 service requirements  . . . . . . . .  19
   4.  Relation with other YANG Models . . . . . . . . . . . . . . .  23
     4.1.  Relation with L2SM  . . . . . . . . . . . . . . . . . . .  23
     4.2.  Relation with Network Topology  . . . . . . . . . . . . .  23
     4.3.  Relation with Device Models . . . . . . . . . . . . . . .  23
   5.  YANG Module . . . . . . . . . . . . . . . . . . . . . . . . .  24
   6.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  60
   7.  Contributors  . . . . . . . . . . . . . . . . . . . . . . . .  60
   8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  61
   9.  Security Considerations . . . . . . . . . . . . . . . . . . .  61
   10. References  . . . . . . . . . . . . . . . . . . . . . . . . .  62
     10.1.  Normative References . . . . . . . . . . . . . . . . . .  62
     10.2.  Informative References . . . . . . . . . . . . . . . . .  63
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  64

Barguil, et al.            Expires May 6, 2021                  [Page 2]
Internet-Draft                    L2NM                     November 2020

1.  Introduction

   [RFC8466] defines a L2VPN Service Model (L2SM) YANG data model that
   can be used for L2VPN service ordering matters between customers and
   Service Providers (SPs).  This document complements the L2SM model by
   creating a network-centric view of the service which can be exposed
   by a Network to a Service Controller within the Service Provider
   Network.  In particular, the model can be used in the communication
   between the entity that interacts directly with the customer, the
   service orchestrator, (either fully automated or a human operator)
   and the entity in charge of network orchestration and control
   (a.k.a., network controller/orchestrator).

   The data model defined in this document is called the L2VPN Network
   Model (L2NM), playing the role of Service Delivery Model (Figure 3 of
   [RFC8466].  The module supports additional capabilities, such as
   exposing operational parameters, transport protocols selection and
   precedence.  It also serves as a multi-domain orchestration
   interface, because this model can transport resources (i.e., VCID)
   between domains.  The data model keeps minimum customer-related
   information.

   This document uses the common VPN YANG module defined in
   [I-D.ietf-opsawg-vpn-common].

   The YANG data model in this document conforms to the Network
   Management Datastore Architecture (NMDA) defined in [RFC8342].

1.1.  Terminology

   This document assumes that the reader is familiar with the contents
   of [RFC6241], [RFC7950], [RFC8466], [RFC8309], and [RFC8453] and uses
   terminology from those documents.  The meaning of the symbols in YANG
   tree diagrams is [RFC8340].

   This document makes use of the following terms:

   o  L2 VPN Customer Service Model (L2SM): Describes the service
      characterization (requirements) of a L2 VPN that interconnects a
      set of sites from the perspective of the customer.  The customer
      service model does not provide details on the Service Provider
      Network.  The L2 VPN Customer Service model is defined in
      [RFC8466].

   o  L2 VPN Service Network Model (L2NM): Refers to the YANG module
      that describes a L2 VPN Service with a network-centric view.  It
      contains information of the Service Provider network and might
      include allocated resources.  It can be used by network

Barguil, et al.            Expires May 6, 2021                  [Page 3]
Internet-Draft                    L2NM                     November 2020

      controllers to manage the Layer 2 VPN Service configuration in the
      Service Provider network.  The YANG module can be consumed by a
      Service Orchestrator to request a VPN Service to a Network
      controller or to expose the list of active L2VPN services.

   o  Service Orchestrator: Refers to a functional entity that interacts
      with the customer of a L2 VPN relying upon, e.g.  L2SM.  The
      Service Orchestrator is responsible of the CE-PE attachment
      circuits, the PE selection, and requesting the activation of the
      L2 VPN service to a network controller.

   o  Network Controller: Denotes a functional entity responsible for
      the management of the service provider network.

   o  VPN node (vpn-node): Is an abstraction that represents a set of
      policies applied on a PE and that belong to a single VPN service
      (vpn-service).  A VPN service involves one or more VPN nodes.  The
      VPN node will identify the Service Provider node on which the VPN
      is deployed.

   o  VPN network access (vpn-network-access): Is an abstraction that
      represents the network interfaces that are associated to a given
      VPN node.  Traffic coming from the VPN network access belongs to
      the VPN.  The attachment circuits (bearers) between CEs and PEs
      are terminated in the VPN network access.

   o  VPN Service Provider (SP): Is a Service Provider that offers VPN-
      related services.

   o  Service Provider Network (SP Network): Is a network able to
      provide VPN-related services.

1.2.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

2.  Reference architecture

   Figure 1 illustrates how L2NM is used.  As a reminder, this figure is
   an expansion of the architecture presented in Section 3 of [RFC8466]
   and decomposes the box marked "orchestration" in that figure into
   three separate functional components called "Service Orchestration",
   "Network Orchestration", and "Domain Orchestration".

Barguil, et al.            Expires May 6, 2021                  [Page 4]
Internet-Draft                    L2NM                     November 2020

   The reader may refer to [RFC8309] for the distinction between the
   "Customer Service Model", the "Service Delivery Model", the "Network
   Configuration Model", and the "Device Configuration Model".  The
   "Domain Orchestration" and "Config Manager" roles may be performed by
   "SDN Controllers".

Barguil, et al.            Expires May 6, 2021                  [Page 5]
Internet-Draft                    L2NM                     November 2020

                             +---------------+
                             |   Customer    |
                             +---------------+
             Customer Service Model  |
                    l2vpn-svc        |
                             +---------------+
                             |    Service    |
                             | Orchestration |
                             +---------------+
       Service Delivery Model       |
             L2NM                   |
            (l2vpn-ntw)     |
                             +---------------+
                             |   Network     |
                             | Orchestration |
                             +---------------+
       Network Configuration Model  |
                          __________|____________
                         |                       |
                +---------------+       +---------------+
                |    Domain     |       |     Domain    |
                | Orchestration |       | Orchestration |
                +---------------+       +---------------+
     Device         |        |                   |
     Configuration  |        |                   |
     Model          |        |                   |
               +---------+   |                   |
               | Config  |   |                   |
               | Manager |   |                   |
               +---------+   |                   |
                    |        |                   |
                    | NETCONF/CLI..................
                    |        |                   |
             +------------------------------------------------+
                                 Network

                            +++++++
                            + AAA +
                            +++++++

    ++++++++   Bearer    ++++++++           ++++++++      ++++++++
    + CE A + ----------- + PE A +           + PE B + ---- + CE B +
    ++++++++  Connection ++++++++           ++++++++      ++++++++

               Site A                               Site B

                    Figure 1: L2SM and L2NM Interaction

Barguil, et al.            Expires May 6, 2021                  [Page 6]
Internet-Draft                    L2NM                     November 2020

   Figure 2 shows how L2SM and L2NM may be used in the context of the
   ACTN architecture [RFC8453].  Figure 2 shows the Customer Network
   Controller (CNC), the Multi-Domain Service Coordinator (MDSC), and
   the Provisioning Network Controller (PNC).  It shows the interfaces
   between these functional units: the CNC-MDSC Interface (CMI), the
   MDSC-PNC Interface (MPI), and the Southbound Interface (SBI).

                  ----------------------------------
                  | Customer                         |
                  |  -----------------------------   |
                  | |             CNC             |  |
                  |  -----------------------------   |
                   ----:-----------------------:-----
                       :                       :
                       : L2SM                  : L2SM
                       :                       :
              ---------:---------     -------------------
             | MDSC    :         |   |       MDSC        |
             |  ---------------  |   |     (parent)      |
             | |    Service    | |    -------------------
             | | Orchestration | |             :
             |  ---------------  |             : L2NM
             |         :         |             :
             |         : L2NM    |    -------------------
             |         :         |   |       MDSC        |
             |  ---------------  |   |      (child)      |
             | |    Network    | |    -------------------
             | | Orchestration | |             :
             |  ---------------  |             :
              ---------:---------              :
                       :                       :
                       : Network Configuration :
                       :                       :
           ------------:-------       ---------:------------
          | Domain     :       |     |         : Domain     |
          | Controller :       |     |         : Controller |
          |        ---------   |     |     ---------        |
          |       |   PNC   |  |     |    |   PNC   |       |
          |        ---------   |     |     ---------        |
           ------------:-------       ---------:------------
                       :                       :
                       : Device Configuration  :
                       :                       :
                   --------                --------
                  | Device |              | Device |
                   --------                --------

              Figure 2: L2SM and L2NM in the Context of ACTN

Barguil, et al.            Expires May 6, 2021                  [Page 7]
Internet-Draft                    L2NM                     November 2020

3.  Description of the L2NM YANG Module

   The L2NM module ('ietf-l2vpn-ntw') is meant to manage L2 VPNs within
   a service provider network.  In particular, the 'ietf-l2vpn-ntw'
   module can be used to create, modify, and retrieve L2VPN Services in
   a Network Controller.  The module is not aimed at maintaining
   customer-related information.

   Editor's note: Next version of the document will include the full
   description of the parameters.  When the parameters match with L2SM,
   the exact reference will be done

3.1.  Structure of the Module

   The 'ietf-l2vpn-ntw' module uses two main containers: 'vpn-services'
   and 'vpn-profiles'.  The 'vpn-services' container maintains a set of
   L2 VPN Services managed in the service provider network.  The module
   allows to create a new l2 VPN service by adding a new instance of
   'vpn-service'.  The 'vpn-service' is the data structure that
   abstracts the VPN Service.

       module: ietf-l2vpn-ntw
       +--rw l2vpn-ntw
        +--rw vpn-profiles
        |     .......
        +--rw vpn-services
            +--rw vpn-service* [vpn-id]
              ........

                 Figure 3: Simplified L2NM Tree Structure

3.2.  VPN Profiles

   The 'vpn-profiles' container (Figure 4) allows the network provider
   to define and maintain a set of common VPN profiles
   [I-D.ietf-opsawg-vpn-common] that apply to one or several VPN
   services.  The exact definition of the profiles is local to each
   network provider.

   This document does not make any assumption about the exact definition
   of these profiles.  How such profiles are defined is deployment
   specific.  The model only includes an identifier to these profiles to
   ease identifying local policies when building a VPN service.  As
   shown in Figure 4, the following identifiers can be included:

   o  'cloud-identifier': This identifier refers to a cloud service.

Barguil, et al.            Expires May 6, 2021                  [Page 8]
Internet-Draft                    L2NM                     November 2020

   o  'encryption-profile-identifier': An encryption profile refers to a
      set of policies related to the encryption scheme(s) and setup that
      can be applied when building and offering a VPN service.

   o  'qos-profile-identifier': A QoS profile refers to as set of
      policies such as classification, marking, and actions (e.g.,
      [RFC3644]).

   o  'bfd-profile-identifier': A Bidirectional Forwarding Detection
      (BFD) profile refers to a set of BFD [RFC5880] policies that can
      be invoked when building a VPN service.

   o  'forwarding-profile-identifier': A forwarding profile refers to
      the policies that apply to the forwarding of packets conveyed
      within a VPN.  Such policies may consist at applying Access
      Control Lists (ACLs).

   o  'routing-profile-identifier': A routing profile refers to a set of
      routing policies that will be invoked (e.g., BGP policies).

            +--rw l2vpn-ntw
               +--rw vpn-profiles
               |  +--rw valid-provider-identifiers
               |     +--rw cloud-identifier* [id] {cloud-access}?
               |     |  +--rw id    string
               |     +--rw encryption-profile-identifier* [id]
               |     |  +--rw id    string
               |     +--rw qos-profile-identifier* [id]
               |     |  +--rw id    string
               |     +--rw bfd-profile-identifier* [id]
               |     |  +--rw id    string
               |     +--rw forwarding-profile-identifier* [id]
               |     |  +--rw id    string
               |     +--rw routing-profile-identifier* [id]
               |        +--rw id    string
               +--rw vpn-services
                  ...

                 Figure 4: VPN Profiles Subtree Structure

3.3.  L2 VPN Service

   The 'vpn-service' is the data structure that abstracts a L2 VPN
   Service within the SP Network.  Every 'vpn-service' has a unique
   identifier: vpn-id.  Such vpn-id is only meaningful locally within
   the Network controller.  In order to facilitate the recognition of
   the service, a 'customer-name' and a 'description' may be included.

Barguil, et al.            Expires May 6, 2021                  [Page 9]
Internet-Draft                    L2NM                     November 2020

   The topology of the VPN service is expressed in the 'vpn-service-
   topology' leaf.

   A VPN Service is built by adding instances of 'vpn-node' to the 'vpn-
   nodes' container.  The 'vpn-node' is an abstraction that represents a
   set of policies/configurations applied to a network node and that
   belong to a single 'vpn-service'.  A 'vpn-node' contains 'vpn-
   network-accesses', which are the interfaces involved in the creation
   of the VPN.  The customer sites are connected to the
   'vpn_network_accesses'.  Note that, as this is a network data model,
   the information about customers site is not needed.  Such
   information, is only relevant in the L2SM model.

        +--rw vpn-services
           +--rw vpn-service* [vpn-id]
              +--rw status
              |  +--rw admin-status
              |  |  +--rw status?         identityref
              |  |  +--rw last-updated?   yang:date-and-time
              |  +--ro oper-status
              |     +--ro status?         identityref
              |     +--ro last-updated?   yang:date-and-time
              +--rw vpn-id                      vpn-id
              +--rw vpn-name?                   string
              +--rw vpn-description?            string
              +--rw customer-name?              string
              +--rw l2sm-vpn-id?                vpn-common:vpn-id
              +--rw vpn-svc-type?               identityref
              +--rw svc-topo?                   identityref
              +--rw multicast-like {vpn-common:multicast}?
              |  +--rw enabled?                 boolean
              |  +--rw customer-tree-flavors
              |     +--rw tree-flavor*   identityref
              +--rw extranet-vpns {vpn-common:extranet-vpn}?
              |  +--rw extranet-vpn* [vpn-id]
              |     +--rw vpn-id              vpn-common:vpn-id
              |     +--rw local-sites-role?   identityref
              +--rw svc-mtu?                    uint32
              +--rw ce-vlan-preservation?       boolean
              +--rw ce-vlan-cos-perservation?   boolean
              +--rw underlay-transport
              |  +--rw type*   identityref
              +--rw vpn-nodes
                      .....

                                 Figure 5

Barguil, et al.            Expires May 6, 2021                 [Page 10]
Internet-Draft                    L2NM                     November 2020

3.3.1.  L2 VPN Service Types

   The L2 VPN Service types directly matches with the L2VPN Service
   types defined in Section 5.1.3 of [RFC8466]:

   o  Point-to-point VPWSs.

   o  Point-to-point or point-to-multipoint VPWSs [RFC8214].

   o  Multipoint VPLSs.

   o  Multipoint VPLSs connecting one or more root sites and a set of
      leaf sites but preventing inter-leaf-site communication.

   o  EVPN services [RFC7432].

   o  EVPN VPWSs between two customer sites or a set of customer sites
      as specified in [RFC8214].

3.3.2.  Underlying Transport Selection

   The model enables network operators to select the type of transport
   protocol underlay.  Also, in scenarios with multiple domains and NNI
   types, the selection of the transport protocol underlay is required.
   The Service Provider Network might have several underlay
   possibilities available.  If no underlay transport protocol is
   specified, the Network Controller will take care of the transport
   decision.  The following options are supported in the "underlay-
   transport" container:

      LDP: MPLS with LDP (martini encapsulation).

      GRE: A mesh of GRE tunnels is established between vpn-nodes.

      BGP: BGP tunnels (kompella encapsulation) are preferred to route
      traffic between VPN nodes.

      TE: TE tunnels (either RSVP-TE or SR) are prefered.  The mapping
      details will be specified in draft-ietf-te-service-mapping.

      SR: Non-TE SR is preferred to route traffic.

3.3.3.  VPN Node

   The 'vpn-node' is an abstraction that represents a set of policies/
   configurations applied to a network node and that belong to a single
   'vpn-service'.  A 'vpn-node' contains 'vpn-network-accesses', which

Barguil, et al.            Expires May 6, 2021                 [Page 11]
Internet-Draft                    L2NM                     November 2020

   are the interfaces involved in the creation of the VPN.  The customer
   sites are connected to the 'vpn_network_accesses'.

                      +--rw vpn-nodes
                 +--rw vpn-node* [vpn-node-id ne-id]
                    +--rw vpn-node-id             vpn-common:vpn-id
                    +--rw description?            string
                    +--rw node-role?              identityref
                    +--rw ne-id                   string
                    +--rw port-id?                string
                    +--rw status
                    |  +--rw admin-status
                    |  |  +--rw status?         identityref
                    |  |  +--rw last-updated?   yang:date-and-time
                    |  +--ro oper-status
                    |     +--ro status?         identityref
                    |     +--ro last-updated?   yang:date-and-time
                    +--rw signaling-options* [type]
                    |  +--rw type         identityref
                    |  +--rw l2vpn-bgp
                    |  |  +--rw pwe-encapsulation-type?   identityref
                    |  |  +--rw vpn-target* [id]
                    |  |  |  +--rw id                   int8
                    |  |  |  +--rw route-targets* [route-target]
                    |  |  |  |  +--rw route-target
                    |  |  |  |          rt-types:route-target
                    |  |  |  +--rw route-target-type
                    |  |  |          rt-types:route-target-type
                    |  |  +--rw vpn-policies
                    |  |  |  +--rw import-policy?   string
                    |  |  |  +--rw export-policy?   string
                    |  |  +--rw pwe-mtu
                    |  |  |  +--rw allow-mtu-mismatch?   boolean
                    |  |  +--rw address-family?
                    |  |          vpn-common:address-family
                    |  +--rw evpn-bgp
                    |  |  +--rw vpn-id?              leafref
                    |  |  +--rw type?                identityref
                    |  |  +--rw address-family?
                    |  |  |       vpn-common:address-family
                    |  |  +--rw mac-learning-mode?   identityref
                    |  |  +--rw arp-suppress?        boolean
                    |  +--rw t-ldp-pwe
                    |  |  +--rw type?                     identityref
                    |  |  +--rw pwe-encapsulation-type?   identityref
                    |  |  +--rw pwe-mtu?                  uint16
                    |  |  +--rw ac-pw-list* [peer-addr vc-id]
                    |  |  |  +--rw peer-addr      inet:ip-address

Barguil, et al.            Expires May 6, 2021                 [Page 12]
Internet-Draft                    L2NM                     November 2020

                    |  |  |  +--rw vc-id          vpn-common:vpn-id
                    |  |  |  +--rw pw-type?       identityref
                    |  |  |  +--rw pw-priority?   uint32
                    |  |  +--rw qinq
                    |  |     +--rw s-tag?   uint32
                    |  |     +--rw c-tag?   uint32
                    |  +--rw l2tp-pwe
                    |     +--rw type?                 identityref
                    |     +--rw encapsulation-type?   identityref
                    |     +--rw ac-pw-list* [peer-addr vc-id]
                    |        +--rw peer-addr      inet:ip-address
                    |        +--rw vc-id          string
                    |        +--rw pw-priority?   uint32
                    +--rw vpn-network-accesses

                                 Figure 6

3.3.3.1.  Signaling options

   This sub-tree defines the L2VPN service type, according to the
   several signalling options to exchange membership information between
   the PE that is used.  There are some common parameters inside each of
   them (e.g encapsulation type, MTU) but some others are:

      l2vpn-bgp.  The service is a Multipoint VPLSs that use a BGP
      control plane as described in [RFC4761] and [RFC6624].  The VPLS
      members exchange Route Targets with related import/export
      policies.

      evpn-bgp.  The service is a Multipoint VPLSs that use also a BGP
      control plane but also includes the additional features and
      related parameters described in [RFC7432] and [RFC7209].

      t-ldp-pwe.  A Multipoint VPLSs that use a mesh of LDP-signaled
      Pseudowires [RFC6074], including as parameters the list of
      Pseudowires that constitute the mesh, with their details (VC-IDs
      and endpoints).

      L2tp-pwe.  Multipoint VPLSs that use L2TP-signaled Pseudowires
      [RFC6074].

Barguil, et al.            Expires May 6, 2021                 [Page 13]
Internet-Draft                    L2NM                     November 2020

                    +--rw signaling-options* [type]
                      +--rw type         identityref
                      +--rw l2vpn-bgp
                      |  +--rw pwe-encapsulation-type?   identityref
                      |  +--rw vpn-target* [id]
                      |  |  +--rw id                   int8
                      |  |  +--rw route-targets* [route-target]
                      |  |  |  +--rw route-target
                      |  |  |          rt-types:route-target
                      |  |  +--rw route-target-type
                      |  |          rt-types:route-target-type
                      |  +--rw vpn-policies
                      |  |  +--rw import-policy?   string
                      |  |  +--rw export-policy?   string
                      |  +--rw pwe-mtu
                      |  |  +--rw allow-mtu-mismatch?   boolean
                      |  +--rw address-family?
                      |          vpn-common:address-family
                      +--rw evpn-bgp
                      |  +--rw vpn-id?              leafref
                      |  +--rw type?                identityref
                      |  +--rw address-family?
                      |  |       vpn-common:address-family
                      |  +--rw mac-learning-mode?   identityref
                      |  +--rw arp-suppress?        boolean
                      +--rw t-ldp-pwe
                      |  +--rw type?                     identityref
                      |  +--rw pwe-encapsulation-type?   identityref
                      |  +--rw pwe-mtu?                  uint16
                      |  +--rw ac-pw-list* [peer-addr vc-id]
                      |  |  +--rw peer-addr      inet:ip-address
                      |  |  +--rw vc-id          vpn-common:vpn-id
                      |  |  +--rw pw-type?       identityref
                      |  |  +--rw pw-priority?   uint32
                      |  +--rw qinq
                      |     +--rw s-tag?   uint32
                      |     +--rw c-tag?   uint32
                      +--rw l2tp-pwe
                         +--rw type?                 identityref
                         +--rw encapsulation-type?   identityref
                         +--rw ac-pw-list* [peer-addr vc-id]
                            +--rw peer-addr      inet:ip-address
                            +--rw vc-id          string
                            +--rw pw-priority?   uint32

                                 Figure 7

Barguil, et al.            Expires May 6, 2021                 [Page 14]
Internet-Draft                    L2NM                     November 2020

3.3.3.2.  VPN Network Access

   A 'vpn-network-access' represents an entry point to a VPN service .
   In other words, this container encloses the parameters that describe
   the access information for the traffic that belongs to a particular
   L2VPN.  As such, every 'vpn-network-access' MUST belong to one and
   only one 'vpn-node'.

   A 'vpn-network-access' includes information such as the connection on
   which the access is defined , the specific layer 2 service
   requirements, etc.

   The Site Network Access is comprised of:

      id: Identifier of the vpn network access.

      description: Text describing the vpn network access.

      interface-mtu: maximum transmission unit or maximum frame size of
      the interface belonging to the vpn network access.  When a frame
      is larger than the MTU, it is broken down, or fragmented, into
      smaller pieces by the network protocol to accommodate the MTU of
      the network"

      status: Administrative and operational status of the service.

      ethernet-service-oam: Carries information about the service OAM

                            +--rw vpn-network-accesses
                       +--rw vpn-network-access* [id]
                          +--rw id
                          |       vpn-common:vpn-id
                          +--rw description?
                          |       string
                          +--rw Interface-mtu?
                          |       uint32
                          +--rw status
                          |  +--rw admin-status
                          |  |  +--rw status?         identityref
                          |  |  +--rw last-updated?   yang:date-and-time
                          |  +--ro oper-status
                          |     +--ro status?         identityref
                          |     +--ro last-updated?   yang:date-and-time
                          +--rw access-diversity
                          |       {vpn-common:placement-diversity}?
                          |  +--rw groups
                          |  |  +--rw fate-sharing-group-size?   uint16
                          |  |  +--rw group-color?               string

Barguil, et al.            Expires May 6, 2021                 [Page 15]
Internet-Draft                    L2NM                     November 2020

                          |  |  +--rw group* [group-id]
                          |  |     +--rw group-id    string
                          |  +--rw constraints
                          |     +--rw constraint* [constraint-type]
                          |        +--rw constraint-type    identityref
                          |        +--rw target
                          |           +--rw (target-flavor)?
                          |              +--:(id)
                          |              |  +--rw group* [group-id]
                          |              |     +--rw group-id    string
                          |              +--:(all-accesses)
                          |              |  +--rw all-other-accesses?
                          |              |          empty
                          |              +--:(all-groups)
                          |                 +--rw all-other-groups?
                          |                         empty
                          +--rw connection
                          |       ....
                          +--rw availability
                          |  +--rw access-priority?       uint32
                          |  +--rw (redundancy-mode)?
                          |     +--:(single-active)
                          |     |  +--rw single-active?   boolean
                          |     +--:(all-active)
                          |        +--rw all-active?      boolean
                          +--rw service
                          |       .....
                          +--rw broadcast-unknown-unicast-multicast
                          |  +--rw multicast-site-type?
                          |  |       enumeration
                          |  +--rw multicast-gp-address-mapping* [id]
                          |  |  +--rw id                 uint16
                          |  |  +--rw vlan-id?           uint32
                          |  |  +--rw mac-gp-address?
                          |  |  |       yang:mac-address
                          |  |  +--rw port-lag-number?   uint32
                          |  +--rw bum-overall-rate?
                          |          uint32
                          +--rw ethernet-service-oam
                          |  +--rw md-name?        string
                          |  +--rw md-level?       uint8
                          |  +--rw cfm-802.1-ag
                          |  |  +--rw n2-uni-c* [maid]
                          |  |  |  +--rw maid                string
                          |  |  |  +--rw mep-id?             uint32
                          |  |  |  +--rw mep-level?          uint32
                          |  |  |  +--rw mep-up-down?        enumeration
                          |  |  |  +--rw remote-mep-id?      uint32

Barguil, et al.            Expires May 6, 2021                 [Page 16]
Internet-Draft                    L2NM                     November 2020

                          |  |  |  +--rw cos-for-cfm-pdus?   uint32
                          |  |  |  +--rw ccm-interval?       uint32
                          |  |  |  +--rw ccm-holdtime?       uint32
                          |  |  |  +--rw ccm-p-bits-pri?
                          |  |  |          vpn-common:ccm-priority-type
                          |  |  +--rw n2-uni-n* [maid]
                          |  |     +--rw maid                string
                          |  |     +--rw mep-id?             uint32
                          |  |     +--rw mep-level?          uint32
                          |  |     +--rw mep-up-down?        enumeration
                          |  |     +--rw remote-mep-id?      uint32
                          |  |     +--rw cos-for-cfm-pdus?   uint32
                          |  |     +--rw ccm-interval?       uint32
                          |  |     +--rw ccm-holdtime?       uint32
                          |  |     +--rw ccm-p-bits-pri?
                          |  |             vpn-common:ccm-priority-type
                          |  +--rw y-1731* [maid]
                          |     +--rw maid
                          |     |       string
                          |     +--rw mep-id?
                          |     |       uint32
                          |     +--rw type?
                          |     |       identityref
                          |     +--rw remote-mep-id?
                          |     |       uint32
                          |     +--rw message-period?
                          |     |       uint32
                          |     +--rw measurement-interval?
                          |     |       uint32
                          |     +--rw cos?
                          |     |       uint32
                          |     +--rw loss-measurement?
                          |     |       boolean
                          |     +--rw synthethic-loss-measurement?
                          |     |       boolean
                          |     +--rw delay-measurement
                          |     |  +--rw enable-dm?   boolean
                          |     |  +--rw two-way?     boolean
                          |     +--rw frame-size?
                          |     |       uint32
                          |     +--rw session-type?
                          |             enumeration
                          +--rw mac-loop-prevention
                          |  +--rw frequency?         uint32
                          |  +--rw protection-type?   identityref
                          |  +--rw number-retries?    uint32
                          +--rw access-control-list
                          |  +--rw mac* [mac-address]

Barguil, et al.            Expires May 6, 2021                 [Page 17]
Internet-Draft                    L2NM                     November 2020

                          |     +--rw mac-address    yang:mac-address
                          +--rw mac-addr-limit
                             +--rw mac-num-limit?   uint16
                             +--rw time-interval?   uint32
                             +--rw action?          identityref

                                 Figure 8

3.3.3.2.1.  Connection

   The connection container is used to configure the relevant properties
   of the interface that is attached to the VPN, for example the
   encapsulation type, the physical interface or creating a lag.

                   +--rw connection
                      +--rw encapsulation-type?    identityref
                      +--rw eth-inf-type*          identityref
                      +--rw dot1q-interface
                      |  +--rw l2-access-type?   identityref
                      |  +--rw dot1q {vpn-common:dot1q}?
                      |  |  +--rw physical-inf?   string
                      |  |  +--rw c-vlan-id?      uint32
                      |  +--rw qinq {vpn-common:qinq}?
                      |  |  +--rw s-vlan-id?   uint32
                      |  |  +--rw c-vlan-id?   uint32
                      |  +--rw qinany {vpn-common:qinany}?
                      |  |  +--rw s-vlan-id?   uint32
                      |  +--rw vxlan {vxlan}?
                      |     +--rw vni-id?      uint32
                      |     +--rw peer-mode?   identityref
                      |     +--rw peer-list* [peer-ip]
                      |        +--rw peer-ip    inet:ip-address
                      +--rw phy-interface
                      |  +--rw port-number?           uint32
                      |  +--rw port-speed?            uint32
                      |  +--rw mode?
                      |  |       vpn-common:neg-mode
                      |  +--rw phy-mtu?               uint32
                      |  +--rw flow-control?          string
                      |  +--rw oam-802.3ah-link {oam-3ah}?
                      |  |  +--rw enable?   boolean
                      |  +--rw uni-loop-prevention?   boolean
                      +--rw lag-interface
                      |       {vpn-common:lag-interface}?
                      |  +--rw lag-interface*
                      |          [lag-interface-number]
                      |     +--rw lag-interface-number    uint32
                      |     +--rw lacp

Barguil, et al.            Expires May 6, 2021                 [Page 18]
Internet-Draft                    L2NM                     November 2020

                      |        +--rw lacp-state?         boolean
                      |        +--rw lacp-mode?          boolean
                      |        +--rw lacp-speed?         boolean
                      |        +--rw mini-link?          uint32
                      |        +--rw system-priority?    uint16
                      |        +--rw member-link-list
                      |        |  +--rw member-link* [name]
                      |        |     +--rw name
                      |        |     |       string
                      |        |     +--rw port-speed?
                      |        |     |       uint32
                      |        |     +--rw mode?
                      |        |     |       vpn-common:neg-mode
                      |        |     +--rw link-mtu?
                      |        |     |       uint32
                      |        |     +--rw oam-802.3ah-link
                      |        |             {oam-3ah}?
                      |        |        +--rw enable?   boolean
                      |        +--rw flow-control?       string
                      |        +--rw lldp?               boolean
                      +--rw cvlan-id-to-svc-map* [svc-id]
                      |  +--rw svc-id      leafref
                      |  +--rw cvlan-id* [vid]
                      |     +--rw vid    uint32
                      +--rw split-horizon
                         +--rw group-name?   string

                                 Figure 9

3.3.3.2.2.  Layer 2 service requirements

   This container is usedd to indicate the details of the ethernet
   service such as bandwidth or qos.

+--rw service
  |  +--rw svc-input-bandwidth
  |  |       {vpn-common:input-bw}?
  |  |  +--rw input-bandwidth* [type]
  |  |     +--rw type      identityref
  |  |     +--rw cos-id?   uint8
  |  |     +--rw cir?      uint64
  |  |     +--rw cbs?      uint64
  |  |     +--rw eir?      uint64
  |  |     +--rw ebs?      uint64
  |  |     +--rw pir?      uint64
  |  |     +--rw pbs?      uint64
  |  +--rw svc-output-bandwidth {output-bw}?
  |  |  +--rw output-bandwidth* [type]

Barguil, et al.            Expires May 6, 2021                 [Page 19]
Internet-Draft                    L2NM                     November 2020

  |  |     +--rw type      identityref
  |  |     +--rw cos-id?   uint8
  |  |     +--rw cir?      uint64
  |  |     +--rw cbs?      uint64
  |  |     +--rw eir?      uint64
  |  |     +--rw ebs?      uint64
  |  |     +--rw pir?      uint64
  |  |     +--rw pbs?      uint64
  |  +--rw qos {vpn-common:qos}?
  |  |  +--rw qos-classification-policy
  |  |  |  +--rw rule* [id]
  |  |  |     +--rw id
  |  |  |     |       string
  |  |  |     +--rw (match-type)?
  |  |  |     |  +--:(match-flow)
  |  |  |     |  |  +--rw (l3)?
  |  |  |     |  |  |  +--:(ipv4)
  |  |  |     |  |  |  |  +--rw ipv4
  |  |  |     |  |  |  |     +--rw dscp?
  |  |  |     |  |  |  |     |       inet:dscp
  |  |  |     |  |  |  |     +--rw ecn?
  |  |  |     |  |  |  |     |       uint8
  |  |  |     |  |  |  |     +--rw length?
  |  |  |     |  |  |  |     |       uint16
  |  |  |     |  |  |  |     +--rw ttl?
  |  |  |     |  |  |  |     |       uint8
  |  |  |     |  |  |  |     +--rw protocol?
  |  |  |     |  |  |  |     |       uint8
  |  |  |     |  |  |  |     +--rw ihl?
  |  |  |     |  |  |  |     |       uint8
  |  |  |     |  |  |  |     +--rw flags?
  |  |  |     |  |  |  |     |       bits
  |  |  |     |  |  |  |     +--rw offset?
  |  |  |     |  |  |  |     |       uint16
  |  |  |     |  |  |  |     +--rw identification?
  |  |  |     |  |  |  |     |       uint16
  |  |  |     |  |  |  |     +--rw (destination-network)?
  |  |  |     |  |  |  |     |  +--:(destination-ipv4-network)
  |  |  |     |  |  |  |     |     +--rw destination-ipv4-network?
  |  |  |     |  |  |  |     |             inet:ipv4-prefix
  |  |  |     |  |  |  |     +--rw (source-network)?
  |  |  |     |  |  |  |        +--:(source-ipv4-network)
  |  |  |     |  |  |  |           +--rw source-ipv4-network?
  |  |  |     |  |  |  |                   inet:ipv4-prefix
  |  |  |     |  |  |  +--:(ipv6)
  |  |  |     |  |  |     +--rw ipv6
  |  |  |     |  |  |        +--rw dscp?
  |  |  |     |  |  |        |       inet:dscp

Barguil, et al.            Expires May 6, 2021                 [Page 20]
Internet-Draft                    L2NM                     November 2020

  |  |  |     |  |  |        +--rw ecn?
  |  |  |     |  |  |        |       uint8
  |  |  |     |  |  |        +--rw length?
  |  |  |     |  |  |        |       uint16
  |  |  |     |  |  |        +--rw ttl?
  |  |  |     |  |  |        |       uint8
  |  |  |     |  |  |        +--rw protocol?
  |  |  |     |  |  |        |       uint8
  |  |  |     |  |  |        +--rw (destination-network)?
  |  |  |     |  |  |        |  +--:(destination-ipv6-network)
  |  |  |     |  |  |        |     +--rw destination-ipv6-network?
  |  |  |     |  |  |        |             inet:ipv6-prefix
  |  |  |     |  |  |        +--rw (source-network)?
  |  |  |     |  |  |        |  +--:(source-ipv6-network)
  |  |  |     |  |  |        |     +--rw source-ipv6-network?
  |  |  |     |  |  |        |             inet:ipv6-prefix
  |  |  |     |  |  |        +--rw flow-label?
  |  |  |     |  |  |                inet:ipv6-flow-label
  |  |  |     |  |  +--rw (l4)?
  |  |  |     |  |     +--:(tcp)
  |  |  |     |  |     |  +--rw tcp
  |  |  |     |  |     |     +--rw sequence-number?
  |  |  |     |  |     |     |       uint32
  |  |  |     |  |     |     +--rw acknowledgement-number?
  |  |  |     |  |     |     |       uint32
  |  |  |     |  |     |     +--rw data-offset?
  |  |  |     |  |     |     |       uint8
  |  |  |     |  |     |     +--rw reserved?
  |  |  |     |  |     |     |       uint8
  |  |  |     |  |     |     +--rw flags?
  |  |  |     |  |     |     |       bits
  |  |  |     |  |     |     +--rw window-size?
  |  |  |     |  |     |     |       uint16
  |  |  |     |  |     |     +--rw urgent-pointer?
  |  |  |     |  |     |     |       uint16
  |  |  |     |  |     |     +--rw options?
  |  |  |     |  |     |     |       binary
  |  |  |     |  |     |     +--rw (source-port)?
  |  |  |     |  |     |     |  +--:(source-port-range-or-operator)
  |  |  |     |  |     |     |     +--rw source-port-range-or-operator
  |  |  |     |  |     |     |        +--rw (port-range-or-operator)?
  |  |  |     |  |     |     |           +--:(range)
  |  |  |     |  |     |     |           |  +--rw lower-port
  |  |  |     |  |     |     |           |  |       inet:port-number
  |  |  |     |  |     |     |           |  +--rw upper-port
  |  |  |     |  |     |     |           |          inet:port-number
  |  |  |     |  |     |     |           +--:(operator)
  |  |  |     |  |     |     |              +--rw operator?

Barguil, et al.            Expires May 6, 2021                 [Page 21]
Internet-Draft                    L2NM                     November 2020

  |  |  |     |  |     |     |              |       operator
  |  |  |     |  |     |     |              +--rw port
  |  |  |     |  |     |     |                      inet:port-number
  |  |  |     |  |     |     +--rw (destination-port)?
  |  |  |     |  |     |        +--:(destination-port-range-or-operator)
  |  |  |     |  |     |           +--rw destination-port-range-or-operator
  |  |  |     |  |     |              +--rw (port-range-or-operator)?
  |  |  |     |  |     |                 +--:(range)
  |  |  |     |  |     |    |  +--rw lower-port
  |  |  |     |  |     |    |  |       inet:port-number
  |  |  |     |  |     |    |  +--rw upper-port
  |  |  |     |  |     |    |          inet:port-number
  |  |  |     |  |     |                 +--:(operator)
  |  |  |     |  |     |                    +--rw operator?
  |  |  |     |  |     |       |       operator
  |  |  |     |  |     |                    +--rw port
  |  |  |     |  |     |                            inet:port-number
  |  |  |     |  |     +--:(udp)
  |  |  |     |  |        +--rw udp
  |  |  |     |  |           +--rw length?
  |  |  |     |  |           |       uint16
  |  |  |     |  |           +--rw (source-port)?
  |  |  |     |  |           |  +--:(source-port-range-or-operator)
  |  |  |     |  |           |     +--rw source-port-range-or-operator
  |  |  |     |  |           |        +--rw (port-range-or-operator)?
  |  |  |     |  |           |           +--:(range)
  |  |  |     |  |           |           |  +--rw lower-port
  |  |  |     |  |           |           |  |       inet:port-number
  |  |  |     |  |           |           |  +--rw upper-port
  |  |  |     |  |           |           |          inet:port-number
  |  |  |     |  |           |           +--:(operator)
  |  |  |     |  |           |              +--rw operator?
  |  |  |     |  |           |              |       operator
  |  |  |     |  |           |              +--rw port
  |  |  |     |  |           |                      inet:port-number
  |  |  |     |  |           +--rw (destination-port)?
  |  |  |     |  |              +--:(destination-port-range-or-operator)
  |  |  |     |  |                 +--rw destination-port-range-or-operator
  |  |  |     |  |                    +--rw (port-range-or-operator)?
  |  |  |     |  |                       +--:(range)
  |  |  |     |  |          |  +--rw lower-port
  |  |  |     |  |          |  |       inet:port-number
  |  |  |     |  |          |  +--rw upper-port
  |  |  |     |  |          |          inet:port-number
  |  |  |     |  |                       +--:(operator)
  |  |  |     |  |                          +--rw operator?
  |  |  |     |  |             |       operator
  |  |  |     |  |                          +--rw port

Barguil, et al.            Expires May 6, 2021                 [Page 22]
Internet-Draft                    L2NM                     November 2020

  |  |  |     |  |                                  inet:port-number
  |  |  |     |  +--:(match-application)
  |  |  |     |     +--rw match-application?
  |  |  |     |             identityref
  |  |  |     +--rw target-class-id?
  |  |  |             string
  |  |  +--rw qos-profile
  |  |     +--rw qos-profile* [profile]
  |  |        +--rw profile      leafref
  |  |        +--rw direction?   identityref
  |  +--rw precedence
  |     +--rw precedence?   identityref

                                 Figure 10

4.  Relation with other YANG Models

   The L2NM model, aimed at managing the L2VPN Services in a Service
   Provider Network controller/orchestrator has relations with other
   YANG modules.

4.1.  Relation with L2SM

   [RFC8466] defines a L2VPN Service YANG data Model (L2SM) that can be
   used for communication between customers and VPN service providers.
   Hence, the model provides inputs to the Network Operator to deliver
   such service to the customer.  Hence, most parts of the model can be
   directly mapped into L2NM.

   o  Service requirements: The service requirements can be directly
      taken from L2SM to L2NM.

   o  Sites: The sites from L2SM are used to select the Service Prodider
      node.  The site information is NOT maintained in L2NM

4.2.  Relation with Network Topology

   The L2NM model manages VPN Services running over Service Provider
   Backbone network.  The set of nodes over which it is possible to
   deploy a L2 VPN Service MAY be part of the topology contained in an
   ietf-network module.

4.3.  Relation with Device Models

   Creating services in the l2vpn-ntw module will will lead at some
   point to the configuration of devices.  Hence, it is foreseen that
   the data for the device yang modules will be derived partially from

Barguil, et al.            Expires May 6, 2021                 [Page 23]
Internet-Draft                    L2NM                     November 2020

   the L2NM vpn-service container.  Note that L2NM is NOT a device
   model.

5.  YANG Module

<CODE BEGINS>file "ietf-l2vpn-ntw@2020-11-02.yang"
module ietf-l2vpn-ntw {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-l2vpn-ntw";
  prefix l2vpn-ntw;

  import ietf-inet-types {
    prefix inet;
    reference
      "Section 4 of RFC 6991";
  }
  import ietf-yang-types {
    prefix yang;
    reference
      "Section 3 of RFC 6991";
  }
  import ietf-vpn-common {
    prefix vpn-common;
    reference
      "RFC CCCC: A Layer 2/3 VPN Common YANG Model";
  }

  organization
    "IETF OPSA (Operations and Management Area) Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>

     Editor:    Samier Barguil
               <mailto:samier.barguilgiraldo.ext@telefonica.com>
     Editor:    Oscar Gonzalez de Dios
               <mailto:oscar.gonzalezdedios@telefonica.com>
     Author:    Mohamed Boucadair
               <mailto:mohamed.boucadair@orange.com>
     Author:    Luis Angel Munoz
                <mailto:luis-angel.munoz@vodafone.com>
     Author:    Luay Jalil
                <mailto:luay.jalil@verizon.com>
     Author:    Jichun Ma
                <mailto:majc16@chinaunicom.cn>
    ";
  description
    "The YANG module defines a generic network configuration

Barguil, et al.            Expires May 6, 2021                 [Page 24]
Internet-Draft                    L2NM                     November 2020

     model for Layer 2 VPN services common across all of the
     vendor implementations.

     Copyright (c) 2020 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
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX
     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
     for full legal notices.";

  revision 2020-11-02 {
    description
      "Initial version.";
    reference
      "RFC XXXX: A Layer 2 VPN Network YANG Model.";
  }

  /* Features */

  feature multicast-like {
    description
      "Indicates the support of multicast-like capabilities
       in a L2VPN.";
  }

  feature target-sites {
    description
      "Indicates the support of 'target-sites' match flow
       parameter.";
  }

  feature l2cp-control {
    description
      "Indicates the support of L2CP control.";
  }

  feature output-bw {
    description
      "Indicates the support of Output Bandwidth in
       a VPN";
  }

Barguil, et al.            Expires May 6, 2021                 [Page 25]
Internet-Draft                    L2NM                     November 2020

  feature uni-list {
    description
      "Indicates thesupport of UNI list in a VPN.";
  }

  feature oam-3ah {
    description
      "Indicates the support of OAM 802.3ah.";
  }

  feature micro-bfd {
    description
      "Indicates the support of Micro-BFD.";
  }

  feature signaling-options {
    description
      "Indicates the support of signalling option.";
  }

  feature always-on {
    description
      "Indicates the support for always-on access
       constraint.";
  }

  feature requested-type {
    description
      "Indicates the support for requested-type access
       constraint.";
  }

  feature vlan {
    description
      "Indicates the support of VLAN.";
  }

  feature sub-inf {
    description
      "Indicates the support of Sub Interface.";
  }

  feature atm {
    description
      "Indicates the support of ATM.";
  }

  feature vxlan {

Barguil, et al.            Expires May 6, 2021                 [Page 26]
Internet-Draft                    L2NM                     November 2020

    description
      "Indicates the support of VxLAN.";
  }

  feature lan-tag {
    description
      "Indicates the LAN Tag support in a VPN.";
  }

  /* Typedefs */
  /* Identities */

  identity mapping-type {
    base vpn-common:multicast-gp-address-mapping;
    description
      "Identity mapping-type.";
  }

  identity protection-mode {
    description
      "Identity of protection mode";
  }

  identity oneplusone {
    base protection-mode;
    description
      "In this scheme, the primary circuit will be
       protected by a backup circuit, typically meeting certain
       diverse path/fiber/site/node criteria.  Both primary and
       protection circuits are provisioned to be in the active
       forward ing state. The subscriber may choose to send the
       same service frames across both circuits simultaneously.";
  }

  identity one-to-one {
    base protection-mode;
    description
      "In this scheme, a backup circuit to the primary
       circuit is provisioned.  Depending on the implementation
       agreement, the protection circuits may either always be
       in active forwarding state, or may only become active when
       a faulty state is detected on the primary circuit.";
  }

  identity bundling-type {
    description
      "The base identity for the bundling type.  It supports
       multiple CE-VLANs associated with an L2VPN service or

Barguil, et al.            Expires May 6, 2021                 [Page 27]
Internet-Draft                    L2NM                     November 2020

       all CE-VLANs associated with an L2VPN service.";
  }

  identity multi-svc-bundling {
    base bundling-type;
    description
      "Identity for multi-service bundling, i.e.,
       multiple CE-VLAN IDs can be associated with an
       L2VPN service at a site.";
  }

  identity one2one-bundling {
    base bundling-type;
    description
      "Identity for one-to-one service bundling, i.e.,
       each L2VPN can be associated with only one CE-VLAN ID
       at a site.";
  }

  identity all2one-bundling {
    base bundling-type;
    description
      "Identity for all-to-one bundling, i.e., all CE-VLAN IDs
       are mapped to one L2VPN service.";
  }

  identity color-id {
    description
      "Base identity of the color ID.";
  }

  identity color-id-cvlan {
    base color-id;
    description
      "Identity of the color ID based on a CVLAN.";
  }

  identity color-type {
    description
      "Identity of color types.";
  }

  identity green {
    base color-type;
    description
      "Identity of the 'green' color type.";
  }

Barguil, et al.            Expires May 6, 2021                 [Page 28]
Internet-Draft                    L2NM                     November 2020

  identity yellow {
    base color-type;
    description
      "Identity of the 'yellow' color type.";
  }

  identity red {
    base color-type;
    description
      "Identity of the 'red' color type.";
  }

  identity perf-tier-opt {
    description
      "Identity of performance tier option.";
  }

  identity metro {
    base perf-tier-opt;
    description
      "Identity of metro";
  }

  identity regional {
    base perf-tier-opt;
    description
      "Identity of regional";
  }

  identity continental {
    base perf-tier-opt;
    description
      "Identity of continental";
  }

  identity global {
    base perf-tier-opt;
    description
      "Identity of global";
  }

  identity policing {
    description
      "Identity of policing type";
  }

  identity one-rate-two-color {
    base policing;

Barguil, et al.            Expires May 6, 2021                 [Page 29]
Internet-Draft                    L2NM                     November 2020

    description
      "Identity of one-rate, two-color (1R2C)";
  }

  identity two-rate-three-color {
    base policing;
    description
      "Identity of two-rate, three-color (2R3C)";
  }

  identity loop-prevention-type {
    description
      "Identity of loop prevention.";
  }

  identity shut {
    base loop-prevention-type;
    description
      "Identity of shut protection.";
  }

  identity trap {
    base loop-prevention-type;
    description
      "Identity of trap protection.";
  }

  identity t-ldp-pwe-type {
    description
      "Identity for t-ldp-pwe-type.";
  }

  identity vpws-type {
    base t-ldp-pwe-type;
    description
      "Identity for VPWS";
  }

  identity vpls-type {
    base t-ldp-pwe-type;
    description
      "Identity for vpls";
  }

  identity hvpls {
    base t-ldp-pwe-type;
    description
      "Identity for h-vpls";

Barguil, et al.            Expires May 6, 2021                 [Page 30]
Internet-Draft                    L2NM                     November 2020

  }

  identity l2vpn-type {
    description
      "Layer 2 VPN types";
  }

  identity l2vpn-vpws {
    base l2vpn-type;
    description
      "VPWS L2VPN type.";
  }

  identity l2vpn-vpls {
    base l2vpn-type;
    description
      "VPLS L2VPN type.";
  }

  identity distribute-vpls {
    base l2vpn-type;
    description
      "distribute VPLS L2VPN type.";
  }

  identity evpn-type {
    description
      "Ethernet VPN types";
  }

  identity evpn-vpws {
    base evpn-type;
    description
      "VPWS support in EVPN.";
  }

  identity evpn-pbb {
    base evpn-type;
    description
      " Provider Backbone Bridging Support in EVPN.";
  }

  identity pm-type {
    description
      "Performance-monitoring type.";
  }

  identity loss {

Barguil, et al.            Expires May 6, 2021                 [Page 31]
Internet-Draft                    L2NM                     November 2020

    base pm-type;
    description
      "Loss measurement.";
  }

  identity delay {
    base pm-type;
    description
      "Delay measurement.";
  }

  identity mac-learning-mode {
    description
      "MAC learning mode.";
  }

  identity data-plane {
    base mac-learning-mode;
    description
      "User MAC addresses are learned through ARP broadcast.";
  }

  identity control-plane {
    base mac-learning-mode;
    description
      "User MAC addresses are advertised through EVPN-BGP.";
  }

  identity mac-action {
    description
      "Base identity for a MAC action.";
  }

  identity drop {
    base mac-action;
    description
      "Identity for dropping a packet.";
  }

  identity flood {
    base mac-action;
    description
      "Identity for packet flooding.";
  }

  identity warning {
    base mac-action;
    description

Barguil, et al.            Expires May 6, 2021                 [Page 32]
Internet-Draft                    L2NM                     November 2020

      "Identity for sending a warning log message.";
  }

  identity load-balance-method {
    description
      "Base identity for load balance method.";
  }

  identity fat-pw {
    base load-balance-method;
    description
      "Identity for Fat PW. Fat label is
       applied to Pseudowires across MPLS
       network.";
  }

  identity entropy-label {
    base load-balance-method;
    description
      "Identity for entropy label.Entropy label
       is applied to IP forwarding,
       L2VPN or L3VPN across MPLS network";
  }

  identity vxlan-source-port {
    base load-balance-method;
    description
      "Identity for vxlan source port.VxLAN
       Source Port is one load balancing method.";
  }

  identity precedence-type {
    description
      "Redundancy type. The service can be created
       with active and bakcup signalization.";
  }

  identity primary {
    base precedence-type;
    description
      "Identifies the Main L2VPN.";
  }

  identity backup {
    base precedence-type;
    description
      "Identifies the Backup L2VPN.";
  }

Barguil, et al.            Expires May 6, 2021                 [Page 33]
Internet-Draft                    L2NM                     November 2020

  /* Groupings */

  grouping cfm-802-grouping {
    leaf maid {
      type string;
      description
        "MA ID";
    }
    leaf mep-id {
      type uint32;
      description
        "Local MEP ID";
    }
    leaf mep-level {
      type uint32;
      description
        "MEP level";
    }
    leaf mep-up-down {
      type enumeration {
        enum up {
          description
            "MEP up";
        }
        enum down {
          description
            "MEP down";
        }
      }
      description
        "MEP up/down";
    }
    leaf remote-mep-id {
      type uint32;
      description
        "Remote MEP ID";
    }
    leaf cos-for-cfm-pdus {
      type uint32;
      description
        "COS for CFM PDUs";
    }
    leaf ccm-interval {
      type uint32;
      description
        "CCM interval";
    }
    leaf ccm-holdtime {

Barguil, et al.            Expires May 6, 2021                 [Page 34]
Internet-Draft                    L2NM                     November 2020

      type uint32;
      description
        "CCM hold time";
    }
    leaf ccm-p-bits-pri {
      type vpn-common:ccm-priority-type;
      description
        "The priority parameter for CCMs transmitted by the MEP";
    }
    description
      "Grouping for 802.1ag CFM attribute";
  }

  grouping y-1731 {
    list y-1731 {
      key "maid";
      leaf maid {
        type string;
        description
          "MA ID ";
      }
      leaf mep-id {
        type uint32;
        description
          "Local MEP ID";
      }
      leaf type {
        type identityref {
          base pm-type;
        }
        description
          "Performance monitor types";
      }
      leaf remote-mep-id {
        type uint32;
        description
          "Remote MEP ID";
      }
      leaf message-period {
        type uint32;
        description
          "Defines the interval between OAM messages. The message
           period is expressed in milliseconds";
      }
      leaf measurement-interval {
        type uint32;
        description
          "Specifies the measurement interval for statistics. The

Barguil, et al.            Expires May 6, 2021                 [Page 35]
Internet-Draft                    L2NM                     November 2020

           measurement interval is expressed in seconds";
      }
      leaf cos {
        type uint32;
        description
          "Class of service";
      }
      leaf loss-measurement {
        type boolean;
        description
          "Whether enable loss measurement";
      }
      leaf synthethic-loss-measurement {
        type boolean;
        description
          "Indicate whether enable synthetic loss measurement";
      }
      container delay-measurement {
        leaf enable-dm {
          type boolean;
          description
            "Whether to enable delay measurement";
        }
        leaf two-way {
          type boolean;
          description
            "Whether delay measurement is two-way (true) of one-
             way (false)";
        }
        description
          "Container for delay measurement";
      }
      leaf frame-size {
        type uint32;
        description
          "Frame size";
      }
      leaf session-type {
        type enumeration {
          enum proactive {
            description
              "Proactive mode";
          }
          enum on-demand {
            description
              "On demand mode";
          }
        }

Barguil, et al.            Expires May 6, 2021                 [Page 36]
Internet-Draft                    L2NM                     November 2020

        description
          "Session type";
      }
      description
        "List for y-1731.";
    }
    description
      "Grouping for y.1731";
  }

  /* MAIN L2VPN SERVICE */

  container l2vpn-ntw {
    container vpn-profiles {
      uses vpn-common:vpn-profile-cfg;
      description
        "Container for VPN Profiles.";
    }
    container vpn-services {
      list vpn-service {
        key "vpn-id";
        uses vpn-common:service-status;
        uses vpn-common:vpn-description;
        leaf l2sm-vpn-id {
          type vpn-common:vpn-id;
          description
            "Pointer to the L2SM service.";
        }
        leaf vpn-svc-type {
          type identityref {
            base vpn-common:vpn-signaling-type;
          }
          description
            "Service type";
        }
        leaf svc-topo {
          type identityref {
            base vpn-common:vpn-topology;
          }
          description
            "Defining service topology, such as
             any-to-any, hub-spoke, etc.";
        }
        container multicast-like {
          if-feature "vpn-common:multicast";
          leaf enabled {
            type boolean;
            default "false";

Barguil, et al.            Expires May 6, 2021                 [Page 37]
Internet-Draft                    L2NM                     November 2020

            description
              "Enables multicast.";
          }
          container customer-tree-flavors {
            leaf-list tree-flavor {
              type identityref {
                base vpn-common:multicast-tree-type;
              }
              description
                "Type of tree to be used.";
            }
            description
              "Type of trees used by customer.";
          }
          description
            "Multicast like container";
        }
        container extranet-vpns {
          if-feature "vpn-common:extranet-vpn";
          list extranet-vpn {
            key "vpn-id";
            leaf vpn-id {
              type vpn-common:vpn-id;
              description
                "Identifies the target VPN.";
            }
            leaf local-sites-role {
              type identityref {
                base vpn-common:role;
              }
              default "vpn-common:any-to-any-role";
              description
                "This describes the role of the
                 local sites in the target VPN topology.";
            }
            description
              "List of extranet VPNs the local VPN is attached to.";
          }
          description
            "Container for extranet VPN configuration.";
        }
        leaf svc-mtu {
          type uint32;
          description
            "SVC MTU, it is also known as the maximum transmission unit
             or maximum frame size,When a frame is larger than the MTU,
             it is broken down, or fragmented, into smaller pieces by the
             network protocol to accommodate the MTU of the network";

Barguil, et al.            Expires May 6, 2021                 [Page 38]
Internet-Draft                    L2NM                     November 2020

        }
        leaf ce-vlan-preservation {
          type boolean;
          description
            "Preserve the CE-VLAN ID from ingress to egress,i.e.,
             CE-VLAN tag of the egress frame are identical to
             those of the ingress frame that yielded this egress
             service frame. If All-to-One bundling within a site
             is Enabled, then preservation applies to all Ingress
             service frames. If All-to-One bundling is Disabled,
             then preservation applies to tagged Ingress service
             frames having CE-VLAN ID 1 through 4094.";
        }
        leaf ce-vlan-cos-perservation {
          type boolean;
          description
            "CE vlan CoS preservation. PCP bits in the CE-VLAN tag
             of the egress frame are identical to those of the ingress
             frame that yielded this egress service frame.";
        }
        uses vpn-common:svc-transport-encapsulation;
        container vpn-nodes {
          list vpn-node {
            key "vpn-node-id ne-id";
            leaf vpn-node-id {
              type vpn-common:vpn-id;
              description
                "";
            }
            leaf description {
              type string;
              description
                "Textual description of a VPN node.";
            }
            leaf node-role {
              type identityref {
                base vpn-common:role;
              }
              default "vpn-common:any-to-any-role";
              description
                "Role of the vpn-node in the IP VPN.";
            }
            leaf ne-id {
              type string;
              description
                "NE IP address";
            }
            leaf port-id {

Barguil, et al.            Expires May 6, 2021                 [Page 39]
Internet-Draft                    L2NM                     November 2020

              type string;
              description
                "NE Port-id";
            }
            uses vpn-common:service-status;
            list signaling-options {
              key "type";
              leaf type {
                type identityref {
                  base vpn-common:vpn-signaling-type;
                }
                description
                  "VPN signaling types";
              }
              container l2vpn-bgp {
                when "/l2vpn-ntw/vpn-services/vpn-service/vpn-nodes/vpn-node/signaling-options/type = 'vpn-common:l2vpn-bgp'" {
                  description
                    "Only applies when vpn signaling type is l2vpn
                     BGP protocol.";
                }
                leaf pwe-encapsulation-type {
                  type identityref {
                    base vpn-common:encapsulation-type;
                  }
                  description
                    "PWE Encapsulation Type";
                }
                uses vpn-common:vpn-route-targets;
                container pwe-mtu {
                  leaf allow-mtu-mismatch {
                    type boolean;
                    description
                      "Allow MTU mismatch";
                  }
                  description
                    "Container of PWE MTU configurations";
                }
                leaf address-family {
                  type vpn-common:address-family;
                  description
                    "Address family used for router-id information.";
                }
                description
                  "Container for MP BGP L2VPN";
              }
              container evpn-bgp {
                when "/l2vpn-ntw/vpn-services/vpn-service/vpn-nodes/vpn-node/signaling-options/type = 'vpn-common:evpn-bgp'" {
                  description

Barguil, et al.            Expires May 6, 2021                 [Page 40]
Internet-Draft                    L2NM                     November 2020

                    "Only applies when vpn signaling type is EVPN
                     BGP protocol.";
                }
                leaf vpn-id {
                  type leafref {
                    path "/l2vpn-ntw/vpn-services/vpn-service/vpn-id";
                  }
                  description
                    "Identifies the target EVPN";
                }
                leaf type {
                  type identityref {
                    base evpn-type;
                  }
                  description
                    "L2VPN types";
                }
                leaf address-family {
                  type vpn-common:address-family;
                  description
                    "Address family used for router-id information.";
                }
                leaf mac-learning-mode {
                  type identityref {
                    base mac-learning-mode;
                  }
                  description
                    "Indicates through which plane MAC addresses are
                     advertised.";
                }
                leaf arp-suppress {
                  type boolean;
                  default "false";
                  description
                    "Indicates whether to suppress ARP broadcast.";
                }
                description
                  "Container for MP BGP L2VPN";
              }
              container t-ldp-pwe {
                when "/l2vpn-ntw/vpn-services/vpn-service/vpn-nodes/vpn-node/signaling-options/type = 'vpn-common:t-ldp'" {
                  description
                    "Only applies when vpn signaling type is Target LDP.";
                }
                leaf type {
                  type identityref {
                    base t-ldp-pwe-type;
                  }

Barguil, et al.            Expires May 6, 2021                 [Page 41]
Internet-Draft                    L2NM                     November 2020

                  description
                    "T-LDP PWE type";
                }
                leaf pwe-encapsulation-type {
                  type identityref {
                    base vpn-common:encapsulation-type;
                  }
                  description
                    "PWE Encapsulation Type.";
                }
                leaf pwe-mtu {
                  type uint16;
                  description
                    "Allow MTU mismatch";
                }
                list ac-pw-list {
                  key "peer-addr vc-id";
                  leaf peer-addr {
                    type inet:ip-address;
                    description
                      "Peer IP address.";
                  }
                  leaf vc-id {
                    type vpn-common:vpn-id;
                    description
                      "VC lable used to identify PW.";
                  }
                  leaf pw-type {
                    type identityref {
                      base vpn-common:vpn-topology;
                    }
                    description
                      "PW topology type";
                  }
                  leaf pw-priority {
                    type uint32;
                    description
                      "Defines the priority for the PW.
                       The higher the pw-priority value,
                       the higher the preference of the PW will be.";
                  }
                  description
                    "List of AC and PW bindings.";
                }
                container qinq {
                  when "/l2vpn-ntw/vpn-services/vpn-service/vpn-nodes/vpn-node/signaling-options/type = 'vpn-common:h-vpls'" {
                    description
                      "Only applies when t-ldp pwe type is h-vpls.";

Barguil, et al.            Expires May 6, 2021                 [Page 42]
Internet-Draft                    L2NM                     November 2020

                  }
                  leaf s-tag {
                    type uint32;
                    description
                      "S-TAG";
                  }
                  leaf c-tag {
                    type uint32;
                    description
                      "C-TAG";
                  }
                  description
                    "Container for QinQ";
                }
                description
                  "Container of T-LDP PWE configurations";
              }
              container l2tp-pwe {
                when "/l2vpn-ntw/vpn-services/vpn-service/vpn-nodes/vpn-node/signaling-options/type = 'vpn-common:l2tp'" {
                  description
                    "Applies when vpn signaling type is L2TP protocol.";
                }
                leaf type {
                  type identityref {
                    base t-ldp-pwe-type;
                  }
                  description
                    "T-LDP PWE type";
                }
                leaf encapsulation-type {
                  type identityref {
                    base vpn-common:encapsulation-type;
                  }
                  description
                    "Encapsulation type";
                }
                list ac-pw-list {
                  key "peer-addr vc-id";
                  leaf peer-addr {
                    type inet:ip-address;
                    description
                      "Peer IP address.";
                  }
                  leaf vc-id {
                    type string;
                    description
                      "VC lable used to identify PW.";
                  }

Barguil, et al.            Expires May 6, 2021                 [Page 43]
Internet-Draft                    L2NM                     November 2020

                  leaf pw-priority {
                    type uint32;
                    description
                      "PW priority";
                  }
                  description
                    "List of AC and PW bindings.";
                }
                description
                  "Container for l2tp pw";
              }
              description
                "List of VPN Signaling Option.";
            }
            container vpn-network-accesses {
              list vpn-network-access {
                key "id";
                leaf id {
                  type vpn-common:vpn-id;
                  description
                    "Identifier of network access";
                }
                leaf description {
                  type string;
                  description
                    "String to describe the element.";
                }
                leaf Interface-mtu {
                  type uint32;
                  description
                    "Interface MTU, it is also known as the maximum
                     transmission unit or maximum frame size. When a
                     frame is larger than the MTU, it is broken down,
                     or fragmented, into smaller pieces by the
                     network protocol to accommodate the MTU of the
                     network";
                }
                uses vpn-common:service-status;
                container access-diversity {
                  if-feature "vpn-common:placement-diversity";
                  container groups {
                    leaf fate-sharing-group-size {
                      type uint16;
                      description
                        "Fate sharing group size.";
                    }
                    leaf group-color {
                      type string;

Barguil, et al.            Expires May 6, 2021                 [Page 44]
Internet-Draft                    L2NM                     November 2020

                      description
                        "Group color associated with a particular VPN.";
                    }
                    list group {
                      key "group-id";
                      leaf group-id {
                        type string;
                        description
                          "Group-id the site network access
                           is belonging to";
                      }
                      description
                        "List of group-id";
                    }
                    description
                      "Groups the fate sharing group member
                       is belonging to";
                  }
                  container constraints {
                    list constraint {
                      key "constraint-type";
                      leaf constraint-type {
                        type identityref {
                          base vpn-common:placement-diversity;
                        }
                        description
                          "Diversity constraint type.";
                      }
                      container target {
                        choice target-flavor {
                          case id {
                            list group {
                              key "group-id";
                              leaf group-id {
                                type string;
                                description
                                  "The constraint will apply
                                   against this particular
                                   group-id";
                              }
                              description
                                "List of groups";
                            }
                          }
                          case all-accesses {
                            leaf all-other-accesses {
                              type empty;
                              description

Barguil, et al.            Expires May 6, 2021                 [Page 45]
Internet-Draft                    L2NM                     November 2020

                                "The constraint will apply
                                 against all other site network
                                 access of this site";
                            }
                          }
                          case all-groups {
                            leaf all-other-groups {
                              type empty;
                              description
                                "The constraint will apply
                                 against all other groups the
                                 customer is managing";
                            }
                          }
                          description
                            "Choice for the group definition";
                        }
                        description
                          "The constraint will apply against
                           this list of groups";
                      }
                      description
                        "List of constraints";
                    }
                    description
                      "Constraints for placing this site
                        network access";
                  }
                  description
                    "Diversity parameters.";
                }
                container connection {
                  leaf encapsulation-type {
                    type identityref {
                      base vpn-common:encapsulation-type;
                    }
                    description
                      "Encapsulation Type";
                  }
                  leaf-list eth-inf-type {
                    type identityref {
                      base vpn-common:encapsulation-type;
                    }
                    description
                      "Ethernet Interface Type";
                  }
                  container dot1q-interface {
                    leaf l2-access-type {

Barguil, et al.            Expires May 6, 2021                 [Page 46]
Internet-Draft                    L2NM                     November 2020

                      type identityref {
                        base vpn-common:encapsulation-type;
                      }
                      description
                        "L2 Access Encapsulation Type";
                    }
                    container dot1q {
                      when "../l2-access-type='vpn-common:dot1q'";
                      if-feature "vpn-common:dot1q";
                      leaf physical-inf {
                        type string;
                        description
                          "Physical Interface";
                      }
                      leaf c-vlan-id {
                        type uint32;
                        description
                          "VLAN identifier";
                      }
                      description
                        "Qot1q";
                    }
                    container qinq {
                      when "../l2-access-type='vpn-common:qinq'";
                      if-feature "vpn-common:qinq";
                      leaf s-vlan-id {
                        type uint32;
                        description
                          "S-VLAN Identifier";
                      }
                      leaf c-vlan-id {
                        type uint32;
                        description
                          "C-VLAN Identifier";
                      }
                      description
                        "QinQ";
                    }
                    container qinany {
                      if-feature "vpn-common:qinany";
                      leaf s-vlan-id {
                        type uint32;
                        description
                          "S-Vlan ID";
                      }
                      description
                        "Container for Q in Any";
                    }

Barguil, et al.            Expires May 6, 2021                 [Page 47]
Internet-Draft                    L2NM                     November 2020

                    container vxlan {
                      when "../l2-access-type='vpn-common:vxlan'";
                      if-feature "vxlan";
                      leaf vni-id {
                        type uint32;
                        description
                          "VNI Identifier";
                      }
                      leaf peer-mode {
                        type identityref {
                          base vpn-common:vxlan-peer-mode;
                        }
                        description
                          "specify the vxlan access mode";
                      }
                      list peer-list {
                        key "peer-ip";
                        leaf peer-ip {
                          type inet:ip-address;
                          description
                            "Peer IP";
                        }
                        description
                          "List for peer IP";
                      }
                      description
                        "QinQ";
                    }
                    description
                      "Container for dot1Q Interface";
                  }
                  container phy-interface {
                    leaf port-number {
                      type uint32;
                      description
                        "Port number";
                    }
                    leaf port-speed {
                      type uint32;
                      description
                        "Port speed";
                    }
                    leaf mode {
                      type vpn-common:neg-mode;
                      description
                        "Negotiation mode";
                    }
                    leaf phy-mtu {

Barguil, et al.            Expires May 6, 2021                 [Page 48]
Internet-Draft                    L2NM                     November 2020

                      type uint32;
                      description
                        "PHY MTU";
                    }
                    leaf flow-control {
                      type string;
                      description
                        "Flow control";
                    }
                    container oam-802.3ah-link {
                      if-feature "oam-3ah";
                      leaf enable {
                        type boolean;
                        description
                          "Indicate whether support oam 802.3 ah link";
                      }
                      description
                        "Container for oam 802.3 ah link.";
                    }
                    leaf uni-loop-prevention {
                      type boolean;
                      description
                        "If this leaf set to truth that the port automatically
                         goes down when a physical loopback is detect.";
                    }
                    description
                      "Container of PHY Interface Attributes configurations";
                  }
                  container lag-interface {
                    if-feature "vpn-common:lag-interface";
                    list lag-interface {
                      key "lag-interface-number";
                      leaf lag-interface-number {
                        type uint32;
                        description
                          "LAG interface number";
                      }
                      container lacp {
                        leaf lacp-state {
                          type boolean;
                          description
                            "LACP on/off";
                        }
                        leaf lacp-mode {
                          type boolean;
                          description
                            "LACP mode";
                        }

Barguil, et al.            Expires May 6, 2021                 [Page 49]
Internet-Draft                    L2NM                     November 2020

                        leaf lacp-speed {
                          type boolean;
                          description
                            "LACP speed";
                        }
                        leaf mini-link {
                          type uint32;
                          description
                            "The minimum aggregate bandwidth for a LAG";
                        }
                        leaf system-priority {
                          type uint16;
                          description
                            "Indicates the LACP priority for the system.
                             The range is from 0 to 65535.
                             The default is 32768.";
                        }
                        container member-link-list {
                          list member-link {
                            key "name";
                            leaf name {
                              type string;
                              description
                                "Member link name";
                            }
                            leaf port-speed {
                              type uint32;
                              description
                                "Port speed";
                            }
                            leaf mode {
                              type vpn-common:neg-mode;
                              description
                                "Negotiation mode";
                            }
                            leaf link-mtu {
                              type uint32;
                              description
                                "Link MTU size.";
                            }
                            container oam-802.3ah-link {
                              if-feature "oam-3ah";
                              leaf enable {
                                type boolean;
                                description
                                  "Indicate whether support oam 802.3 ah link";
                              }
                              description

Barguil, et al.            Expires May 6, 2021                 [Page 50]
Internet-Draft                    L2NM                     November 2020

                                "Container for oam 802.3 ah link.";
                            }
                            description
                              "Member link";
                          }
                          description
                            "Container of Member link list";
                        }
                        leaf flow-control {
                          type string;
                          description
                            "Flow control";
                        }
                        leaf lldp {
                          type boolean;
                          description
                            "LLDP";
                        }
                        description
                          "LACP";
                      }
                      description
                        "List of LAG interfaces";
                    }
                    description
                      "Container of LAG interface attributes configuration";
                  }
                  list cvlan-id-to-svc-map {
                    key "svc-id";
                    leaf svc-id {
                      type leafref {
                        path "/l2vpn-ntw/vpn-services/vpn-service/vpn-id";
                      }
                      description
                        "VPN Service identifier";
                    }
                    list cvlan-id {
                      key "vid";
                      leaf vid {
                        type uint32;
                        description
                          "CVLAN ID";
                      }
                      description
                        "List of CVLAN-ID to SVC Map configurations";
                    }
                    description
                      "List for cvlan-id to L2VPn Service map configurations";

Barguil, et al.            Expires May 6, 2021                 [Page 51]
Internet-Draft                    L2NM                     November 2020

                  }
                  container split-horizon {
                    leaf group-name {
                      type string;
                      description
                        "group-name of the Split Horizon";
                    }
                    description
                      "Configuration with split horizon enabled";
                  }
                  description
                    "Container for bearer";
                }
                container availability {
                  leaf access-priority {
                    type uint32;
                    description
                      "Access priority";
                  }
                  choice redundancy-mode {
                    case single-active {
                      leaf single-active {
                        type boolean;
                        description
                          "Single active";
                      }
                      description
                        "Single active case";
                    }
                    case all-active {
                      leaf all-active {
                        type boolean;
                        description
                          "All active";
                      }
                      description
                        "All active case";
                    }
                    description
                      "Redundancy mode choice";
                  }
                  description
                    "Container of availability optional configurations";
                }
                container service {
                  container svc-input-bandwidth {
                    if-feature "vpn-common:input-bw";
                    list input-bandwidth {

Barguil, et al.            Expires May 6, 2021                 [Page 52]
Internet-Draft                    L2NM                     November 2020

                      key "type";
                      leaf type {
                        type identityref {
                          base vpn-common:bw-type;
                        }
                        description
                          "Bandwidth Type";
                      }
                      leaf cos-id {
                        type uint8;
                        description
                          "Identifier of Class of Service
                           , indicated by DSCP or a CE-CLAN
                           CoS(802.1p)value in the service frame.";
                      }
                      leaf cir {
                        type uint64;
                        description
                          "Committed Information Rate. The maximum number of
                           bits that a port can receive or send during
                           one-second over an interface.";
                      }
                      leaf cbs {
                        type uint64;
                        description
                          "Committed Burst Size.CBS controls the bursty nature
                           of the traffic. Traffic that does not use the
                           configured CIR accumulates credits until the credits
                           reach the configured CBS.";
                      }
                      leaf eir {
                        type uint64;
                        description
                          "Excess Information Rate,i.e.,Excess frame delivery
                           allowed not subject to SLA.The traffic rate can be
                           limited by eir.";
                      }
                      leaf ebs {
                        type uint64;
                        description
                          "Excess Burst Size. The bandwidth available for burst
                           traffic from the EBS is subject to the amount of
                           bandwidth that is accumulated during periods when
                           traffic allocated by the EIR policy is not used.";
                      }
                      leaf pir {
                        type uint64;
                        description

Barguil, et al.            Expires May 6, 2021                 [Page 53]
Internet-Draft                    L2NM                     November 2020

                          "Peak Information Rate, i.e., maixmum frame delivery
                           allowed. It is equal to or less than sum of cir and
                           eir.";
                      }
                      leaf pbs {
                        type uint64;
                        description
                          "Peak Burst Size. It is measured in bytes per second.";
                      }
                      description
                        "List for input bandwidth";
                    }
                    description
                      "From the PE perspective, the service input
                       bandwidth of the connection.";
                  }
                  container svc-output-bandwidth {
                    if-feature "output-bw";
                    list output-bandwidth {
                      key "type";
                      leaf type {
                        type identityref {
                          base vpn-common:bw-type;
                        }
                        description
                          "Bandwidth Type";
                      }
                      leaf cos-id {
                        type uint8;
                        description
                          "Identifier of Class of Service
                           , indicated by DSCP or a CE-CLAN
                           CoS(802.1p)value in the service frame.";
                      }
                      leaf cir {
                        type uint64;
                        description
                          "Committed Information Rate. The maximum number of
                           bits that a port can receive or send during
                           one-second over an interface.";
                      }
                      leaf cbs {
                        type uint64;
                        description
                          "Committed Burst Size.CBS controls the bursty nature
                           of the traffic. Traffic that does not use the
                           configured CIR accumulates credits until the credits
                           reach the configured CBS.";

Barguil, et al.            Expires May 6, 2021                 [Page 54]
Internet-Draft                    L2NM                     November 2020

                      }
                      leaf eir {
                        type uint64;
                        description
                          "Excess Information Rate,i.e.,Excess frame delivery
                           allowed not subject to SLA.The traffic rate can be
                           limited by eir.";
                      }
                      leaf ebs {
                        type uint64;
                        description
                          "Excess Burst Size. The bandwidth available for burst
                           traffic from the EBS is subject to the amount of
                           bandwidth that is accumulated during periods when
                           traffic allocated by the EIR policy is not used.";
                      }
                      leaf pir {
                        type uint64;
                        description
                          "Peak Information Rate, i.e., maixmum frame delivery
                           allowed. It is equal to or less than sum of cir and
                           eir.";
                      }
                      leaf pbs {
                        type uint64;
                        description
                          "Peak Burst Size. It is measured in bytes per second.";
                      }
                      description
                        "List for output bandwidth";
                    }
                    description
                      "From the PE perspective, the service output
                       bandwidth of the connection.";
                  }
                  container qos {
                    if-feature "vpn-common:qos";
                    container qos-classification-policy {
                      uses vpn-common:qos-classification-policy;
                      description
                        "Configuration of the traffic classification
                         policy.";
                    }
                    container qos-profile {
                      list qos-profile {
                        key "profile";
                        description
                          "QoS profile.

Barguil, et al.            Expires May 6, 2021                 [Page 55]
Internet-Draft                    L2NM                     November 2020

                           Can be standard profile or customized
                           profile.";
                        leaf profile {
                          type leafref {
                            path "/l2vpn-ntw/vpn-profiles"
                               + "/valid-provider-identifiers"
                               + "/qos-profile-identifier/id";
                          }
                          description
                            "QoS profile to be used.";
                        }
                        leaf direction {
                          type identityref {
                            base vpn-common:qos-profile-direction;
                          }
                          default "vpn-common:both";
                          description
                            "The direction to which the QoS profile
                             is applied.";
                        }
                      }
                      description
                        "QoS profile configuration.";
                    }
                    description
                      "QoS configuration.";
                  }
                  container precedence {
                    leaf precedence {
                      type identityref {
                        base precedence-type;
                      }
                      description
                        "Defining service redundancy in transport
                         network.";
                    }
                    description
                      "Transport netowrk precedence selector
                       Primary or Secondary tunnel.";
                  }
                  description
                    "Container for service";
                }
                container broadcast-unknown-unicast-multicast {
                  leaf multicast-site-type {
                    type enumeration {
                      enum receiver-only {
                        description

Barguil, et al.            Expires May 6, 2021                 [Page 56]
Internet-Draft                    L2NM                     November 2020

                          "The site only has receivers.";
                      }
                      enum source-only {
                        description
                          "The site only has sources.";
                      }
                      enum source-receiver {
                        description
                          "The site has both sources and receivers.";
                      }
                    }
                    default "source-receiver";
                    description
                      "Type of multicast site.";
                  }
                  list multicast-gp-address-mapping {
                    key "id";
                    leaf id {
                      type uint16;
                      description
                        "Unique identifier for the mapping.";
                    }
                    leaf vlan-id {
                      type uint32;
                      description
                        "The VLAN ID of the Multicast group.";
                    }
                    leaf mac-gp-address {
                      type yang:mac-address;
                      description
                        "The MAC address of the Multicast group.";
                    }
                    leaf port-lag-number {
                      type uint32;
                      description
                        "The ports/LAGs belonging to the Multicast group.";
                    }
                    description
                      "List of Port to group mappings.";
                  }
                  leaf bum-overall-rate {
                    type uint32;
                    description
                      "overall rate for BUM";
                  }
                  description
                    "Container of broadcast, unknown unicast, and multicast
                     configurations";

Barguil, et al.            Expires May 6, 2021                 [Page 57]
Internet-Draft                    L2NM                     November 2020

                }
                container ethernet-service-oam {
                  leaf md-name {
                    type string;
                    description
                      "Maintenance domain name";
                  }
                  leaf md-level {
                    type uint8;
                    description
                      "Maintenance domain level";
                  }
                  container cfm-802.1-ag {
                    list n2-uni-c {
                      key "maid";
                      uses cfm-802-grouping;
                      description
                        "List of UNI-N to UNI-C";
                    }
                    list n2-uni-n {
                      key "maid";
                      uses cfm-802-grouping;
                      description
                        "List of UNI-N to UNI-N";
                    }
                    description
                      "Container of 802.1ag CFM configurations.";
                  }
                  uses y-1731;
                  description
                    "Container for Ethernet service OAM.";
                }
                container mac-loop-prevention {
                  leaf frequency {
                    type uint32;
                    description
                      "Frequency";
                  }
                  leaf protection-type {
                    type identityref {
                      base loop-prevention-type;
                    }
                    description
                      "Protection type";
                  }
                  leaf number-retries {
                    type uint32;
                    description

Barguil, et al.            Expires May 6, 2021                 [Page 58]
Internet-Draft                    L2NM                     November 2020

                      "Number of retries";
                  }
                  description
                    "Container of MAC loop prevention.";
                }
                container access-control-list {
                  list mac {
                    key "mac-address";
                    leaf mac-address {
                      type yang:mac-address;
                      description
                        "MAC address.";
                    }
                    description
                      "List for MAC.";
                  }
                  description
                    "Container for access control List.";
                }
                container mac-addr-limit {
                  leaf mac-num-limit {
                    type uint16;
                    description
                      "maximum number of MAC addresses learned from
                       the subscriber for a single service instance.";
                  }
                  leaf time-interval {
                    type uint32;
                    units "milliseconds";
                    description
                      "The aging time of the mac address.";
                  }
                  leaf action {
                    type identityref {
                      base mac-action;
                    }
                    description
                      "specify the action when the upper limit is
                       exceeded: drop the packet, flood the
                       packet, or simply send a warning log message.";
                  }
                  description
                    "Container of MAC-Addr limit configurations";
                }
                description
                  "List of VPN Network Accesses.";
              }
              description

Barguil, et al.            Expires May 6, 2021                 [Page 59]
Internet-Draft                    L2NM                     November 2020

                "List of VPN Nodes.";
            }
            description
              "Container of VPN Nodes.";
          }
          description
            "List of vpn-svc";
        }
        description
          "Container of port configurations";
      }
      description
        "Container for L2VPN service";
    }
    description
      "Container for VPN services.";
  }
}

<CODE ENDS>

                                 Figure 11

6.  Acknowledgements

   The authors would like to thank Tom Petch for the comments to improve
   the document.

7.  Contributors

   Daniel King
   Old Dog Consulting
   Email: daniel@olddog.co.uk

   Victor Lopez
   Telefonica
   Email: victor.lopezalvarez@telefonica.com

   Zhang Guiyu
   China Unicom
   Email: zhanggy113@chinaunicom.cn

   Qin Wu
   Huawei
   Email: bill.wu@huawei.com

Barguil, et al.            Expires May 6, 2021                 [Page 60]
Internet-Draft                    L2NM                     November 2020

8.  IANA Considerations

   This document requests IANA to register the following URI in the "ns"
   subregistry within the "IETF XML Registry" [RFC3688]:

      URI: urn:ietf:params:xml:ns:yang:ietf-l2vpn-ntw

      Registrant Contact: The IESG.

      XML: N/A; the requested URI is an XML namespace.

   This document requests IANA to register the following YANG module in
   the "YANG Module Names" subregistry [RFC6020] within the "YANG
   Parameters" registry.

      name: ietf-l2vpn-ntw

      namespace: urn:ietf:params:xml:ns:yang:ietf-l2vpn-ntw

      maintained by IANA: N

      prefix: l2vpn-ntw

      reference: RFC XXXX

9.  Security Considerations

   The YANG module specified in this document defines a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040] .  The lowest NETCONF
   layer is the secure transport layer, and the mandatory-to-implement
   secure transport is Secure Shell (SSH) [RFC6242].  The lowest
   RESTCONF layer is HTTPS, and the mandatory-to-implement secure
   transport is TLS [RFC8466].

   The Network Configuration Access Control Model (NACM) [RFC8341]
   provides the means to restrict access for particular NETCONF or
   RESTCONF users to a preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.

   The ietf-l2vpn-ntw module is used to manage L2 VPNs in a service
   provider backbone network.  Hence, the module can be used to request,
   modify, or retrieve L2VPN services.  There are a number of data nodes
   defined in this YANG module that are writable/creatable/deletable
   (i.e., config true, which is the default).  These data nodes MAY be
   considered sensitive or vulnerable in some network environments.
   Write operations (e.g., edit-config) and delete operations to these
   data nodes without proper protection or authentication can have a

Barguil, et al.            Expires May 6, 2021                 [Page 61]
Internet-Draft                    L2NM                     November 2020

   negative effect on network operations.  These are the subtrees and
   data nodes and their sensitivity/vulnerability in the ietf-l2vpn-ntw
   module:

   o  vpn-service: An attacker who is able to access network nodes can
      undertake various attacks, such as deleting a running L2 VPN
      Service, interrupting all the traffic of a client.

   Some of the readable data nodes in this YANG module may be considered
   sensitive or vulnerable in some network environments.  It is thus
   important to control read access (e.g., via get, get-config, or
   notification) to these data nodes.  These are the subtrees and data
   nodes and their sensitivity/vulnerability:

   o  customer-name: An attacker can retrieve privacy-related
      information which can be used to track a customer.  Disclosing
      such information may be considered as a violation of the customer-
      provider trust relationship.

10.  References

10.1.  Normative References

   [I-D.ietf-opsawg-vpn-common]
              barguil, s., Dios, O., Boucadair, M., and Q. WU, "A Layer
              2/3 VPN Common YANG Model", draft-ietf-opsawg-vpn-
              common-02 (work in progress), October 2020.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

Barguil, et al.            Expires May 6, 2021                 [Page 62]
Internet-Draft                    L2NM                     November 2020

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

   [RFC7432]  Sajassi, A., Ed., Aggarwal, R., Bitar, N., Isaac, A.,
              Uttaro, J., Drake, J., and W. Henderickx, "BGP MPLS-Based
              Ethernet VPN", RFC 7432, DOI 10.17487/RFC7432, February
              2015, <https://www.rfc-editor.org/info/rfc7432>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8214]  Boutros, S., Sajassi, A., Salam, S., Drake, J., and J.
              Rabadan, "Virtual Private Wire Service Support in Ethernet
              VPN", RFC 8214, DOI 10.17487/RFC8214, August 2017,
              <https://www.rfc-editor.org/info/rfc8214>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [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>.

   [RFC8466]  Wen, B., Fioccola, G., Ed., Xie, C., and L. Jalil, "A YANG
              Data Model for Layer 2 Virtual Private Network (L2VPN)
              Service Delivery", RFC 8466, DOI 10.17487/RFC8466, October
              2018, <https://www.rfc-editor.org/info/rfc8466>.

10.2.  Informative References

   [RFC3644]  Snir, Y., Ramberg, Y., Strassner, J., Cohen, R., and B.
              Moore, "Policy Quality of Service (QoS) Information
              Model", RFC 3644, DOI 10.17487/RFC3644, November 2003,
              <https://www.rfc-editor.org/info/rfc3644>.

Barguil, et al.            Expires May 6, 2021                 [Page 63]
Internet-Draft                    L2NM                     November 2020

   [RFC5880]  Katz, D. and D. Ward, "Bidirectional Forwarding Detection
              (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010,
              <https://www.rfc-editor.org/info/rfc5880>.

   [RFC8309]  Wu, Q., Liu, W., and A. Farrel, "Service Models
              Explained", RFC 8309, DOI 10.17487/RFC8309, January 2018,
              <https://www.rfc-editor.org/info/rfc8309>.

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

   [RFC8453]  Ceccarelli, D., Ed. and Y. Lee, Ed., "Framework for
              Abstraction and Control of TE Networks (ACTN)", RFC 8453,
              DOI 10.17487/RFC8453, August 2018,
              <https://www.rfc-editor.org/info/rfc8453>.

Authors' Addresses

   Samier Barguil (editor)
   Telefonica
   Madrid
   ES

   Email: samier.barguilgiraldo.ext@telefonica.com

   Oscar Gonzalez de Dios (editor)
   Telefonica
   Madrid
   ES

   Email: oscar.gonzalezdedios@telefonica.com

   Mohamed Boucadair
   Orange
   France

   Email: "mohamed.boucadair@orange.com

   Luis Angel Munoz
   Vodafone
   ES

   Email: luis-angel.munoz@vodafone.com

Barguil, et al.            Expires May 6, 2021                 [Page 64]
Internet-Draft                    L2NM                     November 2020

   Luay Jalil
   Verizon
   USA

   Email: luay.jalil@verizon.com

   Jichun Ma
   China Unicom
   China

   Email: majc16@chinaunicom.cn

Barguil, et al.            Expires May 6, 2021                 [Page 65]