Subject: RE: bgp18 WG Last Call fsm missing keepalive

From: "Susan Hares" <[email-masked]>
Date: Wed, 4 Dec 2002 13:07:19 -0500

Tom:

Just to clarify this comment: 

	Event 19 = valid open with delay timer running

	Active = 1) awaiting TCP connection, or
		   2) TCP connection completed and awaiting the
		      TCP connection with delay timer running

Case 1:  - should not see Event 19
  In transition from Active to Open Confirm, the connection
  must have a TCP connection completed. Case 1 does not
  have this occurring, so the transition must be avoided.

Case 2: - should see Event 19

	- Open, Keepalive should be sent.

Previous text: (Action H from FSM document) 

	If an Open is received with the BGP Delay Open timer running,
	[Event 19], the local system:
	- clears the connect retry timer [cleared to zero),
	- completes the BGP initialization, 
	- stop and clears the BGP Open Delay timer,
	- Sends an Open Message,
	- sets the hold timer to a large value (4 minutes), and
	- changes its state to an Open Confirm.

New text: [a New Action - N-2 : N + BGP keepalive sent]

	If an Open is received with the BGP Delay Open Timer running
	[Event 19], the local system:
	- clear the connect retry timer [cleared to zero],
	- completes the BGP initialization,
	- stops and clears the BGP Open Delay timer,
	- Send an Open message,
	- Sends a Keepalive message,
	- If hold timer value is non-zero, 
		- set keepalive timer
		- hold timer reset to negotiated value
	  else if hold timer is zero,
		- reset the keepalive timer, and
		- reset the hold timer.

	- If the value of the autonomous system field is the 
	  same as the local Autonomous system number, set
	  the connection status to a internal connection;
	  otherwise it is "external".  

Please confirm that this change is OK for this comment.

Sue 

-----Original Message-----
From: Tom Petch [mailto:[email-masked]]
Sent: Thursday, November 28, 2002 9:54 AM
To: idr
Subject: bgp18 WG Last Call fsm missing keepalive

When the OpenConfirm state is entered from OpenSent with the receipt
of a valid open [Event 18], then a KeepAlive message is sent and the
timer is started.

When the OpenConfirm state is entered from Active or Connect on
receipt of a valid open [Event 19], no message is sent, no timer is
started.

I believe this inconsistency is an error and should be corrected by
adding these two actions in those two places.

Tom Petch
[email-masked]

---

From: "Tom Petch" <[email-masked]>
Date: Wed, 4 Dec 2002 18:29:49 -0000

Still not quite.

This can occur in the Connect state as well as Active, when a TCP
connection completes with delay open flag set, my putative OpenDelay
state (sigh, point taken).

And we should still go to OpenConfirm state at the bottom of the
action list as is currently part of list H.

Tom Petch

-----Original Message-----
From: Susan Hares <[email-masked]>
To: Tom Petch <[email-masked]>; idr <[email-masked]>
Cc: Jeffrey Haas <[email-masked]>
Date: 04 December 2002 18:07
Subject: RE: bgp18 WG Last Call fsm missing keepalive

Tom:

**Connect or Active = 1) awaiting TCP connection, or
   2) TCP connection completed and awaiting the
      TCP connection with delay timer running

If an Open is received with the BGP Delay Open Timer running
[Event 19], the local system:
- **clears the connect retry timer [cleared to zero],
- completes the BGP initialization,
- stops and clears the BGP Open Delay timer,
- **Sends an Open message,
- Sends a Keepalive message,
- If hold timer value is non-zero,
- **sets keepalive timer
- hold timer reset to negotiated value
  else if hold timer is zero,
- **resets the keepalive timer, and
- **resets the hold timer.
** and changes state to OpenConfirm

Sue

-----Original Message-----
From: Tom Petch [mailto:[email-masked]]
Sent: Thursday, November 28, 2002 9:54 AM
To: idr
Subject: bgp18 WG Last Call fsm missing keepalive

Tom Petch

---

From: "Susan Hares" <[email-masked]>
Date: Wed, 4 Dec 2002 14:50:01 -0500

Tom:

I agree about the putative OpenDelay, but I do not feel
that represents the BGP implementations of today.  We
spent a long time Jan-Feb 2002 on adding any FSM States.

My earlier note was too brief.  Please answer questions

1) Agree, this can occur in the Active state as well as the
   Connect state.  Will you accept the earlier text below
   to be inserted both places? 

Background: 

The state machine for Event 19 is: 

		   Idle  Connect Active    Open    Open     Estb
				               Sent    Confirm
		   ===============================================
Event 19       |     |        |        |        |      |      |
   next state  |Idle | Open   | Open   | Open   |Idle  | Idle |
               |     | confirm| confirm| Confirm|      |      |
               ===============================================			
   action	   | V   |  N-2   | N-2    |  N     | E-1  |  E   |
               ===============================================

Per the State Machine.

Action v - FSM Error
Action E - FSM Error, drop connection - etc, drop routes
Action E-1 - FSM Error, drop connection (lots of
Action N-2 (text below)
Action N   (text below, without sending Open)

2) Do you think that Event 19 is possible in the Open Sent state?

	Please answer this separately.

Thanks for all the wonderful review of the State machine.
I'm working my way through the comments. 

Sue 

-----Original Message-----
From: Tom Petch [mailto:[email-masked]]
Sent: Wednesday, December 04, 2002 1:30 PM
To: Susan Hares; idr
Cc: Jeffrey Haas
Subject: Re: bgp18 WG Last Call fsm missing keepalive

Still not quite.

Tom Petch

-----Original Message-----
From: Susan Hares <[email-masked]>
To: Tom Petch <[email-masked]>; idr <[email-masked]>
Cc: Jeffrey Haas <[email-masked]>
Date: 04 December 2002 18:07
Subject: RE: bgp18 WG Last Call fsm missing keepalive

Tom:

Sue

-----Original Message-----
From: Tom Petch [mailto:[email-masked]]
Sent: Thursday, November 28, 2002 9:54 AM
To: idr
Subject: bgp18 WG Last Call fsm missing keepalive

Tom Petch

---

From: "Tom Petch" <[email-masked]>
Date: Thu, 5 Dec 2002 18:55:36 -0000

Sue

(I  promise I won't mention that state again)

1) yes I think the same text in both Active and Connect states is a
good resolution

2) complicated.  As the fsm text stands,  Event 19, along with a host
of others, takes us back from Open Sent  to Idle (I assume on the
grounds this is an error condition) which seems very reasonable.

But ...in quite a few places, such as Connect state events 2,
7,8,9,10,11, 17, 18, 20 thru 27, we do not stop the OpenDelay timer
when going to Idle or Active so we could then go from eg Idle with
Manual start [event 1] to Connect to Open Sent all before the
OpenDelay timer expires in which case event 19 can occur validly in
Open Sent - obscure but possible. (This is also true with Active state
and events 2, 17 and the default list at the end).

But I think this is an error, and that when exiting Connect state or
Active state as listed above, we should have an additional action to
stop the OpenDelay timer in which case event 19 in Open Sent becomes
an error condition (again).

But but but as ever, I cannot speak with authority for implementations
and so if implementations do not stop the OpenDelay timer when exiting
as above, then Event 19 is valid in Open Sent state - obscure but
possible (again).

My wish is to add the extra action, stop OpenDelay timer, for the
events listed above in Active and Connect states in the expectation
that that is what people have or should have implemented.

Tom Petch

-----Original Message-----
From: Susan Hares <[email-masked]>
To: Tom Petch <[email-masked]>; idr <[email-masked]>
Cc: Jeffrey Haas <[email-masked]>
Date: 04 December 2002 19:50
Subject: RE: bgp18 WG Last Call fsm missing keepalive

Tom:

Background:

Per the State Machine.

Action v - FSM Error

Sue

-----Original Message-----
From: Tom Petch [mailto:[email-masked]]
Sent: Wednesday, December 04, 2002 1:30 PM
To: Susan Hares; idr
Cc: Jeffrey Haas
Subject: Re: bgp18 WG Last Call fsm missing keepalive

Still not quite.

Tom Petch

-----Original Message-----
From: Susan Hares <[email-masked]>
To: Tom Petch <[email-masked]>; idr <[email-masked]>
Cc: Jeffrey Haas <[email-masked]>
Date: 04 December 2002 18:07
Subject: RE: bgp18 WG Last Call fsm missing keepalive

Tom:

Sue

-----Original Message-----
From: Tom Petch [mailto:[email-masked]]
Sent: Thursday, November 28, 2002 9:54 AM
To: idr
Subject: bgp18 WG Last Call fsm missing keepalive

Tom Petch