<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  consensus="true"
  docName="draft-mahesh-bess-srv6-mup-yang-00"
  ipr="trust200902"
  obsoletes=""
  submissionType="IETF"
  updates=""
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="SRv6 MUP YANG Model">A YANG Model for SRv6 Mobile User Plane</title>
    <seriesInfo name="Internet-Draft" value="draft-mahesh-bess-srv6-mup-yang-00"/>
   
    <author fullname="Mahesh Jethanandani" initials="M." role="editor" surname="Jethanandani">
      <organization>Arrcus, Inc</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country/>
        </postal>        
        <phone/>
        <email>mjethanandani@gmail.com</email>  
        <uri/>
      </address>
    </author>
    <author fullname="Tetsuya Murakami" initials="T." surname="Murakami">
      <organization>Arrcus, Inc</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country/>
        </postal>        
        <phone/>
        <email>tetsuya@arrcus.com</email>  
        <uri/>
      </address>
    </author>
   
    <date/>
    <area>Routing</area>
    <workgroup>Spring</workgroup>
    <keyword>srv6</keyword>
    <keyword>yang</keyword>

    <abstract>
      <t>This document defines a YANG data model for configuration
      and management of SRv6 for the Mobile User Plane (MUP).</t>
    </abstract>
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
      <t>In mobile networks, mobility systems provide connectivity
      over a wireless link to stationary and non-stationary nodes.
      The user-plane establishes a tunnel between the mobile node
      and its anchor node over IP-based backhaul and core networks.
      </t>

      <t>When SRv6 is applied to mobile networks, it enables a
      source routing architecture, where operators get to explicitly
      specify a route for the packets to traverse both to and from a
      mobile node. The SRv6 Endpoint nodes serve as mobile user-plane
      anchors.</t>

      <t>For example, in an Enhanced mode topology, the intermediate
      waypoints, SIDs, can be used for Traffic Engineering. For more
      details, see <xref
      target="I-D.ietf-dmm-srv6-mobile-uplane">Segment Routing IPv6
      for Mobile User Plane</xref>, Section 5.2. The gNB and UPF are
      SR-aware, and there are two service segments, one for traffic
      engineering to support a low latency path, and the other for
      service programming. In such a topology the operator routes the
      traffic through these SRv6 nodes, so they can perform their
      Endpoint functionality and forward the packet. Further, in the
      uplink direction, when the gNB receives a packet from a UE, it
      adds the segments of the SR policy to route the traffic through
      those two segments, while doing something similar in the
      downlink direction.</t>
      
      <t>This document describes a <xref target="RFC7950">YANG 1.1
      </xref> data model for the Segment Routing IPv6 (SRv6) user
      plane of mobile networks.</t>
      
      <t>The model conforms to the <xref target="RFC8342">NMDA</xref>
      architecture.</t>

      <section>
	<name>Requirements Language</name>
	<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
	"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
	RECOMMENDED", "MAY", and "OPTIONAL" in this document are to 
	be interpreted as described in BCP 14 <xref 
	target="RFC2119"/> <xref target="RFC8174"/> when, and 
	only when, they appear in all capitals, as shown here.</t>
      </section>
      <section>
	<name>Note to RFC Editors</name>
        <t>This document uses several placeholder values throughout
        the document. Please replace them as follows and remove this
        note before publication.</t>

        <t>RFC XXXX, where XXXX is the number assigned to this
        document at the time of publication.</t>

        <t>2022-03-08 with the actual date of the publication of this
        document.</t>
      </section>
    </section>

    <section>
      <name>Terminology</name>
      <t>
	This document references terms defined in other documents.  In
	particular, it imports definitions for the following terms
	from <xref target="RFC8402">Segment Routing
	Architecture</xref>, and <xref target="RFC8754">IPv6 Segment
	Routing Header (SRH)</xref>.
      </t>

      <ul>
	<li>Active Segment</li>
	<li>BGP-Prefix Segment</li>
	<li>Prefix SID</li>
	<li>Segment</li>
	<li>SID</li>
	<li>SRH</li>
        <li>SRv6</li>
	<li>SRv6 Endpoint nodes</li>
	<li>SRv6 SID</li>
	<li>Segment Routing domain (SR domain)</li>
	<li>SR Global Block (SRGB)</li>
	<li>SR Local Block (SRLB)</li>
      </ul>
	
      <section>
	<name>Acronyms</name>
	<t>This document uses a few acronyms. Some of them are defined
	here for reference.</t>
	<table>
	  <name>Acronyms</name>
          <thead>
            <!-- [REPLACE/DELETE] a table header is optional -->
            <tr><th>Acronym</th><th>Definition</th></tr>
          </thead>
          <tbody>
	    <tr><td>gNB</td><td>gNodeB, a 5G Base Station using New
	    Radio technology</td></tr>
            <tr><td>MUP</td><td>Mobile User Plane</td></tr>
            <tr><td>SR</td><td>Segment Routing</td></tr>
            <tr><td>SRv6</td><td>Segment Routing over v6</td></tr>
            <tr><td>UE</td><td>User Equipment</td></tr>
            <tr><td>UPF</td><td>User Plane Function</td></tr>
          </tbody>
	</table>
      </section>
    </section>

    <section>
      <name>Tree Diagram</name>
      <t>An abridged version of the tree diagram is shown here.
      Annotations used in the diagram are defined in <xref
      target="RFC8340">YANG Tree Diagrams </xref>.</t>
      <figure>
	<name>Tree Diagram for SRv6 YANG Model</name>
        <artwork><![CDATA[
module: ietf-srv6-mobile

  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bgp:bgp/bgp:global:
    +--rw route-distinguisher?     rt-types:route-distinguisher
    +--rw label-allocation-mode?   identityref
    +--rw sid-allocation-mode?     identityref
    +--rw srv6
       +--rw locator?                 leafref
       +--ro sid-manager-connected?   boolean
       +--ro locator-registered?      boolean
       +--ro micro-segment-enabled?   boolean
       +--rw mobile
          +--rw encapsulation
          |     ...
          +--rw decapsulations
          |     ...
          +--rw decapsulation-source-prefix?   inet:ipv6-prefix
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bgp:bgp/bgp:global
            /bgp:route-selection-options:
    +--rw selection-deferral-time?   uint16
    +--rw med-missing-as-worst?      boolean
    +--rw multipath-as-path-relax?   boolean
    +--rw multipath-nexthop-relax?   boolean
  augment /rt-pol:routing-policy/rt-pol:defined-sets
            /bp:bgp-defined-sets:
    +--rw n4-interface-sets
       +--rw interface-set* [name]
          +--rw name      string
          +--rw member*   identityref
  augment /rt-pol:routing-policy/rt-pol:policy-definitions
            /rt-pol:policy-definition/rt-pol:statements
            /rt-pol:statement/rt-pol:conditions/bp:bgp-conditions:
    +--rw match-n4-network-interface-set
       +--rw n4-network-instance-set?   leafref
       +--rw match-set-options?         match-set-options-type
  augment /rt-pol:routing-policy/rt-pol:policy-definitions
            /rt-pol:policy-definition/rt-pol:statements
            /rt-pol:statement/rt-pol:actions/bp:bgp-actions:
    +--rw set-network-interface
       +--rw apply-policy
          +--rw import-policy*           leafref
          +--rw default-import-policy?   default-policy-type
          +--rw export-policy*           leafref
          +--rw default-export-policy?   default-policy-type

]]></artwork>
      </figure>

    </section>
    <section>
      <name>YANG Model</name>
      <t>The YANG model is divided into two parts. The first part of
      the model augments the BGP model in <xref
      target="I-D.ietf-idr-bgp-model"> BGP Model for Service Provider
      Network</xref> for the BGP configuration, while the second part
      augments the BGP Routing Policy model in <xref
      target="I-D.ietf-idr-bgp-model">BGP Model for Service Provider
      Network</xref>.</t>

      <t>This model defines a new SAFI called 'srv6-mup'. The BGP
      model is augmented both at a global level to add SRv6
      configuration, and at the route selection option. The BGP policy
      model is augemented to add a defined set, a set of match
      options, and a set of actions.</t>
      
      <t>The model imports <xref target="RFC6991">Common YANG Data
      Types </xref>, <xref target="RFC8349">A YANG Data Model for
      Routing Management(NMDA Version)</xref>, <xref
      target="RFC9067">A YANG Data Model for Routing Policy</xref>,
      <xref target="RFC9020">YANG Data Model for Segment
      Routing</xref>, <xref target="I-D.ietf-spring-srv6-yang">YANG
      Data Model for SRv6 Base and Static</xref>, and <xref
      target="I-D.ietf-idr-bgp-model">BGP Model for Service Provider
      Network</xref>.</t>
      
      <figure>
        <name>SRv6 YANG Model for Mobile User Plane</name>
          <artwork><![CDATA[
<CODE BEGINS> file "ietf-srv6-mobile@2022-03-08.yang"
module ietf-srv6-mobile {
  yang-version "1.1";
  namespace "urn:ietf:params:xml:ns:yang:ietf-srv6-mobile";
  prefix "srv6-mob";

  import ietf-inet-types {
    prefix "inet";
    reference
      "RFC 6991: Common YANG Data Types.";
  }
  import ietf-routing {
    prefix rt;
    reference
      "RFC 8349, A YANG Data Model for Routing Management
       (NMDA Version).";
  }
  import ietf-routing-types {
    prefix rt-types;
    reference
      "RFC 8294: Common YANG Types for the Routing Area.";
  }
  import ietf-routing-policy {
    prefix rt-pol;
    reference
      "RFC 9067: A YANG Data Model for Routing Policy.";
  }
  import ietf-bgp {
    prefix bgp;
    reference
      "I-D.ietf-idr-bgp-model: BGP Model for Service Provider 
       Network.";
  }
  import ietf-bgp-policy {
    prefix bp;
    reference
      "I-D.ietf-idr-bgp-model: BGP Model for Service Provider 
       Network.";
  }
  import ietf-bgp-types {
    prefix bt;
    reference
      "I-D.ietf-idr-bgp-model: BGP Model for Service Provider 
       Network.";
  }
  import ietf-segment-routing {
    prefix sr;
    reference
      "RFC 9020: YANG Data Model for Segment Routing.";
  }
  import ietf-srv6-base {
    prefix srv6;
    reference
      "I-D.ietf-spring-srv6-yang: YANG Data Model for SRv6 Base
       and Static.";
  }
  import ietf-srv6-types {
    prefix srv6-types;
    reference
      "RFC 9020: YANG Data Model for Segment Routing.";
  }

  organization
    "IETF SPRING Working Group";

  contact
    "WG Web:   <https://datatracker.ietf.org/wg/spring/about>
     WG List:  <spring@ietf.org>

     Editor: Mahesh Jethanandani (mjethanandani at gmail dot com)
     Author:  Tetsuya Murakami (tetsuya at arrcus dot com)";

  description
    "This module augments the BGP YANG model to add support for
     configuration in mobile networks.

     Copyright (c) 2022 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

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

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

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";

  revision "2022-03-08" {
    description
      "Initial Version.";
    reference
      "RFC XXXX, A YANG Model for BGP configuration in mobile 
       networks.";
  }

 /*
  * Features
  */

  /*
   * Typedefs
   */
  typedef srv6-mobile-function-type {
    type union {
      type identityref {
        base "srv6-types:srv6-endpoint-type";
      }
      type uint16;
    }
    description
      "Type definition for SRV6 mobile function. Unknown
       values are represented as the numeric value.";
    reference
      "draft-ietf-dmm-srv6-mobile-uplane";
  }

  /*
   * Identities
   */
  identity srv6-mup {
    base bt:afi-safi-type;
    description
      "Segment Routing for Mobile User Plane (AFI,SAFI = ?,?)";
    reference
      "RFC XXXX: A YANG Model for BGP configuration in mobile 
       networks.";
  }

  identity label-allocation-mode {
    description
      "Base identity to be used to express types of label allocation
       strategies to be used within a network instance";
  }

  identity label-per-prefix {
    base label-allocation-mode;
    description
      "A label is to be allocated per prefix entry in the RIB for the
       network instance";
  }

  identity label-per-nexthop {
    base label-allocation-mode;
    description
      "A label is to be allocated per nexthop entry in the RIB for
       the network instance";
  }

  identity label-instance {
    base label-allocation-mode;
    description
      "A single label is to be used for the instance";
  }

  identity sid-allocation-mode {
    description
      "Base identity to be used to express types of SRv6 segment ID
       allocation strategies to be used within a network instance.";
  }

  identity sid-per-nexthop {
    base sid-allocation-mode;
    description
      "A segment ID is to be allocated per nexthop entry in the RIB
       for the network instance";
  }

  identity sid-instance {
    base sid-allocation-mode;
    description
      "A single segment ID is to be used for the instance";
  }

  identity sid-per-nexthop-no-transportation {
    base sid-allocation-mode;
    description
      "A segment ID is to be allocated per nexthop entry in the
       RIB for the network instance";
  }

  identity sid-instance-no-transportation {
    base sid-allocation-mode;
    description
      "A single segment ID is to be used for the instance";
  }

  identity mobile-interface-type {
    description
      "Base identity for different mobile interfaces.";
  }

  identity n4 {
    base mobile-interface-type;
    description
      "N4 interface.";
  }

  /*
   * Groupings
   */

  /* 
   * BGP configuration
   */
  augment "/rt:routing/rt:control-plane-protocols" +
          "/rt:control-plane-protocol/bgp:bgp/bgp:global" {

    description
      "Augmentation of the BGP global configuration to add srv6
       mobile configuration.";

    leaf route-distinguisher {
      type rt-types:route-distinguisher;
      description
        "The route distinguisher that should be used for the local
         VRF or VSI instance when it is signalled via BGP.";
    }

    leaf label-allocation-mode {
      type identityref {
        base label-allocation-mode;
      }
      must "not(../sid-allocation-mode)" {
        error-message "label-allocation-mode and sid-allocation-mode"
                    + "cannot co-exist";
      }
      must "not(/rt:routing/rt:control-plane-protocols" +
           "/rt:control-plane-protocol" +
           "/bgp:bgp/bgp:global/srv6/mobile/encapsulation/config" +
           "/locator | " +
           "/rt:routing/rt:control-plane-protocols" +
           "/rt:control-plane-protocol/bgp:bgp/bgp:global" +
           "/srv6/locator)" {
        error-message "SRv6 configurations must be removed first";
      }
      description
        "The label allocation mode to be used for L3 entries
         in the network instance";
    }

    leaf sid-allocation-mode {
      type identityref {
        base sid-allocation-mode;
      }
      must "not(../label-allocation-mode)" {
        error-message "label-allocation-mode and sid-allocation-mode "
                    + "cannot co-exist";
      }
      must "boolean(/rt:routing/rt:control-plane-protocols" +
           "/rt:control-plane-protocol" +
           "/bgp:bgp/bgp:global/srv6/mobile/encapsulation/locator |" +
           "/rt:routing/rt:control-plane-protocols" +
           "/rt:control-plane-protocol/bgp:bgp/bgp:global/srv6" +
           "/mobile/decapsulations/decapsulation/locator |" +
           "/rt:routing/rt:control-plane-protocols" +
           "/rt:control-plane-protocol/bgp:bgp/bgp:global/srv6" +
           "/locator)" {
        error-message "SRv6 locator name must be configured";
      }
      description
        "The segment ID allocation mode to be used for L3 entries
         in the network instance";
    }

    container srv6 {
      description
        "SRv6 mobile container.";

      leaf locator {
        type leafref {
          path "/rt:routing/sr:segment-routing/" +
               "srv6:srv6/srv6:locators/srv6:locator/srv6:name";    
        }
        description
          "Locator configuration.";
      }

      leaf sid-manager-connected {
        type boolean;
        config false;
        description
          "Connection with segment ID manager is active";
      }

      leaf locator-registered {
        type boolean;
        config false;
        description
          "Locator name is registered";
      }

      leaf micro-segment-enabled {
        type boolean;
        config false;
        description
          "Locator has enabled micro-segment behavior";
      }

      container mobile {
        when "derived-from-or-self(/rt:routing" +
             "/rt:control-plane-protocols" +
             "/rt:control-plane-protocol/bgp:bgp/bgp:global" +
             "/bgp:afi-safis/bgp:afi-safi/bgp:name, 'srv6-mup')" {
          description
            "This augmentation is valid only for a MUP SAFI.";
        }

        description
          "Mobile configuration of SRv6.";

        container encapsulation {
          description
            "Encapsulation configuration.";

          leaf locator {
            type leafref {
              path "/rt:routing/sr:segment-routing/" +
                   "srv6:srv6/srv6:locators/srv6:locator/srv6:name";
            }
            description
              "Reference to SRv6 locater key";
          }

          leaf function {
            type srv6-mobile-function-type;
            must "boolean(current()/../locator)" {
              error-message
                "SRv6 Mobile Locator name must be configured";
            }
            description
              "One of the SRv6 function types.";
          }

          leaf source-adress {
            type inet:ipv4-address;
            description
              "GTP source IP address";
          }

          leaf source-position {
            type uint8;
            description
              "Bit position of GTP source IP address";
          }

          container n4-network-instance {
            description
              "Definitions for the N4 interface.";

            leaf routing-policy {
              type leafref {
                path "/rt-pol:routing-policy/" +
                     "rt-pol:policy-definitions/" +
                     "rt-pol:policy-definition/rt-pol:name";
              }
              must "boolean(current()/../access)" {
                error-message
                  "SRv6 Mobile access instance name must be " +
                  "configured";
              }
              description
                "Reference to routing-policy";
            }

            leaf access {
              type string;
              description
                "Mobile access instance.";
            }
          }
        }

        container decapsulations {
          description
            "SRv6 mobile decapsulation configuration.";

          list decapsulation {
            key "id";
            description
              "SRv6 mobile Decapsulation config";

            leaf id {
              type uint16;
              description
                "SRv6 mobile decapsulation entry id";
            }

            leaf locator {
              type leafref {
              path "/rt:routing/sr:segment-routing/" +
                   "srv6:srv6/srv6:locators/srv6:locator/srv6:name";
              }
              description
                "Reference to SRv6 locater key";
            }

            leaf function {
              type srv6-mobile-function-type;
              must "boolean(current()/../locator)" {
                error-message
                  "SRv6 Mobile Locator name must be configured";
              }
              description
                "One of SRv6 function types.";
            }

            container n4-network-instance {
              description
                "Definitions for the N4 interface.";

              leaf core {
                type string;
                description
                  "Core instance";
              }
            }
          }
        }
        leaf decapsulation-source-prefix {
          type inet:ipv6-prefix;
          description
            "IPv6 prefix for GTP source address";
        }
      }
    }
  }

  augment "/rt:routing/rt:control-plane-protocols" +
          "/rt:control-plane-protocol/bgp:bgp/bgp:global" +
          "/bgp:route-selection-options" {

    description
      "Augmentation of the BGP global configuration for
       route selection options to add srv6 mobile configuration.";

    leaf selection-deferral-time {
      type uint16 {
        range 1..3600;
      }
      default 300;
      description
        "An upper-bound on the time (in seconds) that the best-path
         selection is deferred";
    }

    leaf med-missing-as-worst {
      type boolean;
      description
        "A route without MED is treated as with highest MED value";
    }

    leaf multipath-as-path-relax {
      type boolean;
      default true;
      description
        "Paths with different AS-Path but of same length can form 
         ECMP";
    }

    leaf multipath-nexthop-relax {
      type boolean;
      default false;
      description
        "Enable BGP multi-path for paths with same next-hop";
    }
  }

  augment "/rt-pol:routing-policy/rt-pol:defined-sets" +
          "/bp:bgp-defined-sets" {
    description
      "Augmentation of the Routing Policy module to add
       mobile interface defined sets.";

    container n4-interface-sets {
      description
        "Enclosing container for list of n4 interface sets.";

      list interface-set {
        key "name";
        description
          "List of defined interface sets.";

        leaf name {
          type string;
          description
            "Name of interface set. This is used to reference
             the set in match conditions.";
        }

        leaf-list member {
          type identityref {
            base "mobile-interface-type";
          }
          description
            "Members of interface set.";
        }
      }
    }
  }

  augment "/rt-pol:routing-policy/rt-pol:policy-definitions" +
          "/rt-pol:policy-definition/rt-pol:statements" +
          "/rt-pol:statement/rt-pol:conditions/bp:bgp-conditions" {
    description
      "Augmentation of the Routing Policy module to add conditions.";

    container match-n4-network-interface-set {
      description
        "Match a referenced network instance.";
      leaf n4-network-instance-set {
        type leafref {
          path "/rt-pol:routing-policy/rt-pol:defined-sets/"
             + "bp:bgp-defined-sets/n4-interface-sets/"
             + "interface-set/name";
        }
        description
          "References a defined community set.";
      }
      uses rt-pol:match-set-options-group;
    }
  }

  augment "/rt-pol:routing-policy/rt-pol:policy-definitions" +
          "/rt-pol:policy-definition/rt-pol:statements" +
          "/rt-pol:statement/rt-pol:actions/bp:bgp-actions" {
    description
      "Augmentation of the Routing Policy module to add actions.";

    container set-network-interface {
      description
        "Set a referenced network instance.";
      uses rt-pol:apply-policy-group;
    }
  }
}
<CODE ENDS>

]]></artwork>
        <!-- [CHECK] markers="true" means that the rendered file will have <CODE BEGINS> and <CODE ENDS> added -->
      </figure>
    </section>   
    
    <section anchor="IANA">
      <name>IANA Considerations</name>

      <t>This memo registers the following namespace URIs in the IETF
      XML in the "IETF XML Registry" <xref target="RFC3688"
      format="default" sectionFormat="of"
      derivedContent="RFC3688"/>:</t>

      <dl newline="false" spacing="compact" indent="3">
        <dt>URI:</dt>
        <dd>urn:ietf:params:xml:ns:yang:ietf-srv6-mobile</dd>
        <dt>Registrant Contact:</dt>
        <dd>The IESG.</dd>
        <dt>XML:</dt>
        <dd>N/A; the requested URI is an XML namespace.</dd>
      </dl>

      <t indent="0">This document registers the following YANG modules
      in the "YANG Module Names" registry <xref target="RFC6020"
      format="default" sectionFormat="of"
      derivedContent="RFC6020"/>:</t>

      <dl newline="false" spacing="compact" indent="3">
        <dt>Name:</dt>
        <dd>ietf-srv6-mobile</dd>
        <dt>Namespace:</dt>
        <dd>urn:ietf:params:xml:ns:yang:ietf-srv6-mobile</dd>
        <dt>Prefix:</dt>
        <dd>srv6-mob</dd>
        <dt>Reference:</dt>
        <dd>RFC XXXX</dd>
      </dl>
    </section>
    
    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>The YANG module specified in this document defines a schema
      for data that is designed to be accessed via network management
      protocols such as <xref target="RFC6241">NETCONF</xref> or <xref
      target="RFC8040">RESTCONF</xref>. The lowest NETCONF layer is
      the secure transport layer, and the mandatory-to-implement
      secure transport is <xref target="RFC6242">Secure Shell
      (SSH)</xref>. The lowest RESTCONF layer is HTTPS, and the
      mandatory-to-implement secure transport is <xref
      target="RFC8446">TLS</xref>.</t>

      <t>The <xref target="RFC8341">Network Configuration Access
      Control Model (NACM)</xref> provides the means to restrict
      access for particular NETCONF or RESTCONF users to a
      preconfigured subset of all available NETCONF or RESTCONF
      protocol operations and content.</t>

      <t>There are a number of data nodes defined in this YANG module
      that are writable/creatable/deletable (i.e., config true, which
      is the default). These data nodes may be considered sensitive or
      vulnerable in some network environments. Write operations (e.g.,
      edit-config) to these data nodes without proper protection can
      have a negative effect on network operations. These are the
      subtrees and data nodes and their sensitivity/vulnerability:</t>

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

      <t>Some of the RPC operations in this YANG module may be
      considered sensitive or vulnerable in some network
      environments. It is thus important to control access to these
      operations. These are the operations and their
      sensitivity/vulnerability:</t>

    </section>
    
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.3688.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6020.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6242.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6991.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7950.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8040.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8340.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8342.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8349.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8402.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8754.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9020.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9067.xml"/>
	<?rfc include='reference.I-D.ietf-idr-bgp-model.xml'?>
	<?rfc include='reference.I-D.ietf-spring-srv6-yang.xml'?>
      </references>
 
      <references>
        <name>Informative References</name>
	<?rfc include='reference.I-D.ietf-dmm-srv6-mobile-uplane.xml'?>
      </references>
    </references>
    
    <section>
      <name>Appendix 1 Complete Tree Diagram</name>
      <t>Here is a complete tree diagram for the configuration and
      operational part of the model.</t>
      <figure>
	<name>Complete tree diagram</name>
        <artwork><![CDATA[
module: ietf-srv6-mobile

  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bgp:bgp/bgp:global:
    +--rw route-distinguisher?     rt-types:route-distinguisher
    +--rw label-allocation-mode?   identityref
    +--rw sid-allocation-mode?     identityref
    +--rw srv6
       +--rw locator?                 leafref
       +--ro sid-manager-connected?   boolean
       +--ro locator-registered?      boolean
       +--ro micro-segment-enabled?   boolean
       +--rw mobile
          +--rw encapsulation
          |  +--rw locator?               leafref
          |  +--rw function?              srv6-mobile-function-type
          |  +--rw source-adress?         inet:ipv4-address
          |  +--rw source-position?       uint8
          |  +--rw n4-network-instance
          |     +--rw routing-policy?   leafref
          |     +--rw access?           string
          +--rw decapsulations
          |  +--rw decapsulation* [id]
          |     +--rw id                     uint16
          |     +--rw locator?               leafref
          |     +--rw function?
          |     |       srv6-mobile-function-type
          |     +--rw n4-network-instance
          |        +--rw core?   string
          +--rw decapsulation-source-prefix?   inet:ipv6-prefix
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bgp:bgp/bgp:global
            /bgp:route-selection-options:
    +--rw selection-deferral-time?   uint16
    +--rw med-missing-as-worst?      boolean
    +--rw multipath-as-path-relax?   boolean
    +--rw multipath-nexthop-relax?   boolean
  augment /rt-pol:routing-policy/rt-pol:defined-sets
            /bp:bgp-defined-sets:
    +--rw n4-interface-sets
       +--rw interface-set* [name]
          +--rw name      string
          +--rw member*   identityref
  augment /rt-pol:routing-policy/rt-pol:policy-definitions
            /rt-pol:policy-definition/rt-pol:statements
            /rt-pol:statement/rt-pol:conditions/bp:bgp-conditions:
    +--rw match-n4-network-interface-set
       +--rw n4-network-instance-set?   leafref
       +--rw match-set-options?         match-set-options-type
  augment /rt-pol:routing-policy/rt-pol:policy-definitions
            /rt-pol:policy-definition/rt-pol:statements
            /rt-pol:statement/rt-pol:actions/bp:bgp-actions:
    +--rw set-network-interface
       +--rw apply-policy
          +--rw import-policy*           leafref
          +--rw default-import-policy?   default-policy-type
          +--rw export-policy*           leafref
          +--rw default-export-policy?   default-policy-type

]]></artwork>
      </figure>
    </section>

    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>TBA</t>
    </section>
    
    <section anchor="Contributors" numbered="false">
      <!-- [REPLACE/DELETE] a Contributors section is optional -->
      <name>Contributors</name>
      <t>Thanks to all of the contributors.</t>
      <!-- [CHECK] it is optional to add a <contact> record for some or all contributors -->
    </section>
    
 </back>
</rfc>
