Subject: RE: [mpls] BFD Packet Flow

From: Lavanya Srivatsa <[email-masked]>
Date: Sat, 21 Aug 2010 16:18:15 +0530

Hi Yaacov, Greg and others,

Does not the below sequence cause BFD to become a "4-way handshake" as opposed to a "3-way handshake" as it is intended to be?

Should not the LSP Ping request packet be considered in lieu of the first BFD control packet that would have been sent in the case of "single-hop" neighbour monitoring BFD scenarios (as defined by the base BFD draft)?
Is not the LSP Ping request packet bootstrapping the BFD discriminator being sent solely for the express purpose of "initiating" a BFD session establishment?

If so, should not the receipt of an LSP Ping echo request packet carrying a BFD discriminator, cause the BFD state machine to move to INIT state (from DOWN)? Agreed, the LSP ping packet is _not_ a BFD packet and under any other circumstances, is not expected to affect/influence the BFD state machine, but for reasons mentioned above, would this not be a correct behaviour?

If so, step 3 below, would become -
3. LSR-Z receives the LSP-Ping, and (assuming that LSR-Z is in Active
mode) sends a BFD Control Packet with its own Discriminator, the
Discriminator received from the LSP-Ping, and State=Init to LSR-A, whose
session still in Down State.

This would cause the remaining steps to collapse to:
4. LSR-A receives the BFD Control and switches to Up state (as per
RFC5880 receving an Init state when in Down state), and sends a BFD 
Control Packet with State=Up to LSR-Z

5. LSR-Z receives the BFD Control and switches to UP state

The above would ensure that the BFD handshake is still "3-way: -
1. Ping from LSR-A to LSR-Z
2. BFD-Init from LSR-Z to LSR-A
3. BFD-Up from LSR-A to LSR-Z

Please let me know if I am missing something here.

- Lavanya

Date: Thu, 19 Aug 2010 11:08:30 +0200
From: "Weingarten, Yaacov (NSN - IL/Hod HaSharon)"
        <[email-masked]>
Subject: RE: [mpls] BFD Packet Flow
To: "ext Dave Katz" <[email-masked]>,        "RAKESH GUPTA"
        <[email-masked]>
Cc: [email-masked], [email-masked]

Hi,

Just to verify that I understand the flow of messages and the state of
the BFD Session - is the following flow correct -

Assume a LSP between LSR-A and LSR-Z -

1. Both LSRs initialize the BFD Session and set the state to Down

2. LSR-A (the ingress LSR) sends a LSP-Ping (with the Discriminator TLV)
to LSR-Z - both sessions still in Down state.

3. LSR-Z receives the LSP-Ping, and (assuming that LSR-Z is in Active
mode) sends a BFD Control Packet with its own Discriminator, the
Discriminator received from the LSP-Ping, and State=Down to LSR-A, both
session still in Down State.

4. LSR-A receives the BFD Control and switches to Init state (as per
RFC5880), and sends a BFD Control Packet with State=Init to LSR-Z

5. LSR-Z receives the BFD Control and switches to Up state, and sends a
BFD Control Packet with State=Up to LSR-A

6. LSR-A receives the BFD Control and switches to UP state

[LS] Does this not make the entire BFD session establishment as a 4-way handshake rather than a 3-way handshake?

Additional question - regarding step 3 above - must LSR-Z be in Active
mode? What happens if LSR-Z is in Passive mode and LSR-A is in Active
mode?

Thanx and BR,

Yaacov Weingarten

Nokia Siemens Networks

________________________________

From: [email-masked] [mailto:[email-masked]] On
Behalf Of ext Dave Katz
Sent: Saturday, August 14, 2010 00:39
To: RAKESH GUPTA
Cc: [email-masked]; [email-masked] WG
Subject: Re: [mpls] BFD Packet Flow

I suppose the source of confusion might be RFC 5884's choice of
verbiage:

   On receipt of the LSP Ping Echo request message, the egress LSR MUST
   send a BFD Control packet to the ingress LSR...

This might give the impression that LSP Ping is just transmitting BFD
control packets willy-nilly without any BFD context.  But it also says:
 
  A BFD session is bootstrapped using LSP Ping.

and

   A BFD session may be established for a FEC associated with an MPLS
LSP.

This seems unambiguous that a BFD session is being established, and the
procedure for doing so is spelled out clearly in RFC 5880.  I believe
the following to be unambiguous:

   State (Sta)
      Set to the value indicated by bfd.SessionState.

and

   bfd.SessionState
      ...This variable MUST be initialized to Down.

One might be tempted to start in Init state in order to save one packet
during session establishment, but in doing so one would be breaking the
semantics of the protocol, in particular the three-way handshake through
session failure.

--Dave

On Aug 12, 2010, at 4:20 AM, RAKESH GUPTA wrote:
hi,

I have query regarding BFD packet flow when LSP Ping is used for
bootstrapping.

As per my understanding from the RFC 5880 and RFC 5884 when LSP Ping is
used for bootstrapping the remote end MUST reply with BFD control in
response to the LSPPing.

The specification does not clearly specify about the Stat parameter
value that should be returned in the response of LSPPing. Should it have
the value Init or Down? Or it might be possible to return no stat
information.

Can someone please share the exact packet flow that happens during BFD
session set up with LSPPing in Bootstrap till the session comes into UP
state?

thanks a lot in advance for ur help,
rakesh

---

From: Greg Mirsky <[email-masked]>
Date: Sat, 21 Aug 2010 11:05:33 -0700

Dear Lavanya,
I wouldn't consider LSP Ping based bootstrap of BFD session as extra
handshake. It is not required and exchange of Discriminator can be done with
help of NMS.

Regards,
Greg

On Sat, Aug 21, 2010 at 3:48 AM, Lavanya Srivatsa <
[email-masked]> wrote:

> Does not the below sequence cause BFD to become a "4-way handshake" as
> opposed to a "3-way handshake" as it is intended to be?
>
> Should not the LSP Ping request packet be considered in lieu of the first
> BFD control packet that would have been sent in the case of "single-hop"
> neighbour monitoring BFD scenarios (as defined by the base BFD draft)?
> Is not the LSP Ping request packet bootstrapping the BFD discriminator
> being sent solely for the express purpose of "initiating" a BFD session
> establishment?
>
> If so, should not the receipt of an LSP Ping echo request packet carrying a
> BFD discriminator, cause the BFD state machine to move to INIT state (from
> DOWN)? Agreed, the LSP ping packet is _not_ a BFD packet and under any other
> circumstances, is not expected to affect/influence the BFD state machine,
> but for reasons mentioned above, would this not be a correct behaviour?
>
> "DISCLAIMER: This message is proprietary to Aricent and is intended solely
> for the use of the individual to whom it is addressed. It may contain
> privileged or confidential information and should not be circulated or used
> for any purpose other than for what it is intended. If you have received
> this message in error, please notify the originator immediately. If you are
> not the intended recipient, you are notified that you are strictly
> prohibited from using, copying, altering, or disclosing the contents of this
> message. Aricent accepts no responsibility for loss or damage arising from
> the use of the information transmitted by this email including damage from
> virus."
>

---

From: Dave Katz <[email-masked]>
Date: Sat, 21 Aug 2010 12:53:59 -0700

This is really about trying to optimize an exchange that most likely isn't worth optimizing (and could potentially lead to protocol failure in some implementation circumstances.)

The reason that BFD requires an exchange of BFD packets before leaving Down state is to absolutely ensure, from the vantage point of the protocol, that both sides agree that the session is down.  Clearly if a BFD session is being created for the first time, both ends understand that the session is down and thus there can be no ambiguity.

However, one could posit a situation where MPLS has hiccuped somehow and wants to restart the process and the same discriminator is delivered.  If it started in Init state, the other end could potentially be in Up state and so the fact that one end cycled the session would be lost.

One could claim that This Can't Happen for various reasons, or that it Doesn't Matter for various other reasons, but the protocol must be self-protecting in general and not make assumptions about what might not matter or what the external conditions are.  The protocol is written the way it is to *guarantee* that both sides understand that a session was down.

To respond directly, yes, there is a fourth packet flying here, but it's not a BFD packet.  Think of it as the BFD configuration being provisioned instead--does a configuration action in other circumstances qualify as a "fourth way"?

--Dave