RFC 7726 PROPOSED STANDARD MPLS · BFD · FAULT DETECTION

BFD for MPLS LSPs: Clarifying Procedures for Establishing BFD Sessions for MPLS Label Switched Paths (LSPs)

Spells out how several BFD liveness sessions can run side by side on one MPLS path, and how they get cleaned up.

On rfc-editor.org ↗
PUBLISHED
January 2016
AUTHORS
V. Govindan, K. Rajaraman, G. Mirsky, N. Akiya, S. Aldrin
STREAM
IETF
BUILDS ON
RFC 5884 — BFD for MPLS LSPs
ADMINDOWN DIAGNOSTIC CODE
7
DOWN STATE VALUE
1
DOI
10.17487/RFC7726

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Internet Engineering Task Force (IETF)                       V. Govindan
Request for Comments: 7726                                  K. Rajaraman
Updates: 5884                                              Cisco Systems
Category: Standards Track                                      G. Mirsky
ISSN: 2070-1721                                                 Ericsson
                                                                N. Akiya
                                                     Big Switch Networks
                                                               S. Aldrin
                                                                  Google
                                                            January 2016


        Clarifying Procedures for Establishing BFD Sessions for
                    MPLS Label Switched Paths (LSPs)

Abstract

   This document clarifies the procedures for establishing, maintaining,
   and removing multiple, concurrent BFD (Bidirectional Forwarding
   Detection) sessions for a given <MPLS LSP, FEC> as described in RFC
   5884.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc7726.

Copyright Notice

   Copyright (c) 2016 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
   (http://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.

Table of Contents

   1.  Background  . . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   3
   2.  Theory of Operation . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Procedures for Establishment of Multiple BFD Sessions . .   3
     2.2.  Procedures for Maintenance of Multiple BFD Sessions . . .   4
     2.3.  Procedures for Removing BFD Sessions at the Egress LSR  .   4
     2.4.  Changing Discriminators for a BFD Session . . . . . . . .   5
   3.  Backwards Compatibility . . . . . . . . . . . . . . . . . . .   5
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   5.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     5.1.  Normative References  . . . . . . . . . . . . . . . . . .   6
     5.2.  Informative References  . . . . . . . . . . . . . . . . .   6
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   6
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   7

1.  Background

   [RFC5884] defines the procedures to bootstrap and maintain BFD
   sessions for an <MPLS LSP, FEC> using a Label Switched Path (LSP)
   ping.  While Section 4 of [RFC5884] specifies that multiple BFD
   sessions can be established for an <MPLS LSP, FEC> tuple, the
   procedures to bootstrap and maintain multiple BFD sessions
   concurrently over an <MPLS LSP, FEC> are not clearly specified.
   Additionally, the procedures of removing BFD sessions bootstrapped on
   the egress Label Switching Router (LSR) are unclear.  This document
   provides those clarifications without deviating from the principles
   outlined in [RFC5884].

   The ability for an ingress LSR to establish multiple BFD sessions for
   an <MPLS LSP, FEC> tuple is useful in scenarios such as LSPs based on
   Segment Routing [SEG-ROUTING] or LSPs having Equal-Cost Multipath
   (ECMP).  The process used by the ingress LSR to determine the number
   of BFD session(s) to be bootstrapped for an <MPLS LSP, FEC> tuple and
   the mechanism used to construct those session(s) are outside the
   scope of this document.

1.1.  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
   [RFC2119].

2.  Theory of Operation

2.1.  Procedures for Establishment of Multiple BFD Sessions

   Section 4 of [RFC5884] specifies the procedure for bootstrapping BFD
   sessions using LSP ping.  It further states that "a BFD session
   SHOULD be established for each alternate path that is discovered."
   This requirement has been the source of some ambiguity as the
   procedures of establishing concurrent, multiple sessions have not
   been explicitly specified.  This ambiguity can also be attributed in
   part to the text in Section 7 of [RFC5884] forbidding either end to
   change local discriminator values in BFD control packets after the
   session reaches the UP state.  The following procedures are described
   to clarify the ambiguity based on the interpretation of the authors'
   reading of the referenced sections:

   At the ingress LSR:

      MPLS LSP ping can be used to bootstrap multiple BFD sessions for a
      given <MPLS LSP, FEC>.  Each LSP ping MUST carry a different
      discriminator value in the BFD discriminator TLV [RFC5884].

   The egress LSR needs to perform the following:

      If the validation of the Forwarding Equivalence Class (FEC) in the
      MPLS Echo request message succeeds, check the discriminator
      specified in the BFD discriminator TLV of the MPLS Echo request.
      If there is no local session that corresponds to the (remote)
      discriminator received in the MPLS Echo request, a new session is
      bootstrapped and a local discriminator is allocated.  The
      validation of a FEC is a necessary condition to be satisfied to
      create a new BFD session at the egress LSR.  However, the policy
      or procedure, if any, to be applied by the egress LSR before
      allowing a new BFD session to be created is outside the scope of
      this document.  Such policies or procedures could consider
      availability of system resources before allowing a session to be
      created.  When the egress LSR disallows the creation of a BFD
      session due to policy, it MUST drop the MPLS Echo request message.

      Ensure the uniqueness of the <MPLS LSP, FEC, Remote Discriminator>
      tuple.

      Except for the clarification mentioned above, the remaining
      procedures of BFD session establishment are as specified in
      Sections 4-6 of [RFC5884].

2.2.  Procedures for Maintenance of Multiple BFD Sessions

   Both the ingress LSR and egress LSR use the Your Discriminator of the
   received BFD packet to demultiplex BFD sessions.

2.3.  Procedures for Removing BFD Sessions at the Egress LSR

   [RFC5884] does not specify an explicit procedure for deleting BFD
   sessions.  The procedure for removing a BFD session established by an
   out-of-band discriminator exchange using the MPLS LSP ping can
   improve resource management (e.g., memory), especially in scenarios
   involving thousands or more of such sessions.  A few observations are
   made here:

      The BFD session MAY be removed in the egress LSR if the BFD
      session transitions from UP to DOWN.  This can either be done
      immediately after the BFD session transitions from UP to DOWN or
      after the expiry of a configurable timer started after the BFD
      session state transitions from UP to DOWN at the egress LSR to
      reduce flapping by adding hysteresis.

      The BFD session on the egress LSR MAY be removed by the ingress
      LSR by using the BFD diagnostic code AdminDown(7) as specified in
      [RFC5880].  When the ingress LSR wants to remove a session without
      triggering any state change at the egress, it MAY transmit BFD
      packets indicating the State as Down(1), diagnostic code
      AdminDown(7) detectMultiplier number of times.  Upon receiving
      such a packet, the egress LSR MAY remove the BFD session, without
      triggering a change of state.

      The procedures to be followed at the egress LSR when BFD
      session(s) remain in the DOWN state for a significant amount of
      time is a local matter.  Such procedures are outside the scope of
      this document.

      All BFD sessions established with the FEC MUST be removed
      automatically if the FEC is removed.

      The egress MUST use the discriminators exchanged when the session
      was brought UP to indicate any session state change to the
      ingress.  The egress SHOULD reset this to zero after transmitting
      bfd.detectMult number of packets if the BFD session transitions to
      DOWN state.

2.4.  Changing Discriminators for a BFD Session

   The discriminators of a BFD session established over an MPLS LSP
   cannot be changed when it is in UP state.  The BFD session could be
   removed after a graceful transition to AdminDown state using the BFD
   diagnostic code AdminDown.  A new session could be established with a
   different discriminator.  The initiation of the transition from the
   UP to DOWN state can be done by either the ingress LSR or the egress
   LSR.

3.  Backwards Compatibility

   The procedures clarified by this document are fully backward
   compatible with an existing implementation of [RFC5884].  While the
   capability to bootstrap and maintain multiple BFD sessions may not be
   present in current implementations, the procedures outlined by this
   document can be implemented as a software upgrade without affecting
   existing sessions.  In particular, the egress LSR needs to support
   multiple BFD sessions per <MPLS LSP, FEC> before the ingress LSR is
   upgraded.

4.  Security Considerations

   This document clarifies the mechanism to bootstrap multiple BFD
   sessions per <MPLS LSP, FEC>.  BFD sessions, naturally, use system
   and network resources.  More BFD sessions means more resources will
   be used.  It is highly important to ensure that only a minimum number
   of BFD sessions are provisioned per FEC and that bootstrapped BFD
   sessions are properly deleted when they are no longer required.
   Additionally, security measures described in [RFC4379] and [RFC5884]
   are to be followed.

5.  References

5.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,
              <http://www.rfc-editor.org/info/rfc2119>.

   [RFC4379]  Kompella, K. and G. Swallow, "Detecting Multi-Protocol
              Label Switched (MPLS) Data Plane Failures", RFC 4379,
              DOI 10.17487/RFC4379, February 2006,
              <http://www.rfc-editor.org/info/rfc4379>.

   [RFC5880]  Katz, D. and D. Ward, "Bidirectional Forwarding Detection
              (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010,
              <http://www.rfc-editor.org/info/rfc5880>.

   [RFC5884]  Aggarwal, R., Kompella, K., Nadeau, T., and G. Swallow,
              "Bidirectional Forwarding Detection (BFD) for MPLS Label
              Switched Paths (LSPs)", RFC 5884, DOI 10.17487/RFC5884,
              June 2010, <http://www.rfc-editor.org/info/rfc5884>.

5.2.  Informative References

   [SEG-ROUTING]
              Filsfils, C., Ed., Previdi, S., Ed., Decraene, B.,
              Litkowski, S., and R. Shakir, "Segment Routing
              Architecture", Work in Progress, draft-ietf-spring-
              segment-routing-07, December 2015.

Acknowledgements

   The authors would like to thank Marc Binderberger for performing
   thorough reviews and providing valuable suggestions.

   The authors would like to thank Mudigonda Mallik, Rajaguru Veluchamy,
   and Carlos Pignataro of Cisco Systems for their review comments.

   The authors would like to thank Alvaro Retana and Scott Bradner for
   their review comments.

Authors' Addresses

   Vengada Prasad Govindan
   Cisco Systems

   Email: venggovi@cisco.com


   Kalyani Rajaraman
   Cisco Systems

   Email: kalyanir@cisco.com


   Gregory Mirsky
   Ericsson

   Email: gregory.mirsky@ericsson.com

   Nobo Akiya
   Big Switch Networks

   Email: nobo.akiya.dev@gmail.com


   Sam Aldrin
   Google

   Email: aldrin.ietf@gmail.com

AI ELI5

On this page
PROBLEMRFC 5884 says several BFD sessions can exist for one MPLS LSP and FEC, but it does not clearly say how to set up, keep or remove them at the same time.
MECHANISMEach LSP ping from the ingress carries a different discriminator, the egress creates a session per new discriminator, and sessions are told apart by the Your Discriminator field. Removal rules are added for the egress.
WHY IT MATTERSThe clarifications are backward compatible with RFC 5884 and can be deployed as a software upgrade. The RFC updates RFC 5884 and has not been obsoleted.

§1Background and Ambiguity in RFC 5884

RFC 5884 defines how to bootstrap and maintain BFD (Bidirectional Forwarding Detection) sessions for an <MPLS LSP, FEC> using an LSP ping. Section 4 of that RFC says multiple BFD sessions can be established for one such tuple, but the procedures for bootstrapping and maintaining them concurrently are not clearly specified. The procedures for removing sessions created on the egress Label Switching Router (LSR) are also unclear.

The RFC names two scenarios where several sessions are useful: LSPs based on Segment Routing and LSPs that use Equal-Cost Multipath (ECMP). How the ingress decides how many sessions to create, and how it builds them, is out of scope.

An older rulebook said you could have more than one check-in on a road, but it never explained how. This note fills in the missing steps.

§2.1Establishing Multiple BFD Sessions

RFC 5884 says a BFD session SHOULD be established for each alternate path that is discovered. The ambiguity comes partly from Section 7 of RFC 5884, which forbids either end from changing its local discriminator in BFD control packets once the session is UP. The authors describe the procedures below as their reading of those sections.

At the ingress LSR, MPLS LSP ping can bootstrap multiple BFD sessions for a given <MPLS LSP, FEC>. Each LSP ping MUST carry a different discriminator value in the BFD discriminator TLV.

At the egress LSR, if validation of the FEC in the MPLS Echo request succeeds, it checks the discriminator in the BFD discriminator TLV. If no local session corresponds to that remote discriminator, a new session is bootstrapped and a local discriminator is allocated. Successful FEC validation is necessary to create a session, but any further policy, such as checking system resources, is outside the scope. If policy disallows the session, the egress MUST drop the MPLS Echo request.

The egress must also keep the <MPLS LSP, FEC, Remote Discriminator> tuple unique. The rest of session establishment follows Sections 4 to 6 of RFC 5884.

Each check-in gets its own name tag. When a new name tag shows up, the other side starts a new check-in for it, unless it is too busy to take on more.

SESSION BOOTSTRAP FOR EACH DISCRIMINATOR (SIMPLIFIED, ILLUSTRATIVE)
Ingress LSREgress LSR
  1. MPLS Echo requestCarries a BFD discriminator TLV with a different discriminator for each session.
  2. BFD control packetsA new session with its own local discriminator is created if FEC validation succeeds and policy allows.

§2.2Maintaining Sessions with Your Discriminator

Once several sessions are running, both the ingress and the egress LSR use the Your Discriminator field of each received BFD packet to demultiplex the sessions, meaning to decide which session the packet belongs to.

Every message has the name tag of the check-in it belongs to, so each side knows which conversation to put it in.

§2.3Removing Sessions at the Egress

RFC 5884 gives no explicit procedure for deleting BFD sessions. Removing sessions created by out-of-band discriminator exchange through LSP ping can help resource management, for example memory, when thousands of such sessions exist. The RFC makes several observations.

  • The egress MAY remove a session when it moves from UP to DOWN, either immediately or after a configurable timer that adds hysteresis to reduce flapping.
  • The ingress MAY remove a session on the egress by sending the diagnostic code AdminDown(7) from RFC 5880. To avoid triggering a state change at the egress, it MAY send BFD packets with State Down(1) and diagnostic AdminDown(7) detectMultiplier times, after which the egress MAY remove the session without a state change.
  • What the egress does when sessions stay DOWN for a long time is a local matter.
  • All BFD sessions established with a FEC MUST be removed automatically if the FEC is removed.
  • The egress MUST use the discriminators exchanged when the session came UP to signal any state change, and SHOULD reset them to zero after sending bfd.detectMult packets if the session goes DOWN.

Old check-ins that nobody needs should be tidied away so they do not clog up memory. Either side can say goodbye politely, and if the road itself is closed, all its check-ins go too.

§2.4Changing Discriminators

The discriminators of a BFD session over an MPLS LSP cannot be changed while it is UP. To use different ones, the session can be removed after a graceful transition to AdminDown using the AdminDown diagnostic code, and a new session established with a different discriminator. Either the ingress or the egress LSR can start the UP to DOWN transition.

You cannot swap a check-in's name tag in the middle of it. You end it nicely and start a new one with a new tag.

§3Backwards Compatibility

The clarified procedures are fully backward compatible with existing implementations of RFC 5884. Current implementations may lack the ability to bootstrap and maintain multiple sessions, but the procedures can be added as a software upgrade without affecting existing sessions. The egress LSR needs to support multiple BFD sessions per <MPLS LSP, FEC> before the ingress LSR is upgraded.

Nothing that already works breaks. Upgrade the receiving side first, then the sending side.

§4Security Considerations

BFD sessions use system and network resources, and more sessions use more. The RFC says it is highly important to provision only the minimum number of sessions per FEC and to delete bootstrapped sessions properly when they are no longer required. The security measures in RFC 4379 and RFC 5884 are still to be followed.

Too many check-ins waste effort, so only make as many as you need and clean them up afterwards.

§8References