Debian Codegraph @

rfc5882.html

raw
1 <pre>Internet Engineering Task Force (IETF) D. Katz
2 Request for Comments: 5882 D. Ward
3 Category: Standards Track Juniper Networks
4 ISSN: 2070-1721 June 2010
5
6
7 <span class="h1">Generic Application of Bidirectional Forwarding Detection (BFD)</span>
8
9 Abstract
10
11 This document describes the generic application of the Bidirectional
12 Forwarding Detection (BFD) protocol.
13
14 Status of This Memo
15
16 This is an Internet Standards Track document.
17
18 This document is a product of the Internet Engineering Task Force
19 (IETF). It represents the consensus of the IETF community. It has
20 received public review and has been approved for publication by the
21 Internet Engineering Steering Group (IESG). Further information on
22 Internet Standards is available in <a href="./rfc5741#section-2">Section&nbsp;2 of RFC 5741</a>.
23
24 Information about the current status of this document, any errata,
25 and how to provide feedback on it may be obtained at
26 <a href="http://www.rfc-editor.org/info/rfc5882">http://www.rfc-editor.org/info/rfc5882</a>.
27
28 Copyright Notice
29
30 Copyright (c) 2010 IETF Trust and the persons identified as the
31 document authors. All rights reserved.
32
33 This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
34 Provisions Relating to IETF Documents
35 (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
36 publication of this document. Please review these documents
37 carefully, as they describe your rights and restrictions with respect
38 to this document. Code Components extracted from this document must
39 include Simplified BSD License text as described in Section 4.e of
40 the Trust Legal Provisions and are provided without warranty as
41 described in the Simplified BSD License.
42
43
44
45
46
47
48
49
50
51
52 <span class="grey">Katz &amp; Ward Standards Track [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
55
56
57 Table of Contents
58
59 <a href="#section-1">1</a>. Introduction ....................................................<a href="#page-3">3</a>
60 <a href="#section-1.1">1.1</a>. Conventions Used in This Document ..........................<a href="#page-3">3</a>
61 <a href="#section-2">2</a>. Overview ........................................................<a href="#page-3">3</a>
62 <a href="#section-3">3</a>. Basic Interaction between BFD Sessions and Clients ..............<a href="#page-4">4</a>
63 <a href="#section-3.1">3.1</a>. Session State Hysteresis ...................................<a href="#page-4">4</a>
64 <a href="#section-3.2">3.2</a>. AdminDown State ............................................<a href="#page-5">5</a>
65 <a href="#section-3.3">3.3</a>. Hitless Establishment/Reestablishment of BFD State .........<a href="#page-5">5</a>
66 <a href="#section-4">4</a>. Control Protocol Interactions ...................................<a href="#page-6">6</a>
67 <a href="#section-4.1">4.1</a>. Adjacency Establishment ....................................<a href="#page-6">6</a>
68 <a href="#section-4.2">4.2</a>. Reaction to BFD Session State Changes ......................<a href="#page-7">7</a>
69 <a href="#section-4.2.1">4.2.1</a>. Control Protocols with a Single Data Protocol .......<a href="#page-7">7</a>
70 <a href="#section-4.2.2">4.2.2</a>. Control Protocols with Multiple Data Protocols ......<a href="#page-8">8</a>
71 <a href="#section-4.3">4.3</a>. Interactions with Graceful Restart Mechanisms ..............<a href="#page-8">8</a>
72 <a href="#section-4.3.1">4.3.1</a>. BFD Fate Independent of the Control Plane ...........<a href="#page-9">9</a>
73 <a href="#section-4.3.2">4.3.2</a>. BFD Shares Fate with the Control Plane ..............<a href="#page-9">9</a>
74 <a href="#section-4.4">4.4</a>. Interactions with Multiple Control Protocols ..............<a href="#page-10">10</a>
75 <a href="#section-5">5</a>. Interactions with Non-Protocol Functions .......................<a href="#page-10">10</a>
76 <a href="#section-6">6</a>. Data Protocols and Demultiplexing ..............................<a href="#page-11">11</a>
77 <a href="#section-7">7</a>. Multiple Link Subnetworks ......................................<a href="#page-11">11</a>
78 <a href="#section-7.1">7.1</a>. Complete Decoupling .......................................<a href="#page-12">12</a>
79 <a href="#section-7.2">7.2</a>. Layer N-1 Hints ...........................................<a href="#page-12">12</a>
80 <a href="#section-7.3">7.3</a>. Aggregating BFD Sessions ..................................<a href="#page-12">12</a>
81 <a href="#section-7.4">7.4</a>. Combinations of Scenarios .................................<a href="#page-12">12</a>
82 <a href="#section-8">8</a>. Other Application Issues .......................................<a href="#page-13">13</a>
83 <a href="#section-9">9</a>. Interoperability Issues ........................................<a href="#page-13">13</a>
84 <a href="#section-10">10</a>. Specific Protocol Interactions (Non-Normative) ................<a href="#page-13">13</a>
85 <a href="#section-10.1">10.1</a>. BFD Interactions with OSPFv2, OSPFv3, and IS-IS ..........<a href="#page-14">14</a>
86 <a href="#section-10.1.1">10.1.1</a>. Session Establishment .............................<a href="#page-14">14</a>
87 <a href="#section-10.1.2">10.1.2</a>. Reaction to BFD State Changes .....................<a href="#page-14">14</a>
88 <a href="#section-10.1.3">10.1.3</a>. OSPF Virtual Links ................................<a href="#page-15">15</a>
89 <a href="#section-10.2">10.2</a>. Interactions with BGP ....................................<a href="#page-15">15</a>
90 <a href="#section-10.3">10.3</a>. Interactions with RIP ....................................<a href="#page-15">15</a>
91 <a href="#section-11">11</a>. Security Considerations .......................................<a href="#page-16">16</a>
92 <a href="#section-12">12</a>. References ....................................................<a href="#page-16">16</a>
93 <a href="#section-12.1">12.1</a>. Normative References .....................................<a href="#page-16">16</a>
94 <a href="#section-12.2">12.2</a>. Informative References ...................................<a href="#page-16">16</a>
95
96
97
98
99
100
101
102
103
104
105
106
107
108 <span class="grey">Katz &amp; Ward Standards Track [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
111
112
113 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
114
115 The Bidirectional Forwarding Detection [<a href="#ref-BFD" title="&quot;Bidirectional Forwarding Detection&quot;">BFD</a>] protocol provides a
116 liveness detection mechanism that can be utilized by other network
117 components for which their integral liveness mechanisms are either
118 too slow, inappropriate, or nonexistent. Other documents have
119 detailed the use of BFD with specific encapsulations ([<a href="#ref-BFD-1HOP" title="&quot;Bidirectional Forwarding Detection (BFD) for IPv4 and IPv6 (Single Hop)&quot;">BFD-1HOP</a>]
120 [<a href="#ref-BFD-MULTI" title="&quot;Bidirectional Forwarding Detection (BFD) for Multihop Paths&quot;">BFD-MULTI</a>] [<a href="#ref-BFD-MPLS" title="&quot;Bidirectional Forwarding Detection (BFD) for MPLS Label Switched Paths (LSPs)&quot;">BFD-MPLS</a>]). As the utility of BFD has become
121 understood, there have been calls to specify BFD interactions with a
122 growing list of network functions. Rather than producing a long
123 series of short documents on the application of BFD, it seemed
124 worthwhile to describe the interactions between BFD and other network
125 functions ("BFD clients") in a broad way.
126
127 This document describes the generic application of BFD. Specific
128 protocol applications are provided for illustrative purposes.
129
130 <span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Conventions Used in This Document</span>
131
132 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
133 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
134 document are to be interpreted as described in <a href="./rfc2119">RFC 2119</a> [<a href="#ref-KEYWORDS" title="&quot;Key words for use in RFCs to Indicate Requirement Levels&quot;">KEYWORDS</a>].
135
136 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Overview</span>
137
138 The Bidirectional Forwarding Detection (BFD) specification defines a
139 protocol with simple and specific semantics. Its sole purpose is to
140 verify connectivity between a pair of systems, for a particular data
141 protocol across a path (which may be of any technology, length, or
142 OSI layer). The promptness of the detection of a path failure can be
143 controlled by trading off protocol overhead and system load with
144 detection times.
145
146 BFD is *not* intended to directly provide control protocol liveness
147 information; those protocols have their own means and vagaries.
148 Rather, control protocols can use the services provided by BFD to
149 inform their operation. BFD can be viewed as a service provided by
150 the layer in which it is running.
151
152 The service interface with BFD is straightforward. The application
153 supplies session parameters (neighbor address, time parameters,
154 protocol options), and BFD provides the session state, of which the
155 most interesting transitions are to and from the Up state. The
156 application is expected to bootstrap the BFD session, as BFD has no
157 discovery mechanism.
158
159
160
161
162
163
164 <span class="grey">Katz &amp; Ward Standards Track [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
167
168
169 An implementation SHOULD establish only a single BFD session per data
170 protocol path, regardless of the number of applications that wish to
171 utilize it. There is no additional value in having multiple BFD
172 sessions to the same endpoints. If multiple applications request
173 different session parameters, it is a local issue as to how to
174 resolve the parameter conflicts. BFD in turn will notify all
175 applications bound to a session when a session state change occurs.
176
177 BFD should be viewed as having an advisory role to the protocol or
178 protocols or other network functions with which it is interacting,
179 which will then use their own mechanisms to effect any state
180 transitions. The interaction is very much at arm's length, which
181 keeps things simple and decoupled. In particular, BFD explicitly
182 does not carry application-specific information, partly for
183 architectural reasons and partly because BFD may have curious and
184 unpredictable latency characteristics and as such makes a poor
185 transport mechanism.
186
187 It is important to remember that the interaction between BFD and its
188 client applications has essentially no interoperability issues,
189 because BFD is acting in an advisory nature (similar to hardware
190 signaling the loss of light on a fiber optic circuit, for example)
191 and existing mechanisms in the client applications are used in
192 reaction to BFD events. In fact, BFD may interact with only one of a
193 pair of systems for a particular client application without any ill
194 effect.
195
196 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Basic Interaction between BFD Sessions and Clients</span>
197
198 The interaction between a BFD session and its associated client
199 applications is, for the most part, an implementation issue that is
200 outside the scope of this specification. However, it is useful to
201 describe some mechanisms that implementors may use in order to
202 promote full-featured implementations. One way of modeling this
203 interaction is to create an adaptation layer between the BFD state
204 machine and the client applications. The adaptation layer is
205 cognizant of both the internals of the BFD implementation and the
206 requirements of the clients.
207
208 <span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Session State Hysteresis</span>
209
210 A BFD session can be tightly coupled to its client applications; for
211 example, any transition out of the Up state could cause signaling to
212 the clients to take failure action. However, in some cases, this may
213 not always be the best course of action.
214
215
216
217
218
219
220 <span class="grey">Katz &amp; Ward Standards Track [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
223
224
225 Implementors may choose to hide rapid Up/Down/Up transitions of the
226 BFD session from its clients. This is useful in order to support
227 process restarts without necessitating complex protocol mechanisms,
228 for example.
229
230 As such, a system MAY choose not to notify clients if a BFD session
231 transitions from Up to Down state, and returns to Up state, if it
232 does so within a reasonable period of time (the length of which is
233 outside the scope of this specification). If the BFD session does
234 not return to Up state within that time frame, the clients SHOULD be
235 notified that a session failure has occurred.
236
237 <span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. AdminDown State</span>
238
239 The AdminDown mechanism in BFD is intended to signal that the BFD
240 session is being taken down for administrative purposes, and the
241 session state is not indicative of the liveness of the data path.
242
243 Therefore, a system SHOULD NOT indicate a connectivity failure to a
244 client if either the local session state or the remote session state
245 (if known) transitions to AdminDown, so long as that client has
246 independent means of liveness detection (typically, control
247 protocols).
248
249 If a client does not have any independent means of liveness
250 detection, a system SHOULD indicate a connectivity failure to a
251 client, and assume the semantics of Down state, if either the local
252 or remote session state transitions to AdminDown. Otherwise, the
253 client will not be able to determine whether the path is viable, and
254 unfortunate results may occur.
255
256 <span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Hitless Establishment/Reestablishment of BFD State</span>
257
258 It is useful to be able to configure a BFD session between a pair of
259 systems without impacting the state of any clients that will be
260 associated with that session. Similarly, it is useful for BFD state
261 to be reestablished without perturbing associated clients when all
262 BFD state is lost (such as in process restart situations). This
263 interacts with the clients' ability to establish their state
264 independent of BFD.
265
266 The BFD state machine transitions that occur in the process of
267 bringing up a BFD session in such situations SHOULD NOT cause a
268 connectivity failure notification to the clients.
269
270
271
272
273
274
275
276 <span class="grey">Katz &amp; Ward Standards Track [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
279
280
281 A client that is capable of establishing its state prior to the
282 configuration or restarting of a BFD session MAY do so if
283 appropriate. The means to do so is outside of the scope of this
284 specification.
285
286 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Control Protocol Interactions</span>
287
288 Very common client applications of BFD are control protocols, such as
289 routing protocols. The object, when BFD interacts with a control
290 protocol, is to advise the control protocol of the connectivity of
291 the data protocol. In the case of routing protocols, for example,
292 this allows the connectivity failure to trigger the rerouting of
293 traffic around the failed path more quickly than the native detection
294 mechanisms.
295
296 <span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Adjacency Establishment</span>
297
298 If the session state on either the local or remote system (if known)
299 is AdminDown, BFD has been administratively disabled, and the
300 establishment of a control protocol adjacency MUST be allowed.
301
302 BFD sessions are typically bootstrapped by the control protocol,
303 using the mechanism (discovery, configuration) used by the control
304 protocol to find neighbors. Note that it is possible in some failure
305 scenarios for the network to be in a state such that the control
306 protocol is capable of coming up, but the BFD session cannot be
307 established, and, more particularly, data cannot be forwarded. To
308 avoid this situation, it would be beneficial not to allow the control
309 protocol to establish a neighbor adjacency. However, this would
310 preclude the operation of the control protocol in an environment in
311 which not all systems support BFD.
312
313 Therefore, the establishment of control protocol adjacencies SHOULD
314 be blocked if both systems are willing to establish a BFD session but
315 a BFD session cannot be established. One method for determining that
316 both systems are willing to establish a BFD session is if the control
317 protocol carries explicit signaling of this fact. If there is no
318 explicit signaling, the willingness to establish a BFD session may be
319 determined by means outside the scope of this specification.
320
321 If it is believed that the neighboring system does not support BFD,
322 the establishment of a control protocol adjacency SHOULD NOT be
323 blocked.
324
325 The setting of BFD's various timing parameters and modes are not
326 subject to standardization. Note that all protocols sharing a
327 session will operate using the same parameters. The mechanism for
328 choosing the parameters among those desired by the various protocols
329
330
331
332 <span class="grey">Katz &amp; Ward Standards Track [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
335
336
337 is outside the scope of this specification. It is generally useful
338 to choose the parameters resulting in the shortest Detection Time; a
339 particular client application can always apply hysteresis to the
340 notifications from BFD if it desires longer Detection Times.
341
342 Note that many control protocols assume full connectivity between all
343 systems on multiaccess media such as LANs. If BFD is running on only
344 a subset of systems on such a network, and adjacency establishment is
345 blocked by the absence of a BFD session, the assumptions of the
346 control protocol may be violated, with unpredictable results.
347
348 <span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Reaction to BFD Session State Changes</span>
349
350 If a BFD session transitions from Up state to AdminDown, or the
351 session transitions from Up to Down because the remote system is
352 indicating that the session is in state AdminDown, clients SHOULD NOT
353 take any control protocol action.
354
355 For other transitions from Up to Down state, the mechanism by which
356 the control protocol reacts to a path failure signaled by BFD depends
357 on the capabilities of the protocol, as specified in the following
358 subsections.
359
360 <span class="h4"><a class="selflink" id="section-4.2.1" href="#section-4.2.1">4.2.1</a>. Control Protocols with a Single Data Protocol</span>
361
362 A control protocol that is tightly bound to a single failing data
363 protocol SHOULD take action to ensure that data traffic is no longer
364 directed to the failing path. Note that this should not be
365 interpreted as BFD replacing the control protocol liveness mechanism,
366 if any, as the control protocol may rely on mechanisms not verified
367 by BFD (multicast, for instance) so BFD most likely cannot detect all
368 failures that would impact the control protocol. However, a control
369 protocol MAY choose to use BFD session state information to more
370 rapidly detect an impending control protocol failure, particularly if
371 the control protocol operates in-band (over the data protocol).
372
373 Therefore, when a BFD session transitions from Up to Down, action
374 SHOULD be taken in the control protocol to signal the lack of
375 connectivity for the path over which BFD is running. If the control
376 protocol has an explicit mechanism for announcing path state, a
377 system SHOULD use that mechanism rather than impacting the
378 connectivity of the control protocol, particularly if the control
379 protocol operates out-of-band from the failed data protocol.
380 However, if such a mechanism is not available, a control protocol
381 timeout SHOULD be emulated for the associated neighbor.
382
383
384
385
386
387
388 <span class="grey">Katz &amp; Ward Standards Track [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
391
392
393 <span class="h4"><a class="selflink" id="section-4.2.2" href="#section-4.2.2">4.2.2</a>. Control Protocols with Multiple Data Protocols</span>
394
395 Slightly different mechanisms are used if the control protocol
396 supports the routing of multiple data protocols, depending on whether
397 the control protocol supports separate topologies for each data
398 protocol.
399
400 <span class="h5"><a class="selflink" id="section-4.2.2.1" href="#section-4.2.2.1">4.2.2.1</a>. Shared Topologies</span>
401
402 With a shared topology, if one of the data protocols fails (as
403 signaled by the associated BFD session), it is necessary to consider
404 the path to have failed for all data protocols. Otherwise, there is
405 no way for the control protocol to turn away traffic for the failed
406 data protocol (and such traffic would be black-holed indefinitely).
407
408 Therefore, when a BFD session transitions from Up to Down, action
409 SHOULD be taken in the control protocol to signal the lack of
410 connectivity for the path in the topology corresponding to the BFD
411 session. If this cannot be signaled otherwise, a control protocol
412 timeout SHOULD be emulated for the associated neighbor.
413
414 <span class="h5"><a class="selflink" id="section-4.2.2.2" href="#section-4.2.2.2">4.2.2.2</a>. Independent Topologies</span>
415
416 With individual routing topologies for each data protocol, only the
417 failed data protocol needs to be rerouted around the failed path.
418
419 Therefore, when a BFD session transitions from Up to Down, action
420 SHOULD be taken in the control protocol to signal the lack of
421 connectivity for the path in the topology over which BFD is running.
422 Generally, this can be done without impacting the connectivity of
423 other topologies (since otherwise it is very difficult to support
424 separate topologies for multiple data protocols).
425
426 <span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Interactions with Graceful Restart Mechanisms</span>
427
428 A number of control protocols support Graceful Restart mechanisms,
429 including IS-IS [<a href="#ref-ISIS-GRACE" title="&quot;Restart Signaling for IS-IS&quot;">ISIS-GRACE</a>], OSPF [<a href="#ref-OSPF-GRACE" title="&quot;Graceful OSPF Restart&quot;">OSPF-GRACE</a>], and BGP [<a href="#ref-BGP-GRACE" title="&quot;Graceful Restart Mechanism for BGP&quot;">BGP-GRACE</a>].
430 These mechanisms are designed to allow a control protocol to restart
431 without perturbing network connectivity state (lest it appear that
432 the system and/or all of its links had failed). They are predicated
433 on the existence of a separate forwarding plane that does not
434 necessarily share fate with the control plane in which the routing
435 protocols operate. In particular, the assumption is that the
436 forwarding plane can continue to function while the protocols restart
437 and sort things out.
438
439 BFD implementations announce via the Control Plane Independent "C"
440 bit whether or not BFD shares fate with the control plane. This
441
442
443
444 <span class="grey">Katz &amp; Ward Standards Track [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
447
448
449 information is used to determine the actions to be taken in
450 conjunction with Graceful Restart. If BFD does not share its fate
451 with the control plane on either system, it can be used to determine
452 whether Graceful Restart in a control protocol is NOT viable (the
453 forwarding plane is not operating).
454
455 If the control protocol has a Graceful Restart mechanism, BFD may be
456 used in conjunction with this mechanism. The interaction between BFD
457 and the control protocol depends on the capabilities of the control
458 protocol and whether or not BFD shares fate with the control plane.
459 In particular, it may be desirable for a BFD session failure to abort
460 the Graceful Restart process and allow the failure to be visible to
461 the network.
462
463 <span class="h4"><a class="selflink" id="section-4.3.1" href="#section-4.3.1">4.3.1</a>. BFD Fate Independent of the Control Plane</span>
464
465 If BFD is implemented in the forwarding plane and does not share fate
466 with the control plane on either system (the "C" bit is set in the
467 BFD Control packets in both directions), control protocol restarts
468 should not affect the BFD session. In this case, a BFD session
469 failure implies that data can no longer be forwarded, so any Graceful
470 Restart in progress at the time of the BFD session failure SHOULD be
471 aborted in order to avoid black holes, and a topology change SHOULD
472 be signaled in the control protocol.
473
474 <span class="h4"><a class="selflink" id="section-4.3.2" href="#section-4.3.2">4.3.2</a>. BFD Shares Fate with the Control Plane</span>
475
476 If BFD shares fate with the control plane on either system (the "C"
477 bit is clear in either direction), a BFD session failure cannot be
478 disentangled from other events taking place in the control plane. In
479 many cases, the BFD session will fail as a side effect of the restart
480 taking place. As such, it would be best to avoid aborting any
481 Graceful Restart taking place, if possible (since otherwise BFD and
482 Graceful Restart cannot coexist).
483
484 There is some risk in doing so, since a simultaneous failure or
485 restart of the forwarding plane will not be detected, but this is
486 always an issue when BFD shares fate with the control plane.
487
488 <span class="h5"><a class="selflink" id="section-4.3.2.1" href="#section-4.3.2.1">4.3.2.1</a>. Control Protocols with Planned Restart Signaling</span>
489
490 Some control protocols can signal a planned restart prior to the
491 restart taking place. In this case, if a BFD session failure occurs
492 during the restart, such a planned restart SHOULD NOT be aborted and
493 the session failure SHOULD NOT result in a topology change being
494 signaled in the control protocol.
495
496
497
498
499
500 <span class="grey">Katz &amp; Ward Standards Track [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
503
504
505 <span class="h5"><a class="selflink" id="section-4.3.2.2" href="#section-4.3.2.2">4.3.2.2</a>. Control Protocols without Planned Restart Signaling</span>
506
507 Control protocols that cannot signal a planned restart depend on the
508 recently restarted system to signal the Graceful Restart prior to the
509 control protocol adjacency timeout. In most cases, whether the
510 restart is planned or unplanned, it is likely that the BFD session
511 will time out prior to the onset of Graceful Restart, in which case a
512 topology change SHOULD be signaled in the control protocol as
513 specified in <a href="#section-3.2">Section 3.2</a>.
514
515 However, if the restart is in fact planned, an implementation MAY
516 adjust the BFD session timing parameters prior to restarting in such
517 a way that the Detection Time in each direction is longer than the
518 restart period of the control protocol, providing the restarting
519 system the same opportunity to enter Graceful Restart as it would
520 have without BFD. The restarting system SHOULD NOT send any BFD
521 Control packets until there is a high likelihood that its neighbors
522 know a Graceful Restart is taking place, as the first BFD Control
523 packet will cause the BFD session to fail.
524
525 <span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a>. Interactions with Multiple Control Protocols</span>
526
527 If multiple control protocols wish to establish BFD sessions with the
528 same remote system for the same data protocol, all MUST share a
529 single BFD session.
530
531 If hierarchical or dependent layers of control protocols are in use
532 (say, OSPF and Internal BGP (IBGP)), it may not be useful for more
533 than one of them to interact with BFD. In this example, because IBGP
534 is dependent on OSPF for its routing information, the faster failure
535 detection relayed to IBGP may actually be detrimental. The cost of a
536 peer state transition is high in BGP, and OSPF will naturally heal
537 the path through the network if it were to receive the failure
538 detection.
539
540 In general, it is best for the protocol at the lowest point in the
541 hierarchy to interact with BFD, and then to use existing interactions
542 between the control protocols to effect changes as necessary. This
543 will provide the fastest possible failure detection and recovery in a
544 network.
545
546 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Interactions with Non-Protocol Functions</span>
547
548 BFD session status may be used to affect other system functions that
549 are not protocol based (for example, static routes). If the path to
550 a remote system fails, it may be desirable to avoid passing traffic
551
552
553
554
555
556 <span class="grey">Katz &amp; Ward Standards Track [Page 10]</span></pre>
557 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
558 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
559
560
561 to that remote system, so the local system may wish to take internal
562 measures to accomplish this (such as withdrawing a static route and
563 withdrawing that route from routing protocols).
564
565 If it is known, or presumed, that the remote system is BFD capable
566 and the BFD session is not in Up state, appropriate action SHOULD be
567 taken (such as withdrawing a static route).
568
569 If it is known, or presumed, that the remote system does not support
570 BFD, action such as withdrawing a static route SHOULD NOT be taken.
571
572 Bootstrapping of the BFD session in the non-protocol case is likely
573 to be derived from configuration information.
574
575 There is no need to exchange endpoints or discriminator values via
576 any mechanism other than configuration (via Operational Support
577 Systems or any other means) as the endpoints must be known and
578 configured by the same means.
579
580 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Data Protocols and Demultiplexing</span>
581
582 BFD is intended to protect a single "data protocol" and is
583 encapsulated within that protocol. A pair of systems may have
584 multiple BFD sessions over the same topology if they support (and are
585 encapsulated by) different protocols. For example, if two systems
586 have IPv4 and IPv6 running across the same link between them, these
587 are considered two separate paths and require two separate BFD
588 sessions.
589
590 This same technique is used for more fine-grained paths. For
591 example, if multiple differentiated services [<a href="#ref-DIFFSERV" title="&quot;Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers&quot;">DIFFSERV</a>] are being
592 operated over IPv4, an independent BFD session may be run for each
593 service level. The BFD Control packets must be marked in the same
594 way as the data packets, partly to ensure as much fate sharing as
595 possible between BFD and data traffic, and also to demultiplex the
596 initial packet if the discriminator values have not been exchanged.
597
598 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Multiple Link Subnetworks</span>
599
600 A number of technologies exist for aggregating multiple parallel
601 links at layer N-1 and treating them as a single link at layer N.
602 BFD may be used in a number of ways to protect the path at layer N.
603 The exact mechanism used is outside the scope of this specification.
604 However, this section provides examples of some possible deployment
605 scenarios. Other scenarios are possible and are not precluded.
606
607
608
609
610
611
612 <span class="grey">Katz &amp; Ward Standards Track [Page 11]</span></pre>
613 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
614 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
615
616
617 <span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Complete Decoupling</span>
618
619 The simplest approach is to simply run BFD over the layer N path,
620 with no interaction with the layer N-1 mechanisms. Doing so assumes
621 that the layer N-1 mechanism will deal with connectivity issues in
622 individual layer N-1 links. BFD will declare a failure in the layer
623 N path only when the session times out.
624
625 This approach will work whether or not the layer N-1 neighbor is the
626 same as the layer N neighbor.
627
628 <span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Layer N-1 Hints</span>
629
630 A slightly more intelligent approach than complete decoupling is to
631 have the layer N-1 mechanism inform the layer N BFD when the
632 aggregated link is no longer viable. In this case, the BFD session
633 will detect the failure more rapidly, as it need not wait for the
634 session to time out. This is analogous to triggering a session
635 failure based on the hardware-detected failure of a single link.
636
637 This approach will also work whether or not the layer N-1 neighbor is
638 the same as the layer N neighbor.
639
640 <span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a>. Aggregating BFD Sessions</span>
641
642 Another approach would be to use BFD on each layer N-1 link and to
643 aggregate the state of the multiple sessions into a single indication
644 to the layer N clients. This approach has the advantage that it is
645 independent of the layer N-1 technology. However, this approach only
646 works if the layer N neighbor is the same as the layer N-1 neighbor
647 (a single hop at layer N-1).
648
649 <span class="h3"><a class="selflink" id="section-7.4" href="#section-7.4">7.4</a>. Combinations of Scenarios</span>
650
651 Combinations of more than one of the scenarios listed above (or
652 others) may be useful in some cases. For example, if the layer N
653 neighbor is not directly connected at layer N-1, a system might run a
654 BFD session across each layer N-1 link to the immediate layer N-1
655 neighbor and then run another BFD session to the layer N neighbor.
656 The aggregate state of the layer N-1 BFD sessions could be used to
657 trigger a layer N BFD session failure.
658
659
660
661
662
663
664
665
666
667
668 <span class="grey">Katz &amp; Ward Standards Track [Page 12]</span></pre>
669 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
670 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
671
672
673 <span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Other Application Issues</span>
674
675 BFD can provide liveness detection for functions related to
676 Operations, Administration, and Maintenance (OAM) in tunneling and
677 pseudowire protocols. Running BFD inside the tunnel is recommended,
678 as it exercises more aspects of the path. One way to accommodate
679 this is to address BFD packets based on the tunnel endpoints,
680 assuming that they are numbered.
681
682 If a planned outage is to take place on a path over which BFD is run,
683 it is preferable to take down the BFD session by going into AdminDown
684 state prior to the outage. The system asserting AdminDown SHOULD do
685 so for at least one Detection Time in order to ensure that the remote
686 system is aware of it.
687
688 Similarly, if BFD is to be deconfigured from a system, it is
689 desirable not to trigger any client application action. Simply
690 ceasing the transmission of BFD Control packets will cause the remote
691 system to detect a session failure. In order to avoid this, the
692 system on which BFD is being deconfigured SHOULD put the session into
693 AdminDown state and maintain this state for a Detection Time to
694 ensure that the remote system is aware of it.
695
696 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Interoperability Issues</span>
697
698 The BFD protocol itself is designed so that it will always
699 interoperate at a basic level; asynchronous mode is mandatory and is
700 always available, and other modes and functions are negotiated at run
701 time. Since the service provided by BFD is identical regardless of
702 the variants used, the particular choice of BFD options has no
703 bearing on interoperability.
704
705 The interaction between BFD and other protocols and control functions
706 is very loosely coupled. The actions taken are based on existing
707 mechanisms in those protocols and functions, so interoperability
708 problems are very unlikely unless BFD is applied in contradictory
709 ways (such as a BFD session failure causing one implementation to go
710 down and another implementation to come up). In fact, BFD may be
711 advising one system for a particular control function but not the
712 other; the only impact of this would be potentially asymmetric
713 control protocol failure detection.
714
715 <span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Specific Protocol Interactions (Non-Normative)</span>
716
717 As noted above, there are no interoperability concerns regarding
718 interactions between BFD and control protocols. However, there is
719 enough concern and confusion in this area so that it is worthwhile to
720 provide examples of interactions with specific protocols.
721
722
723
724 <span class="grey">Katz &amp; Ward Standards Track [Page 13]</span></pre>
725 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
726 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
727
728
729 Since the interactions do not affect interoperability, they are non-
730 normative.
731
732 <span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. BFD Interactions with OSPFv2, OSPFv3, and IS-IS</span>
733
734 The two versions of OSPF ([<a href="#ref-OSPFv2" title="&quot;OSPF Version 2&quot;">OSPFv2</a>] and [<a href="#ref-OSPFv3" title="&quot;OSPF for IPv6&quot;">OSPFv3</a>]), as well as IS-IS
735 [<a href="#ref-ISIS" title="&quot;Use of OSI IS-IS for routing in TCP/IP and dual environments&quot;">ISIS</a>], all suffer from an architectural limitation, namely that
736 their Hello protocols are limited in the granularity of their failure
737 detection times. In particular, OSPF has a minimum detection time of
738 two seconds, and IS-IS has a minimum detection time of one second.
739
740 BFD may be used to achieve arbitrarily small detection times for
741 these protocols by supplementing the Hello protocols used in each
742 case.
743
744 <span class="h4"><a class="selflink" id="section-10.1.1" href="#section-10.1.1">10.1.1</a>. Session Establishment</span>
745
746 The most obvious choice for triggering BFD session establishment with
747 these protocols would be to use the discovery mechanism inherent in
748 the Hello protocols in OSPF and IS-IS to bootstrap the establishment
749 of the BFD session. Any BFD sessions established to support OSPF and
750 IS-IS across a single IP hop must operate in accordance with
751 [<a href="#ref-BFD-1HOP" title="&quot;Bidirectional Forwarding Detection (BFD) for IPv4 and IPv6 (Single Hop)&quot;">BFD-1HOP</a>].
752
753 <span class="h4"><a class="selflink" id="section-10.1.2" href="#section-10.1.2">10.1.2</a>. Reaction to BFD State Changes</span>
754
755 The basic mechanisms are covered in <a href="#section-3">Section 3</a> above. At this time,
756 OSPFv2 and OSPFv3 carry routing information for a single data
757 protocol (IPv4 and IPv6, respectively) so when it is desired to
758 signal a topology change after a BFD session failure, this should be
759 done by tearing down the corresponding OSPF neighbor.
760
761 IS-IS may be used to support only one data protocol, or multiple data
762 protocols. [<a href="#ref-ISIS" title="&quot;Use of OSI IS-IS for routing in TCP/IP and dual environments&quot;">ISIS</a>] specifies a common topology for multiple data
763 protocols, but work is under way to support multiple topologies. If
764 multiple topologies are used to support multiple data protocols (or
765 multiple classes of service of the same data protocol), the topology-
766 specific path associated with a failing BFD session should no longer
767 be advertised in IS-IS Label Switched Paths (LSPs) in order to signal
768 a lack of connectivity. Otherwise, a failing BFD session should be
769 signaled by simulating an IS-IS adjacency failure.
770
771 OSPF has a planned restart signaling mechanism, whereas IS-IS does
772 not. The appropriate mechanisms outlined in <a href="#section-3.3">Section 3.3</a> should be
773 used.
774
775
776
777
778
779
780 <span class="grey">Katz &amp; Ward Standards Track [Page 14]</span></pre>
781 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
782 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
783
784
785 <span class="h4"><a class="selflink" id="section-10.1.3" href="#section-10.1.3">10.1.3</a>. OSPF Virtual Links</span>
786
787 If it is desired to use BFD for failure detection of OSPF Virtual
788 Links, the mechanism described in [<a href="#ref-BFD-MULTI" title="&quot;Bidirectional Forwarding Detection (BFD) for Multihop Paths&quot;">BFD-MULTI</a>] MUST be used, since
789 OSPF Virtual Links may traverse an arbitrary number of hops. BFD
790 authentication SHOULD be used and is strongly encouraged.
791
792 <span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. Interactions with BGP</span>
793
794 BFD may be useful with External Border Gateway Protocol (EBGP)
795 sessions [<a href="#ref-BGP" title="&quot;A Border Gateway Protocol 4 (BGP-4)&quot;">BGP</a>] in order to more rapidly trigger topology changes in
796 the face of path failure. As noted in <a href="#section-4.4">Section 4.4</a>, it is generally
797 unwise for IBGP sessions to interact with BFD if the underlying IGP
798 is already doing so.
799
800 EBGP sessions being advised by BFD may establish either a one-hop
801 [<a href="#ref-BFD-1HOP" title="&quot;Bidirectional Forwarding Detection (BFD) for IPv4 and IPv6 (Single Hop)&quot;">BFD-1HOP</a>] or a multihop [<a href="#ref-BFD-MULTI" title="&quot;Bidirectional Forwarding Detection (BFD) for Multihop Paths&quot;">BFD-MULTI</a>] session, depending on whether or
802 not the neighbor is immediately adjacent. The BFD session should be
803 established to the BGP neighbor (as opposed to any other Next Hop
804 advertised in BGP). BFD authentication SHOULD be used and is
805 strongly encouraged.
806
807 [<a id="ref-BGP-GRACE">BGP-GRACE</a>] describes a Graceful Restart mechanism for BGP. If
808 Graceful Restart is not taking place on an EBGP session, and the
809 corresponding BFD session fails, the EBGP session should be torn down
810 in accordance with <a href="#section-3.2">Section 3.2</a>. If Graceful Restart is taking place,
811 the basic procedures in <a href="#section-4.3">Section 4.3</a> apply. BGP Graceful Restart does
812 not signal planned restarts, so <a href="#section-4.3.2.2">Section 4.3.2.2</a> applies. If Graceful
813 Restart is aborted due to the rules described in <a href="#section-4.3">Section 4.3</a>, the
814 "receiving speaker" should act as if the "restart timer" expired (as
815 described in [<a href="#ref-BGP-GRACE" title="&quot;Graceful Restart Mechanism for BGP&quot;">BGP-GRACE</a>]).
816
817 <span class="h3"><a class="selflink" id="section-10.3" href="#section-10.3">10.3</a>. Interactions with RIP</span>
818
819 The Routing Information Protocol (RIP) [<a href="#ref-RIP" title="&quot;RIP Version 2&quot;">RIP</a>] is somewhat unique in
820 that, at least as specified, neighbor adjacency state is not stored
821 per se. Rather, installed routes contain a next hop address, which
822 in most cases is the address of the advertising neighbor (but may not
823 be).
824
825 In the case of RIP, when the BFD session associated with a neighbor
826 fails, an expiration of the "timeout" timer for each route installed
827 from the neighbor (for which the neighbor is the next hop) should be
828 simulated.
829
830 Note that if a BFD session fails, and a route is received from that
831 neighbor with a next hop address that is not the address of the
832 neighbor itself, the route will linger until it naturally times out
833
834
835
836 <span class="grey">Katz &amp; Ward Standards Track [Page 15]</span></pre>
837 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
838 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
839
840
841 (after 180 seconds). However, if an implementation keeps track of
842 all of the routes received from each neighbor, all of the routes from
843 the neighbor corresponding to the failed BFD session should be timed
844 out, regardless of the next hop specified therein, and thereby
845 avoiding the lingering route problem.
846
847 <span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Security Considerations</span>
848
849 This specification does not raise any additional security issues
850 beyond those of the specifications referred to in the list of
851 normative references.
852
853 <span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. References</span>
854
855 <span class="h3"><a class="selflink" id="section-12.1" href="#section-12.1">12.1</a>. Normative References</span>
856
857 [<a id="ref-BFD">BFD</a>] Katz, D. and D. Ward, "Bidirectional Forwarding
858 Detection", <a href="./rfc5880">RFC 5880</a>, June 2010.
859
860 [<a id="ref-BFD-1HOP">BFD-1HOP</a>] Katz, D. and D. Ward,"Bidirectional Forwarding Detection
861 (BFD) for IPv4 and IPv6 (Single Hop)", <a href="./rfc5881">RFC 5881</a>, June
862 2010.
863
864 [<a id="ref-BFD-MPLS">BFD-MPLS</a>] Aggarwal, R., Kompella, K., Nadeau, T., and G. Swallow,
865 "Bidirectional Forwarding Detection (BFD) for MPLS Label
866 Switched Paths (LSPs)", <a href="./rfc5884">RFC 5884</a>, June 2010.
867
868 [<a id="ref-BFD-MULTI">BFD-MULTI</a>] Katz, D. and D. Ward, "Bidirectional Forwarding
869 Detection (BFD) for Multihop Paths", <a href="./rfc5883">RFC 5883</a>, June
870 2010.
871
872 [<a id="ref-KEYWORDS">KEYWORDS</a>] Bradner, S., "Key words for use in RFCs to Indicate
873 Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
874
875 <span class="h3"><a class="selflink" id="section-12.2" href="#section-12.2">12.2</a>. Informative References</span>
876
877 [<a id="ref-BGP">BGP</a>] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A
878 Border Gateway Protocol 4 (BGP-4)", <a href="./rfc4271">RFC 4271</a>, January
879 2006.
880
881 [<a id="ref-BGP-GRACE">BGP-GRACE</a>] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y.
882 Rekhter, "Graceful Restart Mechanism for BGP", <a href="./rfc4724">RFC 4724</a>,
883 January 2007.
884
885 [<a id="ref-DIFFSERV">DIFFSERV</a>] Nichols, K., Blake, S., Baker, F., and D. Black,
886 "Definition of the Differentiated Services Field (DS
887 Field) in the IPv4 and IPv6 Headers", <a href="./rfc2474">RFC 2474</a>, December
888 1998.
889
890
891
892 <span class="grey">Katz &amp; Ward Standards Track [Page 16]</span></pre>
893 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
894 <span class="grey"><a href="./rfc5882">RFC 5882</a> Generic Application of BFD June 2010</span>
895
896
897 [<a id="ref-ISIS">ISIS</a>] Callon, R., "Use of OSI IS-IS for routing in TCP/IP and
898 dual environments", <a href="./rfc1195">RFC 1195</a>, December 1990.
899
900 [<a id="ref-ISIS-GRACE">ISIS-GRACE</a>] Shand, M. and L. Ginsberg, "Restart Signaling for
901 IS-IS", <a href="./rfc5306">RFC 5306</a>, October 2008.
902
903 [<a id="ref-OSPFv2">OSPFv2</a>] Moy, J., "OSPF Version 2", STD 54, <a href="./rfc2328">RFC 2328</a>, April 1998.
904
905 [<a id="ref-OSPFv3">OSPFv3</a>] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF
906 for IPv6", <a href="./rfc5340">RFC 5340</a>, July 2008.
907
908 [<a id="ref-OSPF-GRACE">OSPF-GRACE</a>] Moy, J., Pillay-Esnault, P., and A. Lindem, "Graceful
909 OSPF Restart", <a href="./rfc3623">RFC 3623</a>, November 2003.
910
911 [<a id="ref-RIP">RIP</a>] Malkin, G., "RIP Version 2", STD 56, <a href="./rfc2453">RFC 2453</a>, November
912 1998.
913
914 Authors' Addresses
915
916 Dave Katz
917 Juniper Networks
918 1194 N. Mathilda Ave.
919 Sunnyvale, CA 94089-1206
920 USA
921
922 Phone: +1-408-745-2000
923 EMail: [email protected]
924
925
926 Dave Ward
927 Juniper Networks
928 1194 N. Mathilda Ave.
929 Sunnyvale, CA 94089-1206
930 USA
931
932 Phone: +1-408-745-2000
933 EMail: [email protected]
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948 Katz &amp; Ward Standards Track [Page 17]
949 </pre>