Tech-invite3GPPspaceIETFspace
96959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 8299

YANG Data Model for L3VPN Service Delivery

Pages: 188
Proposed Standard
Errata
Obsoletes:  8049
Part 7 of 8 – Pages 125 to 159
First   Prev   Next

Top   ToC   RFC8299 - Page 125   prevText

9. YANG Module

<CODE BEGINS>file "ietf-l3vpn-svc@2018-01-19.yang" module ietf-l3vpn-svc { yang-version 1.1; 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; } import ietf-netconf-acm { prefix nacm; } organization "IETF L3SM Working Group"; contact "WG List: <mailto:l3sm@ietf.org> Editor: L3SM WG Chairs: Adrian Farrel, Qin Wu "; description "This YANG module defines a generic service configuration model for Layer 3 VPNs. This model is common across all vendor implementations.
Top   ToC   RFC8299 - Page 126
  Copyright (c) 2018 IETF Trust and the persons
  identified as authors of the code.  All rights reserved.

  Redistribution and use in source and binary forms, with or
  without modification, is permitted pursuant to, and subject
  to the license terms contained in, the Simplified BSD License
  set forth in Section 4.c of the IETF Trust's Legal Provisions
  Relating to IETF Documents
  (https://trustee.ietf.org/license-info).

  This version of this YANG module is part of RFC 8299; see
  the RFC itself for full legal notices.";

  revision 2018-01-19 {
   description
    "Revision of RFC 8049 to fix implementation issues.";
   reference
    "RFC 8299";
   }
  revision 2017-01-27 {
   description
   "Initial document.";
   reference
     "RFC 8049.";
   }
  /* Features */
  feature cloud-access {
   description
   "Allows the VPN to connect to a CSP.";
  }
  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 lan-tag {
   description
   "Enables LAN Tag support in a VPN Policy filter.";
  }
  feature carrierscarrier {
   description
Top   ToC   RFC8299 - Page 127
   "Enables support of CsC.";
  }
  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 classes of services.";
  }
  feature qos-custom {
   description
   "Enables support of the custom QoS profile.";
  }
  feature rtg-bgp {
   description
   "Enables support of the BGP routing protocol.";
  }
  feature rtg-rip {
   description
   "Enables support of the RIP routing protocol.";
  }
  feature rtg-ospf {
   description
   "Enables support of the OSPF routing protocol.";
  }
  feature rtg-ospf-sham-link {
   description
   "Enables support of OSPF sham links.";
  }
  feature rtg-vrrp {
   description
   "Enables support of the VRRP routing protocol.";
  }
  feature fast-reroute {
   description
   "Enables support of Fast Reroute.";
  }
  feature bfd {
   description
Top   ToC   RFC8299 - Page 128
   "Enables support of BFD.";
  }
  feature always-on {
   description
   "Enables support of the 'always-on' access constraint.";
  }
  feature requested-type {
   description
   "Enables support of the 'requested-type' access constraint.";
  }
  feature bearer-reference {
   description
   "Enables support of the 'bearer-reference' access constraint.";
  }
  feature target-sites {
   description
   "Enables support of the 'target-sites' match flow parameter.";
  }
  /* Typedefs */
  typedef svc-id {
   type string;
   description
   "Defines a type of service component identifier.";
  }
  typedef template-id {
   type string;
   description
   "Defines a type of service template identifier.";
  }
  typedef address-family {
   type enumeration {
    enum ipv4 {
     description
     "IPv4 address family.";
    }
    enum ipv6 {
     description
     "IPv6 address family.";
    }
   }
   description
   "Defines a type for the address family.";
  }
  /* Identities */
  identity site-network-access-type {
   description
   "Base identity for site-network-access type.";
  }
Top   ToC   RFC8299 - Page 129
  identity point-to-point {
   base site-network-access-type;
   description
   "Identity for point-to-point connection.";
  }
  identity multipoint {
   base site-network-access-type;
   description
   "Identity for multipoint connection.
   Example: Ethernet broadcast segment.";
  }
  identity placement-diversity {
   description
   "Base identity for site placement constraints.";
  }
  identity bearer-diverse {
   base placement-diversity;
   description
   "Identity for bearer diversity.
   The bearers should not use common elements.";
  }
  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
Top   ToC   RFC8299 - Page 130
   "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 application.";
  }
  identity file-transfer {
   base customer-application;
   description
   "Identity for file transfer application (e.g., FTP, SFTP).";
  }
  identity database {
   base customer-application;
   description
   "Identity for database application.";
  }
  identity social {
   base customer-application;
   description
   "Identity for social-network application.";
  }
  identity games {
   base customer-application;
   description
   "Identity for gaming application.";
  }
  identity p2p {
   base customer-application;
   description
   "Identity for peer-to-peer application.";
  }
  identity network-management {
   base customer-application;
   description
   "Identity for management application
   (e.g., Telnet, syslog, SNMP).";
  }
  identity voice {
   base customer-application;
   description
   "Identity for voice application.";
  }
Top   ToC   RFC8299 - Page 131
  identity video {
   base customer-application;
   description
   "Identity for video conference application.";
  }
  identity embb {
   base customer-application;
   description
   "Identity for an enhanced Mobile Broadband (eMBB)
   application.  Note that an eMBB application demands
   network performance with a wide variety of
   characteristics, such as data rate, latency,
   loss rate, reliability, and many other parameters.";
 }
 identity urllc {
   base customer-application;
   description
   "Identity for an Ultra-Reliable and Low Latency
   Communications (URLLC) application.  Note that a
   URLLC application demands network performance
   with a wide variety of characteristics, such as latency,
   reliability, and many other parameters.";
  }
  identity mmtc {
    base customer-application;
    description
    "Identity for a massive Machine Type
    Communications (mMTC) application.  Note that an
    mMTC application demands network performance
    with a wide variety of characteristics, such as data
    rate, latency, loss rate, reliability, and many
    other parameters.";
  }
  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
Top   ToC   RFC8299 - Page 132
   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 connection may belong to different multiple VPNs.";
  }
  identity site-vpn-flavor-nni {
   base site-vpn-flavor;
   description
   "Base identity for the site VPN service flavor.
   Used to describe an NNI option A connection.";
  }
  identity management {
   description
   "Base identity for site management scheme.";
  }
  identity co-managed {
   base management;
   description
   "Base identity for co-managed 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 provider-dhcp {
   base address-allocation-type;
   description
   "Provider network provides DHCP service to customer.";
  }
  identity provider-dhcp-relay {
   base address-allocation-type;
   description
   "Provider network provides DHCP relay service to customer.";
  }
Top   ToC   RFC8299 - Page 133
  identity provider-dhcp-slaac {
   base address-allocation-type;
   description
   "Provider network provides DHCP service to customer,
   as well as SLAAC.";
  }
  identity static-address {
   base address-allocation-type;
   description
   "Provider-to-customer 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 an any-to-any IP VPN.";
  }
  identity spoke-role {
   base site-role;
   description
   "Spoke site in a Hub-and-Spoke IP VPN.";
  }
  identity hub-role {
   base site-role;
   description
   "Hub site in a Hub-and-Spoke IP VPN.";
  }
  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-and-Spoke VPN topology.";
Top   ToC   RFC8299 - Page 134
  }
  identity hub-spoke-disjoint {
   base vpn-topology;
   description
   "Identity for Hub-and-Spoke VPN topology
   where Hubs cannot communicate with 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 bidirectional 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 BSR discovery type.";
  }
  identity routing-protocol-type {
   description
   "Base identity for routing protocol type.";
Top   ToC   RFC8299 - Page 135
  }
  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 vrrp {
   base routing-protocol-type;
   description
   "Identity for VRRP protocol type.
   This is to be used when LANs are directly connected
   to PE 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.";
  }
Top   ToC   RFC8299 - Page 136
  identity icmp {
   base protocol-type;
   description
   "ICMP protocol type.";
  }
  identity icmp6 {
   base protocol-type;
   description
   "ICMPv6 protocol type.";
  }
  identity gre {
   base protocol-type;
   description
   "GRE protocol type.";
  }
  identity ipip {
   base protocol-type;
   description
   "IP-in-IP 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.";
  }
  identity vpn-policy-filter-type {
   description
   "Base identity for VPN Policy filter type.";
  }
  identity ipv4 {
    base vpn-policy-filter-type;
    description
    "Identity for IPv4 Prefix filter type.";
Top   ToC   RFC8299 - Page 137
  }
  identity ipv6 {
    base vpn-policy-filter-type;
    description
    "Identity for IPv6 Prefix filter type.";
 }
  identity lan {
    base vpn-policy-filter-type;
    description
    "Identity for LAN Tag filter type.";
 }

  identity qos-profile-direction {
   description
   "Base identity for QoS profile direction.";
  }

  identity site-to-wan {
    base qos-profile-direction;
    description
    "Identity for Site-to-WAN direction.";
  }
  identity wan-to-site {
    base qos-profile-direction;
    description
    "Identity for WAN-to-Site direction.";
  }
  identity both {
    base qos-profile-direction;
    description
    "Identity for both WAN-to-Site direction
    and Site-to-WAN direction.";
  }
  /* Groupings */
  grouping vpn-service-cloud-access {
   container cloud-accesses {
    if-feature cloud-access;
    list cloud-access {
     key cloud-identifier;
     leaf cloud-identifier {
      type leafref {
       path "/l3vpn-svc/vpn-profiles/"+
       "valid-provider-identifiers/cloud-identifier/id";
      }
      description
      "Identification of cloud service.
      Local administration meaning.";
     }
Top   ToC   RFC8299 - Page 138
     choice list-flavor {
      case permit-any {
       leaf permit-any {
        type empty;
        description
        "Allows all sites.";
       }
      }
      case deny-any-except {
       leaf-list permit-site {
        type leafref {
         path "/l3vpn-svc/sites/site/site-id";
        }
        description
        "Site ID to be authorized.";
       }
      }
      case permit-any-except {
       leaf-list deny-site {
        type leafref {
        path "/l3vpn-svc/sites/site/site-id";
       }
       description
       "Site ID to be denied.";
       }
      }
      description
      "Choice for cloud access policy.  By
      default, all sites in the IP VPN MUST
      be authorized to access the cloud.";
     }
     container address-translation {
      container nat44 {
       leaf enabled {
        type boolean;
         default false;
         description
         "Controls whether or not Network address
         translation from IPv4 to IPv4 (NAT44)
         [RFC3022] is required.";
       }
       leaf nat44-customer-address {
        type inet:ipv4-address;
         description
         "Address to be used for network address
         translation from IPv4 to IPv4.  This is
         to be used if the customer is providing
         the IPv4 address.  If the customer address
Top   ToC   RFC8299 - Page 139
         is not set, the model assumes that the
         provider will allocate the address.";
       }
       description
       "IPv4-to-IPv4 translation.";
      }
      description
      "Container for NAT.";
     }
     description
     "Cloud access configuration.";
    }
    description
    "Container for cloud access configurations.";
   }
   description
   "Grouping for VPN cloud definition.";
  }
  grouping multicast-rp-group-cfg {
   choice group-format {
    mandatory true;
    case singleaddress {
     leaf group-address {
      type inet:ip-address;
      description
      "A single multicast group address.";
     }
    }
    case startend {
     leaf group-start {
      type inet:ip-address;
      description
      "The first multicast group address in
      the multicast group address range.";
     }
     leaf group-end {
      type inet:ip-address;
      description
      "The last multicast group address in
      the multicast group address range.";
     }
    }
    description
    "Choice for multicast group format.";
   }
   description
   "This grouping defines multicast group or
   multicast groups for RP-to-group mapping.";
Top   ToC   RFC8299 - Page 140
  }
  grouping vpn-service-multicast {
   container multicast {
    if-feature multicast;
    leaf enabled {
     type boolean;
     default false;
     description
     "Enables multicast.";
    }
    container customer-tree-flavors {
     leaf-list tree-flavor {
      type identityref {
       base multicast-tree-type;
      }
      description
       "Type of tree to be used.";
     }
     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 Rendezvous Point (RP)
         must be a provider-managed node.  Set to false
         if it is a customer-managed node.";
        }
        leaf rp-redundancy {
         type boolean;
         default false;
         description
         "If true, a redundancy mechanism for the RP
         is required.";
        }
        leaf optimal-traffic-delivery {
         type boolean;
Top   ToC   RFC8299 - Page 141
         default false;
         description
         "If true, the SP must ensure that
         traffic uses an optimal path.  An SP may use
         Anycast RP or RP-tree-to-SPT switchover
         architectures.";
        }
        description
        "Parameters for a provider-managed RP.";
       }
       leaf rp-address {
        when "../provider-managed/enabled = 'false'" {
         description
         "Relevant when the RP is not provider-managed.";
        }
        type inet:ip-address;
          mandatory true;
        description
        "Defines the address of the RP.
        Used if the 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 multicast groups.";
        }
        description
        "Multicast groups associated with the RP.";
       }
       description
       "List of RP-to-group mappings.";
      }
      description
      "RP-to-group mappings parameters.";
     }
     container rp-discovery {
      leaf rp-discovery-type {
       type identityref {
        base multicast-rp-discovery-type;
        }
       default static-rp;
Top   ToC   RFC8299 - Page 142
       description
       "Type of RP discovery used.";
      }
      container bsr-candidates {
        when "derived-from-or-self(../rp-discovery-type, "+
            "'l3vpn-svc:bsr-rp')" {
        description
        "Only applicable if discovery type
        is BSR-RP.";
       }
       leaf-list bsr-candidate-address {
        type inet:ip-address;
         description
         "Address of BSR candidate.";
       }
       description
       "Container for List of Customer
       BSR candidate's addresses.";
      }
      description
      "RP discovery parameters.";
     }
     description
     "RP 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 CsC, and so MPLS is required.";
   }
   description
   "Grouping for MPLS CsC definition.";
  }
  grouping customer-location-info {
   container locations {
    list location {
     key location-id;
     leaf location-id {
      type svc-id;
Top   ToC   RFC8299 - Page 143
      description
      "Identifier for a particular location.";
     }
     leaf address {
      type string;
      description
      "Address (number and street) of the site.";
     }
     leaf postal-code {
      type string;
      description
      "Postal code of the site.";
     }
     leaf state {
      type string;
      description
      "State of the site.  This leaf can also be
      used to describe a region for a country that
      does not have states.";
     }
     leaf city {
      type string;
      description
      "City of the site.";
     }
     leaf country-code {
      type string {
       pattern '[A-Z]{2}';
      }
      description
      "Country of the site.
      Expressed as ISO ALPHA-2 code.";
     }
     description
     "Location of the site.";
    }
    description
    "List of locations for the site.";
   }
   description
   "This grouping defines customer location parameters.";
  }
  grouping site-group {
   container groups {
    list group {
     key group-id;
     leaf group-id {
      type string;
Top   ToC   RFC8299 - Page 144
      description
      "Group-id the site belongs to.";
     }
     description
     "List of group-ids.";
    }
    description
    "Groups the site or site-network-access belongs to.";
   }
   description
   "Grouping definition to assign
   group-ids to site or site-network-access.";
  }
  grouping site-diversity {
   container site-diversity {
    if-feature site-diversity;
    uses site-group;
    description
    "Diversity constraint type.  All
    site-network-accesses will inherit
    the group values defined here.";
   }
   description
   "This grouping defines site
   diversity parameters.";
  }
  grouping access-diversity {
   container access-diversity {
    if-feature site-diversity;
    uses site-group;
    container constraints {
     list constraint {
      key constraint-type;
      leaf constraint-type {
       type identityref {
        base placement-diversity;
       }
       description
       "Diversity constraint type.";
      }
      container target {
       choice target-flavor {
        default id;
        case id {
         list group {
          key group-id;
          leaf group-id {
           type string;
Top   ToC   RFC8299 - Page 145
           description
           "The constraint will be applied against
           this particular group-id for this site
           network access level.";
          }
          description
          "List of group-ids associated with one specific
          constraint for this site network access level.";
         }
        }
        case all-accesses {
         leaf all-other-accesses {
          type empty;
          description
          "The constraint will be applied against
          all other site network accesses of this site.";
         }
        }
        case all-groups {
         leaf all-other-groups {
          type empty;
          description
          "The constraint will be applied against
          all other groups managed by the customer.";
         }
        }
        description
        "Choice for the target flavor definition.";
       }
       description
       "The constraint will be applied against a
       Specific target, and the target can be a list
       of group-ids,all other site network accesses of
       this site, or all other groups managed by the
       customer.";
      }
      description
      "List of constraints.";
     }
     description
     "Placement constraints for this site network access.";
    }
    description
    "Diversity parameters.";
   }
   description
   "This grouping defines access diversity parameters.";
  }
Top   ToC   RFC8299 - Page 146
  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.";
  }
  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.";
  }
  grouping flow-definition {
   container match-flow {
    leaf dscp {
     type inet:dscp;
      description
      "DSCP value.";
    }
Top   ToC   RFC8299 - Page 147
    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 inet:port-number;
         must "current() < ../l4-src-port-range/lower-port or "+
         "current() > ../l4-src-port-range/upper-port" {
      description
      "If l4-src-port and l4-src-port-range/lower-port and
      upper-port are set at the same time, l4-src-port
      should not overlap with l4-src-port-range.";
      }
      description
      "Match on Layer 4 src port.";
    }
    leaf-list target-sites {
      if-feature target-sites;
      type svc-id;
      description
      "Identify a site as traffic destination.";
    }
    container l4-src-port-range {
      leaf lower-port {
      type inet:port-number;
Top   ToC   RFC8299 - Page 148
      description
      "Lower boundary for port.";
     }
     leaf upper-port {
      type inet:port-number;
      must ". >= ../lower-port" {
       description
       "Upper boundary for port.  If it
       exists, the upper boundary must be
       higher than the lower boundary.";
      }
      description
      "Upper boundary for port.";
     }
      description
      "Match on Layer 4 src port range.  When
      only the lower-port is present, it represents
      a single port.  When both the lower-port and
      upper-port are specified, it implies
      a range inclusive of both values.";
    }
    leaf l4-dst-port {
     type inet:port-number;
          must "current() < ../l4-dst-port-range/lower-port or "+
          "current() > ../l4-dst-port-range/upper-port" {
      description
      "If l4-dst-port and l4-dst-port-range/lower-port
      and upper-port are set at the same time,
      l4-dst-port should not overlap with
      l4-src-port-range.";
      }
      description
      "Match on Layer 4 dst port.";
    }
    container l4-dst-port-range {
     leaf lower-port {
      type inet:port-number;
      description
      "Lower boundary for port.";
     }
     leaf upper-port {
      type inet:port-number;
      must ". >= ../lower-port" {
      description
      "Upper boundary must be
      higher than lower boundary.";
      }
      description
Top   ToC   RFC8299 - Page 149
      "Upper boundary for port.  If it exists,
      upper boundary must be higher than lower
      boundary.";
     }
     description
     "Match on Layer 4 dst port range.  When only
     lower-port is present, it represents a single
     port.  When both lower-port and upper-port are
     specified, it implies a range inclusive of both
     values.";
    }
    leaf protocol-field {
     type union {
      type uint8;
      type identityref {
       base protocol-type;
      }
     }
     description
     "Match on IPv4 protocol or IPv6 Next Header field.";
    }
    description
    "Describes flow-matching criteria.";
   }
   description
   "Flow definition based on criteria.";
  }
  grouping site-service-basic {
   leaf svc-input-bandwidth {
     type uint64;
     units bps;
     mandatory true;
      description
      "From the customer site's perspective, the service
      input bandwidth of the connection or download
      bandwidth from the SP to the site.";
   }
   leaf svc-output-bandwidth {
    type uint64;
    units bps;
    mandatory true;
      description
      "From the customer site's perspective, the service
      output bandwidth of the connection or upload
      bandwidth from the site to the SP.";
   }
   leaf svc-mtu {
    type uint16;
Top   ToC   RFC8299 - Page 150
    units bytes;
    mandatory true;
     description
     "MTU at service level.  If the service is IP,
     it refers to the IP MTU.  If CsC is enabled,
     the requested 'svc-mtu' leaf will refer to the
     MPLS MTU and not 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;
     default false;
      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 the signalling protocol
      between the PE and the CE.  In this case,
      an IGP routing protocol must also be activated.";
      }
     enum bgp {
      description
      "Use BGP (as per RFC 8277) as the signalling protocol
      between the PE and the CE.
      In this case, BGP must also be configured as
      the routing protocol.";
      }
     }
     default bgp;
     description
     "MPLS signalling type.";
Top   ToC   RFC8299 - Page 151
    }
      description
      "This container is used when the customer provides
      MPLS-based services.  This is only used in the case
      of CsC (i.e., a customer builds an MPLS service using
      an IP VPN to carry its traffic).";
   }
      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 string;
       description
       "A description identifying the
        qos-classification-policy rule.";
      }
      choice match-type {
       default match-flow;
       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.";
Top   ToC   RFC8299 - Page 152
     }
     description
     "Configuration of the traffic classification policy.";
    }
    container qos-profile {
     choice qos-profile {
      description
      "Choice for QoS profile.
      Can be standard profile or customized profile.";
      case standard {
       description
       "Standard QoS profile.";
       leaf profile {
        type leafref {
        path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers"+
            "/qos-profile-identifier/id";
        }
        description
        "QoS profile to be used.";
       }
      }
      case custom {
       description
       "Customized QoS profile.";
        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 direction {
                   type identityref {
                    base qos-profile-direction;
                    }
                   default both;
                    description
                    "The direction to which the QoS profile
                    is applied.";
                 }
                  leaf rate-limit {
                   type decimal64 {
                    fraction-digits 5;
                    range "0..100";
Top   ToC   RFC8299 - Page 153
           }
                   units percent;
                    description
                    "To be used if the class must be rate-limited.
                    Expressed as percentage of the service
                    bandwidth.";
         }
         container latency {
          choice flavor {
           case lowest {
            leaf use-lowest-latency {
             type empty;
              description
              "The traffic class should use the path with the
              lowest latency.";
            }
           }
           case boundary {
            leaf latency-boundary {
             type uint16;
             units msec;
             default 400;
              description
              "The traffic class should use a path with a
              defined maximum latency.";
            }
           }
           description
           "Latency constraint on the traffic class.";
          }
          description
          "Latency constraint on the traffic class.";
         }
         container jitter {
          choice flavor {
           case lowest {
            leaf use-lowest-jitter {
             type empty;
              description
              "The traffic class should use the path with the
              lowest jitter.";
            }
           }
           case boundary {
            leaf latency-boundary {
             type uint32;
             units usec;
             default 40000;
Top   ToC   RFC8299 - Page 154
              description
              "The traffic class should use a path with a
              defined maximum jitter.";
            }
           }
           description
           "Jitter constraint on the traffic class.";
          }
          description
          "Jitter constraint on the traffic class.";
         }
         container bandwidth {
          leaf guaranteed-bw-percent {
           type decimal64 {
                   fraction-digits 5;
                   range "0..100";
           }
           units percent;
           mandatory true;
            description
            "To be used to define the guaranteed bandwidth
            as a percentage of the available service bandwidth.";
          }
          leaf end-to-end {
           type empty;
            description
            "Used if the bandwidth reservation
            must be done on the MPLS network too.";
          }
          description
          "Bandwidth constraint on the traffic class.";
         }
         description
         "List of classes of services.";
        }
        description
        "Container for list of classes of services.";
       }
      }
     }
     description
     "QoS profile configuration.";
    }
    description
    "QoS configuration.";
   }
   description
   "This grouping defines QoS parameters for a site.";
Top   ToC   RFC8299 - Page 155
  }
  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;
     default false;
      description
      "If true, traffic encryption on the connection is required.";
    }
    leaf layer {
       when "../enabled = 'true'" {
          description
          "Require a value for layer when enabled is true.";
        }
     type enumeration {
      enum layer2 {
       description
       "Encryption will occur at Layer 2.";
      }
      enum layer3 {
       description
       "Encryption will occur at Layer 3.
       For example, IPsec may be used when
       a customer requests Layer 3 encryption.";
      }
     }
     description
      "Layer on which encryption is applied.";
    }
    container encryption-profile {
     choice profile {
      case provider-profile {
       leaf profile-name {
        type leafref {
         path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers"+
                 "/encryption-profile-identifier/id";
        }
          description
          "Name of the SP profile to be applied.";
Top   ToC   RFC8299 - Page 156
       }
      }
      case customer-profile {
       leaf algorithm {
        type string;
          description
          "Encryption algorithm to be used.";
       }
       choice key-type {
        default psk;
        case psk {
         leaf preshared-key {
          type string;
          description
          "Pre-Shared Key (PSK) coming from the customer.";
         }
        }
        description
        "Type of keys to be used.";
       }
      }
      description
      "Choice of encryption profile.  The encryption
      profile can be the provider profile or customer 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, etc. Operator specific.";
     }
     leaf strict {
      type boolean;
      default false;
      description
Top   ToC   RFC8299 - Page 157
      "Defines whether 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.
      For example, this could mean no dial access type.";
    }
    leaf bearer-reference {
     if-feature bearer-reference;
     type string;
      description
      "This is an internal reference for the SP.";
    }
      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 "derived-from-or-self(../type, 'l3vpn-svc:ospf')" {
      description
      "Only applies when protocol is OSPF.";
      }
      if-feature rtg-ospf;
      leaf-list address-family {
       type address-family;
           min-elements "1";
          description
Top   ToC   RFC8299 - Page 158
          "If OSPF is used on this site, this node
          contains a configured value.  This node
          contains at least one address family
          to be activated.";
      }
      leaf area-address {
       type yang:dotted-quad;
       mandatory true;
          description
          "Area address.";
      }
      leaf metric {
       type uint16;
       default 1;
          description
          "Metric of the PE-CE link.  It is used
          in the routing state calculation and
          path selection.";
      }
      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 to by its ID.";
        }
        leaf metric {
         type uint16;
         default 1;
          description
          "Metric of the sham link.  It is used in
          the routing state calculation and path
          selection.  The default value is set
          to 1.";
        }
          description
          "Creates a sham link with another site.";
       }
       description
       "List of sham links.";
      }
      description
      "OSPF-specific configuration.";
     }
     container bgp {
Top   ToC   RFC8299 - Page 159
      when "derived-from-or-self(../type, 'l3vpn-svc:bgp')" {
       description
       "Only applies when protocol is BGP.";
      }
      if-feature rtg-bgp;
      leaf autonomous-system {
       type uint32;
       mandatory true;
          description
          "Customer AS number in case the customer
          requests BGP routing.";
      }
      leaf-list address-family {
       type address-family;
           min-elements "1";
          description
          "If BGP is used on this site, this node
          contains a configured value.  This node
          contains at least one address family
          to be activated.";
      }
      description
      "BGP-specific configuration.";
     }
     container static {
      when "derived-from-or-self(../type, 'l3vpn-svc:static')" {
        description
        "Only applies when protocol is static.
        BGP activation requires the SP to know
        the address of the customer peer.  When
        BGP is enabled, the 'static-address'
        allocation type for the IP connection
        MUST be used.";
      }
      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.";
        }


(next page on part 8)

Next Section