Internet Engineering Task Force N. Akiya Internet-Draft C. Pignataro Updates: 5880 (if approved) D. Ward Intended status: Standards Track Cisco Systems Expires: December14,28, 2014 M. BhatiaAlcatel-LucentIonos Networks P. K. Santosh Juniper Networks June12,26, 2014 Seamless Bidirectional Forwarding Detection (S-BFD)draft-ietf-bfd-seamless-base-00draft-ietf-bfd-seamless-base-01 Abstract This document defines a simplified mechanism to use Bidirectional Forwarding Detection (BFD) with large portions of negotiation aspects eliminated, thus providing benefits such as quick provisioning as well as improved control and flexibility to network nodes initiating the path monitoring. This document updates RFC5880. Requirements Language 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 RFC 2119 [RFC2119]. Status of This Memo 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 http://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 December14,28, 2014. Copyright Notice Copyright (c) 2014 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. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2.Seamless BFD OverviewTerminology . . . . . . . . . . . . . . . . . . . .3 3. Terminology. . . . . 3 3. Seamless BFD Overview . . . . . . . . . . . . . . . . . . . . 4 4.BFD Target Identifier Types . . . . . . . . . . . . . . . . . 5 5.S-BFD UDP Port . . . . . . . . . . . . . . . . . . . . . . .. . .56.5. S-BFD Discriminators . . . . . . . . . . . . . . . . . . . . 57.6. Reflector BFD Session . . . . . . . . . . . . . . . . . . . .7 8.6 7. State Variables . . . . . . . . . . . . . . . . . . . . . . . 78.1.7.1. New State Variables . . . . . . . . . . . . . . . . . . . 78.2.7.2. State Variable Initialization and Maintenance . . . . . .8 9. Full Reachability Validations . . . .7 8. S-BFD Procedures . . . . . . . . . . . .8 9.1. Initiator Behavior. . . . . . . . . . 7 8.1. Initiator Procedures . . . . . . . . .8 9.1.1. Initiator State machine. . . . . . . . . 7 8.1.1. SBFDInitiator State Machine . . . . . .9 9.2. Responder Behavior. . . . . . . 8 8.1.2. Details of S-BFD Packet Sent by SBFDInitiator . . . . 9 8.2. Responder Procedures . . . . . . . .10 9.2.1. Responder Demultiplexing. . . . . . . . . . 9 8.2.1. Responder Demultiplexing . . . .10 9.2.2. Reflector BFD Session Procedures. . . . . . . . . . 109.3. Further Packet8.2.2. Details of S-BFD Packet Sent by SBFDReflector . . . .. . . . . . . . . . . . . 12 9.4.10 8.3. Diagnostic Values . . . . . . . . . . . . . . . . . . . .12 9.5.10 8.4. The Poll Sequence . . . . . . . . . . . . . . . . . . . .13 9.6.11 8.5. Control Plane Independent (C) . . . . . . . . . . . . . .13 9.7.11 8.6. AdditionalInitiator Behavior . . .SBFDInitiator Behaviors . . . . . . . . . . .13 9.8.11 8.7. AdditionalResponder Behavior . .SBFDReflector Behaviors . . . . . . . . . . .. 13 10. Partial Reachability Validations . . . . . . . . . . . . . . 14 11.12 9. Scaling Aspect . . . . . . . . . . . . . . . . . . . . . . .14 12.12 10. Co-existence with Traditional BFD . . . . . . . . . . . . . .15 13.12 11. BFD Echo . . . . . . . . . . . . . . . . . . . . . . . . . .15 14.12 12. Security Considerations . . . . . . . . . . . . . . . . . . .15 15.13 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . .16 16.14 14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . .16 17.14 15. Contributing Authors . . . . . . . . . . . . . . . . . . . .16 18.14 16. References . . . . . . . . . . . . . . . . . . . . . . . . .17 18.1.15 16.1. Normative References . . . . . . . . . . . . . . . . . .17 18.2.15 16.2. Informative References . . . . . . . . . . . . . . . . .1715 Appendix A. Loop Problem . . . . . . . . . . . . . . . . . . . .1816 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .1917 1. Introduction Bidirectional Forwarding Detection (BFD), [RFC5880] and related documents, has efficiently generalized the failure detection mechanism for multiple protocols and applications. There are some improvements which can be made to better fit existing technologies. There is a possibility of evolving BFD to better fit new technologies. This document focuses on several aspects of BFD in order to further improve efficiency, to expand failure detection coverage and to allow BFD usage for wider scenarios. This document extends BFD to provide solutions to use cases listed in [I-D.ietf-bfd-seamless-use-case].Because definedOne key aspect of the mechanism described in this document eliminatesmuch of negotiation aspects ofthe time between a network node wanting to perform a connectivity test and completing the connectivity test. In traditional BFD terms, the initial state changes from DOWN to UP is virtually nonexistent. Removal of this seam (i.e. time delay) in BFDprotocol,provides applications a smooth and continuous operational experience. Therefore, "Seamless BFD" (S-BFD) has been chosen as the name for this mechanism. 2.Seamless BFD Overview EachTerminology The reader is expected to be familiar with the BFD, IP and MPLS terminologies and protocolinstance (e.g. OSPF/IS-IS) allocates one or more BFD discriminators on its network node, ensuring thatconstructs. This section describes several new terminologies introduced by S-BFD. o S-BFD - Seamless BFD. o S-BFD packet - a BFDdiscriminators allocated are unique withincontrol packet on the well-known S-BFD port. o Entity - a function on a networkdomain. Allocated BFD discriminators may be advertised by the protocol. Required result isnode thata protocol possess the knowledge of mapping betweenS-BFD mechanism allows remote networktargetsnodes toBFD discriminators. Eachperform connectivity test to. An entity can be abstract (ex: reachability) or specific (ex: IP addresses, router-IDs, functions). o SBFDInitiator - an S-BFD session on a networknodes will also createnode that performs aBFDconnectivity test to a remote entity by sending S-BFD packets. o SBFDReflector - an S-BFD sessioninstanceon a network node that listens for incomingBFD controlS-BFD packetswith "your discriminator" having protocol allocated values. The listener BFD session instance, upon receiving a BFD control packet targetedtoone oflocal entities and generates response S-BFD packets. o Reflector BFD session - synonymous with SBFDReflector. o S-BFD discriminatorvalues, will transmit- aresponseBFDcontrol packet back to the sender. Once above setupdiscriminator allocated for a local entity and iscomplete, any network node, understanding the mapping between network targets to BFD discriminators, can quickly perform reachability check to these network targetsbeing listened bysimply sendingan SBFDReflector. o BFDcontrol packets with knowndiscriminator - a BFD discriminatorvalue as "your discriminator". For example: <------- IS-IS Network -------> +---------+allocated for an SBFDInitiator. o Initiator - a network node hosting an SBFDInitiator. o Responder - a network node hosting an SBFDReflector. Below figure describes the relationship between S-BFD terminologies. +---------------------+ +---------------------+ | Initiator |A---------B---------C---------D ^ ^| Responder |SystemID SystemID xxx yyy BFD Discrim BFD Discrim 123 456 Figure 1:| +-----------------+ | | +-----------------+ | | | SBFDInitiator |--- S-BFDfor IS-IS Network IS-IS withpacket -->| SBFDReflector | | | | +-------------+ | | | | +-------------+ | | | | | BFD discrim | | | | | |S-BFD discrim| | | | | +-------------+ |<-- S-BFD packet ---| +----------^--+ | | | +-----------------+ | | +------------|----+ | | | | | | | | | +---v----+ | | | | | Entity | | | | | +--------+ | +---------------------+ +---------------------+ Figure 1: S-BFD Terminology Relationship 3. Seamless BFD Overview An S-BFD module on each network node allocates one or more S-BFD discriminators for local entities, and creates a reflector BFD session. Allocated S-BFD discriminators may be advertised by applications (ex: OSPF/IS-IS). Required result is that applications, on other network nodes, possess the knowledge of the mapping from remote entities to S-BFD discriminators. The reflector BFD session is to, upon receiving an S-BFD packet targeted to one of local S-BFD discriminator values, transmit a response S-BFD packet back to the initiator. Once above setup is complete, any network nodes, having the knowledge of the mapping from a remote entity to an S-BFD discriminator, can quickly perform a connectivity test to the remote entity by simply sending S-BFD packets with corresponding S-BFD discriminator value in the "your discriminator" field. For example: <------- IS-IS Network -------> +---------+ | | A---------B---------C---------D ^ ^ | | SystemID SystemID xxxallocatesyyy BFD Discrim BFD Discrim 123 456 Figure 2: S-BFD for IS-IS Network The IS-IS with SystemID xxx (node A) allocates an S-BFD discriminator 123, and advertises theBFDS-BFD discriminator 123 in an IS-IS TLV. The IS-IS with SystemID yyy (node D) allocatesBFDan S-BFD discriminator 456, and advertises theBFDS-BFD discriminator 456 in an IS-IS TLV.BothA reflector BFD session is created on both network nodes (node A and nodeD) creates listener BFD session instance.D). When network node A wants to checka reachabilitythe connectivity to network node D, node A can senda BFD controlan S-BFD packet, destined to node D, with "your discriminator" field setasto 456.If listenerWhen the reflector BFD session on node D receives thisBFD controlS-BFD packet, then responseBFD controlS-BFD packet is sent back to node A, which allows node A to complete thereachabilityconnectivity test.Note that4. S-BFD UDP Port S-BFD functions on aprotocolwell-known UDP port: TBD1. 5. S-BFD Discriminators Locally allocated S-BFD discriminator values for entities maycreate an explicit mapping between abe arbitrary allocated or derived from values provided by applications. These values may be protocolID (e.g.IDs (ex: System-ID, Router-ID)to a BFD discriminator. A protocol may also create an explicit mapping between aor networktarget (e.g.targets (ex: IPaddress) to a BFD discriminator. A protocol may even function with implicit mappingaddress). To minimize the collision of discriminator values betweena network target (e.g. IPv4 address) to aBFDdiscriminator, i.e. IPv4 addressand S-BFD, it isused as BFDRECOMMENDED that discriminatorvalue. Decisionspool be separate for BFD andrules on how protocols allocateS-BFD. Even when employing the separate discriminator pool approach, collision is still possible between one S-BFD application to another S-BFD application, that may be using different values anddistribute BFD discriminatorsalgorithms to derive S-BFD discriminator values. If the two applications are using S-BFD for a same purpose (ex: network reachability), then the colliding S-BFD discriminator value can be shared. If the two applications are using S-BFD for a different purpose, then the collision must be addressed. How such collisions are addressed is outside the scope of this document.3. Terminology The readerOne important characteristics of an S-BFD discriminator isexpected to be familiar with the BFD, IP, MPLS and SR terminology and protocol constructs. This section describes several new terminology introduced by Seamless BFD. o BFD Target Identifier: Network entitythatis provisioned asit MUST be unique within an administrative domain. If multiple network nodes allocated atarget of Seamless BFD. o BFD Target Identifier Type: Type ofsame S-BFD discriminator value, then S-BFD packets falsely terminating on a wrong networkentity that is provisioned asnode can result in atarget of Seamless BFD. o BFD Target Identifier Table: A table containing BFD target identifier type, BFD target identifier and corresponding BFD discriminator. o Reflector BFD Session: Areflector BFD sessionlisteningto generate a response back, due to "your discriminator" matching. This is clearly not desirable. If only IP based S-BFD is considered, then it is possible forincomingthe reflector BFDcontrolsession to require demultiplexing of incoming S-BFD packetsdestined forwith combination of destination IP address and "your discriminator". Then S-BFD discriminator only has to be unique within a localBFD target identifier(s). 4. BFD Target Identifier Types This document definesnode. However, S-BFD is a generic mechanismwhere network nodes can send BFD control packets to specific network targets to perform various tasks. One task isdefined toperform a reachability check (i.e requesting immediate response back). Detailsrun on wide range ofthis task is further defined in sectionsenvironments: IP, MPLS, etc. For other transports like MPLS, because of the need tofollow. Further tasks (i.e. usinguse non-routable IP destination address, it is not possible for reflector BFDcontrol packetsession torequest specific services from specific network nodes)demultiplex using IP destination address. With PHP, there may not bedefined. Therefore, this document definesany incoming label stack to aid in demultiplexing either. Thus, S-BFD imposes acode point for BFD Target Identifier. Each locally allocatedrequirement that S-BFDdiscriminatordiscriminators MUST beassociated tounique within an administrative domain. 6. Reflector BFDTarget Identifier type, to allow demultiplexing to a specific taskSession Each network node creates one orservice.more reflector BFDTarget Identifier types: Value BFD Target Identifier Type ------ -------------------------- 0 Reserved 1 Network Target Discriminator Procedures definedsessions. This reflector BFD session is a session which transmits S-BFD packets inthis document areresponse tobe associatedreceived S-BFD packets withBFD Target Identifier Type 1 (Network Target Discriminator). Note that IP based BFD from [RFC5885] is supported by"your discriminator" having S-BFD discriminators allocated for local entities. Specifically, thisspecification, but non-IP basedreflector BFD session isoutside the scope of this document. Further identifier types aretobe defined as needed basis. 5. UDP Porthave following characteristics: o MUST NOT transmit any S-BFDfunctionspackets based ona well-known UDP port: TBD1. 6. S-BFD Discriminators Protocols (i.e. client of S-BFD) may requestlocal timer expiry. o MUST transmit anarbitrary BFD discriminator value, or protocols may request a specific BFD discriminator value. Therefore, it is RECOMMENDED for implementationsS-BFD packet in response tocreateaseparate discriminator pool forreceived S-BFDsessions to minimize the collision between existing BFD sessions andpacket having a valid S-BFDsessions. In such case, incoming BFD control packets MUST be demultiplexed first with UDP port to identify thediscriminatortable to look up the session. Regardless ofin theapproach, collision can happen with following scenarios."your discriminator" field, unless prohibited by local policies (ex: administrative, security, rate-limiter, etc). oExistingMUST be capable of sending only two states: UP and ADMINDOWN. One reflector BFD sessionalready using a discriminator value that collides with specific discriminator value requestedmay be responsible for handling received S-BFDsession. * Implementation SHOULD allow migrating existingpackets targeted to all locally allocated S-BFD discriminators, or few reflector BFD sessionsto free up the discriminator to accommodate specific discriminator value requestedmay each be responsible for subset of locally allocated S-BFDsession. o S-BFD session already usingdiscriminators. This policy is adiscriminator value, arbitrarily allocated,local matter, and is outside the scope of this document. Note thatcollides with specific discriminator value requested forincoming S-BFDsession. The twopackets may be IPv4, IPv6 or MPLS based. How such S-BFDsessions are of differentpackets reach an appropriate reflector BFDTarget Identifier type. * Protocol requesting arbitrary discriminator value MUST support migrating to another discriminator value,session is also a local matter, andimplementations MUST allow migrating existing S-BFD sessions to free upis outside thediscriminator to accommodate specific discriminator value requested for S-BFD session. o S-BFD session already using a discriminator value, arbitrary allocated, that collides with specific discriminator value requested for S-BFD session. The twoscope of this document. 7. State Variables S-BFDsessions areintroduces new state variables, and modifies the usage ofsame BFD Target Identifier type. * No actionexisting ones. 7.1. New State Variables A new state variable isrequired, as the two can shareadded to thediscriminator. One important characteristicsbase specification in support of S-BFD. o bfd.SessionType: The type of this session. Allowable values are: * SBFDInitiator - an S-BFDdiscriminator is that it MUST be network wide unique. If multiple network nodes allocated same S-BFD discriminator value, then S-BFD control packets falsely terminatingsession on awrongnetwork nodecan result in reflector BFD session (described in Section 7) to generatethat performs aresponse back, dueconnectivity test to"your discriminator" matching. This is clearly not desirable. If only IP baseda target entity by sending S-BFDis concerned, then it is possible forpackets. * SBFDReflector - an S-BFDreflectorsessionto require demultiplexing ofon a network node that listens for incoming S-BFDcontrol packet with combination of destination IP addresspackets to local entities and"your discriminator". Thengenerates response S-BFDdiscriminator only has topackets. bfd.SessionType variable MUST beunique within a local node. However,initialized to the appropriate type when an S-BFD session isa generic mechanismcreated. 7.2. State Variable Initialization and Maintenance Some state variables definedto run on wide range of environments: IP, MPLS, Segment Routing ([I-D.previdi-filsfils-isis-segment-routing]), etc. For other transports like MPLS, becausein section 6.8.1 of the BFD base specification need touse non-routable IP destination address, it is not possible for S-BFD reflectorbe initialized or manipulated differently depending on the sessionto demultiplex using IP destination address. With PHP, there may nottype. Ed-Note: Anything else?. o bfd.DemandMode: This variable MUST beany incoming label stackinitialized toaid in demultiplexing either. Thus, S-BFD imposes a requirement that S-BFD discriminators1 for session type SBFDInitiator, and MUST benetwork wide unique. 7. Reflector BFD Session Each network node MUST create one or more reflector BFD sessions. This reflector BFD session is ainitialized to 0 for sessionwhich transmits BFD controltype SBFDReflector. 8. S-BFD Procedures 8.1. Initiator Procedures S-BFD packetsin responsetransmitted by an SBFDInitiator MUST set "your discriminator" field toreceived valid locally destined BFD control packets. Specifically, this reflector BFD session isan S-BFD discriminator corresponding tohave following characteristics: o MUST NOT transmit any BFD controlthe remote entity. S-BFD packetsbased on local timer expiry. otransmitted by an SBFDInitiator MUSTtransmit BFD control packet in responseNOT set "my discriminator" field toa received valid locally destined BFD control packet. o MUST be capable of sending only two states: UP and ADMINDOWN. One reflector BFD session MAY be responsiblean S-BFD discriminator allocated forhandling received BFD control packets targeted to alla localBFD target identifiers, or few reflector BFD sessions MAY each be responsible for subset ofentity (and is being monitored by a localBFD target identifiers.SBFDReflector). Thispolicyis to prevent incoming response S-BFD packets, from a remote SBFDReflector, having "your discriminator" as a S-BFD discriminator of a localmatter, andentity. Every SBFDInitiator isoutside the scope of this document. Note that incoming BFD control packets destinedtoBFD target identifier types mayhave a unique "my discriminator", and SHOULD beIPv4, IPv6 or MPLS based. For thoseallocated from the BFDtarget identifier types, implementations MAY either allowdiscriminator pool if thesame reflector BFD session to handle all incoming BFD control packets in address family agnostic fashion, or setup multiple reflector BFD sessions to handle incoming BFD control packets with different address families. This policy is again a local matter, and is outsideimplementation employs thescopeapproach ofthis document. 8. State Variables S-BFD introduces some new state variables,having separate discriminator pools for BFD andmodifies the usage of existing ones. 8.1. New State Variables A new state variable is added to the base specification in support ofS-BFD.o bfd.SessionType: The typeBelow ASCII art describes high level concept ofthis session. Allowable values are: * SBFDInitiator: Any session on aconnectivity test using S-BFD. R2 allocates XX as the S-BFD discriminator for its networknode that attemptsreachability purpose, and advertises XX toperformneighbors. ASCII art shows R1 and R4 performing apath monitoringconnectivity test toanyR2. +--- md=50/yd=XX (ping) ----+ | | |+-- md=XX/yd=50 (pong) --+ | || | | |v | v R1 ==================== R2[*] ========= R3 ========= R4 | ^ |^ | | || | +-- md=60/yd=XX (ping) --+| | | +---- md=XX/yd=60 (pong) ---+ [*] Reflector BFDtarget identifiersession onotherR2. === Links connecting network nodes.* SBFDReflector: Any--- S-BFD packet traversal. Figure 3: S-BFD Connectivity Test 8.1.1. SBFDInitiator State Machine An SBFDInitiator may be a persistent session ona network node, which receives BFD control packets transmitted by an initiator and responds back tothe initiatoris referred as responder. This variable MUSTwith a timer for S-BFD packet transmissions. An SBFDInitiator may also beinitialized to the appropriate type whena module, a script or a tool on thesession is created, according toinitiator that transmits one or more S-BFD packets "when needed". For transient SBFDInitiators, therulesBFD state machine described insection TBD. 8.2. State Variable Initialization[RFC5880] may not be applicable. For persistent SBFDInitiators, the states andMaintenance Somethe statevariables definedmachine described insection 6.8.1 of the BFD base specification need to be initialized or manipulated differently depending on the session type. o bfd.DemandMode: This variable MUST be initialized to 1 for session type SBFDInitiator, and MUST be initialized to 0 for session type SBFDReflector. 9. Full Reachability Validations 9.1. Initiator Behavior Any network node can attempt to perform a full reachability validation to any BFD target identifier on other network nodes, as long as destination BFD target identifier is provisioned to use this mechanism. BFD control packets transmitted by the initiator is to have "your discriminator" corresponding to destination BFD target identifier. A node that initiates a BFD control packet MAY create an active BFD session to periodically send BFD control packets to a target, or a BFD control packet MAY be crafted and sent out on "as needed basis" (ex: BFD ping) without any session presence. In both cases, a BFD instance MUST have a unique "my discriminator" value assigned. If a node is to create multiple BFD instances to the same BFD target identifier, then each instance MUST have separate "my discriminator" values assigned. A BFD instance MUST NOT use a discriminator corresponding to one of local BFD target identifiers as "my discriminator". This is to prevent incoming response BFD control packets ("pong" packets) having "your discriminator" as a discriminator corresponding to the local BFD target identifier. Below ASCII art describes high level concept of full reachability validations using this mechanism. R2 reserves value XX as BFD discriminator for its BFD target identifier. ASCII art shows that R1 and R4 performing full reachability validation to XX on R2. -- md=50/yd=XX (BFD ping) --> <-- md=XX/yd=50 (BFD pong) -- [*] R1 ---------------------- R2 ----------- R3 ----------- R4 | ^ | | | + - md=60/yd=XX (BFD ping) -- + - - -md=XX/yd=60 (BFD pong) --> [*] Reflector BFD session on R2. Figure 2: S-BFD path monitoring If BFD control packet is to be sent via IP path, then: o Destination IP address MUST be an IP address corresponding to target identifier. o Source IP address MUST be a local IP address. o IP TTL MUST be 255 for full reachability validations. Partial reachability validations MAY use smaller TTL value (see Section 10). o Well-known UDP destination port(s) for IP based S-BFD. If BFD control packet response is determined to explicitly be label switched, then: o BFD control packet MUST get imposed with a label stack that is expected to reach the target node. o MPLS TTL MUST be 255 for full reachability validations. Partial reachability validations MAY use smaller TTL value (see Section 10). o Destination IP address MUST be 127/8 for IPv4 and 0:0:0:0:0:FFFF:7F00/104 for IPv6. o Source IP address MUST be a local IP address. o IP TTL=1. o Well-known UDP destination port(s) for MPLS based S-BFD 9.1.1. Initiator State machine The following diagram provides an overview of the initiator state machine. The notation on each arc represents the state of the remote system (as received in the State field in the BFD Control packet) or indicates the expiration of the Detection Timer. +--+ ADMIN DOWN, | | TIMER | V +------+ UP +------+ | |-------------------->| |----+ | DOWN | | UP | | UP | |<--------------------| |<---+ +------+ ADMIN DOWN, +------+ TIMER Figure 3: S-BFD Initiator FSM Note that the above[RFC5880] will function but are more than necessary. The following diagram provides an optimized state machineis different from the base BFD specification[RFC5880]. This is because the Init state is no longer applicableforthe initiator of the S-BFD session. Another important difference is the transition of the state machine from the Down state to the Up state when a packet with State Up is received by the initiator.persistent SBFDInitiators. Thedefinitions of the states and the events have the same meaning as in the base BFD specification [RFC5880]. 9.2. Responder Behavior A network node which receives BFD control packets transmitted by an initiator is referred as responder. Responder, upon reception of BFD control packets, is to perform necessary relevant validations described in [RFC5880]/[RFC5881]/[RFC5883]/[RFC5884]/[RFC5885]. 9.2.1. Responder Demultiplexing When responder receives a BFD control packet, if "your discriminator" value is not one of local entries in the BFD target identifier table, then this packet MUST NOT be considered for this mechanism. If "your discriminator" value is one of local entries in the BFD target identifier table, then the packet is determined to be handled by a reflector BFD session responsible for specified BFD targeted identifier. If the packet was determined to be processed further for this mechanism, then chosen reflector BFD session is to transmit a response BFD control packet using procedures described in Section 9.2.2, unless prohibited by local administrative or local policy reasons. 9.2.2. Reflector BFD Session Procedures BFD target identifier type MUST be used to determine further informationnotation onhow to reach back toeach arc represents theinitiator. In addition, destination IP addressstate ofreceived BFD control packet MUST be examined to determine how to construct response BFD control packet to send back totheinitiator. If destination IP address ofSBFDInitiator (as receivedBFD control packet is not 127/8 for IPv4in the State field in the S-BFD packet) or0:0:0:0:0:FFFF:7F00/104 for IPv6, then: o Destination IP address MUST be copied from received source IP address. o Source IP address MUST be copied from received destination IP address if received destination IP address is a local address. Otherwise local IP address MUST be used. o IP TTL MUST be 255. Response BFD control packet SHOULD be IP routed back, but MAY explicitly be label switched. If BFD control packet response is determined to be IP routed, then: o Destination IP address MUST be copied from received source IP address. o Source IP address MUST be a local address. o IP TTL MUST be 255. If BFD control packet response is determined to explicitly be label switched, then: o BFD control packet MUST get label switched back toindicates theinitiator. Determiningexpiration of thelabel stack to be imposed on a response BFD control packetDetection Timer. +--+ ADMIN DOWN, | | TIMER | V +------+ UP +------+ | |-------------------->| |----+ | DOWN | | UP | | UP | |<--------------------| |<---+ +------+ ADMIN DOWN, +------+ TIMER Figure 4: SBFDInitiator FSM Note that the above state machine isoutsidedifferent from thescope of this document. o MPLS TTL MUST be 255. o Destination IP address MUST be 127/8 for IPv4 and 0:0:0:0:0:FFFF:7F00/104 for IPv6. o Source IP address MUST be a local IP address. o IP TTL MUST be 1. Regardlessbase BFD specification[RFC5880]. This is because the Init state is no longer applicable for the SBFDInitiator. Another important difference is the transition of theresponse type, BFD controlstate machine from the Down state to the Up state when a packetbeing sentwith State Up is received by theresponder MUST perform following procedures: o Copy "my discriminator" from received "your discriminator",initiator. The definitions of the states and"your discriminator" from received "my discriminator". o UDP destination port MUST bethe events have the same meaning asreceived UDP destination port. 9.3. Further Packetin the base BFD specification [RFC5880]. 8.1.2. DetailsFurther detailsofBFD controlS-BFD Packet Sent by SBFDInitiator S-BFD packets sent byinitiator (ex: active BFD session):an SBFDInitiator is to have following contents: o Well-known UDP destination port assigned for S-BFD. o UDP source port as per described in[RFC5881]/[RFC5883]/[RFC5884]/[RFC5885].[RFC5881], [RFC5883], [RFC5884] and [RFC5885]. o "my discriminator" assigned by local node. o "your discriminator" corresponding toan identifier of target node.a remote entity. o "State" MUST be set to a valuereflectingdescribing local state. o "Desired Min TX Interval" MUST be set to a valuereflectingdescribing local desired minimum transmit interval. o "Required Min RX Interval" MUST be zero. o "Required Min Echo RX Interval" SHOULD be zero. o "Detection Multiplier" MUST be set to a valuereflectingdescribing locally used multiplier value. o"DemandDemand (D) bit(D)"MUST besetset. 8.2. Responder Procedures A network node which receives S-BFD packets transmitted by an initiator is referred as responder. The responder, upon reception of S-BFD packets, is to perform necessary relevant validations described in [RFC5880], [RFC5881], [RFC5883], [RFC5884] and [RFC5885]. 8.2.1. Responder Demultiplexing A BFD control packet received by a resonder is considered an S-BFD packet if theinitiator. Further detailspacket is on the well-known S-BFD port. When a responder receives an S-BFD packet, if the value in the "your discriminator" field is not one of S-BFD discriminators allocated for local entities, then this packet MUST NOT be considered for this mechanism. If the value in the "your discriminator" field is one of S-BFD discriminators allocated for local entities, then the packet is determined to be handled by a reflector BFD session responsible for the S-BFD discriminator. If the packet was determined to be processed further for this mechanism, then chosen reflector BFD session is to transmit a response BFD control packet using procedures described in Section 8.2.2, unless prohibited by local policies (ex: administrative, security, rate-limiter, etc). 8.2.2. Details of S-BFD Packet Sent by SBFDReflector S-BFD packets sent byresponder (reflector BFD session):an SBFDReflector is to have following contents: o Well-known UDP destination port assigned for S-BFD. o UDP source port as described in[RFC5881]/[RFC5883]/[RFC5884]/[RFC5885].[RFC5881], [RFC5883], [RFC5884] and [RFC5885]. o "my discriminator" MUST be copied from received "your discriminator". o "your discriminator" MUST be copied from received "my discriminator". o "State" MUST be UP or ADMINDOWN. Clarification of reflector BFD session state is described in Section9.8.8.7. o "Desired Min TX Interval" MUST be copied from received "Desired Min TX Interval". o "Required Min RX Interval" MUST be set to a valuereflectingdescribing how many incoming control packets this reflector BFD session can handle. Further details are described in Section 8.7. o "Required Min Echo RX Interval" SHOULD be set to zero. o "Detection Multiplier" MUST be copied from received "Detection Multiplier". o"DemandDemand (D) bit(D)"MUST becleared by the reflector. 9.4.cleared. 8.3. Diagnostic Values Diagnostic value in both directions MAY be set to a certain value, to attempt to communicate further information to both ends. However, details of such are outside the scope of this specification.9.5.8.4. The Poll Sequence Poll sequence MAY be used in both directions. The Poll sequence MUST operate in accordance with [RFC5880].9.6.An SBFDReflector MAY use the Poll sequence to slow down that rate at which S-BFD packets are generated from an SBFDInitiator. This is done by the SBFDReflector using procedures described in Section 8.7 and setting the Poll (P) bit in the reflected S-BFD packet. The SBFDInitiator is to then send the next S-BFD packet with the Final (F) bit set. If an SBFDReflector receives an S-BFD packet with Poll (P) bit set, then the SBFDReflector MUST respond with an S-BFD packet with Poll (P) bit cleared and Final (F) bit set. 8.5. Control Plane Independent (C) Control plane independent (C) bit forBFD instances speakingan SBFDInitiator sending S-BFD packets to a reflector BFD session MUST work according to [RFC5880]. Reflector BFD session also MUST work according to [RFC5880]. Specifically, if reflector BFD session implementation does not share fate with control plane, then responseBFD controlS-BFD packets transmitted MUST have control plane independent (C) bit set. If reflector BFD session implementation shares fate with control plane, then responseBFD controlS-BFD packets transmitted MUST NOT have control plane independent (C) bit set.9.7.8.6. AdditionalInitiator BehaviorSBFDInitiator Behaviors o Ifinitiatorthe SBFDInitiator receives a validBFD controlS-BFD packet in response to transmittedBFD control packet,S-BFD packet to a remote entity, theninitiatorthe SBFDInitiator SHOULD conclude that S-BFD packet reached the intendedtarget.remote entity. o When a sufficient number ofBFD controlS-BFD packets have not arrived as they should, theinitiator couldSBFDInitiator SHOULD declare loss ofreachability.connectivity to the remote entity. The criteria for declaring loss ofreachabilityconnectivity and the action that would be triggered as a result are outside the scope of thisspecification.document. o Relating to above bullet item, it is critical for an implementation to understand the latency to/from the reflector BFD session ontarget node.the responder. In other words, for very firstBFD controlS-BFD packettransmitted,transmitted by the SBFDInitiator, an implementation MUST NOT expect responseBFD controlS-BFD packet to be received for time equivalent to sum of latencies: initiatornodetotarget noderesponder andtarget noderesponder back toinitiator node.initiator. o Ifinitiatorthe SBFDInitiator receivesaan S-BFD packet withDDemand (D) bit set, the packet MUST be discarded.9.8.8.7. AdditionalResponder BehaviorSBFDReflector Behaviors oBFD controlS-BFD packets transmitted bya reflector BFD sessionthe SBFDReflector MUST have "Required Min RX Interval" set to a value whichreflectsexpresses how many incomingcontrolS-BFD packets thisreflector BFD sessionSBFDReflector can handle.ResponderThe SBFDReflector can control how fastinitiatorsSBFInitiators will be sendingBFD controlS-BFD packets to self by ensuring "Required Min RX Interval"reflectsindicates a value based on the current load. o Ifa reflector BFD sessionthe SBFDReflector wishes to communicate to some or allinitiatorsSBFDInitiators that monitoredBFD target identifierlocal entity is "temporarily out of service", thenBFD controlS-BFD packets with "state" set to ADMINDOWN are sent to thoseinitiators. Initiators,SBFDInitiators. The SBFDInitiators, upon reception of such packets, MUST NOT conclude loss ofreachabilityconnectivity to correspondingBFD target identifier,remote entity, and MUST back off packet transmission interval for the remote entity tocorresponding BFD target identifieran interval no faster than 1 second. Ifa reflector BFD sessionthe SBFDReflector is generating a responseBFD controlS-BFD packet forBFD target identifiera local entity that is in service, then "state" in response BFD control packets MUST be set to UP. o Ifa reflectoran SBFDReflector receivesaan S-BFD packet withDDemand (D) bit cleared, the packet MUST be discarded.10. Partial Reachability Validations Same mechanism as described in "Full Reachability Validations" section will be applied with exception of following differences on initiator. o When initiator wishes to perform a partial reachability validation towards identifier X upto identifier Y, number of hops to identifier Y is calculated. o TTL value based on this calculation is used as the IP TTL or MPLS TTL on top most label, and "your discriminator" of transmitted BFD control packet will carry BFD discriminator corresponding to target transit identifier Y. o Imposed label stack or IP destination address will continue to be of identifier X. 11.9. Scaling Aspect This mechanism brings forth one noticeable difference in terms of scaling aspect: number ofBFD sessions.SBFDReflector. This specification eliminates the need for egress nodes to have fully active BFD sessions when only one side desires to performreachability validations.connectivity tests. With introduction of reflector BFD concept, egress no longer is required to create any active BFD session perpath/LSPpath/LSP/function basis. Due to this, total number of BFD sessions in a network is reduced.If traditional BFD technology was used on a network comprised of N nodes, and each node monitored M unidirectional paths/LSPs, then total number of BFD sessions in such network will be: (((N - 1) x M) x 2) Assuming that each network node creates one reflector BFD session to handle all local BFD target identifiers, then total number of BFD sessions in same scenario will be: (((N - 1) x M) + N) 12.10. Co-existence with Traditional BFD This mechanism has no issues being deployed with traditional BFDs([RFC5881]/[RFC5883]/[RFC5884]/[RFC5885])([RFC5881], [RFC5883], [RFC5884] and [RFC5885]) becauseBFDS-BFD discriminators which allow this mechanism to function are explicitly reserved and separate UDP port values are used with S-BFD.13.11. BFD Echo BFD echo is outside the scope of this document.14.12. Security Considerations Same security considerations as [RFC5880], [RFC5881], [RFC5883], [RFC5884] and [RFC5885] apply to this document. Additionally, implementing the following measures will strengthen security aspects of the mechanism described by this document. o Implementations MUST provide filtering capability based on source IP addressesor source node segment IDsof receivedBFD controlS-BFD packets: [RFC2827]. o Implementations MUST NOT act on receivedBFD controlS-BFD packets containing Martian addresses as source IP addresses. o Implementations MUST ensure that response S-BFD packets generated to the initiator by the SBFDReflector have a reachable target (ex: destination IPaddresses or node segment IDs are reachable.address). oInitiatorSBFDInitiator MAY pick crypto sequence number based on authentication mode configured. oThe reflectorSBFDReflector MUST NOT look at the crypto sequence number before accepting the packet. oReflectorSBFDReflector MAY look at the Key ID [I-D.ietf-bfd-generic-crypto-auth] in the incoming packet and verify the authentication data. oReflectorSBFDReflector MUST accept the packet if authentication is successful. oReflectorSBFDReflector MUST compute the Authentication data and MUST use the same sequence number that it received in the S-BFD packet that it is responding to. oInitiatorSBFDInitiator MUST accept the S-BFD packet if it either comes with the same sequence number as it had sent oritsit's within the window that it finds acceptable (described in detail in [I-D.ietf-bfd-generic-crypto-auth]) Using the above method, oReflectorsSBFDReflector continue to remain stateless despite using security. oReflectorsSBFDReflector are not susceptible to replay attacks as they always respond to S-BFD packets irrespective of the sequence number carried. o An attacker cannot impersonate theReflectorresponder since theInitiatorSBFDInitiator will only accept S-BFD packets that come with the sequence number that it had originally used when sending the S-BFD packet.15.13. IANA ConsiderationsBFD Target Identifier types: Value BFD Target Identifier Type ------ -------------------------- 0 Reserved 1 Network Target Discriminator New UDP port number, TBD1, will beA new value TBD1 is requestedfor S-BFD. 16.from the "Service Name and Transport Protocol Port Number Registry". The requested registry entry is: Service Name (REQUIRED) s-bfd Transport Protocol(s) (REQUIRED) udp Assignee (REQUIRED) IESG <iesg@ietf.org> Contact (REQUIRED) BFD Chairs <bfd-chairs@tools.ietf.org> Description (REQUIRED) Seamless Bidirectional Forwarding Detection (S-BFD) Reference (REQUIRED) draft-ietf-bfd-seamless-base Port Number (OPTIONAL) TBD1 (Requesting 7784) 14. Acknowledgements Authors would like to thank Jeffrey Haas for performing thorough reviews and providing number of suggestions. Authors would like to thank Girija Raghavendra Rao, Marc Binderberger, Les Ginsberg, Srihari Raghavan, Vanitha Neelamegam and Vengada Prasad Govindan from Cisco Systems for providing valuable comments.17.Authors would also like to thank John E. Drake for providing comments and suggestions. 15. Contributing Authors Tarek Saad Cisco Systems Email: tsaad@cisco.com Siva Sivabalan Cisco Systems Email: msiva@cisco.com Nagendra Kumar Cisco Systems Email: naikumar@cisco.com Mallik Mudigonda Cisco Systems Email: mmudigon@cisco.com Sam Aldrin Huawei Technologies Email: aldrin.ietf@gmail.com18.16. References18.1.16.1. Normative References [I-D.ietf-bfd-seamless-use-case] Aldrin, S., Bhatia, M., Mirsky, G., Kumar, N., and S. Matsushima, "Seamless Bidirectional Forwarding Detection (BFD) Use Case", draft-ietf-bfd-seamless-use-case-00 (work in progress), June 2014. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection (BFD)", RFC 5880, June 2010. [RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection (BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881, June 2010. [RFC5883] Katz, D. and D. Ward, "Bidirectional Forwarding Detection (BFD) for Multihop Paths", RFC 5883, June 2010. [RFC5884] Aggarwal, R., Kompella, K., Nadeau, T., and G. Swallow, "Bidirectional Forwarding Detection (BFD) for MPLS Label Switched Paths (LSPs)", RFC 5884, June 2010.18.2.16.2. Informative References [I-D.ietf-bfd-generic-crypto-auth] Bhatia, M., Manral, V., Zhang, D., and M. Jethanandani, "BFD Generic Cryptographic Authentication", draft-ietf- bfd-generic-crypto-auth-06 (work in progress), April 2014.[I-D.previdi-filsfils-isis-segment-routing] Previdi, S., Filsfils, C., Bashandy, A., Horneffer, M., Decraene, B., Litkowski, S., Milojevic, I., Shakir, R., Ytti, S., Henderickx, W., and J. Tantsura, "Segment Routing with IS-IS Routing Protocol", draft-previdi- filsfils-isis-segment-routing-02 (work in progress), March 2013.[RFC2827] Ferguson, P. and D. Senie, "Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing", BCP 38, RFC 2827, May 2000. [RFC5885] Nadeau, T. and C. Pignataro, "Bidirectional Forwarding Detection (BFD) for the Pseudowire Virtual Circuit Connectivity Verification (VCCV)", RFC 5885, June 2010. Appendix A. Loop Problem Consider a scenario where we have two nodes and both are S-BFD capable. Node A (IP1.1.1.1) ----------------192.0.2.1) ----------------- Node B (IP2.2.2.2)192.0.2.2) | | Man in the Middle (MiM) Assume node A reserved a discriminator 0x01010101 for target identifier1.1.1.1192.0.2.1 and has a reflector session in listening mode. Similarly node B reserved a discriminator 0x02020202 for its target identifier2.2.2.2192.0.2.2 and also has a reflector session in listening mode. Suppose MiM sends a spoofed packet with MyDisc = 0x01010101, YourDisc = 0x02020202, source IP as1.1.1.1192.0.2.1 and dest IP as2.2.2.2.192.0.2.2. When this packet reaches Node B, the reflector session on Node B will swap the discriminators and IP addresses of the received packet and reflect it back, since YourDisc of the received packet matched with reserved discriminator of Node B. The reflected packet that reached Node A will have MyDdisc=0x02020202 and YourDisc=0x01010101. Since YourDisc of the received packet matched the reserved discriminator of Node A, Node A will swap the discriminators and reflects the packet back to Node B. Since reflectors MUST set the TTL of the reflected packets to 255, the above scenario will result in an infinite loop with just one malicious packet injected from MiM. FYI: Packet fields do not carry any direction information, i.e., if this is Ping packet or reply packet. Solutions The current proposals to avoid the loop problem are: o Overload "D" bit (Demand mode bit): Initiator always sets the 'D' bit and reflector clears it. This way we can identify if a received packet was a reflected packet and avoid reflecting it back. However this changes the interpretation of 'D' bit. o Use of State field in the BFD control packets: Initiator will always send packets with State set to "DOWN" and reflector will send back packets with state field set to "UP. Reflectors will never reflect any received packets with state as "UP". However the only issue is the use of state field differently i.e. state in the S-BFD control packet from initiator does not reflect the local state which is anyway not significant at reflector. o Use of local discriminator as My Disc at reflector: Reflector will always fill in My Discriminator with a locally allocated discriminator value (not reserved discriminators) and will not copy it from the received packet. Authors' Addresses Nobo Akiya Cisco Systems Email: nobo@cisco.com Carlos Pignataro Cisco Systems Email: cpignata@cisco.com Dave Ward Cisco Systems Email: wardd@cisco.com Manav BhatiaAlcatel-LucentIonos Networks Email:manav.bhatia@alcatel-lucent.commanav@ionosnetworks.com Santosh Juniper Networks Email: santoshpk@juniper.net