<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF"
     consensus="true" docName="draft-ietf-ospf-ospfv2-hbit-12" number="0000" category="std" updates="6987" ipr="trust200902" obsoletes="" xml:lang="en" sortRefs="true" symRefs="true" tocInclude="true" version="3">
  <!-- xml2rfc v2v3 conversion 2.39.0 -->
  <!-- Generated by id2xml 1.5.0 on 2020-02-12T16:52:09Z -->
	<front>
    <title>Host Router Support for OSPFv2</title>
    <seriesInfo name="RFC" value="0000"/>
    <author fullname="Keyur Patel" initials="K." surname="Patel">
      <organization>Arrcus</organization>
      <address>
        <email>keyur@arrcus.com</email>
      </address>
    </author>
    <author fullname="Padma Pillay-Esnault" initials="P." surname="Pillay-Esnault">
      <organization>PPE Consulting</organization>
      <address>
        <email>padma.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Manish Bhardwaj" initials="M." surname="Bhardwaj">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>170 W. Tasman Drive</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95134</code>
          <country>United States of America</country>
        </postal>
        <email>manbhard@cisco.com</email>
      </address>
    </author>
    <author fullname="Serpil Bayraktar" initials="S." surname="Bayraktar">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>170 W. Tasman Drive</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95134</code>
          <country>United States of America</country>
        </postal>
        <email>serpil@cisco.com</email>
      </address>
    </author>
    <date month="March" year="2020"/>
    <workgroup>OSPF</workgroup>
    <abstract>
      <t>
   The Open Shortest Path First Version 2 (OSPFv2) protocol does not
   have a mechanism for a node to repel transit traffic if it is on the
   shortest path.  This document defines a bit (Host-bit) that enables a
   router to advertise that it is a non-transit router.  It also
   describes the changes needed to support the H-bit in the domain.  In
   addition, this document updates RFC 6987 to advertise type-2 External
   and Not-So-Stubby-Area (NSSA) Link State Advertisements (LSAs) with a
   high cost in order to repel traffic effectively.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   The OSPFv2 protocol specifies a Shortest Path First (SPF) algorithm
   that identifies transit vertices based on their adjacencies.
   Therefore, OSPFv2 does not have a mechanism to prevent traffic
   transiting a participating node if it is a transit vertex in the only
   existing or shortest path to the destination.  The use of metrics to
   make the node undesirable can help to repel traffic only if an
   alternative better route exists.</t>
      <t>
   A mechanism to move traffic away from the shortest path is
   particularly useful for a number of use cases:</t>
      <ol spacing="normal" type="1">
        <li>To gracefully isolate a router to avoid blackhole scenarios when
       there is a reload and possible long reconvergence times.</li>
        <li>Closet Switches are usually not used for transit traffic but need
       to participate in the topology.</li>
        <li>Overloaded routers could use such a capability to temporarily
       repel traffic until they stabilize.</li>
        <li>BGP Route reflectors known as virtual Route Reflectors (vRRs),
       that are not in the forwarding path but are in central locations
       such as data centers.  Such Route Reflectors typically are used
       for route distribution and are not capable of forwarding transit
       traffic.  However, they need to learn the OSPF topology to
       perform SPF computation for optimal routes and reachability
       resolution for its clients
       <xref target="BGP-ORR" format="default"/>.</li>
      </ol>
      <t>
   This document describes the Host-bit (H-bit) functionality that
   prevents other OSPFv2 routers from using the host router by excluding
   it in path calculations for transit traffic in OSPFv2 routing
   domains.  If the H-bit is set then the calculation of the shortest-
   path tree for an area, as described in <xref target="RFC2328" sectionFormat="of" section="16.1"/>, is
   modified by including a check to verify that transit vertices DO NOT
   have the H-bit set (see <xref target="sect-4" format="default"/>).  Furthermore, in order to repel
   traffic effectively, <xref target="RFC6987" format="default"/> is updated so that type-2 External and
   NSSA LSAs are advertised with a high cost (see <xref target="sect-6" format="default"/>).  Open
   Shortest Path First Version 3 defines an option bit for router-LSAs
   known as the R-bit in <xref target="RFC5340" format="default"/> to support a similar functionality.</t>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Requirements Language</name>
       <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&nbsp;14
       <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
       when, they appear in all capitals, as shown here.</t>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>Host-bit Support</name>
      <t>
   This document defines a new router-LSA bit known as the Host Bit or
   the H-bit.  An OSPFv2 router advertising a router-LSA with the H-bit
   set indicates that it <bcp14>MUST NOT</bcp14> be used as a transit router (see
   <xref target="sect-4" format="default"/>) by other OSPFv2 routers in the area supporting the
   functionality.</t>
      <t>
   If the H-bit is not set then backwards compatibility is achieved as
   the behavior will be the same as in <xref target="RFC2328" format="default"/>.</t>
      <figure anchor="ure-ospf-router-lsa">
        <name>OSPF Router-LSA</name>
        <artwork name="" type="" align="left" alt=""><![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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |            LS age             |     Options   |       1       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        Link State ID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Advertising Router                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     LS sequence number                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         LS checksum           |             length            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |H|0|0|N|W|V|E|B|        0      |            # links            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          Link ID                              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                         Link Data                             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |     Type      |     # TOS     |            metric             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                              ...                              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      TOS      |        0      |          TOS  metric          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          Link ID                              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                         Link Data                             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                              ...                              |]]></artwork>
      </figure>
        <t>Bit H is the high-order bit of the OSPF flags as shown below.</t>
      <figure anchor="ure-ospf-router-lsa-option-bits">
        <name>OSPF Router-LSA Option bits</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                            0 1 2 3 4 5 6 7
                            +-+-+-+-+-+-+-+-+
                            |H|0|0|N|W|V|E|B|
                            +-+-+-+-+-+-+-+-+]]></artwork>
      </figure>
      <t>
   When the H-bit is set, the OSPFv2 router is a Host (non-transit)
   router and is incapable of forwarding transit traffic.  In this mode,
   the other OSPFv2 routers in the area <bcp14>MUST NOT</bcp14> use the host router for
   transit traffic, but may send traffic to its local destinations.</t>
      <t>
   An OSPFv2 router originating a router-LSA with the H-bit set <bcp14>MUST</bcp14>
   advertise all its non-stub links with a link cost of MaxLinkMetric
   <xref target="RFC6987" format="default"/>.</t>
      <t>
   When the H-bit is set, an Area Border Router (ABR) <bcp14>MUST</bcp14> advertise the
   same H-bit setting in its self-originated router-LSAs for all
   attached areas.  The consistency of the setting will prevent inter-
   area traffic transiting through the router by suppressing
   advertisement of prefixes from other routers in the area in its
   summary LSAs.  Only IPv4 prefixes associated with its local
   interfaces <bcp14>MUST</bcp14> be advertised in summary-LSAs to provide reachability
   to end hosts attached to a router with the H-bit set.</t>
      <t>
   When the H-bit is set the host router cannot act as an AS Boundary
   Router (ASBR).  Indeed, ASBR are transit routers to prefixes that are
   typically imported through redistribution of prefixes from other
   routing protocols.  Therefore, non-local IPv4 prefixes, e.g., those
   imported from other routing protocols, <bcp14>SHOULD NOT</bcp14> be advertised in
   AS-external-LSAs if the H-bit is set.  Some use cases, such as an
   overloaded router or a router being gracefully isolated, may benefit
   from continued advertisement of non-local prefixes.  In these cases,
   the type 2-metric in AS-external-LSAs <bcp14>MUST</bcp14> be set to LSInfinity to
   repel traffic.(see <xref target="sect-6"/> of this document).</t>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>SPF Modifications</name>
      <t>
   The SPF calculation described in <xref target="RFC2328" sectionFormat="of"
   section="16.1"/> will be
   modified to ensure that the routers originating router-LSAs with the
   H-bit set will not be used for transit traffic.  The Step 2 is
   modified to include a check on H-bit as shown below.  (Please note
   all the sub-procedures of Step 2 remain unchanged and not included in
   the excerpt below.)</t>
      <ul empty="true" spacing="normal">
        <li>
          <dl newline="false" spacing="normal" indent="4">
            <dt>2)</dt><dd>Call the vertex just added to the
	tree vertex V.  Examine the LSA
                   associated with vertex V.  This is
                   a lookup in the Area A's link state
                   database based on the Vertex ID. If
                   this is a router-LSA, and the H-bit
                   of the router-LSA is set, and
                   vertex V is not the root, then the
                   router should not be used for transit
                   and step (3) should be executed
                   immediately. If this is a router-LSA,
                   and bit V of the router-LSA (see
                   Section A.4.2) is set, set Area A's
                   TransitCapability to TRUE. In any case,
                   each link described by the LSA gives
                   the cost to an adjacent vertex.  For
                   each described link, (say it joins
                   vertex V to vertex W):</dd>
          </dl>
        </li>
      </ul>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>Auto Discovery and Backward Compatibility</name>
      <t>
   To reduce the possibility of any routing loops due to partial
   deployment, this document defines an OSPF Router Information (RI) LSA
   <xref target="RFC7770" format="default"/> capability.  The RI LSA <bcp14>MUST</bcp14> be area-scoped.  Bit:</t>

<table anchor="tab-1">
  <name>OSPF Router Information LSA Capabilities</name>
  <thead>
    <tr>
      <th>Bit</th>
      <th align="center">Capabilities</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td align="center">7</td>
      <td>Host Router Support capability</td>
    </tr>
  </tbody>
</table>

      <t>
   Auto Discovery via announcement of the Host Router Support Capability
   ensures that the H-bit functionality and its associated SPF changes
   <bcp14>MUST</bcp14> only take effect if all the routers in a given OSPF area support
   this functionality.</t>
      <t>
   In normal operation, it is possible that the RI LSA will fail to
   reach all routers in an area in a timely manner.  For example, if a
   new router without H-bit support joins an area that previously had
   only H-bit capable routers with H-bit set then it may take some time
   for the RI to propagate to all routers.  While it is propagating, the
   routers in the area will gradually detect the presence of a router
   not supporting the capability and revert back to normal SPF
   calculation.  During the propagation time, the area as a whole is
   unsure of the status of the new router, and that can cause temporary
   transient loops.</t>
      <t>
   The following recommendations will mitigate transient routing loops:</t>
      <ul spacing="normal">
        <li>Implementations are <bcp14>RECOMMENDED</bcp14> to provide a configuration
      parameter to manually override enforcement of the H-bit
      functionality in partial deployments where the topology guarantees
      that OSPFv2 routers not supporting the H-bit do not compute routes
      resulting in routing loops.</li>
        <li>All routers with the H-bit set <bcp14>MUST</bcp14> advertise all of the router's
      non-stub links with a metric equal to MaxLinkMetric <xref target="RFC6987" format="default"/> in
      its LSAs in order to avoid OSPFv2 (unless last resort) routers not
      supporting the H-bit from attempting to use it for transit
      traffic.</li>
        <li>All routers supporting the H-Bit <bcp14>MUST</bcp14> check the RI LSAs of all
      nodes in the area to verify that all nodes support the H-Bit
      before actively using the H-Bit feature.  If any router does not
      advertise the Host Router Support capability then the SPF
      Modifications (<xref target="sect-4" format="default"/>) <bcp14>MUST NOT</bcp14> be used in the area.</li>
      </ul>
    </section>
    <section anchor="sect-6" numbered="true" toc="default">
      <name>OSPF AS-External-LSAs/NSSA LSAs with Type 2 Metrics</name>
      <t>
   When calculating the path to a prefix in an OSPF AS-External-LSA or
   NSSA-LSA <xref target="RFC3101" format="default"/> with a Type-2 metric, the advertised Type-2 metric
   is taken as more significant than the OSPF intra-area or inter-area
   path.  Hence, advertising the links with MaxLinkMetric as specified
   in <xref target="RFC6987" format="default"/> does not discourage transit traffic when calculating AS
   external or NSSA routes with Type-2 metrics.</t>
      <t>
   Consequently, <xref target="RFC6987" format="default"/> is updated so that the Type-2 metric in any
   self-originated AS-External-LSAs or NSSA-LSAs is advertised as
   LSInfinity-1 <xref target="RFC2328" format="default"/>.  If the H-bit is set, then the Type-2 metric
   <bcp14>MUST</bcp14> be set to LSInfinity.</t>
    </section>
    <section anchor="sect-7" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   This document requests the IANA to assign the 0x80 value to the Host-
   Bit (H-bit)in the OSPFv2 Router Properties Registry</t>

<table anchor="tab-2">
  <name>H-Bit</name>
  <thead>
    <tr>
      <th>Value</th>
      <th>Description</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0x80</td>
      <td>Host (H-bit)</td>
      <td>This Document</td>
    </tr>
  </tbody>
</table>

      <t>
   This document requests the IANA to assign the Bit Number value of 7
   to the Host Router Support Capability in the OSPF Router
   Informational Capability Bits Registry.</t>

<table anchor="tab-3">
  <name>OSPF Host Router Capability Bit</name>
  <thead>
    <tr>
      <th>Bit Number</th>
      <th>Capability Name</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td align="center">7</td>
      <td>OSPF Host Router</td>
      <td>This Document</td>
    </tr>
  </tbody>
</table>

    </section>
    <section anchor="sect-8" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   This document introduces the H-bit which is a capability that
   restricts the use of a router for transit, while only its local
   destinations are reachable.  This is a subset of the operations of a
   normal router and therefore should not introduce new security
   considerations beyond those already known in OSPFv2 <xref target="RFC2328" format="default"/>.  The
   feature introduces the advertising of a host router capability
   information to all OSPFv2 routers in an area.  This information can
   be leveraged for discovery and verification that all routers in the
   area support the capability before the feature is turned on.  In the
   event that a rogue or buggy router advertises incorrectly its
   capability the possible cases are:</t>
      <ul spacing="normal">
        <li>The router does not have the capability but sends the H-Bit set in
      its LSAs: In this case, there is a possibility of a routing loop.
      However this is mitigated by the fact that this router should be
      avoided anyway.  Moreover, the link metrics cost (MaxLinkMetric)
      of this router will mitigate this situation.  In any case, a
      router advertising the H-bit capability without its links cost
      equal to MaxLinkMetric may be an indicator that this is a rogue
      router and should be avoided.</li>
        <li>The router has the capability but sends the H-Bit clear in its
      LSAs: In this case, the router merely prevents support of other
      H-bit routers in the area and all the routers to run the modified
      SPF.  The impact is also mitigated as other H-Bit routers in the
      area also advertise MaxLinkMetric cost so they will still be
      avoided unless they are the last resort path.</li>
        <li>The rogue router is on the only transit path for some destinations
      and sends the H-Bit set (for no good/valid reason) in its LSAs and
      effectively partition the network.  This case is indistinguishable
      from the normal case where the operator may consciously decide to
      set the H-bit to perform maintenance on a router that is on the
      only transit path.  The OSPF protocol will continue to function
      within the partitioned domains.</li>
      </ul>
    </section>
    <section anchor="sect-9" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>
   The authors would like to acknowledge <contact fullname="Hasmit Grover"/> for discovery of
   the limitation in <xref target="RFC6987" format="default"/>, <contact
   fullname="Acee Lindem"/>, <contact fullname="Abhay Roy"/>, <contact
   fullname="David Ward"/>, <contact fullname="Burjiz Pithawala"/>, and <contact fullname="Michael Barnes"/> for their comments.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2328.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6987.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7770.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      </references>
      <references>
        <name>Informative References</name>

<!-- draft-ietf-idr-bgp-optimal-route-reflection (I-D Exists) -->
<!-- Repository file missing "editor" entry, so have to do "long way" -->
        <reference anchor="BGP-ORR" 
target="https://tools.ietf.org/html/draft-ietf-idr-bgp-optimal-route-reflection-20">
          <front>
            <title>BGP Optimal Route Reflection (BGP-ORR)</title>
            <seriesInfo name="Work in Progress, Internet-Draft," value="draft-ietf-idr-bgp-optimal-route-reflection-20"/>
            <author initials="R" surname="Raszuk" fullname="Robert Raszuk" role="editor">
              <organization/>
            </author>
            <author initials="C" surname="Cassar" fullname="Christian Cassar">
              <organization/>
            </author>
            <author initials="E" surname="Aman" fullname="Erik Aman">
              <organization/>
            </author>
            <author initials="B" surname="Decraene" fullname="Bruno Decraene">
              <organization/>
            </author>
            <author initials="K" surname="Wang" fullname="Kevin Wang">
              <organization/>
            </author>
            <date month="January" day="8" year="2020"/>
          </front>
        </reference>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3101.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5340.xml"/>
      </references>
    </references>
  </back>
</rfc>
