<?xml version="1.0" encoding="US-ASCII"?>
<!-- used xml2rfc v2 -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  
  <!ENTITY RFC2119 SYSTEM "reference.RFC.2119.xml">
  <!ENTITY RFC5810 SYSTEM "reference.RFC.5810.xml">
  <!ENTITY RFC5812 SYSTEM "reference.RFC.5812.xml">
  <!ENTITY RFC5226 SYSTEM "reference.RFC.5226.xml">
  <!ENTITY RFC3654 SYSTEM "reference.RFC.3654.xml">
  <!ENTITY RFC3746 SYSTEM "reference.RFC.3746.xml">
 
]>
<?rfc rfcedstyle="yes"?>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" ipr="trust200902" consensus="yes" submissionType="IETF" number="7121" updates="5810">
  <front>
    <title abbrev="ForCES Intra-NE High Availability">
		 High Availability within a Forwarding and Control Element
Separation (ForCES) Network Element
	  </title>

    <author fullname="Kentaro Ogawa" initials="K." surname="Ogawa">
      <organization>NTT Corporation</organization>
      <address>
        <postal>
          <street>3-9-11 Midori-cho</street>
          <city>Musashino-shi, Tokyo</city>
          <code>180-8585</code>
          <country>Japan</country>
        </postal>
        <email>k.ogawa@ntt.com</email>
      </address>
    </author>
       <author fullname="Weiming Wang" initials="W.M.W." surname="Wang">
           <organization>Zhejiang Gongshang University</organization>
           <address>
               <postal>
                   <street>18 Xuezheng Str., Xiasha University Town </street>
                   <city>Hangzhou</city>
                   <code>310018</code>
                   <country>P.R. China</country>
               </postal>
               <phone>+86 571 28877751</phone>
               <email>wmwang@zjsu.edu.cn</email>
           </address>
       </author>
		<author fullname="Evangelos Haleplidis" initials="E.H." surname="Haleplidis">
			<organization>University of Patras</organization>
			<address>
				<postal>
					<street>Department of Electrical and Computer Engineering</street>
					<city>Patras</city>
					<region/>
					<code>26500</code>
					<country>Greece</country>
				</postal>
				<email>ehalep@ece.upatras.gr</email>
			</address>
		</author>
    <author fullname="Jamal Hadi Salim" initials="J." surname="Hadi Salim">
      <organization>Mojatatu Networks</organization>
      <address>
        <postal>
          <street>Suite 400, 303 Moodie Dr.</street>
          <city>Ottawa, Ontario</city>
          <code>K2H 9R4</code>
          <country>Canada</country>
        </postal>
        <email>hadi@mojatatu.com</email>
      </address>
    </author>
    <date month="February" year="2014"/>
    <area>Routing</area>

    <keyword>ForCES</keyword>
    <keyword>HA</keyword>


    <abstract>
      <t>
This document discusses Control Element (CE) High Availability (HA) within a Forwarding and Control Element Separation (ForCES) Network Element (NE).

Additionally, this document updates RFC 5810 by providing new normative text for the Cold Standby High Availability mechanism.
</t>
    </abstract>
  </front>
  <middle>

    <section title="Introduction">

      <figure anchor="ne_arch" title="ForCES Architecture">
        <preamble>
          <xref target="ne_arch"/> illustrates a ForCES
Network Element (NE) controlled by a set of redundant Control Elements (CEs) with CE1 being active
and CE2 and CEn being backups.
</preamble>
        <artwork><![CDATA[
                        -----------------------------------------
                        | ForCES Network Element                |
                        |                        +-----------+  |
                        |                        |  CEn      |  |
                        |                        |  (Backup) |  |
  --------------   Fc   | +------------+      +------------+ |  |
  | CE Manager |--------+-|     CE1    |------|    CE2     |-+  |
  --------------        | |  (Active)  |  Fr  |  (Backup)  |    |
        |               | +-------+--+-+      +---+---+----+    |
        | Fl            |         |  |    Fp      /   |         |
        |               |         |  +---------+ /    |         |
        |               |       Fp|            |/     |Fp       |
        |               |         |            |      |         |
        |               |         |      Fp   /+--+   |         |
        |               |         |  +-------+    |   |         |
        |               |         |  |            |   |         |
  --------------    Ff  | --------+--+--      ----+---+----+    |
  | FE Manager |--------+-|     FE1    |  Fi  |     FE2    |    |
  --------------        | |            |------|            |    |
                        | --------------      --------------    |
                        |   |  |  |  |          |  |  |  |      |
                        ----+--+--+--+----------+--+--+--+-------
                            |  |  |  |          |  |  |  |
                            |  |  |  |          |  |  |  |
                              Fi/f                   Fi/f

       Fp: CE-FE interface
       Fi: FE-FE interface
       Fr: CE-CE interface
       Fc: Interface between the CE manager and a CE
       Ff: Interface between the FE manager and an FE
       Fl: Interface between the CE manager and the FE manager
       Fi/f: FE external interface
]]></artwork>
      </figure>
      <t>
The ForCES architecture allows Forwarding Elements (FEs) to be aware of multiple CEs
but enforces that only one CE be the master controller. This is known
in the industry as 1+N redundancy. The master CE controls the 
FEs via the ForCES protocol operating on the Fp interface. If the master CE
becomes faulty, i.e., crashes or loses connectivity, a backup CE takes over 
and NE operation continues. By definition, the current documented setup is
known as cold standby. The set of CEs controlling an FE is static and is 
passed to the FE by the FE Manager (FEM) via the Ff interface and to each
CE by the CE Manager (CEM) in the Fc interface during the pre-association phase.
</t>
      <t>
From an FE perspective, the operational parameters for a CE set are
defined as components in the FEPO LFB in <xref target="RFC5810" />, Appendix B.
In <xref target="HAnow"/> of this document, we discuss further details of these parameters.
</t>
        <t>
It is assumed that the reader is aware of the ForCES architecture to
make sense of the changes being described in this document. This document 
provides background information to set the context of the discussion in 
<xref target="hsb"/>.
</t>
        <t>
At the time of writing, the Fr interface is out of scope 
for the ForCES architecture.  However, it is expected that organizations 
implementing a set of CEs will need to have the CEs communicate
to each other via the Fr interface in order to achieve the 
synchronization necessary for controlling the FEs.
</t>
        <t>
The problem scope addressed by this document
falls into two areas:
<list style="numbers">
            <t>
To update the description of <xref target="RFC5810"/> with more clarity on how the
current cold standby approach operates within the NE cluster. 
</t>
            <t>
To describe how to evolve the <xref target="RFC5810"/> cold standby
setup to a hot standby redundancy setup to improve the failover 
time and NE availability.
</t>
          </list>
        </t>
     

     <section title="Quantifying Problem Scope" anchor="quant">
        <t>
NE recovery and availability is dependent on several time-sensitive
metrics:
<list style="numbers">
            <t>
       How fast the CE plane failure is detected by the FE.
       </t>
            <t>
	How fast a backup CE becomes operational.
       </t>
            <t>
	 How fast the FEs associate with the new master CE.
       </t>
            <t>
	 How fast the FEs recover their state and become operational. Each FE state is the collective state of all its instantiated LFBs.
       </t>
          </list>
        </t>
        <t>
The design intent of <xref target="RFC5810"/> as well as this
document 
to meet the above goals is driven by desire for simplicity.
</t>
        <t>
To quantify the above criteria with the current prescribed 
ForCES CE setup in <xref target="RFC5810"/>: 
<list style="numbers">
            <t>
How fast the FE side detects a CE failure is left undefined. To
illustrate an extreme scenario, we could have a human operator
acting as the monitoring entity to detect faulty CEs. How fast such
detection happens could be in the range of seconds to days. A more
active monitor on the Fp interface could improve this detection. Usually, 
the FE will detect a CE failure either by the TML if the Fp interface terminates
or by the ForCES protocol by utilizing the ForCES Heartbeat mechanism.
            </t>
            <t>
How fast the backup CE becomes operational is also currently out of scope.
In the current setup, a backup CE need not be operational at all
(for example, to save power), and therefore it is feasible for a 
monitoring entity to boot up a backup CE after it detects the 
failure of the master CE. In <xref target="hsb"/> of this document,
we suggest that at least one backup CE be online so as to improve this
metric.
</t>
            <t>
How fast an FE associates with a new master CE is also currently undefined.
The cost of an FE connecting and associating adds to the recovery overhead. 
As mentioned above, we suggest having at least one backup CE online.
In <xref target="hsb"/>, we propose to remove the connection and association cost
on failover by having each FE associate with all online backup CEs
after associating to an active/master CE.
Note that if an FE pre-associates with at least one backup CE, then 
the system will be technically operating in hot standby mode.
</t>

            <t>
Finally, how fast an FE recovers its state depends on how much NE state
exists. By the ForCES current definition, the new master CE assumes zero state
on the FE and starts from scratch to update the FE. 
So, the larger the state, the longer the recovery.
            </t>
          </list>
        </t>
      </section>

    <section title="Definitions">
      <t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
this document are to be interpreted as described in <xref target="RFC2119"></xref>.

</t>
      <t>
		          
The following definitions are taken from <xref target="RFC3654"/>, 
<xref target="RFC3746"/>, and <xref target="RFC5810"/>. They are repeated here for convenience as needed, 
but the normative definitions are found in the referenced RFCs:
<list style="hanging">
          <t hangText="Logical Functional Block (LFB):"> 
A template that represents fine-grained, logically separate
aspects of FE processing.
</t>
<t hangText="Forwarding Element (FE):"> A logical entity that implements the ForCES
   protocol.  FEs use the underlying hardware to provide per-packet
   processing and handling as directed by a CE via the ForCES protocol.
   </t>

<t hangText="Control Element (CE):"> A logical entity that implements the ForCES
   protocol and uses it to instruct one or more FEs on how to process
   packets.  CEs handle functionality such as the execution of control
   and signaling protocols.</t>
   
<t hangText="ForCES Network Element (NE):"> An entity composed of one or more CEs
   and one or more FEs.  An NE usually hides its internal organization
   from external entities and represents a single point of management to
   entities outside the NE.</t>
   
<t hangText="FE Manager (FEM):"> A logical entity that operates in the pre-association
   phase and is responsible for determining to which CE(s) an FE should
   communicate.  This process is called CE discovery and may involve the
   FE manager learning the capabilities of available CEs. </t>

<t hangText="CE Manager (CEM):"> A logical entity that operates in the pre-association
   phase and is responsible for determining to which FE(s) a CE should
   communicate.  This process is called FE discovery and may involve the
   CE manager learning the capabilities of available FEs. </t>

          <t hangText="ForCES Protocol:"> 
   The protocol used for communication between CEs and FEs. This protocol
   does not apply to CE-to-CE communication, FE-to-FE communication, or
   to communication between FE and CE managers.  The ForCES protocol is
   a master-slave protocol in which FEs are slaves and CEs are masters.
   This protocol includes both the management of the communication
   channel (e.g., connection establishment and heartbeats) and the control
   messages themselves.
</t>
          <t hangText="ForCES Protocol Layer (ForCES PL):"> 
   A layer in the ForCES protocol architecture that defines the ForCES
   protocol messages, the protocol state transfer scheme, and the ForCES
   protocol architecture itself (including requirements of ForCES Transport Mapping Layer (TML) as
   shown below). Specifications of ForCES PL are defined in <xref target="RFC5810"></xref>.
   </t>
   
          <t hangText="ForCES Protocol Transport Mapping Layer (ForCES TML):"> A layer in 
the ForCES protocol architecture that specifically addresses the 
protocol message transportation issues, such as how the protocol 
messages are mapped to different transport media (like Stream Control Transmission Protocol (SCTP), IP, 
TCP, UDP, ATM, Ethernet, etc.), and how to achieve and implement 
reliability, security, etc.
</t>
           </list>
      </t>
  
    </section>
  

    </section>
    <section title="RFC 5810 CE HA Framework" anchor="curr">
      <t>
To achieve CE High Availability (HA), FEs and CEs MUST interoperate per 
the definition in <xref target="RFC5810"/>,
which is repeated for contextual reasons in <xref target="HAnow"/>. 
It should be noted that in this default setup, which MUST be 
implemented by CEs and FEs requiring HA, the Fr plane is out of 
scope (and if available, is proprietary to an implementation).
</t>
      <section anchor="HAnow" title="RFC 5810 CE HA Support">
        <t>
     As mentioned earlier, although there can be multiple redundant CEs,
     only one CE actively controls FEs in a ForCES NE. In practice, 
     there may be only one backup CE.
     At any moment in time, only one master CE can control an FE. 
     In addition, the
     FE connects and associates to only the master CE. The FE and the CE
     are aware of the primary and one or more secondary CEs. 
     This information (primary and 
     secondary CEs) is configured on the FE and the CE during
     pre-association by the FEM and the CEM, respectively.
     </t>
     <t>This section includes a new normative description that updates <xref target="RFC5810"/> for the Cold Standby High Availability mechanism.</t>
        <t>
          <xref target="seq_HA_Report_Primary"/> below 
	 illustrates the ForCES message sequences that the FE
	 uses to recover the connection in the currently defined
         cold standby scheme.
      </t>
        <figure anchor="seq_HA_Report_Primary" title="CE Failover for Cold Standby">
          <artwork><![CDATA[

      FE                       CE Primary         CE Secondary
      |                           |                     |
      | Association Establishment |                     |
      |   Capabilities Exchange   |                     |
    1 |<------------------------->|                     |
      |                           |                     |
      |       State Update        |                     |
    2 |<------------------------->|                     |
      |                           |                     |
      |                           |                     |
      |                        FAILURE                  |
      |                                                 |
      | Association Establishment, Capabilities Exchange|
    3 |<----------------------------------------------->|
      |                                                 |
      |         Event Report (primary CE down)          |
    4 |------------------------------------------------>|
      |                                                 |
      |                  State Update                   |
    5 |<----------------------------------------------->|
 ]]></artwork>
        </figure>
        <section anchor="FEPOHA" title="Cold Standby Interaction with the ForCES Protocol">
          <t>
HA parameterization in an FE is 
driven by configuring the FE Protocol Object (FEPO) LFB. 
</t>
          <t>
    The FEPO Control Element ID (CEID) component identifies the current master CE, and the
    component table BackupCEs identifies the configured backup CEs.
    The FEPO FE Heartbeat Interval (FEHI), CE Heartbeat Dead Interval (CEHDI),
    and CE Heartbeat policy help in detecting connectivity
    problems between an FE and CE. The CE failover policy defines
    how the FE should react on a detected failure. The FEObject FEState
    component <xref target="RFC5812"/> 
    defines the operational forwarding status and control. The CE can
    turn off the FE's forwarding operations by setting the FEState to
    AdminDisable and can turn it on by setting it to OperEnable. 
    Note: Section 5.1 of <xref target="RFC5812"/> has been updated by an erratum (<xref target="Err3487" />) that 
    describes the FEState as read-only when it should be read-write.

</t>
          <t>
            <xref target="FESM"/> illustrates the defined state machine that facilitates the recovery of the connection state.
</t>
          <t>
The FE connects to the CE specified on the FEPO CEID component.
If it fails to connect to the defined CE, it moves it
to the bottom of table BackupCEs and sets its CEID
component to be the first CE retrieved from table BackupCEs.
The FE then attempts to associate with the CE designated as the new
primary CE. The FE continues through this procedure until it 
successfully connects to one of the CEs or until the CE Failover Timeout Interval (CEFTI) expires.
</t>
          <figure anchor="FESM" title="FE State Machine Considering HA">
            <artwork><![CDATA[
                          FE tries to associate    
                                +-->-----+
                                |        |
   (CE changes master ||        |        |
   CE issues Teardown ||    +---+--------v----+     
     Lost association) &&   | Pre-association |
    CE failover policy = 0  | (Association    |     
        +------------>-->-->|   in            +<----+
        |                   | progress)       |     |
        |                   |                 |     |
        |                   +--------+--------+     |
        |  CE Association        |                  | CEFTI
        |       Response         V                  | timer 
        |     +------------------+                  | expires
        |     |FE issues CEPrimaryDown              ^             
        |     V                                     |    
      +-+-----------+                        +------+-----+     
      |             |  (CE changes master || | Not        |     
      |             |  CE issues Teardown || | Associated |     
      |             |  Lost association) &&  |            +->---+     
      | Associated  | CE failover policy = 1 |(May        | FE  |
      |             |                        | Continue   | try v 
      |             |-------->------->------>| Forwarding)| assn| 
      |             |   Start CEFTI timer    |            |-<---+ 
      |             |                        |            |
      +-------------+                        +-------+----+     
           ^                                         |
           |            Successful                   V
           |            Association                  |
           |            Setup                        |
           |            (Cancel CEFTI timer)         |
           +_________________________________________+
                    FE issues CEPrimaryDown event 
]]></artwork>
          </figure>
          <t>
There are several events that trigger mastership changes.  The master
CE may issue a mastership change (by changing the CEID component),
it may tear down an existing association, or connectivity
may be lost between the CE and FE.
</t>
          <t>
When communication fails between the FE and CE (which can be caused
by either the CE or link failure but is not FE related), either the TML on the
FE will trigger the FE PL regarding this failure or it will be detected
using the Heartbeat messages between FEs and CEs. The communication failure,
regardless of how it is detected, MUST be considered to be a loss of
association between the CE and corresponding FE.
</t>
          <t>If the FE's FEPO CE failover policy is configured to mode 0 
(the default), it will immediately transition to the pre-association
phase. This means that if association is later re-established with a
CE, all FE states will need to be re-created.
</t>
          <t>
      If the FE's FEPO CE failover policy is configured to mode 1, 
      it indicates that the FE will run in HA restart recovery.
      In such a case, the FE transitions to the not associated state and
      the CEFTI timer <xref target="RFC5810"/> is started. 
      The FE may continue to forward
      packets during this state, depending upon the value of the CEFailoverPolicy component of the FEPO LFB.
      The FE recycles through any configured
      backup CEs in a round-robin fashion. It first adds its
      primary CE to the bottom of table BackupCEs and sets its CEID 
      component to be the first secondary retrieved from table BackupCEs. 
      The FE then attempts to associate with the CE designated as the new 
      primary CE. 
      If it fails to re-associate with any CE and the
      CEFTI expires, the FE then transitions to the pre-association state
      and the FE will operationally bring down its forwarding path (and set
      the <xref target="RFC5812"/> FEObject FEState component to OperDisable).
      </t>
          <t>
      If the FE, while in the not associated state, manages to reconnect
      to a new primary CE before the CEFTI expires, it transitions to the
      associated state. Once re-associated, the CE may try to synchronize any
      state that the FE may have lost during disconnection.  
      How the CE re-synchronizes such a state is out of scope for
      the current ForCES architecture but would typically constitute the issuing
      of new Config messages and queries.

      </t>
          <t>
      An explicit message (a Config message setting the primary CE component in
      the ForCES Protocol Object) from the primary CE can also be used to change
      the primary CE for an FE during normal protocol operation. In this case,
      the FE transitions to the not associated state and attempts to 
      associate with the new CE.
      </t>
        </section>
        <section title="Responsibilities for HA">
          <t>TML Level:</t>
          <t>
            <list style="numbers">
              <t>The TML controls logical connection availability and
          failover.</t>
              <t>The TML also controls peer HA management.</t>
            </list>
          </t>
          <t>At this level, control of all lower layers, for example, the transport
level (such as IP addresses, Media Access Control (MAC) addresses, etc.), and associated links
going down are the role of the TML.</t>
          <t>PL Level: <vspace/> All other functionality, including
configuring the HA behavior during setup, Control Element IDs (CE IDs) used to
identify primary and secondary CEs, protocol messages used to report CE
failure (event report), Heartbeat messages used to detect association
failure, messages to change the primary CE (Config), and other HA-related
operations described in <xref target="HAnow"/>, are the PL's 
responsibility.</t>
          <t>To put the two together, if a path to a primary CE is down, the TML
would help recover from a failure by switching over to a backup path, if one is available.
If the CE is totally unreachable, then the PL would be informed and it
would take the appropriate actions described before.</t>
        </section>
      </section>
    </section>
    <section title="CE HA Hot Standby" anchor="hsb">
      <t>
In this section, we describe small extensions to the existing
scheme to enable hot standby HA. To achieve hot standby HA,
we aim to improve the specific goals defined in 
<xref target="quant"/>, namely:
 <list style="symbols">
          <t>
   How fast a backup CE becomes operational.
  </t>
          <t>
   How fast the FEs associate with the new master CE.
  </t>
        </list>
      </t>
      <t>
As described in <xref target="HAnow"/>, in the pre-association phase,
the FEM configures the FE to make it aware of all the CEs in the NE. The FEM MUST 
configure the FE to make it aware of which CE is the master and MAY specify any 
backup CE(s). 
</t>
      <section title="Changes to the FEPO Model" anchor="fepo-changes">
        <t>In order for the above to be achievable, there is a need to make 
a few changes in the FEPO model. <xref target="Appendix"/> contains the 
xml definition of the new version 1.1 of the FEPO LFB.
</t>
        <t>Changes from version 1 of the FEPO are:</t>
        <t>
          <list style="numbers">
            <t>Added four new datatypes:<list style="numbers">
                <t>CEStatusType -- an unsigned char to specify the status of a connection with a CE. 
Special values are:
<list style="symbols">
                    <t>0 (Disconnected) represents that no connection attempt has been made
		with the CE yet 
	</t>
                    <t>1 (Connected) represents that the FE connection with the CE at the TML
		has completed successfully
	</t>
                    <t>2 (Associated) represents that the FE has successfully associated 
		with the CE
	</t>
                    <t>3 (IsMaster) represents that the FE has associated with the CE
		and is the master of the FE
	</t>
                    <t>4 (LostConnection) represents that the FE was associated with the CE 
             at one point but lost the connection
	</t>
                    <t>5 (Unreachable) represents that the FE deems this CE unreachable, i.e.,
	   the FE has tried over a period to connect to it but has failed	
	</t>
                  </list>
                </t>
                <t>HAModeValues -- an unsigned char to specify a selected HA mode. Special values 
are:
<list style="symbols">
                    <t>0 (No HA Mode) represents that the FE is not running in HA mode</t>
                    <t>1 (HA Mode - Cold Standby) represents that the FE is in HA mode cold standby</t>
                    <t>2 (HA Mode - Hot Standby) represents that the FE is in HA mode hot standby</t>
                  </list>
                </t>
                <t>Statistics -- a complex structure representing the communication statistics
	between the FE and CE.  The components are:
<list style="symbols">
                    <t>RecvPackets, representing the packet count received from the CE </t>
                    <t>RecvBytes, representing the byte count received from the CE </t>
                    <t>
	RecvErrPackets, representing the erroneous packets received from the 
	CE. This component logs badly formatted packets as well as good packets
	sent to the FE by the CE to set components whilst that CE is not the master.
	Erroneous packets are dropped (i.e., not responded to).
	</t>
                    <t>RecvErrBytes, representing the RecvErrPackets byte count received from 
		the CE 
	</t>
                    <t>TxmitPackets, representing the packet count transmitted to the CE </t>
                    <t>TxmitErrPackets, representing the error packet count transmitted 
	to the CE. Typically, these would be failures due to communication.
	</t>
                    <t>TxmitBytes, representing the byte count transmitted to the CE </t>
                    <t>TxmitErrBytes, representing the byte count of errors from transmit 
		to the CE 
	</t>
                  </list>
                </t>
                <t>AllCEType -- a complex structure constituting the CE IDs, statistics, and
CEStatusType to reflect connection information for one CE.
Used in the AllCE's component array.</t>
              </list>
            </t>
            <t>Appended two new components:<list style="numbers">
                <t>Read-only AllCEs to hold the status for all CEs.
AllCEs is an array of the AllCEType.</t>
                <t>Read-write HAMode of type HAModeValues to carry the HA mode used by the FE.
</t>
              </list>
            </t>
    
            <t>Added one additional event, PrimaryCEChanged, reporting the new master CE ID
	when there is a mastership change.</t>
          </list>
        </t>
        <t>Since no component from FEPO v1 has been changed, FEPO v1.1 retains 
backwards compatibility with CEs that know only version 1.0. These CEs, 
however, cannot make use of the HA options that the new 
FEPO provides.</t>
      </section>
      <section title="FEPO Processing " anchor="fepo-processing">
        <t>
The FE's FEPO LFB version 1.1 AllCEs table contains 
all the CE IDs with which the FE may connect and associate. The ordering 
of the CE IDs in this table defines the priority order in which an FE 
will connect to the CEs. This table is provisioned initially from the
configuration plane (FEM).
In the pre-association phase, the first CE (lowest table index) 
in the AllCEs table MUST be the first CE with which the FE will attempt 
to connect and associate. 
If the FE fails to connect and associate with the first listed CE, it will 
attempt to connect to the second CE and so forth, and it cycles back to the 
beginning of the list until there is a successful association.
The FE MUST associate with at least one CE.
Upon a successful association, a component of the FEPO LFB, specifically 
the CEID component, identifies the current associated master CE.
</t>
        <t>
While it would be much simpler to have the FE not respond to any messages
from a CE other than the master, in practice it has been found to be useful
to respond to queries and heartbeats from backup CEs. For this reason, we
allow backup CEs to issue queries to the FE.
Configuration messages (SET/DEL) from
backup CEs MUST be dropped by the FE and logged as received errors. </t>
        <t>Asynchronous events that the master CE has subscribed to, as well as 
heartbeats, are sent to all associated CEs. 
Packet redirects continue to be sent only to the master CE. The 
Heartbeat Interval, the CE Heartbeat (CEHB) policy, and the FE Heartbeat (FEHB) policy are global
for all CEs (and changed only by the master CE). 
</t>
        <t>
          <xref target="FESM-HA"/> illustrates the state machine that facilitates connection
recovery with HA enabled.
</t>
        <figure anchor="FESM-HA" title="FE State Machine Considering HA">
          <artwork><![CDATA[
                        FE tries to associate    
                             +-->-----+
                             |        |
(CE changes master ||        |        |
CE issues Teardown ||    +---+--------v----+     
  Lost association) &&   | Pre-association |
 CE failover policy = 0  | (Association    |     
     +------------>-->-->|   in            +<----+
     |                   | progress)       |     |
     |                   |                 |     |
     |                   +--------+--------+     |
     |  CE Association        |                  | CEFTI
     |       Response         V                  | timer 
     |     +------------------+                  | expires
     |     |FE issues CEPrimaryDown              ^
     |     |FE issues PrimaryCEChanged           ^
     |     V                                     |    
   +-+-----------+                        +------+-----+
   |             |  (CE changes master || | Not        |
   |             |  CE issues Teardown || | Associated |
   |             |  Lost association) &&  |            +->----------+
   | Associated  | CE failover policy = 1 |(May        | find first |
   |             |                        | Continue   | associated v
   |             |-------->------->------>| Forwarding)| CE or retry|
   |             |   Start CEFTI timer    |            | associating|
   |             |                        |            |-<----------+
   |             |                        |            |
   +----+--------+                        +-------+----+
        |                                         |
        ^                                   Found | associated CE
        |                                or newly | associated CE
        |                                         V
        |            (Cancel CEFTI timer)         |
        +_________________________________________+
                 FE issues CEPrimaryDown event 
                 FE issues PrimaryCEChanged event 
]]></artwork>
        </figure>
        <t>
Once the FE has associated with a master CE, it moves to the 
post-association phase (associated state). 
It is assumed that the master CE will communicate with other CEs 
within the NE for the purpose of synchronization via the CE-CE interface. 
The CE-CE interface is out of scope for this document.
An election result amongst CEs may result in the desire to change the mastership
to a different associated CE; at which point, the current assumed master CE
will instruct the FE to use a different master CE.
</t>
        <figure anchor="seq_HA_Report_Primary_Hot_Standby" title="CE Failover for Hot Standby">
          <artwork><![CDATA[
      FE                         CE#1         CE#2 ... CE#N
      |                           |            |        |
      | Association Establishment |            |        |
      |   Capabilities Exchange   |            |        |
    1 |<------------------------->|            |        |
      |                           |            |        |
      |      State Update         |            |        |
    2 |<------------------------->|            |        |
      |                           |            |        |
      |      Association Establishment         |        |
      |        Capabilities Exchange           |        |
    3I|<-------------------------------------->|        |
     ...                         ...          ...      ...
      |Association Establishment, Capabilities Exchange |
    3N|<----------------------------------------------->|
      |                           |            |        |
    4 |<------------------------->|            |        |
      .                           .            .        .
    4x|<------------------------->|            |        |
      |                        FAILURE         |        |
      |                           |            |        |
      |    Event Report (LastCEID changed)     |        |
    5 |--------------------------------------->|------->|
      |    Event Report (CE#2 is new master)   |        |
    6 |--------------------------------------->|------->|
      |                                        |        |
    7 |<-------------------------------------->|        |
      .                           .            .        .
    7x|<-------------------------------------->|        |
      .                           .            .        .
 ]]></artwork>
        </figure>
        <t>
While in the post-association phase, if the CE failover policy is set 
to 1 and the HAMode is set to 2 (hot standby), then the FE, after 
successfully associating with the master CE, MUST attempt to connect and 
associate with all the CEs of which it is aware. 
<xref target="seq_HA_Report_Primary_Hot_Standby"/>, 
steps #1 and #2 illustrates the FE associating with CE#1 as the master, and 
then proceeding to steps #3I to #3N, it shows the association with backup CEs CE#2 
to CE#N.
If the FE fails to connect or associate with some CEs, the FE MAY 
flag them as unreachable to avoid continuous attempts to connect.
The FE MAY try to re-associate with unreachable CEs when possible.
</t>
        <t>
When the master CE, for any reason, is considered to be down, then the FE 
MUST try to find the first associated CE from the list of all CEs in a 
round-robin fashion.
</t>
        <t>If the FE is unable to find an associated FE in its list of CEs, 
then it MUST attempt to connect and associate with the first 
from the list of all CEs and continue in a round-robin fashion 
until it connects and associates with a CE or the CEFTI timer expires.
</t>
        <t>
Once the FE selects an associated CE to use as the new master,
the FE issues a PrimaryCEDown Event Notification to all 
associated CEs to notify them that the last primary CE went down 
(and what its identity was); a second event, PrimaryCEChanged,
identifying the new master CE is sent as well to identify which CE 
the reporting FE considers to be the new master.
</t>
        <t>
In most HA architectures, there exists the possibility of 
split brain. However, in our setup, since the FE will never accept any 
configuration messages from any other than the master CE, we 
consider the FE to be fenced against data corruption from the other CEs 
that consider themselves as the master. The split-brain issue becomes mostly a 
CE-CE communication problem, which is considered to be out of scope.
</t>
        <t>
By virtue of having multiple CE connections, the FE switchover
to a new master CE will be relatively much faster. The overall effect
is improving the NE recovery time in case of communication
failure or faults of the master CE. This satisfies the requirement
we set to fulfill.
</t>
      </section>
    </section>
    <section anchor="IANA" title="IANA Considerations">
      
<t>Following the policies outlined in "Guidelines for Writing an IANA
   Considerations Section in RFCs" <xref target="RFC5226"></xref>, the "Logical Functional Block (LFB) Class Names and Class Identifiers"
   namespace has been updated.</t>
   <t>A new column, LFB version, has been added to the table after the LFB Class Name. The table now reads as follows:</t>

      <texttable title="Logical Functional Block (LFB) Class Names and Class Identifiers">
        <ttcol align="center">LFB Class Identifier</ttcol>
        <ttcol align="center">LFB Class Name</ttcol>
        <ttcol align="center">LFB Version</ttcol>
        <ttcol align="center">Description</ttcol>
        <ttcol align="center">Reference</ttcol>
      </texttable>
<t>The rules defined in <xref target="RFC5812"></xref> apply, with the addition that entries must provide the LFB version as a string.</t>
<t>Upon publication of this document, all current entries are assigned a value of 1.0.</t>
<t>New versions of already defined LFBs MUST NOT remove the previous version entries.</t>
<t>It would make sense to have LFB versions appear in sequence in the registry. The table SHOULD be sorted, and the sorting should be done by Class ID 
first and then by version.</t>
<t>This document introduces the FE Protocol Object version 1.1 as follows:</t>
      <texttable title="Logical Functional Block (LFB) Class Names and Class Identifiers">
        <ttcol align="center">LFB Class Identifier</ttcol>
        <ttcol align="center">LFB Class Name</ttcol>
        <ttcol align="center">LFB Version</ttcol>
        <ttcol align="center">Description</ttcol>
        <ttcol align="center">Reference</ttcol>
        <c>2</c>
        <c>FE Protocol Object</c>
        <c>1.1</c>
        <c>Defines parameters for the ForCES protocol operation</c>
        <c>[RFC7121]</c>
      </texttable>

    </section>
    <section anchor="Security" title="Security Considerations">
      <t>Security considerations, as defined in Section 9 of <xref target="RFC5810"/>, apply to securing
each CE-FE communication. Multiple CEs associated with the same FE still require the same procedure to be followed on a per-association basis.</t>
<t>It should be noted that since the FE is initiating the association with a CE, a CE cannot initiate association with the FE and such messages will be dropped. Thus, the FE is secured from rogue CEs that are attempting to associate with it.</t>
<t>CE implementers should have in mind that once associated, the FE cannot distinguish whether the CE has been compromised or has been malfunctioning while not losing connectivity. Securing the CE is out of scope of this document.</t>
<t>While the CE-CE plane is outside the current scope of ForCES, we recognize that it may be subjected to attacks that may affect the CE-FE communication.</t>
<t>The following considerations should be made:




<list style="numbers">
  <t>Secure communication channels should be used between CEs for coordination
and keeping of state to at least avoid connection of malicious CEs.</t>
  <t>The master CE should take into account DoS and Distributed Denial-of-Service (DDoS) attacks from malicious or malfunctioning CEs.</t>
  <t>CEs should take into account the split-brain issue. There are currently two fail-safes in the FE: Firstly, the FE has the CEID component that denotes which CE is the master. Secondly, the FE does not allow BackupCEs to configure the FE. However, backup CEs that consider that the master CE has dropped should, as masters themselves, first do a sanity check and query the FE CEID component.</t>
</list>
</t>
    </section>

  </middle>
  <back>
    <references title="Normative References">
    &RFC5810;
    &RFC2119;
    &RFC5812;
    &RFC5226;
    </references>
    <references title="Informative References">
    &RFC3654;
    &RFC3746;


<reference anchor="Err3487" target="http://www.rfc-editor.org"> 
<front> 
<title>Errata ID 3487</title>
<author><organization>RFC Errata</organization></author> 
<date></date>
</front> 
<seriesInfo name="RFC" value="3487"/>
</reference>



  </references>


    <section anchor="Appendix" title="New FEPO Version">
    <t>The xml has been validated against the schema defined in <xref target="RFC5812"/>.</t>
      <figure>
        <artwork align="center"><![CDATA[
<LFBLibrary xmlns="urn:ietf:params:xml:ns:forces:lfbmodel:1.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="lfb-schema.xsd" provides="FEPO">
   <!-- XXX -->
   <dataTypeDefs>
      <dataTypeDef>
         <name>CEHBPolicyValues</name>
         <synopsis>
            The possible values of the CE Heartbeat policy
         </synopsis>
         <atomic>
            <baseType>uchar</baseType>
            <specialValues>
               <specialValue value="0">
                  <name>CEHBPolicy0</name>
                  <synopsis>
			  The CE will send heartbeats to the FE
			  every CEHDI timeout if no other messages
			  have been sent since.
                  </synopsis>
               </specialValue>
               <specialValue value="1">
                  <name>CEHBPolicy1</name>
                  <synopsis>
			  The CE will not send heartbeats to the FE
                  </synopsis>
               </specialValue>
            </specialValues>
         </atomic>
      </dataTypeDef>
      <dataTypeDef>
         <name>FEHBPolicyValues</name>
         <synopsis>
            The possible values of the FE Heartbeat policy
         </synopsis>
         <atomic>
            <baseType>uchar</baseType>
            <specialValues>
               <specialValue value="0">
                  <name>FEHBPolicy0</name>
                  <synopsis>
        The FE will not generate any heartbeats to the CE
                  </synopsis>
               </specialValue>
               <specialValue value="1">
                  <name>FEHBPolicy1</name>
                  <synopsis>
        The FE generates heartbeats to the CE every FEHI 
        if no other messages have been sent to the CE.
                  </synopsis>
               </specialValue>
            </specialValues>
         </atomic>
      </dataTypeDef>
      <dataTypeDef>
         <name>FERestartPolicyValues</name>
         <synopsis>
            The possible values of the FE restart policy
         </synopsis>
         <atomic>
            <baseType>uchar</baseType>
            <specialValues>
               <specialValue value="0">
                  <name>FERestartPolicy0</name>
                  <synopsis>
                     The FE restarts its state from scratch
                  </synopsis>
               </specialValue>
            </specialValues>
         </atomic>
      </dataTypeDef>
      <dataTypeDef>
         <name>HAModeValues</name>
         <synopsis>
            The possible values of HA modes
         </synopsis>
         <atomic>
            <baseType>uchar</baseType>
            <specialValues>
               <specialValue value="0">
                  <name>NoHA</name>
                  <synopsis>
                     The FE is not running in HA mode
                  </synopsis>
               </specialValue>
               <specialValue value="1">
                  <name>ColdStandby</name>
                  <synopsis>
                     The FE is running in HA mode cold standby
                  </synopsis>
               </specialValue>
               <specialValue value="2">
                  <name>HotStandby</name>
                  <synopsis>
                     The FE is running in HA mode hot standby
                  </synopsis>
               </specialValue>
            </specialValues>
         </atomic>
      </dataTypeDef>
      <dataTypeDef>
         <name>CEFailoverPolicyValues</name>
         <synopsis>
            The possible values of the CE failover policy
         </synopsis>
         <atomic>
            <baseType>uchar</baseType>
            <specialValues>
               <specialValue value="0">
                  <name>CEFailoverPolicy0</name>
                  <synopsis>
        The FE should stop functioning immediately and
        transition to the FE OperDisable state
                  </synopsis>
               </specialValue>
               <specialValue value="1">
                  <name>CEFailoverPolicy1</name>
                  <synopsis>
        The FE should continue forwarding even without an
        associated CE for CEFTI. The FE goes to FE
        OperDisable when the CEFTI expires and there is no
        association. Requires graceful restart support.
                  </synopsis>
               </specialValue>
            </specialValues>
         </atomic>
      </dataTypeDef>
      <dataTypeDef>
         <name>FEHACapab</name>
         <synopsis>
            The supported HA features
         </synopsis>
         <atomic>
            <baseType>uchar</baseType>
            <specialValues>
               <specialValue value="0">
                  <name>GracefullRestart</name>
                  <synopsis>
                     The FE supports graceful restart
                  </synopsis>
               </specialValue>
               <specialValue value="1">
                  <name>HA</name>
                  <synopsis>
                     The FE supports HA
                  </synopsis>
               </specialValue>
            </specialValues>
         </atomic>
      </dataTypeDef>
      <dataTypeDef>
         <name>CEStatusType</name>
         <synopsis>Status values. Status for each CE</synopsis>
         <atomic>
            <baseType>uchar</baseType>
            <specialValues>
               <specialValue value="0">
                  <name>Disconnected</name>
                  <synopsis>No connection attempt with the CE yet
                  </synopsis>
               </specialValue>
               <specialValue value="1">
                  <name>Connected</name>
                  <synopsis>The FE connection with the CE at the TML
                     has been completed
                  </synopsis>
               </specialValue>
               <specialValue value="2">
                  <name>Associated</name>
                  <synopsis>The FE has associated with the CE
                  </synopsis>
               </specialValue>
               <specialValue value="3">
                  <name>IsMaster</name>
                  <synopsis>The CE is the master (and associated)
                  </synopsis>
               </specialValue>
               <specialValue value="4">
                  <name>LostConnection</name>
                  <synopsis>The FE was associated with the CE but 
                     lost the connection
                  </synopsis>
               </specialValue>
               <specialValue value="5">
                  <name>Unreachable</name>
                  <synopsis>The CE is deemed as unreachable by the FE
                  </synopsis>
               </specialValue>
            </specialValues>
         </atomic>
      </dataTypeDef>
      <dataTypeDef>
         <name>StatisticsType</name>
         <synopsis>Statistics Definition</synopsis>
         <struct>
            <component componentID="1">
               <name>RecvPackets</name>
               <synopsis>Packets received</synopsis>
               <typeRef>uint64</typeRef>
            </component>
            <component componentID="2">
               <name>RecvErrPackets</name>
               <synopsis>Packets received from the CE with errors
               </synopsis>
               <typeRef>uint64</typeRef>
            </component>
            <component componentID="3">
               <name>RecvBytes</name>
               <synopsis>Bytes received from the CE</synopsis>
               <typeRef>uint64</typeRef>
            </component>
            <component componentID="4">
               <name>RecvErrBytes</name>
               <synopsis>Bytes received from the CE in Error</synopsis>
               <typeRef>uint64</typeRef>
            </component>
            <component componentID="5">
               <name>TxmitPackets</name>
               <synopsis>Packets transmitted to the CE</synopsis>
               <typeRef>uint64</typeRef>
            </component>
            <component componentID="6">
               <name>TxmitErrPackets</name>
               <synopsis>
                  Packets transmitted to the CE that incurred
                  errors
               </synopsis>
               <typeRef>uint64</typeRef>
            </component>
            <component componentID="7">
               <name>TxmitBytes</name>
               <synopsis>Bytes transmitted to the CE</synopsis>
               <typeRef>uint64</typeRef>
            </component>
            <component componentID="8">
               <name>TxmitErrBytes</name>
               <synopsis>Bytes transmitted to the CE that incurred errors
               </synopsis>
               <typeRef>uint64</typeRef>
            </component>
         </struct>
      </dataTypeDef>
      <dataTypeDef>
         <name>AllCEType</name>
         <synopsis>Table type for the AllCE component</synopsis>
         <struct>
            <component componentID="1">
               <name>CEID</name>
               <synopsis>ID of the CE</synopsis>
               <typeRef>uint32</typeRef>
            </component>
            <component componentID="2">
               <name>Statistics</name>
               <synopsis>Statistics per the CE</synopsis>
               <typeRef>StatisticsType</typeRef>
            </component>
            <component componentID="3">
               <name>CEStatus</name>
               <synopsis>Status of the CE</synopsis>
               <typeRef>CEStatusType</typeRef>
            </component>
         </struct>
      </dataTypeDef>
   </dataTypeDefs>
   <LFBClassDefs>
      <LFBClassDef LFBClassID="2">
         <name>FEPO</name>
         <synopsis>
            The FE Protocol Object, with new CEHA
         </synopsis>
         <version>1.1</version>
         <components>
            <component componentID="1" access="read-only">
               <name>CurrentRunningVersion</name>
               <synopsis>Currently running the ForCES version</synopsis>
               <typeRef>uchar</typeRef>
            </component>
            <component componentID="2" access="read-only">
               <name>FEID</name>
               <synopsis>Unicast FEID</synopsis>
               <typeRef>uint32</typeRef>
            </component>
            <component componentID="3" access="read-write">
               <name>MulticastFEIDs</name>
               <synopsis>
                  The table of all multicast IDs
               </synopsis>
               <array type="variable-size">
                  <typeRef>uint32</typeRef>
               </array>
            </component>
            <component componentID="4" access="read-write">
               <name>CEHBPolicy</name>
               <synopsis>
                  The CE Heartbeat policy
               </synopsis>
               <typeRef>CEHBPolicyValues</typeRef>
            </component>
            <component componentID="5" access="read-write">
               <name>CEHDI</name>
               <synopsis>
                  The CE Heartbeat Dead Interval in milliseconds
               </synopsis>
               <typeRef>uint32</typeRef>
            </component>
            <component componentID="6" access="read-write">
               <name>FEHBPolicy</name>
               <synopsis>
                  The FE Heartbeat policy
               </synopsis>
               <typeRef>FEHBPolicyValues</typeRef>
            </component>
            <component componentID="7" access="read-write">
               <name>FEHI</name>
               <synopsis>
                  The FE Heartbeat Interval in milliseconds
               </synopsis>
               <typeRef>uint32</typeRef>
            </component>
            <component componentID="8" access="read-write">
               <name>CEID</name>
               <synopsis>
                  The primary CE this FE is associated with
               </synopsis>
               <typeRef>uint32</typeRef>
            </component>
            <component componentID="9" access="read-write">
               <name>BackupCEs</name>
               <synopsis>
                  The table of all backup CEs other than the
                  primary
               </synopsis>
               <array type="variable-size">
                  <typeRef>uint32</typeRef>
               </array>
            </component>
            <component componentID="10" access="read-write">
               <name>CEFailoverPolicy</name>
               <synopsis>
                  The CE failover policy
               </synopsis>
               <typeRef>CEFailoverPolicyValues</typeRef>
            </component>
            <component componentID="11" access="read-write">
               <name>CEFTI</name>
               <synopsis>
                  The CE Failover Timeout Interval in milliseconds
               </synopsis>
               <typeRef>uint32</typeRef>
            </component>
            <component componentID="12" access="read-write">
               <name>FERestartPolicy</name>
               <synopsis>
                  The FE restart policy
               </synopsis>
               <typeRef>FERestartPolicyValues</typeRef>
            </component>
            <component componentID="13" access="read-write">
               <name>LastCEID</name>
               <synopsis>
                  The primary CE this FE was last associated
                  with
               </synopsis>
               <typeRef>uint32</typeRef>
            </component>
            <component componentID="14" access="read-write">
               <name>HAMode</name>
               <synopsis>
                  The HA mode used
               </synopsis>
               <typeRef>HAModeValues</typeRef>
            </component>
            <component componentID="15" access="read-only">
               <name>AllCEs</name>
               <synopsis>The table of all CEs</synopsis>
               <array type="variable-size">
                  <typeRef>AllCEType</typeRef>
               </array>
            </component>
         </components>
         <capabilities>
            <capability componentID="30">
               <name>SupportableVersions</name>
               <synopsis>
                  The table of ForCES versions that FE supports
               </synopsis>
               <array type="variable-size">
                  <typeRef>uchar</typeRef>
               </array>
            </capability>
            <capability componentID="31">
               <name>HACapabilities</name>
               <synopsis>
                  The table of HA capabilities the FE supports
               </synopsis>
               <array type="variable-size">
                  <typeRef>FEHACapab</typeRef>
               </array>
            </capability>
         </capabilities>
         <events baseID="61">
            <event eventID="1">
               <name>PrimaryCEDown</name>
               <synopsis>
                  The primary CE has changed
               </synopsis>
               <eventTarget>
                  <eventField>LastCEID</eventField>
               </eventTarget>
               <eventChanged/>
               <eventReports>
                  <eventReport>
                     <eventField>LastCEID</eventField>
                  </eventReport>
               </eventReports>
            </event>
            <event eventID="2">
               <name>PrimaryCEChanged</name>
               <synopsis>A new primary CE has been selected
               </synopsis>
               <eventTarget>
                  <eventField>CEID</eventField>
               </eventTarget>
               <eventChanged/>
               <eventReports>
                  <eventReport>
                     <eventField>CEID</eventField>
                  </eventReport>
               </eventReports>
            </event>
         </events>
      </LFBClassDef>
   </LFBClassDefs>
</LFBLibrary>
	]]></artwork>
      </figure>
    </section>
  </back>
</rfc>
