RFC 8770

Host Router Support for OSPFv2

πŸ“… published April 2020, from ietf

RFC 8770: Host Router Support for OSPFv2 πŸŽ€

Okay bestie, let's get the header facts out of the way first ✨

  • RFC number: 8770 πŸ¦‹
  • Title: Host Router Support for OSPFv2
  • Authors: K. Patel (Arrcus), P. Pillay-Esnault (PPE Consulting), M. Bhardwaj and S. Bayraktar (Cisco Systems)
  • Category: Standards Track πŸ”₯
  • Date: April 2020
  • ISSN: 2070-1721
  • Updates: RFC 6987 πŸ’… (this one's the big plot twist, more on that in a sec)
  • Obsoletes: nothing listed in the header 🫢

It's an Internet Engineering Task Force (IETF) document, so it went through the whole community consensus thing. πŸ‘‘


Abstract πŸ¦‹

OSPFv2 has a gap: there's no way for a node to repel transit traffic when it sits on the shortest path. πŸ™ˆ This document defines a bit called the Host-bit (H-bit), which lets a router announce that it's a non-transit router. It also covers the changes needed to support the H-bit across the domain. And here's the twist: this document updates RFC 6987 so that Type 2 External and Not-So-Stubby Area (NSSA) Link State Advertisements (LSAs) from [RFC3101] get advertised with a high cost, so traffic actually gets repelled effectively. πŸ’–

Status of This Memo πŸ“œ

This is an Internet Standards Track document. ✨

It's a product of the IETF and represents the consensus of the IETF community. It went through public review and got approved for publication by the Internet Engineering Steering Group (IESG). For more on Internet Standards, check Section 2 of RFC 7841. 🌸

For the current status, any errata, and how to send feedback, go to https://www.rfc-editor.org/info/rfc8770. πŸ”—

Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved. 🫢

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they stand on the publication date. Please read these carefully, because they spell out your rights and restrictions for this document. πŸ“– Any Code Components pulled out of this document must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as the Simplified BSD License explains. πŸ’œ

Table of Contents πŸ“š

1.  Introduction
2.  Requirements Language
3.  Host-Bit Support
4.  SPF Modifications
5.  Autodiscovery and Backward Compatibility
6.  OSPF AS-External-LSAs / NSSA-LSAs with Type 2 Metrics
7.  IANA Considerations
8.  Security Considerations
9.  References
  9.1.  Normative References
  9.2.  Informative References
Acknowledgements
Authors' Addresses

1. Introduction πŸ’–

Okay so, OSPFv2 runs a Shortest Path First (SPF) algorithm that figures out transit vertices based on their adjacencies. 🧠 That means OSPFv2 has no built-in way to stop traffic from transiting a node that's a transit vertex on the only path, or on the shortest path, to a destination. 😭 Metrics can only help you repel traffic if there's an alternative route that's actually better. πŸ™ƒ

Moving traffic off the shortest path is super useful for a few use cases:

  1. Graceful isolation of a router, so you avoid blackholes during a reload and long reconvergence times. πŸ•³οΈ
  2. Closet switches that don't usually carry transit traffic but still need to be in the topology. 🧚
  3. Overloaded routers that want to temporarily repel traffic until they stabilize. πŸ’…
  4. BGP route reflectors, aka virtual Route Reflectors, that sit in central spots like data centers and aren't in the forwarding path. 🌈 They're used for route distribution and can't forward transit traffic, but they still need the OSPF topology to run SPF for optimal routes and reachability resolution for their clients [BGP-ORR]. 🫢

So the Host-bit (H-bit) is the functionality this document describes. πŸ‘‘ It stops other OSPFv2 routers from using the host router, by leaving it out of path calculations for transit traffic in OSPFv2 routing domains. If the H-bit is set, the shortest-path tree calculation for an area (from Section 16.1 of [RFC2328]) gets a new check that verifies transit vertices do not have the H-bit set (see Section 4). πŸ”₯ To repel traffic even harder, this document updates [RFC6987] so Type 2 External and NSSA LSAs [RFC3101] get advertised with a high cost (see Section 6). ✨ And OSPFv3 [RFC5340] has its own option bit for router-LSAs called the R-bit, which gives similar functionality to the H-bit. πŸ¦‹

2. Requirements Language πŸ“

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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. πŸ’–

3. Host-Bit Support πŸŽ€

This document defines a brand-new router-LSA bit called the Host-bit, or the H-bit. 🌸 An OSPFv2 router that advertises a router-LSA with the H-bit set is saying that it MUST NOT be used as a transit router (see Section 4) by other OSPFv2 routers in the area that support the H-bit functionality. πŸ™…β€β™€οΈ

If the H-bit is not set, backward compatibility is preserved, because the behavior stays the same as in [RFC2328]. 🫢

      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                             |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                              ...                              |

                         Figure 1: OSPF Router-LSA

Bit H is the high-order bit of the OSPF flags, as the diagram below shows. 🌈

                               0 1 2 3 4 5 6 7
                               +-+-+-+-+-+-+-+-+
                               |H|0|0|N|W|V|E|B|
                               +-+-+-+-+-+-+-+-+

                   Figure 2: OSPF Router-LSA Option Bits

When the H-bit is set, the OSPFv2 router is a host (non-transit) router and can't forward transit traffic. πŸ™ˆ In this mode, the other OSPFv2 routers in the area MUST NOT use the host router for transit traffic, but they may send traffic to its local destinations. πŸŽ€

An OSPFv2 router that originates a router-LSA with the H-bit set MUST advertise all its non-stub links with a link cost of MaxLinkMetric [RFC6987]. πŸ’œ

When the H-bit is set, an Area Border Router (ABR) MUST advertise the same H-bit setting in its self-originated router-LSAs for all attached areas. ✨ That consistency stops inter-area traffic from transiting through the router, because it suppresses advertisements of prefixes from other routers in the area in its summary-LSAs. πŸ¦‹ Only IPv4 prefixes associated with its local interfaces MUST be advertised in summary-LSAs, so end hosts attached to a router with the H-bit set stay reachable. 🫢

When the H-bit is set, the host router can't act as an Autonomous System Border Router (ASBR). πŸ™…β€β™€οΈ The reason is that ASBRs are transit routers to prefixes that usually get imported through redistribution from other routing protocols. So non-local IPv4 prefixes, like the ones imported from other routing protocols, SHOULD NOT be advertised in AS-external-LSAs if the H-bit is set. 🌸 Some use cases, like an overloaded router or a router being gracefully isolated, might still benefit from continuing to advertise non-local prefixes. 🧚 In those cases, the Type 2 metric in AS-external-LSAs MUST be set to LSInfinity [RFC2328] to repel traffic (see Section 6 of this document). πŸ”₯

4. SPF Modifications 🧠

The SPF calculation in Section 16.1 of [RFC2328] gets modified so that routers originating router-LSAs with the H-bit set won't be used for transit traffic. ✨ Step (2) gets a check on the H-bit, shown below. (Heads up: all of the sub-procedures of Step (2) stay unchanged and aren't included in this excerpt.) πŸ’…

      (2)  Call the vertex just added to the tree "vertex V".  Examine
           the LSA associated with vertex V.  This is a lookup in
           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
           Appendix 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):

Okay that's the first chunk, bestie 🫢 Part 2 picks up right where this Step (2) excerpt leaves off, so stay tuned πŸ‘€βœ¨

5. Autodiscovery and Backward Compatibility ✨

Okay so, to lower the chances of routing loops during partial deployment, this document defines an OSPF Router Information (RI) LSA capability bit [RFC7770]. See Section 7 (Table 2) πŸ’…

The RI LSA MUST be area-scoped. 🫢

Autodiscovery via announcement of the OSPF Host Router capability (Section 7) is the bestie that makes sure the H-bit functionality and its associated SPF changes MUST only take effect if all the routers in a given OSPF area support this functionality. No one gets left behind 😭

Real talk, it's totally possible the RI LSA won't reach every router in an area quickly. For example, say a new router without H-bit support joins an area that previously had only H-bit-capable routers with the H-bit set. It may take some time for the RI LSA to propagate to all routers. While it's propagating, the routers in the area will gradually notice a router that doesn't support the capability and will revert back to the normal SPF calculation. During that propagation time, the area as a whole is unsure of the status of the new router, and this kind of situation can cause temporary transient loops πŸŒ€

The following recommendations will mitigate transient routing loops πŸŽ€

  • Implementations are RECOMMENDED 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. Main character override energy πŸ‘‘
  • All routers with the H-bit set MUST advertise all of the router's non-stub links with a metric equal to MaxLinkMetric [RFC6987] in its LSAs. This stops OSPFv2 routers (unless a last-resort path) that don't support the H-bit from trying to use the non-stub links for transit traffic 🚫
  • All routers supporting the H-bit MUST 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 OSPF Host Router capability (Section 7), then the SPF modifications described in Section 4 MUST NOT be used in the area. Absolutely no shortcuts here, periodt πŸ’…

6. OSPF AS-External-LSAs / NSSA-LSAs with Type 2 Metrics πŸ¦‹

When calculating the path to a prefix in an OSPF AS-external-LSA or NSSA-LSA [RFC3101] with a Type 2 metric, the advertised Type 2 metric is taken as more significant than the OSPF intra-area or inter-area path. So advertising the links with MaxLinkMetric as specified in [RFC6987] does not discourage transit traffic when calculating AS-external or NSSA routes with Type 2 metrics. Plot twist 😳

Consequently, this document updates [RFC6987] so that the Type 2 metric in any self-originated AS-external-LSAs or NSSA-LSAs is advertised as LSInfinity-1 [RFC2328]. If the H-bit is set, then the Type 2 metric MUST be set to LSInfinity. ✨


7. IANA Considerations 🌸

IANA has registered the following value in the "OSPFv2 Router Properties Registry".

               +-------+--------------+-----------+
               | Value | Description  | Reference |
               +=======+==============+===========+
               | 0x80  | Host (H-bit) | RFC 8770  |
               +-------+--------------+-----------+

                              Table 1: H-Bit

IANA has also registered the following in the "OSPF Router Informational Capability Bits" registry.

           +------------+------------------+-----------+
           | Bit Number | Capability Name  | Reference |
           +============+==================+===========+
           |     7      | OSPF Host Router | RFC 8770  |
           +------------+------------------+-----------+

              Table 2: OSPF Host Router Capability Bit

8. Security Considerations πŸ”

This document introduces the H-bit, a capability feature that restricts the use of a router for transit, while only its local destinations are reachable. It's a subset of the operations of a normal router, so it should not introduce new security considerations beyond those already known in OSPFv2 [RFC2328]. The feature does introduce the advertisement of host router capability information to all OSPFv2 routers in an area. That 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 incorrectly advertises its capability, these are the possible scenarios:

  • The router does not have the capability but sends the H-bit set in its LSAs. In this case, a routing loop is possible. 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 link metrics cost equal to MaxLinkMetric could be a rogue router and should be avoided. 🚩
  • The router has the capability but sends the H-bit clear in its LSAs. In this case, the router merely prevents the support of other H-bit routers in the area and prevents all the routers from running the modified SPF. Any impacts are also mitigated in this scenario, because other H-bit routers in the area also advertise the MaxLinkMetric cost, so they will still be avoided unless they are the last-resort path. 🫠
  • The rogue router is on the only transit path for some destinations and sends the H-bit set (for no good or valid reason) in its LSAs, which effectively partitions the network. This case is indistinguishable from the normal case, where an 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.
Lowkey the scariest one is the last bullet. A rogue router on the only transit path can split the whole network in two, and it looks exactly like a legit maintenance window. Watch your routers, bestie 😱

9. References πŸ“š

9.1. Normative References

9.2. Informative References


Acknowledgements 🫢

The authors would like to acknowledge Hasmit Grover for discovering the limitation in [RFC6987], and Acee Lindem, Abhay Roy, David Ward, Burjiz Pithawala, and Michael Barnes for their comments. Huge thank-yous to all of them πŸ’–


Authors' Addresses πŸ’Œ

Keyur Patel
Arrcus

Email: keyur@arrcus.com


Padma Pillay-Esnault
PPE Consulting

Email: padma.ietf@gmail.com


Manish Bhardwaj
Cisco Systems
170 W. Tasman Drive
San Jose, CA 95134
United States of America

Email: manbhard@cisco.com


Serpil Bayraktar
Cisco Systems
170 W. Tasman Drive
San Jose, CA 95134
United States of America

Email: serpil@cisco.com
πŸ“¦ where this page comes from