<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.26 (Ruby 3.0.2) -->
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-xu-lsr-ospf-service-function-adv-00" category="std" consensus="true" tocDepth="4" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.16.0 -->
  <front>
    <title abbrev="Advertising Service Functions Using OSPF">Advertising Service Functions Using OSPF</title>
    <seriesInfo name="Internet-Draft" value="draft-xu-lsr-ospf-service-function-adv-00"/>
    <author initials="X." surname="Xu" fullname="Xiaohu Xu">
      <organization>China Mobile</organization>
      <address>
        <email>xuxiaohu@cmss.chinamobile.com</email>
      </address>
    </author>
    <author initials="H." surname="Huang" fullname="Hongyi Huang">
      <organization>Huawei</organization>
      <address>
        <email>hongyi.huang@huawei.com</email>
      </address>
    </author>
    <author initials="H." surname="Shah" fullname="Himanshu Shah">
      <organization>Ciena</organization>
      <address>
        <email>hshah@ciena.com</email>
      </address>
    </author>
    <author initials="L." surname="Contreras" fullname="Luis M. Contreras">
      <organization>Telefonica I+D</organization>
      <address>
        <email>luismiguel.contrerasmurillo@telefonica.com</email>
      </address>
    </author>
    <date year="2023" month="March" day="09"/>
    <area>Routing Area</area>
    <workgroup>LSR Working Group</workgroup>
    <keyword>Sample</keyword>
    <abstract>
      <t>The Segment Routing mechanism can be leveraged to realize the service
path layer functionality of the Service Function Chaining (i.e, steering
traffic through the service function path). This document describes how
to advertise service functions and their corresponding attributes (e.g.,
segment ID) using OSPF. Here the OSPF means both OSPFv2 and OSPFv3.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t><xref target="I-D.xu-spring-sfc-use-case"/> describes a particular
use case for SPRING where the Segment Routing (SR) mechanism is
leveraged to realize the service path layer functionality of the Service
Function Chaining (SFC), i.e, steering traffic through the service
function path. To allow a service classifier to encode the segment list
representing a particular service function path, the classifier needs to
know on which service node(s) a given service function is located and
what segment ID (SID) is used to indicate that service function on a
given service node. This document describes how to advertise service
functions and their corresponding attributes (e.g., SID) using OSPF.
Here the OSPF means both OSPFv2 <xref target="RFC2328"/> and OSPFv3 <xref target="RFC5340"/>.</t>
    </section>
    <section anchor="Teminology">
      <name>Terminology</name>
      <t>This memo makes use of the terms defined in <xref target="RFC7770"/> and <xref target="I-D.xu-spring-sfc-use-case"/>.</t>
      <t>The key words "<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 "<bcp14>OPTIONAL</bcp14>" 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 anchor="Advertising">
      <name>Advertising Service Functions and Corresponding SIDs</name>
      <t>Service nodes within the network need to advertise each service
function they are offering by using a TLV within the body of the OSPF
Router Information (RI) Opaque LSA <xref target="RFC7770"/>. This new
TLV is called as Service Function TLV. The Service Function TLV is
applicable to both OSPFv2 and OSPFv3. The Service Function TLV could
appear multiple times within a given Router Information (RI) Opaque LSA
when more than one service function needs to be advertised by a given
service node. The scope of the advertisement depends on the application
but it is recommended that it <bcp14>SHOULD</bcp14> be domain-wide. Furthermore,
service nodes need to allocate a corresponding SID to each service
function and meanwhile advertise it by using a sub-TLV of the above
Service Function TLV. In the MPLS-SR case, service nodes within the
network would allocate a locally significant MPLS label to each service
function they are offering. In the IPv6-SR case, service nodes within
the network would allocate a locally unique link-local IPv6 address to
each service function they are offering. For a given service function,
the service node offering that service function could advertise the
corresponding SID in the format of an MPLS label, an IPv6 address, or
both.</t>
      <section anchor="service-function-tlv">
        <name>Service Function TLV</name>
        <artwork align="center"><![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=TBD            |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                  Service Function Identifier                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                          Sub-TLVs                             ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        <ul empty="true">
          <li>
            <t>Type: TBD.</t>
          </li>
        </ul>
        <ul empty="true">
          <li>
            <t>Length: variable.</t>
          </li>
        </ul>
        <ul empty="true">
          <li>
            <t>Service Function Identifier: A unique identifier that
represents a service function within an SFC-enabled domain.</t>
          </li>
        </ul>
        <ul empty="true">
          <li>
            <t>Sub-TLVs: contains zero or more sub-TLVs corresponding to the
particular attributes of a given service function. The Service
Function SID sub-TLV as defined in Section 3.2 is one such sub-TLV
which is used to indicate the corresponding service function SID.
Other sub-TLVs are to be defined in the future.</t>
          </li>
        </ul>
      </section>
      <section anchor="service-function-sid-sub-tlv">
        <name>Service Function SID Sub-TLV</name>
        <artwork align="center"><![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=TBD            |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                    Service Function SID                       ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        <ul empty="true">
          <li>
            <t>Type: TBD</t>
          </li>
        </ul>
        <ul empty="true">
          <li>
            <t>Length: variable (3 or 16).</t>
          </li>
        </ul>
        <ul empty="true">
          <li>
            <t>Value: if the Length is set to 3, the rightmost 20 bits
represent an MPLS label. If the length is set to 16, the value
represents an IPv6 address.</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="IANA">
      <name>IANA Considerations</name>
      <t>This memo includes a request to IANA for allocating type codes for
the Service Function sub-TLV and the Service Function SID sub-TLV.</t>
    </section>
    <section anchor="Security">
      <name>Security Considerations</name>
      <t>This document does not introduce any new security risk.</t>
    </section>
    <section anchor="Acknowledgements">
      <name>Acknowledgements</name>
      <t>TBD.</t>
    </section>
    <section anchor="contributors">
      <name>Contributors</name>
      <t><strong>Nan Wu</strong><br/>
Huawei<br/>
eric.wu@huawei.com</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC7770">
          <front>
            <title>Extensions to OSPF for Advertising Optional Router Capabilities</title>
            <author fullname="A. Lindem" initials="A." role="editor" surname="Lindem">
              <organization/>
            </author>
            <author fullname="N. Shen" initials="N." surname="Shen">
              <organization/>
            </author>
            <author fullname="JP. Vasseur" initials="JP." surname="Vasseur">
              <organization/>
            </author>
            <author fullname="R. Aggarwal" initials="R." surname="Aggarwal">
              <organization/>
            </author>
            <author fullname="S. Shaffer" initials="S." surname="Shaffer">
              <organization/>
            </author>
            <date month="February" year="2016"/>
            <abstract>
              <t>It is useful for routers in an OSPFv2 or OSPFv3 routing domain to know the capabilities of their neighbors and other routers in the routing domain.  This document proposes extensions to OSPFv2 and OSPFv3 for advertising optional router capabilities.  The Router Information (RI) Link State Advertisement (LSA) is defined for this purpose.  In OSPFv2, the RI LSA will be implemented with an Opaque LSA type ID.  In OSPFv3, the RI LSA will be implemented with a unique LSA type function code.  In both protocols, the RI LSA can be advertised at any of the defined flooding scopes (link, area, or autonomous system (AS)).  This document obsoletes RFC 4970 by providing a revised specification that includes support for advertisement of multiple instances of the RI LSA and a TLV for functional capabilities.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7770"/>
          <seriesInfo name="DOI" value="10.17487/RFC7770"/>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner">
              <organization/>
            </author>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba">
              <organization/>
            </author>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC2328">
          <front>
            <title>OSPF Version 2</title>
            <author fullname="J. Moy" initials="J." surname="Moy">
              <organization/>
            </author>
            <date month="April" year="1998"/>
            <abstract>
              <t>This memo documents version 2 of the OSPF protocol.  OSPF is a link- state routing protocol.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="54"/>
          <seriesInfo name="RFC" value="2328"/>
          <seriesInfo name="DOI" value="10.17487/RFC2328"/>
        </reference>
        <reference anchor="RFC5340">
          <front>
            <title>OSPF for IPv6</title>
            <author fullname="R. Coltun" initials="R." surname="Coltun">
              <organization/>
            </author>
            <author fullname="D. Ferguson" initials="D." surname="Ferguson">
              <organization/>
            </author>
            <author fullname="J. Moy" initials="J." surname="Moy">
              <organization/>
            </author>
            <author fullname="A. Lindem" initials="A." surname="Lindem">
              <organization/>
            </author>
            <date month="July" year="2008"/>
            <abstract>
              <t>This document describes the modifications to OSPF to support version 6 of the Internet Protocol (IPv6).  The fundamental mechanisms of OSPF (flooding, Designated Router (DR) election, area support, Short Path First (SPF) calculations, etc.) remain unchanged.  However, some changes have been necessary, either due to changes in protocol semantics between IPv4 and IPv6, or simply to handle the increased address size of IPv6.  These modifications will necessitate incrementing the protocol version from version 2 to version 3.  OSPF for IPv6 is also referred to as OSPF version 3 (OSPFv3).</t>
              <t>Changes between OSPF for IPv4, OSPF Version 2, and OSPF for IPv6 as described herein include the following.  Addressing semantics have been removed from OSPF packets and the basic Link State Advertisements (LSAs).  New LSAs have been created to carry IPv6 addresses and prefixes.  OSPF now runs on a per-link basis rather than on a per-IP-subnet basis.  Flooding scope for LSAs has been generalized.  Authentication has been removed from the OSPF protocol and instead relies on IPv6's Authentication Header and Encapsulating Security Payload (ESP).</t>
              <t>Even with larger IPv6 addresses, most packets in OSPF for IPv6 are almost as compact as those in OSPF for IPv4.  Most fields and packet- size limitations present in OSPF for IPv4 have been relaxed.  In addition, option handling has been made more flexible.</t>
              <t>All of OSPF for IPv4's optional capabilities, including demand circuit support and Not-So-Stubby Areas (NSSAs), are also supported in OSPF for IPv6.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5340"/>
          <seriesInfo name="DOI" value="10.17487/RFC5340"/>
        </reference>
        <reference anchor="RFC8402">
          <front>
            <title>Segment Routing Architecture</title>
            <author fullname="C. Filsfils" initials="C." role="editor" surname="Filsfils">
              <organization/>
            </author>
            <author fullname="S. Previdi" initials="S." role="editor" surname="Previdi">
              <organization/>
            </author>
            <author fullname="L. Ginsberg" initials="L." surname="Ginsberg">
              <organization/>
            </author>
            <author fullname="B. Decraene" initials="B." surname="Decraene">
              <organization/>
            </author>
            <author fullname="S. Litkowski" initials="S." surname="Litkowski">
              <organization/>
            </author>
            <author fullname="R. Shakir" initials="R." surname="Shakir">
              <organization/>
            </author>
            <date month="July" year="2018"/>
            <abstract>
              <t>Segment Routing (SR) leverages the source routing paradigm.  A node steers a packet through an ordered list of instructions, called "segments".  A segment can represent any instruction, topological or service based.  A segment can have a semantic local to an SR node or global within an SR domain.  SR provides a mechanism that allows a flow to be restricted to a specific topological path, while maintaining per-flow state only at the ingress node(s) to the SR domain.</t>
              <t>SR can be directly applied to the MPLS architecture with no change to the forwarding plane.  A segment is encoded as an MPLS label.  An ordered list of segments is encoded as a stack of labels.  The segment to process is on the top of the stack.  Upon completion of a segment, the related label is popped from the stack.</t>
              <t>SR can be applied to the IPv6 architecture, with a new type of routing header.  A segment is encoded as an IPv6 address.  An ordered list of segments is encoded as an ordered list of IPv6 addresses in the routing header.  The active segment is indicated by the Destination Address (DA) of the packet.  The next active segment is indicated by a pointer in the new routing header.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8402"/>
          <seriesInfo name="DOI" value="10.17487/RFC8402"/>
        </reference>
        <reference anchor="I-D.xu-spring-sfc-use-case">
          <front>
            <title>Service Function Chaining Use Case for SPRING</title>
            <author fullname="Xiaohu Xu" initials="X." surname="Xu">
              <organization>Huawei</organization>
            </author>
            <author fullname="Zhenbin Li" initials="Z." surname="Li">
              <organization>Huawei</organization>
            </author>
            <author fullname="Himanshu C. Shah" initials="H. C." surname="Shah">
              <organization>Ciena</organization>
            </author>
            <author fullname="Luis M. Contreras" initials="L. M." surname="Contreras">
         </author>
            <date day="29" month="June" year="2014"/>
            <abstract>
              <t>   This document describes a particular use case for SPRING where the
   Segment Routing mechanism is leveraged to realize the service path
   layer functionality of the Service Function Chaining (i.e, steering
   traffic through the service function path).

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-xu-spring-sfc-use-case-02"/>
        </reference>
      </references>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+1Y3XLbuBW+x1Oc2hexs6bqv42zmt1MHDtea8Z/tZzd7HR6
AZGQhDEJqAQpRes6z7LPsk/W74CkREq0023TXlXJjIlD4OD8fOfDAYMgENMu
HYjIhkYmqktRKodZ8CkPYpcG1k2GgVPpVIcqGOYmzLQ1gYymwe6uCGXWJZdF
YqK7gvCU6hCSF3PlXmCc2bAxiNQkG0NyyGM3T1I1dMsJzqZZUxLaZCLrCl0+
WMqMfSEyncWw+DiaqjTTTpsR9Qtb6ay01dEHL7/u35wJORikavpHFqRKdunW
5hmLjjESs1GXLvq39LNN71n4Y2rzibifdakvk0mshJB5NrZpVwSkDdz52KGP
OawvovtRSzvOC4lNoetkrI2kSzvQWEukEqnjLn3KP/mJb8PEuU7IcxI/pYMI
iEr1eYfOc2lGC+3n1ozmeiH0G2AwU3qpeuzndMY85+3Yv1xV2h/L8VKnTqRx
sLmUFlZrZWRNp8O7tyELG7ouOnRiDfKaSrdQeJFrR5fNN17pnYrV0BodSup9
c7rUHmNBoke5iqG8XJPkqY5j+zZbrCk2NjZNZKanihF5e3ZydHS02xXaDFfk
+wf7r8vHbw8Od8vH14e7+/zYC047qAA3SZHiwA3DIHcqCKXDchEEAckB0A4g
CiHuxgogGiXKZAukJCocSwOrKZSGBopiBcTJkYpQCAQYxfpXRRlWlrUlJjIb
UyznKqWqzDApm5Md+nmrMAVupDa815buqB0Un1JsrIBZw6EOsQjAHI3rmyw0
E++23aG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