Subject: Re: Transition from failing state

From: Jeffrey Haas <[email-masked]>
Date: Wed, 2 Feb 2005 15:52:27 -0500

On Wed, Feb 02, 2005 at 12:29:23PM -0000, [email-masked] wrote:
> Therefore, it seems to me that whilst A->B connectivity is lost, Node B will remain permanently in the Failing state, whilst Node A will loop continuously though the Failing, Down, Init states. Is this correct or am I missing something?

Correct.  By analogy, this isn't much worse (given the fallback to a 1
second timer for sending packets) than something like BGP transitioning
through it's statemachine.

It is up to an implementation whether it wants to leave a BFD instance
running on a session that is otherwise down for a long period of time.
For example, if BFD was supporting OSPF, then one could presume an 
implementation would delete the BFD instance for a given pair of peers
until the OSPF hello protocol noticed that the session was up again.

> Also, the only exit criteria described for the Failing state is as follows:
> 
> Else if bfd.SessionState is Failing
>    If I Hear You is zero, set bfd.SessionState to Down
> 
> What happens if just after entering the Failing state (due to detection timeout as in the previous example), connectivity A->B is restored and Node B receives a BFD packet from node A with a I Hear You of nonzero? This would occur if node A (whilst still in the Up state) sends a BFD packet to node B before it receives the BFD failure notification from Node B (with H bit set to 0 and Diag set to 1).

This isn't any different than B saying that it wishes to tear the connection
down.  The state machine could go through the usual motions of restoring
the connection, but B would do so starting from the failing state and would
have to wait for A to acknowledge it.

> Richard

-- 
Jeff Haas 
NextHop Technologies

---

From: Dave Katz <[email-masked]>
Date: Wed, 2 Feb 2005 14:40:18 -0800

On Feb 2, 2005, at 12:52 PM, Jeffrey Haas wrote:

>> Therefore, it seems to me that whilst A->B connectivity is lost, Node 
>> B will remain permanently in the Failing state, whilst Node A will 
>> loop continuously though the Failing, Down, Init states. Is this 
>> correct or am I missing something?
>

Yep, in the case of one-way connectivity, this is what will happen.  
Given that the only "interesting" transition is Up->Failing (or 
perhaps, in limited cases, Init->Up) the machinations of the state 
machine hurt nobody.  One could indeed claim that they are useful;  in 
particular, timing out of Init state carries useful semantics.

>> What happens if just after entering the Failing state (due to 
>> detection timeout as in the previous example), connectivity A->B is 
>> restored and Node B receives a BFD packet from node A with a I Hear 
>> You of nonzero? This would occur if node A (whilst still in the Up 
>> state) sends a BFD packet to node B before it receives the BFD 
>> failure notification from Node B (with H bit set to 0 and Diag set to 
>> 1).
>

Indeed.  The intent of the state machine is to make sure both sides 
*always* know that the session has failed.  If it takes a couple of 
extra packets to get the session going again in some relatively unusual 
instances, that's no big deal (and not worth the complexity to try to 
optimize it out.)

--Dave