<?xml version='1.0' encoding='utf-8'?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
    please see http://xml.resource.org/authoring/README.html. -->
<rfc
      xmlns:xi="http://www.w3.org/2001/XInclude"
      category="std"
      docName="draft-ietf-lsr-anycast-flag-08"
      ipr="trust200902"
      obsoletes=""
      updates=""
      submissionType="IETF"
      xml:lang="en"
      tocInclude="true"
      tocDepth="4"
      symRefs="true"
      sortRefs="true"
      version="3">
  <!-- xml2rfc v2v3 conversion 2.38.1 -->
  <!-- category values: std, bcp, info, exp, and historic
    ipr values: trust200902, noModificationTrust200902, noDerivativesTrust200902,
       or pre5378Trust200902
    you can add the attributes updates="NNNN" and obsoletes="NNNN" 
    they will automatically be output with "(if approved)" -->

 <!-- ***** FRONT MATTER ***** -->

 <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="Anycast Property advertisement">OSPFv2 Anycast Property Advertisement</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-lsr-anycast-flag-08"/>
    <!-- add 'role="editor"' below for the editors if appropriate -->

   <!-- Another author who claims to be an editor -->

   <author fullname="Ran Chen" initials="R." surname="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 fullname="Detao Zhao" initials="D." surname="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 fullname="Peter Psenak" initials="P." surname="Psenak">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city/>
          <region/>
          <code/>
          <country></country>
        </postal>
        <email>ppsenak@cisco.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
		  <author fullname="Ketan Talaulikar" initials="K." surname="Talaulikar">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city/>
          <region/>
          <code/>
          <country></country>
        </postal>
        <email>ketant.ietf@gmail.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
	<author fullname="Changwang Lin" initials="C." surname="Lin">
      <organization>H3C</organization>
      <address>
        <email>linchangwang.04414@h3c.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>An IP prefix may be configured as anycast and as such the same value can be advertised by multiple routers. It is useful for other routers to know that the advertisement is for an anycast identifier.</t>
	  <t>This document defines a new flag in the OSPFv2 Extended Prefix TLV Flags to advertise the anycast property.</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
	  <t>An IP prefix may be configured as anycast and as such the same value can be advertised by multiple routers. It is useful for other routers to know that the advertisement is for an anycast identifier.</t>
     <t><xref target="RFC7684" format="default"></xref> defines OSPFv2 Opaque LSAs based on Type-Length-Value (TLV) tuples that can be used to associate additional attributes with prefixes or links. The OSPFv2 Extended Prefix TLV that is contained in the OSPFv2 Extended Prefix Opaque LSA is used to advertise additional attributes associated with a prefix.</t>
	 <t>Extensions related to the anycast property of prefixes have been specified for IS-IS <xref target="RFC9352" format="default"></xref> and OSPFv3 <xref target="RFC9513" format="default"></xref>, even though those documents are related to Segment Routing over IPv6, the anycast property applies to any IP prefix advertisement. This document defines a flag to advertise the anycast property for a prefix advertisement in OSPFv2 in the Flags field of the OSPFv2 Extended Prefix TLV Flags (section 2.1 of <xref target="RFC7684" format="default"></xref>).</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 target="RFC8174" format="default"/>
        when, and only when, they appear in all capitals, as shown here.</t>
      </section>
    </section>
	
   <section numbered="true" toc="default">
        <name>OSPFv2 Anycast Property Advertisement</name>
        <t>An IP prefix may be configured as anycast and it is useful for other routers to know that the advertisement is for an anycast identifier.</t>
		<t>A bit is introduced in OSPFv2 Extended Prefix TLV Flags <xref target="RFC7684" format="default"></xref> to advertise the anycast property:</t>
		<t>Value: TBD</t>
        <t>Description: Anycast Flag (AC-flag)</t>
		<t>The only meaning of the AC-flag is that the prefix is intended to be advertised by multiple nodes.</t>
		<t>When a prefix is configured as anycast, the AC-flag MUST be set. Otherwise, this flag MUST be clear. </t>
		<t>The AC-flag and the N-bit MUST NOT both be set. If both N-flag and AC-flag are set, the receiving routers MUST ignore the N-flag.</t>
		<t>The AC-flag MUST be preserved when re-advertising the prefix across areas.</t>
		<t>The same prefix can be advertised by multiple routers, and that if at least one of them sets the AC-flag in its advertisement, the prefix is considered as anycast.</t>
		<t>A prefix that is advertised by a single node and without an AC-flag is considered node-specific prefix.</t>
   </section>
   <section numbered="true" toc="default">
        <name>BGP-LS Advertisement</name>
	<t><xref target="RFC9085"/> defines the Prefix Attribute Flags TLV for BGP-LS that carries prefix attribute flags information, and the Flags field of this TLV is interpreted according to OSPFv2 <xref target="RFC7684" format="default"></xref>. Thus the Flags field of the BGP-LS Prefix Attribute Flags TLV also conveys the anycast property introduced by this document.</t>
	 </section>
   <section title="YANG Data Model">
      <t>
        YANG <xref target="RFC7950"></xref> is a data definition language
        used to define the contents of a conceptual data store
        that allows networked devices to be managed using NETCONF
        <xref target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>.
      </t>
      <t>
        This section defines a YANG data model that can be used to configure
        and manage the usage of OSPFv2 Anycast Property as
        defined in this document,
        which augments the OSPF YANG data model <xref target="RFC9129"/>
        and the YANG Data Model for Routing Management <xref target="RFC8349"/>.
      </t>

      <section title="Tree for the YANG Data Model">
        <t>This document uses the graphical representation of data models per <xref target="RFC8340"/>.</t>
        <t>The following show the tree diagram of the module:</t>
        <artwork align="left" name="" type="" alt=""><![CDATA[
module: ietf-ospf-anycast-flag

  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area
            /ospf:interfaces/ospf:interface:
    +--rw anycast-flag?   boolean

        ]]></artwork>
      </section>
      <section title="YANG Data Model for OSPFv2 Anycast Property Advertisement">
        <t>The following is the YANG module:</t>
        <sourcecode name="ietf-ospf-anycast-flag@2025-08-28.yang" type="" markers="true"><![CDATA[
module ietf-ospf-anycast-flag {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-ospf-anycast-flag";
  prefix ospf-anycast-flag;

  import ietf-routing {
    prefix rt;
    reference
      "RFC 8349: A YANG Data Model for Routing
       Management (NMDA Version)";
  }
  import ietf-ospf {
    prefix ospf;
    reference
      "RFC 9129: YANG Data Model for the OSPF Protocol";
  }

  organization
    "IETF LSR - Link State Routing Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
     WG List:  <mailto:lsr@ietf.org>

     Author:   Ran Chen
               <mailto:chen.ran@zte.com.cn>
     Author:   Detao Zhao
               <mailto:zhao.detao@zte.com.cn>
     Author:   Peter Psenak
               <mailto:ppsenak@cisco.com>
     Author:   Ketan Talaulikar
               <mailto:ketant.ietf@gmail.com>
     Author:   Changwang Lin
               <mailto:linchangwang.04414@h3c.com>";

  description
    "This YANG module adds the support of configuring an OSPFv2
     prefix as anycast.

     This YANG module conforms to the Network Management
     Datastore Architecture (NMDA) as described in RFC 8342.

     Copyright (c) 2025 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 Revised 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;
     see the RFC itself for full legal notices.";
  reference
    "RFC XXXX";

  revision 2025-11-18 {
    description
      "Initial version";
    reference
      "RFC XXXX: OSPFv2 Anycast Property Advertisement";
  }

  identity ac-flag {
    base ospf:ospfv2-extended-prefix-flag;
    description
      "Anycast flag.  When set, it indicates that the prefix
       is configured as anycast.";
  }

  /* Configuration */
  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/ospf:ospf/"
        + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
    when "derived-from(/rt:routing/rt:control-plane-protocols/"
       + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
      description
        "This augments the OSPFv2 interface configuration.";
    }
    description
      "This augments OSPFv2 interface configuration with anycast
       property advertisement.";
    leaf anycast-flag {
      type boolean;
      default "false";
      description
        "Sets the prefix as an anycast address.";
    }
  }
}
        ]]></sourcecode>
      </section>
    </section>

    <!-- Possibly a 'Contributors' section ... -->

   <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
	 <t>This document requests allocation for the following registry.</t>
      <section numbered="true" toc="default">
        <name>OSPFv2 Extended Prefix TLV Flags Registry</name>
      <t>This document adds a new bit in the "OSPFv2 Extended Prefix TLV Flags"registry:</t>
      <t>AC-flag (Anycast Flag).</t>
      </section>
      <section numbered="true" toc="default">
        <name>OSPFv2 Anycast Flag YANG Module Registry</name>
      <t>IANA is requested to register the following URI in the "ns" registry within the "IETF XML Registry" group (<xref target="RFC3688" format="default"/>):</t>
      <artwork align="left" name="" type="" alt=""><![CDATA[
URI: urn:ietf:params:xml:ns:yang:ietf-ospf-anycast-flag
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace
]]></artwork>
      <t>IANA is requested to register the following YANG module in the "YANG Module Names" registry (<xref target="RFC6020" format="default"/>) within the "YANG Parameters" registry group.</t>
      <artwork align="left" name="" type="" alt=""><![CDATA[
name: ietf-ospf-anycast-flag
Maintained by IANA?  N
namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-anycast-flag
prefix: ospf-anycast-flag
reference: RFC XXXX
]]></artwork>
      </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 security model. See the "Security Considerations"section of <xref target="RFC7684" format="default"></xref> for a discussion of OSPFv2 security.</t>
     <t>
        The ietf-ospf-anycast-flag YANG module defines a data model that is
        designed to be accessed via YANG-based management protocols, such as
        NETCONF <xref target="RFC6241"/> and RESTCONF <xref target="RFC8040"/>.
        These protocols have to use a secure transport layer (e.g., SSH
        <xref target="RFC4252"/>, TLS <xref target="RFC8446"/>, and
        QUIC <xref target="RFC9000"/>) and have to use mutual authentication.  
      </t>
      <t>
        The NETCONF Access Control Model (NACM) <xref target="RFC8341"/> provides the
        means to restrict access for particular NETCONF or RESTCONF users to a
        pre-configured subset of all available NETCONF or RESTCONF protocol
        operations and content.
      </t>
      <t>
        The following data nodes defined in the YANG module that are
        writable/creatable/deletable (i.e., config true).
        The modifications to these data nodes without proper protection could
        have prevent interpreting the IPv4 prefix as anycast.
      </t>
      <ul empty="true" spacing="normal">
        <li>/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf-anycast-flag:anycast-flag</li>
      </ul>
      <t>
        Some of the readable data nodes in this YANG module may be considered
        sensitive or vulnerable in some network environments. Exposure of the
        OSPF link state database may be useful in mounting a Denial-of-Service (DoS)
        attacks. These are the readable data nodes:
      </t>
      <ul empty="true" spacing="normal">
        <li>/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf-anycast-flag:anycast-flag</li>
      </ul>
    </section>
  </middle>
  <!--  *****BACK MATTER ***** -->

 <back>
    <!-- References split into informative and normative -->

   <!-- There are 2 ways to insert reference entries from the citation libraries:
    1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
    2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
       (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

    Both are cited textually in the same manner: by using xref elements.
    If you use the PI option, xml2rfc will, by default, try to find included files in the same
    directory as the including file. You can also define the XML_LIBRARY environment variable
    with a value containing a set of directories to search.  These can be either in the local
    filing system or remote ones accessed by http (http://domain/dir/... ).-->
<references>
      <name>References</name>
  <references>
        <name>Normative References</name>
        <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
        <?rfc include="reference.RFC.2119.xml"?>
        <?rfc include="reference.RFC.3688.xml"?>
        <?rfc include="reference.RFC.6020.xml"?>
        <?rfc include="reference.RFC.6241.xml"?>
	      <?rfc include="reference.RFC.7684.xml"?>
        <?rfc include="reference.RFC.7950.xml"?>
        <?rfc include="reference.RFC.8040.xml"?>
	      <?rfc include="reference.RFC.8174.xml"?>
        <?rfc include="reference.RFC.8341.xml"?>
        <?rfc include="reference.RFC.8349.xml"?>
			  <?rfc include="reference.RFC.9085.xml"?>
        <?rfc include="reference.RFC.9129.xml"?>
  </references>
  <references>
        <name>Informative References</name>
        <?rfc include="reference.RFC.4252.xml"?>
        <?rfc include="reference.RFC.8340.xml"?>
        <?rfc include="reference.RFC.8446.xml"?>
        <?rfc include="reference.RFC.9000.xml"?>
		<?rfc include="reference.RFC.9513.xml"?>
		<?rfc include="reference.RFC.9352.xml"?>
		</references>
		</references>
 <section anchor="Acknowledgements" numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.a-1">The authors would like to thank <contact fullname="Acee Lindem"/> for aligning the terminology with existing OSPF documents and for editorial improvements. </t>
    </section>
 <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-contributors">Contributors</name>
      <t indent="0" pn="section-appendix.b-1">This document has the following contributor:</t>
      <contact fullname="Yingzhen Qu">
        <organization showOnFrontPage="true">Futurewei Technologies</organization>
        <address>
          <email>yingzhen.ietf@gmail.com</email>
        </address>
      </contact>
    </section>
    <!-- Change Log

v00 2006-03-15  EBD   Initial version

v01 2006-04-03  EBD   Moved PI location back to position 1 -
                     v3.1 of XMLmind is better with them at this location.
v02 2007-03-07  AH    removed extraneous nested_list attribute,
                     other minor corrections
v03 2007-03-09  EBD   Added comments on null IANA sections and fixed heading capitalization.
                     Modified comments around figure to reflect non-implementation of
                     figure indent control.  Put in reference using anchor="DOMINATION".
                     Fixed up the date specification comments to reflect current truth.
v04 2007-03-09 AH     Major changes: shortened discussion of PIs,
                     added discussion of rfc include.
v05 2007-03-10 EBD    Added preamble to C program example to tell about ABNF and alternative 
                     images. Removed meta-characters from comments (causes problems).

v06 2010-04-01 TT     Changed ipr attribute values to latest ones. Changed date to
                     year only, to be consistent with the comments. Updated the 
                     IANA guidelines reference from the I-D to the finished RFC.
v07 2020-01-21 HL    Converted the template to use XML schema version 3.
    -->
 </back>
</rfc>
