<?xml version='1.0' encoding='US-ASCII'?> encoding='UTF-8'?>

<!DOCTYPE rfc [
 <!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"> nbsp    "&#160;">
 <!ENTITY RFC3630 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3630.xml"> zwsp   "&#8203;">
 <!ENTITY RFC5340 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5340.xml"> nbhy   "&#8209;">
 <!ENTITY RFC7684 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7684.xml">
  <!ENTITY RFC8126 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8126.xml">
  <!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
  <!ENTITY RFC8362 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8362.xml">
  <!ENTITY RFC9513 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9513.xml"> wj     "&#8288;">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="no" ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>

<?rfc rfcedstyle="yes" ?>
<?rfc subcompact="no" ?>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" ipr="trust200902" docName="draft-ietf-lsr-ospf-prefix-extended-flags-07" number="9792" updates="" obsoletes="" consensus="true" submissionType="IETF" version="3"> version="3" symRefs="true" sortRefs="true" xml:lang="en" tocInclude="true">

<front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the
        full title is longer than 39 characters -->
   <title abbrev="Prefix Flag Extension for OSPF">Prefix Flag Extension for OSPFv2 and OSPFv3</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-lsr-ospf-prefix-extended-flags-07"/>
    <!-- add 'role="editor"' below for the editors if appropriate -->

   <!-- Another author who claims to be an editor --> name="RFC" value="9792"/>
    <author initials='R.' surname="Chen" fullname='Ran Chen'>
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->
          <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <email>chen.ran@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
    <author initials='D.' surname="Zhao" fullname='Detao Zhao'>
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->
          <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <email>zhao.detao@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
    <author initials='P.' surname="Psenak" fullname='Peter Psenak'>
      <organization>Cisco Systems</organization>
      <address>
	<postal>
          <street>Apollo Business Center</street>
          <street>Mlynske nivy 43</street>
        <city>Bratislava 821 09</city>
          <city>Bratislava</city>
	  <code>821 09</code>
          <country>Slovakia</country>
        <code></code>
	</postal>
	<email>ppsenak@cisco.com</email>
      </address>
    </author>
    <author initials='K.' surname="Talaulikar" fullname='Ketan Talaulikar'>
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city/>
          <region/>
          <code/>
          <country>India</country>
        </postal>
        <email>ketant.ietf@gmail.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
    <author initials='L.' surname="Gong" fullname='Liyan Gong'>
      <organization>China mobile</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city/>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <email>gongliyan@chinamobile.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
    <date year="2025"/>
    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill
        in the current day for you. If only the current year is specified, xml2rfc will fill
     in the current day and month for you. If the year is not the current one, it is
     necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
     purpose of calculating the expiry date).  With drafts it is normally sufficient to
     specify just the year. -->

   <!-- Meta-data Declarations -->

   <area>Routing</area>
    <workgroup>LSR</workgroup>
    <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions.
     If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

   <keyword>Internet Draft</keyword>
    <!-- Keywords will be incorporated into HTML output
        files in a meta tag but they have no effect on text or nroff
        output. If you submit your draft to the RFC Editor, the
        keywords will be used for the search engine. --> year="2025" month="May"/>

    <area>RTG</area>
    <workgroup>lsr</workgroup>

   <abstract>
      <t>Each OSPF prefix can be advertised with an 8-bit field to indicate specific properties of that prefix. However, all the OSPFv3 Prefix Options bits have already been assigned assigned, and only a few bits remain unassigned in the flags Flags field of the OSPFv2 Extended Prefix TLV.</t>
      <t>This document solves this problem by defining a variable-length Prefix Attribute Extended Flags sub-TLV for OSPF. This sub-TLV is applicable to OSPFv2 and OSPFv3.</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>Each OSPF prefix can be advertised with an 8-bit field to indicate specific properties of that prefix. This is done using the OSPFv3 Prefix Options (Appendix A.4.1.1 of <xref (<xref section="A.4.1.1" target="RFC5340" format="default"></xref>) and the flags Flags field in the OSPFv2 Extended Prefix TLV (Section 2.1 of <xref (<xref target="RFC7684" format="default"></xref>). sectionFormat="of" section="2.1"/>). The rest of this document refers to these 8-bit fields in both OSPFv2 and OSPFv3 as the "existing fixed-size prefix attribute flags".</t>
      <t>However, all the OSPFv3 Prefix Options bits have already been assigned (see the "OSPFv3 Prefix Options (8 bits)" IANA registry <xref target="IANA-OSPFv3-PO"/>). Also, only 5 bits remain unassigned (at at the time of publication of this document) document, only 5 bits remain unassigned in the Flags field of the OSPFv2 Extended Prefix TLV (see the "OSPFv2 Extended Prefix TLV Flags" IANA registry <xref target="IANA-OSPFv2-EPF"/>).</t>
      <t>This document solves the problem of insufficient flag bits for the signaling of prefix properties in OSPF by defining a variable-length Prefix Attribute Extended Flags sub-TLVs sub-TLV for OSPFv2 and OSPFv3.</t>
     <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>The
        <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "OPTIONAL" "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP 14 BCP&nbsp;14 <xref target="RFC2119" format="default"></xref> target="RFC2119"/> <xref target="RFC8174" format="default"></xref> target="RFC8174"/>
    when, and only when, they appear in all capitals, as shown here.</t> here.
        </t>
      </section>
    </section>
   <section numbered="true" toc="default"> toc="default" anchor="vlpafsf">
   <name>Variable-Length Prefix Attribute Extended Flags Sub-TLV</name>
   <t>This document defines variable-Length a variable-length Prefix Attribute Extended Flags sub-TLV for OSPFv2 and OSPFv3. Such The sub-TLV specifies the variable-flag fields variable-length Prefix Extended Flags field to advertise additional attributes associated with OSPF prefixes. The advertisement and processing of the existing fixed-size prefix attribute flags remain unchanged.</t>
   <t>The format of the OSPFv2/OSPFv3 Prefix Attribute Extended Flags sub-TLVs sub-TLV is shown in Figure 1.</t>
   <figure title="Format
   <figure>
     <name>Format of OSPFv2/OSPFv3 Prefix Attribute Extended Flags Sub-TLV">
  <artwork>
<![CDATA[ Sub-TLV</name>
  <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             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
//                 Prefix Attribute Extended Flags (Variable)            //
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
</figure>
      <t>where:</t>
      <t>Type
      <dl spacing="normal" newline="false">
	<dt>Type (2 octets): 11 octets):</dt>
	<dd>11 for OSPFv2 and 37 for OSPFv3.</t>
      <t>Length OSPFv3</dd>
	<dt>Length (2 octets): Variable, octets):</dt>
	<dd>Variable, dependent on the included Prefix Attribute Flags. Extended Flags field. This
	indicates the length of the prefix attributes flags Prefix Extended Flags field in octets. The
	length MUST <bcp14>MUST</bcp14> be a multiple of 4 octets. If the length is
	not a multiple of 4 octets, the Link State Advertisement (LSA) is
	malformed and MUST <bcp14>MUST</bcp14> be ignored.</t>
      <t>Prefix Attribute ignored.</dd>
	<dt>Prefix Extended Flags (Variable): The (Variable):</dt>
	<dd>The extended flag field. This field contains a variable number of
	flags, grouped in 4-octet blocks. The bits are numbered starting from
	bit 0 as the most significant bit of the first 32-bit block. If a the length of the
	Prefix Attribute Extended Flags field's length field exceeds 4 octets, numbering for
	the additional bits picks up where the previous 4-octet block left
	off. For example, the most significant bit in the fifth octet of an
	8-octet Prefix Attribute Extended Flags field is referred to as bit 32. Currently, no
	bits are defined in this document.</t> document.</dd>
      </dl>
      <t>Unassigned bits MUST <bcp14>MUST</bcp14> be set to zero on transmission and MUST <bcp14>MUST</bcp14> be ignored on receipt.</t>
      <t>An implementation MUST <bcp14>MUST</bcp14> limit the length of the sub-TLV so as to signal the bits that are set to 1. Defined prefix flags that are not transmitted due to being beyond the transmitted length MUST <bcp14>MUST</bcp14> be treated as being set to 0.</t>
      <t>OSPFv2
      <t>The OSPFv2 Prefix Attribute Extended Flags sub-TLV is advertised as a sub-TLV of the OSPFv2 Extended Prefix TLV defined in <xref target="RFC7684"/>. Additional OSPFv2 prefix flags SHOULD <bcp14>SHOULD</bcp14> be allocated from the unused bits in the Flags field of the OSPFv2 Extended Prefix TLV prior to allocating flags in the OSPFv2 Prefix Attribute Extended Flags sub-TLV.</t>
      <t>OSPFv3
      <t>The OSPFv3 Prefix Attribute Extended Flags sub-TLV is advertised as a sub-TLV of the following OSPFv3 TLVs:</t>
      <ul spacing="normal">
        <li>Inter-Area-Prefix TLV (Section 3.4 of <xref target="RFC8362"/>).</li> (<xref target="RFC8362" sectionFormat="of" section="3.4"/>)</li>
        <li>External-Prefix TLV (Section 3.6 of <xref target="RFC8362"/>).</li> (<xref target="RFC8362" sectionFormat="of" section="3.6"/>)</li>
        <li>Intra-Area-Prefix TLV (Section 3.7 of <xref target="RFC8362"/>).</li> (<xref target="RFC8362" sectionFormat="of" section="3.7"/>)</li>
        <li>SRv6 Locator TLV <xref target="RFC9513"/>.</li> target="RFC9513"/></li>
         </ul>
     <t>When multiple instances of the OSPFv2/OSPFv3 Prefix Attribute Extended Flags sub-TLVs are received within the same TLV, an implementation MUST <bcp14>MUST</bcp14> use only the first occurrence of the sub-TLV and MUST <bcp14>MUST</bcp14> ignore all subsequent instances of the sub-TLV. Errors SHOULD <bcp14>SHOULD</bcp14> be logged subject to rate limiting.</t>
      </section>

     <section numbered="true" toc="default">
        <name>Backward Compatibility</name>
        <t>The OSPFv2/OSPFv3 Prefix Attribute Extended Flags sub-TLV does not introduce any backward compatibility issues. An implementation that does not recognize the OSPFv2/OSPFv3 Prefix Attribute Extended Flags sub-TLV would ignore the sub-TLV as per normal TLV processing operations (refer Section 6.3 of to <xref target="RFC3630"/> target="RFC3630" sectionFormat="of" section="2.3.2"/> and Section 2.3.2 of <xref target="RFC8362"/>).</t>
     </section>

    <section anchor="Acknowledgements" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>The authors thank Shraddha Hegde, Changwang Lin, Tom Petch and many others for their suggestions and comments.</t>
      <t>The authors would like to thank Acee Lindem for aligning the terminology with existing OSPF documents and for editorial improvements.</t> target="RFC8362" sectionFormat="of" section="6.3"/>).</t>
     </section>
    <!-- Possibly a 'Contributors' section ... -->

   <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
     <t>This document requests allocation for the following registries.</t>
     <section numbered="true" toc="default">
        <name>OSPFv2</name>
	<section numbered="true" toc="default">
        <name>OSPFv2 Prefix Attribute Extended Flags Sub-TLV Registry</name>
   <t>This document requests IANA to make permanent the early allocation of Sub-TLV</name>
   <t>IANA has allocated the following codepoint for the "OSPFv2 Prefix Attribute Flags" in the "OSPFv2 Extended Prefix TLV Sub-TLVs" registry to be made permanent:</t>
        <artwork align="center" name=" " type="" alt="">
        <![CDATA[
  Value            Description                     Reference
---------  -----------------------------------   ---------------
   11         OSPFv2 registry:</t>

   <table>
     <thead>
       <tr><th>Value</th><th>Description</th><th>Reference</th></tr>
     </thead>
     <tbody>
       <tr><td>11</td><td>OSPFv2 Prefix Attribute Flags        RFC to be
           ]]></artwork> Extended Flags</td><td>RFC 9792</td></tr>
     </tbody>
   </table>
     </section>
      <section numbered="true" toc="default">
        <name>OSPFv2 Prefix Extended Flags Field Registry</name>
      <t>This document requests
      <t>IANA has created the creation of "OSPFv2 Prefix Extended Flag Field" Registry under Flags" registry within the "Open Shortest Path First v2 (OSPFv2) Parameters" registry group. The registry defines the bits in the Prefix Attribute Extended Flags field in the OSPFv2 Prefix Attribute Extended Flags sub-TLV as specified in Section 2. <xref target="vlpafsf"/>. The bits are to be allocated via IETF Review <xref target="RFC8126"/>. Each bit definition will include:</t>
       <artwork align="center" name=" " type="" alt="">
<![CDATA[
*  Bit
      <ul spacing="normal">
	<li>Bit number (counting from bit 0 as the most significant bit of the first block)
*  Description
*  Reference
           ]]></artwork> block)</li>
	<li>Description</li>
	<li>Reference</li>
      </ul>

       <t>No bits are currently defined. Bits 0-31 are to be initially marked as "Unassigned". The flags defined in this document may use either a single bit or multiple bits to represent a state, as determined by the specific requirements of the document defining them. IANA is requested to will add subsequent blocks of 32 bits upon exhaustion of the preceding 32-bit block.</t>
        </section>
          </section>
        <section numbered="true" toc="default">
        <name>OSPFv3</name>
      <section numbered="true" toc="default">
        <name>OSPFv3 Prefix Attribute Extended Flags Sub-TLV Registry</name>
        <t>This document requests IANA to make permanent the early allocation of Sub-TLV</name>
        <t>IANA has allocated the following codepoint for the "OSPFv3 Prefix Attribute Flags" in the "OSPFv3 Extended-LSA sub-TLVs" Sub-TLVs" registry:</t>
        <artwork align="center" name=" " type="" alt="">
        <![CDATA[
 Value            Description                      Reference
--------   ----------------------------------   --------------
  37         OSPFv3

	<table>
	  <thead><tr><th>Value</th>
	  <th>Description</th>
	  <th>L2BM</th>
	  <th>Reference</th></tr></thead>
	  <tbody><tr>
	  <td>37</td>
	  <td>OSPFv3 Prefix Attribute Flags         RFC to be
           ]]></artwork> Extended Flags</td>
	  <td align="center">X</td>
	  <td>RFC 9792</td></tr></tbody>
	</table>
      </section>
       <section numbered="true" toc="default">
        <name>OSPFv3 Prefix Extended Flags Field Registry</name>
      <t>This document requests
      <t>IANA has created the creation of "OSPFv3 Prefix Extended Flag Field" Flags" registry under within the "Open Shortest Path First v3 (OSPFv3)" (OSPFv3) Parameters" registry group. The registry defines the bits in the Prefix Attribute Extended Flags field in the OSPFv2 Prefix Attribute Extended Flags sub-TLV as specified in Section 2. <xref target="vlpafsf"/>. The bits are to be allocated via IETF Review <xref target="RFC8126"/>. Each bit definition will include:</t>
      <artwork align="center" name=" " type="" alt="">
        <![CDATA[
*  Bit
      <ul spacing="normal">
	<li>Bit number (counting from bit 0 as the most significant bit of the first block )
*  Description
*  Reference
           ]]></artwork> block)</li>
	<li>Description</li>
	<li>Reference</li>
      </ul>
       <t>No bits are currently defined. Bits 0-31 are to be initially marked as "Unassigned". The flags defined in this document may use either a single bit or multiple bits to represent a state, as determined by the specific requirements of the document defining them. IANA is requested to will add subsequent blocks of 32 bits upon exhaustion of the preceding 32-bit block. </t>
       </section>
        </section>
     </section>

    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
     <t>Procedures and protocol extensions defined in this document do not affect the OSPFv2 or OSPFv3 security models. See the "Security Considerations" Section of  <xref target="RFC7684" format="default"></xref> sectionFormat="of" section="5"/> for a discussion of OSPFv2 TLV-encoding considerations, considerations and the "Security Considerations" Section of <xref target="RFC8362" format="default"></xref> sectionFormat="of" section="7"/> for a discussion of OSPFv3 security.</t>
    </section>
  </middle>
  <!--  *****BACK MATTER ***** -->

 <back>
      <references>
      <name>References</name>
   <references>
      <name>Normative References</name>
      &RFC2119;
      &RFC3630;
      &RFC5340;
      &RFC7684;
      &RFC8126;
      &RFC8174;
      &RFC8362;
      &RFC9513;
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3630.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5340.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7684.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8362.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9513.xml"/>
    </references>
    <references>
      <name>Informative References</name>

         <reference anchor="IANA-OSPFv2-EPF" target="https://www.iana.org/assignments/ospfv2-parameters/ospfv2-parameters.xhtml#extended-prefix-tlv-flags"> target="https://www.iana.org/assignments/ospfv2-parameters">
                <front>
                    <title>OSPFv2 Extended Prefix TLV Flags</title>
                    <author>
                        <organization></organization>
                        <organization>IANA</organization>
                    </author>
                </front>
            </reference>

         <reference anchor="IANA-OSPFv3-PO" target="https://www.iana.org/assignments/ospfv3-parameters/ospfv3-parameters.xhtml#ospfv3-parameters-4"> target="https://www.iana.org/assignments/ospfv3-parameters">
                <front>
                    <title>OSPFv3 Prefix Options (8 bits)</title>
                    <author>
                        <organization></organization>
                        <organization>IANA</organization>
                    </author>
                </front>
            </reference>
        </references>
      </references>
    <section anchor="Acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors would like to thank <contact fullname="Shraddha Hegde"/>, <contact fullname="Changwang Lin"/>, <contact fullname="Tom Petch"/>, and many others for their suggestions and comments.</t>
      <t>The authors would also like to thank <contact fullname="Acee Lindem"/> for aligning the terminology with existing OSPF documents and for editorial improvements.</t>
    </section>
 </back>
</rfc>