<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
	<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
	<!ENTITY rfc5880 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5880.xml">
	<!ENTITY rfc5881 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5881.xml">
	<!ENTITY rfc5882 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5882.xml">
	<!ENTITY rfc7042 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7042.xml">
]>

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle="yes"?>
<rfc submissionType="IETF" category="std" consensus="yes" number="7130" ipr="trust200902">
  <front>
    <title abbrev="BFD for LAG Interfaces">Bidirectional Forwarding Detection
    (BFD) on Link&nbsp;Aggregation&nbsp;Group&nbsp;(LAG)&nbsp;Interfaces</title>
   

    <author fullname="Manav Bhatia" initials="M." surname="Bhatia"
	role="editor">
      <organization>Alcatel-Lucent</organization>
      <address>
        <postal>
          <street></street>
          <city>Bangalore</city>
          <code>560045</code>
          <country>India</country>
        </postal>
        <email>manav.bhatia@alcatel-lucent.com</email>
      </address>
    </author>

    <author fullname="Mach (Guoyi) Chen" initials="M." surname="Chen"
	role="editor">
      <organization>Huawei Technologies</organization>
      <address>
        <postal>
          <street>Q14 Huawei Campus, No. 156 Beiqing Road, Hai-dian
          District</street>
          <city>Beijing</city>
          <code>100095</code>
          <country>China</country>
        </postal>
        <email>mach@huawei.com</email>
      </address>
    </author>

    <author fullname="Sami Boutros" initials="S." surname="Boutros"
	role="editor">
      <organization>Cisco Systems</organization>
      <address>
        <email>sboutros@cisco.com</email>
      </address>
    </author>

    <author fullname="Marc Binderberger" initials="M." surname="Binderberger"
	role="editor">
      <organization>Cisco Systems</organization>
      <address>
        <email>mbinderb@cisco.com</email>
      </address>
    </author>

    <author fullname="Jeffrey Haas" initials="J." surname="Haas"
	role="editor">
      <organization>Juniper Networks</organization>
      <address>
        <email>jhaas@juniper.net</email>
      </address>
    </author>
    <date  month="February" year="2014" />

<!-- [rfced] Please insert any keywords (beyond those that appear in 
the title) for use on http://www.rfc-editor.org/search/rfc_search.php.
-->

<keyword>example</keyword>

<!-- [rfced] Please note that we have updated occurrences of "load
balance" to "load-balancing" as this is the form we see most
frequently in attributive position.  Please let us know any
objections.

-->



    <abstract>
   <t>This document defines a mechanism to run Bidirectional Forwarding Detection (BFD) on Link Aggregation
   Group (LAG) interfaces.  It does so by running an independent
   Asynchronous mode BFD session on every LAG member link.</t>

   <t>This mechanism allows the verification of member link continuity,
   either in combination with, or in absence of,
   Link Aggregation Control Protocol (LACP).  It provides a
   shorter detection time
   than what LACP offers.  The continuity check can also cover
   elements of Layer 3 (L3) bidirectional forwarding.</t>

    </abstract>
  </front>

  <middle>
    <section title="Introduction">
   <t>The Bidirectional Forwarding Detection (BFD) protocol 
   <xref target="RFC5880" />
   provides a mechanism to detect faults in the bidirectional path
   between two forwarding engines, including interfaces, data links,
   and to the extent possible the forwarding engines themselves, with
   potentially very low latency. The BFD protocol also provides a fast 
   mechanism for detecting communication failures on any data links and 
   the protocol can run over any media and at any protocol layer.</t>

   <t>LAG, as defined in
   <xref target="IEEE802.1AX" />, provides 
   mechanisms to combine multiple physical links into a single logical 
   link. This logical link provides higher bandwidth 
   and better resiliency, because if one of the physical member 
   links fails, the aggregate logical link can continue to forward traffic 
   over the remaining operational physical member links.</t>

   <t>Currently, the Link Aggregation Control Protocol (LACP) is
   used to detect 
   failures on a per-physical-member link. However, the use of BFD for 
   failure detection would (1) provide a faster detection, (2) provide 
   detection in the absence of LACP, and (3) would be able to verify the
   ability for each member link to be able to forward L3 packets.</t>

   <t>Running a single BFD session over the aggregation without 
   internal knowledge of the member links would 
   make it impossible for BFD to guarantee detection of the physical 
   member link failures.</t>

   <t>The goal is to verify link Continuity for every member link.
   This corresponds to <xref target="RFC5882" />, Section 7.3.</t>

   <t>The approach taken in this document is to run an Asynchronous mode BFD
   session over each LAG member link and make BFD control whether the
   LAG member link should be part of the L2 load-balancing table of the
   LAG interface in the presence or the absence of LACP.</t>

   <t>This document describes how to establish an Asynchronous mode BFD
   session per physical LAG member link of the LAG interface.</t>

   <t>While there are native Ethernet mechanisms to detect failures
   (802.1ax, .3ah) that could be used for LAG, the solution defined in
   this document enables operators who have already deployed BFD over
   different technologies (e.g., IP, MPLS) to use a common failure
   detection mechanism.</t>

    <section title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </section>
    </section>

    <section title="BFD on LAG Member Links">
   <t>The mechanism defined for a fast detection of LAG member link 
   failure is to run Asynchronous mode BFD sessions on every LAG member link.
   We call these per-LAG-member-link BFD sessions "micro-BFD sessions" in
   the remainder of this document.</t>

      <section title="Micro-BFD Session Address Family">
   <t>Member link micro-BFD sessions, when using IP/UDP encapsulation,
   can use IPv4 or IPv6 addresses. Two micro-BFD sessions MAY exist per
   member link: one IPv4 another IPv6. When an address family is
   used on one member link, then it MUST be used on all member links of
   the particular LAG.</t>
      </section>

      <section title="Micro-BFD Session Negotiation">
   <t>A single micro-BFD session for every enabled address family
   runs on each member link of the LAG.
   The micro-BFD session's negotiation MUST follow the same procedures 
   defined in <xref target="RFC5880" /> and
   <xref target="RFC5881" />.</t>

   <t>Only Asynchronous mode BFD is considered in this document; the use of
   the BFD echo function is outside the scope of this document.  At least
   one system MUST take the Active role (possibly both).  The micro-BFD
   sessions on the member links are independent BFD sessions.  They use
   their own unique local discriminator values, maintain their own set of
   state variables, and have their own independent state machines.  Timer
   values MAY be different, even among the micro-BFD sessions belonging to
   the same aggregation, although it is expected that micro-BFD
   sessions belonging to the same aggregation will use the same timer
   values.</t>

   <t>The demultiplexing of a received BFD packet is solely based on the Your
   Discriminator field, if this field is nonzero.  For the initial Down
   BFD packets of a BFD session, this value MAY be zero.  In this case,
   demultiplexing MUST be based on some combination of other fields
   that MUST include the interface information of the member link
   and the destination UDP port of the received BFD packet.</t>

   <t>The procedure for the reception of BFD control packets in 
   Section 6.8.6 of <xref target="RFC5880" /> is amended as follows
   for per-LAG-member-link micro-BFD sessions: 
<list style="empty"><t>If the Your Discriminator
   field is nonzero and a micro-BFD over a LAG session is found, the interface
   on which the micro-BFD control packet arrived MUST correspond to the
   interface associated with that session.</t></list></t>


   <t>This document defines the BFD control packets for each micro
   BFD session to be IP/UDP encapsulated as defined in
   <xref target="RFC5881" />, but with a new UDP 
   destination port 6784.</t>
   
   <t>The new UDP port removes the ambiguity of BFD over LAG packets
   from BFD over single-hop IP.  An example is (mis-)configuring a LAG with
   micro-BFD sessions on one side but using a <xref target="RFC5881" />
   BFD session for the LAG (treated as a single interface) on the opposite
   side.</t>

   <t>The procedures in this document MUST be used for BFD messages
   addressed to port 6784 and MUST NOT be used for others ports
   assigned in RFCs describing other BFD modes.</t>

   <t>Control packets use a destination IP address that is configured
   on the peer system and can be reached via the LAG interface. 
   Implementations may range from explicitly configuring IP addresses
   for the BFD sessions
   to out-of-band methods for learning the destination IP address.
   The details are outside the scope of this document.</t>
      </section>

      <section title="Micro-BFD Session Ethernet Details">
   <t>On Ethernet-based LAG member links, the destination Media Access Control (MAC) is the
   dedicated multicast MAC address 01-00-5E-90-00-01
   to be the immediate next hop.
   This dedicated MAC address MUST be used for the initial BFD
   packets of a micro-BFD session when in the Down/AdminDown and Init states.
   When a micro-BFD session is changing into the Up state, the first
   bfd.DetectMult packets in the Up state MUST be sent with the dedicated
   MAC. For BFD packets in the Up state following the first bfd.DetectMult
   packets, the source MAC address from the received BFD packets for the
   session MAY be used instead of the dedicated MAC.</t>

<!--[rfced] Please consider how to clarify "For the following BFD
packets with Up state".  Perhaps adding some indentation to the text
following?  Otherwise, perhaps rewording this phrase could be
beneficial for the ease of the reader.

-->

   <t>All implementations MUST be able to send and receive BFD packets
   in Up state using the dedicated MAC address. Implementations
   supporting both, sending BFD Up packets with the dedicated and the
   received MAC, need to offer means to control the behaviour.</t>

   <t>On Ethernet-based LAG member links, the source MAC SHOULD be the MAC
   address of the member link transmitting the packet.</t>

   <t>This mechanism helps to reduce the use of additional MAC addresses,
   which reduces the required resources on the Ethernet hardware on the
   receiving member link.</t>

   <t>Micro-BFD packets SHOULD always be sent untagged. However, when
   the LAG is operating in the context of IEEE 802.1q or IEEE 802.qinq,
   the micro-BFD packets may either be untagged or be sent with a vlan
   tag of Zero (802.1p priority tagged).
   Implementations compliant with this standard MUST be able to
   receive both untagged and 802.1p priority tagged micro-BFD packets.</t>
      </section>     
	</section>

   <section title="Interaction between LAG and BFD">
   <t>The micro-BFD sessions for a particular LAG member link MUST be 
   requested when a member link state is either Distributing or Standby.
   The sessions MUST be deleted when the member link is in neither 
   Distributing nor Standby state anymore.</t>

   <t>BFD is used to control if the load-balancing algorithm is able to
   select a particular LAG member link. In other words, even when
   Link Aggregation Control Protocol (LACP) is used
   and considers the member link to be ready to forward traffic, the member
   link MUST NOT be used by the load balancer until all the micro-BFD
   sessions of the particular member link are in Up state.</t>

   <t>In case an implementation has separate load-balancing tables for
   IPv4 and IPv6 and if both an IPv4 and IPv6 micro-BFD session exist for
   a member link, then an implementation MAY enable the member link in the
   load-balancing algorithm based on the BFD session with a matching
   address family alone.</t>

   <t>An exception is the BFD packet itself. Implementations MAY
   receive and transmit BFD packets via the Aggregator's MAC service
   interface, independent of the session state.</t>

   </section>

    <section title="BFD on LAG Member Links and L3 Applications">
	<t>The mechanism described in this document is likely to be used
	by modules managing Interfaces or LAGs and, thus,
        managing the member links of a LAG. Typical
	L3 protocols like OSPF do not have an insight into the LAG and
	treat it as one bigger interface. The signaling from micro
	sessions to L3 protocols is effectively done by the impact of
	micro-BFD sessions on the load-balancing table and the Interface/LAG
        managing module's
	potential decision to shut down the LAG. An active method to test
	the impact of micro-BFD sessions is for L3 protocols to request
	a single BFD session per LAG.</t>
	</section>



    <section title="Detecting a Member Link Failure">
    <t>When a micro-BFD session goes down, this member link 
    MUST be taken out of the LAG load-balancing table(s).</t>

	<t>In case an implementation has separate load-balancing tables for
	IPv4 and IPv6, then if both an IPv4 and IPv6 micro-BFD session exist for
	a member link, an implementation MAY remove the member link only
        from the load-balancing table that matches the address family of
        the failing BFD session. For example, the IPv4 micro-BFD session
        fails but the IPv6 micro-BFD session stays Up, then the member link
        MAY be removed from only the IPv4 load balance table; the link
        MAY remain in the IPv6 load-balancing table. Alternatively,
        the member link may be removed from both the IPv4 and IPv6
        load-balancing tables. This decision is an implementation
        detail.</t>
    </section>

    <section title="Security Considerations">
    <t>This document does not introduce any additional security issues and
    the security mechanisms defined in 
    <xref target="RFC5880" /> apply in this document.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">

    <t>IANA assigned a dedicated MAC address 01-00-5E-90-00-01
    (see <xref target="RFC7042" />) as well
    as UDP port 6784 for Bidirectional Forwarding Detection (BFD)
    on Link Aggregation Group (LAG) Interfaces.
    IANA has changed the reference to [RFC7130].</t>

    <t>IANA has changed the registry for port 6784 to show
    the Assignee as [IESG] and the Contact as [BFD_Chairs]. The expansion
    of [BFD_Chairs] is shown as
    "mailto:bfd-chairs@tools.ietf.org".
    IANA has changed the reference to [RFC7130].</t>
    </section>

   <section anchor="Acknowledgements" title="Acknowledgements">
    <t>We would like to thank Dave Katz, Alexander Vainshtein,
    Greg Mirsky, and Jeff Tantsura for their comments.</t>

    <t>The initial event to start the current discussion was the
    distribution of "Bidirectional Forwarding Detection (BFD) for Interface" (July 2011).</t>
    </section>

	<section title="Contributing Authors">

    <t>Paul Hitchen
    <vspace blankLines="0" />
	BT
    <vspace blankLines="0" />
    EMail: paul.hitchen@bt.com</t>

	<t>George Swallow
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    EMail: swallow@cisco.com</t>

	<t>Wim Henderickx
    <vspace blankLines="0" />
	Alcatel-Lucent
    <vspace blankLines="0" />
    EMail: wim.henderickx@alcatel-lucent.com</t>

	<t>Nobo Akiya
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    EMail: nobo@cisco.com</t>

	<t>Neil Ketley
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    EMail: nketley@cisco.com</t>

	<t>Carlos Pignataro
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    EMail: cpignata@cisco.com</t>

	<t>Nitin Bahadur
    <vspace blankLines="0" />
        Bracket Computing
    <vspace blankLines="0" />
    EMail: nitin@brkt.com</t>

	<t>Zuliang Wang
    <vspace blankLines="0" />
	Huawei Technologies
    <vspace blankLines="0" />
    EMail: liang_tsing@huawei.com</t>

	<t>Liang Guo
    <vspace blankLines="0" />
	China Telecom
    <vspace blankLines="0" />
    EMail: guoliang@gsta.com</t>

	<t>Jeff Tantsura
    <vspace blankLines="0" />
	Ericsson
    <vspace blankLines="0" />
    EMail: jeff.tantsura@ericsson.com</t>

	</section>
  </middle>

  <back>
    <references title="Normative References">
      &rfc2119;
      &rfc5880;
      &rfc5881;
	  &rfc5882;
    </references>

    <references title="Informative References">
      &rfc7042;

      <reference anchor="IEEE802.1AX">
        <front>
          <title>IEEE Standard for Local and metropolitan area
		  networks - Link Aggregation
          </title>
		  <author> <organization>IEEE Std. 802.1AX</organization> </author>
          <date month="November" year="2008" />
        </front>
      </reference>

    </references>

    <!-- XXX JMH - this section does not use the hyphenated micro-bfd as is used elsewhre in the document -->
   <section title="Considerations When Using BFD on Member Links">
   <t>If the BFD-over-LAG feature were provisioned on an aggregated link
   member after the link was already active within a LAG, BFD session state
   should not influence the load-balancing algorithm until the BFD session
   state transitions to Up.
   If the BFD session never transitions to Up but the LAG becomes
   inactive, the previously documented procedures would then normally
   apply.</t>

   <t>This procedure ensures that the sequence of events -- enabling
   the LAG and enabling BFD on the LAG -- has no impact on the
   forwarding service.</t>

   <t>If the BFD-over-LAG feature were deprovisioned on an aggregate link
   member while the associated micro-BFD session was in Up state, BFD
   should transition its state to AdminDown and should attempt to
   communicate this state change to the peer.</t>

   <t>If the local or the remote state of a micro-BFD session is
   AdminDown, the system should not indicate a connectivity failure to
   any client and should not remove the particular LAG member link from
   forwarding. This behaviour is independent from the use of
   Link Aggregation Control Protocol (LACP) for the LAG.</t>

   <t>When traffic is forwarded across a link while the corresponding
   micro-BFD session is not in Up state, an implementation may use a
   configurable timeout value after which the BFD session must have
   reached Up state otherwise the link is taken out of forwarding.</t>

   <t>When such timeout values exist, the configuration
   must allow the ability to turn off the timeout function.</t>

   <t>The configurable timeout value shall ensure that a LAG is not
   remaining forever in an "inconsistent" state where forwarding occurs
   on a link with no confirmation from the micro-BFD session that the
   link is healthy.</t>

   <t>Note that if one device is not operating a micro-BFD session on
   a link, while the other device is and perceives the session to be
   Down, this will result in the two devices having a different view
   of the status of the link. This would likely lead to traffic loss
   across the LAG. The use of another protocol to bootstrap BFD can
   detect such mismatched config, since the side that's not configured
   can send a rejection error. Such bootstrapping mechanisms are outside
   the scope of this document.</t>

		</section>

  </back>
</rfc>
