RFC 8770
Host Router Support for OSPFv2
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 Notice Β©οΈ
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:
- Graceful isolation of a router, so you avoid blackholes during a reload and long reconvergence times. π³οΈ
- Closet switches that don't usually carry transit traffic but still need to be in the topology. π§
- Overloaded routers that want to temporarily repel traffic until they stabilize. π
- 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
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.
- [RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, DOI 10.17487/RFC2328, April 1998, <https://www.rfc-editor.org/info/rfc2328>.
- [RFC6987] Retana, A., Nguyen, L., Zinin, A., White, R., and D. McPherson, "OSPF Stub Router Advertisement", RFC 6987, DOI 10.17487/RFC6987, September 2013, <https://www.rfc-editor.org/info/rfc6987>.
- [RFC7770] Lindem, A., Ed., Shen, N., Vasseur, JP., Aggarwal, R., and S. Shaffer, "Extensions to OSPF for Advertising Optional Router Capabilities", RFC 7770, DOI 10.17487/RFC7770, February 2016, <https://www.rfc-editor.org/info/rfc7770>.
- [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
9.2. Informative References
- [BGP-ORR] Raszuk, R., Ed., Cassar, C., Aman, E., Decraene, B., and K. Wang, "BGP Optimal Route Reflection (BGP-ORR)", Work in Progress, Internet-Draft, draft-ietf-idr-bgp-optimal-route-reflection-20, 8 January 2020, <https://tools.ietf.org/html/draft-ietf-idr-bgp-optimal-route-reflection-20>.
- [RFC3101] Murphy, P., "The OSPF Not-So-Stubby Area (NSSA) Option", RFC 3101, DOI 10.17487/RFC3101, January 2003, <https://www.rfc-editor.org/info/rfc3101>.
- [RFC5340] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF for IPv6", RFC 5340, DOI 10.17487/RFC5340, July 2008, <https://www.rfc-editor.org/info/rfc5340>.
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
- ietf: rfc8770 2020-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms