<?xml version="1.0"?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc docName="draft-ietf-l3sm-l3vpn-service-model-08" ipr="trust200902" category="std" obsoletes="" updates="" submissionType="IETF" xml:lang="en">
  <front>
    <title abbrev="l3vpn-svc-cfg">YANG Data Model for L3VPN service delivery</title>
    <author fullname="Stephane Litkowski" initials="S" surname="Litkowski">
      <organization>Orange Business Services</organization>
      <address>
        <email>stephane.litkowski@orange.com</email>
      </address>
    </author>
	<author fullname="Rob Shakir" initials="R" surname="Shakir">
      <organization>Jive Communications</organization>
      <address>
        <email>rjs@rob.sh</email>
      </address>
    </author>
	<author fullname="Luis Tomotaki" initials="L" surname="Tomotaki">
      <organization>Verizon</organization>
      <address>
        <email>luis.tomotaki@verizon.com</email>
      </address>
    </author>
	<author fullname="Kenichi Ogaki" initials="K" surname="Ogaki">
      <organization>KDDI</organization>
      <address>
        <email>ke-oogaki@kddi.com</email>
      </address>
    </author>
	<author fullname="Kevin D'Souza" initials="K" surname="D'Souza">
      <organization>ATT</organization>
      <address>
        <email>kd6913@att.com</email>
      </address>
    </author>
    <date day="09" month="June" year="2016"/>
    <area/>
    <workgroup>L3SM Working Group</workgroup>

    <abstract>
      <t>This document defines a YANG data model that can be used to deliver a
      Layer 3 Provider Provisioned VPN service. The document is limited to the
      BGP PE-based VPNs as described in RFC4110 and RFC4364. 
	  This model is
      intended to be instantiated at management system to deliver the overall
      service. This model is not a configuration model to be used directly on
      network elements. This model provides an abstracted view of the Layer 3
      IPVPN service configuration components. It will be up to a management
      system to take this as an input and use specific configurations models
      to configure the different network elements to deliver the service. How
      configuration of network elements is done is out of scope of the
      document. 
	  </t>
    </abstract>
    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described
      in <xref target="RFC2119" pageno="false" format="default"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction" title="Introduction" toc="default">
      <t>
      This document defines a YANG data model for Layer 3 IPVPN service configuration.</t>
      <section anchor="terminology" title="Terminology" toc="default">
        <t>The following terms are defined in <xref target="RFC6241" pageno="false" format="default"/> and are not redefined
        here:<list style="symbols">
            <t>client</t>

            <t>configuration data</t>

            <t>server</t>

            <t>state data</t>
          </list></t>

        <t>The following terms are defined in <xref target="RFC6020" pageno="false" format="default"/> and are not redefined
        here:<list style="symbols">
            <t>augment</t>

            <t>data model</t>

            <t>data node</t>
          </list></t>

        <t>The terminology for describing YANG data models is found in
        <xref target="RFC6020" pageno="false" format="default"/>.</t>
      </section>
	  
      <section anchor="tree-info" title="Tree diagram" toc="default">
        <t>A simplified graphical representation of the data model is
        presented in <xref target="design" pageno="false" format="default"/>.</t>

		  
	
<t>The meaning of the symbols in these diagrams is as follows:
<list style="symbols">
  <t>Brackets "[" and "]" enclose list keys.</t>
  <t>Curly braces "{" and "}" contain names of optional features that
  make the corresponding node conditional.</t>
  <t>Abbreviations before data node names: "rw" means configuration
  (read-write), and "ro" state data (read-only).</t>
  <t>Symbols after data node names: "?" means an optional node and "*"
  denotes a "list" or "leaf-list".</t>
  <t>Parentheses enclose choice and case nodes, and case nodes are
  also marked with a colon (":").</t>
  <t>Ellipsis ("...")  stands for contents of subtrees that are not
  shown.</t>
</list></t>


      </section>
    </section>
	<section anchor="definitions" title="Definitions" toc="default">
	<t>Customer Edge (CE) Device: Equipment that is dedicated to a particular customer and is directly connected (at layer 3) to one or more PE devices via attachment circuits.  A CE is usually located at the customer premises, and is usually dedicated to a single VPN, although it may support multiple VPNs if each one has separate attachment circuits.</t>
	<t>Provider Edge (PE) Device: Equipment managed by the SP that can support multiple VPNs for different customers, and is directly connected (at layer 3) to one or more CE devices via attachment circuits.  A PE is usually located at an SP point of presence (PoP) and is managed by the SP.</t>
	<t>PE-Based VPNs: The PE devices know that certain traffic is VPN
   traffic.  They forward the traffic (through tunnels) based on the
   destination IP address of the packet, and optionally on based on
   other information in the IP header of the packet.  The PE devices are
	themselves the tunnel endpoints.  The tunnels may make use of various
   encapsulations to send traffic over the SP network (such as, but not
   restricted to, GRE, IP-in-IP, IPsec, or MPLS tunnels).</t>


	</section>
	<section anchor="service" title="Layer 3 IP VPN service model" toc="default">
	<t>
	A Layer 3 IPVPN service is a collection of sites that are authorized to exchange traffic between each other over a shared IP infrastructure.
	This layer 3 VPN service model aims at providing a common understanding on how the corresponding IP VPN service is to be deployed over the shared infrastructure.
	This service model is limited to BGP PE-Based VPNs as described in <xref target="RFC4110" pageno="false" format="default"/> and <xref target="RFC4364" pageno="false" format="default"/>.
	</t>
	</section>
    
	<section anchor="howto" title="Service data model usage" toc="default">
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
                
	     L3VPN-SVC |         
	       MODEL   |
		           |
                +------------------+         +-----+
                |   Orchestration  | &lt; --- &gt; | OSS |
                +------------------+         +-----+
                   |            |
           +----------------+	|		
           | Config manager |   |
           +----------------+   |
                   |            |
				   | Netconf/CLI ...
                   |            |
     +------------------------------------------------+
                          Network
                        
						+++++++
                        + AAA +
                        +++++++				

+++++++  Bearer ++++++++             ++++++++       +++++++
+ CEA + ------- + PE A +             + PE B + ----- + CEB +
+++++++  Cnct   ++++++++             ++++++++       +++++++

Site A                                       Site B

	</artwork>
	</figure>
	<t>
	The idea of the L3 IPVPN service model is to propose an abstracted interface to manage configuration of components of a L3VPN service.
	A typical usage is to use this model as an input for an orchestration layer who will be responsible to translate it to orchestrated configuration of network elements
	who will be part of the service. The network elements can be routers, but also servers (like AAA), and not limited to these examples. 
	The configuration of network elements MAY be done by CLI, or by NetConf/RestConf coupled with specific configuration YANG data models (BGP, VRF, BFD ...) or any other way.
	</t>
	<t>
	The usage of this service model is not limited to this example, it can be used by any component of the management system but not directly by network elements.
	</t>
	</section>
	
	

	

	<section anchor="design" title="Design of the Data Model" toc="default">
      <t>The YANG module is divided in three main containers : vpn-services, sites, site-templates.</t>
	  <t>The vpn-svc under vpn-services defines global parameters for the VPN service for a specific customer.</t>
	  <t>
	  A site is composed of at least one site-network-access and may have multiple site-network-access in case of multihoming. The site-network-access attachment is done through a bearer with a connection (transport protocol) on top.	
	The bearer refers to properties of the attachment that are below layer 3 while the connection refers to layer 3 protocol oriented properties.
	The bearer may be allocated dynamically by the service provider and the customer may provide some constraints or parameters to drive the placement.
	</t>
	<t>Authorization of traffic exchange is done through what we call a VPN policy or VPN topology defining routing exchange rules between sites.</t>
      
	  <t>The site-templates may be used as configuration templates for sites. Part of the site configuration can be inherited from templates.</t>
	  <t>The figure below describe the overall structure of the 
      YANG module:</t>

      <figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
module: ietf-l3vpn-svc
   +--rw l3vpn-svc
      +--rw vpn-services
      |  +--rw vpn-svc* [vpn-id]
      |     +--rw vpn-id                   svc-id
      |     +--rw customer-name?           string
      |     +--rw topology?                identityref
      |     +--rw cloud-accesses
      |     |  +--rw cloud-access* [cloud-identifier] {cloud-access}?
      |     |     +--rw cloud-identifier        string
      |     |     +--rw authorized-sites
      |     |     |  +--rw authorized-site* [site-id]
      |     |     |     +--rw site-id    leafref
      |     |     +--rw denied-sites
      |     |     |  +--rw denied-site* [site-id]
      |     |     |     +--rw site-id    leafref
      |     |     +--rw nat-enabled?            boolean
      |     |     +--rw customer-nat-address?   inet:ipv4-address
      |     +--rw multicast {multicast}?
      |     |  +--rw enabled?                 boolean
      |     |  +--rw customer-tree-flavors
      |     |  |  +--rw tree-flavor* [type]
      |     |  |     +--rw type    identityref
      |     |  +--rw rp
      |     |     +--rw rp-group-mappings
      |     |     |  +--rw rp-group-mapping* [id]
      |     |     |     +--rw id                  uint16
      |     |     |     +--rw provider-managed
      |     |     |     |  +--rw enabled?                    boolean
      |     |     |     |  +--rw rp-redundancy?              boolean
      |     |     |     |  +--rw optimal-traffic-delivery?   boolean
      |     |     |     +--rw rp-address?         inet:ip-address
      |     |     |     +--rw groups
      |     |     |        +--rw group* [id]
      |     |     |           +--rw id               uint16
      |     |     |           +--rw (group-format)?
      |     |     |              +--:(startend)
      |     |     |              |  +--rw group-start?     inet:ip-address
      |     |     |              |  +--rw group-end?       inet:ip-address
      |     |     |              +--:(singleaddress)
      |     |     |                 +--rw group-address?   inet:ip-address
      |     |     +--rw rp-discovery
      |     |        +--rw rp-discovery-type?   identityref
      |     |        +--rw bsr-candidates
      |     |           +--rw bsr-candidate* [address]
      |     |              +--rw address    inet:ip-address
      |     +--rw carrierscarrier?         boolean {carrierscarrier}?
      |     +--rw transport-constraints {traffic-engineering}?
      |     |  +--rw unicast-transport-constraints
      |     |  |  +--rw constraint* [constraint-id]
      |     |  |     +--rw constraint-id      svc-id
      |     |  |     +--rw site1?             svc-id
      |     |  |     +--rw site2?             svc-id
      |     |  |     +--rw constraint-list* [constraint-type]
      |     |  |        +--rw constraint-type            identityref
      |     |  |        +--rw constraint-opaque-value?   string
      |     |  +--rw multicast-transport-constraints {traffic-engineering-multicast}?
      |     |     +--rw constraint* [constraint-id]
      |     |        +--rw constraint-id      svc-id
      |     |        +--rw src-site?          svc-id
      |     |        +--rw dst-site?          svc-id
      |     |        +--rw constraint-list* [constraint-type]
      |     |           +--rw constraint-type            identityref
      |     |           +--rw constraint-opaque-value?   string
      |     +--rw extranet-vpns {extranet-vpn}?
      |        +--rw extranet-vpn* [vpn-id]
      |           +--rw vpn-id              svc-id
      |           +--rw local-sites-role?   identityref
      +--rw sites
      |  +--rw site* [site-id]
      |     +--rw site-id                  svc-id
      |     +--rw apply-template?          leafref
      |     +--rw requested-site-start?    yang:date-and-time
      |     +--rw requested-site-stop?     yang:date-and-time
      |     +--rw location
      |     |  +--rw address?        string
      |     |  +--rw zip-code?       string
      |     |  +--rw state?          string
      |     |  +--rw city?           string
      |     |  +--rw country-code?   string
      |     +--rw site-diversity {site-diversity}?
      |     |  +--rw groups
      |     |     +--rw group* [group-id]
      |     |        +--rw group-id    string
      |     +--rw management
      |     |  +--rw type?                   identityref
      |     |  +--rw management-transport?   identityref
      |     |  +--rw address?                inet:ip-address
      |     +--rw vpn-policy-list
      |     |  +--rw vpn-policy* [vpn-policy-id]
      |     |     +--rw vpn-policy-id    svc-id
      |     |     +--rw entries* [id]
      |     |        +--rw id        svc-id
      |     |        +--rw filter
      |     |        |  +--rw (lan)?
      |     |        |     +--:(lan-prefix)
      |     |        |     |  +--rw lan-prefixes
      |     |        |     |     +--rw ipv4-lan-prefixes* [lan] {ipv4}?
      |     |        |     |     |  +--rw lan    inet:ipv4-prefix
      |     |        |     |     +--rw ipv6-lan-prefixes* [lan] {ipv6}?
      |     |        |     |        +--rw lan    inet:ipv6-prefix
      |     |        |     +--:(lan-tag)
      |     |        |        +--rw lan-tag*        string
      |     |        +--rw vpn
      |     |           +--rw vpn-id       leafref
      |     |           +--rw site-role    identityref
      |     +--rw site-vpn-flavor?         identityref
      |     +--rw maximum-routes
      |     |  +--rw address-family* [af]
      |     |     +--rw af                identityref
      |     |     +--rw maximum-routes?   uint32
      |     +--rw security
      |     |  +--rw authentication
      |     |  +--rw encryption {encryption}?
      |     |     +--rw enabled?              boolean
      |     |     +--rw layer?                enumeration
      |     |     +--rw encryption-profile
      |     |        +--rw (profile)?
      |     |           +--:(provider-profile)
      |     |           |  +--rw profile-name?    string
      |     |           +--:(customer-profile)
      |     |              +--rw algorithm?       string
      |     |              +--rw (key-type)?
      |     |                 +--:(psk)
      |     |                 |  +--rw preshared-key?   string
      |     |                 +--:(pki)
      |     +--rw service
      |     |  +--rw svc-input-bandwidth?    uint32
      |     |  +--rw svc-output-bandwidth?   uint32
      |     |  +--rw svc-mtu?                uint16
      |     |  +--rw qos {qos}?
      |     |  |  +--rw qos-classification-policy
      |     |  |  |  +--rw rule* [id]
      |     |  |  |     +--rw id                   uint16
      |     |  |  |     +--rw (match-type)?
      |     |  |  |     |  +--:(match-flow)
      |     |  |  |     |  |  +--rw match-flow
      |     |  |  |     |  |     +--rw dscp?              uint8
      |     |  |  |     |  |     +--rw tos?               uint8
      |     |  |  |     |  |     +--rw dot1p?             uint8
      |     |  |  |     |  |     +--rw ipv4-src-prefix?   inet:ipv4-prefix
      |     |  |  |     |  |     +--rw ipv6-src-prefix?   inet:ipv6-prefix
      |     |  |  |     |  |     +--rw ipv4-dst-prefix?   inet:ipv4-prefix
      |     |  |  |     |  |     +--rw ipv6-dst-prefix?   inet:ipv6-prefix
      |     |  |  |     |  |     +--rw l4-src-port?       uint16
      |     |  |  |     |  |     +--rw l4-dst-port?       uint16
      |     |  |  |     |  |     +--rw protocol-field?    union
      |     |  |  |     |  +--:(match-application)
      |     |  |  |     |     +--rw match-application?   identityref
      |     |  |  |     +--rw target-class-id?     string
      |     |  |  +--rw qos-profile
      |     |  |     +--rw (qos-profile)?
      |     |  |        +--:(standard)
      |     |  |        |  +--rw profile?   string
      |     |  |        +--:(custom)
      |     |  |           +--rw classes {qos-custom}?
      |     |  |              +--rw class* [class-id]
      |     |  |                 +--rw class-id                 string
      |     |  |                 +--rw rate-limit?              uint8
      |     |  |                 +--rw priority-level?          uint8
      |     |  |                 +--rw guaranteed-bw-percent?   uint8
      |     |  +--rw carrierscarrier {carrierscarrier}?
      |     |  |  +--rw signalling-type?   enumeration
      |     |  +--rw multicast {multicast}?
      |     |     +--rw multicast-site-type?            enumeration
      |     |     +--rw multicast-transport-protocol
      |     |     |  +--rw ipv4?   boolean {ipv4}?
      |     |     |  +--rw ipv6?   boolean {ipv6}?
      |     |     +--rw protocol-type?                  enumeration
      |     +--rw traffic-protection {fast-reroute}?
      |     |  +--rw enabled?   boolean
      |     +--rw routing-protocols
      |     |  +--rw routing-protocol* [type]
      |     |     +--rw type      identityref
      |     |     +--rw ospf {rtg-ospf}?
      |     |     |  +--rw address-family*   identityref
      |     |     |  +--rw area-address?     yang:dotted-quad
      |     |     |  +--rw metric?           uint16
      |     |     |  +--rw sham-links {rtg-ospf-sham-link}?
      |     |     |     +--rw sham-link* [target-site]
      |     |     |        +--rw target-site    svc-id
      |     |     |        +--rw metric?        uint16
      |     |     +--rw bgp {rtg-bgp}?
      |     |     |  +--rw autonomous-system?   uint32
      |     |     |  +--rw address-family*      identityref
      |     |     +--rw static
      |     |     |  +--rw cascaded-lan-prefixes
      |     |     |     +--rw ipv4-lan-prefixes* [lan next-hop] {ipv4}?
      |     |     |     |  +--rw lan         inet:ipv4-prefix
      |     |     |     |  +--rw lan-tag?    string
      |     |     |     |  +--rw next-hop    inet:ipv4-address
      |     |     |     +--rw ipv6-lan-prefixes* [lan next-hop] {ipv6}?
      |     |     |        +--rw lan         inet:ipv6-prefix
      |     |     |        +--rw lan-tag?    string
      |     |     |        +--rw next-hop    inet:ipv6-address
      |     |     +--rw rip {rtg-rip}?
      |     |     |  +--rw address-family*   identityref
      |     |     +--rw vrrp {rtg-vrrp}?
      |     |        +--rw address-family*   identityref
      |     +--ro actual-site-start?       yang:date-and-time
      |     +--ro actual-site-stop?        yang:date-and-time
      |     +--rw site-network-accesses
      |        +--rw site-network-access* [site-network-access-id]
      |           +--rw site-network-access-id    svc-id
      |           +--rw apply-template?           leafref
      |           +--rw access-diversity {site-diversity}?
      |           |  +--rw groups
      |           |  |  +--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 bearer
      |           |  +--rw requested-type {requested-type}?
      |           |  |  +--rw requested-type?   string
      |           |  |  +--rw strict?           boolean
      |           |  +--rw always-on?          boolean {always-on}?
      |           |  +--rw bearer-reference?   string {bearer-reference}?
      |           +--rw ip-connection
      |           |  +--rw ipv4 {ipv4}?
      |           |  |  +--rw address-allocation-type?   identityref
      |           |  |  +--rw addresses
      |           |  |     +--rw provider-address?   inet:ipv4-address
      |           |  |     +--rw customer-address?   inet:ipv4-address
      |           |  |     +--rw mask?               uint8
      |           |  +--rw ipv6 {ipv6}?
      |           |  |  +--rw address-allocation-type?   identityref
      |           |  |  +--rw addresses
      |           |  |     +--rw provider-address?   inet:ipv6-address
      |           |  |     +--rw customer-address?   inet:ipv6-address
      |           |  |     +--rw mask?               uint8
      |           |  +--rw oam
      |           |     +--rw bfd {bfd}?
      |           |        +--rw bfd-enabled?    boolean
      |           |        +--rw (holdtime)?
      |           |           +--:(profile)
      |           |           |  +--rw profile-name?   string
      |           |           +--:(fixed)
      |           |              +--rw fixed-value?    uint32
      |           +--rw security
      |           |  +--rw authentication
      |           |  +--rw encryption {encryption}?
      |           |     +--rw enabled?              boolean
      |           |     +--rw layer?                enumeration
      |           |     +--rw encryption-profile
      |           |        +--rw (profile)?
      |           |           +--:(provider-profile)
      |           |           |  +--rw profile-name?    string
      |           |           +--:(customer-profile)
      |           |              +--rw algorithm?       string
      |           |              +--rw (key-type)?
      |           |                 +--:(psk)
      |           |                 |  +--rw preshared-key?   string
      |           |                 +--:(pki)
      |           +--rw service
      |           |  +--rw svc-input-bandwidth?    uint32
      |           |  +--rw svc-output-bandwidth?   uint32
      |           |  +--rw svc-mtu?                uint16
      |           |  +--rw qos {qos}?
      |           |  |  +--rw qos-classification-policy
      |           |  |  |  +--rw rule* [id]
      |           |  |  |     +--rw id                   uint16
      |           |  |  |     +--rw (match-type)?
      |           |  |  |     |  +--:(match-flow)
      |           |  |  |     |  |  +--rw match-flow
      |           |  |  |     |  |     +--rw dscp?              uint8
      |           |  |  |     |  |     +--rw tos?               uint8
      |           |  |  |     |  |     +--rw dot1p?             uint8
      |           |  |  |     |  |     +--rw ipv4-src-prefix?   inet:ipv4-prefix
      |           |  |  |     |  |     +--rw ipv6-src-prefix?   inet:ipv6-prefix
      |           |  |  |     |  |     +--rw ipv4-dst-prefix?   inet:ipv4-prefix
      |           |  |  |     |  |     +--rw ipv6-dst-prefix?   inet:ipv6-prefix
      |           |  |  |     |  |     +--rw l4-src-port?       uint16
      |           |  |  |     |  |     +--rw l4-dst-port?       uint16
      |           |  |  |     |  |     +--rw protocol-field?    union
      |           |  |  |     |  +--:(match-application)
      |           |  |  |     |     +--rw match-application?   identityref
      |           |  |  |     +--rw target-class-id?     string
      |           |  |  +--rw qos-profile
      |           |  |     +--rw (qos-profile)?
      |           |  |        +--:(standard)
      |           |  |        |  +--rw profile?   string
      |           |  |        +--:(custom)
      |           |  |           +--rw classes {qos-custom}?
      |           |  |              +--rw class* [class-id]
      |           |  |                 +--rw class-id                 string
      |           |  |                 +--rw rate-limit?              uint8
      |           |  |                 +--rw priority-level?          uint8
      |           |  |                 +--rw guaranteed-bw-percent?   uint8
      |           |  +--rw carrierscarrier {carrierscarrier}?
      |           |  |  +--rw signalling-type?   enumeration
      |           |  +--rw multicast {multicast}?
      |           |     +--rw multicast-site-type?            enumeration
      |           |     +--rw multicast-transport-protocol
      |           |     |  +--rw ipv4?   boolean {ipv4}?
      |           |     |  +--rw ipv6?   boolean {ipv6}?
      |           |     +--rw protocol-type?                  enumeration
      |           +--rw routing-protocols
      |           |  +--rw routing-protocol* [type]
      |           |     +--rw type      identityref
      |           |     +--rw ospf {rtg-ospf}?
      |           |     |  +--rw address-family*   identityref
      |           |     |  +--rw area-address?     yang:dotted-quad
      |           |     |  +--rw metric?           uint16
      |           |     |  +--rw sham-links {rtg-ospf-sham-link}?
      |           |     |     +--rw sham-link* [target-site]
      |           |     |        +--rw target-site    svc-id
      |           |     |        +--rw metric?        uint16
      |           |     +--rw bgp {rtg-bgp}?
      |           |     |  +--rw autonomous-system?   uint32
      |           |     |  +--rw address-family*      identityref
      |           |     +--rw static
      |           |     |  +--rw cascaded-lan-prefixes
      |           |     |     +--rw ipv4-lan-prefixes* [lan next-hop] {ipv4}?
      |           |     |     |  +--rw lan         inet:ipv4-prefix
      |           |     |     |  +--rw lan-tag?    string
      |           |     |     |  +--rw next-hop    inet:ipv4-address
      |           |     |     +--rw ipv6-lan-prefixes* [lan next-hop] {ipv6}?
      |           |     |        +--rw lan         inet:ipv6-prefix
      |           |     |        +--rw lan-tag?    string
      |           |     |        +--rw next-hop    inet:ipv6-address
      |           |     +--rw rip {rtg-rip}?
      |           |     |  +--rw address-family*   identityref
      |           |     +--rw vrrp {rtg-vrrp}?
      |           |        +--rw address-family*   identityref
      |           +--rw availability
      |           |  +--rw access-priority?   uint32
      |           +--rw vpn-attachment
      |              +--rw (attachment-flavor)
      |                 +--:(vpn-policy-id)
      |                 |  +--rw vpn-policy-id?   leafref
      |                 +--:(vpn-id)
      |                    +--rw vpn-id?          leafref
      |                    +--rw site-role        identityref
      +--rw site-templates
         +--rw site-template* [site-template-id]
            +--rw site-template-id        template-id
            +--rw requested-site-start?   yang:date-and-time
            +--rw requested-site-stop?    yang:date-and-time
            +--rw location
            |  +--rw address?        string
            |  +--rw zip-code?       string
            |  +--rw state?          string
            |  +--rw city?           string
            |  +--rw country-code?   string
            +--rw site-diversity {site-diversity}?
            |  +--rw groups
            |     +--rw group* [group-id]
            |        +--rw group-id    string
            +--rw management
            |  +--rw type?                   identityref
            |  +--rw management-transport?   identityref
            |  +--rw address?                inet:ip-address
            +--rw vpn-policy-list
            |  +--rw vpn-policy* [vpn-policy-id]
            |     +--rw vpn-policy-id    svc-id
            |     +--rw entries* [id]
            |        +--rw id        svc-id
            |        +--rw filter
            |        |  +--rw (lan)?
            |        |     +--:(lan-prefix)
            |        |     |  +--rw lan-prefixes
            |        |     |     +--rw ipv4-lan-prefixes* [lan] {ipv4}?
            |        |     |     |  +--rw lan    inet:ipv4-prefix
            |        |     |     +--rw ipv6-lan-prefixes* [lan] {ipv6}?
            |        |     |        +--rw lan    inet:ipv6-prefix
            |        |     +--:(lan-tag)
            |        |        +--rw lan-tag*        string
            |        +--rw vpn
            |           +--rw vpn-id       leafref
            |           +--rw site-role    identityref
            +--rw site-vpn-flavor?        identityref
            +--rw maximum-routes
            |  +--rw address-family* [af]
            |     +--rw af                identityref
            |     +--rw maximum-routes?   uint32
            +--rw security
            |  +--rw authentication
            |  +--rw encryption {encryption}?
            |     +--rw enabled?              boolean
            |     +--rw layer?                enumeration
            |     +--rw encryption-profile
            |        +--rw (profile)?
            |           +--:(provider-profile)
            |           |  +--rw profile-name?    string
            |           +--:(customer-profile)
            |              +--rw algorithm?       string
            |              +--rw (key-type)?
            |                 +--:(psk)
            |                 |  +--rw preshared-key?   string
            |                 +--:(pki)
            +--rw service
            |  +--rw svc-input-bandwidth?    uint32
            |  +--rw svc-output-bandwidth?   uint32
            |  +--rw svc-mtu?                uint16
            |  +--rw qos {qos}?
            |  |  +--rw qos-classification-policy
            |  |  |  +--rw rule* [id]
            |  |  |     +--rw id                   uint16
            |  |  |     +--rw (match-type)?
            |  |  |     |  +--:(match-flow)
            |  |  |     |  |  +--rw match-flow
            |  |  |     |  |     +--rw dscp?              uint8
            |  |  |     |  |     +--rw tos?               uint8
            |  |  |     |  |     +--rw dot1p?             uint8
            |  |  |     |  |     +--rw ipv4-src-prefix?   inet:ipv4-prefix
            |  |  |     |  |     +--rw ipv6-src-prefix?   inet:ipv6-prefix
            |  |  |     |  |     +--rw ipv4-dst-prefix?   inet:ipv4-prefix
            |  |  |     |  |     +--rw ipv6-dst-prefix?   inet:ipv6-prefix
            |  |  |     |  |     +--rw l4-src-port?       uint16
            |  |  |     |  |     +--rw l4-dst-port?       uint16
            |  |  |     |  |     +--rw protocol-field?    union
            |  |  |     |  +--:(match-application)
            |  |  |     |     +--rw match-application?   identityref
            |  |  |     +--rw target-class-id?     string
            |  |  +--rw qos-profile
            |  |     +--rw (qos-profile)?
            |  |        +--:(standard)
            |  |        |  +--rw profile?   string
            |  |        +--:(custom)
            |  |           +--rw classes {qos-custom}?
            |  |              +--rw class* [class-id]
            |  |                 +--rw class-id                 string
            |  |                 +--rw rate-limit?              uint8
            |  |                 +--rw priority-level?          uint8
            |  |                 +--rw guaranteed-bw-percent?   uint8
            |  +--rw carrierscarrier {carrierscarrier}?
            |  |  +--rw signalling-type?   enumeration
            |  +--rw multicast {multicast}?
            |     +--rw multicast-site-type?            enumeration
            |     +--rw multicast-transport-protocol
            |     |  +--rw ipv4?   boolean {ipv4}?
            |     |  +--rw ipv6?   boolean {ipv6}?
            |     +--rw protocol-type?                  enumeration
            +--rw traffic-protection {fast-reroute}?
            |  +--rw enabled?   boolean
            +--rw routing-protocols
            |  +--rw routing-protocol* [type]
            |     +--rw type      identityref
            |     +--rw ospf {rtg-ospf}?
            |     |  +--rw address-family*   identityref
            |     |  +--rw area-address?     yang:dotted-quad
            |     |  +--rw metric?           uint16
            |     |  +--rw sham-links {rtg-ospf-sham-link}?
            |     |     +--rw sham-link* [target-site]
            |     |        +--rw target-site    svc-id
            |     |        +--rw metric?        uint16
            |     +--rw bgp {rtg-bgp}?
            |     |  +--rw autonomous-system?   uint32
            |     |  +--rw address-family*      identityref
            |     +--rw static
            |     |  +--rw cascaded-lan-prefixes
            |     |     +--rw ipv4-lan-prefixes* [lan next-hop] {ipv4}?
            |     |     |  +--rw lan         inet:ipv4-prefix
            |     |     |  +--rw lan-tag?    string
            |     |     |  +--rw next-hop    inet:ipv4-address
            |     |     +--rw ipv6-lan-prefixes* [lan next-hop] {ipv6}?
            |     |        +--rw lan         inet:ipv6-prefix
            |     |        +--rw lan-tag?    string
            |     |        +--rw next-hop    inet:ipv6-address
            |     +--rw rip {rtg-rip}?
            |     |  +--rw address-family*   identityref
            |     +--rw vrrp {rtg-vrrp}?
            |        +--rw address-family*   identityref
            +--rw site-network-access
               +--rw access-diversity {site-diversity}?
               |  +--rw groups
               |  |  +--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 bearer
               |  +--rw requested-type {requested-type}?
               |  |  +--rw requested-type?   string
               |  |  +--rw strict?           boolean
               |  +--rw always-on?          boolean {always-on}?
               |  +--rw bearer-reference?   string {bearer-reference}?
               +--rw ip-connection
               |  +--rw ipv4 {ipv4}?
               |  |  +--rw address-allocation-type?   identityref
               |  |  +--rw addresses
               |  |     +--rw provider-address?   inet:ipv4-address
               |  |     +--rw customer-address?   inet:ipv4-address
               |  |     +--rw mask?               uint8
               |  +--rw ipv6 {ipv6}?
               |  |  +--rw address-allocation-type?   identityref
               |  |  +--rw addresses
               |  |     +--rw provider-address?   inet:ipv6-address
               |  |     +--rw customer-address?   inet:ipv6-address
               |  |     +--rw mask?               uint8
               |  +--rw oam
               |     +--rw bfd {bfd}?
               |        +--rw bfd-enabled?    boolean
               |        +--rw (holdtime)?
               |           +--:(profile)
               |           |  +--rw profile-name?   string
               |           +--:(fixed)
               |              +--rw fixed-value?    uint32
               +--rw security
               |  +--rw authentication
               |  +--rw encryption {encryption}?
               |     +--rw enabled?              boolean
               |     +--rw layer?                enumeration
               |     +--rw encryption-profile
               |        +--rw (profile)?
               |           +--:(provider-profile)
               |           |  +--rw profile-name?    string
               |           +--:(customer-profile)
               |              +--rw algorithm?       string
               |              +--rw (key-type)?
               |                 +--:(psk)
               |                 |  +--rw preshared-key?   string
               |                 +--:(pki)
               +--rw service
               |  +--rw svc-input-bandwidth?    uint32
               |  +--rw svc-output-bandwidth?   uint32
               |  +--rw svc-mtu?                uint16
               |  +--rw qos {qos}?
               |  |  +--rw qos-classification-policy
               |  |  |  +--rw rule* [id]
               |  |  |     +--rw id                   uint16
               |  |  |     +--rw (match-type)?
               |  |  |     |  +--:(match-flow)
               |  |  |     |  |  +--rw match-flow
               |  |  |     |  |     +--rw dscp?              uint8
               |  |  |     |  |     +--rw tos?               uint8
               |  |  |     |  |     +--rw dot1p?             uint8
               |  |  |     |  |     +--rw ipv4-src-prefix?   inet:ipv4-prefix
               |  |  |     |  |     +--rw ipv6-src-prefix?   inet:ipv6-prefix
               |  |  |     |  |     +--rw ipv4-dst-prefix?   inet:ipv4-prefix
               |  |  |     |  |     +--rw ipv6-dst-prefix?   inet:ipv6-prefix
               |  |  |     |  |     +--rw l4-src-port?       uint16
               |  |  |     |  |     +--rw l4-dst-port?       uint16
               |  |  |     |  |     +--rw protocol-field?    union
               |  |  |     |  +--:(match-application)
               |  |  |     |     +--rw match-application?   identityref
               |  |  |     +--rw target-class-id?     string
               |  |  +--rw qos-profile
               |  |     +--rw (qos-profile)?
               |  |        +--:(standard)
               |  |        |  +--rw profile?   string
               |  |        +--:(custom)
               |  |           +--rw classes {qos-custom}?
               |  |              +--rw class* [class-id]
               |  |                 +--rw class-id                 string
               |  |                 +--rw rate-limit?              uint8
               |  |                 +--rw priority-level?          uint8
               |  |                 +--rw guaranteed-bw-percent?   uint8
               |  +--rw carrierscarrier {carrierscarrier}?
               |  |  +--rw signalling-type?   enumeration
               |  +--rw multicast {multicast}?
               |     +--rw multicast-site-type?            enumeration
               |     +--rw multicast-transport-protocol
               |     |  +--rw ipv4?   boolean {ipv4}?
               |     |  +--rw ipv6?   boolean {ipv6}?
               |     +--rw protocol-type?                  enumeration
               +--rw routing-protocols
               |  +--rw routing-protocol* [type]
               |     +--rw type      identityref
               |     +--rw ospf {rtg-ospf}?
               |     |  +--rw address-family*   identityref
               |     |  +--rw area-address?     yang:dotted-quad
               |     |  +--rw metric?           uint16
               |     |  +--rw sham-links {rtg-ospf-sham-link}?
               |     |     +--rw sham-link* [target-site]
               |     |        +--rw target-site    svc-id
               |     |        +--rw metric?        uint16
               |     +--rw bgp {rtg-bgp}?
               |     |  +--rw autonomous-system?   uint32
               |     |  +--rw address-family*      identityref
               |     +--rw static
               |     |  +--rw cascaded-lan-prefixes
               |     |     +--rw ipv4-lan-prefixes* [lan next-hop] {ipv4}?
               |     |     |  +--rw lan         inet:ipv4-prefix
               |     |     |  +--rw lan-tag?    string
               |     |     |  +--rw next-hop    inet:ipv4-address
               |     |     +--rw ipv6-lan-prefixes* [lan next-hop] {ipv6}?
               |     |        +--rw lan         inet:ipv6-prefix
               |     |        +--rw lan-tag?    string
               |     |        +--rw next-hop    inet:ipv6-address
               |     +--rw rip {rtg-rip}?
               |     |  +--rw address-family*   identityref
               |     +--rw vrrp {rtg-vrrp}?
               |        +--rw address-family*   identityref
               +--rw availability
               |  +--rw access-priority?   uint32
               +--rw vpn-attachment
                  +--rw (attachment-flavor)
                     +--:(vpn-policy-id)
                     |  +--rw vpn-policy-id?   leafref
                     +--:(vpn-id)
                        +--rw vpn-id?          leafref
                        +--rw site-role        identityref
</artwork>

      </figure>

      <section anchor="yang-vpn-global" title="VPN service overview" toc="default">
	    <t>
		The vpn-svc container contains generic information about the VPN service.
		The vpn-id of the vpn-svc refers to an internal reference for this VPN service,
		while customer name refers to a more explicit reference to the customer.
		This identifier is purely internal to the organization responsible for the VPN service.
		The vpn-id MUST be unique.
		</t>
		<section anchor="yang-vpn-global-topology" title="VPN service topology" toc="default">
		<t>The type of topology of the VPN is required for configuration. Current proposal supports : any-to-any, hub and spoke (where hubs can exchange traffic), and hub and spoke disjoint (where hubs cannot exchange traffic).
		New topologies could be added by augmentation. By default, any-to-any topology is used.
		</t>
			<section anchor="yang-vpn-global-topology-rt-allocation" title="Route Target allocation" toc="default">
			<t>
			Layer 3 PE-based VPN is built using route-targets as described in <xref target="RFC4364" pageno="false" format="default"/>.
			It is expected management system to allocate automatically set of route-targets upon a VPN service creation request.
			How management system allocates route-targets is out of scope of the document but multiple ways could be envisaged as described below. 
			</t>
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
                                 Management system
                  &lt;-------------------------------------------------&gt;
                                              Request RT			
                   +-----------------------+  Topo a2a   +----------+
        RestConf   |                       |  -----&gt;     |          |
User ------------- | Service Orchestration |             |NetworkOSS|
        l3vpn-svc  |                       |  &lt;-----     |          |
          model    +-----------------------+   Response  +----------+
		                                       RT1,RT2
			</artwork>
			<postamble>
			In the example above, a service orchestration, owning the instantiation of this service model,  
			request route-targets to the network OSS. Based on the requested VPN topology, the network OSS replies
			with one or multiple route-targets. The interface between this service orchestration and network OSS is out of scope of this document.
			</postamble>
			</figure>
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
		
                   +---------------------------+ 
        RestConf   |                           |
User ------------- |   Service Orchestration   |
        l3vpn-svc  |                           |
		 model     |                           |
                   |  RT pool : 10:1-&gt;10:10000 |
                   |  RT pool : 20:50-&gt;20:5000 |
                   +---------------------------+
		                                    
			</artwork>
			<postamble>
			In the example above, a service orchestration, owning the instantiation of this service model,  
			owns one or more pools of route-target (filled by service provider) that can be allocated. Based on the requested VPN topology, it will allocate one or multiple route-targets from
			the pool.
			</postamble>
			</figure>
			<t>
			The mechanism displayed above are just examples and SHOULD NOT be considered as exhaustive list of solutions.
			</t>
			</section>
			<section anchor="yang-vpn-global-topology-a2a" title="Any to any" toc="default">
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
+------------------------------------------------------------+
|  VPN1_Site1 ------ PE1               PE2 ------ VPN1_Site2 |
|                                                            |
|  VPN1_Site3 ------ PE3               PE4 ------ VPN1_Site4 |
+------------------------------------------------------------+

            Figure - Any to any VPN topology
			</artwork>
			</figure>
			<t>
			In the any to any topology, all VPN sites can discuss between each other without any restriction. 
			It is expected that the management system that owns a any to any IPVPN service request through this model, 
			needs to assign and then configure the VRF and route-targets on the appropriate PEs.
			In case of any to any, in general a single route-target is required and every VRF imports and exports this route-target.
			</t>
			</section>
			<section anchor="yang-vpn-global-topology-hs" title="Hub and Spoke" toc="default">
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
+-------------------------------------------------------------+
|   Hub_Site1 ------ PE1               PE2 ------ Spoke_Site1 |
|                          +----------------------------------+   
|                          |                           
|                          +----------------------------------+                  
|   Hub_Site2 ------ PE3               PE4 ------ Spoke_Site2 |
+-------------------------------------------------------------+

            Figure - Hub and Spoke VPN topology
			</artwork>
			</figure>
			<t>
			In the hub and spoke topology, all spoke sites can discuss only with Hub sites but not between each other. Hubs can discuss also between each other.
			It is expected that the management system that owns a any to any IPVPN service request through this model, 
			needs to assign and then configure the VRF and route-targets on the appropriate PEs.
			In case of hub and spoke, in general a two route-targets are required (one route-target for Hub routes, one route-target for spoke routes). 
			A Hub VRF, connecting Hub sites, will export Hub routes with Hub route-target, and will import Spoke routes through Spoke route-target. 
			It will also import the Hub route-target to allow Hub to Hub communication.
			A Spoke VRF, connecting Spoke sites, will export Spoke routes with Spoke route-target, and will import Hub routes through Hub route-target.
			</t>
			<t>
			The management system MUST take into account Hub and Spoke connections constraints. For example, if management system decides to mesh a spoke site and a hub site on the same PE, it needs to mesh connections in different VRFs as displayed in the figure below.
			</t>
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
			
   Hub_Site ------- (VRF_Hub)  PE1
                              (VRF_Spoke)
                                /  |
Spoke_Site1 -------------------+   |
                                   |
Spoke_Site2 -----------------------+
			</artwork>
			</figure>
			</section>
			
			<section anchor="yang-vpn-global-topology-hsd" title="Hub and Spoke disjoint" toc="default">
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
+-------------------------------------------------------------+
|   Hub_Site1 ------ PE1               PE2 ------ Spoke_Site1 |
+--------------------------+  +-------------------------------+   
                           |  |
+--------------------------+  +-------------------------------+                  
|   Hub_Site2 ------ PE3               PE4 ------ Spoke_Site2 |
+-------------------------------------------------------------+

          Figure - Hub and Spoke disjoint VPN topology
			</artwork>
			</figure>
			<t>
			In the hub and spoke disjoint topology, all spoke sites can discuss only with Hub sites but not between each other. Hubs cannot discuss between each other.
			It is expected that the management system that owns a any to any IPVPN service request through this model, 
			needs to assign and then configure the VRF and route-targets on the appropriate PEs.
			In case of hub and spoke, in general a two route-targets are required (one route-target for Hub routes, one route-target for spoke routes). 
			A Hub VRF, connecting Hub sites, will export Hub routes with Hub route-target, and will import Spoke routes through Spoke route-target. 
			A Spoke VRF, connecting Spoke sites, will export Spoke routes with Spoke route-target, and will import Hub routes through Hub route-target.
			</t>
			<t>
			The management system MUST take into account Hub and Spoke connections constraints as in the previous case.
			</t>
			<t>
			Hub and spoke disjoint can also be seen as two hub and spoke VPNs sharing with a common set of spoke sites.</t>
			
			</section>
			
		</section>
		<section anchor="yang-vpn-global-cloud-access" title="Cloud access" toc="default">
		<t>
		The proposed model provides cloud access configuration through the cloud-access container. The usage of cloud-access is targeted for public cloud.
		Internet access can also be considered as a public cloud access service. The cloud-access container provides parameters for network address translation
		and authorization rules. 
		</t>
		<t>
		Private cloud access may be addressed through NNIs as described in <xref target="interas" pageno="false" format="default"/>.
		</t>
		<t>
		A cloud identifier is used to reference the target service. This identifier is local to each administration.
		</t>
		<t>
		If NAT is required to access to the cloud, the nat-enabled leaf MUST be set to true. A NAT address may be provided in customer-nat-address, in case the customer is
		providing the public IP address for the cloud access. If service provider is providing the NAT address, customer-nat-address is not necessary as it can be picked 
		from a service provider pool.
		</t>
		<t>
		By default, all sites in the IPVPN MUST be authorized to access to the cloud. In case restrictions are required, a user MAY configure the authorized-sites and denied-sites list.
		The authorization-sites defines the list of sites authorized for cloud access. The denied-sites defines the list of sites denied for cloud access.
		The model supports both "deny all except" and "accept all except" authorization.
		</t>
		<t>The "deny all except" behavior is obtained by filling only the authorized-sites. All the sites listed will be authorized, all others will be denied.</t>
		<t>The "accept all except" behavior is obtained by filling only the denied-sites. All the sites listed will be denied, all others will be authorized.</t>
		<t>Defining both denied-sites and authorized-sites MUST be processed as "deny all except", so the denied-sites will have not effect.</t>
		<t>
		How the restrictions will be configured on network elements is out of scope of this document and will be specific to each deployment.
		</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">

                  IPVPN
    ++++++++++++++++++++++++++++++++     +++++++++++
	+             Site 3           + --- +  Cloud1 +
	+ Site 1                       +     +++++++++++
	+                              + 
	+ Site 2                       + --- ++++++++++++
	+                              +     + Internet +
	+            Site 4            +     ++++++++++++
	++++++++++++++++++++++++++++++++
                 |
		     ++++++++++
			 + Cloud2 +
			 ++++++++++

		</artwork>
		</figure>
		<t>
		In the example above, we may configure the global VPN to access Internet by creating a cloud-access pointing to the cloud identifier for Internet service.
		No authorized-sites will be configured as all sites are required to access to Internet. NAT-enabled will be set to true and a nat-address will be configured.
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;vpn-svc&gt;
	&lt;vpn-id&gt;ZKITYHJ054687&lt;/vpn-id&gt;
	&lt;customer-name&gt;CUSTOMER_1&lt;/customer-name&gt;
	&lt;topology&gt;any-to-any&lt;/topology&gt;
	&lt;cloud-accesses&gt;
	 &lt;cloud-access&gt;
		&lt;cloud-identifier&gt;51&lt;/cloud-identifier&gt;
		&lt;nat-enabled&gt;true&lt;/nat-enabled&gt;
	 &lt;/cloud-access&gt;
    &lt;/cloud-accesses&gt;
&lt;/vpn-svc&gt;
		</artwork>
		</figure>
		</t>
		<t>
		If Site1 and Site2 requires access to Cloud1, a new cloud-access will be created pointing to the cloud identifier of Cloud1. Authorized sites will be filled with
		reference to Site1 and Site2.
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;vpn-svc&gt;
	&lt;vpn-id&gt;12456487&lt;/vpn-id&gt;
	&lt;customer-name&gt;CUSTOMER_1&lt;/customer-name&gt;
	&lt;topology&gt;any-to-any&lt;/topology&gt;
	&lt;cloud-accesses&gt;
	 &lt;cloud-access&gt;
		&lt;cloud-identifier&gt;1111111&lt;/cloud-identifier&gt;
		&lt;authorized-sites&gt;
		 &lt;authorized-site&gt;
			&lt;site-id&gt;site1&lt;/site-id&gt;
			&lt;site-id&gt;site2&lt;/site-id&gt;
		 &lt;authorized-site&gt;
		&lt;/authorized-sites&gt;
	 &lt;cloud-access&gt;
	&lt;/cloud-accesses&gt;
&lt;/vpn-svc&gt;
		</artwork>
		</figure>
		</t>
		<t>
		If all sites except Site1 requires access to Cloud2, a new cloud-access will be created pointing to the cloud identifier of Cloud2.  denied-sites will be filled with
		reference to Site1.
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;vpn-svc&gt;
	&lt;vpn-id&gt;12456487&lt;/vpn-id&gt;
	&lt;customer-name&gt;CUSTOMER_1&lt;/customer-name&gt;
	&lt;topology&gt;any-to-any&lt;/topology&gt;
	&lt;cloud-accesses&gt;
	 &lt;cloud-access&gt;
		&lt;cloud-identifier&gt;22222222&lt;/cloud-identifier&gt;
		&lt;denied-sites&gt;
		 &lt;denied-site&gt;
			&lt;site-id&gt;site1&lt;/site-id&gt;
		 &lt;/denied-site&gt;
		&lt;/denied-sites&gt;
	 &lt;/cloud-access&gt;
	&lt;/cloud-accesses&gt;
&lt;/vpn-svc&gt;
		</artwork>
		</figure>
		</t>
		</section>
		<section anchor="yang-vpn-global-mcast" title="Multicast service" toc="default">
		<t>Multicast in IP VPN is described in <xref target="RFC6513" pageno="false" format="default"/>.</t>
		<t>If IPVPN supports multicast service, it is expected to provide inputs on global multicast parameters.</t>
		<t>The user of this model will need to fill the flavor of trees that will be used by customer within the IPVPN (Customer tree).
		The proposed model supports ASM, SSM and BiDirectional trees (and can be augmented). Multiple flavors of tree can be supported simultaneously.
		</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
                       (SSM tree)
 Recv (IGMPv3) -- Site2 ------- PE2
                                           PE1 --- Site1 --- Source1
												         \
                                                          -- Source2
												 
						(ASM tree)
 Recv (IGMPv2) -- Site3 ------- PE3
 
                        (SSM tree)
 Recv (IGMPv3) -- Site4 ------- PE4
                                /
 Recv (IGMPv2) -- Site5 --------
                        (ASM tree)

		</artwork>
		</figure>
		
		<t>
		In case of ASM flavor requested, this model requires to fill the rp and rp-discovery parameters. 
		Multiple RP to group mappings can be created using the rp-group-mappings container. For each mapping, the RP service can be managed by the service provider using the leaf provider-managed/enabled set to true.
		In case of provider managed RP, user can request for rendez-vous point redundancy and/or optimal traffic delivery. Those parameters will help the service provider to select the appropriate technology to fulfill the 
		customer service requirement : for instance, in case of request of optimal traffic delivery, service provider may decide to use Anycast-RP or RP-tree to SPT switchover. 
		</t>
		<t>
		In case of customer managed RP, the RP address must be filled in the RP to group mappings using the "rp-address" leaf. This leaf is not needed for provider managed RP.
		</t>
		<t>
		User can define a specific rp-discovery mechanism like : auto-rp, static-rp, bsr-rp modes. By default, model considers static-rp if ASM is requested. A single rp-discovery mechanism is allowed for the VPN.
		"rp-discovery" can be used for provider and customer managed RPs. In case of provider managed RP, if the user wants to use bsr-rp as discovery protocol, service provider will consider the provider managed rp-group-mappings for bsr-rp. 
		The service provider will so configure its selected RPs to be bsr-rp-candidates. 
		In case of customer managed RP and bsr-rp discovery mechanism, the rp-address provided will be considered as bsr-rp candidate.
		</t>
		</section>
		<section anchor="yang-vpn-global-extranet" title="Extranet VPNs" toc="default">
		<t>
		There are some cases where a particular VPN needs to access to resources that are external.
		The resources may be located in another VPN.
		</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
         
		    +-----------+              +-----------+
           /             \            /             \
SiteA --  |   VPN A       |   ---    |    VPN B      | --- SiteB
           \             /            \             / (Shared 
            +-----------+		       +-----------+   resources)
		
		</artwork>
		</figure>
		<t>
		In the figure above, VPN B has some resources on Site B that need to be available to some customers/partners.
		VPN A must be able to access those VPN B resources.
		</t>
		<t>
		Such VPN connection scenario can be achieved by the VPN policy defined in <xref target="site-vpn-policy" pageno="false" format="default"/>.
		But there are some simple cases, where a particular VPN (VPN A) needs to access to all resources in a VPN B.
		The model provides an easy way to setup this connection using the extranet-vpns container.
		</t>
		<t>
		The extranet-vpns container defines a list of VPNs, a particular VPN wants to access. 
		The extranet-vpns must be used on "customer" VPNs accessing extranet resources in another VPN.
		In the figure above, in order to give access for VPN A to VPN B, extranet-vpns container will be configured under VPN A with an entry
		corresponding to VPN B and there is no service configuration requirement on VPN B.
		</t>
		<t>
		Readers should note that even if there is no configuration requirement on VPN B, if VPN A lists VPN B as extranet, all sites in VPN B will gain access to all sites in VPN A.
		</t>
		<t>
		The site-role leaf defines the role of the local VPN sites in the target extranet VPN topology. Site roles are defined in <xref target="site-role" pageno="false" format="default"/>.
		Based on this, the requirements described in <xref target="site-role" pageno="false" format="default"/> regarding the site-role leaf are also applicable here.
		</t>
		<t>
		In the example below, VPN A accesses to VPN B resources through extranet connection, a spoke role is required for VPN A sites, so sites from VPN A 
		must not be able to communicate between each other through the extranet VPN connection.
		</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;vpn-svc&gt;
	&lt;vpn-id&gt;VPNB&lt;/vpn-id&gt;
	&lt;topology&gt;hub-spoke&lt;/topology&gt;
&lt;/vpn-svc&gt;
&lt;vpn-svc&gt;
	&lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;topology&gt;any-to-any&lt;/topology&gt;
	&lt;extranet-vpns&gt;
		&lt;extranet-vpn&gt;
			&lt;vpn-id&gt;VPNB&lt;/vpn-id&gt;
			&lt;site-role&gt;spoke-role&lt;/site-role&gt;
		&lt;/extranet-vpn&gt;
    &lt;/extranet-vpns&gt;
&lt;/vpn-svc&gt;
		</artwork>
		</figure>
		
		<t>
		This model does not define how the extranet configuration will be achieved.
		</t>
		<t>
		Any more complex VPN connection topology (e.g. only part of sites of VPN A accessing only part of sites of VPN B) needs to be achieved using the
		vpn attachment defined in <xref target="site-vpn-attachment" pageno="false" format="default"/>.
		</t>
		</section>
	  </section>

	  <section anchor="yang-site" title="Site overview" toc="default">
		<t>
		A site represents a connection of a customer location to one or more VPN services.
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
		                                          
                                                 +-------------+
                                                /               \
  +------------------+                   +-----|      VPN1       |
  |                  |                   |      \               /
  |  New York Office | ----- (site) -----+       +-------------+
  |                  |                   |       +-------------+
  +------------------+                   |      /               \
                                         +-----|      VPN2       |
                                                \               /
                                                 +-------------+
		</artwork>
		</figure>
		</t>
	    <t>
		A site is composed of some characteristics :
		<list style="symbols">
		<t>Unique identifier (site-id) : to uniquely identify the site within the overall network infrastructure. The identifier is a string allowing to any encoding for the local administration of the VPN service.</t>
		<t>Location (location) : site location informations to allow easy retrieval on nearest available resources.</t>
		<t>Management (management) : defines the model of management of the site, for example : co-managed, customer managed or provider managed.</t>
		<t>Site network accesses (site-network-accesses) : defines the list of network accesses associated to the sites and their properties : especially bearer, connection and service parameters.</t>
		</list>
		</t>
		<t>
		A site-network-access represents an IP logical connection of a site. A site may have multiple site-network-accesses. 
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
		                                                                                  
  +------------------+             Site
  |                  |-----------------------------------
  |                  |****** (site-network-access#1) ******
  |  New York Office |
  |                  |****** (site-network-access#2) ******
  |                  |-----------------------------------
  +------------------+    

		</artwork>
		</figure>
		Multiple site-network-accesses are used for instance in case of multihoming. Some other topology cases may also involve multiple site-network-accesses.
		</t>
		<t>
		The site configuration is viewed as a global entity, we assume that it is mostly the role of the management to split the parameters between the different elements within the network.
		For example, in the case of the site-network-access configuration, the management system needs to split the overall parameters between PE configuration and CE configuration.
		</t>
		
		<section anchor="site-attachment" title="Site network accesses" toc="default">
		<t>
		As mentioned, a site may be multihomed. Each IP network access for a site is defined in the site-network-accesses list.
		
		The site-network-access defines how the site is connected on the network and is splitted in three main classes of parameters :
		<list style="symbols">
		<t>bearer : defines requirements of the attachment (below Layer 3).</t>
		<t>connection : defines Layer 3 protocol parameters of the attachment.</t>
		<t>availability : defines the site availability policy. Availability is defined in <xref target="site-availability" pageno="false" format="default"/></t>
		</list>
		</t>
		<t>
			Some parameters from the site can be configured also at the site-network-access level like : routing, services, security ... Defining parameters only at site level will provide inheritance.
			If a parameter is configured at both site and access level, the access level parameter MUST override the site level parameter. Those parameters will be described later in the document.
		</t>
			<section anchor="site-attachment-bearer" title="Bearer" toc="default">
			<t>Bearer defines the requirements for the site attachment to the provider network that are below Layer 3.</t>
			<t>The bearer parameters will help to decide the access media to be used. This is further described in <xref target="site-location-prov-type" pageno="false" format="default"/>.</t>
			</section>
			<section anchor="site-attachment-conn" title="Connection" toc="default">
			<t>The connection defines the protocol parameters of the attachment (IPv4 and IPv6).
			Depending of the management mode, it refers to the PE-CE addressing or CE to customer LAN addressing. In any case, it describes the provider to customer responsibility boundary.
				For a customer managed site, it refers to the PE-CE connection. For a provider managed site, it refers to the CE to LAN connection.</t>
				<section anchor="site-attachment-conn-addressing" title="IP addressing" toc="default">
				<t>IP subnet can be configured for either transport protocols. For a dual stack connection, two subnets will be provided, one for each
				transport layer.</t>
				<t>The address-allocation-type will help in defining how the address allocation MUST be done.
				The current model proposes three ways of IP address allocation :
				<list style="symbols">
				<t>provider-dhcp : the provider will provide DHCP service for customer equipments, this is applicable to both IPv4 and IPv6 addressing.</t>
				<t>static-address : Addresses will be assigned manually on both sides, this is applicable to both IPv4 and IPv6 addressing.</t>
				<t>slaac : enables stateless address autoconfiguration (<xref target="RFC4862" pageno="false" format="default"/>). This is applicable only for IPv6.</t>
				</list>
				In the dynamic addressing mechanism, it is expected from service provider to provide at least the IP address, mask and default gateway information.
				</t>
				</section>
				<section anchor="site-attachment-conn-oam" title="OAM" toc="default">
				<t>
				A customer may require a specific IP connectivity fault detection mechanism on the IP connection.
				The model supports BFD as mechanism proposed to the customer. This can be extended with other mechanisms by augmentation.
				The provider can propose some profiles to the customer depending of the service level the customer wants to achieve. Profile names must be communicated to the customer. This communication is out of scope of this document.
				Some fixed values for the holdtime period may also be imposed by the customer if the provider enables it.
				</t>
				</section>
			</section>
			<section anchor="site-inheritance" title="Inheritance of parameters between site and site-network-access" toc="default">
			<t>
			Some parameters are available both at site level and site-network-access level. Defining a parameter at site level will provide inheritance to all site-network-accesses under the site.
			If a site-network-access has a parameter configured that is already defined at site level, the site-network-access parameter value will replace the site parameter value.
			</t>
			</section>
		</section>
		
	  </section>
	  
		<section anchor="site-role" title="Site role" toc="default">
		<t>
		A VPN has a particular topology as described in <xref target="yang-vpn-global-topology" pageno="false" format="default"/>.
		As a consequence, each site belonging to a VPN as a particular role in this topology.
		The site-role defines the role of the site in a particular VPN topology.
		</t>
		<t>
		In the any-to-any topology, all sites MUST have the same role which is any-to-any-role.
		</t>
		<t>
		In the hub-spoke or hub-spoke-disjoint topology, sites MUST have a hub-role or a spoke-role.
		</t>
		</section>
		
		<section anchor="site-multiple-vpns" title="Site belonging to multiple VPNs" toc="default">
		
			<section anchor="site-vpn-flavor" title="Site vpn flavor" toc="default">
			<t>
			A site may be part of one or multiple VPNs. The site flavor defines the way the VPN multiplexing is done.
			The current version of the model only supports two flavors :
			<list style="symbols">
				<t>site-vpn-flavor-single : the site belongs to only one VPN.</t>
				<t>site-vpn-flavor-multi : the site belongs to multiple VPNs and all the logical accesses of the sites belongs to the same set of VPNs.</t>
				<t>site-vpn-flavor-sub : the site belongs to multiple VPNs with multiple logical accesses. Each logical access may map to different VPNs (one or many).</t>
			</list>
			</t>
				<section anchor="site-vpn-flavor-single" title="Single VPN attachment : site-vpn-flavor-single" toc="default">
				<t>
				The figure below describes the single VPN attachment. The site connects to only one VPN.
				</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
		                                           +--------+                                       
+------------------+             Site             /          \
|                  |-----------------------------|            |
|                  |***(site-network-access#1)***|    VPN1    |
|  New York Office |                             |            |
|                  |***(site-network-access#2)***|            |
|                  |-----------------------------|            |
+------------------+                              \          /
                                                   +--------+

		</artwork>
		</figure>
				</section>
				<section anchor="site-vpn-flavor-multi" title="Multi VPN attachment : site-vpn-flavor-multi" toc="default">
				<t>
				The figure below describes the multi VPN attachment. The site connects to multiple VPNs.
				</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">                                    
                                                        +---------+
		                                           +---/----+      \                                        
+------------------+             Site             /   |      \      |
|                  |--------------------------------- |       |VPNB |
|                  |***(site-network-access#1)******* |       |     |
|  New York Office |                             |    |       |     |
|                  |***(site-network-access#2)*******  \      |    /
|                  |-----------------------------| VPNA +-----|---+
+------------------+                              \          /
                                                   +--------+

		</artwork>
		</figure>
				<t>
				In the example above, the New York office is multihomed, both logical accesses are using the same VPN attachment rules.
				Both logical accesses are so connected to VPNA and VPNB.
				</t>
				<t>
				Reaching VPN A or VPN B from New York office will be based on destination based routing. Having the same destination reachable from the two VPNs may cause 
				routing troubles. This would be the role of the customer administration to ensure the appropriate mapping of its prefixes in each VPN.
				</t>
				</section>
				<section anchor="site-vpn-flavor-sub-single" title="Sub VPN attachment : site-vpn-flavor-sub" toc="default">
				<t>
				The figure below describes a sub VPN attachment. The site connects to multiple VPNs but each logical access is
				attached to a particular set of VPN. Typical use case of subVPN is a customer site used by multiple affiliates with 
				private resources for each affiliates that cannot be shared (communication is prevented between the affiliates).
				It is similar than having separate sites instead that the customer wants to share some physical components while keeping
				strong isolation.
				
				In the example, the access#1 is attached to VPNB while the access#2 is attached to VPNA.
				</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">                                    

+------------------+         Site                      +--------+
|                  |----------------------------------/          \
|                  |****(site-network-access#1)******|    VPNB    |
|  New York Office |                                  \          /
|                  |                                   +--------+
|                  |                                   +--------+
|                  |                                  /          \
|                  |****(site-network-access#2)******|    VPNA    |   
|                  |                                  \          /
|                  |                                   +--------+  
|                  |-----------------------------------
+------------------+            
		</artwork>
		</figure>
				<t>
				Multi-VPN can be implemented in addition to subVPN, as a consequence, each site-network-access can access to multiple VPNs. In the example below,
				access#1 is mapped to VPNB and VPNC, while access#2 is mapped to VPNA and VPND.
				</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">                                    


+------------------+         Site                      +-----+   
|                  |----------------------------------/      +----+
|                  |****(site-network-access#1)******| VPNB /       \
|  New York Office |                                  \     | VPN C  |
|                  |                                   +----\       /
|                  |                                         +-----+
|                  |
|                  |                                   +------+
|                  |                                  /       +-----+
|                  |****(site-network-access#2)******|  VPNA /       \ 
|                  |                                  \      | VPN D |
|                  |                                   +------\     /
|                  |-----------------------------------        +---+
+------------------+            
		</artwork>
		</figure>				
				
				<t>
				Multihoming is also possible with subVPN, in this case, site-network-accesses are grouped, and a particular group will access to the same set of VPN.
				In the example below, access#1 and #2 are part of the same group (multihomed together) and will be mapped to VPN B and C, in addition
				access#3 and #4 are part of the same group (multihomed together) and will be mapped to VPN A and D.				
				</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">                                    


+------------------+         Site                      +-----+   
|                  |----------------------------------/      +----+
|                  |****(site-network-access#1)******| VPNB /       \
|  New York Office |****(site-network-access#2)******\     | VPN C  |
|                  |                                   +----\       /
|                  |                                         +-----+
|                  |
|                  |                                   +------+
|                  |                                  /       +-----+
|                  |****(site-network-access#3)******|  VPNA /       \ 
|                  |****(site-network-access#4)****** \      | VPN D |
|                  |                                   +------\     /
|                  |-----------------------------------        +---+
+------------------+            
		</artwork>
		</figure>
				</section>
			</section>
		
			<section anchor="site-vpn-attachment" title="Attaching a site to a VPN" toc="default">
			<t>
			Due to the multiple site vpn flavors, the attachment is done at the site-network-access (logical access) level through the vpn-attachment container.
			The vpn-attachment container is mandatory.
			The model provides two ways of attachment :
				<list style="symbols">
					<t>Referencing directly the target VPN.</t>
					<t>Reference a VPN policy for more complex attachments.</t>
				</list>
			A choice is implemented to allow user to choose the best fitting flavor.
			</t>
				<section anchor="site-vpn-attachment-vpnid" title="Reference a VPN" toc="default">
				<t>
				Referencing a vpn-id provides an easy way to attach a particular logical access to a VPN. This is the best way in case of single VPN attachment or
				subVPN with single VPN attachment per logical access.
				When referencing a vpn-id, the site-role must be added to express the role of the site in the target VPN topology.
				</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;SITE1&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;LA1&lt;/site-network-access-id&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
  &lt;site-network-access-id&gt;LA2&lt;/site-network-access-id&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNB&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
				</artwork>
				</figure>
				<t>
				The example above describes a subVPN case where a site SITE1 has two logical accesses (LA1 and LA2) with LA1 attached to VPNA and LA2 attached to VPNB.
				</t>
				</section>
				<section anchor="site-vpn-policy" title="VPN policy" toc="default">
				<t>The vpn-policy helps to express a multiVPN scenario where a logical access belongs to multiple VPNs.
				Multiple VPN policy can be created to handle the subVPN case where each logical access is part of a different set of VPNs.</t>
				<t>
				As a site can belong to multiple VPNs, the vpn-policy may be composed of multiple entries. A filter can be applied to specify that only some LANs of the site should be part of a particular VPN.
				Each time a site (or LAN) is attached to a VPN, we must precise its role (site-role) within the targeted VPN topology. 
				</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
+--------------------------------------------------------------+
|  VPN2_Site3 ------ PE7                                       |
+-------------------------+                                    |   
                          |                                    |
+-------------------------+                                    |
|  VPN2_Site1 ------ PE3               PE4 ------ VPN2_Site2   |
+----------------------------------+                           |	
                                   |                           |
+------------------------------------------------------------+ |
|  VPN3_Site1 ------ PE5           |   PE6 ------ VPN3_Site2 | |
+------------------------------------------------------------+ |
                                   |                           |
                                   +---------------------------+
			</artwork> 
			</figure>
				<t>
				In the example above, VPN3_Site2 is part of two VPNs : VPN3 and VPN2. It will play hub-role in VPN2 and any-to-any role in VPN3.
				We can express such multiVPN scenario as follows :
				</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;VPN3_Site2&lt;/site-id&gt;
 &lt;vpn-policy-list&gt;
  &lt;vpn-policy&gt;
   &lt;vpn-policy-id&gt;POLICY1&lt;/vpn-policy-id&gt;
   &lt;entries&gt;
    &lt;id&gt;ENTRY1&lt;/id&gt;
	&lt;vpn&gt;
	 &lt;vpn-id&gt;VPN2&lt;/vpn-id&gt;
	 &lt;site-role&gt;hub-role&lt;/site-role&gt;
	&lt;/vpn&gt;
   &lt;/entries&gt;
   &lt;entries&gt;
    &lt;id&gt;ENTRY2&lt;/id&gt;
	&lt;vpn&gt;
	 &lt;vpn-id&gt;VPN3&lt;/vpn-id&gt;
	 &lt;site-role&gt;any-to-any-role&lt;/site-role&gt;
	&lt;/vpn&gt;
   &lt;/entries&gt;
  &lt;/vpn-policy&gt;
 &lt;/vpn-policy-list&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;LA1&lt;/site-network-access-id&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-policy-id&gt;POLICY1&lt;/vpn-policy-id&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;		
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
				</artwork>
				</figure>
			
				<t>Now in case more specific VPN attachment is necessary, filtering can be used. 
				For example, if LAN1 from VPN3_site2 must be attached to VPN2 as hub and LAN2 must be attached to VPN3, the following configuration can be used :</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;VPN3_Site2&lt;/site-id&gt;
 &lt;vpn-policy-list&gt;
  &lt;vpn-policy&gt;
   &lt;vpn-policy-id&gt;POLICY1&lt;/vpn-policy-id&gt;
   &lt;entries&gt;
    &lt;id&gt;ENTRY1&lt;/id&gt;
	&lt;filter&gt;
	 &lt;lan-tag&gt;LAN1&lt;/lan-tag&gt;
	&lt;/filter&gt;
	&lt;vpn&gt;
	 &lt;vpn-id&gt;VPN2&lt;/vpn-id&gt;
	 &lt;site-role&gt;hub-role&lt;/site-role&gt;
	&lt;/vpn&gt;
   &lt;/entries&gt;
   &lt;entries&gt;
    &lt;id&gt;ENTRY2&lt;/id&gt;
	&lt;filter&gt;
	 &lt;lan-tag&gt;LAN2&lt;/lan-tag&gt;
	&lt;/filter&gt;
	&lt;vpn&gt;
	 &lt;vpn-id&gt;VPN3&lt;/vpn-id&gt;
	 &lt;site-role&gt;any-to-any-role&lt;/site-role&gt;
	&lt;/vpn&gt;
   &lt;/entries&gt;
  &lt;/vpn-policy&gt;
 &lt;/vpn-policy-list&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;LA1&lt;/site-network-access-id&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-policy-id&gt;POLICY1&lt;/vpn-policy-id&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;		
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
				</artwork>
				</figure>
				
				</section>
			</section>
		</section>
		<section anchor="site-location-prov" title="Deciding where to connect the site" toc="default">
		<t>
		The management system will have to decide where to connect each site-network-access of a particular site to the provider network (PE, aggregation switch ...).
		</t>
		<t>The current model proposes parameters and constraints that will help the management system to decide where to attach the site-network-access. </t>
		<t>The management system SHOULD honor the customer constraints, if the constraint cannot be filled, the management system MUST not provision the site and SHOULD provide an information to the user.
		How the information is provided is out of scope of the document. It would then be up to the user to relax the constraint or not.</t>
		<t>
		Parameters are just hints for management system for service placement.	
		</t>
		<t>
		In addition to parameters and constraints : the management system decision MAY be based on any other internal constraint that are up to the service provider : least load, distance ...

		</t>
			<section anchor="site-location" title="Parameter : Site location" toc="default">
			<t>
			The location information provided in this model MAY be used by a management system to decide the target PE to mesh the site. 
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
									 PoP#1 (New York)
								  +---------+        
								  |   PE1   |
			 Site #1 ---...       |   PE2   |
			(Atlantic City)       |   PE3   |
								  +---------+

									 PoP#2 (Washington)
								  +---------+
								  |   PE4   |
								  |   PE5   |
								  |   PE6   |
								  +---------+

									 PoP#3 (Philadelphia)
								  +---------+
								  |   PE7   |
			 Site #2 ---...       |   PE2   |
			(Reston)              |   PE9   |
								  +---------+								  
		
			</artwork>
			</figure>
			In the example above, the management system may decide to mesh Site #1 on a PE from Philadelphia PoP for distance reason. 
			It may also take into account resources available on PEs to decide the exact target PE (least load).
			In case of shortest distance PE used, it may also decide to mesh Site #2 on Washington PoP.
			</t>
			</section>
			<section anchor="site-location-prov-type" title="Constraint/parameter : access type" toc="default">
			<t>
			The management system will need to elect the access method to connect the site to the customer (for example : PPP over ISDN, xSDL, leased line, Ethernet backhaul ...).
			The customer may provide some parameters/constraints that will provide hints to the management system.
			</t>
			<t>The bearer container information SHOULD be used as first input :
			<list style="symbols">
			<t>The "requested-type" provides an information about the media type the customer would like. 
			If the "strict" leaf is equal to "true", this MUST be considered as a strict constraint, so the management system cannot connect the site with another media type.
			If the "strict" leaf is equal to "false" (default), if the requested-type cannot be fullfilled, the management system can select another type. The supported media types SHOULD be communicated by
			the service provider to the customer by a mechanism that is out of scope of the document.</t>
			<t>
			The "always-on" leaf defines a strict constraint : if set to "true", the management system MUST elect a media type which is always-on (this means no Dial access type).
			</t>
			<t>
			The "bearer-reference" is used in case the customer has already ordered a network connection to the service provider apart of the IPVPN site and wants to reuse this connection.
			The string used in an internal reference from the service provider describing the already available connection. This is also a strict requirement that cannot be relaxed.
			How the reference is given to the customer is out of scope of the document but as a pure example, when the customer ordered the bearer (through a process out of this model), the service provider may had provided the bearer reference
			that can be used for provisionning services on top.
			</t>
			</list>
			</t>
			<t>
			Other parameters like the requested svc-input-bandwidth, svc-output-bandwidth MAY help to decide the access type to be used. Any other internal parameters from the service provider can be used in addition.
			</t>
			</section>
			
			<section anchor="access-constraint" title="Constraint : access diversity" toc="default">
			<t>
			Each site-network-access may have one or more constraints that would drive the placement of the access.
			</t>
			<t>
			In order to help the different placement scenarios, a site-network-access may be tagged using one or multiple group identifiers. 
			The group identifier is a string so can accomodate both explicit naming of a group of sites (e.g. "multi-homed-set1" or "subvpn") or using a numbered id (e.g. 12345678).
			The meaning of each group-id is local to each customer administrator. And the management system MUST ensure that different customers can use the same group-ids.
			One or more group-id can also be defined at site-level, as a consequence, all site-network-accesses under the site MUST inherit the group-ids of the site they are belonging to.
			When, in addition to the site group-ids, some group-ids are defined at site-network-access level, the management system MUST consider the union of all groups (site level and site network access level) for this particular site network access.
			</t>
			<t>
			For a particular currently configured site-network-access, each constraint MUST be expressed against a targeted set of site-network-accesses, the currently configured site-network-access MUST never be taken into account in the targeted set : e.g. "I want my current site-network-access to be not be connected on the same PoP as the site-network-accesses that are part of group 10".
			The set of site-network-accesses against which the constraint is evaluated can be expressed as a list of groups or all-other-accesses or all-other-groups. "all-other-accesses" means that the current site-network-access constraint MUST be evaluated against all the other site-network-accesses belonging
			to the current site. "all-other-groups" means that the constraint MUST be evaluated against all groups the current site-network-access is not belonging to.
			</t>
			<t>
			The current model proposes multiple constraint-types : 
			<list style="symbol">
			<t>pe-diverse : the current site-network-access MUST not be connected to the same PE as the targeted site-network-accesses.</t>
			<t>pop-diverse : the current site-network-access MUST not be connected to the same PoP as the targeted site-network-accesses.</t>
			<t>linecard-diverse : the current site-network-access MUST not be connected to the same linecard as the targeted site-network-accesses.</t>
			<t>same-pe : the current site-network-access MUST be connected to the same PE as the targeted site-network-accesses.</t>
			<t>same-bearer : the current site-network-access MUST be connected using the same bearer as the targeted site-network-accesses.</t>
			</list>
			Those constraint-types could be extended through augmentation.
			</t>
			<t>
			Each constraint is expressed as "I want my current site-network-access to be &lt;constraint-type&gt; (e.g. pe-diverse, pop-diverse) from those &lt;target&gt; site-network-accesses". In addition, 
			</t>
			<t>The group-id used to target some site-network-accesses may be the same as the one used by the current site-network-access. This ease configuration of scenarios where a group of site-network-access has a constraint between each other.
			As an example if we want a set of sites (site#1 up to #5) to be all connected on a different PE, we can tag them with the same group-id and express a pe-diverse constraint for this group-id.
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;SITE1&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;10&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pe-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;		
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
&lt;site&gt;
 &lt;site-id&gt;SITE2&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;10&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pe-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;		
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
...
&lt;site&gt;
 &lt;site-id&gt;SITE5&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;10&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pe-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;		
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
		</artwork>
		</figure>
			</t>
			<t>The group-id used to target some site-network-accesses may be also different as the one used by the current site-network-access. This is used to express that a group of site has some constraint against another group of sites, but there may not be constraint inside the group itself.
			As an example, if we consider a set of 6 sites with two sets and we want to ensure that a site in the first set must be pop-diverse from a site in the second set.</t>
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;SITE1&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;10&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;20&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;		
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
&lt;site&gt;
 &lt;site-id&gt;SITE2&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;10&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;20&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;		
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
...
&lt;site&gt;
 &lt;site-id&gt;SITE5&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;20&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;		
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
&lt;site&gt;
 &lt;site-id&gt;SITE6&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;20&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;		
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
		</artwork>
		</figure>
			
			</section>
			<section anchor="access-impossible-placement" title="Impossible access placement" toc="default">
			<t>
			Some impossible placement scenarios may be created through the proposed configuration framework. Impossible scenarios could be too restrictive constraints leading to impossible placement in the network or conflicting constraints that would also lead to impossible placement.
			An example of conflicting rules would be to ask a site-network-access#1 to be pe-diverse from a site-network-access#2 and to ask at the same time that site-network-access#2 to be on the same PE as site-network-access#1.
			When the management system cannot place the access, it SHOULD return an error message indicating that placement was not possible.
			</t>
			</section>
			<section anchor="access-constraint-examples" title="Examples of access placement" toc="default">
			<t>
			
			</t>
				<section anchor="access-constraint-examples-multihoming" title="Multihoming" toc="default">
				<t>
				The customer wants to create a multihomed site. The site will be composed of two site-network-accesses and the customer wants
				the two site-network-accesses to be meshed on different PoPs for resiliency purpose.
				</t>
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
									 PoP#1
								  +---------+
|								  |   PE1   |
|---site_network_access#1 ----    |   PE2   |
|								  |   PE3   |
|								  +---------+
|
|									 PoP#2
|								  +---------+
|								  |   PE4   |
|---site_network_access#2 ----    |   PE5   |
|								  |   PE6   |
|								  +---------+	
		
			</artwork>
			</figure>
				<t>
				This scenario could be expressed in the following way :
				</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;SITE1&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;10&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;20&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;2&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;20&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
					</artwork>
				</figure>
				<t>
				But it can also be expressed as :
				</t>
						<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;SITE1&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;all-other-accesses/&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;2&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;all-other-accesses/&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
					</artwork>
				</figure>		
				</section>
				<section anchor="access-constraint-examples-site-offload" title="Site offload" toc="default">
				<t>
				The customer has a 6 branch offices in a particular region and he wants to prevent to have all branch offices on the same PE.
				</t>
				<t>He wants to express that 3 branch offices cannot be connected not on the same linecard. But the other branch offices must be connected on a different PoP.
				Those other branch offices cannot also be connected on the same linecard.</t>
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">

									 PoP#1
								  +---------+
								  |   PE1   |
	        Office#1 ---...       |   PE2   |
	        Office#2 ---...       |   PE3   |
	        Office#3 ---...       |   PE4   |
	                              +---------+
	            

									 PoP#2
								  +---------+
            Office#4 ---...		  |   PE4   |
            Office#5 ---...       |   PE5   |
 			Office#6 ---...       |   PE6   |
								  +---------+	
		
			</artwork>
			</figure>
				<t>
				This scenario could be expressed in the following way :
				<list style="symbols">
				<t>We need to create two sets of sites : set#1 composed of Office#1 up to 3, set#2 composed of Office#4 up to 6.</t>
				<t>Sites within set#1 must be pop-diverse from sites within set#2 and vice versa.</t>
				<t>Sites within set#1 must be linecard-diverse from other sites in set#1 (same for set#2).</t>
				</list>
				</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;SITE1&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;10&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;20&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;linecard-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
&lt;/site&gt;
&lt;site&gt;
 &lt;site-id&gt;SITE2&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;10&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;20&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;linecard-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
&lt;/site&gt;
&lt;site&gt;
 &lt;site-id&gt;SITE3&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;10&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;20&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;linecard-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
 &lt;/site-network-accesses&gt;
&lt;/site&gt;

&lt;site&gt;
 &lt;site-id&gt;SITE4&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;20&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;linecard-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;20&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
&lt;/site&gt;
&lt;site&gt;
 &lt;site-id&gt;SITE5&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;20&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;linecard-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;20&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
&lt;/site&gt;
&lt;site&gt;
 &lt;site-id&gt;SITE6&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;20&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pop-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;10&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;linecard-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;20&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNA&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
 &lt;/site-network-accesses&gt;
&lt;/site&gt;
					</artwork>
				</figure>
				
				</section>
				<section anchor="access-constraint-examples-parallel-links" title="Parallel links" toc="default">
				<t>
				To increase its site bandwidth at a cheaper cost, a customer wants to order to parallel site-network-accesses that will be connected to the same PE.
				</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">

       *******SNA1**********
Site 1 *******SNA2**********  PE1
       
			</artwork>
			</figure>
				<t>
				This scenario could be expressed in the following way :
</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;SITE1&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;PE-linkgrp-1&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;same-pe&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;PE-linkgrp-1&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNB&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;2&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;PE-linkgrp-1&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;same-pe&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;PE-linkgrp-1&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNB&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;
 &lt;/site-network-accesses&gt;
&lt;/site&gt;

					</artwork>
				</figure>
				</section>
				
				<section anchor="access-constraint-examples-subvpn" title="SubVPN with multihoming" toc="default">
				<t>
				A customer has site which is dual-homed, the dual-homing must be done on two different PEs.
				The customer wants also to implement two subVPNs on those multi-homed accesses.
				</t>
				
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">

+------------------+         Site                      +-----+   
|                  |----------------------------------/      +----+
|                  |****(site-network-access#1)******| VPNB /       \
|  New York Office |****(site-network-access#2)*************| VPN C  |
|                  |                                   +----\       /
|                  |                                         +-----+
|                  |
|                  |                                   +------+
|                  |                                  /       +-----+
|                  |****(site-network-access#3)******|  VPNB /       \ 
|                  |****(site-network-access#4)**************| VPN C |
|                  |                                   +------\     /
|                  |-----------------------------------        +---+
+------------------+            
			</artwork>
			</figure>
				<t>
				This scenario could be expressed in the following way :
				<list style="symbols">
				<t>The site will have 4 site network accesses (2 subVPN coupled with dual homing).</t>
				<t>Site-network-access#1 and #3 will correspond to the multihoming of the subVPN B. A PE-diverse constraint is required between them.</t>
				<t>Site-network-access#2 and #4 will correspond to the multihoming of the subVPN C. A PE-diverse constraint is required between them.</t>
				<t>To ensure proper usage of the same bearer for the subVPN, site-network-access #1 and #2 must share the same bearer as site-network-access #3 and #4.</t>
				</list>
				</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;SITE1&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;1&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;dual-homed-1&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pe-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;dual-homed-2&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;same-bearer&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;dual-homed-1&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNB&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;2&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;dual-homed-1&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pe-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;dual-homed-2&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;same-bearer&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;dual-homed-1&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNC&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;
   &lt;site-network-access-id&gt;3&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;dual-homed-2&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pe-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;dual-homed-1&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;same-bearer&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;dual-homed-2&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNB&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;	
  &lt;site-network-access&gt;
   &lt;site-network-access-id&gt;4&lt;/site-network-access-id&gt;
   &lt;access-diversity&gt;
	&lt;groups&gt;
	 &lt;group&gt;
	  &lt;group-id&gt;dual-homed-2&lt;/group-id&gt;
	 &lt;/group&gt;
	&lt;/groups&gt;
	&lt;constraints&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;pe-diverse&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;dual-homed-1&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	 &lt;constraint&gt;
	  &lt;constraint-type&gt;same-bearer&lt;/constraint-type&gt;
	  &lt;target&gt;
	   &lt;group&gt;
	    &lt;group-id&gt;dual-homed-2&lt;/group-id&gt;
	   &lt;/group&gt;
	  &lt;/target&gt;
	 &lt;/constraint&gt;
	&lt;/constraints&gt;
   &lt;/access-diversity&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-id&gt;VPNC&lt;/vpn-id&gt;
	&lt;site-role&gt;spoke-role&lt;/site-role&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;
 &lt;/site-network-accesses&gt;
&lt;/site&gt;

					</artwork>
				</figure>
				
				</section>
			</section>
			
			<section anchor="site-rd-allocation" title="Route Distinguisher and VRF allocation" toc="default">
			<t>
			Route distinguisher is also a critical parameter of PE-based L3VPN as described in <xref target="RFC4364" pageno="false" format="default"/> that will allow to distinguish common addressing plans in different VPNs.
			As for Route-targets, it is expected management system to allocate a VRF on the target PE and a route-distinguisher for this VRF.
			</t>
			<t>
			If a VRF exists on the target PE, and the VRF fulfils the connectivity constraints for the site, there is no need to recreate another VRF and the site
			MAY be meshed within this existing VRF. How the management system checks that an existing VRF fulfils the connectivity constraints for a site is out of scope of this document.
			</t>
			<t>
			If no VRF exists on the target PE, filling the site constraints, the management system will have to initiate a new VRF creation on the target PE and will have to allocate a new route distinguisher
			for this new VRF.
			</t>
			<t>
			The management system MAY apply a per-VPN or per-VRF allocation policy for the route-distinguisher depending of the service provider policy. In a per-VPN allocation policy, all VRFs (dispatched on multiple PEs) within a VPN will share the same route distinguisher value.
			In a per-VRF model, all VRFs will always have a unique route-distinguisher value.
			Some other allocation policies are also possible, and this document does not restrict the allocation policies to be used.
			</t>
			<t>
			Allocation of route-distinguisher MAY be done in the same way as the route-targets. The example provided in <xref target="yang-vpn-global-topology-rt-allocation" pageno="false" format="default"/> could be reused.
			</t>
			<t>Note that a service provider MAY decide to configure target PE for automated allocation of route distinguisher. In this case, there will be no need for any backend system to allocate a route-distinguisher value.</t>
						
			</section>
			
		</section>
		
		
		<section anchor="site-availability" title="Site network access availability" toc="default">
			<t>
			A site may be multihomed, so having multiple site-network-accesses.
		    Placement constraints defined in previous sections will help to ensure physical diversity.
			</t>
			<t>When the site-network-accesses are placed on the network, a customer may want to use a particular routing policy on those accesses.</t>
			<t>
			The site-network-access/availability defines parameters for the site redundancy. The access-priority defines a preference for a particular access.
			This preference is used to model loadbalancing or primary/backup scenario. The highest the access-priority is, and the highest the preference will be.
			</t>
			<t>The figure below describes how access-priority attribute can be used.</t>
			<figure title="" suppress-title="false" align="left" alt="" width="" height="">
			<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">

Hub#1 LAN (Primary/backup)		    Hub#2 LAN (Loadsharing)
  |                                                  |
  |     access-priority 1       access-priority 1    |
  |--- CE1 ------- PE1         PE3 --------- CE3 --- |
  |                                                  |
  |                                                  |
  |--- CE2 ------- PE2         PE4 --------- CE4 --- |
  |     access-priority 2       access-priority 1    |
                     
		  
                          PE5
                           |
                           | 
                           |
                          CE5
						   |
                      Spoke#1 site (Single-homed)
			</artwork>
			</figure>
			<t>
			In the figure above, Hub#2 requires loadsharing so all the site-network-accesses must use the same access-priority value. 
			At the contrary, as Hub#1 requires primary/backup, a higher access-priority will be configured on the primary access.
			</t>
			
			<t>
			More complex scenario can be modeled. Let's consider a Hub site with 5 accesses to the network (A1,A2,A3,A4,A5). The customer wants to loadshare traffic on A1,A2 in the nominal situation.
			If A1 and A2 fails, he wants to loadshare traffic on A3 and A4, and finally if A1 to A4 are down, he wants to use A5.
			We can model it easily by associating the following access-priorities : A1=100, A2=100, A3=50, A4=50, A5=10.
			</t>
			<t>
			The access-priority has some limitation. A scenario like the previous one with 5 accesses but with the constraint of having traffic loadshared between A3 and A4 in case of A1 OR A2 being down is not achievable.
			But the authors consider that the access-priority covers most of the deployment use cases and the model can still be extended by augmentation to support new use cases.
			</t>
			</section>
				<section anchor="site-svc-frr" title="Traffic protection" toc="default">
				<t>
				The service model supports the ability to protect traffic for the site. 
				Protection provides a better availability to multihoming by, for example, using local-repair techniques in case of failures.
				The associated level of service guarantee would be based on an agreement between customer and service provider and is out of scope of this document.
				</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
			
		
		
	Site#1                            Site#2
CE1 ----- PE1 -- P1            P3 -- PE3 ---- CE3
 |                              |             |
 |                              |             |
CE2 ----- PE2 -- P2            P4 -- PE4 ---- CE4 
          /
         /
CE5 ----+
   Site#3
				</artwork>
				</figure>
				
				<t>
				In the figure above, we consider an IPVPN service with three sites including two dual homed sites (site#1 and #2). 
				For dual homed sites, we consider PE1-CE1 and PE3-CE3 as primary, and PE2-CE2,PE4-CE4 as backup for the example (even if protection also applies to loadsharing scenarios.)
				</t>
				<t>
				In order to protect Site#2 against a failure, user may set the enabled leaf of traffic-protection to true on the site-network-accesses of site#2.
				How the traffic protection will be implemented is out of scope of the document.
				But as an example, in such case, if we consider traffic coming from a remote site (site#1 or site#3), primary path is to use PE3 as egress PE. 
				PE3 may have preprogrammed a backup forwarding entry pointing to backup path (through PE4-CE4) for all prefixes going through PE3-CE3 link.
				How backup path is computed is out of scope of the document.
				When PE3-CE3 link fails, traffic is still received by PE3 but PE3 switch automatically traffic to the backup entry, path will so be PE1-P1-(...)-P3-PE3-PE4-CE4 until remote PEs reconverge and use PE4 as egress PE.
				</t>
				</section>
			
		
		<section anchor="site-security" title="Security" toc="default">
		<t>
		Security container defines customer specific security parameters for the site.
		</t>
			<section anchor="site-security-authentication" title="Authentication" toc="default">
			<t>
			The current model does not support any authentication parameters, but such parameters may be added in the authentication container through augmentation.
			
			</t>
			</section>
			<section anchor="site-security-encryption" title="Encryption" toc="default">
			<t>
			Encryption can be requested on the connection. It may be performed at layer 2 or layer 3 by selecting the appropriate enumeration
			in "layer" leaf.
			The encryption profile can be a service provider defined profile or customer specific.
			</t>
			</section>
		
		</section>
		<section anchor="site-management" title="Management" toc="default">
		<t>The model proposes three types of common management options :
		<list style="symbols">	
		<t>provider-managed : the CE router is managed only by the provider. In this model, the responsibility boundary between SP and customer is between CE and customer network.</t>
		<t>customer-managed : the CE router is managed only by the customer. In this model, the responsibility boundary between SP and customer is between PE and CE.</t>
		<t>co-managed : the CE router is primarly managed by the provider and in addition SP lets customer accessing the CE for some configuration/monitoring purpose.
		In the co-managed mode the responsibility boundary is the same as the provider-managed model.</t>
		</list>
		</t>
		<t>Based on the management model, different security options MAY be derived.</t>
		<t>In case of "customer-managed" or "co-managed", the model proposes some option to define the management transport protocol (IPv4 or IPv6) and the associated
		management address.</t>
		</section>
		
		<section anchor="site-attachment-conn-routing" title="Routing protocols" toc="default">
				<t>Routing-protocol defines which routing protocol must be activated between the provider and the customer router. The current model support : bgp, rip, rip-ng, ospf, static, direct, vrrp.</t>
				<t>The routing protocol defined applies at the provider to customer boundary. Depending of the management of the management model, it may apply to the PE-CE boundary or CE to customer boundary.
				In case of customer managed site, the routing-protocol defined will be activated between the PE and the CE router managed by the customer.
				In case of provider managed site, the routing-protocol defined will be activated between the CE managed by the SP and the router or LAN belonging to the customer. 
				In this case, it is expected that the PE-CE routing will be configured based on the service provider rules as both are managed by the same entity.
				</t>
				
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
				            Rtg protocol
	192.0.2.0/24 ----- CE ----------------- PE1
	
	             Customer managed site
				</artwork>
				</figure>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
		  Rtg protocol		           
	Customer router ----- CE ----------------- PE1
	
	             Provider managed site
				</artwork>
				</figure>
				<t>All the examples below will refer to a customer managed site case.</t>
				
					<section anchor="site-attachment-conn-dualstack" title="Dual stack handling" toc="default">
					<t>
					All routing protocol types support dual stack by using address-family leaf-list.
					</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
Example of Dual stack using the same routing protocol :

&lt;routing-protocols&gt;
  &lt;routing-protocol&gt;
	&lt;type&gt;static&lt;/type&gt;
	&lt;static&gt;
		&lt;address-family&gt;ipv4&lt;/address-family&gt;
		&lt;address-family&gt;ipv6&lt;/address-family&gt;
	&lt;/static&gt;
  &lt;/routing-protocol&gt;
&lt;/routing-protocols&gt;
					</artwork>
					</figure>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
Example of Dual stack using two different routing protocols :

&lt;routing-protocols&gt;
  &lt;routing-protocol&gt;
	&lt;type&gt;rip&lt;/type&gt;
	&lt;rip&gt;
		&lt;address-family&gt;ipv4&lt;/address-family&gt;
	&lt;/rip&gt;
  &lt;/routing-protocol&gt;
  &lt;routing-protocol&gt;
	&lt;type&gt;ospf&lt;/type&gt;
	&lt;ospf&gt;
		&lt;address-family&gt;ipv6&lt;/address-family&gt;
	&lt;/ospf&gt;
  &lt;/routing-protocol&gt;
&lt;/routing-protocols&gt;
					</artwork>
					</figure>
					</section>
					<section anchor="site-attachment-conn-routing-direct" title="Direct LAN connection onto SP network" toc="default">
					<t>Routing-protocol "direct" SHOULD be used when a customer LAN is directly connected to the provider network and must be advertised in the IPVPN.</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
		LAN attached directly to provider network :

		192.0.2.0/24 ----- PE1
					</artwork>
					</figure>
					<t>
					In this case, the customer has a default route to the service provider network.
					</t>
					</section>
					
					<section anchor="site-attachment-conn-routing-direct-red" title="Direct LAN connection onto SP network with redundancy" toc="default">
					<t>Routing-protocol "vrrp" SHOULD be used when a customer LAN is directly connected to the provider network and must be advertised in the IPVPN and LAN redundancy is expected.</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
	  LAN attached directly to provider network with LAN redundancy:

		192.0.2.0/24 ------ PE1
					   |
					   +-- PE2
					</artwork>
					</figure>
					<t>
					In this case, the customer has a default route to the service provider network.
					</t>
					</section>
					
					<section anchor="site-attachment-conn-routing-static" title="Static routing" toc="default">
					<t>Routing-protocol "static" MAY be used when a customer LAN is connected to the provider network through a CE router and must be advertised in the IPVPN.</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
                                Static rtg
       192.0.2.0/24 ------ CE -------------- PE
		                    |                |
			                |      Static route 192.0.2.0/24 nh CE
			Static route 0.0.0.0/0 nh PE
					</artwork>
					</figure>
					<t>
					In this case, the customer has a default route to the service provider network.
					</t>
					</section>
					
					<section anchor="site-attachment-conn-routing-rip" title="RIP routing" toc="default">
					<t>Routing-protocol "rip"  MAY be used when a customer LAN is connected to the provider network through a CE router and must be advertised in the IPVPN.</t>
					<t>In case of dual stack, the management system will be responsible to configure rip (including right version number) and rip-ng instances on network elements.</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
                                RIP rtg
        192.0.2.0/24 ------ CE -------------- PE

					</artwork>
					</figure>
					</section>
					<section anchor="site-attachment-conn-routing-ospf" title="OSPF routing" toc="default">
					<t>Routing-protocol "ospf"  MAY be used when a customer LAN is connected to the provider network through a CE router and must be advertised in the IPVPN.</t>
					<t>It can be used to extend an existing OSPF network and interconnect different areas. See <xref target="RFC4577" pageno="false" format="default"/> for more details.</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
                          +---------------------+
                          |                     |
                  OSPF    |                     | OSPF 
                  area 1  |                     | area 2
 (OSPF                    |                     |          (OSPF
 area 1) --- CE ---------- PE               PE ----- CE --- area 2)
                          |                     |
                          +---------------------+
 
					</artwork>
					</figure>
					<t>The model also proposes an option to create an OSPF sham-link between two sites sharing the same area and having a backdoor link.
					The sham-link is created by referencing the target site sharing the same OSPF area. The management system will be responsible
					to check if there is already a shamlink configured for this VPN and area between the same pair of PEs. If there is no existing shamlink,
					the management system will provision it, this shamlink MAY be reused by other sites.</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
                        +------------------------+
                        |                        |
                        |                        |
                        |   PE (--shamlink--)PE  |
                        |    |                |  |
                        +----|----------------|--+
						     | OSPF area1     | OSPF area 1
							 |                |
							 CE1             CE2
							 |                |
						(OSPF area1)       (OSPF area1)
						     |                |
							 +----------------+
					</artwork>
					</figure>
					<t>
					Regarding Dual stack support, user MAY decide to fill both IPv4 and IPv6 address families, if both protocols SHOULD 
					be routed through OSPF. As OSPF is using two different protocol for IPv4 and IPv6, the management system will need to configure
					both ospf version 2 and version 3 on the PE-CE link.
					</t>
					<t>Example of OSPF routing parameters in service model.</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;routing-protocols&gt;				
  &lt;routing-protocol&gt;
	&lt;type&gt;ospf&lt;/type&gt;
	&lt;ospf&gt;
		&lt;area-address&gt;0.0.0.1&lt;/area-address&gt;
		&lt;address-family&gt;ipv4&lt;/address-family&gt;
		&lt;address-family&gt;ipv6&lt;/address-family&gt;
	&lt;/ospf&gt;
  &lt;/routing-protocol&gt;
&lt;/routing-protocols&gt;
					</artwork>
					</figure>
					
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
Example of PE configuration done by management system :

router ospf 10
 area 0.0.0.1
  interface Ethernet0/0
!
router ospfv3 10
 area 0.0.0.1
  interface Ethernet0/0
 !
					</artwork>
					</figure>
					</section>
					<section anchor="site-attachment-conn-routing-bgp" title="BGP routing" toc="default">
					<t>Routing-protocol "bgp" MAY be used when a customer LAN is connected to the provider network through a CE router and must be advertised in the IPVPN.</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
                                BGP rtg
      192.0.2.0/24 ------ CE -------------- PE

					</artwork>
					</figure>
					<t>The session addressing will be derived from connection parameters as well as internal knowledge of SP.</t>
					<t>In case of dual stack access, user MAY request BGP routing for both IPv4 and IPv6 by filling both address-families.
					It will be up to SP and management system to decide how to decline the configuration (two BGP sessions, single, multisession ...).</t>
					<t>The service configuration below actives BGP on PE-CE link for both IPv4 and IPv6.</t>
					<t>BGP activation requires SP to know the address of the customer peer. "static-address" allocation type for the IP connection MUST be used.</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;routing-protocols&gt;
  &lt;routing-protocol&gt;
	&lt;type&gt;bgp&lt;/type&gt;
	&lt;bgp&gt;
		&lt;autonomous-system&gt;65000&lt;/autonomous-system&gt;
		&lt;address-family&gt;ipv4&lt;/address-family&gt;
		&lt;address-family&gt;ipv6&lt;/address-family&gt;
	&lt;bgp&gt;
  &lt;/routing-protocol&gt;
&lt;/routing-protocols&gt;
					</artwork>
					</figure>
					<t>
					This service configuration can be derived by management system into multiple flavors depending on SP flavor.
					</t>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
Example #1 of PE configuration done by management system 
(single session IPv4 transport):

router bgp 100
 neighbor 203.0.113.2 remote-as 65000
 address-family ipv4 vrf Cust1
	neighbor 203.0.113.2 activate
 address-family ipv6 vrf Cust1
	neighbor 203.0.113.2 activate
	neighbor 203.0.113.2 route-map SET-NH-IPV6 out
					</artwork>
					</figure>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
Example #2 of PE configuration done 
by management system (two sessions):

router bgp 100
 neighbor 203.0.113.2 remote-as 65000
 neighbor 2001::2 remote-as 65000
 address-family ipv4 vrf Cust1
	neighbor 203.0.113.2 activate
 address-family ipv6 vrf Cust1
	neighbor 2001::2 activate
					</artwork>
					</figure>
					<figure title="" suppress-title="false" align="left" alt="" width="" height="">
					<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
Example #3 of PE configuration done 
by management system (multisession):

router bgp 100
 neighbor 203.0.113.2 remote-as 65000
 neighbor 203.0.113.2 multisession per-af
 address-family ipv4 vrf Cust1
	neighbor 203.0.113.2 activate
 address-family ipv6 vrf Cust1
	neighbor 203.0.113.2 activate
	neighbor 203.0.113.2 route-map SET-NH-IPV6 out
					</artwork>
					</figure>
					</section>
		</section>
		
		<section anchor="site-service" title="Service" toc="default">
		<t>
		The service defines service parameters associated with the site.
		</t>
			<section anchor="site-svc-bw" title="Bandwidth" toc="default">
			<t>
			The service bandwidth refers to the bandwidth requirement between PE and CE (WAN access bandwidth).
			The requested bandwidth is expressed as svc-input-bandwidth and svc-output-bandwidth in bit per seconds.
			Input/output direction is using customer site as reference : input bandwidth so means download bandwidth for the site, and output bandwidth means upload bandwidth for the site.
			</t>
			<t>
			Using a different input and output bandwidth will allow service provider to know if customer allows for asymmetric bandwidth access like ADSL. 
			It can also be used to rate-limit in a different way upload and download on a symmetric bandwidth access.
			</t>
			<t>
			The bandwidth is a service bandwidth : expressed primarly as IP bandwidth but if the customer enables MPLS for carrier's carrier, this becomes MPLS bandwidth.
			</t>
			</section>
			<section anchor="site-svc-qos" title="QoS" toc="default">
			<t>
			The model proposes to define QoS parameters in an abstracted way :
			<list style="symbols">
			<t>qos-classification-policy : define a set of ordered rules to classify customer traffic.</t>
			<t>qos-profile : QoS scheduling profile to be applied.</t>
			</list>
			</t>
				<section anchor="site-svc-qos-classification" title="QoS classification" toc="default">
				<t>
				QoS classification rules are handled by qos-classification-policy.
				The qos-classification-policy is an ordered list of rules that match a flow or application and set the appropriate target class of service (target-class-id).
				The user can define the match using an application reference or a more specific flow definition (based layer 3 source and destination address, layer 4 ports, layer 4 protocol).
				The current model defines some applications but new application identities may be added through augmentation.
				The exact meaning of each application identity is up to the service provider, so it will be necessary for the service provider to advise customer on usage of application matching.
				</t>
				<t>Where the classification is done depends on the SP implementation of the service, but classification concerns the flow coming from the customer
				site and entering the network.</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
				               Provider network
						  +-----------------------+
   192.0.2.0/24
198.51.100.0/24 ---- CE --------- PE

  Traffic flow
 ----------&gt;
				
				</artwork>
				</figure>
				<t>
				In the figure above, the management system can decide :
				<list style="symbols">
				<t>if the CE is customer managed, to implement the classification rule in the ingress direction on the PE interface.</t>
				<t>if the CE is provider managed, to implement the classification rule in the ingress direction on the CE interface connected to customer LAN.</t>
				</list>
				</t>
				<t>The figure below describes a sample service description of qos-classification for a site  :</t> 
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;service&gt;
	&lt;qos&gt;
		&lt;qos-classification-policy&gt;
			&lt;rule&gt;
				&lt;id&gt;1&lt;/id&gt;
				&lt;match-flow&gt;
					&lt;ipv4-src-prefix&gt;192.0.2.0/24&lt;/ipv4-src-prefix&gt;
					&lt;ipv4-dst-prefix&gt;203.0.113.1/32&lt;/ipv4-dst-prefix&gt;
					&lt;l4-dst-port&gt;80&lt;/l4-dst-port&gt;
					&lt;l4-protocol&gt;tcp&lt;/l4-protocol&gt;
				&lt;/match-flow&gt;
				&lt;target-class-id&gt;DATA2&lt;/target-class-id&gt;
			&lt;/rule&gt;
			&lt;rule&gt;
				&lt;id&gt;2&lt;/id&gt;
				&lt;match-flow&gt;
					&lt;ipv4-src-prefix&gt;192.0.2.0/24&lt;/ipv4-src-prefix&gt;
					&lt;ipv4-dst-prefix&gt;203.0.113.1/32&lt;/ipv4-dst-prefix&gt;
					&lt;l4-dst-port&gt;21&lt;/l4-dst-port&gt;
					&lt;l4-protocol&gt;tcp&lt;/l4-protocol&gt;
				&lt;/match-flow&gt;
				&lt;target-class-id&gt;DATA2&lt;/target-class-id&gt;
			&lt;/rule&gt;
			&lt;rule&gt;
				&lt;id&gt;3&lt;/id&gt;
				&lt;match-application&gt;p2p&lt;/match-application&gt;
				&lt;target-class-id&gt;DATA3&lt;/target-class-id&gt;
			&lt;/rule&gt;
			&lt;rule&gt;
				&lt;id&gt;4&lt;/id&gt;
				&lt;target-class-id&gt;DATA1&lt;/target-class-id&gt;
			&lt;/rule&gt;
		&lt;/qos-classification-policy&gt;
	&lt;/qos&gt;
&lt;/service&gt;
				</artwork>
				</figure>
				<t>
				In the example above :
					<list style="symbols">
					<t>HTTP traffic from 192.0.2.0/24 LAN destinated to 203.0.113.1/32 will be classified in DATA2.</t>
					<t>FTP traffic from 192.0.2.0/24 LAN destinated to 203.0.113.1/32 will be classified in DATA2.</t>
					<t>Peer to peer traffic wille be classified in DATA3.</t>
					<t>All other traffic will be classified in DATA1.</t>
					</list>
				</t>
				<t>
				The order of rules is really important. The management system responsible for translating those rules in network element configuration MUST keep 
				the same processing order in element configuration. The order of rule is defined by the "id" leaf. The lowest "id" MUST be processed first.
				</t>
				</section>
				<section anchor="site-svc-qos-profile" title="QoS profile" toc="default">
				<t>User can choose between standard profile provided by the operator or custom profile.
				The qos-profile defines the traffic scheduling policy to be used by the service provider.</t>
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
				               Provider network
						  +-----------------------+
192.0.2.0/24
198.51.100.0/24 ---- CE --------- PE
                        \       /
                       qos-profile
				
				</artwork>
				</figure>
				<t>
				In case of provider managed or co-managed connection, the provider should ensure scheduling according to the requested policy in both traffic directions (SP to customer and customer to SP).
				As example of implementation, a device scheduling policy may be implemented both at PE and CE side on the WAN link.
				In case of customer managed connection, the provider is only responsible to ensure scheduling from SP network to the customer site. As example of implementation, a device scheduling policy may be implemented only at PE side on the WAN link towards the customer.
				</t>
				<t>
				A custom qos-profile is defined as a list of class of services and associated properties. The properties are :
				<list style="symbols">
				<t>rate-limit : used to rate-limit the class of service. The value is expressed as a percentage of the global service bandwidth. When the qos-profile is implemented at CE side the svc-output-bandwidth is taken into account as reference. 
				When it is implemented at PE side, the svc-input-bandwidth is used.</t>
				<t>priority-level : used to define priorities between class of services. The value of the priority to be used is dependant of each administration.
				The higher the priority-level is, the higher the priority of the class will be. Priority-level can be used to define strict priority queueing. 
				A priority-level 250 class will be served before a priority-level 100 class until there is no more packet to process or until rate-limit does not allow anymore packets from the higher priority class.
				</t>
				<t>guaranteed-bw-percent : used to define a guaranteed amount of bandwidth for the class of service. It is expressed as a percentage.
				The guaranteed-bw-percent uses available bandwidth at the priority-level of the class. When the qos-profile is implemented at CE side the svc-output-bandwidth is taken into account as reference. 
				When it is implemented at PE side, the svc-input-bandwidth is used.</t>
				</list>
				</t>
				<t>
				Example of service configuration using a standard qos profile :
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
	&lt;site-id&gt;1245HRTFGJGJ154654&lt;/site-id&gt;
	&lt;service&gt;
		&lt;svc-input-bandwidth&gt;100000000&lt;/svc-input-bandwidth&gt;
		&lt;svc-output-bandwidth&gt;100000000&lt;/svc-output-bandwidth&gt;
		&lt;qos&gt;
			&lt;qos-profile&gt;
				&lt;profile&gt;PLATINUM&lt;/profile&gt;
			&lt;/qos-profile&gt;
		&lt;/qos&gt;
	&lt;/service&gt;
&lt;/site&gt;
&lt;site&gt;
	&lt;site-id&gt;555555AAAA2344&lt;/site-id&gt;
	&lt;service&gt;
		&lt;svc-input-bandwidth&gt;2000000&lt;/svc-input-bandwidth&gt;
		&lt;svc-output-bandwidth&gt;2000000&lt;/svc-output-bandwidth&gt;
		&lt;qos&gt;
			&lt;qos-profile&gt;
				&lt;profile&gt;GOLD&lt;/profile&gt;
			&lt;/qos-profile&gt;
		&lt;/qos&gt;
	&lt;/service&gt;
&lt;/site&gt;
				
				</artwork>
				</figure>
				</t>
				
				<t>
				Example of service configuration using a custom qos profile :
				<figure title="" suppress-title="false" align="left" alt="" width="" height="">
				<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
	&lt;site-id&gt;Site1&lt;/site-id&gt;
	&lt;service&gt;
		&lt;svc-input-bandwidth&gt;100000000&lt;/svc-input-bandwidth&gt;
		&lt;svc-output-bandwidth&gt;100000000&lt;/svc-output-bandwidth&gt;
		&lt;qos&gt;
			&lt;qos-profile&gt;
				&lt;classes&gt;
					&lt;class&gt;
						&lt;class-id&gt;REAL_TIME&lt;/class-id&gt;
						&lt;rate-limit&gt;10&lt;/rate-limit&gt;
						&lt;priority-level&gt;10&lt;/priority-level&gt;
					&lt;/class&gt;
					&lt;class&gt;
						&lt;class-id&gt;DATA&lt;/class-id&gt;
						&lt;priority-level&gt;5&lt;/priority-level&gt;
					&lt;/class&gt;
				&lt;/classes&gt;
			&lt;/qos-profile&gt;
		&lt;/qos&gt;
	&lt;/service&gt;
&lt;/site&gt;
&lt;site&gt;
	&lt;site-id&gt;Site2&lt;/site-id&gt;
	&lt;service&gt;
		&lt;svc-input-bandwidth&gt;2000000&lt;/svc-input-bandwidth&gt;
		&lt;svc-output-bandwidth&gt;2000000&lt;/svc-output-bandwidth&gt;
		&lt;qos&gt;
			&lt;qos-profile&gt;
				&lt;classes&gt;
					&lt;class&gt;
					  &lt;class-id&gt;REAL_TIME&lt;/class-id&gt;
					  &lt;rate-limit&gt;30&lt;/rate-limit&gt;
					  &lt;priority-level&gt;10&lt;/priority-level&gt;
					&lt;/class&gt;
					&lt;class&gt;
					  &lt;class-id&gt;DATA1&lt;/class-id&gt;
					  &lt;priority-level&gt;5&lt;/priority-level&gt;
					  &lt;guaranteed-bw-percent&gt;80&lt;/guaranteed-bw-percent&gt;
					&lt;/class&gt;
					&lt;class&gt;
					  &lt;class-id&gt;DATA2&lt;/class-id&gt;
					  &lt;priority-level&gt;5&lt;/priority-level&gt;
					  &lt;guaranteed-bw-percent&gt;20&lt;/guaranteed-bw-percent&gt;
					&lt;/class&gt;
				&lt;/classes&gt;
			&lt;/qos-profile&gt;
		&lt;/qos&gt;
	&lt;/service&gt;
&lt;/site&gt;
				
				</artwork>
				</figure>
				</t>
				<t>
				The custom qos-profile for site1 defines that traffic from REAL_TIME class will have a higher priority than traffic from DATA class.
				The REAL_TIME traffic will be rate-limit to 10% of the service bandwidth (10% of 100Mbps = 10Mbps) to let some place for DATA traffic.
				</t>
				<t>
				The custom qos-profile for site2 defines that traffic from REAL_TIME class will have a higher priority than traffic from data traffic.
				Data traffic will be splitted in two class of service DATA1 and DATA2 that will share bandwidth between them according to the percentage of guaranteed-bw-percent.
				The maximum of percentage to be used is not limited by this model but MUST be limited by the management system according to the policies authorized by the service provider.
				The REAL_TIME traffic will be rate-limit to 30% of the service bandwidth (30% of 100Mbps = 30Mbps) to let some place for data traffic.
				In case of congestion of the access, the REAL_TIME traffic can go up to 30Mbps (Let's assume that 20Mbps only are consumed). 
				The DATA1 and DATA2 will share remaining bandwidth (80Mbps) according to their percentage. So DATA1 will be served with at least 64Mbps of bandwidth.
				</t>
				</section>
			
			</section>
			
			<section anchor="site-svc-multicast" title="Multicast" toc="default">
			<t>
			The multicast section defines the type of site in the customer multicast topology : source, receiver, or both.
			These parameters will help management system to optimize the multicast service.
			User can also define the type of multicast relation with the customer : router (requires a protocol like PIM), host (IGMP or MLD), or both.
			Transport protocol (IPv4 or IPv6 or both) can also be defined.
			</t>
			</section>
			
			
		</section>
		
		
		
		
	  <section anchor="enhanced-vpn" title="Enhanced VPN features" toc="default">
		<section anchor="site-mpls" title="Carrier's Carrier" toc="default">
		<t>
		In case of Carrier's Carrier (<xref target="RFC4364" pageno="false" format="default"/>), a customer MAY want to build MPLS service using an IPVPN as transport layer.
		</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
        LAN customer1
            |
            |
           CE1
            |
            | -------------
		 (vrf_cust1)
          CE1_ISP1
            |                 ISP1 PoP
            | MPLS link
            | -------------
			|
         (vrf ISP1)
           PE1
                     

          (...)               Provider backbone


           PE2
          (vrf ISP1)
            |
            | ------------
            |
            | MPLS link
            |                 ISP1 PoP
           CE2_ISP1
           (vrf_cust1)
            |-------------
            |
           CE2
            |
         Lan customer1			
 
		
		</artwork>
		</figure>
		<t>
		In the figure above, ISP1 resells IPVPN service but has no transport infrastructure between its PoPs. ISP1 uses an IPVPN as transport infrastructure (belonging to another provider) between its PoPs.
		</t>
		<t>
		In order to support CsC, the VPN service must be declared MPLS support using the "carrierscarrier" leaf set to true in vpn-svc.
		The link between CE1_ISP1/PE1 and CE2_ISP1/PE2 must also run a MPLS signalling protocol. This configuration is done at the site level.
		</t>
		<t>
		In the proposed model, LDP or BGP can be used as MPLS signalling protocol. In case of LDP, an IGP routing protocol MUST also be activated.
		In case of BGP signalling, BGP MUST also be configured as routing-protocol.
		</t>
		<t>
		In case Carrier's Carrier is enabled, the requested svc-mtu will refer to the MPLS MTU and no more to the IP MTU.
		</t>
		</section>
		<section anchor="yang-vpn-global-transport" title="Transport constraints" toc="default">
		<t>
		A customer may require some constraints for transporting traffic between particular sites. As example, a customer may require low latencies and disjoint paths
		between two hub sites.
		The current model proposes to define a list of constraints that can be augmented for unicast and/or multicast traffic.
		For unicast traffic, the model considers that the constraints are bidirectional (same constraint from site1 to site2 and site2 to site1). For multicast, constraints are unidirectional from source to receiver.
		The current model supports the following constraints :
			<list style="symbols">
			<t>Latency : this constraint allow to create the lowest latency path possible or to create a path with a latency boundary. In case a latency boundary is required, the boundary MUST be encoded in the constraint-opaque-value using a millisecond unit.</t>
			<t>Bandwidth : this constraint allow to create a path that fits specific bandwidth requirement. If no constraint-opaque-value is provided, an implementation SHOULD use the lowest bandwidth between the two sites as reference. If constraint-opaque-value is used, the required bandwidth MUST be encoded in Mbps, and the implementation MUST use this value as reference.</t> 
			<t>Jitter : this constraint allow to create a path with a jitter boundary. constraint-opaque-value MUST be used with jitter constraint and MUST contain the jitter boundary expressed in milliseconds.</t>
			<t>Path diversity : this constraint allow creation of disjoint paths between two sites. This requires the customer sites to be multihomed. constraint-opaque-value is not used.</t>
			<t>Site diversity : this constraint is similar to path diversity but ensures that paths are not crossing the same provider PoPs. This requires the customer sites to be multihomed. constraint-opaque-value MAY be used to encode additional site location that must be avoided.</t>
			</list>
		</t>
		</section>
	  </section>
	  
	  <section anchor="ext-references" title="External ID references" toc="default">
	  <t>
	  The service model sometimes refers to external information through identifiers. As an example, to order a cloud-access to a particular Cloud Service Provider (CSP), the model uses an identifier to refer to the targeted CSP.
	  In case, a customer is using directly this service model as an API (through REST or NETCONF for example) to order a particular service, the service provider should provide a list of authorized identifiers. In case of cloud-access, the service provider will provide the identifiers associated of each available CSP.
	The same applies to other identifiers like std-qos-profile, oam profile-name, provider-profile for encryption ...
	  
	  </t>
	  <t>How SP provides those identifiers meaning to the customer is out of scope of this document.</t>
	  </section>
	  <section anchor="interas" title="Defining NNIs" toc="default">
	  <t>
	  An autonomous system is a single network or group of networks that is controlled by a common system administration group and that uses a single, clearly defined routing protocol. 
	  In some cases, VPNs need to span across different autonomous systems in different geographic areas or across different service providers. 
	  The connection between autonomous systems is established by the Service Providers and is seamless to the customer.
	  </t>
	  <t>Some examples are : Partnership between service providers (transport, cloud  ...) to extend their VPN service seamlessly, or internal administrative boundary within a single service provider (Backhaul vs Core vs Datacenter ...).
	  </t>
	  <t>
	  NNIs (Network to Network Interfaces) have to be defined to extend the VPNs across multiple autonomous systems.
	  </t>
	  <t>
	  <xref target="RFC4364" pageno="false" format="default"/> defines multiple flavor of VPN NNI implementations. Each implementation has different pros/cons that are outside the scope of this document.
	  As an example : 
	  In an Inter-AS Option A, ASBR peers are connected by multiple interfaces with at least one interface VPN that spans the two autonomous systems. 
	  These ASBRs associate each interface with a VPN routing and forwarding (VRF) instance and a Border Gateway Protocol (BGP) session to signal unlabeled IP prefixes. 
	  As a result, traffic between the back-to-back VRFs is IP. In this scenario, the VPNs are isolated from each other, and because the traffic is IP, QoS mechanisms that operate on IP traffic can be applied to achieve customer Service Level Agreements (SLAs).
	  </t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
  --------                 --------------              -----
 /        \               /              \            /     \
| Cloud    |             |                |          |       |
| Provider | ----NNI---- |                | ---NNI---|   DC  |
|  #1      |             |                |          |       |
 \        /              |                |           \     /
  --------               |                |             ----
                         |                |
  --------               |   My network   |           -----------
 /        \              |                |          /           \
| Cloud    |             |                |         |             |
| Provider | ----NNI---- |                |---NNI---|  L3VPN      |
|  #2      |             |                |         |  Partner    |
 \        /              |                |         |             |
  --------               |                |         |             |
                          \              /          |             |
						   --------------            \           /
						         |                     ----------
                                 |
                                NNI
								 |
								 |
                         -------------------
                        /                   \
                       |                     |
                       |                     |
                       |                     |
                       |     L3VPN partner   |
                       |                     |
                        \                   /
                          ------------------
						 
		</artwork>
		</figure>
		<section anchor="interas-as" title="Defining NNI with option A flavor" toc="default">
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
        AS A                                             AS B
  ---------------------                         --------------------
 /                     \                       /                    \
|                       |                     |                      |
|                   ++++++++ InterAS link ++++++++                   |
|                   +      +_____________ +      +                   |
|                   +  (VRF1)--(VPN1)----(VRF1)  +                   |
|                   + ASBR +              + ASBR +                   |
|                   +  (VRF2)--(VPN2)----(VRF2)  +                   |
|                   +      +______________+      +                   |
|                   ++++++++              ++++++++                   |
|                       |                     |                      |
|                       |                     |                      |
|                       |                     |                      |
|                   ++++++++ InterAS link ++++++++                   |
|                   +      +_____________ +      +                   |
|                   +  (VRF1)--(VPN1)----(VRF1)  +                   |
|                   + ASBR +              + ASBR +                   |
|                   +  (VRF2)--(VPN2)----(VRF2)  +                   |
|                   +      +______________+      +                   |
|                   ++++++++              ++++++++                   |
|                       |                     |                      |
|                       |                     |                      |
 \                     /                       \                    /
   --------------------                          -------------------

		</artwork>
		</figure>
		<t>
		In option A, the two ASes are connected between each other with physical links on Autonomous System Border Routers (ASBR). There may be multiple physical connections between the ASes for a resiliency purpose.
		A VPN connection, physical or logical (on top of physical), is created for each VPN that needs to cross the AS boundary. A back-to-back VRF model is so created.
		</t>
		<t>This VPN connection can be seen as a site from a service model perspective. Let's say that AS B wants to extend some VPN connection for VPN C on AS A. Administrator of AS B can use this service model to order a site on AS A.
		All connection scenarios could be realized using the current model features. As an example, the figure above, where two physical connections are involved with logical connections per VPN on top, could be seen as a dual-homed subvpn scenario.
		And for example, administrator from AS B will be able to choose the appropriate routing protocol (e.g. ebgp) to dynamically exchange routes between ASes.
		</t>
		<t>
		This document so supposes that option A NNI flavor SHOULD reuse the existing VPN site modeling.
		</t>
		<t>Example : a customer wants from its cloud service provider A to attach its virtual network N to an existing IPVPN (VPN1) he has from a L3VPN service provider B.
		</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
   Cloud Service provider                  L3VPN SP B
           A
  -----------------                    --------------------
 /                 \                  /                    \
|       |           |                |                      |
|  VM --|       ++++++++  NNI    ++++++++                   |---- VPN1
|       |       +      +_________+      +                   |     Site#1
|       |--------(VRF1)---(VPN1)--(VRF1)+                   |
|       |       + ASBR +         + ASBR +                   |
|       |       +      +_________+      +                   |
|       |       ++++++++         ++++++++                   |
|  VM --|           |                |                      |---- VPN1
|       |Virtual    |                |                      |     Site#2
|       |Network    |                |                      |
|  VM --|           |                |                      |---- VPN1
|       |           |                |                      |     Site#3
 \                 /                  \                    /
   ----------------                    -------------------
                                                 |
                                                 |
                                               VPN1 
                                              Site#4

		</artwork>
		</figure>		
		<t>
		The cloud service provider or the customer itself may use our L3VPN service model exposed by service provider B to create the VPN connectivity.
		We could consider that, as the NNI is shared, the physical connection (bearer) between CSP A and SP B already exists. 
		CSPA may so request through a service model a new site creation with a single site-network-access (single homing used in the diagram). As placement constraint, CSP A may use the existing bearer reference it has from SP A to force the placement of the VPN NNI on the existing link.
		The XML below describes what could be the configuration request to SP B :
		</t>
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
	&lt;site-id&gt;CSP_B_attachment&lt;/site-id&gt;
	&lt;location&gt;
		&lt;city-code&gt;NY&lt;/city-code&gt;
		&lt;country-code&gt;US&lt;/country-code&gt;
	&lt;/location&gt;
	&lt;routing-protocols&gt;
	  &lt;routing-protocol&gt;
		&lt;type&gt;bgp&lt;/type&gt;
		&lt;bgp&gt;
			&lt;autonomous-system&gt;500&lt;/autonomous-system&gt;
			&lt;address-family&gt;ipv4&lt;/address-family&gt;
		&lt;/bgp&gt;
	  &lt;/routing-protocol&gt;
	&lt;/routing-protocols&gt;
	&lt;site-network-accesses&gt;
	 &lt;site-network-access&gt;
      &lt;site-network-access-id&gt;CSP_B_VN1&lt;/site-network-access-id&gt;
	   &lt;ip-connection&gt;
	    &lt;ipv4&gt;
		 &lt;address-allocation-type&gt;static-address&lt;/address-allocation-type&gt;
		 &lt;addresses&gt;
		  &lt;provider-address&gt;203.0.113.1&lt;/provider-address&gt;
		  &lt;customer-address&gt;203.0.113.2&lt;/customer-address&gt;
		  &lt;mask&gt;30&lt;/mask&gt;
		 &lt;/addresses&gt;
		&lt;/ipv4&gt;
	   &lt;/ip-connection&gt;
	   &lt;vpn-attachment&gt;
	    &lt;vpn-id&gt;VPN1&lt;/vpn-id&gt;
	    &lt;site-role&gt;any-to-any-role&lt;/site-role&gt;
	   &lt;/vpn-attachment&gt;
	 &lt;/site-network-access&gt;
	&lt;/site-network-accesses&gt;
	&lt;management&gt;
		&lt;type&gt;customer-managed&lt;/type&gt;
	&lt;/management&gt;
	&lt;service&gt;
		&lt;svc-input-bandwidth&gt;450000000&lt;/svc-input-bandwidth&gt;
		&lt;svc-output-bandwidth&gt;450000000&lt;/svc-output-bandwidth&gt;
	&lt;/service&gt;
&lt;/site&gt;
		</artwork>
		</figure>
		<t>
		The case described above is different from the cloud-access container usage as the cloud-access provides a public cloud access while this example enables access to private resources located in a cloud service provider network.
		</t>
		</section>
		<section anchor="interas-b" title="Defining NNI with option B flavor" toc="default">
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
        AS A                                             AS B
  ---------------------                         --------------------
 /                     \                       /                    \
|                       |                     |                      |
|                   ++++++++ InterAS link ++++++++                   |
|                   +      +_____________ +      +                   |
|                   +      +              +      +                   |
|                   + ASBR +&lt;---mpebgp---&gt;+ ASBR +                   |
|                   +      +              +      +                   |
|                   +      +______________+      +                   |
|                   ++++++++              ++++++++                   |
|                       |                     |                      |
|                       |                     |                      |
|                       |                     |                      |
|                   ++++++++ InterAS link ++++++++                   |
|                   +      +_____________ +      +                   |
|                   +      +              +      +                   |
|                   + ASBR +&lt;---mpebgp---&gt;+ ASBR +                   |
|                   +      +              +      +                   |
|                   +      +______________+      +                   |
|                   ++++++++              ++++++++                   |
|                       |                     |                      |
|                       |                     |                      |
 \                     /                       \                    /
   --------------------                          -------------------

		</artwork>
		</figure>
		<t>
		In option B, the two ASes are connected between each other with physical links on Autonomous System Border Routers (ASBR). There may be multiple physical connections between the ASes for a resiliency purpose.
		The VPN "connection" between ASes is done by exchanging VPN routes through MP-BGP.
		</t>
		<t>
		There are multiple flavors of implementations of such NNI, for example :
		<list style="numbers">
		<t>The NNI is a provider internal NNI between for example of backbone and a DC. There is enough trust between the domains to not filter the VPN routes. So all the VPN routes are exchanged. 
		Route target filtering may be implemented to save some unnecessary route states.</t>
		<t>The NNI is used between providers that agreed to exchange VPN routes for specific route-targets only. Each provider is authorized to use the route-target values from the other provider.</t>
		<t>The NNI is used between providers that agreed to exchange VPN routes for specific route-targets only. Each provider has its own route-target scheme. So a customer spanning the two networks will have different route-target in each network for a particular VPN.</t>
		</list>
		</t>
		<t>Case 1 does not require any service modeling, as the protocol enables dynamic exchange of necessary VPN routes.</t>
		<t>Case 2 requires to maintain some route-target filtering policy on ASBRs. From a service modeling point of view, it is necessary to agree on the list of route target to authorize.</t>
		<t>
		In case 3, both ASes need to agree on the VPN route-target to exchange and in addition how to map a VPN route-target from AS A to the corresponding route-target in AS B (and vice-versa).
		</t>
		<t>
		Those modelings are currently out of scope of this document.
		</t>
		</section>
		<section anchor="interas-c" title="Defining NNI with option C flavor" toc="default">
		<figure title="" suppress-title="false" align="left" alt="" width="" height="">
		<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
        AS A                                             AS B
  ---------------------                         --------------------
 /                     \                       /                    \
|                       |                     |                      |
|                       |                     |                      |
|                       |                     |                      |
|                   ++++++++ Multihop ebgp++++++++                   |
|                   +      +              +      +                   |
|                   +      +              +      +                   |
|                   + RGW  +&lt;---mpebgp---&gt;+ RGW  +                   |
|                   +      +              +      +                   |
|                   +      +              +      +                   |
|                   ++++++++              ++++++++                   |
|                       |                     |                      |
|                       |                     |                      |
|                       |                     |                      |
|                       |                     |                      |
|                       |                     |                      |
|                   ++++++++ InterAS link ++++++++                   |
|                   +      +_____________ +      +                   |
|                   +      +              +      +                   |
|                   + ASBR +              + ASBR +                   |
|                   +      +              +      +                   |
|                   +      +______________+      +                   |
|                   ++++++++              ++++++++                   |
|                       |                     |                      |
|                       |                     |                      |
|                       |                     |                      |
|                   ++++++++ InterAS link ++++++++                   |
|                   +      +_____________ +      +                   |
|                   +      +              +      +                   |
|                   + ASBR +              + ASBR +                   |
|                   +      +              +      +                   |
|                   +      +______________+      +                   |
|                   ++++++++              ++++++++                   |
|                       |                     |                      |
|                       |                     |                      |
 \                     /                       \                    /
   --------------------                          -------------------

		</artwork>
		</figure>
		<t>
		From a VPN service perspective, option C NNI is very similar to option B as a MP-BGP session is used to exchange VPN routes between the ASes.
		The difference is that the forwarding and control plane are separated on different nodes, so the MP-BGP is multi-hop between routing gateway (RGW) nodes.
		</t>
		<t>
		Modeling option B and C will be almost identical.
		</t>
		</section>
	  </section>
	  <section anchor="template" title="Using configuration templates" toc="default">
	  <t>
	  The proposed model supports the creation and application of configuration templates for sites.
	  </t>
	  <t>
	  A template can be configured by creating adding a site in the site-template list.
	  The "site-templates" list contains only templates. Real sites are part of the "sites" list.
	  </t>
	  <t>
	  Multiple templates can be configured. Templates can be applied at multiple levels referenced by apply-template leaf.
	  The apply-template references the site-id of the template to be called. The location of the apply-template within the sites hierarchy defines
	  which parameters must be inherited. For example, if apply-template is done on site-network-access container of a site, only site-network-access container parameters (and childs) from the template 
	  will be applied. 
	  </t>
	  <figure title="" suppress-title="false" align="left" alt="" width="" height="">
	  <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site-template&gt;
 &lt;site-id&gt;Template-VoiceCoS-Cust1&lt;/site-id&gt;
  &lt;service&gt;
   &lt;qos&gt;
    &lt;qos-profile&gt;
	 &lt;classes&gt;
	  &lt;class&gt;
       &lt;class-id&gt;REAL_TIME&lt;/class-id&gt;
       &lt;rate-limit&gt;30&lt;/rate-limit&gt;
       &lt;priority-level&gt;10&lt;/priority-level&gt;
      &lt;/class&gt;
      &lt;class&gt;
       &lt;class-id&gt;DATA1&lt;/class-id&gt;
       &lt;priority-level&gt;5&lt;/priority-level&gt;
       &lt;guaranteed-bw-percent&gt;80&lt;/guaranteed-bw-percent&gt;
      &lt;/class&gt;
      &lt;class&gt;
       &lt;class-id&gt;DATA2&lt;/class-id&gt;
       &lt;priority-level&gt;5&lt;/priority-level&gt;
       &lt;guaranteed-bw-percent&gt;20&lt;/guaranteed-bw-percent&gt;
      &lt;/class&gt;
	 &lt;/classes&gt;
   &lt;/qos-profile&gt;
  &lt;/qos&gt;
 &lt;/service&gt;
&lt;/site-template&gt;


&lt;site-template&gt;
	&lt;site-id&gt;Template-VPNsite-Customer1&lt;/site-id&gt;
	&lt;service&gt;
		&lt;qos&gt;
			&lt;qos-profile&gt;
				&lt;profile&gt;PLATINUM&lt;/profile&gt;
			&lt;/qos-profile&gt;
		&lt;/qos&gt;
	&lt;/service&gt;
&lt;/site-template&gt;
	  </artwork>
	  </figure>
	  <t>
	  Site-templates allow to define configuration blocks that will be inherited by one or multiple sites in order to speed up configuration. 
	  For example, if all the sites of an IPVPN service have the almost same configuration (routing-protocol, qos, management ...), 
	  a template can be created and each site of the VPN will reference the template. If a site has some particular parameters, specific parameters within the site
	  MUST always override parameters derived from template.
	  </t>
	  <t>
	  The example above defines two site templates :
	  <list style="symbols">
	  <t>Template-VPNsite-Customer1 that will be used to configure all the VPN sites for customer 1.</t>
	  <t>Template-VoiceCoS-Cust1 that will be used to configure some special CoS policy on some specific accesses of the VPN.</t>
	  </list>
	  In the example below, all sites of VPN1 are inheriting basic configuration from template Template-VPNsite-Customer1. 
	  Some
   specific parameters like svc-input-bandwidth are also defined for
   each site. 
	  </t>
	  <figure title="" suppress-title="false" align="left" alt="" width="" height="">
	  <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
	&lt;site-id&gt;Site1&lt;/site-id&gt;
	&lt;apply-template&gt;Template-VPNsite-Customer1&lt;/apply-template&gt;
	&lt;service&gt;
		&lt;svc-input-bandwidth&gt;5000000&lt;/svc-input-bandwidth&gt;
		&lt;svc-output-bandwidth&gt;5000000&lt;/svc-output-bandwidth&gt;
	&lt;/service&gt;
&lt;/site&gt;
&lt;site&gt;
	&lt;site-id&gt;Site2&lt;/site-id&gt;
	&lt;apply-template&gt;Template-VPNsite-Customer1&lt;/apply-template&gt;
	&lt;service&gt;
		&lt;svc-input-bandwidth&gt;20000000&lt;/svc-input-bandwidth&gt;
		&lt;svc-output-bandwidth&gt;20000000&lt;/svc-output-bandwidth&gt;
	&lt;/service&gt;
&lt;/site&gt;
&lt;site&gt;
	&lt;site-id&gt;Site3&lt;/site-id&gt;
	&lt;apply-template&gt;Template-VPNsite-Customer1&lt;/apply-template&gt;
	&lt;service&gt;
		&lt;svc-input-bandwidth&gt;30000000&lt;/svc-input-bandwidth&gt;
		&lt;svc-output-bandwidth&gt;30000000&lt;/svc-output-bandwidth&gt;
	&lt;/service&gt;
&lt;/site&gt;

	  </artwork>
	  </figure>
	  </section>
	</section>
      
	<section anchor="usage" title="Service model usage example" toc="default">
	<t>
	As explained in <xref target="howto" pageno="false" format="default"/>, this service model is intended to be instantiated at a management layer and is not intended to be used
	directly on network elements. The management system serves as a central point of configuration of the overall service.
	</t>
	<t>This section provides an example on how a management system can use this model to configure an IPVPN service on network elements.</t>
	<t>The example wants to achieve the provisionning of a VPN service for 3 sites using hub and spoke topology. One of the site will be dual homed and loadsharing is expected.</t>
	
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
+-------------------------------------------------------------+
|   Hub_Site  ------ PE1               PE2 ------ Spoke_Site1 |
|      |                   +----------------------------------+   
|      |                   |                           
|      |                   +----------------------------------+                  
|   Hub_Site  ------ PE3               PE4 ------ Spoke_Site2 |
+-------------------------------------------------------------+
	</artwork>
	</figure>
	<t>
	The following XML describes the overall simplified service configuration of this VPN.
	</t>
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;vpn-svc&gt;
	&lt;vpn-id&gt;12456487&lt;/vpn-id&gt;
	&lt;customer-name&gt;CUSTOMER1&lt;/customer-name&gt;
	&lt;topology&gt;hub-spoke&lt;/topology&gt;
&lt;/vpn-svc&gt;
	</artwork>
	</figure>
	<t>
	When receiving the request for provisioning the VPN service, the management system will internally (or through discussion with other OSS component) allocates
	VPN route-targets. In this specific case two RTs will be allocated (100:1 for Hub and 100:2 for Spoke). The output below describes the configuration of Spoke1.
	</t>
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
	&lt;site-id&gt;Spoke_Site1&lt;/site-id&gt;
	&lt;location&gt;
		&lt;city-code&gt;NY&lt;/city-code&gt;
		&lt;country-code&gt;US&lt;/country-code&gt;
	&lt;/location&gt;
	&lt;routing-protocols&gt;
	  &lt;routing-protocol&gt;
		&lt;type&gt;bgp&lt;/type&gt;
		&lt;bgp&gt;
			&lt;autonomous-system&gt;500&lt;/autonomous-system&gt;
			&lt;address-family&gt;ipv4&lt;/address-family&gt;
			&lt;address-family&gt;ipv6&lt;/address-family&gt;
		&lt;/bgp&gt;
	  &lt;/routing-protocol&gt;
	&lt;/routing-protocols&gt;
	&lt;site-network-accesses&gt;
	    &lt;site-network-access&gt;
		    &lt;site-network-access-id&gt;Spoke_Site1&lt;/site-network-access-id&gt;
			   &lt;access-diversity&gt;
				&lt;groups&gt;
				 &lt;group&gt;
				  &lt;group-id&gt;20&lt;/group-id&gt;
				 &lt;/group&gt;
				&lt;/groups&gt;
				&lt;constraints&gt;
				 &lt;constraint&gt;
				  &lt;constraint-type&gt;pe-diverse&lt;/constraint-type&gt;
				  &lt;target&gt;
				   &lt;group&gt;
					&lt;group-id&gt;10&lt;/group-id&gt;
				   &lt;/group&gt;
				  &lt;/target&gt;
				 &lt;/constraint&gt;
				&lt;/constraints&gt;
			   &lt;/access-diversity&gt;
			&lt;ip-connection&gt;
				&lt;ipv4&gt;
					&lt;address-allocation-type&gt;static-address&lt;/address-allocation-type&gt;
					&lt;addresses&gt;
					  &lt;provider-address&gt;203.0.113.254&lt;/provider-address&gt;
					  &lt;customer-address&gt;203.0.113.2&lt;/customer-address&gt;
					  &lt;mask&gt;24&lt;/mask&gt;
					&lt;/addresses&gt;
				&lt;/ipv4&gt;
				&lt;ipv6&gt;
					&lt;address-allocation-type&gt;static-address&lt;/address-allocation-type&gt;
					&lt;addresses&gt;
					  &lt;provider-address&gt;2001:db8::1&lt;/provider-address&gt;
					  &lt;customer-address&gt;2001:db8::2&lt;/customer-address&gt;
					  &lt;mask&gt;64&lt;/mask&gt;
					&lt;/addresses&gt;
				&lt;/ipv6&gt;
			&lt;/ip-connection&gt;
			&lt;vpn-attachment&gt;
				&lt;vpn-id&gt;12456487&lt;/vpn-id&gt;
				&lt;site-role&gt;spoke-role&lt;/site-role&gt;
			&lt;/vpn-attachment&gt;
		&lt;/site-network-access&gt;
	&lt;/site-network-accesses&gt;
	&lt;management&gt;
		&lt;type&gt;provider-managed&lt;/type&gt;
	&lt;/management&gt;
	&lt;service&gt;
		&lt;svc-input-bandwidth&gt;450000000&lt;/svc-input-bandwidth&gt;
		&lt;svc-output-bandwidth&gt;450000000&lt;/svc-output-bandwidth&gt;
	&lt;/service&gt;

	
&lt;/site&gt;
	</artwork>
	</figure>
	<t>
	When receiving the request for provisioning Spoke1 site, the management system MUST allocate network resources for this site. It MUST first decide
	the target network elements to provision the access, and especially the PE router (and may be an aggregation switch).
	As described in <xref target="site-location-prov" pageno="false" format="default"/>, the management system SHOULD use the location information and SHOULD use the access-diversity constraint to find the appropriate PE.
	In this case, we consider Spoke1 requires PE diversity with Hub and that management system allocate PEs based on lowest distance. Based on the location information, the management
	system finds the available PEs in the nearest area of the customer and picks one that fits the access-diversity constraint.
	</t>
	<t>
	When the PE is chosen, management system needs to allocate interface resources on the node, one interface is so picked from the PE available pool.
	The management system can start provisioning the PE node by using any mean (Netconf, CLI, ...). The management system will check if a VRF is already present that fits the needs.
	If not, it will provision the VRF : Route distinguisher will come from internal allocation policy model, route-targets are coming from the vpn-policy configuration of the site (management system allocated some RTs for the VPN).
	As the site is a spoke site (site-role), the management system knows which RT must be imported and exported. As the site is provider managed, some management route-targets may also be added (100:5000).	
	Standard provider VPN policies MAY also be added in the configuration.
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
Example of generated PE configuration :

ip vrf Customer1
 export-map STD-CUSTOMER-EXPORT      &lt;---- Standard SP configuration
 route-distinguisher 100:3123234324
 route-target import 100:1
 route-target import 100:5000        &lt;---- Standard SP configuration
 route-target export 100:2                    for provider managed
!
	</artwork>
	</figure>
	</t>
	<t>
	When the VRF has been provisioned, the management system can start configuring the access on the PE using the allocated interface information. 
	IP addressing is chosen by the management system. One address will be picked from an allocated subnet for the PE, another will be used for the CE configuration.  
	Routing protocols will also be configured between PE and CE and due to provider managed model, the choice is up to service provider : BGP was chosen for the example.  
	This choice is independant of the routing protocol chosen by customer.  For the CE - LAN part, bgp will be used as requested in the service model.  
	Peering addresses will be derived from those of the connection.
    As CE is provider managed, CE AS number can be automatically allocated by the management system.
	Some provider standard configuration templates may also be added.
	</t>
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
Example of generated PE configuration :

interface Ethernet1/1/0.10
 encapsulation dot1q 10
 ip vrf forwarding Customer1 
 ip address 198.51.100.1 255.255.255.252 &lt;---- Comes from 
                                                 automated allocation
 ipv6 address 2001:db8::10:1/64
 ip access-group STD-PROTECT-IN     &lt;---- Standard SP config
!
router bgp 100
 address-family ipv4 vrf Customer1
  neighbor 198.51.100.2 remote-as 65000   &lt;---- Comes from 
                                              automated allocation
  neighbor 198.51.100.2 route-map STD in  &lt;---- Standard SP config
  neighbor 198.51.100.2 filter-list 10 in &lt;---- Standard SP config
!
 address-family ipv6 vrf Customer1
  neighbor 2001:db8::0A10:2 remote-as 65000   &lt;---- Comes from 
                                              automated allocation
  neighbor 2001:db8::0A10:2 route-map STD in  &lt;---- Standard SP config
  neighbor 2001:db8::0A10:2 filter-list 10 in &lt;---- Standard SP config
!
ip route vrf Customer1 192.0.2.1 255.255.255.255 198.51.100.2
! Static route for provider administration of CE
!
	</artwork>
	</figure>
	<t>
	As the CE router is not reachable at this stage, the management system can produce a complete CE configuration that can be uploaded to the node by manual operation before sending the CE to customer premise.
	The CE configuration will be built as for the PE. Based on the CE type (vendor/model) allocated to the customer and bearer information, the management system knows which interface must be configured on the CE.
	PE-CE link configuration is expected to be handled automatically using the service provider OSS as both resources are managed internally.
	
	CE to LAN interface parameters like IP addressing are derived from ip-connection taking into account how management system distributes addresses between PE and CE within the subnet.
	This will allow to produce a plug'n'play configuration for the CE.
	</t>
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
Example of generated CE configuration :

interface Loopback10
 description "Administration"
 ip address 192.0.2.1 255.255.255.255
!
interface FastEthernet10
 description "WAN"
 ip address 198.51.100.2 255.255.255.252 &lt;---- Comes from 
                                                automated allocation
 ipv6 address 2001:db8::0A10:2/64
!
interface FastEthernet11
 description "LAN"
 ip address 203.0.113.254 255.255.255.0 &lt;---- Comes from
                                          ip-connection
 ipv6 address 2001:db8::1/64
!
router bgp 65000
 address-family ipv4
  redistribute static route-map STATIC2BGP &lt;---- Standard SP 
                                                    configuration
  neighbor 198.51.100.1 remote-as 100     &lt;---- Comes from 
                                              automated allocation
  neighbor 203.0.113.2 remote-as 500     &lt;---- Comes from 
                                              ip-connection
 address-family ipv6
  redistribute static route-map STATIC2BGP &lt;---- Standard SP 
                                                    configuration
  neighbor 2001:db8::0A10:1 remote-as 100     &lt;---- Comes from 
                                              automated allocation
  neighbor 2001:db8::2 remote-as 500     &lt;---- Comes from 
                                              ip-connection
!
route-map STATIC2BGP permit 10
 match tag 10
!

	</artwork>
	</figure>
    </section>
	
    <section anchor="interaction" title="Interaction with Other YANG Modules" toc="default">
	<t>As expressed in <xref target="howto" pageno="false" format="default"/>, this service module is intended to be instantiated in management system and not directly on network elements.</t>
	<t>It will be the role of the management system to configure the network elements. The management system MAY be modular, 
	so the component instantiating the service model (let's call it service component) and the component responsible for network element configuration (let's call it configuration component) MAY be different.
	</t>
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
	     L3VPN-SVC         |         
	       service model   |
		                   |
                +----------------------+ 
                |   Service component  | service datastore
                +----------------------+ 
				           | 
						   |
				+----------------------+ 
           +----|   Config component   |-------+ 
          /     +----------------------+        \   Network
         /            /            \             \  Configuration 
		/		     /              \             \ models       
       /            /                \             \
+++++++         ++++++++             ++++++++       +++++++
+ CEA + ------- + PE A +             + PE B + ----- + CEB + Config
+++++++         ++++++++             ++++++++       +++++++ datastore

Site A                                       Site B
	</artwork>
	</figure>
	<t>
	In the previous sections, we provided some example of translation of service provisioning request to router configuration lines as illustration.
	In the NetConf/Yang ecosystem, it will be expected NetConf/YANG to be used between configuration component and network elements to configure the
	requested service on these elements.
	</t>
	<t>
	In this framework, it is expected from standardization to also work on specific configuration YANG modelization of service components on network elements.
	There will be so a strong relation between the abstracted view provided by this service model and the detailed configuration view that will be provided by specific
	configuration models for network elements.
	</t>
	<t>Authors of this document are expecting definition of YANG models for network elements on this non exhaustive list of items :
	<list style="symbols">
	<t>VRF definition including VPN policy expression.</t>
	<t>Physical interface.</t>
	<t>IP layer (IPv4, IPv6).</t>
	<t>QoS : classification, profiles...</t>
	<t>Routing protocols : support of configuration of all protocols listed in the document, as well as routing policies associated with these protocols.</t>
	<t>Multicast VPN.</t>
	<t>Network Address Translation.</t>
	<t>...</t>
	</list>
	</t>
	<t>
	Example of VPN site request at service level using this model :
	</t>
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;site&gt;
 &lt;site-id&gt;Site A&lt;/site-id&gt;
 &lt;site-network-accesses&gt;
  &lt;site-network-access&gt;
   &lt;ip-connection&gt;
    &lt;ipv4&gt;
     &lt;address-allocation-type&gt;static-address&lt;/address-allocation-type&gt;
     &lt;addresses&gt;
      &lt;provider-address&gt;203.0.113.254&lt;/provider-address&gt;
      &lt;customer-address&gt;203.0.113.2&lt;/customer-address&gt;
      &lt;mask&gt;24&lt;/mask&gt;
     &lt;/addresses&gt;
    &lt;/ipv4&gt;
   &lt;/ip-connection&gt;
   &lt;vpn-attachment&gt;
    &lt;vpn-policy-id&gt;VPNPOL1&lt;/vpn-policy-id&gt;
   &lt;/vpn-attachment&gt;
  &lt;/site-network-access&gt;
 &lt;/site-network-accesses&gt;
 &lt;routing-protocols&gt;
  &lt;routing-protocol&gt;
   &lt;type&gt;static&lt;/type&gt;
   &lt;static&gt;
    &lt;cascaded-lan-prefixes&gt;
     &lt;ipv4-lan-prefixes&gt;
	  &lt;lan&gt;198.51.100.0/30&lt;/lan&gt;
	  &lt;next-hop&gt;203.0.113.2&lt;/next-hop&gt;
	 &lt;/ipv4-lan-prefixes&gt;
    &lt;/cascaded-lan-prefixes&gt;
   &lt;/static&gt;
  &lt;/routing-protocol&gt;
 &lt;/routing-protocols&gt;
 &lt;management&gt;
  &lt;type&gt;customer-managed&lt;/type&gt;
 &lt;/management&gt;
 &lt;vpn-policy-list&gt;
  &lt;vpn-policy&gt;
    &lt;vpn-policy-id&gt;VPNPOL1&lt;/vpn-policy-id&gt;
	&lt;entries&gt;
		&lt;id&gt;1&lt;/id&gt;
		&lt;vpn&gt;
			&lt;vpn-id&gt;VPN1&lt;/vpn-id&gt;
			&lt;site-role&gt;any-to-any-role&lt;/site-role&gt;
		&lt;/vpn&gt;
	&lt;/entries&gt;
  &lt;/vpn-policy&gt;
 &lt;/vpn-policy-list&gt;
&lt;/site&gt;
   </artwork>
	  </figure>
	  
	<t>
	In the service example above, it is expected that the service component requests to the configuration component of the management system the configuration of the service elements.
	If we consider that service component selected a PE (PE A) as target PE for the site, the configuration component will need to push the configuration to PE A.
	The configuration component will use several YANG data models to define the configuration to be applied to PE A. The XML configuration of PE-A may look like this :
	</t>
	<figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;if:interfaces&gt;
     &lt;if:interface&gt;
      &lt;if:name&gt;eth0&lt;/if:name&gt;
      &lt;if:type&gt;ianaift:ethernetCsmacd&lt;/if:type&gt;
      &lt;if:description&gt;
       Link to CEA.
      &lt;/if:description&gt;
      &lt;ip:ipv4&gt;
       &lt;ip:address&gt;
        &lt;ip:ip&gt;203.0.113.254&lt;/ip:ip&gt;
        &lt;ip:prefix-length&gt;24&lt;/ip:prefix-length&gt;
       &lt;/ip:address&gt;
       &lt;ip:forwarding&gt;true&lt;/ip:forwarding&gt;
      &lt;/ip:ipv4&gt;
     &lt;/if:interface&gt;
&lt;/if:interfaces&gt;
&lt;rt:routing&gt;
     &lt;rt:routing-instance&gt;
      &lt;rt:name&gt;VRF_CustA&lt;/rt:name&gt;
	  &lt;rt:type&gt;l3vpn:vrf&lt;/rt:type&gt;
      &lt;rt:description&gt;VRF for CustomerA&lt;/rt:description&gt;
	  &lt;l3vpn:route-distinguisher&gt;
	  100:1546542343
	  &lt;/l3vpn:route-distinguisher&gt;
	  &lt;l3vpn:import-rt&gt;100:1&lt;/l3vpn:import-rt&gt;
	  &lt;l3vpn:export-rt&gt;100:1&lt;/l3vpn:export-rt&gt;
      &lt;rt:interfaces&gt;
       &lt;rt:interface&gt;
        &lt;rt:name&gt;eth0&lt;/rt:name&gt;
       &lt;/rt:interface&gt;
      &lt;/rt:interfaces&gt;
      &lt;rt:routing-protocols&gt;
       &lt;rt:routing-protocol&gt;
        &lt;rt:type&gt;rt:static&lt;/rt:type&gt;
        &lt;rt:name&gt;st0&lt;/rt:name&gt;
        &lt;rt:static-routes&gt;
         &lt;v4ur:ipv4&gt;
          &lt;v4ur:route&gt;
           &lt;v4ur:destination-prefix&gt;
		   198.51.100.0/30
		   &lt;/v4ur:destination-prefix&gt;
           &lt;v4ur:next-hop&gt;
			&lt;v4ur:next-hop-address&gt;
			203.0.113.2
			&lt;/v4ur:next-hop-address&gt;
		   &lt;/v4ur:next-hop&gt;
          &lt;/v4ur:route&gt;
         &lt;/v4ur:ipv4&gt;
        &lt;/rt:static-routes&gt;
       &lt;/rt:routing-protocol&gt;
      &lt;/rt:routing-protocols&gt;
     &lt;/rt:routing-instance&gt;
&lt;/rt:routing&gt;
	
	</artwork>
	</figure>

	
    </section>

    <section anchor="yang" title="YANG Module" toc="default">

      <figure title="" suppress-title="false" align="left" alt="" width="" height="">
	<artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
&lt;CODE BEGINS&gt; file "ietf-l3vpn-svc@2016-06-09.yang"

module ietf-l3vpn-svc {
	namespace "urn:ietf:params:xml:ns:yang:ietf-l3vpn-svc";
	
	prefix l3vpn-svc;
	
	import ietf-inet-types {
		prefix inet;
	}
	
	import ietf-yang-types {
		prefix yang;
	}
	
	organization
	 "IETF L3SM Working Group";
	 
	contact
		"WG List:	&amp;lt;mailto:l3sm@ietf.org&amp;gt;
		
		Editor:		

		";
	
	description 
		"The YANG module defines a generic service configuration 
		model for Layer 3 VPN common across all of the vendor 
		implementations.";

	revision 2016-06-09 {
		description
		 "Traffic protection moved to site level.
		  Decouple operational-requirements in two containers.
		 ";
		reference "draft-ietf-l3sm-l3vpn-service-yang-08";
	}
	revision 2016-06-06 {
		description
		 "Set config false to actual-site-start and stop
		  Add a container before cloud-access list
		  Add a container before authorized-sites list
		  Add a container before denied-sites list
		  Modified access-diversity modeling
		  Replacing type placement diversity by an identity";
		reference "draft-ietf-l3sm-l3vpn-service-yang-07";
	}
	revision 2016-04-19 {
		description
		 "* remove reference to core routing model :
			created new address family identities
		  * added features
		  * Modified bearer parameters
		  * Modified union for ipv4/ipv6 addresses to ip-address
		  type
		  * Add BSR parameters for multicast
		  * Add applications matching for QoS classification
		  ";
		reference "draft-ietf-l3sm-l3vpn-service-yang-06";
	}
	revision 2016-04-05 {
		description
		 "
		 * Added linecard diverse for site diversity
		 * Added a new diversity enum in placement-diversity : none
		 * Added state to site location
		 
		 ";
		reference "";
	}
	revision 2016-03-11 {
		description
		"
			* Modify VPN policy and creating a vpn-policy-list
			* Add VPN policy reference and VPN ID reference
			under site-network-access
		";
		reference "draft-ietf-l3sm-l3vpn-service-yang-05";
	}
	revision 2016-01-04 {
		description
		"
			* Add extranet-vpn container in vpn-svc
			* Creating top level containers
			* Refine groupings
			* Added site-vpn-flavor
		";
		reference "draft-ietf-l3sm-l3vpn-service-yang-03";
	}
	revision 2016-01-04 {
		description
		 "
			* qos-profile moved to choice
			* vpn leaf moved to vpn-id in vpn-policy
			* added ordered-by user to qos classification list
			* moved traffic protection to access availability
			* creating a choice in matching filter for VPN policy
			* added dot1p matching field in flow-definition
		";
		reference "";
		
	}
	revision 2015-12-07 {
		description
		 "
			* A site is now a collection of site-accesses.
			This was introduced to support M to N availability.
			* Site-availability has been removed, replaced by 
			availability parameters under site-accesses
			* Added transport-constraints within vpn-svc
		";
		reference "draft-ietf-l3sm-l3vpn-service-yang-02";
			
	}
	
	revision 2015-11-03 {
		description "
		* Add ToS support in match-flow
		* nexthop in cascaded lan as mandatory
		* customer-specific-info deleted and moved to routing
		protocols
		* customer-lan-connection modified : need prefix and CE address
		* add choice in managing PE-CE addressing
		* Simplifying traffic protection
		";
		reference "";
	}
	revision 2015-09-10 {
		description "
		* Refine groupings for vpn-svc
		* Removed name in vpn-svc
		* id in vpn-svc moved to string
		* Rename id in vpn-svc to vpn-id
		* Changed key of vpn-svc list to vpn-id
		* Add DSCP support in flow definition
		";
		reference "";
	}
	revision 2015-08-07 {
		description
		 "
		  Multicast :
			* Removed ACL from security
			* Add FW for site and cloud access
		 ";
		reference "";
	}
	revision 2015-08-05 {
		description
		 "
		  Multicast :
		  * Removed anycast-rp identity as discovery mechanism
		  * Added rp-group mappings for multicast
		  * Added flag for provider managed RP.
		 ";
		reference "";
	}
	revision 2015-08-03 {
		description
		 " * Creating multiple reusable groupings
		   * Added mpls leaf in vpn-svc for carrier's carrier case
		   * Modify identity single to single-site
		   * Modify site-type to site-role and also child identities.
		   * Creating OAM container under site and moved BFD in.
		   * Creating flow-definition grouping to be reused 
		   in ACL, QoS ...
		   * Simplified VPN policy.
		   * Adding multicast static group to RP mappings.
		   * Removed native-vpn and site-role from global site 
		   cfg, now managed within the VPN policy.
		   * Creating a separate list for site templates.
		 ";
		reference "draft-ietf-l3sm-l3vpn-service-yang-01";
	}
	revision 2015-07-02 {
		reference "draft-ietf-l3sm-l3vpn-service-yang-00";
	}
	revision 2015-04-24 {
		description "
		* Add encryption parameters
		* Adding holdtime for BFD.
		* Add postal address in location
		";
		reference "draft-lstd-l3sm-l3vpn-service-yang-00";
	}
	revision 2015-02-05 {
		description "Initial revision.";
		reference "draft-l3vpn-service-yang-00";
	}

	/* Features */
	
	feature cloud-access {
		description
		 "Allow VPN to connect to a Cloud Service 
		 provider.";
	}
	feature multicast {
		description
		"Enables multicast capabilities in a VPN";
	}
	feature ipv4 {
		description
		"Enables IPv4 support in a VPN";
	}
	feature ipv6 {
		description
		"Enables IPv6 support in a VPN";
	}
	feature carrierscarrier {
		description
		"Enables support of carrier's carrier";
	}
	feature traffic-engineering {
		description
		"Enables support of transport constraint.";
	}
	feature traffic-engineering-multicast {
		description
		"Enables support of transport constraint
		for multicast.";
	}
	feature extranet-vpn {
		description
		"Enables support of extranet VPNs";
	}
	feature site-diversity {
		description
		"Enables support of site diversity constraints";
	}
	feature encryption {
		description
		"Enables support of encryption";
	}
	feature qos {
		description
		"Enables support of Class of Services";
	}
	feature qos-custom {
		description
		"Enables support of custom qos profile";
	}
	feature rtg-bgp {
		description
		"Enables support of BGP routing protocol.";
	}
	feature rtg-rip {
		description
		"Enables support of RIP routing protocol.";
	}
	feature rtg-ospf {
		description
		"Enables support of OSPF routing protocol.";
	}
	feature rtg-ospf-sham-link {
		description
		"Enables support of OSPF sham-links.";
	}
	feature rtg-vrrp {
		description
		"Enables support of VRRP routing protocol.";
	}
	feature fast-reroute {
		description
		"Enables support of Fast Reroute.";
	}
	feature bfd {
		description
		"Enables support of BFD.";
	}
	feature always-on {
		description
		"Enables support for always-on access
		constraint.";
	}
	feature requested-type {
		description
		"Enables support for requested-type access
		constraint.";
	}
	feature bearer-reference {
		description
		"Enables support for bearer-reference access
		constraint.";
	}
	
	/* Typedefs */
	
	typedef svc-id {
		type string;
		description
		 "Defining a type of service component 
		 identificators.";
	}
	
	typedef template-id {
		type string;
		description
		 "Defining a type of service template 
		 identificators.";
	}
	
	
	
	/* Identities */
	
	identity placement-diversity {
		description
		 "Base identity for site placement 
		 constraints";
	}
	identity pe-diverse {
		base placement-diversity;
		description
		"Identity for PE diversity";
	}
	identity pop-diverse {
		base placement-diversity;
		description
		"Identity for POP diversity";
	}
	identity linecard-diverse {
		base placement-diversity;
		description
		"Identity for linecard diversity";
	}
	identity same-pe {
		base placement-diversity;
		description
		"Identity for having sites connected
		on the same PE";
	}
	identity same-bearer {
		base placement-diversity;
		description
		"Identity for having sites connected
		using the same bearer";
	}
	
	identity customer-application {
		description
		 "Base identity for customer application";
	}
	identity web {
		base customer-application;
		description
		 "Identity for web application (e.g. HTTP,HTTPS)";
	}
	identity mail {
		base customer-application;
		description
		 "Identity for mail applications";
	}
	identity file-transfer {
		base customer-application;
		description
		 "Identity for file transfer applications (
		 e.g. FTP, SFTP, ...)";
	}
	identity database {
		base customer-application;
		description
		 "Identity for database applications";
	}
	identity social {
		base customer-application;
		description
		 "Identity for social network applications";
	}
	identity games {
		base customer-application;
		description
		 "Identity for gaming applications";
	}
	identity p2p {
		base customer-application;
		description
		 "Identity for peer to peer applications";
	}
	identity network-management {
		base customer-application;
		description
		 "Identity for management applications (e.g. telnet
			syslog, snmp ...)";
	}
	identity voice {
		base customer-application;
		description
		 "Identity for voice applications";
	}
	identity video {
		base customer-application;
		description
		 "Identity for video conference applications";
	}
	
	
	identity address-family {
		description
		 "Base identity for an address family.";
	}
	identity ipv4 {
		base address-family;
		description
		"Identity for IPv4 address family.";
	}
	identity ipv6 {
		base address-family;
		description
		"Identity for IPv6 address family.";
	}
	
	
	identity site-vpn-flavor {
		description
		"Base identity for the site VPN service flavor.";
	}
	identity site-vpn-flavor-single {
		base site-vpn-flavor;
		description
		"Base identity for the site VPN service flavor.
		Used when the site belongs to only one VPN.";
	}
	identity site-vpn-flavor-multi {
		base site-vpn-flavor;
		description
		"Base identity for the site VPN service flavor.
		Used when a logical connection of a site 
		belongs to multiple VPNs.";
	}

	identity site-vpn-flavor-sub {
		base site-vpn-flavor;
		description
		"Base identity for the site VPN service flavor.
		Used when a site has multiple logical connections.
		Each of the connection may belong to different
		multiple VPNs.";
	}
	
	identity transport-constraint {
		description
		 "Base identity for transport constraint.";
	}
	identity tc-latency {
		base transport-constraint;
		description
		 "Base identity for transport constraint 
		 based on latency.";
	}
	identity tc-jitter {
		base transport-constraint;
		description
		 "Base identity for transport constraint 
		 based on jitter.";
	}
	identity tc-bandwidth {
		base transport-constraint;
		description
		 "Base identity for transport constraint 
		 based on bandwidth.";
	}
	identity tc-path-diversity {
		base transport-constraint;
		description
		 "Base identity for transport constraint 
		 based on path diversity.";
	}
	identity tc-site-diversity {
		base transport-constraint;
		description
		 "Base identity for transport constraint 
		 based on site diversity.";
	}
	
	identity management {
		description
		 "Base identity for site management scheme.";
	}
	identity co-managed {
		base management;
		description
		 "Base identity for comanaged site.";	 
	}
	identity customer-managed {
		base management;
		description
		 "Base identity for customer managed site.";	 
	}
	identity provider-managed {
		base management;
		description
		 "Base identity for provider managed site.";	 
	}

	identity address-allocation-type {
		description
		 "Base identity for address-allocation-type
		 for PE-CE link.";
	}
	identity pe-dhcp {
		base address-allocation-type;
		description
		 "PE router provides DHCP service to CE.";
	}
	identity static-address {
		base address-allocation-type;
		description
		 "PE-CE addressing is static.";
	}
	identity slaac {
		base address-allocation-type;
		description
		 "Use IPv6 SLAAC.";
	}
		
	
	identity site-role {
		description
		 "Base identity for site type.";
	}
	identity any-to-any-role {
		base site-role;
		description
		 "Site in a any to any IPVPN.";
	}
	identity spoke-role {
		base site-role;
		description
		 "Spoke Site in a Hub &amp; Spoke IPVPN.";
	}
	identity hub-role {
		base site-role;
		description
		 "Hub Site in a Hub &amp; Spoke IPVPN.";
	}
	
	
	identity vpn-topology {
		description
		 "Base identity for VPN topology.";
	}
	identity any-to-any {
		base vpn-topology;
		description
		 "Identity for any to any VPN topology.";
	}
	identity hub-spoke {
		base vpn-topology;
		description
		 "Identity for Hub'n'Spoke VPN topology.";
	}
	identity hub-spoke-disjoint {
		base vpn-topology;
		description
		 "Identity for Hub'n'Spoke VPN topology
		  where Hubs cannot talk between each other.";
	}
	
	identity multicast-tree-type {
		description
		 "Base identity for multicast tree type.";
	}
	
	identity ssm-tree-type {
		base multicast-tree-type;
		description
		 "Identity for SSM tree type.";
	}
	identity asm-tree-type {
		base multicast-tree-type;
		description
		 "Identity for ASM tree type.";
	}
	identity bidir-tree-type {
		base multicast-tree-type;
		description
		 "Identity for BiDir tree type.";
	}
	
	identity multicast-rp-discovery-type {
		description
		 "Base identity for rp discovery type.";
	}
	identity auto-rp {
		base multicast-rp-discovery-type;
		description
		 "Base identity for auto-rp discovery type.";
	}
	identity static-rp {
		base multicast-rp-discovery-type;
		description
		 "Base identity for static type.";
	}
	identity bsr-rp {
		base multicast-rp-discovery-type;
		description
		 "Base identity for BDR discovery type.";
	}
	
	identity routing-protocol-type {
		description
		 "Base identity for routing-protocol type.";
	}
	
	identity ospf {
		base routing-protocol-type;
		description
		 "Identity for OSPF protocol type.";
	}
	
	identity bgp {
		base routing-protocol-type;
		description
		 "Identity for BGP protocol type.";
	}
	
	identity static {
		base routing-protocol-type;
		description
		 "Identity for static routing protocol type.";
	}
	
	identity rip {
		base routing-protocol-type;
		description
		 "Identity for RIP protocol type.";
	}
	
	identity rip-ng {
		base routing-protocol-type;
		description
		 "Identity for RIPng protocol type.";
	}
	
	identity vrrp {
		base routing-protocol-type;
		description
		 "Identity for VRRP protocol type.
		 This is to be used when LAn are directly connected
		 to provider Edge routers.";
	}
	
	identity direct {
		base routing-protocol-type;
		description
		 "Identity for direct protocol type.
		.";
	}
	
	identity protocol-type {
		description
		 "Base identity for protocol field type.";
	}
	
	identity tcp {
		base protocol-type;
		description
		 "TCP protocol type.";
	}
	identity udp {
		base protocol-type;
		description
		 "UDP protocol type.";
	}
	identity icmp {
		base protocol-type;
		description
		 "icmp protocol type.";
	}
	identity icmp6 {
		base protocol-type;
		description
		 "icmp v6 protocol type.";
	}
	identity gre {
		base protocol-type;
		description
		 "GRE protocol type.";
	}
	identity ipip {
		base protocol-type;
		description
		 "IPinIP protocol type.";
	}
	identity hop-by-hop {
		base protocol-type;
		description
		 "Hop by Hop IPv6 header type.";
	}
	identity routing {
		base protocol-type;
		description
		 "Routing IPv6 header type.";
	}
	identity esp {
		base protocol-type;
		description
		 "ESP header type.";
	}
	identity ah {
		base protocol-type;
		description
		 "AH header type.";
	}
	

	
	/* Groupings */
	
	
	

	
	grouping vpn-service-cloud-access {
		container cloud-accesses {
		list cloud-access {
			if-feature cloud-access;
			key cloud-identifier;
			
			leaf cloud-identifier {
				type string;
				description
				 "Identification of cloud service. Local
				 admin meaning.";
			}
			container authorized-sites {
				list authorized-site {
					key site-id;
					
					leaf site-id {
						type leafref {
							path "/l3vpn-svc/sites/site/site-id";
						}
						description
						 "Site ID.";
					}
					description
					 "List of authorized sites.";
				}
				description
				"Configuration of authorized sites";
			}
			container denied-sites {
				list denied-site {
					key site-id;
					
					leaf site-id {
						type leafref {
							path "/l3vpn-svc/sites/site/site-id";
						}
						description
						 "Site ID.";
					}
					description
					 "List of denied sites.";
				}
				description
				"Configuration of denied sites";
			}
			leaf nat-enabled {
				type boolean;
				description
				 "Control if NAT is required or not.";
			}
			leaf customer-nat-address {
				type inet:ipv4-address;
				description
				 "NAT address to be used in case of public 
				 or shared cloud.
				 This is to be used in case customer is providing 
				 the public address.";
			}
			description
			 "Cloud access configuration.";
		}
			description
			 "Container for cloud access configurations";
		}
		description
		 "grouping for vpn cloud definition";
	}
	
	grouping multicast-rp-group-cfg {
		choice group-format {
			case startend {
				leaf group-start {
					type inet:ip-address;
					description
					 "First group address.";
				}
				leaf group-end {
					type inet:ip-address;
					description
					 "Last group address.";
				}
			}
			case singleaddress {
				leaf group-address {
					type inet:ip-address;
					description
					 "Group address";
				}
			}
			description 
			 "Choice for group format.";
		}
		description
		 "Definition of groups for
		 RP to group mapping.";
	}
	
	grouping vpn-service-multicast {
		container multicast {
			if-feature multicast;
			leaf enabled {
				type boolean;
				default false;
				description
				 "Enable multicast.";
			}
			container customer-tree-flavors {
				list tree-flavor {
					key type;
					
					leaf type {
						type identityref {
							base multicast-tree-type;
						}
						description
						 "Type of tree to be used.";
					}
					description
					 "List of tree flavors.";
				}
				description
				 "Type of trees used by customer.";
			}
			container rp {
				container rp-group-mappings {
					list rp-group-mapping {
						key "id";
						
						leaf id {
							type uint16;
							description
							 "Unique identifier for the mapping.";
						}
						container provider-managed {
							leaf enabled {
								type boolean;
								default false;
								description
								 "Set to true, if the RP must be a 
								 provider
								 managed node. 
								 Set to false, if it is a customer
								 managed node.";
							}
										
							leaf rp-redundancy { 
								when "../enabled = true" {
									description
									 "Relevant when RP
									 is provider managed.";
								}
								type boolean;
								default false;
								description
								 "If true, redundancy
								 mechanism for RP is required.";
							}
							leaf optimal-traffic-delivery { 
								when "../enabled = true" {
									description
									 "Relevant when RP
									 is provider managed.";
								}
								type boolean;
								default false;
								description
								 "If true, SP must ensure
								 that traffic uses an optimal path.";
							}
							description
							 "Parameters for provider managed RP.";
						}	
						
						leaf rp-address {
							when "../provider-managed/enabled=false" {
								description
								 "Relevant when RP
								 is provider managed.";
							}
							type inet:ip-address;
							description
							"Defines the address of the 
							RendezvousPoint.
							Used if RP is customer managed.";
						}
						
						container groups {
							list group {
								key id;
								
								leaf id {
									type uint16;
									description
									 "Identifier for the group.";
								}
								uses multicast-rp-group-cfg;
								description
								"List of groups.";
							}
							description
							 "Multicast groups associated with RP.";
						}

						description
						 "List of RP to group mappings.";
					}
					description
					"RP to group mappings.";
				}
				container rp-discovery {
					leaf rp-discovery-type {
						type identityref {
							base multicast-rp-discovery-type;
						}
						default static-rp;
						description
						 "Type of RP discovery used.";
					}
					container bsr-candidates {
						when "../rp-discovery-type=bsr-rp" {
							description
							 "Only applicable if discovery type
							 is BSR-RP";
						}
						list bsr-candidate {
							key address;
							
							leaf address {
								type inet:ip-address;
								description
								 "Address of BSR candidate";
							}
							
							description
							 "List of customer BSR candidates";
						}
						description
						 "Customer BSR candidates address";
					}
					description
					 "RP discovery parameters";
				}
				
				description
				 "RendezvousPoint parameters.";
			}
			description
				"Multicast global parameters for the VPN service.";
		}
		description
		 "grouping for multicast vpn definition";
	}
	
	grouping vpn-service-mpls {
		leaf carrierscarrier {
			if-feature carrierscarrier;
			type boolean;
			default false;
			description
			 "The VPN is using Carrier's Carrier,
			 and so MPLS is required.";
		}
		description
		 "grouping for mpls CsC definition";
	}
	
	
	grouping customer-location-info {
		container location {
				leaf address {
					type string;
					description
					"Address (number and street)
					of the site.";
					
				}
				leaf zip-code {
					type string;
					description
					"ZIP code of the site.";
				}
				leaf state {
					type string;
					description
					"State of the site.
					This leaf can also be used 
					to describe a region
					for country who does not have
					states.
					";
				}
				leaf city {
					type string;
					description
					 "City of the site.";
				}
				leaf country-code {
					type string;
					description
					 "Country of the site.";
				}
				description
					"Location of the site.";
		}
		description
		 "This grouping defines customer location
		  parameters";
	}
	
	grouping site-diversity {
		container site-diversity {
				if-feature site-diversity;

				container groups {
					list group {
						key group-id;
						
						leaf group-id {
							type string;
							description
							 "Group-id the site
							 is belonging to";
						}
						description
						"List of group-id";
					}
					description
					 "Groups the site
					 is belonging to.
					 All site network accesses will
					 inherit those group values.";
				}
				description
					 "Diversity constraint type.";
			}
		description
		 "This grouping defines site diversity
		  parameters";
	}
	grouping access-diversity {
		container access-diversity {
				if-feature site-diversity;
				container groups {
					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 site network access
					 is belonging to";
				}
				container constraints {
					list constraint {
						key constraint-type;
						
						leaf constraint-type {
							type identityref {
								base 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
										 "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.";
			}
		description
		 "This grouping defines access diversity
		  parameters";
	}
	
	grouping operational-requirements {
		  leaf requested-site-start {
			   type yang:date-and-time;
			   description
				"Optional leaf indicating requested date 
				and time
				when the service at a particular site is 
				expected
				to start";
		   }

		   leaf requested-site-stop {
			   type yang:date-and-time;
			   description
				"Optional leaf indicating requested date 
				and time
				when the service at a particular site is 
				expected
				to stop";
		   }
		description
		 "This grouping defines some operational parameters
		  parameters";
	}
	grouping operational-requirements-ops {
		   leaf actual-site-start {
			   type yang:date-and-time;
			   config false;
			   description
				"Optional leaf indicating actual date 
				and time
				when the service at a particular site 
				actually
				started";
		   }
		   leaf actual-site-stop {
			   type yang:date-and-time;
			   config false;
			   description
				"Optional leaf indicating actual date 
				and time
				when the service at a particular site 
				actually
				stopped";
		   }
		description
		 "This grouping defines some operational parameters
		  parameters";
	}
	
	grouping flow-definition {
		container match-flow {
			leaf dscp {
				type uint8 {
					range "0 .. 63";
				}
				description
				 "DSCP value.";
			}
			leaf tos {
				type uint8 {
					range "0 .. 254";
				}
				description
				 "TOS value.";
			}
			leaf dot1p {
				type uint8 {
					range "0 .. 7";
				}
				description
				"802.1p matching.";
			}
			leaf ipv4-src-prefix {
				type inet:ipv4-prefix;
				description
				 "Match on IPv4 src address.";
			}
			leaf ipv6-src-prefix {
				type inet:ipv6-prefix;
				description
				 "Match on IPv6 src address.";
			}
			leaf ipv4-dst-prefix {
				type inet:ipv4-prefix;
				description
				 "Match on IPv4 dst address.";
			}
			leaf ipv6-dst-prefix {
				type inet:ipv6-prefix;
				description
				 "Match on IPv6 dst address.";
			}
			leaf l4-src-port {
				type uint16;
				description
				 "Match on layer 4 src port.";
			}
			leaf l4-dst-port {
				type uint16;
				description
				 "Match on layer 4 dst port.";
			}
			leaf protocol-field {
				type union {
					type uint8;
					type identityref {
						base protocol-type;
					}
				}
				description
				 "Match on IPv4 protocol or
				  Ipv6 Next Header
				 field.";
			}
			
			description
			 "Describe flow matching 
			 criterions.";
		}
		description
		 "Flow definition based on criteria.";
	}
	grouping site-service-basic {
		leaf svc-input-bandwidth {
			   type uint32;
			   units bps;
			   description
				"From the PE perspective, the service input
				bandwidth of the connection.";
		}
		leaf svc-output-bandwidth {
		   type uint32;
		   units bps;
		   description
			"From the PE perspective, the service output
			bandwidth of the connection.";
		}
		leaf svc-mtu {
			type uint16;
			units bytes;
			description
			 "MTU at service level. 
			 If the service is IP, 
			 it refers to the IP MTU.";
		}
		description
		 "Defines basic service parameters for a site.";
	}
	grouping site-protection {
		container traffic-protection {
			if-feature fast-reroute;
			leaf enabled {
				type boolean;
				description
				 "Enables 
				 traffic protection of access link.";
			}
			
			description
			 "Fast reroute service parameters 
			 for the site.";
		}
		description
		 "Defines protection service parameters for a site.";
	}
	grouping site-service-mpls {
		container carrierscarrier {
			if-feature carrierscarrier;
			leaf signalling-type {
				type enumeration {
					enum "ldp" {
						description
							"Use LDP as signalling 
							protocol between PE and CE.";
					}
					enum "bgp" {
						description
							"Use BGP 3107 as signalling 
							protocol between PE and CE.
							In this case, bgp must be also 
							configured
							as routing-protocol.
							";
					}
				}
				description
				 "MPLS signalling type.";
			}
			description
			 "This container is used when customer provides 
			 MPLS based services.
			 This is used in case of Carrier's 
			 Carrier.";
		}
		description
		 "Defines MPLS service parameters for a site.";
	}
	grouping site-service-qos-profile {
		container qos {
			if-feature qos;
			container qos-classification-policy {
				list rule {
					key id;
					ordered-by user;
					
					leaf id {
						type uint16;
						description
						 "ID of the rule.";
					}
					
					choice match-type {
						case match-flow {
							uses flow-definition;
						}
						case match-application {
							leaf match-application {
								type identityref {
									base customer-application;
								}
								description
								 "Defines the application
								 to match.";
							}
						}
						description
						 "Choice for classification";
					}
					
					leaf target-class-id {
						type string;
						description
						 "Identification of the 
						 class of service.
						 This identifier is internal to 
						 the administration.";
					}
					
					description
					 "List of marking rules.";
				}
				description
				 "Need to express marking rules ...";
			}
			container qos-profile {

				choice qos-profile {
					description
					 "Choice for QoS profile.
					 Can be standard profile or custom.";
					case standard {
						leaf profile {
							type string;
							description
							 "QoS profile to be used";
						}
					}
					case custom {
						container classes {
							if-feature qos-custom;
							list class {
								key class-id;
								
								leaf class-id {
									type string;
									description
									 "Identification of the 
									 class of service.
									 This identifier is internal to 
									 the administration.";
								}
								leaf rate-limit {
									type uint8;
									units percent;
									description
									 "To be used if class must 
									 be rate 
									 limited. Expressed as 
									 percentage of the svc-bw.";
								}
								leaf priority-level {
									type uint8;
									description
									 "Defines the level of the 
									 class in 
									 term of priority queueing.
									  The higher the level is the 
									  higher 
									  is the priority.";
								}
								leaf guaranteed-bw-percent {
									type uint8;
									units percent;
									description
									 "To be used to define the 
									 guaranteed 
									 BW in percent of the svc-bw
									 available at the priority-level.";
								}
								description
								 "List of class of services.";
							}
							description
								 "Container for
								 list of class of services.";
						}
					
					}	

				}
				description
				"Qos profile configuration.";
			}
			description
			 "QoS configuration.";
		}
		description 
		 "This grouping defines QoS parameters
		 for a site";
	
	}
	
	grouping site-security-authentication {	
		container authentication {
			description
			 "Authentication parameters";
		}
		description 
		 "This grouping defines authentication 
		 parameters
		 for a site";
	
	}
	grouping site-security-encryption {	
		container encryption {
			if-feature encryption;
			leaf enabled {
				type boolean;
				description
				 "If true, access encryption is required.";
			}
			leaf layer {
				type enumeration {
					enum layer2 {
						description
						 "Encryption will occur at layer2.";
					}
					enum layer3 {
						description
						 "IPSec is requested.";
					}
				}
				description
				 "Layer on which encryption is applied.";
			}
			container encryption-profile {
				choice profile {
					case provider-profile {
						leaf profile-name {
							type string;
							description
							 "Name of the SP profile 
							 to be applied.";
						}
					}
					case customer-profile {
						leaf algorithm {
							type string;
							description
							 "Encryption algorithm to 
							 be used.";
						}
						choice key-type {
							case psk {
								leaf preshared-key {
									type string;
									description
									 "Key coming from 
									 customer.";
								}
							}
							case pki {
							
							}
							description
							 "Type of keys to be used.";
						}
					}
					description
					 "Choice of profile.";
				}
				description
				 "Profile of encryption to be applied.";
			}
			description
			 "Encryption parameters.";
		}
		description 
		 "This grouping defines encryption parameters
		 for a site";
	}
	
	
	grouping site-attachment-bearer {
		container bearer {
			container requested-type {
				if-feature requested-type;
				leaf requested-type {
					type string;
					description
					 "Type of requested bearer Ethernet, DSL, 
					 Wireless ...
					 Operator specific.";
				}
				leaf strict {
					type boolean;
					default false;
					description
					 "define if the requested-type is a preference
					 or a strict requirement.";
				}
				description
				 "Container for requested type.";
			}
			leaf always-on {
				if-feature always-on;
				type boolean;
				default true;
				description
				"Request for an always on access type.
				This means no Dial access type for 
				example.";
			}
			leaf bearer-reference {
				if-feature bearer-reference;
				type string;
				description
				 "This is an internal reference for the 
				 service provider.
				 Used ";
			}
			description
			 "Bearer specific parameters. 
			 To be augmented.";
		}
		description
		 "Defines physical properties of
		 a site attachment.";
	}
	
	grouping site-routing {
		container routing-protocols {
			list routing-protocol {
				key type;
				
				leaf type {
					type identityref {
						base routing-protocol-type;
					}
					description
					 "Type of routing protocol.";
				}
				
				
				container ospf {
					when "../type = 'ospf'" {
						description
						 "Only applies 
						 when protocol is OSPF.";
					}
					if-feature rtg-ospf;
					leaf-list address-family {
						type identityref {
							base address-family;
						}
						description
						 "Address family to be activated.";
					}
					leaf area-address {
						type yang:dotted-quad;
						description
						 "Area address.";
					}
					leaf metric {
						type uint16;
						description
						 "Metric of PE-CE link.";
					}
					container sham-links {
						if-feature rtg-ospf-sham-link;
						list sham-link {
							key target-site;
							
							leaf target-site {
								type svc-id;
								description
								 "Target site for the sham link
								  connection.
								  The site is referred through it's ID.";
							}
							leaf metric {
								type uint16;
								description
								 "Metric of the sham link.";
							}
							description
							 "Creates a shamlink with another 
							 site";
						}
						description
						 "List of Sham links";
					}
					description
					 "OSPF specific configuration.";
				}
				
				container bgp {
					
					when "../type = 'bgp'" {
						description
						 "Only applies when 
						 protocol is BGP.";
					}
					if-feature rtg-bgp;
					leaf autonomous-system {
						type uint32;
						description
						 "AS number.";
					}
					leaf-list address-family {
						type identityref {
							base address-family;
						}
						description
						 "Address family to be activated.";
					}
					description
					 "BGP specific configuration.";
				}
				container static {
					when "../type = 'static'" {
						description
						 "Only applies when protocol 
						 is static.";
					}
					
					container cascaded-lan-prefixes {
						list ipv4-lan-prefixes {
							if-feature ipv4;
							key "lan next-hop";
							
							leaf lan {
								type inet:ipv4-prefix;
								description
								 "Lan prefixes.";
							}
							leaf lan-tag {
								type string;
								description
								 "Internal tag to be used in vpn 
								 policies.";
							}
							leaf next-hop {
								type inet:ipv4-address;
								description
								 "Nexthop address to use at customer 
								 side.";
							}
							description "
								List of LAN prefixes for 
								the site.
								";
						}
						list ipv6-lan-prefixes {
							if-feature ipv6;
							key "lan next-hop";
							
							leaf lan {
								type inet:ipv6-prefix;
								description
								 "Lan prefixes.";
							}
							leaf lan-tag {
								type string;
								description
								 "Internal tag to be used 
								 in vpn policies.";
							}
							leaf next-hop {
								type inet:ipv6-address;
								description
								 "Nexthop address to use at 
								 customer side.";
							}
							description "
								List of LAN prefixes for the site.
								";
						}
						description
							"LAN prefixes from the customer.";
					}
					description
					 "Static routing 
					 specific configuration.";
				}
				container rip {
					
					when "../type = 'rip'" {
						description
						 "Only applies when 
						 protocol is RIP.";
					}
					if-feature rtg-rip;
					leaf-list address-family {
						type identityref {
							base address-family;
						}
						description
						 "Address family to be 
						 activated.";
					}
					
					description
					 "RIP routing specific 
					 configuration.";
				}
				
				
				container vrrp {
					
					when "../type = 'vrrp'" {
						description
						 "Only applies when 
						 protocol is VRRP.";
					}
					if-feature rtg-vrrp;
					leaf-list address-family {
						type identityref {
							base address-family;
						}
						description
						 "Address family to be activated.";
					}
					description
					 "VRRP routing specific configuration.";
				}
				
				
				description
				 "List of routing protocols used 
				 on the site. 
				 Need to be augmented.";
			}
			description
			 "Defines routing protocols.";
		}
		description
		 "Grouping for routing protocols.";
	}
	
	grouping site-attachment-ip-connection {
		container ip-connection {
			container ipv4 {
				if-feature ipv4;
				leaf address-allocation-type {
					type identityref {
						base address-allocation-type;
					}
					default "l3vpn-svc:static-address";
					description
					 "Defines how addresses are allocated.
					 ";
				}
				
				container addresses {
					when 
					"../address-allocation-type = 'l3vpn-svc:static-address'" {
						description
						 "Only applies when 
						 protocol allocation type is static";
					}
					leaf provider-address {
						type inet:ipv4-address;
						description
						 "Provider side address.";
					}
					leaf customer-address {
						type inet:ipv4-address;
						description
						 "Customer side address.";
					}
					leaf mask {
						type uint8 {
							range "0..32";
						}
						description
						 "Subnet mask expressed 
						 in bits";
					}
					description
					 "Describes IP addresses used";
				}

				
				description 
				 "IPv4 specific parameters";
				
			}
			container ipv6 {
				if-feature ipv6;
				leaf address-allocation-type {
					type identityref {
						base address-allocation-type;
					}
					default "l3vpn-svc:static-address";
					description
					 "Defines how addresses are allocated.
					 ";
				}

				container addresses {
					when 
					"../address-allocation-type = 'l3vpn-svc:static-address'" {
						description
						 "Only applies when 
						 protocol allocation type is static";
					}
					leaf provider-address {
						type inet:ipv6-address;
						description
						 "Provider side address.";
					}
					leaf customer-address {
						type inet:ipv6-address;
						description
						 "Customer side address.";
					}
					leaf mask {
						type uint8 {
							range "0..128";
						}
						description
						 "Subnet mask expressed 
						 in bits";
					}
					description
					 "Describes IP addresses used";
				}

				description 
				 "IPv6 specific parameters";
				
			}
			container oam {
				container bfd {
					if-feature bfd;
					leaf bfd-enabled {
						type boolean;
						description
						 "BFD activation";
					}
					
					choice holdtime {
						case profile {
							leaf profile-name {
								type string;
								description
								 "Service provider well
								 known profile.";
							}
							description
								 "Service provider well
								 known profile.";
						}
						case fixed {
							leaf fixed-value {
								type uint32;
								units msec;
								description
								 "Expected holdtime 
								 expressed 
								 in msec.";
							}
						}
						description
						 "Choice for holdtime flavor.";
					}
					description
					 "Container for BFD.";
				}
				description
				 "Define the OAM used on the connection.";
			}
			description
			 "Defines connection parameters.";
		}
		description
		 "This grouping defines IP connection parameters.";
	}
	
	grouping site-service-multicast {
		container multicast {
			if-feature multicast;
			leaf multicast-site-type {
				type enumeration {
					enum receiver-only {
						description
						 "The site has only receivers.";
					}
					enum source-only {
						description
						 "The site has only sources.";
					}
					enum source-receiver {
						description
						 "The site has both 
						 sources &amp; receivers.";
					}
				}
				default "source-receiver";
				description
				 "Type of multicast site.";
			}
			container multicast-transport-protocol {
				leaf ipv4 {
					if-feature ipv4;
					type boolean;
					default true;
					description 
						"Enables ipv4 multicast transport";
				}
				leaf ipv6 {
					if-feature ipv6;
					type boolean;
					default false;
					description 
						"Enables ipv6 multicast transport";
				}
				description
				 "Defines protocol to transport multicast.";
			}
			leaf protocol-type {
				type enumeration {
					enum host {
						description
						 "
						 Hosts are directly connected 
						 to the provider network.
						 Host protocols like IGMP, MLD 
						 are required.
						 ";
					}
					enum router {
						description
						 "
						 Hosts are behind a customer router.
						 PIM will be implemented.
						 ";
					}
					enum both {
						description
						 "Some Hosts are behind a customer
						 router and some others are directly
						 connected to the provider network.
						 Both host and routing protocols must be
						 used. Typically IGMP and PIM will be 
						 implemented.
						 ";
					}
				}
				default "both";
				description
				 "Multicast protocol type to be used
				 with the customer site.";
			}
			
			description
			 "Multicast parameters for the site.";
		}
		description
		  "Multicast parameters for the site.";
	}
	
	grouping site-management {
		container management {
			leaf type {
				type identityref {
					base management;
				}
				description
				"Management type of the connection.";
			}
			leaf management-transport {
				type identityref {
					base address-family;
				}
				description
				 "Transport protocol used for management.";
			}
			leaf address {
				type inet:ip-address; 
				description
				 "Management address";
			}
			
			description
			 "Management configuration";
		}
		description
		  "Management parameters for the site.";
	}
	
	grouping site-vpn-flavor {
		leaf site-vpn-flavor {
			type identityref {
				base site-vpn-flavor;
			}
			default site-vpn-flavor-single;
			description
			 "Defines if the site
			is a single VPN site, or multiVPN or ...";
		}
		description
		 "Grouping for site-vpn-flavor.";
	}
	
	grouping site-vpn-policy {
		container vpn-policy-list {
			list vpn-policy {
				key vpn-policy-id;
				
				leaf vpn-policy-id {
					type svc-id;
					description
					 "Unique identifier for
					 the VPN policy.";
				}
				
				list entries {
					key id;
					
					leaf id {
							type svc-id;
							description
							 "Unique identifier for
							  the policy entry.";
					}
					container filter {
						choice lan {
							case lan-prefix {
								container lan-prefixes {
									list ipv4-lan-prefixes {
										if-feature ipv4;
										key lan;
										
										leaf lan {
											type inet:ipv4-prefix;
											description
											 "Lan prefixes.";
										}
										description "
											List of LAN prefixes 
											for the site.
											";
									}
									list ipv6-lan-prefixes {
										if-feature ipv6;
										key lan;
										
										leaf lan {
											type inet:ipv6-prefix;
											description
											 "Lan prefixes.";
										}
										description "
											List of LAN prefixes 
											for the site.
											";
									}
									description
									 "LAN prefixes from the customer.";
								}
							}
							case lan-tag {
								leaf-list lan-tag {
									type string;
									description
									 "List of lan-tags to be matched.";
								}
							}
							description
							 "Choice for LAN matching type";
						}
						description
						 "If used, it permit to split site LANs
						 among multiple VPNs.
						 If no filter used, all the LANs will be
						 part of the same VPNs with the same
						 role.";
					}
					container vpn {
						leaf vpn-id {
							type leafref {
								path "/l3vpn-svc/vpn-services/vpn-svc/vpn-id";
							}
							mandatory true;
							description
							 "Reference to an IPVPN.";
						}
						leaf site-role {
							type identityref {
								base site-role;
							}
							mandatory true;
							description
							 "Role of the site in the IPVPN.";
						}
						description
						 "List of VPNs the LAN is associated to.";
					}
					description
					 "List of entries for export policy.";
				}
				description
				 "List of VPN policies.";
			}
			description 
				 "VPN policy.";
		}
		description
		  "VPN policy parameters for the site.";
	}
	
	
	
	grouping site-maximum-routes {
		container maximum-routes {
			list address-family {
				key af;
				
				leaf af {
					type identityref {
						base address-family;
					}
					description
					 "Address-family.";
				}
				leaf maximum-routes {
					type uint32;
					description
					 "Maximum prefixes the VRF can 
					 accept for this
					 address-family.";
				}
				description
				 "List of address families.";
			}

			description
			 "Define maximum-routes for the VRF.";
		}
		description
		"Define maximum-routes for the site.";
	}
	
	grouping site-security {
		container security {
			uses site-security-authentication;
			uses site-security-encryption;
			
			description
			 "Site specific security parameters.";
		}
		description
		 "Grouping for security parameters.";
	}
	
	grouping site-service {
		container service {
			uses site-service-basic;
			uses site-service-qos-profile;
			uses site-service-mpls;
			uses site-service-multicast;
			
			description
			 "Service parameters on the attachement.";
		}
		description
		 "Grouping for service parameters.";
	}
	
	grouping transport-constraint {
		list constraint-list {
			key constraint-type;
			
			leaf constraint-type {
				type identityref {
					base transport-constraint;
				}
				description
				 "Constraint type to be applied.";
			}
			leaf constraint-opaque-value {
				type string;
				description
				"Opaque value that can be used to
				specify constraint parameters.";
			}
			description
			 "List of constraints";
		}
		description
		 "Grouping for transport constraint."; 
	}
	
	grouping transport-constraints {
		container transport-constraints {
			if-feature traffic-engineering;
			container unicast-transport-constraints {
				list constraint {
					key constraint-id;
					
					leaf constraint-id {
						type svc-id;
						description
						 "Defines an ID for the constraint
						 rule.";
					}
					
					leaf site1 {
						type svc-id;
						description
						 "The ID refers to one site end.";
					}
					leaf site2 {
						type svc-id;
						description
						 "The ID refers to the other 
						 site end.";
					}
					uses transport-constraint;
					description
					 "List of constraints.
					 Constraints are bidirectional.";
				}
				description
				 "Unicast transport constraints.";
			}
			container multicast-transport-constraints {
				if-feature traffic-engineering-multicast;
				list constraint {
					key constraint-id;
					
					leaf constraint-id {
						type svc-id;
						description
						 "Defines an ID for the constraint
						 rule.";
					}
					
					leaf src-site {
						type svc-id;
						description
						 "The ID refers to source site.";
					}
					leaf dst-site {
						type svc-id;
						description
						 "The ID refers to the receiver 
						 site.";
					}
					uses transport-constraint;
					description
					 "List of constraints.
					 Constraints are unidirectional.";
				}
				description
				 "Multicast transport constraints.";
			}
			description
				 "transport constraints.";
		}
		description
		 "Grouping for transport constraints
		 description."; 
	}
	
	grouping vpn-extranet {
		container extranet-vpns {
			if-feature extranet-vpn;
			list extranet-vpn {
				key vpn-id;
				
				leaf vpn-id {
					type svc-id;
					description
						"Identifies the target VPN";
				}
				leaf local-sites-role {
					type identityref {
						base site-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 cfg.";
		}
		description
			"grouping for extranet VPN configuration.
			Extranet provides a way to interconnect all sites 
			from two VPNs in a easy way.";
			
	}
	
	grouping site-attachment-availability {
		container availability {
			leaf access-priority {
				type uint32;
				default 1;
				description
				 "Defines the priority for the access. 
				 The highest the priority value is, 
				 the highest the 
				 preference of the access is.";
			}
			description
			 "Availability parameters 
			 (used for multihoming)";
		}
		description
		 "Defines site availability parameters.";
	}
	
	grouping access-vpn-policy {
		container vpn-attachment {
			
			choice attachment-flavor {
				case vpn-policy-id {
					leaf vpn-policy-id {
						type leafref {
							path "/l3vpn-svc/sites/site/"+
							"vpn-policy-list/vpn-policy/"+
							"vpn-policy-id";
						}
						description
						 "Reference to a VPN policy.";
					}
				}
				case vpn-id {
					leaf vpn-id {
						type leafref {
							path "/l3vpn-svc/vpn-services"+
							"/vpn-svc/vpn-id";
						}
						description
							"Reference to a VPN.";
					}
					leaf site-role {
						type identityref {
								base site-role;
							}
						mandatory true;
						description
						 "Role of the site in the IPVPN.";
					}
				}
				mandatory true;
				description
				 "Choice for VPN attachment flavor.";
			}
			description
			 "Defines VPN attachment of a site.";
		}
		description
		 "Defines the VPN attachment rules
		 for a site logical access.";
	}
	
	grouping vpn-svc-cfg {
		leaf vpn-id {
				type svc-id;
				description
				"VPN identifier. Local administration meaning.";
			}
		leaf customer-name {
			type string;
			description
			 "Name of the customer.";
		}
		leaf topology {
			type identityref {
				base vpn-topology;
			}
			default "any-to-any";
			description
			 "VPN topology.";
		}
		
		uses vpn-service-cloud-access;
		uses vpn-service-multicast;
		uses vpn-service-mpls;
		uses transport-constraints;
		uses vpn-extranet;

		description
		 "grouping for vpn-svc configuration.";
	}
	
	grouping site-top-level-cfg {
		uses operational-requirements;
		uses customer-location-info;
		uses site-diversity;
		uses site-management;
		uses site-vpn-policy;
		uses site-vpn-flavor;
		uses site-maximum-routes;
		uses site-security;
		uses site-service;
		uses site-protection;
		uses site-routing;
		
		description
		 "Grouping for site top level cfg.";
	}
	grouping site-network-access-top-level-cfg {
		uses access-diversity;
		uses site-attachment-bearer;
		uses site-attachment-ip-connection;
		uses site-security;
		uses site-service;
		uses site-routing;
		uses site-attachment-availability;
		uses access-vpn-policy;
		
		description
		 "Grouping for site network access
		 top level cfg.";
	}
	
	/* Main blocks */
	
	container l3vpn-svc {
		container vpn-services {
			list vpn-svc {
				key vpn-id;
				
				uses vpn-svc-cfg;
				
				description "
					List of VPN services.
				";
			}
			description
			 "top level container
			 for the VPN services.";
		}
		
		container sites {
			list site {
				key site-id;
					
				leaf site-id {
					type svc-id;
					description
						"Identifier of the site.";
				}
				
				leaf apply-template {
					type leafref {
						path "/l3vpn-svc/site-templates"+
						"/site-template/site-template-id";
					}
					description
					 "Reference to template to be applied.
					 The template is called through it's ID.";
				}
				
				uses site-top-level-cfg;
				uses operational-requirements-ops;
				
				container site-network-accesses {
					list site-network-access {
						key site-network-access-id;
						
						leaf site-network-access-id {
							type svc-id;
							description
							 "Identifier for the access";
						}
						leaf apply-template {
							type leafref {
								path "/l3vpn-svc/site-templates/"+
								"site-template/site-template-id";
							}
							description
							 "Reference to template to be applied.
							 The template is called through it's ID.";
						}
						uses site-network-access-top-level-cfg;
						
						description
						 "List of accesses for a site.";
					}
					description
					 "List of accesses for a site.";
				}
				
				description "List of sites.";
			}
			description
			 "Container for sites";
		}
		
		container site-templates {
			list site-template {
				key site-template-id;
					
				leaf site-template-id {
					type template-id;
					description
						"Identifier of the site.";
				}
						
				uses site-top-level-cfg;
				
				container site-network-access {
					uses site-network-access-top-level-cfg;
					description
					 "Container for the site-network-access.";
				}
					
				description "List of sites.";
			}
			description "Container for site templates";
		}
		
		
		description
		 "Main container for L3VPN service configuration.";
	}
	
}
&lt;CODE ENDS&gt;</artwork>

      </figure>

    </section>
	
    <section anchor="Security" title="Security Considerations" toc="default">
      <t>The YANG modules defined in this document MAY be accessed via the RESTCONF protocol <xref target="I-D.ietf-netconf-restconf" pageno="false" format="default"/> or NETCONF protocol (<xref target="RFC6241" pageno="false" format="default"/>. The lowest RESTCONF or NETCONF layer requires that the transport-layer protocol provides both data integrity and confidentiality, see Section 2 in <xref target="I-D.ietf-netconf-restconf" pageno="false" format="default"/> and <xref target="RFC6241" pageno="false" format="default"/>. 
	  The client MUST carefully examine the certificate presented by the server to determine if it meets the client's expectations, and the server MUST authenticate client access to any protected resource. The client identity derived from the authentication mechanism used is subject to the NETCONF Access Control Module (NACM) (<xref target="RFC6536" pageno="false" format="default"/>).
Other protocols to access this YANG module are also required to support the similar mechanism.
</t>
	<t>
The data nodes defined in the "ietf-l3vpn-svc" YANG module MUST be carefully created/read/updated/deleted. The entries in the lists below include customer proprietary or confidential information, therefore only authorized clients MUST access the information and the other clients MUST NOT be able to access to the information.

<list style="symbols">
   <t>/l3vpn-svc/vpn-services/vpn-svc</t>
   <t>/l3vpn-svc/sites/site</t>
   <t>/l3vpn-svc/site-templates/site-template</t>
</list>
</t>
    </section>
	
    <section anchor="Acknowledgements" title="Acknowledgements" toc="default">
      <t>Thanks to Qin Wu, Maxim Klyus, Luis Miguel Contreras, Gregory Mirsky,
   Zitao Wang, Jing Zhao, Kireeti Kompella, Eric Rosen, Aijun Wang, Michael Scharf, Xufeng Liu and Andrew Leu for the contributions to the
   document. 
</t>
    </section>

    <section anchor="IANA" title="IANA Considerations" toc="default">
	<t>The IANA is requested to assign a new URI from the
   IETF XML registry (<xref target="RFC3688" pageno="false" format="default"/>). Authors are suggesting the following URI : </t>
   <figure title="" suppress-title="false" align="left" alt="" width="" height="">
   <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
	URI: urn:ietf:params:xml:ns:yang:ietf-l3vpn-svc
	Registrant Contact: L3SM WG
	XML: N/A, the requested URI is an XML namespace
   </artwork>
   </figure>
	<t>This document also requests a new YANG module name in the YANG Module Names registry (<xref target="RFC6020" pageno="false" format="default"/>) with the following suggestion :</t>
   <figure title="" suppress-title="false" align="left" alt="" width="" height="">
   <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
	name: ietf-l3vpn-svc
	namespace: urn:ietf:params:xml:ns:yang:ietf-l3vpn-svc
	prefix: l3vpn-svc
	reference: RFC XXXX
   </artwork>
   </figure>
   
    </section>

  </middle>
  <back>
    <references title="Normative References">
      

<reference anchor="RFC2119" target="http://www.rfc-editor.org/info/rfc2119">
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials="S." surname="Bradner" fullname="S. Bradner"><organization/></author>
<date year="1997" month="March"/>
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="2119"/>
<seriesInfo name="DOI" value="10.17487/RFC2119"/>
</reference>

      

<reference anchor="RFC6020" target="http://www.rfc-editor.org/info/rfc6020">
<front>
<title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
<author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor"><organization/></author>
<date year="2010" month="October"/>
<abstract><t>YANG is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF), NETCONF remote procedure calls, and NETCONF notifications. [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name="RFC" value="6020"/>
<seriesInfo name="DOI" value="10.17487/RFC6020"/>
</reference>

	  

<reference anchor="RFC4577" target="http://www.rfc-editor.org/info/rfc4577">
<front>
<title>OSPF as the Provider/Customer Edge Protocol for BGP/MPLS IP Virtual Private Networks (VPNs)</title>
<author initials="E." surname="Rosen" fullname="E. Rosen"><organization/></author>
<author initials="P." surname="Psenak" fullname="P. Psenak"><organization/></author>
<author initials="P." surname="Pillay-Esnault" fullname="P. Pillay-Esnault"><organization/></author>
<date year="2006" month="June"/>
<abstract><t>Many Service Providers offer Virtual Private Network (VPN) services to their customers, using a technique in which customer edge routers (CE routers) are routing peers of provider edge routers (PE routers).  The Border Gateway Protocol (BGP) is used to distribute the customer's routes across the provider's IP backbone network, and Multiprotocol Label Switching (MPLS) is used to tunnel customer packets across the provider's backbone.  This is known as a "BGP/MPLS IP VPN".  The base specification for BGP/MPLS IP VPNs presumes that the routing protocol on the interface between a PE router and a CE router is BGP.  This document extends that specification by allowing the routing protocol on the PE/CE interface to be the Open Shortest Path First (OSPF) protocol.</t><t>This document updates RFC 4364.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name="RFC" value="4577"/>
<seriesInfo name="DOI" value="10.17487/RFC4577"/>
</reference>

	  

<reference anchor="RFC3688" target="http://www.rfc-editor.org/info/rfc3688">
<front>
<title>The IETF XML Registry</title>
<author initials="M." surname="Mealling" fullname="M. Mealling"><organization/></author>
<date year="2004" month="January"/>
<abstract><t>This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t></abstract>
</front>
<seriesInfo name="BCP" value="81"/>
<seriesInfo name="RFC" value="3688"/>
<seriesInfo name="DOI" value="10.17487/RFC3688"/>
</reference>

	  

<reference anchor="RFC4862" target="http://www.rfc-editor.org/info/rfc4862">
<front>
<title>IPv6 Stateless Address Autoconfiguration</title>
<author initials="S." surname="Thomson" fullname="S. Thomson"><organization/></author>
<author initials="T." surname="Narten" fullname="T. Narten"><organization/></author>
<author initials="T." surname="Jinmei" fullname="T. Jinmei"><organization/></author>
<date year="2007" month="September"/>
<abstract><t>This document specifies the steps a host takes in deciding how to autoconfigure its interfaces in IP version 6.  The autoconfiguration process includes generating a link-local address, generating global addresses via stateless address autoconfiguration, and the Duplicate Address Detection procedure to verify the uniqueness of the addresses on a link.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name="RFC" value="4862"/>
<seriesInfo name="DOI" value="10.17487/RFC4862"/>
</reference>

	  

<reference anchor="RFC4364" target="http://www.rfc-editor.org/info/rfc4364">
<front>
<title>BGP/MPLS IP Virtual Private Networks (VPNs)</title>
<author initials="E." surname="Rosen" fullname="E. Rosen"><organization/></author>
<author initials="Y." surname="Rekhter" fullname="Y. Rekhter"><organization/></author>
<date year="2006" month="February"/>
<abstract><t>This document describes a method by which a Service Provider may use an IP backbone to provide IP Virtual Private Networks (VPNs) for its customers.  This method uses a "peer model", in which the customers' edge routers (CE routers) send their routes to the Service Provider's edge routers (PE routers); there is no "overlay" visible to the customer's routing algorithm, and CE routers at different sites do not peer with each other.  Data packets are tunneled through the backbone, so that the core routers do not need to know the VPN routes.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name="RFC" value="4364"/>
<seriesInfo name="DOI" value="10.17487/RFC4364"/>
</reference>

	  

<reference anchor="RFC6241" target="http://www.rfc-editor.org/info/rfc6241">
<front>
<title>Network Configuration Protocol (NETCONF)</title>
<author initials="R." surname="Enns" fullname="R. Enns" role="editor"><organization/></author>
<author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor"><organization/></author>
<author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor"><organization/></author>
<author initials="A." surname="Bierman" fullname="A. Bierman" role="editor"><organization/></author>
<date year="2011" month="June"/>
<abstract><t>The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices.  It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages.  The NETCONF protocol operations are realized as remote procedure calls (RPCs).  This document obsoletes RFC 4741.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name="RFC" value="6241"/>
<seriesInfo name="DOI" value="10.17487/RFC6241"/>
</reference>

	  

<reference anchor="RFC6513" target="http://www.rfc-editor.org/info/rfc6513">
<front>
<title>Multicast in MPLS/BGP IP VPNs</title>
<author initials="E." surname="Rosen" fullname="E. Rosen" role="editor"><organization/></author>
<author initials="R." surname="Aggarwal" fullname="R. Aggarwal" role="editor"><organization/></author>
<date year="2012" month="February"/>
<abstract><t>In order for IP multicast traffic within a BGP/MPLS IP VPN (Virtual Private Network) to travel from one VPN site to another, special protocols and procedures must be implemented by the VPN Service Provider.  These protocols and procedures are specified in this document.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name="RFC" value="6513"/>
<seriesInfo name="DOI" value="10.17487/RFC6513"/>
</reference>

    </references>
	    <references title="Informative References">
		

<reference anchor="RFC4110" target="http://www.rfc-editor.org/info/rfc4110">
<front>
<title>A Framework for Layer 3 Provider-Provisioned Virtual Private Networks (PPVPNs)</title>
<author initials="R." surname="Callon" fullname="R. Callon"><organization/></author>
<author initials="M." surname="Suzuki" fullname="M. Suzuki"><organization/></author>
<date year="2005" month="July"/>
<abstract><t>This document provides a framework for Layer 3 Provider-Provisioned Virtual Private Networks (PPVPNs).  This framework is intended to aid in the standardization of protocols and mechanisms for support of layer 3 PPVPNs.  It is the intent of this document to produce a coherent description of the significant technical issues that are important in the design of layer 3 PPVPN solutions.  Selection of specific approaches, making choices regarding engineering tradeoffs, and detailed protocol specification, are outside of the scope of this framework document.  This memo provides information for the Internet community.</t></abstract>
</front>
<seriesInfo name="RFC" value="4110"/>
<seriesInfo name="DOI" value="10.17487/RFC4110"/>
</reference>

		

<reference anchor="RFC6536" target="http://www.rfc-editor.org/info/rfc6536">
<front>
<title>Network Configuration Protocol (NETCONF) Access Control Model</title>
<author initials="A." surname="Bierman" fullname="A. Bierman"><organization/></author>
<author initials="M." surname="Bjorklund" fullname="M. Bjorklund"><organization/></author>
<date year="2012" month="March"/>
<abstract><t>The standardization of network configuration interfaces for use with the Network Configuration Protocol (NETCONF) requires a structured and secure operating environment that promotes human usability and multi-vendor interoperability.  There is a need for standard mechanisms to restrict NETCONF protocol access for particular users to a pre-configured subset of all available NETCONF protocol operations and content.  This document defines such an access control model.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name="RFC" value="6536"/>
<seriesInfo name="DOI" value="10.17487/RFC6536"/>
</reference>

		

<reference anchor="I-D.ietf-netconf-restconf">
<front>
<title>RESTCONF Protocol</title>

<author initials="A" surname="Bierman" fullname="Andy Bierman">
    <organization/>
</author>

<author initials="M" surname="Bjorklund" fullname="Martin Bjorklund">
    <organization/>
</author>

<author initials="K" surname="Watsen" fullname="Kent Watsen">
    <organization/>
</author>

<date month="April" day="27" year="2016"/>

<abstract><t>This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastores defined in NETCONF.</t></abstract>

</front>

<seriesInfo name="Internet-Draft" value="draft-ietf-netconf-restconf-13"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-netconf-restconf-13.txt"/>
</reference>

		</references>
    <section anchor="rpc-example" title="Example: NETCONF &lt;get&gt; Reply" toc="default">
      <t>This section gives an example of a reply to the NETCONF
      &lt;get&gt; request for a device that implements the data model
      defined in this document.  The example is written in XML.</t>


    </section>
  </back>
</rfc>
