<?xml version="1.0" encoding="US-ASCII"?>
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com)
     by Daniel M Kohn (private) -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
]>
<?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-wang-lsr-stub-link-attributes-07"
     ipr="trust200902">
  <front>
    <title abbrev="Advertisement of Stub Link Attributes">Advertisement of
    Stub Link Attributes</title>

    <author fullname="Aijun Wang" initials="A" surname="Wang">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street>Beiqijia Town, Changping District</street>

          <city>Beijing</city>

          <code>102209</code>

          <country>China</country>
        </postal>

        <email>wangaj3@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Zhibo Hu" initials="Z" surname="Hu">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>huzhibo@huawei.com</email>
      </address>
    </author>

    <author fullname="Acee Lindem" initials="A" surname="Lindem">
      <organization>LabN Consulting LLC</organization>

      <address>
        <postal>
          <street>No. 301 Midenhall Way</street>

          <city>Cary</city>

          <code>NC 27513</code>

          <country>United States of America</country>
        </postal>

        <email>acee.ietf@gmail.com</email>
      </address>
    </author>

    <author fullname="Gyan S. Mishra" initials="G" surname="Mishra">
      <organization>Verizon Inc.</organization>

      <address>
        <postal>
          <street>13101 Columbia Pike</street>

          <city>Silver Spring</city>

          <code>MD 20904</code>

          <country>United States of America</country>
        </postal>

        <email>gyan.s.mishra@verizon.com</email>
      </address>
    </author>

    <author fullname="Jinsong Sun" initials="J" surname="Sun">
      <organization>ZTE Corporation</organization>

      <address>
        <postal>
          <street>No. 68, Ziijnhua Road</street>

          <city>Nan Jing</city>

          <code>210012</code>

          <country>China</country>
        </postal>

        <email>sun.jinsong@zte.com.cn</email>
      </address>
    </author>

    <date day="5" month="June" year="2023"/>

    <area>RTG Area</area>

    <workgroup>LSR Working Group</workgroup>

    <keyword>RFC</keyword>

    <abstract>
      <t>This document describes the mechanism that can be used to advertise
      the stub link attributes within the IS-IS or OSPF domain.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>Stub links are used commonly within enterprise or service provider
      networks. One common use case is the inter-AS routing scenario where
      there are no IGP adjacencies between the adjacent BGP domains, another
      use case is at the network boundary that the interfaces are used to
      connect to the application servers.</t>

      <t>For operators that have multiple ASes interconnecting with each other
      via the stub links, there is a requirement to obtain the inter-AS
      topology information as described in <xref
      target="I-D.ietf-idr-bgpls-inter-as-topology-ext"/>. To achieve such
      goal, it is required that the BGP-LS to be enabled on every router that
      has the stub links, which is challenging for the network operation. It
      is desirable to advertise the stub link info into the IGP to ease the
      deployment of BGP-LS on any router in the IGP domain.</t>

      <t>For stub links that are used to connect the servers, knowing the
      status of these stub links can facilitate the routers within the IGP to
      accomplish TE tasks in some scenarios.</t>

      <t>But OSPF and IS-IS have no capability to identify such stub links and
      their associated attributes now.</t>

      <t>This document defines the protocol extension for OSPFv2/v3 and IS-IS
      to indicate the stub links and their associated attributes.</t>
    </section>

    <section title="Conventions used in this document">
      <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"/>
      .</t>
    </section>

    <section title="Consideration for Identifying Stub Link">
      <t>OSPF<xref target="RFC5392"/> defines the Inter-AS-TE-v2 LSA and
      Inter-AS-TE-v3 LSA to carry the TE information about inter-AS links.
      IS-IS<xref target="RFC5316"/> defines the Inter-AS Reachability TLV to
      carry the TE information about inter-AS links. But they are normally
      being used under RSVP-TE, especially inter-domain RSVP-TE scenarios. As
      illustrated in the potential scenarios that described in <xref
      target="Appendix_A"/>, there is still the need for a generic solution
      which also covers non inter-AS stub links.</t>

      <t>Then, to solve the problems that described in the applied scenarios,
      this document defines the Stub-Link TLV to identify the stub link and
      transmit the associated attributes for OSPF and IS-IS respectively.</t>
    </section>

    <section title="Protocol Extension for Stub Link Attributes">
      <t>The following sections define the protocol extension to indicate the
      stub link and its associated attributes in OSPFv2/v3 and IS-IS.</t>

      <section title="OSPF Stub-Link TLV">
        <t>This document defines the Stub-Link TLV to describe stub link of a
        single router. This Stub-Link TLV is only applicable to the Inter-
        AS-TE-v2 LSA and Inter-AS-TE-v3 LSA <xref target="RFC5392"/>.
        Inclusion in other LSAs MUST be ignored.</t>

        <t>The OSPF Stub-Link TLV which is under the IANA codepoint "Top Level
        Types in TE LSAs" has the following format:</t>

        <t><figure>
            <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(Stub-Link)            |      Length                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|        Flags                |    Reserved                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Link Prefix Sub-TLVs                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                  Existing Sub-TLVs (variable)                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
            Figure 1: OSPF Stub-Link TLV
]]></artwork>
          </figure></t>

        <t>Type: The TLV type. The value is 7(TBD) for OSPF Stub-Link.</t>

        <t>Length: Variable, dependent on sub-TLVs</t>

        <t>Flags: Define the type of the stub-link: <list style="symbols">
            <t>U bit(bit 0): Identify the unnumbered stub link if this bit is
            set.</t>

            <t>bit 1-bit 15: Reserved</t>
          </list></t>

        <t>Link Prefix Sub-TLV: The prefix of the stub-link. It's format is
        defined in <xref target="sectionIPv4-Prefix-Sub-TLV"/> and <xref
        target="sectionIPv6-Prefix-Sub-TLV"/>.</t>

        <t>Existing Sub-TLVs: Sub-TLV that defined within "Open Shortest Path
        First (OSPF) Traffic Engineering TLVs" for TE Link TLV(Value 2) can be
        included if necessary.</t>

        <t>If the stub-link is identified as unnumbered stub link (U bit is
        set), then the "Remote IPv4 Address sub-TLV" or "Remote Interface IPv6
        Address sub-TLV", which should be set to the identifier value of
        remote router, SHOULD be included to facilitate the pairing of
        inter-AS link.</t>

        <t>If this TLV is advertised multiple times in the same
        Inter-AS-TE-v2/ v3 LSA, only the first instance of the TLV is used by
        receiving OSPFv2/v3 routers. This situation SHOULD be logged as an
        error.</t>

        <t>If this TLV is advertised multiple times for the same link in
        different Inter-AS-TE-v2/v3 LSA originated by the same OSPFrouter, the
        OSPFStub-Link TLV in these LSAs with the smallest Opaque ID is used by
        receiving OSPFrouters. This situation may be logged as a warning.</t>

        <t>It is RECOMMENDED that OSPF routers advertising OSPF Stub-Link TLVs
        in different OSPF Inter-AS-TE v2/v3 LSAs re-originate these LSAs in
        ascending order of Opaque ID to minimize the disruption.</t>

        <t>This document creates a registry for Stub-Link attributes in <xref
        target="section7"/>.</t>
      </section>

      <section title="IS-IS Stub-link TLV">
        <t>This document defines the IS-IS Stub-Link TLV to describes stub
        link of a single router.</t>

        <t>The IS-IS Stub-Link TLV has the following format:</t>

        <t><figure>
            <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(Stub-Link)            |           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|       Flags                 |         Reserved              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                  Link Prefix Sub-TLV                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Existing Sub-TLVs(Variable)                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                
            Figure 2: IS-IS Stub-Link TLV 
]]></artwork>
          </figure></t>

        <t>Type: IS-IS TLV codepoint. Value is 151 (TBD) for stub-link
        TLV.</t>

        <t>Length: Variable, dependent on sub-TLVs</t>

        <t>Flags: Define the type of the stub-link: <list style="symbols">
            <t>0: U bit(bit 0): Identify the unnumbered stub link if this bit
            is set.</t>

            <t>bit 1-bit 15: Reserved</t>
          </list></t>

        <t>Link Prefix Sub-TLV: The prefix of the stub-link. It's format is
        defined in <xref target="sectionIPv4-Prefix-Sub-TLV"/> and <xref
        target="sectionIPv6-Prefix-Sub-TLV"/>.</t>

        <t>Existing Sub-TLVs: Sub-TLVs that defined within "IS-IS Sub-TLVs for
        TLVs Advertising Neighbor Information " can be included if
        necessary.</t>

        <t>If the stub-link is identified as unnumbered stub link type (U bit
        is set), then the "IPv4 Remote ASBR ID" or "IPv6 Remote ASBR ID"
        sub-TLV SHOULD be included to facilitate the pairing of inter-AS
        link.</t>
      </section>

      <section anchor="sectionIPv4-Prefix-Sub-TLV" title="IPv4 Prefix Sub-TLV">
        <t>The IPv4 Prefix Sub-TLV has the following format:</t>

        <t><figure>
            <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                       |           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      IPv4 Prefix                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            Figure 3: IPv4 Prefix Sub-TLV 
]]></artwork>
          </figure></t>

        <t>Type: IPv4 Prefix Sub-TLV codepoint. Value is 37(TBD) for
        OSPF(under "Types for sub-TLVs of TE Link TLV (Value 2)"), 46(TBD) for
        IS-IS(under "IS-IS Sub-TLVs for TLVs Advertising Neighbor
        Information")</t>

        <t>Length: Netmask length value of the IPv4 Prefix. Value should be in
        2-32.</t>

        <t>IPv4 Prefix: The value of 4-octet IPv4 Prefix address, the host
        part should be zero.</t>
      </section>

      <section anchor="sectionIPv6-Prefix-Sub-TLV" title="IPv6 Prefix Sub-TLV">
        <t>The IPv6 Prefix Sub-TLV has the following format:</t>

        <t><figure>
            <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                       |           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      IPv6 Prefix                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      IPv6 Prefix                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      IPv6 Prefix                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      IPv6 Prefix                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            Figure 4: IPv6 Prefix Sub-TLV 
]]></artwork>
          </figure></t>

        <t>Type: IPv6 Prefix Sub-TLV codepoint. Value is Value is 38(TBD) for
        OSPF(under "Types for sub-TLVs of TE Link TLV (Value 2)"), 47(TBD) for
        IS-IS(under "IS-IS Sub-TLVs for TLVs Advertising Neighbor
        Information")</t>

        <t>Length: Netmask length value of the IPv6 Prefix. Value should be in
        2-128.</t>

        <t>IPv6 Prefix: The value of 16-octet IPv6 Prefix address, the host
        part should be zero.</t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>Security concerns for IS-IS are addressed in <xref target="RFC5304"/>
      and<xref target="RFC5310"/></t>

      <t>Security concern for OSPFv3 is addressed in <xref
      target="RFC4552"/></t>

      <t>Advertisement of the additional information defined in this document
      introduces no new security concerns.</t>
    </section>

    <section anchor="section7" title="IANA Considerations">
      <t>IANA is requested to the allocation in following registries:</t>

      <t><figure>
          <artwork><![CDATA[+===========================================+============+=============================+
| Registry                                  | Type       |       Meaning               |
|                                           |(suggested) |                             |
+===========================================+============+=============================+
|Top Level Types in TE LSAs                 |   7        |Stub-Link                    |
+-------------------------------------------+------------+-----------------------------+
|IS-IS Top-Level TLV                        |   151      |IS-IS Stub-Link              |
+-------------------------------------------+------------+-----------------------------+
|Types for sub-TLVs of TE Link TLV (Value 2)|   37       | Interface IPv4 Prefix       |
+-------------------------------------------+------------+-----------------------------+
|Types for sub-TLVs of TE Link TLV (Value 2)|   38       | Interface IPv6 Prefix       |
+-------------------------------------------+------------+-----------------------------+
|IS-IS Sub-TLVs for TLVs                    |            |                             |
|Advertising Neighbor Information           |   46       | Interface IPv4 Prefix       |
+-------------------------------------------+------------+-----------------------------+
|IS-IS Sub-TLVs for TLVs                    |            |                             |
|Advertising Neighbor Information           |   47       | Interface IPv6 Prefix       |
+-------------------------------------------+------------+-----------------------------+
   Figure 5: IANA Allocation for newly defined TLVs and Sub-TLVs
]]></artwork>
        </figure></t>
    </section>

    <section title="Acknowledgement">
      <t>Thanks Ketan Talaulikar, Shunwan Zhang, Peter Psenak, Tony Li, Les
      Ginsberg, Dhruv Dhody, Jeff Tantsura and Robert Raszuk for their
      suggestions and comments on this idea.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.4552"?>

      <?rfc include="reference.RFC.5304"?>

      <?rfc include="reference.RFC.5310"?>

      <?rfc include="reference.RFC.5316"?>

      <?rfc include="reference.RFC.5392"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.I-D.ietf-idr-bgpls-inter-as-topology-ext"

?>
    </references>

    <section anchor="Appendix_A" title="Applied Scenarios">
      <t>The following sections describe the scenarios that knowing the stub
      link related attributes information can help solve the corresponding
      necessity in questions.</t>

      <section title="Inter-AS topology recovery" toc="default">
        <t>Figure 1 describes the scenario that the necessity of inter-AS
        topology recovery for Native IP point-to-point stub link scenario.</t>

        <t>R10, R11 and R12 are located in AS1. R20, R21,R22 are located in
        AS2. The controller runs BGP-LS with R10 in AS1 and R20 in AS2
        respectively.</t>

        <t>There is one BGP session among the border router R11 and R21, which
        are connected by several stub links(passive interfaces) between them.
        The situation within the R21 and R22 are the same.</t>

        <t>Since the links between the border routers are passive, there will
        be no IGP neighbors between them. The BGP-LS information carried in
        each AS will not report these stub links,and the controller can't
        recovery the inter-AS topology automatically.</t>

        <t><figure>
            <artwork align="center"><![CDATA[                     +----------+
      +--------------+Controller+--------------+
      ^              +----------+              ^
      |                                        |
BGP-LS|                                        |BGP-LS
      |            +---+BGP+----+              |
 +-----------------+            +-------------------+
 |    |            |            |              |    |
 |    |        +---+-+        +-+---+          |    |
 |    |        |     +--------+     |          |    |
 |    +--------+R11  |--------|  R21+----------+    |
 |    |        |     +--------+     |          |    |
 |    |        +---+-+        +-+---+          |    |
 | +--+--+         |            |           +--+--+ |
 | |     |         |            |           |     | |
 | |R10  |         |            |           |R20  | |
 | |     |         |            |           |     | |
 | +--+--+     +---+-+        +-+---+       +--+--+ |
 |    |        |     +--------+     |          |    |
 |    +--------+R12  |--------|  R22+----------+    |
 |             |     +--------+     |               |
 |             +---+-+        +-+---+               |
 |                 |            |                   |
 +--------AS1------+            +----------AS2------+
                   +---+BGP+----+

    Figure 1: Inter-AS Topology Recovery(P2P Scenario)
]]></artwork>
          </figure></t>

        <t>Figure 2 describes the similar situation but in LAN environment.
        The border routers of AS1, AS2 and AS3 are connected via one LAN
        interfaces(that is to say, the corresponding interfaces on R1, R2 and
        R3 are on the same subnet). There are three different BGP sessions
        from the loopback address of the border routers among them
        respectively. It is necessary to recovery the underlying inter-AS
        topology automatically.</t>

        <figure>
          <artwork align="center"><![CDATA[ +---------+                      +---------+
|         |                      |         |
|      +--+--+                +--+--+      |
|      |     |                |     |      |
|      |R1   +-------+ +------+R2   |      |
|      |     |       | |      |     |      |
|      +--+--+       | |      +--+--+      |
|         |          | |         |         |
+---AS1---+          | |         +----AS2--+
                   +-+-+-+
                   |     |
                   | SW  |
                   |     |
                   +--+--+
                      |
                   +--+--+
                +--+     +--+
                |  |  R3 |  |
                |  +-----+  |
                |           |
                |           |
                +-----AS3---+

    Figure 2: Inter-AS Topology Recovery(LAN Scenario)
]]></artwork>
        </figure>
      </section>

      <section title="Egress Engineering for Anycast Servers">
        <t>Figure 3 describes the scenario that the stub link information can
        be used for egress engineering for Anycast servers that connected to
        the network. In the example, the R1, R2 and R3 are border routers
        which are connected directly the server S1, S2 and S3 that have the
        same IP address IPa. The characteristics of the stub links that
        connected to these Anycast servers are different. It will be help for
        the router R0, to know the attributes of the stub links and select the
        optimal Anycast server to serve the customer's application.</t>

        <t><figure>
            <artwork align="center"><![CDATA[+----------------+
|                |
|            +---+-+      +-----+
|            |     |      | S1  |
|    +-------+R1   +------+     |
|    |       |     |      |(IPa)|
|    |       +---+-+      +-----+
|    |           |
| +--+--+    +---+-+      +-----+
| |     |    |     |      | S2  |
| |R0   +----+R2   +------+     |
| |     |    |     |      |(IPa)|
| +--+--+    +---+-+      +-----+
|    |           |
|    |       +---+-+      +-----+
|    |       |     |      | S3  |
|    +-------+R3   +------+     |
|            |     |      |(IPa)|
|            +---+-+      +-----+
|                |
+----------------+

    Figure 3: Egress Engineering for Anycast Server
]]></artwork>
          </figure></t>
      </section>

      <section title="Optimized BGP Next-hop Selection">
        <t>Figure 4 describes the scenario that the stub link information can
        facilitate the optimized BGP next hop selection. The router R10 and
        R20 which are located in different AS establish the BGP session
        directly, with the explicit route set on each other which point to the
        egress stub interface between the border routers. The attributes of
        the stub links among the border routers are vary. It is certainly will
        be helpful for the router R10 and R20 to select the optimized BGP next
        hop, that is via the stub links among them, to reach each other.</t>

        <t><figure>
            <artwork align="center"><![CDATA[     |<---------------+BGP+------------------>|
     |                                        |
     |                                        |
+-----------------+            +-------------------+
|    |            |            |              |    |
|    |        +---+-+        +-+---+          |    |
|    |        |     +--------+     |          |    |
|    +--------+R11  |--------|  R21+----------+    |
|    |        |     +--------+     |          |    |
|    |        +---+-+        +-+---+          |    |
| +--+--+         |            |           +--+--+ |
| |     |         |            |           |     | |
| |R10  |         |            |           |R20  | |
| |     |         |            |           |     | |
| +--+--+     +---+-+        +-+---+       +--+--+ |
|    |        |     +--------+     |          |    |
|    +--------+R12  |--------|  R22+----------+    |
|             |     +--------+     |               |
|             +---+-+        +-+---+               |
|                 |            |                   |
+-------+AS1+-----+            +---------+AS2+-----+

    Figure 4: Optimized BGP next hop selection
]]></artwork>
          </figure></t>
      </section>
    </section>
  </back>
</rfc>
