Network Working Group | B. Decraene |
Internet-Draft | Orange |
Intended status: Standards Track | S. Litkowski |
Expires: September 1, 2018 | Orange Business Service |
H. Gredler | |
RtBrick Inc | |
A. Lindem | |
Cisco Systems | |
P. Francois | |
C. Bowers | |
Juniper Networks, Inc. | |
February 28, 2018 |
SPF Back-off Delay algorithm for link state IGPs
draft-ietf-rtgwg-backoff-algo-09
This document defines a standard algorithm to temporarily postpone or 'back-off' link-state IGP Shortest Path First (SPF) computations. This reduces the computational load and churn on IGP nodes when multiple temporally close network events trigger multiple SPF computations.
Having one standard algorithm improves interoperability by reducing the probability and/or duration of transient forwarding loops during the IGP convergence when the IGP reacts to multiple temporally close IGP events.
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 [BCP14] [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 1, 2018.
Copyright (c) 2018 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) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Link state IGPs, such as IS-IS, OSPF and OSPFv3, perform distributed route computation on all routers in the area/level. In order to have consistent routing tables across the network, such distributed computation requires that all routers have the same version of the network topology (Link State DataBase (LSDB)) and perform their computation essentially at the same time.
In general, when the network is stable, there is a desire to trigger a new Shortest Path First (SPF) computation as soon as a failure is detected in order to quickly route around the failure. However, when the network is experiencing multiple failures over a short period of time, there is a conflicting desire to limit the frequency of SPF computations, which would allow a reduction in control plane resources used by IGPs and all protocols/subsystems reacting on the attendant route change, such as LDP, RSVP-TE, BGP, Fast ReRoute computations (e.g., Loop Free Alternates (LFA)), FIB updates, etc. This also reduces network churn and, in particular, reduces the side effects such as micro-loops [RFC5715] that ensue during IGP convergence.
To allow for this, IGPs usually implement an SPF Back-off Delay algorithm that postpones or backs-off the SPF computation. However, different implementations have chosen different algorithms. Hence, in a multi-vendor network, it's not possible to ensure that all routers trigger their SPF computation after the same delay. This situation increases the average and maximum differential delay between routers completing their SPF computation. It also increases the probability that different routers compute their FIBs based on different LSDB versions. Both factors increase the probability and/or duration of micro-loops as discussed in Section 8.
To allow multi-vendor networks to have all routers delay their SPF computations for the same duration, this document specifies a standard algorithm.
The high level goals of this algorithm are the following:
IGP events: The reception or origination of an IGP LSDB change requiring a new routing table computation. Examples are a topology change, a prefix change and a metric change on a link or prefix. Note that locally triggering a routing table computation is not considered as an IGP event since other IGP routers are unaware of this occurrence.
Routing table computation: Computation of the routing table, by the IGP implementation, using the IGP LSDB. No distinction is made between the type of computation performed. e.g., full SPF, incremental SPF, Partial Route Computation (PRC). The type of computation is a local consideration. This document may interchangeably use the terms routing table computation and SPF computation.
SPF_DELAY: The delay between the first IGP event triggering a new routing table computation and the start of that routing table computation. It can take the following values:
TIME_TO_LEARN_INTERVAL: This is the maximum duration typically needed to learn all the IGP events related to a single component failure (e.g., router failure, SRLG failure), e.g., 1 second. It's mostly dependent on failure detection time variation between all routers that are adjacent to the failure. Additionally, it may depend on the different IGP implementations/parameters across the network, related to origination and flooding of their link state advertisements.
HOLDDOWN_INTERVAL: The time required with no received IGP events before considering the IGP to be stable again and allowing the SPF_DELAY to be restored to INITIAL_SPF_DELAY. e.g. a HOLDDOWN_INTERVAL of 3 seconds. The HOLDDOWN_INTERVAL MUST be defaulted and configured to be longer than the TIME_TO_LEARN_INTERVAL.
For this first IGP event, we assume that there has been a single simple change in the network which can be taken into account using a single routing computation (e.g., link failure, prefix (metric) change) and we optimize for very fast convergence, delaying the routing computation by INITIAL_SPF_DELAY. Under this assumption, there is no benefit in delaying the routing computation. In a typical network, this is the most common type of IGP event. Hence, it makes sense to optimize this case.
If subsequent IGP events are received in a short period of time (TIME_TO_LEARN_INTERVAL), we then assume that a single component failed, but that this failure requires the knowledge of multiple IGP events in order for IGP routing to converge. Under this assumption, we want fast convergence since this is a normal network situation. However, there is a benefit in waiting for all IGP events related to this single component failure so that the IGP can compute the post-failure routing table in a single additional route computation. In this situation, we delay the routing computation by SHORT_SPF_DELAY.
If IGP events are still received after TIME_TO_LEARN_INTERVAL from the initial IGP event received in QUIET state Section 5.1, then the network is presumably experiencing multiple independent failures. In this case, while waiting for network stability, the computations are delayed for a longer time represented by LONG_SPF_DELAY. This SPF delay is kept until no IGP events are received for HOLDDOWN_INTERVAL.
Note that in order to increase the consistency network wide, the algorithm uses a delay (TIME_TO_LEARN_INTERVAL) from the initial IGP event, rather than the number of SPF computation performed. Indeed, as all routers may receive the IGP events at different times, we cannot assume that all routers will perform the same number of SPF computations. For example, assuming that the SPF delay is 50 ms, router R1 may receive 3 IGP events (E1, E2, E3) in those 50 ms and hence will perform a single routing computation. While another router R2 may only receive 2 events (E1, E2) in those 50 ms and hence will schedule another routing computation when receiving E3.
This section specifies the finite state machine (FSM) intended to control the timing of the execution of SPF calculations in response to IGP events.
The FSM is initialized to the QUIET state with all three timers timers (SPF_TIMER, HOLDDOWN_TIMER, LEARN_TIMER) deactivated.
The events which may change the FSM states are an IGP event or the expiration of one timer (SPF_TIMER, HOLDDOWN_TIMER, LEARN_TIMER).
The following diagram briefly describes the state transitions.
+-------------------+ +---->| |<-------------------+ | | QUIET | | +-----| |<---------+ | 7: +-------------------+ | | SPF_TIMER | | | expiration | | | | 1: IGP event | | | | | v | | +-------------------+ | | +---->| | | | | | SHORT_WAIT |----->----+ | +-----| | | 2: +-------------------+ 6: HOLDDOWN_TIMER | IGP event | expiration | 8: SPF_TIMER | | expiration | | | 3: LEARN_TIMER | | expiration | | | v | +-------------------+ | +---->| | | | | LONG_WAIT |------------>-------+ +-----| | 4: +-------------------+ 5: HOLDDOWN_TIMER IGP event expiration 9: SPF_TIMER expiration
Figure 1: State Machine
The naming and semantics of each state corresponds directly to the SPF delay used for IGP events received in that state. Three states are defined:
QUIET: This is the initial state, when no IGP events have occurred for at least HOLDDOWN_INTERVAL since the previous routing table computation. The state is meant to handle link failures very quickly.
SHORT_WAIT: State entered when an IGP event has been received in QUIET state. This state is meant to handle single component failure requiring multiple IGP events (e.g., node, SRLG).
LONG_WAIT: State reached after TIME_TO_LEARN_INTERVAL. In other words, state reached after TIME_TO_LEARN_INTERVAL in state SHORT_WAIT. This state is meant to handle multiple independent component failures during periods of IGP instability.
SPF_TIMER: The FSM timer that uses the computed SPF delay. Upon expiration, the Route Table Computation (as defined in Section 3) is performed.
HOLDDOWN_TIMER: The FSM timer that is (re)started whan an IGP event is received and set to HOLDDOWN_INTERVAL. Upon expiration, the FSM is moved to the QUIET state.
LEARN_TIMER: The FSM timer that is started when an IGP event is recevied while the FSM is in the QUIET state. Upon expiration, the FSM is moved to the LONG_WAIT state.
This section describes the events and the actions performed in response.
Transition 1: IGP event, while in QUIET state.
Actions on event 1:
Transition 2: IGP event, while in SHORT_WAIT.
Actions on event 2:
Transition 3: LEARN_TIMER expiration.
Actions on event 3:
Transition 4: IGP event, while in LONG_WAIT.
Actions on event 4:
Transition 5: HOLDDOWN_TIMER expiration, while in LONG_WAIT.
Actions on event 5:
Transition 6: HOLDDOWN_TIMER expiration, while in SHORT_WAIT.
Actions on event 6:
Transition 7: SPF_TIMER expiration, while in QUIET.
Actions on event 7:
Transition 8: SPF_TIMER expiration, while in SHORT_WAIT.
Actions on event 8:
Transition 9: SPF_TIMER expiration, while in LONG_WAIT.
Actions on event 9:
All the parameters MUST be configurable at the protocol instance granularity. They MAY be configurable at the area/level granularity. All the delays (INITIAL_SPF_DELAY, SHORT_SPF_DELAY, LONG_SPF_DELAY, TIME_TO_LEARN_INTERVAL, HOLDDOWN_INTERVAL) SHOULD be configurable at the millisecond granularity. They MUST be configurable at least at the tenth of second granularity. The configurable range for all the parameters SHOULD at least be from 0 milliseconds to 60 seconds.
This document does not propose default values for the parameters because these values are expected to be context dependent. Implementations are free to propose their own default values. However the HOLDDOWN_INTERVAL MUST be defaulted or configured to be longer than the TIME_TO_LEARN_INTERVAL.
In order to satisfy the goals stated in Section 2, operators are RECOMMENDED to configure delay intervals such that INITIAL_SPF_DELAY <= SHORT_SPF_DELAY and SHORT_SPF_DELAY <= LONG_SPF_DELAY.
When setting (default) values, one should consider the customers and their application requirements, the computational power of the routers, the size of the network, and, in particular, the number of IP prefixes advertised in the IGP, the frequency and number of IGP events, the number of protocols reactions/computations triggered by IGP SPF computation (e.g., BGP, PCEP, Traffic Engineering CSPF, Fast ReRoute computations).
Note that some or all of these factors may change over the life of the network. In case of doubt, it's RECOMMENDED that timer intervals should be chosen conservatively (i.e., longer timer values).
For the standard algorithm to be effective in mitigating micro-loops, it is RECOMMENDED that all routers in the IGP domain, or at least all the routers in the same area/level, have exactly the same configured values.
In general, the SPF Back-off Delay algorithm is only effective in mitigating micro-loops if it is deployed, with the same parameters, on all routers in the IGP domain or, at least, all routers in an IGP area/level. The impact of partial deployment is dependent on the particular event, topology, and the algorithm(s) used on other routers in the IGP area/level. In cases where the previous SPF Back-off Delay algorithm was implemented uniformly, partial deployment will increase the frequency and duration of micro-loops. Hence, it is RECOMMENDED that all routers in the IGP domain or at least within the same area/level be migrated to the SPF algorithm described herein at roughly the same time.
Note that this is not a new consideration as over times, network operators have changed SPF delay parameters in order to accommodate new customer requirements for fast convergence, as permitted by new software and hardware. They may also have progressively replaced an implementation with a given SPF Back-off Delay algorithm by another implementation with a different one.
Micro-loops during IGP convergence are due to a non-synchronized or non-ordered update of the forwarding information tables (FIB) [RFC5715] [RFC6976] [I-D.ietf-rtgwg-spf-uloop-pb-statement]. FIBs are installed after multiple steps such as flooding of the IGP event across the network, SPF wait time, SPF computation, FIB distribution across line cards, and FIB update. This document only addresses the contribution from the SPF wait time. This standardized procedure reduces the probability and/or duration of micro-loops when IGPs experience multiple temporally close events. It does not prevent all micro-loops. However, it is beneficial and is less complex and costly to implement when compared to full solutions such as [RFC5715] or [RFC6976].
No IANA actions required.
The algorithm presented in this document does not compromise IGP security. An attacker having the ability to generate IGP events would be able to delay the IGP convergence time. The LONG_SPF_DELAY state may help mitigate the effects of Denial-of-Service (DOS) attacks generating many IGP events.
We would like to acknowledge Les Ginsberg, Uma Chunduri, Mike Shand and Alexander Vainshtein for the discussions and comments related to this document.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC8174] | Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017. |