<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-li-ospf-ospfv3-srv6-extensions-00"
     ipr="trust200902">
  <front>
    <title abbrev="OSPFv3 Extensions for SRV6 ">OSPFv3 Extensions for SRv6</title>

    <author fullname="Zhenbin Li" initials="Z." surname="Li">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <code></code>
          <country></country>
        </postal>

        <email>lizhenbin@huawei.com</email>
      </address>
    </author>

    <author fullname="Zhibo Hu" initials="Z." surname="Hu">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <code></code>
          <country></country>
        </postal>

        <email>huzhibo@huawei.com</email>
      </address>
    </author>

    <author fullname="Dean Cheng" initials="D." surname="Cheng">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <code></code>
          <country></country>
        </postal>

        <email>dean.cheng@huawei.com</email>
      </address>
    </author>

    <date year="" />

    <abstract>
<t>Segment routing architecture (refer to <xref target="I-D.ietf-spring-segment-routing"></xref>) can be implemented over a MPLS data plane, an IPv4 data plane, as well as an IPv6 data plane. 
<xref target="I-D.filsfils-spring-srv6-network-programming"></xref> introduces the network programming concept in IPv6 data plane using segment routing technology, called SRv6, and it also
defines some basic functions. The SRv6 functions can be advertised
by routing protocols including OSPFv3, IS-IS and BGP-LS. This draft proposes some extensions to OSPFv3 
(<xref target="RFC5340"></xref>) required to support SRv6.</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">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
<section title="Introduction">

<t>This document proposes some extensions to OSPFv3 in order to support SRv6 as defined in <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>, and they are as follows:</t>

<t><list style="numbers">
<t>SRv6-Capabilities Sub-TLV: Refer to <xref target="capbility"></xref>. This Sub-TLV is used to announce the capability of an OSPFv3 router for SRv6 support with a list of parameters. This Sub-TLV, if used, is included in OSPFv3 Router Information LSA TLV LSA(<xref target="RFC7770"></xref>). </t>

<t>Maximum SL Sub-Sub-TLV: Refer to <xref target="maxSL"></xref>. This Sub-Sub-TLV carries the maximum value of the "SL" field in 
the SRH 
(<xref target="I-D.ietf-6man-segment-routing-header"></xref>)
of a received packet before applying the function associated with a SID. It may be included in the SRv6-Capabilities Sub-TLV.</t>

<t>Maximum End Pop SRH Sub-Sub-TLV: Refer to <xref target="maxEP"></xref>. This Sub-Sub-TLV carries the maximum number of the SIDs in the top SRH in an SRH stack to which the router can apply
"PSP" or "USP" flavors (refer to <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>). It may be included in the SRv6-Capabilities Sub-TLV.</t>

<t>Maximum T.Insert SRH Sub-Sub-TLV: Refer to <xref target="maxTinsert"></xref>. This Sub-Sub-TLV carries the maximum number of the SIDs that can be inserted as part of the "T.insert" behavior (refer to <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>). It may be included in the SRv6-Capabilities Sub-TLV.</t>

<t>Maximum T.Encap SRH Sub-Sub-TLV: Refer to <xref target="maxTencap"></xref>. This Sub-Sub-TLV carries the maximum number of the SIDs that can be inserted as part of the "T.Encap" behavior (refer to <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>). It may be included in the SRv6-Capabilities Sub-TLV.</t>

<t>Maximum End D SRH Sub-Sub-TLV: Refer to <xref target="maxEndD"></xref>. This Sub-Sub-TLV carries the maximum number of the SIDs in an SRH when applying "End.DX6" and "End.DT6" function (refer to <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>). It may be included in the SRv6-Capabilities Sub-TLV.</t>

<t>SRv6 SID TLV: Refer to <xref target="SRv6-SID"></xref>.
This TLV is used to advertise one or more SIDs along with their associated SRv6 functions. These SRv6 functions are well-known and defined in <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>, but may also be others defined in the future. This TLV is a top-level TLV and is included in OSPFv3 Router Information LSA(<xref target="RFC7770"></xref>).   </t>

<t>SRv6 Point-to-Point Adj-SID Sub-TLV: Refer to <xref target="P2P"></xref>. This Sub-TLV is used to advertise one or more SIDs on an OSPFv3 point-to-point adjacency for the support of SRv6 along with their associated functions. These SRv6 functions are well-known and defined in <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>, but may also be others defined in the future. This Sub-TLV is included in Router-Link TLV as defined in
<xref target = "I-D.ietf-ospf-ospfv3-lsa-extend"></xref>.</t>

<t>SRv6 LAN SRv6 Adj-SID Sub-TLV: Refer to <xref target="LAN"></xref>. This Sub-TLV is used to advertise one or more SIDs on an OSPFv3 LAN adjacency for the support of SRv6 along with their associated functions. These SRv6 functions are well-known and defined in <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>, but may also be others defined in the future. This Sub-TLV is included in Router-Link TLV as defined in
<xref target = "I-D.ietf-ospf-ospfv3-lsa-extend"></xref>. </t>
</list></t>

<t>For consistency in IGP's behavior, ideas are borrowed from
<xref target="I-D.bashandy-isis-srv6-extensions"></xref> including 
SRv6 functions supported and data format. </t>

</section> <!-- Introduction -->

<section anchor="ospfv3ext" title="OSPFv3 Extensions for SRv6">

<section anchor="capbility" title="SRv6-Capabilities Sub-TLV">

<t> When apply Segment Routing to IPv6 data plane, the list of 
segments is stored in segment routing header, referred to as 
"SRH", which is defined in <xref target="I-D.ietf-6man-segment-routing-header"></xref>.</t>

<t>A router that supports SRv6 MUST be able to process the segment
routing header as described in <xref target="I-D.ietf-6man-segment-routing-header"></xref>, as well as apply behaviors and
flavors as described in <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>. In either case, there exists a
limit to which the router can perform according to its own ability that needs to be advertised to other routers in the same SR domain.</t>
 
<t> The OSPFv3-SRv6-Capbilities Sub-TLV is designed for an OSPFv3 router to make announcement in the SRv6 domain about its ability in the context of SRv6 support.</t>

<t>The format of OSPFv3-SRv6-Capabilities Sub-TLV is shown in 
<xref target="capabilities"></xref>. </t>

          <figure anchor="capabilities">
            <preamble></preamble>
            <artwork><![CDATA[ 

0                 1                  2                     3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    |            Flags              |  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Sub-Sub-TLVs ....


0                   1             
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E|                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
          <postamble></postamble>
          </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-1</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t> 2 + length of sub-sub-TLVs</t>
</list></t>

<t>Flags (16 bits)<list counter="1" hangIndent="5">
<t>E-Flag: If set, the router is able to apply "T.Encap" operation. </t>
</list></t>

<section anchor="maxSL" title="Maximum SL Sub-Sub-TLV">
<t>The Maximum Segments Left Sub-Sub-TLV specifies the maximum value of the "SL" field (refer to <xref target="I-D.ietf-6man-segment-routing-header"></xref>) in the SRH of a received packet before applying the function associated with a SID.</t>
          
            <figure anchor="FigmaxSL">
            <preamble></preamble>
            <artwork><![CDATA[ 

0               1               2                  
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    |    Max SL     |  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
            <postamble></postamble>
            </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-2</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t> 1 </t>
</list></t>

<t>Max SL (8 bits)<list counter="1" hangIndent="5">
<t>SL Value</t>
</list></t>

<t> If the sub-sub-TLV is NOT advertised, the value is assumed to be 0.</t>

</section> 

<section anchor="maxEP" title="Maximum End Pop SRH Sub-Sub-TLV">
<t>The Maximum End Pop SRH Sub-Sub-TLV specifies the maximum number of SIDs in the top SRH in an SRH 
stack to which the router can apply "PSP" or USP" flavors(<xref target="I-D.filsfils-spring-srv6-network-programming"></xref> 
).
</t>
          <figure anchor="FigmaxEP">
            <preamble></preamble>
            <artwork><![CDATA[ 

0               1               2                  
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    |Max-End-Pop-SRH|  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
            <postamble></postamble>
            </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-3</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t> 1 </t>
</list></t>

<t>Max-End-Pop-SRH (8 bits)<list counter="1" hangIndent="5">
<t>Max End Pop SRH value Value</t>
</list></t>

<t> If the value is zero or the sub-sub-TLV is NOT advertised,
then it is assumed that the router cannot apply PSP or USP flavors.</t>
</section> 

<section anchor="maxTinsert" title="Maximum T.Insert SRH Sub-Sub-TLV">
<t>The Maximum T.Insert SRH Sub-Sub-TLV specifies the maximum number of SIDs that can be inserted as part of the "T.insert" behavior(<xref target="I-D.filsfils-spring-srv6-network-programming"></xref>).</t>

          <figure anchor="FigmaxTinsert">
            <preamble></preamble>
            <artwork><![CDATA[ 

0               1               2                  
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    |  Max-T.Insert |  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
            <postamble></postamble>
            </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-4</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t> 1 </t>
</list></t>

<t>Max-T.Insert (8 bits)<list counter="1" hangIndent="5">
<t>Max-T.Insert Value</t>
</list></t>

<t>If the value is zero or the sub-sub-TLV is omitted,
then the router is assumed not to support any variation
of the "T.insert" behavior.</t>
</section> 

<section anchor="maxTencap" title="Maximum T.Encap SRH Sub-Sub-TLV">
<t>The Maximum T.Encap SRH Sub-Sub-TLV specifies the maximum number of SIDs that can be included as part of the "T.Encap" behavior(<xref target="I-D.filsfils-spring-srv6-network-programming"></xref>).</t>

          <figure anchor="FigmaxTencap">
            <preamble></preamble>
            <artwork><![CDATA[ 

0               1               2                  
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    |   Max-T.Encap |  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
            <postamble></postamble>
            </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-5</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t> 1 </t>
</list></t>

<t>Max-T.Encap (8 bits)<list counter="1" hangIndent="5">
<t>Max-T.Encap Value</t>
</list></t>

<t>If this value is zero or the Sub-Sub-TLV is omitted and
the "E" flag is set in the associated SRv6 Capabilities
Sub-TLV, then it is assumed that the router can apply T.Encap
by encapsulating the incoming packet in another IPv6 header
without SRH the same way IPinIP encapsulation is performed.
If the "E" flag is clear, then this Sub-Sub-TLV SHOULD NOT
be transmitted and MUST be ignored on reception.</t>
</section> 

<section anchor="maxEndD" title="Maximum End D SRH Sub-Sub-TLV">
<t>The Maximum End D SRH sub-sub-TLV specifies the maximum number of SIDs in an SRH when applying "End.DX6" and "End.DT6" functions.</t>
          <figure anchor="FigmaxEndD">
            <preamble></preamble>
            <artwork><![CDATA[ 

0               1               2                  
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    |   Max End D   |  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
            <postamble></postamble>
            </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-6</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t>1</t>
</list></t>

<t>Max End D (8 bits)<list counter="1" hangIndent="5">
<t>Max End D Value</t>
</list></t>

<t>If this value is zero or the sub-sub-TLV is omitted,
then it is assumed that the router cannot apply
"End.DX6" or "End.DT6" functions if the extension
header right underneath the outer IPv6 header is an SRH. </t>
</section> 

</section> <!-- Capabilities -->

<section anchor="Function" title="SRv6 Function Descriptor">

<t>The SRv6 SID TLV (defined in <xref target="SRv6-SID"></xref>),
P2P SRv6 SID Sub-TLV (defined in <xref target="P2P"></xref>),
and LAN SRv6 SID Sub-TLV (defined in <xref target="LAN"></xref>), MUST include one SRv6 function Descriptor.</t>

<t> When included in the SRv6 SID TLV, the descriptor is encoded as a Sub-TLV. When included in a P2P/LAN SRv6 SID sub-TLV, the descriptor is encoded as a  Sub-Sub-TLV.</t>

<t>The SRv6-function Descriptor encodes the function (and its flavors) bound to the SRv6 SID advertised in the SRv6 dodmain
(<xref target="I-D.filsfils-spring-srv6-network-programming"></xref>).</t>

<t>The format of OSPFv3 SRv6 Function Descriptor is shown in 
<xref target="descriptor"></xref>. </t>

          <figure anchor="descriptor">
            <preamble></preamble>
            <artwork><![CDATA[ 

0                   1                   
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
+-+-|-+-+-+-+-+-+
|     Type      |
+-+-+-+-+-+-+-+-+
|     Length    |
+-+-+-+-+-+-+-+-+
|     Flags     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Function (2 octets)      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
          <postamble></postamble>
          </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-7</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t>3</t>
</list></t>

<t>Flags <list counter="1" hangIndent="5">
<t>This document defines two flags to specify the flavor(s)
(<xref target="I-D.filsfils-spring-srv6-network-programming"></xref>) associated with the SRv6 function specified in the "Function" field:</t>
</list></t>

          <figure anchor="FigPU">
            <preamble></preamble>
            <artwork><![CDATA[ 

       0 1 2 3 4 5 6 7 
      +-+-|-+-+-+-+-+-+
      |P|U| Reserved  |
      +-+-+-+-+-+-+-+-+

          ]]></artwork>
          <postamble></postamble>
          </figure>

<t>P bit <list counter="1" hangIndent="5">
<t>If set, then the PSP flavor (<xref target="I-D.filsfils-spring-srv6-network-programming"></xref>) is associated with the
function encoded in the "function" field.</t>
</list></t>

<t>U bit <list counter="1" hangIndent="5">
<t>If set, then the USP flavor (<xref target="I-D.filsfils-spring-srv6-network-programming"></xref>) is associated with the
function encoded in the "function" field.</t>
</list></t>

<t>Reserved <list counter="1" hangIndent="5">
<t>Reserved Bits SHOULD be transmitted as 0 and MUST be ignored on
receipt.</t>
</list></t>

<t>The second two octets encode the function. Function code points are defined in <xref target="SID-Function"></xref>. </t>

</section> <!-- Function Descriptor-->

<section anchor="SID-Function" title="SRv6 Function Code Points">
<t>This section defines the code points for supported functions
associated with SRv6 SIDs. Refer <xref target="I-D.filsfils-spring-srv6-network-programming"></xref> for SRv6 functions.</t>

<t>0: <list counter="1" hangIndent="5">
<t>Reserved.</t>
</list></t>

<t>1: <list counter="1" hangIndent="5">
<t>End Function.</t>
</list></t>

<t>2: <list counter="1" hangIndent="5">
<t>End.X Function.</t>
</list></t>

<t>3: <list counter="1" hangIndent="5">
<t>End.DX6 Function.</t>
</list></t>

<t>4: <list counter="1" hangIndent="5">
<t>End.DT6 Function.</t>
</list></t>

</section> <!-- SID-Function -->

<section anchor="SRv6-SID" title="SRv6 SID TLV">

<t>A new top level TLV is introduced in OSPFv3 to advertise one or more SRv6 Segment Identifiers (SIDs) and each SID is associated one or more SRv6 functions. <xref target="I-D.filsfils-spring-srv6-network-programming"></xref> defined some basic functions. This document defines code points for some of the basic SRv6 functions in <xref target="SID-Function"></xref>. SRv6 functions may also be defined in other documents or locally configured. </t>

<t>The format of OSPFv3 SRv6 SID TLV is shown in 
<xref target="srv6SID"></xref>. </t>

          <figure anchor="srv6SID">
            <preamble></preamble>
            <artwork><![CDATA[ 

0                 1                  2                     3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    |     Flags     |   SID-Size    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             SID (variable) ...       
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Sub-Sub-TLV-Len|    Sub-Sub-TLVs (variable) . . .              
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
          <postamble></postamble>
          </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-8</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t>Variable</t>
</list></t>

<t>One or more SID entries, each of which has the following format:</t>

<t>Flags (One octet)<list counter="1" hangIndent="5">
<t>The following flags are defined: </t>
</list></t>

          <figure anchor="FigD">
            <preamble></preamble>
            <artwork><![CDATA[ 

       0 1 2 3 4 5 6 7 
      +-+-|-+-+-+-+-+-+
      |D|  Reserved   |
      +-+-+-+-+-+-+-+-+

          ]]></artwork>
          <postamble></postamble>
          </figure>

<t>D bit:<list counter="1" hangIndent="5">
<t>When the SID is leaked from OSPFv3 backbone area to 
other areas, the D bit MUST be set. Otherwise, this bit MUST be clear. SIDs with the D bit set MUST NOT be leaked to OSPFv3 backbone area from others. This is to prevent looping.</t>
</list></t>

<t>Reserved:<list counter="1" hangIndent="5">
<t>The remaining bits are reserved for future use. They SHOULD be
set to zero on transmission and MUST be ignored on reception. </t>
</list></t>

<t>SID-Size (one octet)<list counter="1" hangIndent="5">
<t>Number of bits in the SID field. </t>
</list></t>

<t>SID (1-16 octet)<list counter="1" hangIndent="5">
<t>This field encodes the advertised SRv6 SID. The
"SID-Size" field can have the value in the range of 1-128 and indicates the number of bits in the SID. The SRv6 SID is encoded in the minimal number of octets for the given number of bits. </t>
</list></t>

<t>Sub-Sub-TLV-Length(one octet)<list counter="1" hangIndent="5">
<t>Number of octets used by sub-TLVs.</t>
</list></t>

<t>Sub-Sub-TLVs (Variable)<list counter="1" hangIndent="5">
<t>One or more functions associated with the advertised SID is specified by the SRv6-Function Descriptor Sub-TLV specified in 
<xref target="Function"></xref>. </t>
</list></t>

</section> <!-- SRv6 SID TLV -->

<section anchor="SRv6-Neighbor" title="SRv6 Neighbor SID TLV">

<t>The advertising of some SRv6 functions must be associated with a particular neighbor. As described in <xref target="I-D.ietf-spring-segment-routing"></xref>, there are two types of SR adjacencies, one is on point-to-point link and another is on a broadcast/mulcast LAN. This section defines OSPFv3 extensions in order to advertise SRv6 SIDs and their associated functions for these two cases.</t>

<t>A single SRv6 Adj-SID may associate with one or more SRv6 functions. The SRv6 functions are defined in <xref target="I-D.filsfils-spring-srv6-network-programming"></xref>, other documents, or locally configured. </t>

<t>This document specifies how to advertise End.X and End.DX6 defined in <xref target="I-D.filsfils-spring-srv6-network-programming"></xref> using OSPFv3 extersons. </t>

<section anchor="P2P" title="Point to Popint SRv6 Adj-SID Sub-TLV">
<t>This Sub-TLV is used to advertise one or more SRv6 SIDs associated with End.X and End.DX6 SRv6 functions over a point-to-point adjacency. </t>

<t> The format of the "P2P SRv6 Adj-SID" Sub-TLV is shown in <xref target="P2Psrv6SID"></xref>.  </t>

          <figure anchor="P2Psrv6SID">
            <preamble></preamble>
            <artwork><![CDATA[ 

0                 1                  2                     3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    |     Flags     |   SID-Size    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             SID (variable) ...       
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Sub-Sub-TLV-Len|      Sub-Sub-TLVs (variable) . . .              
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
          <postamble></postamble>
          </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-9</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t>Variable</t>
</list></t>

<t>One or more SID entries, each of which has the following format:</t>

<t>Flags (One octet)<list counter="1" hangIndent="5">
<t>No flags defined in this document.</t>
</list></t>

<t>SID-Size (one octet)<list counter="1" hangIndent="5">
<t>Number of bits in the SID field. </t>
</list></t>

<t>SID (1-16 octet)<list counter="1" hangIndent="5">
<t>This field encodes the advertised SRv6 SID. The
"SID-Size" field can have the value in the range of 1-128 and indicates the number of bits in the SID. The SRv6 SID is encoded in the minimal number of octets for the given number of bits. </t>
</list></t>

<t>Sub-Sub-TLV-Length(one octet)<list counter="1" hangIndent="5">
<t>Number of octets used by Sub-TLVs.</t>
</list></t>

<t>Sub-Sub-TLVs (Variable)<list counter="1" hangIndent="5">
<t>One or more functions associated with the advertised SID is specified by the SRv6 Function Descriptor Sub-TLV specified in 
<xref target="Function"></xref>. If the SRv6 Function Descriptor is encoded in the SRv6 P2P SID sub-TLV, the encoded SRv6 SID function MUST include only the code points of SRv6 SID functions that require the specification of a neighbor to be correctly applied.</t>
</list></t>

</section> <!-- P2P -->

<section anchor="LAN" title="LAN SRv6 Adj-SID sub-TLV">
<t>This Sub-TLV is used to advertise one or more SRv6 SIDs associated with End.X and End.DX6 SRv6 functions over a LAN adjacency. </t>

<t> The format of the "LAN SRv6 Adj-SID" Sub-TLV is shown in <xref target="LANsrv6SID"></xref>.  </t>

          <figure anchor="LANsrv6SID">
            <preamble></preamble>
            <artwork><![CDATA[ 

0                 1                  2                     3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    |     Flags     |   SID-Size    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             SID (variable) ...       
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Sub-Sub-TLV-Len|      Sub-Sub-TLVs (variable) . . .              
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
          <postamble></postamble>
          </figure>

<t>Type (one octet) <list counter="1" hangIndent="5">
<t>TBD-10</t>
</list></t>

<t>Length (one octet)<list counter="1" hangIndent="5">
<t>Variable</t>
</list></t>

<t>One or more SID entries, each of which has the following format:</t>

<t>Flags (One octet)<list counter="1" hangIndent="5">
<t>No flags defined in this document.</t>
</list></t>

<t>SID-Size (one octet)<list counter="1" hangIndent="5">
<t>Number of bits in the SID field. </t>
</list></t>

<t>SID (1-16 octet)<list counter="1" hangIndent="5">
<t>This field encodes the advertised SRv6 SID. The
"SID-Size" field can have the value in the range of 1-128 and indicates the number of bits in the SID. The SRv6 SID is encoded in the minimal number of octets for the given number of bits. </t>
</list></t>

<t>Sub-Sub-TLV-Length(one octet)<list counter="1" hangIndent="5">
<t>Number of octets used by sub-TLVs.</t>
</list></t>

<t>Sub-Sub-TLVs (Variable)<list counter="1" hangIndent="5">
<t>One or more functions associated with the advertised SID is specified by the SRv6-Function Descriptor Sub-TLV specified in 
<xref target="Function"></xref>. If the SRv6 Function Descriptor is encoded in the SRv6 P2P SID Sub-TLV, the encoded SRv6 SID function MUST include only the code points of SRv6 SID functions that require the specification of a neighbor to be correctly applied.</t>
</list></t>

</section> <!-- LAN -->

</section> <!-- SRv6-Neighbor -->

</section> <!-- OSPFv3 Extensions -->

<section anchor="Security" title="Security Considerations">
<t>This document does not introduce any security issue. </t>
 
</section>

<section anchor="IANA" title="IANA Considerations">
<t>This document proposes IANA considerations as described in 
the following sections.</t>

<section title="OSPFv3 Extensions for SRv6 Support">

<t>This document proposes the following OSPFv3 Extensions in order to support SRv6:</t>

<t><list style="numbers">
<t>SRv6-Capabilities Sub-TLV (Type TBD-1): Refer to <xref target="capbility"></xref>. </t>

<t>Maximum SL Sub-Sub-TLV (Type TBD-2): Refer to <xref target="maxSL"></xref>. </t>

<t>Maximum End Pop SRH Sub-Sub-TLV (Type TBD-3): Refer to <xref target="maxEP"></xref>. </t>

<t>Maximum T.Insert SRH Sub-Sub-TLV (Type TBD-4): Refer to <xref target="maxTinsert"></xref>. </t>

<t>Maximum T.Encap SRH Sub-Sub-TLV (Type TBD-5): Refer to <xref target="maxTencap"></xref>. </t>

<t>Maximum End D SRH Sub-Sub-TLV (Type TBD-6): Refer to <xref target="maxEndD"></xref>. </t>

<t>SRv6 Function Descriptor (Type TBD-7): Refer to <xref target="Function"></xref>. </t>

<t>SRv6 SID TLV (Type TBD-8): Refer to <xref target="SRv6-SID"></xref>.</t>

<t>SRv6 Point-to-Point Adj-SID Sub-TLV (Type TBD-9): Refer to <xref target="P2P"></xref>. </t>

<t>SRv6 LAN SRv6 Adj-SID Sub-TLV (Type TBD-10): Refer to <xref target="LAN"></xref>. </t>

</list></t>

</section>
</section>

<section title="Acknowledgements">
      <t>TBD.</t>
</section>
  </middle>

<back>
<references title="Normative References">

      <?rfc include='reference.RFC.2119'?>
 
      <?rfc include='reference.RFC.5340'?> 

      <?rfc include='reference.RFC.7770'?> 

<?rfc include='reference.I-D.ietf-ospf-ospfv3-lsa-extend'?>

</references>

<references title="Informative References">
           
    <?rfc include='reference.I-D.ietf-6man-segment-routing-header'?>

    <?rfc include='reference.I-D.filsfils-spring-srv6-network-programming'?>

      <?rfc include='reference.I-D.ietf-spring-segment-routing'?>

<?rfc include='reference.I-D.bashandy-isis-srv6-extensions'?>

</references>
  </back>
</rfc>
