<?xml version='1.0' encoding='US-ASCII'?>
<!DOCTYPE rfc [
  <!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"> 
  <!ENTITY RFC3630 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3630.xml"> 
  <!ENTITY RFC5340 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5340.xml">
  <!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">
 ]>
<?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 category="std" ipr="trust200902" docName="draft-ietf-lsr-ospf-prefix-extended-flags-07"
  consensus="true" submissionType="IETF" version="3">
<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 -->
<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>
        <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. -->
   
   <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 and only a few bits remain unassigned in the flags field of the OSPFv2 Extended Prefix TLV.</t>
      <t>This document solves this problem by defining variable-length Prefix Attribute 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 target="RFC5340" format="default"></xref>) and the flags field in the OSPFv2 Extended Prefix TLV (Section 2.1 of <xref target="RFC7684" format="default"></xref>). 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 "OSPFv3 Prefix Options (8 bits)"  IANA registry <xref target="IANA-OSPFv3-PO"/>). Also, only 5 bits remain unassigned (at the time of publication of this document) in the Flags field of the OSPFv2 Extended Prefix TLV (see "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 variable-length Prefix Attribute Flags sub-TLVs for OSPFv2 and OSPFv3.</t>   
     <section numbered="true" toc="default">
        <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" format="default"></xref> <xref target="RFC8174" format="default"></xref> when, and only when, they appear in all capitals, as shown here.</t>
      </section>  
    </section>
   <section numbered="true" toc="default">
   <name>Variable-Length Prefix Attribute Flags Sub-TLV</name>
   <t>This document defines variable-Length Prefix Attribute Flags sub-TLV for OSPFv2 and OSPFv3. Such sub-TLV specifies the variable-flag fields 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 OSPFv2/OSPFv3 Prefix Attribute Flags sub-TLVs is shown in Figure 1.</t>
   <figure title="Format of OSPFv2/OSPFv3 Prefix Attribute Flags Sub-TLV">
  <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 Flags (Variable)           //
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


]]></artwork>
</figure>
      <t>where:</t>
      <t>Type (2 octets): 11 for OSPFv2 and 37 for OSPFv3.</t>
      <t>Length (2 octets): Variable, dependent on the included Prefix Attribute Flags. This indicates the length of the prefix attributes flags in octets. The length MUST 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 be ignored.</t>
      <t>Prefix Attribute Flags (Variable): 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 Prefix Attribute Flags field's length 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 Flags is referred to as bit 32. Currently, no bits are defined in this document.</t>
      <t>Unassigned bits MUST be set to zero on transmission and MUST be ignored on receipt.</t>
      <t>An implementation MUST 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 be treated as being set to 0.</t>
      <t>OSPFv2 Prefix Attribute 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 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 Flags sub-TLV.</t>
      <t>OSPFv3 Prefix Attribute 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>
        <li>External-Prefix TLV (Section 3.6 of <xref target="RFC8362"/>).</li>
        <li>Intra-Area-Prefix TLV (Section 3.7 of <xref target="RFC8362"/>).</li>
        <li>SRv6 Locator TLV <xref target="RFC9513"/>.</li>
         </ul>
     <t>When multiple instances of the OSPFv2/OSPFv3 Prefix Attribute Flags sub-TLVs are received within the same TLV, an implementation MUST use only the first occurrence of the sub-TLV and MUST ignore all subsequent instances of the sub-TLV. Errors SHOULD be logged subject to rate limiting.</t>
      </section>
     
     <section numbered="true" toc="default">
        <name>Backward Compatibility</name> 
        <t>The Prefix Attribute Flags sub-TLV does not introduce any backward compatibility issues. An implementation that does not recognize the OSPFv2/OSPFv3 Prefix Attribute Flags sub-TLV would ignore the sub-TLV as per normal TLV processing operations (refer Section 6.3 of <xref target="RFC3630"/> 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>
    </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 Flags Sub-TLV Registry</name>
   <t>This document requests IANA to make permanent the early allocation of 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 Prefix Attribute Flags        RFC to be
           ]]></artwork>
		      </section> 
      <section numbered="true" toc="default">
        <name>OSPFv2 Prefix Extended Flags Field Registry</name>
      <t>This document requests the creation of "OSPFv2 Prefix Extended Flag Field" Registry under "Open Shortest Path First v2 (OSPFv2) Parameters" registry group. The registry defines the bits in the Prefix Attribute Flags field in the OSPFv2 Prefix Attribute Flags sub-TLV as specified in Section 2. 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 number (counting from bit 0 as the most significant 
   bit of the first block)
*  Description
*  Reference
           ]]></artwork>
       <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 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 Flags Sub-TLV Registry</name>
        <t>This document requests IANA to make permanent the early allocation of the following codepoint for the "OSPFv3 Prefix Attribute Flags" in the "OSPFv3 Extended-LSA sub-TLVs" registry:</t>
        <artwork align="center" name=" " type="" alt="">
        <![CDATA[       
 Value            Description                      Reference
--------   ----------------------------------   --------------
  37         OSPFv3 Prefix Attribute Flags         RFC to be
           ]]></artwork>
		 </section>   
       <section numbered="true" toc="default">
        <name>OSPFv3 Prefix Extended Flags Field Registry</name>
      <t>This document requests the creation of "OSPFv3 Prefix Extended Flag Field" registry under "Open Shortest Path First v3 (OSPFv3)" registry group. The registry defines the bits in the Prefix Attribute Flags field in the OSPFv2 Prefix Attribute Flags sub-TLV as specified in Section 2. 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 number (counting from bit 0 as the most significant 
   bit of the first block )
*  Description
*  Reference
           ]]></artwork>
       <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 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> for a discussion of OSPFv2 TLV-encoding considerations, and the "Security Considerations" Section of <xref target="RFC8362" format="default"></xref> 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;
    </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">
                <front>
                    <title>OSPFv2 Extended Prefix TLV Flags</title>
                    <author>
                        <organization></organization>
                    </author>
                </front>
            </reference>    
         <reference anchor="IANA-OSPFv3-PO" target="https://www.iana.org/assignments/ospfv3-parameters/ospfv3-parameters.xhtml#ospfv3-parameters-4">
                <front>
                    <title>OSPFv3 Prefix Options (8 bits)</title>
                    <author>
                        <organization></organization>
                    </author>
                </front>
            </reference>                    
        </references>
    </references>
 </back>
</rfc>
