<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?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-yue-lsr-loop-detection-for-imported-routes-00" ipr="trust200902">
  <front>
    <title abbrev="Loop detection for imported routes">Loop detection for imported routes</title>

    <author fullname="Zhuo Yue" initials="Z. " surname="Yue">
      <organization>Huawei</organization>

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

          <city>Beijing</city>

          <code>100095</code>

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

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

    <author fullname="GuoQi Xu" initials="G." surname="Xu">
      <organization>Huawei</organization>

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

          <city>Beijing</city>

          <code>100095</code>

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

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

    <author fullname="ChenXi Li" initials="C." surname="Li">
      <organization>Huawei</organization>

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

          <city>Beijing</city>

          <code>100095</code>

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

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

    <author fullname="HaiChao Li" initials="H. " surname="Li">
      <organization>Huawei</organization>

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

          <city>Beijing</city>

          <code>100095</code>

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

        <email>tide.li@huawei.com</email>
      </address>
    </author>

    <date day="23" month="September" year="2022"/>

    <abstract>
      <t>Mutual route import between two IGP instances is often involved 
      in networking solutions. However, routing loops may occur when route 
      are imported to an instance from another and cause critical problem. 
      This document provides a way to detect routing loop and introduces 
      new sub-TLVs to support advertisement IPv4 and IPv6 prefix 
      extended attribute flags and the source router ID of the router which 
      import the route and redistribute the route.</t>
    </abstract>

    <note title="Requirements Language">
      <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 BCP 14
      [RFC2119] [RFC8174] when, and only when, they
      appear in all capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>As dynamic routing protocols, IS-IS and OSPF are widely used on 
      live networks. Mutual route import between two IGP instances is 
      often involved in networking solutions. However, restricted 
      routing policy need to be configred on the router, otherwise, 
      routing loops may occur and cause critical problem.</t>

      <t>When a route is imported to an IGP instance, if the IGP 
      instance can recognize the route has already been redistributed by 
      itself and notice that there might be routing loops in the network, 
      the router can take some actions to avoid or fix futher potential 
      routing problems.</t>

      <t>Therefore, new sub-TLVs are introduced to support advertisement 
      IPv4 and IPv6 prefix extended attribute flags and the source router ID 
      of the router which has redistributed the prefix.</t>
    </section>

    <section title="Prefix Redistribute-list Sub-TLV Details">
      <t>When a routing prefix is imported to an IGP instance and redistributed 
      by the instance to other IGP areas, the router ID of this IGP instance 
      will be added to the redistribute list of the prefix and advertised in 
      IGP areas.</t>

      <t>The following sections describe how the redistribute list for a route 
      prefix is advertised in IGP areas.</t>
        <section title="The IS-IS Prefix Redistribute-list Sub-TLV">
          <t>This document registers a new IS-IS sub-TLV in the "Sub-TLVs for
          TLVs 135, 235, 236 and 237" registry.  This new sub-TLV provides
          ways to advertise IPv4 and IPv6 prefix extended attribute flags 
          and the router ID of the router which redistributed the prefix.</t>

            <t><figure suppress-title="false"
                title="Prefix Redistribute-list Sub-TLV">
                <artwork align="center"><![CDATA[
    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    |     Flags     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                        Router ID                              +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ]]></artwork>
              </figure></t>

            <t>Type: 10</t>

            <t>Length: 1 + Router-ID length.</t>

            <t>Flags: 1 octet. The following flags are defined:</t>
            <t><figure suppress-title="false"
                title="Flags">
                <artwork align="center"><![CDATA[
    0
    0 1 2 3 4 5 6 7
    +-+-+-+-+-+-+-+-+
    |S|R| Reserved  |
    +-+-+-+-+-+-+-+-+
    ]]></artwork>
              </figure></t>
            <t>where:</t>

            <t>S-flag: If set, the prefix has be redistributed by the router that generate the current LSP.</t>

            <t>R-flag: If set, the prefix has be redistributed by the router other than the router that generate current LSP. </t>

            <t>Router ID: 6 octets. IS-IS System-ID as defined in [ISO10589].</t>

            <t>This sub-TLV is optional.</t>

            <t>If the sub-Tlv length is equal to one, R-flag MUST be treated as if it is set to 0 on receipt. 
            Undefined bits that are transmitted MUST be transmitted as 0 and MUST be ignored on receipt.</t>

        </section>

        <section title="The OSPF Prefix Redistribute-list Sub-TLV">
          <t>TBD.</t>
        </section>
      </section>

    <section title="Enabling and Disabling Sub-TLVs">
      <t>Implementations MUST make it possible to enable or disable the sub-TLV 
      based on configuration.</t>
    </section>
      
    <section title="Acknowledgements">
      <t>TBD.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests that IANA allocates new sub-TLV types
      from the IS-IS "Sub-TLVs for TLVs 135, 235, 236 and 237)" registry as specified.</t>

      <t><figure align="center" title="IS-IS Prefix Redistribute-list Sub-TLV">
          <artwork align="center"><![CDATA[
 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    |     Flags     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                        Router ID                              +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure></t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>These extensions to IS-IS do not add any new security issues
      to the existing IGP.</t>
    </section>
  </middle>

  <back>
    <references title="References">
    </references>
  </back>
</rfc>
