Skip to main content

8.1. Events for the BGP FSM

8.1. Events for the BGP FSM

8.1.1. Optional Events Linked to Optional Session Attributes

The Inputs to the BGP FSM are events. Events can either be mandatory or optional. Some optional events are linked to optional session attributes. Optional session attributes enable several groups of FSM functionality.

The linkage between FSM functionality, events, and the optional session attributes are described below.

  Group 1: Automatic Administrative Events (Start/Stop)

Optional Session Attributes: AllowAutomaticStart,
AllowAutomaticStop,
DampPeerOscillations,
IdleHoldTime, IdleHoldTimer

Option 1: AllowAutomaticStart

Description: A BGP peer connection can be started and stopped
by administrative control. This administrative
control can either be manual, based on operator
intervention, or under the control of logic that
is specific to a BGP implementation. The term
"automatic" refers to a start being issued to the
BGP peer connection FSM when such logic determines
that the BGP peer connection should be restarted.

The AllowAutomaticStart attribute specifies that
this BGP connection supports automatic starting of
the BGP connection.

If the BGP implementation supports
AllowAutomaticStart, the peer may be repeatedly
restarted. Three other options control the rate
at which the automatic restart occurs:
DampPeerOscillations, IdleHoldTime, and the
IdleHoldTimer.

The DampPeerOscillations option specifies that the
implementation engages additional logic to damp
the oscillations of BGP peers in the face of
sequences of automatic start and automatic stop.
IdleHoldTime specifies the length of time the BGP
peer is held in the Idle state prior to allowing
the next automatic restart. The IdleHoldTimer is
the timer that holds the peer in Idle state.

An example of DampPeerOscillations logic is an
increase of the IdleHoldTime value if a BGP peer
oscillates connectivity (connected/disconnected)
repeatedly within a time period. To engage this
logic, a peer could connect and disconnect 10
times within 5 minutes. The IdleHoldTime value
would be reset from 0 to 120 seconds.

Values: TRUE or FALSE

Option 2: AllowAutomaticStop

Description: This BGP peer session optional attribute indicates
that the BGP connection allows "automatic"
stopping of the BGP connection. An "automatic"
stop is defined as a stop under the control of
implementation-specific logic. The
implementation-specific logic is outside the scope
of this specification.

Values: TRUE or FALSE

Option 3: DampPeerOscillations

Description: The DampPeerOscillations optional session
attribute indicates that the BGP connection is
using logic that damps BGP peer oscillations in
the Idle State.

Value: TRUE or FALSE

Option 4: IdleHoldTime

Description: The IdleHoldTime is the value that is set in the
IdleHoldTimer.

Values: Time in seconds

Option 5: IdleHoldTimer

Description: The IdleHoldTimer aids in controlling BGP peer
oscillation. The IdleHoldTimer is used to keep
the BGP peer in Idle for a particular duration.
The IdleHoldTimer_Expires event is described in
Section 8.1.3.

Values: Time in seconds

Group 2: Unconfigured Peers

Optional Session Attributes: AcceptConnectionsUnconfiguredPeers

Option 1: AcceptConnectionsUnconfiguredPeers

Description: The BGP FSM optionally allows the acceptance of
BGP peer connections from neighbors that are not
pre-configured. The
"AcceptConnectionsUnconfiguredPeers" optional
session attribute allows the FSM to support the
state transitions that allow the implementation to
accept or reject these unconfigured peers.

The AcceptConnectionsUnconfiguredPeers has
security implications. Please refer to the BGP
Vulnerabilities document [RFC4272] for details.

Value: True or False

Group 3: TCP processing

Optional Session Attributes: PassiveTcpEstablishment,
TrackTcpState

Option 1: PassiveTcpEstablishment

Description: This option indicates that the BGP FSM will
passively wait for the remote BGP peer to
establish the BGP TCP connection.

value: TRUE or FALSE

Option 2: TrackTcpState

Description: The BGP FSM normally tracks the end result of a
TCP connection attempt rather than individual TCP
messages. Optionally, the BGP FSM can support
additional interaction with the TCP connection
negotiation. The interaction with the TCP events
may increase the amount of logging the BGP peer
connection requires and the number of BGP FSM
changes.

Value: TRUE or FALSE

Group 4: BGP Message Processing

Optional Session Attributes: DelayOpen, DelayOpenTime,
DelayOpenTimer,
SendNOTIFICATIONwithoutOPEN,
CollisionDetectEstablishedState

Option 1: DelayOpen

Description: The DelayOpen optional session attribute allows
implementations to be configured to delay sending
an OPEN message for a specific time period
(DelayOpenTime). The delay allows the remote BGP
Peer time to send the first OPEN message.

Value: TRUE or FALSE

Option 2: DelayOpenTime

Description: The DelayOpenTime is the initial value set in the
DelayOpenTimer.

Value: Time in seconds

Option 3: DelayOpenTimer

Description: The DelayOpenTimer optional session attribute is
used to delay the sending of an OPEN message on a
connection. The DelayOpenTimer_Expires event
(Event 12) is described in Section 8.1.3.

Value: Time in seconds

Option 4: SendNOTIFICATIONwithoutOPEN

Description: The SendNOTIFICATIONwithoutOPEN allows a peer to
send a NOTIFICATION without first sending an OPEN
message. Without this optional session attribute,
the BGP connection assumes that an OPEN message
must be sent by a peer prior to the peer sending a
NOTIFICATION message.

Value: True or False

Option 5: CollisionDetectEstablishedState

Description: Normally, a Detect Collision (see Section 6.8)
will be ignored in the Established state. This
optional session attribute indicates that this BGP
connection processes collisions in the Established
state.

Value: True or False

Note: The optional session attributes clarify the BGP FSM
description for existing features of BGP implementations.
The optional session attributes may be pre-defined for an
implementation and not readable via management interfaces
for existing correct implementations. As newer BGP MIBs
(version 2 and beyond) are supported, these fields will be
accessible via a management interface.

8.1.2. Administrative Events

An administrative event is an event in which the operator interface and BGP Policy engine signal the BGP-finite state machine to start or stop the BGP state machine. The basic start and stop indications are augmented by optional connection attributes that signal a certain type of start or stop mechanism to the BGP FSM. An example of this combination is Event 5, AutomaticStart_with_PassiveTcpEstablishment. With this event, the BGP implementation signals to the BGP FSM that the implementation is using an Automatic Start with the option to use a Passive TCP Establishment. The Passive TCP establishment signals that this BGP FSM will wait for the remote side to start the TCP establishment.

Note that only Event 1 (ManualStart) and Event 2 (ManualStop) are mandatory administrative events. All other administrative events are optional (Events 3-8). Each event below has a name, definition, status (mandatory or optional), and the optional session attributes that SHOULD be set at each stage. When generating Event 1 through Event 8 for the BGP FSM, the conditions specified in the "Optional Attribute Status" section are verified. If any of these conditions are not satisfied, then the local system should log an FSM error.

The settings of optional session attributes may be implicit in some implementations, and therefore may not be set explicitly by an external operator action. Section 8.2.1.5 describes these implicit settings of the optional session attributes. The administrative states described below may also be implicit in some implementations and not directly configurable by an external operator.

  Event 1: ManualStart

Definition: Local system administrator manually starts the peer
connection.

Status: Mandatory

Optional
Attribute
Status: The PassiveTcpEstablishment attribute SHOULD be set
to FALSE.

Event 2: ManualStop

Definition: Local system administrator manually stops the peer
connection.

Status: Mandatory

Optional
Attribute
Status: No interaction with any optional attributes.

Event 3: AutomaticStart

Definition: Local system automatically starts the BGP
connection.

Status: Optional, depending on local system

Optional
Attribute
Status: 1) The AllowAutomaticStart attribute SHOULD be set
to TRUE if this event occurs.
2) If the PassiveTcpEstablishment optional session
attribute is supported, it SHOULD be set to
FALSE.
3) If the DampPeerOscillations is supported, it
SHOULD be set to FALSE when this event occurs.

Event 4: ManualStart_with_PassiveTcpEstablishment

Definition: Local system administrator manually starts the peer
connection, but has PassiveTcpEstablishment
enabled. The PassiveTcpEstablishment optional
attribute indicates that the peer will listen prior
to establishing the connection.

Status: Optional, depending on local system

Optional
Attribute
Status: 1) The PassiveTcpEstablishment attribute SHOULD be
set to TRUE if this event occurs.
2) The DampPeerOscillations attribute SHOULD be set
to FALSE when this event occurs.

Event 5: AutomaticStart_with_PassiveTcpEstablishment

Definition: Local system automatically starts the BGP
connection with the PassiveTcpEstablishment
enabled. The PassiveTcpEstablishment optional
attribute indicates that the peer will listen prior
to establishing a connection.

Status: Optional, depending on local system

Optional
Attribute
Status: 1) The AllowAutomaticStart attribute SHOULD be set
to TRUE.
2) The PassiveTcpEstablishment attribute SHOULD be
set to TRUE.
3) If the DampPeerOscillations attribute is
supported, the DampPeerOscillations SHOULD be
set to FALSE.

Event 6: AutomaticStart_with_DampPeerOscillations

Definition: Local system automatically starts the BGP peer
connection with peer oscillation damping enabled.
The exact method of damping persistent peer
oscillations is determined by the implementation
and is outside the scope of this document.

Status: Optional, depending on local system.

Optional
Attribute
Status: 1) The AllowAutomaticStart attribute SHOULD be set
to TRUE.
2) The DampPeerOscillations attribute SHOULD be set
to TRUE.
3) The PassiveTcpEstablishment attribute SHOULD be
set to FALSE.

Event 7: AutomaticStart_with_DampPeerOscillations_and_
PassiveTcpEstablishment

Definition: Local system automatically starts the BGP peer
connection with peer oscillation damping enabled
and PassiveTcpEstablishment enabled. The exact
method of damping persistent peer oscillations is
determined by the implementation and is outside the
scope of this document.

Status: Optional, depending on local system

Optional
Attributes
Status: 1) The AllowAutomaticStart attribute SHOULD be set
to TRUE.
2) The DampPeerOscillations attribute SHOULD be set
to TRUE.
3) The PassiveTcpEstablishment attribute SHOULD be
set to TRUE.

Event 8: AutomaticStop

Definition: Local system automatically stops the BGP
connection.

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

Status: Optional, depending on local system

Optional
Attribute
Status: 1) The AllowAutomaticStop attribute SHOULD be TRUE.

8.1.3. Timer Events

  Event 9: ConnectRetryTimer_Expires

Definition: An event generated when the ConnectRetryTimer
expires.

Status: Mandatory

Event 10: HoldTimer_Expires

Definition: An event generated when the HoldTimer expires.

Status: Mandatory

Event 11: KeepaliveTimer_Expires

Definition: An event generated when the KeepaliveTimer expires.

Status: Mandatory

Event 12: DelayOpenTimer_Expires

Definition: An event generated when the DelayOpenTimer expires.

Status: Optional

Optional
Attribute
Status: If this event occurs,
1) DelayOpen attribute SHOULD be set to TRUE,
2) DelayOpenTime attribute SHOULD be supported,
3) DelayOpenTimer SHOULD be supported.

Event 13: IdleHoldTimer_Expires

Definition: An event generated when the IdleHoldTimer expires,
indicating that the BGP connection has completed
waiting for the back-off period to prevent BGP peer
oscillation.

The IdleHoldTimer is only used when the persistent
peer oscillation damping function is enabled by
setting the DampPeerOscillations optional attribute
to TRUE.

Implementations not implementing the persistent
peer oscillation damping function may not have the
IdleHoldTimer.

Status: Optional

Optional
Attribute
Status: If this event occurs:
1) DampPeerOscillations attribute SHOULD be set to
TRUE.
2) IdleHoldTimer SHOULD have just expired.

8.1.4. TCP Connection-Based Events

  Event 14: TcpConnection_Valid

Definition: Event indicating the local system reception of a
TCP connection request with a valid source IP
address, TCP port, destination IP address, and TCP
Port. The definition of invalid source and invalid
destination IP address is determined by the
implementation.

BGP's destination port SHOULD be port 179, as
defined by IANA.

TCP connection request is denoted by the local
system receiving a TCP SYN.

Status: Optional

Optional
Attribute
Status: 1) The TrackTcpState attribute SHOULD be set to
TRUE if this event occurs.

Event 15: Tcp_CR_Invalid

Definition: Event indicating the local system reception of a
TCP connection request with either an invalid
source address or port number, or an invalid
destination address or port number.

BGP destination port number SHOULD be 179, as
defined by IANA.

A TCP connection request occurs when the local
system receives a TCP SYN.

Status: Optional

Optional
Attribute
Status: 1) The TrackTcpState attribute should be set to
TRUE if this event occurs.

Event 16: Tcp_CR_Acked

Definition: Event indicating the local system's request to
establish a TCP connection to the remote peer.

The local system's TCP connection sent a TCP SYN,
received a TCP SYN/ACK message, and sent a TCP ACK.

Status: Mandatory

Event 17: TcpConnectionConfirmed

Definition: Event indicating that the local system has received
a confirmation that the TCP connection has been
established by the remote site.

The remote peer's TCP engine sent a TCP SYN. The
local peer's TCP engine sent a SYN, ACK message and
now has received a final ACK.

Status: Mandatory

Event 18: TcpConnectionFails

Definition: Event indicating that the local system has received
a TCP connection failure notice.

The remote BGP peer's TCP machine could have sent a
FIN. The local peer would respond with a FIN-ACK.
Another possibility is that the local peer
indicated a timeout in the TCP connection and
downed the connection.

Status: Mandatory

8.1.5. BGP Message-Based Events

  Event 19: BGPOpen

Definition: An event is generated when a valid OPEN message has
been received.

Status: Mandatory

Optional
Attribute
Status: 1) The DelayOpen optional attribute SHOULD be set
to FALSE.
2) The DelayOpenTimer SHOULD not be running.

Event 20: BGPOpen with DelayOpenTimer running

Definition: An event is generated when a valid OPEN message has
been received for a peer that has a successfully
established transport connection and is currently
delaying the sending of a BGP open message.

Status: Optional

Optional
Attribute
Status: 1) The DelayOpen attribute SHOULD be set to TRUE.
2) The DelayOpenTimer SHOULD be running.

Event 21: BGPHeaderErr

Definition: An event is generated when a received BGP message
header is not valid.

Status: Mandatory

Event 22: BGPOpenMsgErr

Definition: An event is generated when an OPEN message has been
received with errors.

Status: Mandatory

Event 23: OpenCollisionDump

Definition: An event generated administratively when a
connection collision has been detected while
processing an incoming OPEN message and this
connection has been selected to be disconnected.
See Section 6.8 for more information on collision
detection.

Event 23 is an administrative action generated by
implementation logic that determines whether this
connection needs to be dropped per the rules in
Section 6.8. This event may occur if the FSM is
implemented as two linked state machines.

Status: Optional

Optional
Attribute
Status: If the state machine is to process this event in
the Established state,
1) CollisionDetectEstablishedState optional
attribute SHOULD be set to TRUE.

Please note: The OpenCollisionDump event can occur
in Idle, Connect, Active, OpenSent, and OpenConfirm
without any optional attributes being set.

Event 24: NotifMsgVerErr

Definition: An event is generated when a NOTIFICATION message
with "version error" is received.

Status: Mandatory

Event 25: NotifMsg

Definition: An event is generated when a NOTIFICATION message
is received and the error code is anything but
"version error".

Status: Mandatory

Event 26: KeepAliveMsg

Definition: An event is generated when a KEEPALIVE message is
received.

Status: Mandatory

Event 27: UpdateMsg

Definition: An event is generated when a valid UPDATE message
is received.

Status: Mandatory

Event 28: UpdateMsgErr

Definition: An event is generated when an invalid UPDATE
message is received.

Status: Mandatory