FSM word changes with bars

Susan Hares <skh@nexthop.com> Mon, 12 November 2001 18:35 UTC

Received: from trapdoor.merit.edu (postfix@trapdoor.merit.edu [198.108.1.26]) by nic.merit.edu (8.9.3/8.9.1) with ESMTP id NAA07122 for <idr-archive@nic.merit.edu>; Mon, 12 Nov 2001 13:35:58 -0500 (EST)
Received: by trapdoor.merit.edu (Postfix) id A6DA99127B; Mon, 12 Nov 2001 13:35:31 -0500 (EST)
Delivered-To: idr-outgoing@trapdoor.merit.edu
Received: by trapdoor.merit.edu (Postfix, from userid 56) id 6C87F9127C; Mon, 12 Nov 2001 13:35:31 -0500 (EST)
Delivered-To: idr@trapdoor.merit.edu
Received: from segue.merit.edu (segue.merit.edu [198.108.1.41]) by trapdoor.merit.edu (Postfix) with ESMTP id 41E2C9127B for <idr@trapdoor.merit.edu>; Mon, 12 Nov 2001 13:35:30 -0500 (EST)
Received: by segue.merit.edu (Postfix) id 14D065DD94; Mon, 12 Nov 2001 13:35:30 -0500 (EST)
Delivered-To: idr@merit.edu
Received: from presque.djinesys.com (presque.djinesys.com [198.108.88.2]) by segue.merit.edu (Postfix) with ESMTP id 983355DD8F for <idr@merit.edu>; Mon, 12 Nov 2001 13:35:29 -0500 (EST)
Received: from skh.nexthop.com (dhcp38-136.meeting.icann.org [192.0.38.136]) by presque.djinesys.com (8.11.3/8.11.1) with ESMTP id fACIFRE18428 for <idr@merit.edu>; Mon, 12 Nov 2001 13:15:27 -0500 (EST) (envelope-from skh@nexthop.com)
Message-Id: <5.0.0.25.0.20011112125909.01d8a990@mail.nexthop.com>
X-Sender: skh@mail.nexthop.com
X-Mailer: QUALCOMM Windows Eudora Version 5.0
Date: Mon, 12 Nov 2001 13:16:18 -0500
To: idr@merit.edu
From: Susan Hares <skh@nexthop.com>
Subject: FSM word changes with bars
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="=====================_3897314==_.ALT"
X-ECS-MailScanner: Found to be clean
Sender: owner-idr@merit.edu
Precedence: bulk

Idle state:

Initially BGP is in the Idle state.

| A manual start event is a start event initiated by an operator.  An 
automatic start event is a start |
| event generated by the system.

In this state BGP refuses all incoming BGP connections.  No resources are 
allocated to the peer.    In | response to a Start event (manual or 
automatic), the local system:
-       initializes all BGP resources,
-       starts the ConnectRetry timer,
-       initiates a transport connection to the other BGP peer,
-       listens for a connection that may be initiated by the remote BGP 
peer, and
-       changes its state to connect.

The exact value of the ConnectRetry timer is a local matter, but it should 
be sufficiently large to allow TCP initialization.

Any other event received in the IDLE state, is ignored.

IdleHold state:

| The IdleHold state keeps the system in "Idle" mode until a certain time 
period has passed or an
| operator intervenes to manually restart the connection.   This "IdleHold 
timeout" prevents
| persistent flapping of a BGP peering session.

| Upon entering the Idle Hold state, if the IdleHoldTimer exceeds the local 
limit the "Keep Idle" flag
|  is set.

| Upon receiving a Manual start, the local system:
| -     clears the IdleHoldtimer,
| -     clears "keep Idle" flag
| -     initializes all BGP resources,
| -     starts the ConnectRetry timer,
| -     initiates a transport connection to the other BGP peer,
| -     listens for a connection that may be initiated by the remote 
BGPPeer, and
| -     changes its state to connect.

|  Upon receiving a IdleHoldtimer expired event, the local system checks to 
see that the Keep Idle
| |  is set.  If the Keep Idle flag is set, the system stays in the "Idle 
Hold" state.
|  If the Keep Idle flag is not set, the local system:
| -     clears the IdleHoldtimer,
| -     and transitions the state to Idle.

| Getting out of the IdleHoldstate requires either operator intervention 
via a manual start or the
|  IdleHoldtimer to expire with the "Keep Idle" flag to be clear.

| Any other event received in the IdleHold state is ignored.

Connect State:

In this state, BGP is waiting for the transport protocol connection to be 
completed.

If the transport connection succeeds, the local system:
-       clears the ConnectRetry timer,
-       completes initialization,
-       send an Open message to its peer,
| -     set Hold timer to a large value,  and
-       changes its state to Open Sent.

A hold timer value of 4 minutes is suggested.

If the transport protocol connection fails (e.g., retransmission timeout), 
the local system:
-       restarts the ConnectRetry timer,
-       continues to listen for a connection that may be initiated by the 
remote BGP peer, and
-       changes its state to Active.

In response to the ConnectRetry timer expired event, the local system:
-     restarts the ConnectRetry timer,
-       initiates a transport connection to the other BGP peer,
         -       continues to listen for a connection that may be initiated 
by the remote BGP peer, and
         -       stays in Connect state.

The start event (manual or automatic) is ignored in the Connect state.

| In response to any other event (initiated by the system or operator), the 
local system:
| -     IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increment ConnectRetryCnt by 1,
| -     Set connect retry timer to zero,
| -     Drops TCP connection,
| -     Releases all BGP resources, and
| -     Goes to IdleHoldstate


Active State:

In this state BGP is trying to acquire a peer by listening for and 
accepting a transport protocol connection.

If the transport connection succeeds, the local system:
-       clears the ConnectRetry timer,
-       completes the initialization,
-       sends the Open message to it's peer,
-       sets its Hold timer to a large value,
-       and changes its state to OpenSent.

A Hold timer value of 4 minutes is suggested.

In response the ConnectRetry timer expired event, the local system:
-       restarts the ConnectRetry timer,
-       initiates a transport connection to the other BGP peer,
-       continues to listen for connection that may be initiated by remote 
BGP peer,
-       and changes its state to Connect.

If the local system does not allow BGP connections with unconfigured peers, 
then the local system:
-       rejects connections from IP addresses that are not configured peers,
-       and remains in the Active state.

| The start events (initiated by the system or operator) are ignored in the 
Active state.
[Note: Jeff Haas thinks that operators would want manual start to do 
something different.]

In response to any other event (initiated by the system or operator), the 
local system:
| -     IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increment ConnectRetryCnt by 1,
| -     Set connect retry timer to zero, and
| -     Drops TCP connection,
| -     Releases all BGP resources,
| -     Goes to IdleHold state.


Open Sent:

In this state BGP waits for an Open Message from its peer.  When an OPEN 
message is received, all fields are check for correctness.  If the BGP 
message header checking or OPEN message check detects an error (see Section 
6.2), or a connection collision (see Section 6.8) the local system:
-       sends a NOTIFICATION message
| -     IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increment ConnectRetryCnt by 1,
| -     Set connect retry timer to zero, and
| -     Drops TCP connection,
| -     Releases all BGP resources,
| -     Goes to IdleHold state.


| If there are no errors in the OPEN message, the local system:
|  -    sends a KEEPALIVE message and
| -     sets a KeepAlive timer (via the text below)
| -     set the Hold timer according to the negotiated value (see section 
4.2),
| -     set the state to Open Confirm.

If the negotiated Hold time value is zero, then the Hold Time timer and 
KeepAlive timers are not started.   If the value of the Autonomous System 
field is the same as the local Autonomous System number, then the 
connection is an "internal" connection; otherwise, it is an "external" 
connection.
|  (This will impact UPDATE processing as described below.)

If a disconnect NOTIFICATION is received from the underlying transport 
protocol, the local system:
-       closes the BGP connection,
-       restarts the Connect Retry timer,
-       and continues to listen for a connection that may be initiated by 
the remote BGP peer, and goes into Active state.

If the Hold Timer expires, the local system:
-       send a NOTIFICATION message with error code Hold Timer Expired,
| -     IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increment ConnectRetryCnt by 1,
| -     Set connect retry timer to zero, and
| -     Drops TCP connection,
| -     Releases all BGP resources, and
| -     Goes to IdleHold state.

The Start event (manual and automatic) is ignored in the OpenSent state.

| If a NOTIFICATION message is received with a version error, the local system:
| -     Closes the transport connection
| -     Releases BGP resources,
| -     ConnectRetryCnt = 0,
| -     Connect retry timer = 0, and
| -     transition to Idle state.

| If any other NOTIFICATION is received, the local system:
| -     IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increment ConnectRetryCnt by 1,
| -     Set connect retry timer to zero, and
| -     Drops TCP connection,
| -     Releases all BGP resources,
| -     Goes to IdleHold state.

| In response to any other event, the local system:
| -     sends the NOTFICATION message with Error Code Finite State 
Machine  Error,
| -     IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increment ConnectRetryCnt by 1,
| -     Set connect retry timer to zero,
| -     Drops TCP connection,
| -     Releases all BGP resources, and
| -     Goes to IdleHold state.

Open Confirm State

In this state BGP waits for a KEEPALIVE or NOTIFICATION message.

If the local system receives a KEEPALIVE message, it changes its state to 
Established.

| If the Hold Timer expires before a KEEPALIVE message is received, the 
local system:
| -     send the NOTIFICATION message with the error code Hold Timer Expired,
| -     sets IdleHoldTimer = 2**(ConnectRetryCnt)*60
| -     Increments ConnectRetryCnt by 1,
| -     Sets the connect retry timer to zero,
| -     Drop the TCP connection,
| -     Releases all BGP resources,
| -     Goes to IdleHoldState.

| If the local system receives a NOTIFICATION message or receives a 
disconnect NOTIFICATION
| from the underlying transport protocol, the local system:
|-      Sets IdleHold Timer = 2**(ConnectRetryCnt)*60
| -     Increments ConnectRetryCnt by 1,
| -     Sets the co nnect retry timer to zero,
| -     Drops the TCP connection,
| -     Releases all BGP resources,
| -     Goes to IdleHoldstate.

| In response to the Stop event initiated by the system, the local system:
| -     sends the NOTIFICATION message with Cease,
| -     sets IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increments ConnectRetryCnt by 1,
| -     Sets the Connect retry timer to zero,
| -     Drops the TCP connection,
| -     Releases all BGP resources,
| -     Goes to IdleHoldstate.


| In response to a Stop event initiated by the operator, the local system:
| -     sends the NOTIFICATION message with Cease,
| -     releases all BGP resources
| -     sets the ConnectRetryCnt to zero
| -     sets the connect retry timer to 0
| -     transitions to Idle state.

The Start event is ignored in the OpenConfirm state.

| In response to any other event, the local system:
| -     sends a NOTIFICATION with a code of Finite State Machine Error,
| -     sets IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increments ConnectRetryCnt by 1,
| -     Sets the Connect retry timer to zero,
| -     Drops the TCP connection,
| -     Releases all BGP resources,
| -     Goes to IdleHoldstate.

Established State:

In the Established state BGP can exchange UPDATE, NOTFICATION, and 
KEEPALIVE messages with its peer.

If the local system receives an UPDATE or KEEPALIVE message, it restarts 
its Hold Timer, if the negotiated Hold Time value is non-zero.

| If the local system receives a NOTIFICATION message or a disconnect from 
the underlying | transport protocol, it:
|  -    sets IdleHoldtimer = 2**(ConnectRetryCnt)*60,
| -     Increments ConnectRetryCnt by 1,
| -     Sets the Connect retry timer to zero,
| -     Drops the TCP connection,
| -     Releases all BGP resources, and
| -     Goes to IdleHoldstate.

If the local system receives an UPDATE message, and the Update message 
error handling procedure (see Section 6.3) detecs an error, the local 
system:
-       sends a NOTIFICATION message with Update error,
|       -       sets IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increments ConnectRetryCnt by 1,
| -     Sets the Connect retry timer to zero,
| -     Drops the TCP connection,
| -     Releases all BGP resources, and
| -     Goes to IdleHoldstate.
-
If the Hold timer expires, the local system:
-       sends a NOTIFICATION message with Error Code Hold Timer Expired,
| -     sets IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     Increments ConnectRetryCnt by 1,
| -     Sets the connect retry timer to zero,
| -     Drops the TCP connection,
| -     Releases all BGP resources,
| -     Goes to IdleHold state.

If the KeepAlive timer expires, the local system sends a KEEPALIVE message, 
it restarts its KeepAlive timer, unless the negotiated Hold Time value is zero.

Each time time the local system sends a KEEPALIVE or UPDATE message, it 
restarts its KeepAlive timer, unless the negotiated Hold Time value is zero.

| In response to the Stop event initiated by the system (automatic), the 
local system:
| -     sends a NOTIFICATION with Cease,
| -     sets IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     increments ConnectRetryCnt by 1,
| -     sets the connect retry timer to zero,
| -     drops the TCP connection,
| -     releases all BGP resources,
| -     goes to IdleHold state, and
| -     deletes all routes.

| An example automatic stop event is exceeding the number of prefixes for a 
given peer and the local
|  system automatically disconnecting the peer.

| In response to a stop event initiated by an operator:
| -     release all resources (including deleting all routes),
| -     set ConnectRetryCnt to zero (0),
| -     set connect retry timer to zero (0), and
| -     transition to the Idle.

| The Start event is ignored in the Established state.

| In response to any other event, the local system:
| -     sends a NOTIFICATION message with Error Code Finite State Machine 
Error,
| -     sets IdleHoldtimer = 2**(ConnectRetryCnt)*60
| -     increments ConnectRetryCnt by 1,
| -     sets the connect retry timer to zero,
| -     drops the TCP connection,
| -     releases all BGP resources
| -     goes to IdleHoldstate, and
| -     deletes all routes.