<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC1321 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1321.xml">
<!ENTITY RFC5925 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5925.xml">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="info" docName="draft-smith-kandula-sxp-03"
     ipr="noModificationTrust200902">
  <front>
    <title abbrev="Source-Group Tag eXchange Protocol (SXP)">Source-Group Tag
    eXchange Protocol (SXP)</title>

    <author fullname="Michael Smith" initials="M" surname="Smith">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>210 West Tasman Drive</street>

          <city>San Jose</city>

          <region>California</region>

          <country>United States</country>

          <code>95134</code>
        </postal>

        <phone></phone>

        <facsimile></facsimile>

        <email>michsmit@cisco.com</email>

        <uri></uri>
      </address>
    </author>

    <author fullname="Rakesh Reddy Kandula" initials="R" surname="Kandula">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>Cessna Business Park, Kadubeesanahalli Village</street>

          <street>Sarjapur/Marathahalli Outer Ring Road</street>

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code>560103</code>

          <country>India</country>
        </postal>

        <phone></phone>

        <facsimile></facsimile>

        <email>krreddy@cisco.com</email>

        <uri></uri>
      </address>
    </author>

    <date day="10" month="August" year="2015" />

    <abstract>
      <t>This document discusses source-group tag exchange protocol (SXP), a
      control protocol to propagate IP address to Source Group Tag (SGT)
      binding information across network devices.</t>
    </abstract>

    <note title="Requirements Language">
      <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>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>SXP stands for the Source Group Tag (SGT) eXchange Protocol. Source
      groups are the endpoints connecting to the network that have common
      network policies. Each source group is identified by a unique SGT value.
      The SGT to which an endpoint belongs can be assigned statically or
      dynamically, and the SGT can be used as a classifier in network
      policies. SXP is a control-plane mechanism used to transport an
      endpoint's SGT along with the IP address from one SGT-aware network
      device to another. The data that SXP transports is referred to as the
      IP-SGT binding in the rest of the document.</t>

      <section title="Terminology">
        <t>This document frequently uses the following terms:</t>

        <t>SGT Source Group Tag</t>

        <t>SXP Source-Group Tag (SGT) eXchange Protocol</t>

        <t>IP-SGT The IP Address to SGT binding that is exchanged over SXP
        connection</t>

        <t>SXP Speaker The peer that sends the IP-SGT bindings over the SXP
        connection</t>

        <t>SXP Listener The peer that receives the IP-SGT bindings over the
        SXP connection</t>

        <t>Binding Database The database of IP-SGT bindings that the SXP
        Speaker uses to export to the peer</t>
      </section>
    </section>

    <section title="SXP Overview">
      <t>SXP uses TCP as its transport protocol to set up SXP connection
      between 2 separate network devices. Each SXP connection has one peer
      designated as SXP speaker and the other peer as SXP listener. The peers
      can also be configured in a bi-directional (both) mode where each of
      them act as both speaker &amp; listener. Connections can be initiated by
      either peers but binding information is always propagated from a speaker
      to a listener.</t>

      <t>At a very high level, SXP comprises of the following -</t>

      <t>- SXP connection establishment</t>

      <t>- IP-SGT bindings propagation</t>

      <t>A typical deployment scenario of SXP is illustrated below -</t>

      <t><figure>
          <artwork><![CDATA[+---------------+                              +----------------+
|               |                              |                |
|               |                              |                |
|               |                              |                |
| SXP Speaker   |----------------------------->| SXP Listener   |    
|               |     IP-SGT Bindings          |                |
|               |                              |                |
|               |                              |                |
+---------------+                              +----------------+
       |                                                |
       |                                                |
       |                                                |
       |                                                |
       +------------------------------------------------+

                        SXP Connection]]></artwork>
        </figure></t>
    </section>

    <section title="SXP Operation">
      <t>The SXP connections are point-to-point and uses TCP as the underlying
      transport protocol. The summary of operations is illustrated in each of
      the sections below.</t>

      <section title="SXP Connection Management">
        <t>An SXP connection consists of the following parts:</t>

        <section title="SXP Connection">
          <t><list style="symbols">
              <t>The peer IP address, source IP address (the best IP address
              of local device used to reach the specified peer IP
              address)<list style="symbols">
                  <t>Used to construct TCP connection</t>
                </list></t>

              <t>The connection mode<list style="symbols">
                  <t>An SXP connection can be configured for uni-directional
                  or bi-directional communication. For each direction, one
                  peer must act as an sxp speaker and the other act as an sxp
                  listener.</t>

                  <t>The SXP speaker is responsible for sending the IP-SGT
                  bindings.</t>

                  <t>The SXP listener is responsible for collecting the IP-SGT
                  bindings received from the speaker peer</t>
                </list></t>

              <t>SXP connection password<list style="symbols">
                  <t>If SXP data integrity and authentication are required,
                  then both the peer devices must have same SXP password.</t>
                </list></t>
            </list></t>
        </section>

        <section title="SXP Message integrity/authenticity">
          <t>The connection peers on the 2 network devices supply the same SXP
          password to the TCP layer which will authenticate all further
          messages using the MD5 algorithm (RFC 2385). The SXP payload is not
          encrypted because the main requirement is for the receiving device
          to determine that the message originated from a valid source and not
          to prevent snooping of message (discussed in security considerations
          section) payload. SXP uses the underlying TCP MD5 option for message
          integrity/authenticity. The TCP MD5 is exchanged (negotiated) during
          the initial TCP 3 way handshake. Both sides (peers) are
          pre-configured with the keys (password) which will be used for
          forming the MD5 digest. Each packet (segment) needs to be "signed"
          with the MD5 digest (16 bytes) formed using the password as the
          key.</t>

          <t>Whenever the password needs to be changed for an existing TCP
          connection, the peer resets the exising TCP connection and sets up a
          new TCP connection with the new password. Changing the default
          password will cause all SXP connections using the default password
          to be re-established.</t>
        </section>

        <section title="SXP Connectivity Discovery and Connection Recovery">
          <t>SXP uses the TCP keep alive mechanism with the default behavior
          to maintain SXP connectivity. A SXP device attempts to maintain
          connectivity with each peer. In case of failures, the SXP device
          continues to retry connection setup with all the peers with which
          the SXP connections have not been established. This continues until
          either a connection is established or the peer is removed from the
          peer set by a change in configuration. This mechanism ensures
          automatic recovery of the SXP connection once the connectivity issue
          is resolved. The SXP connection can be re-established by either
          device and hence the connection can be brought up sooner without
          relying on the retry timers of the peer devices. Note that this is
          just an optimization and not a requirement for SXP connection
          recovery. If both ends of an SXP connection set up the TCP
          connection at the same time, the end with source IP address higher
          than the peer IP address wins: i.e. the TCP connection initiated
          from that end is kept and the other TCP connection is torn down.</t>
        </section>

        <section title="SXP Connection Setup Sequence">
          <t>When a SXP connection is configured, it initiates a TCP
          connection setup request. SXP communication starts after TCP
          connection has been established between the two network devices. The
          end that initiates the TCP connection starts the exchange by sending
          the OPEN message to negotiate SXP version, SXP mode, and if that end
          is a listener, SXP capabilities attribute. Capabilities
          advertisement and Capabilities Attribute are described with
          additional details in section 5.4.1. The receiving device responds
          with an OPEN_RESP message that includes similar attributes. The
          connection can only be setup with one end configured as a speaker
          and the other end configured as a listener. See the following
          sections regarding version negotiation and capability exchange
          process descriptions. Along with version negotiation, the hold time
          required for the connection is also negotiated. The following
          sections explain the hold time negotiation in detail.</t>

          <t>After SXP connection is established, binding information can be
          sent from speaker to listener with UPDATE message. Whenever the SXP
          connection has to be closed the underlying TCP connection is
          closed.</t>
        </section>

        <section title="SXP Connection States">
          <t>An SXP connection maintains following states: OFF, PENDING_ON,
          DELETE_HOLD_DOWN, ON.</t>

          <t>OFF: In this state, a connection initiation has not been started.
          This is the only state that an SXP connection will retry
          establishing the TCP connection.</t>

          <t>PENDING_ON: In this state, an SXP OPEN message has been sent to
          the peer and a response from the peer SXP is expected.</t>

          <t>DELETE_HOLD_DOWN: In this state, a connection that was previously
          in ON state has been terminated. Only a listener can be in this
          state.</t>

          <t>ON: SXP is in ON state when SXP OPEN or SXP OPEN RESP message has
          been received. SXP connection has been setup successfully. An SXP
          connection will only propagates bindings in the ON state.</t>

          <t><figure>
              <artwork><![CDATA[                         +-------+
               T7        |       |---------------+
           +------------>| OFF   |               |T1
           |             |       |<---------+    |
           |             +-------+   T2     |    | 
       +--------+          |   A           +-----v-+ 
       |DELETE  |          |   |           |PENDING | 
       |HOLDDOWN|        T5|   | T4        |  ON    | 
       +---A----+          |   |           +--------+ 
           |             +-v-----+              |
           |      T6     |  ON   |              |T3
           +-------------|       |<-------------+ 
                         +-------+                        ]]></artwork>

              <postamble>T1-T7: State Transitions</postamble>
            </figure></t>

          <t>T1: The connection sends a TCP connect request and an SXP OPEN
          message to the peer. The connection then transits to the PENDING ON
          state.</t>

          <t>T2: TCP connection setup failure;</t>

          <t>T3: The connection received an SXP OPEN RESPONSE or SXP OPEN
          message. If the delete hold down timer is running, the timer is
          stopped and the reconciliation timer is started.</t>

          <t>T4: TCP connection failure; SXP message process failure; SXP
          configuration change.</t>

          <t>T5: The TCP connection is setup and an SXP OPEN message is
          received. If the delete hold down timer is running, the timer is
          stopped and the reconciliation timer is started.</t>

          <t>T6: TCP connection failure when a connection is in listener mode.
          The delete hold down timer is started with this state
          transition.</t>

          <t>T7: The delete hold down timer expired or TCP connection setup
          failure.</t>

          <t>In failure scenarios, the connection transits to OFF state and an
          attempt is made to re-establish the connection.</t>
        </section>
      </section>

      <section title="Binding Database">
        <t>A system should have a master binding database for reconciling
        binding information from multiple SXP connections. The database should
        consist of a single binding per IP address and there should be a
        mechanism to handle same bindings from multiple SXP connections.</t>

        <section title="SXP Learned IP-SGT Binding recovery">
          <t>When an SXP connection goes down on a network device, SXP
          continues to learn/advertise IP-SGT bindings on other SXP
          connections that are alive. If the device has learnt any bindings
          from the peer where the SXP connection goes down, a delete hold down
          timer is started for that connection:</t>

          <t><list style="symbols">
              <t>Once the timer expires, all binding entries that were learned
              from the failed peer are deleted. The deletion of the bindings
              for which the failed peer was the only source are reported to
              the master binding database.</t>

              <t>If the connection recovers before the delete hold down timer
              expiry, a reconcile timer is started to clean up old bindings
              that didn&rsquo;t get informed to be removed because of the loss
              of connectivity.</t>
            </list></t>
        </section>
      </section>
    </section>

    <section title="Message Formats">
      <t>The SXP Messages and their formats are described in detail in this
      section.</t>

      <section title="Bit and Octet Numbering Convention">
        <t>Throughout this section, the following numbering convention is used
        to depict the SXP message formats:</t>

        <t>Each diagram depicts the format and size of each field in bits.
        Implementations MUST send the bits in each diagram as they are shown,
        traversing the diagram from top to bottom and then from left to right
        within each line (which represents a 32-bit quantity). Multi-byte
        fields representing numeric values must be sent in network (big
        endian) byte order. Descriptions of bit field (e.g., flag) values are
        described referring to the position of the bit within the field. These
        bit positions are numbered from the most significant bit through the
        least significant bit, so a 1-octet field with only bit 0 set has the
        value 0x80.</t>
      </section>

      <section title="SXP Message Header">
        <t><figure>
            <artwork><![CDATA[ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
 | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
 |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
 |                SXP Message Length (4 octets)                  |
 +---------------------------------------------------------------+
 |                SXP Message Type (4 octets)                    |
 +---------------------------------------------------------------+
 |                SXP payload (variable)                         |
 +---------------------------------------------------------------+ 
 ]]></artwork>
          </figure></t>

        <texttable>
          <ttcol>Field</ttcol>

          <ttcol>Length</ttcol>

          <ttcol>Description</ttcol>

          <c>SXP Message Length</c>

          <c>4</c>

          <c>This 4-octet unsigned integer indicates the total length of the
          message, including the header but excluding authentication tag. The
          maximum message length is 4096</c>

          <c>SXP Message Type</c>

          <c>4</c>

          <c>This 4-octet unsigned integer indicates the type code of the SXP
          message. The following type codes are defined: 1 &ndash; OPEN 2 -
          OPEN_RESP 3 &ndash; UPDATE 4 &ndash; ERROR 5 &ndash; PURGE_ALL 6 -
          KEEPALIVE</c>

          <c>SXP Payload</c>

          <c>Variable</c>

          <c>SXP message payload is an optional field. Its content when
          present depends on the message type</c>
        </texttable>
      </section>

      <section title="Attribute Formats">
        <t>SXP messages can contain a variable number of fields. Some fields
        have pre-defined format that every implementation shall understand.
        Other fields are called attributes and they have an extended {Type,
        Length, Value} (TLV) format in order to allows for gradual
        introduction of a new feature without requiring a protocol version
        change. Each attribute is tagged and includes a length field. This
        allows for newer versions of SXP to add capabilities and coexist with
        old versions of SXP in the same deployment. Each attribute includes a
        Flags field to control processing and transitive processing of
        optional attributes. The format of an attribute {flags, type, length,
        value} (TLV) is encoded as follows:</t>

        <t><figure>
            <preamble>Compact TLV</preamble>

            <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | |  Type         |  TLV Length   |               |                                                                      
   +-+-+-+-+-+-+-+-+---------------+---------------+               |
   |    Value (Variable: TLV Length octets long)                   |
   +---------------------------------------------------------------+]]></artwork>
          </figure></t>

        <t><figure>
            <preamble>Compact Extended Length TLV</preamble>

            <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | |  Type         |  TLV Extended Length          |                                                                        
   +-+-+-+-+-+-+-+-+---------------+-------------------------------+
   |    Value (Variable: TLV Extended Length octets long)          |
   +---------------------------------------------------------------+]]></artwork>
          </figure></t>

        <texttable>
          <ttcol>Field</ttcol>

          <ttcol>Bits</ttcol>

          <ttcol>Description</ttcol>

          <c>Optional (O)</c>

          <c>0</c>

          <c>1 - Attribute is optional and could be ignored 0 &ndash;
          Attribute is well-known and must be recognized</c>

          <c>Non-Transitive (N)</c>

          <c>1</c>

          <c>0 &ndash; Attribute shall be forwarded even if it is not
          recognized 1 &ndash; Attribute shall not be forwarded</c>

          <c>Partial (P)</c>

          <c>2</c>

          <c>1 &ndash; When a transitive attribute is forwarded but not
          recognized 0 &ndash; Otherwise</c>

          <c>Compact (C)</c>

          <c>3</c>

          <c>1 &ndash; TLV is using compact Type and Length encoding 0 &ndash;
          TLV is encoded using entire 4 octets long words for Type and Length.
          All other flags are 0</c>

          <c>Extended Length (E)</c>

          <c>4</c>

          <c>0 &ndash; Length is a single octet long 1 &ndash; Length is 2
          octets long</c>

          <c>Reserved</c>

          <c>5-7</c>

          <c>Reserved for future use. Must be transmitted as 0 and ignored on
          receive</c>
        </texttable>

        <texttable>
          <ttcol>Field</ttcol>

          <ttcol>Length</ttcol>

          <ttcol>Description</ttcol>

          <c>Flags</c>

          <c>1</c>

          <c>Attribute Flags</c>

          <c>Type</c>

          <c>1 or 4</c>

          <c>TLV Type</c>

          <c>Length</c>

          <c>1, 2 or 4</c>

          <c>Length (in octets) of the TLV Value field (i.e. not including the
          3, 4, or 8-octets attribute header. Unsigned integer in the
          following range: [0..255] - For Compact non-Extended Length
          attribute. [256..4084] &ndash; For Compact Extended Length
          attribute.</c>

          <c>Value</c>

          <c>Variable</c>

          <c>TLV values, which depend on the TLV type</c>
        </texttable>

        <t>Attribute Length field of Compact attributes SHOULD be only as
        large as necessary to hold an unsigned integer that specifies the
        number of octets in the attribute Value field. This implies that
        Extended-Length field SHOULD contain a value greater than 256 (or the
        first octet of an Extended-Length field SHOULD be non-zero). The
        largest allowed value of an Extended-Length field is 4084, considering
        maximum SXP message length of 4096. The largest allowed value of a
        non-Compact attribute Length field is thus 4080. SXP Listener MUST
        accept and process Compact Extended-Length attributes with Length
        field in the range [0..255] without issuing any errors. In the rest of
        this document diagrams showing usage of Compact normal and/or
        Extended-Length attribute are only illustration of expected usage.
        They do not imply that only the illustrated class of attribute or
        attribute Length is supported.</t>

        <t>Attribute Value field consists of well defined sub-fields which are
        defined in this protocol spec. Attribute Value field MAY contain
        additional, possibly optional, sub-attributes which are encoded like
        other attributes.</t>
      </section>

      <section title="SXP OPEN and OPEN_RESP Message">
        <t></t>

        <t><figure>
            <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |                Version (4 octets)                             |
   +---------------------------------------------------------------+
   |                SXP Mode (4 octets)                            |
   +---------------------------------------------------------------+
   |                SXP Node-ID Attribute (7 octets)               |
   +---------------------------------------------------------------+
   |                Capabilities Attribute (variable)              |
   +---------------------------------------------------------------+
   |                Other Optional Attributes (variable)           |
   +---------------------------------------------------------------+]]></artwork>
          </figure></t>

        <texttable>
          <ttcol>Field</ttcol>

          <ttcol>Length</ttcol>

          <ttcol>Description</ttcol>

          <c>Version</c>

          <c>4</c>

          <c>Unsigned integer value. The SXP Version is set to the highest
          version that is supported on the network device</c>

          <c>SXP Mode</c>

          <c>4</c>

          <c>Unsigned integer value used to convey the SXP role that the
          device uses on the SXP connection. The following values are used: 1
          &ndash; SXP Speaker 2 &ndash; SXP Listener</c>

          <c>SXP Node-Id</c>

          <c>7</c>

          <c>REQUIRED non-transitive attribute (in SXP version 4 and above) an
          SXP Listener SHALL include in OPEN or OPEN_RESP to convey its unique
          32 bits Node ID. The attribute type used for Node ID Attribute is
          6</c>

          <c>Capabilities</c>

          <c>Variable</c>

          <c>REQUIRED non-transitive attribute (in SXP version 4 and above) an
          SXP Listener SHALL include in OPEN or OPEN_RESP to convey its
          capabilities for processing data on the connection</c>
        </texttable>

        <t>SXP Node-ID with value 0 is reserved for denoting bindings that are
        received from connections that use older versions of the SXP
        protocol.</t>

        <t>In the OPEN message, Node-ID has to be included only by the
        speaker. The listener must not send the Node-ID in OPEN message and
        the speaker has to return an error if it receives a Node-ID from a
        listener.</t>

        <section title="Capabilities Advertisement">
          <t>SXP Listeners are REQUIRED to include the Capabilities attribute
          when they send an OPEN message or when they respond to such message
          with OPEN_RESP message. The Capabilities attribute describes the SXP
          features supported by the Listener. This allows the SXP Speaker to
          tailor the behavior of the connection to what the Listener could
          process. An SXP speaker receiving Capabilities attribute from an SXP
          Listener SHALL NOT send to that listener in UPDATE messages
          information which was not indicated as supported in the Capabilities
          attribute. If an SXP speaker receives from its listener peer a
          capability that it does not itself support or recognize, it MUST
          ignore that capability. In particular, ERROR message MUST NOT be
          generated and the SXP session MUST NOT be terminated in response to
          reception of a capability that is not supported by the local SXP
          speaker.</t>

          <section title="Capabilities Attribute">
            <t>This is a REQUIRED attribute that is used by an SXP Listener to
            convey to its peer SXP Speaker the list of capabilities supported
            by the listener. The attribute contains one or more triples
            &lt;Capability Code, Capability Length, Capability Values&gt;:</t>

            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | | Capabilities  |TLV Length (C=1|Reserved       |
   | | | | | | | | | Type 6        |    EL=0)      |               |
   |0|1|0|1| | | | |               +---------------+---------------+
   | | | | | | | | |               |TLV Extended Length (C=1 EL=1) |                                                          
   +-+-+-+-+-+-+-+-+---------------+-------------------------------+
   |Cap Code 1     |Cap Length 1   |Reserved                       |
   |---------------+---------------+-------------------------------+
   |             Capability 1 Value (Variable)                     |
   +---------------------------------------------------------------+
   x                      *****                                    x
   x---------------------------------------------------------------x
   |Cap Code N     |Cap Length N   |Reserved                       |
   |---------------+---------------+-------------------------------+
   |             Capability N Value (Variable)                     |
   +---------------------------------------------------------------+
   ]]></artwork>
              </figure></t>

            <texttable>
              <ttcol>Field</ttcol>

              <ttcol>Length</ttcol>

              <ttcol>Description</ttcol>

              <c>Capability Code</c>

              <c>1</c>

              <c>Unsigned integer that unambiguously identifies individual
              capabilities</c>

              <c>Capability Length</c>

              <c>1</c>

              <c>Unsigned integer that contains the length of the Capability
              Value field in octets</c>

              <c>Capability Value</c>

              <c>Variable</c>

              <c>Variable-length field that is interpreted according to the
              value of the Capability Code field. Could have zero length</c>
            </texttable>

            <t>The encoding and meaning of the capabilities defines by this
            version of the SXP protocol spec are as follows:</t>

            <texttable>
              <ttcol>Capability Name</ttcol>

              <ttcol>Capability Code</ttcol>

              <ttcol>Capability Length</ttcol>

              <ttcol>Description</ttcol>

              <c>IPv4 Unicast</c>

              <c>1</c>

              <c>0</c>

              <c>Listener is capable of receiving and handling IPv4 unicast
              bindings</c>

              <c>IPv6 Unicast</c>

              <c>2</c>

              <c>0</c>

              <c>Listener is capable of receiving and handling IPv6 unicast
              bindings</c>

              <c>Subnet Bindings</c>

              <c>3</c>

              <c>0</c>

              <c>Listener is capable of receiving and handling subnet
              bindings</c>
            </texttable>

            <t></t>
          </section>

          <section title="Handling of Capabilities Attribute">
            <t>Subnet Bindings &ndash; This capability indicates to the
            speaker that subnet bindings SHOULD be exported as regular
            bindings without any expansion. A listener that fully supports
            bindings associated with IP prefixes other than host addresses
            (IPv4 /32 or IPv6/128) MUST include the Subnet Bindings
            capability.</t>

            <t>A listener that does not support subnet bindings in its
            forwarding path but has the capability to expand subnet bindings
            locally MUST send Subnet Bindings capability in order to prevent
            the listener from unnecessarily expanding subnet bindings. A
            listener which does not support subnet bindings but might be able
            to support the volume of expanded bindings MAY include Subnet
            Bindings capabilities.</t>

            <t>A speaker receiving such capability MAY expand subnet bindings
            exhaustively or selectively and export individual bindings within
            a subnet. The expansion of subnet bindings COULD be limited by
            implementation to a reasonable subnet size with a limit on the
            total number of bindings expanded. Therefore there could be subnet
            bindings which are not expanded.</t>

            <t>When a speaker does not expand a subnet binding it SHOULD
            export it unmodified as a subnet binding. This will allow the
            listener to propagate such bindings even when it cannot use it
            locally.</t>

            <t>When a speaker expands a subnet binding it MUST NOT export it
            as both subnet and expanded bindings since the listener or any
            further SXP peers along the SXP propagation path cannot
            distinguish expanded bindings from other host bindings and relate
            them to the subnet bindings they are originate from.</t>

            <t>IPv6 Unicast &ndash; This capability indicates to the speaker
            that the listener is capable of handling and using bindings
            associated with IPv6 unicast addresses. A listener that support
            IPv6 bindings MUST include this capability. When this capability
            is not included, the speaker MUST NOT send IPv6 bindings within
            well-known attributes. A speaker, however, SHOULD send IPv6
            bindings within Optional Transitive attributes when the IPv6
            Unicast capability is omitted. This will allow an SXP node to
            relay IPv6 bindings even when it could not process them
            locally.</t>

            <t>IPv4 Unicast &ndash; This capability should be handled in the
            same way as IPv6 Unicast capability is handled. It is unlikely for
            any SXP listener to omit IPv4 Unicast capability at least until
            pure IPv6 networks would become common.</t>
          </section>
        </section>

        <section title="Keep-alive and Hold Time Negotiation">
          <t>SXP uses TCP-based, keep-alive mechanism to determine if a
          connection is live. This mechanism has been used in all prior
          versions of the protocol. SXP version 4 adds an optional negotiated
          keep-alive mechanism within the protocol itself in order to provide
          more predictable and timely detection of connection loss.</t>

          <t>SXP connections are asymmetric with almost all of the protocol
          messages (except for OPEN/OPEN_RESP and ERROR) being sent from an
          SXP speaker to an SXP listener.</t>

          <t>SXP listener could also keep potentially large volume of state
          per connection which includes all the binding information learnt on
          a connection. Therefore, it is only meaningful to have a keep-alive
          mechanism that allows a listener to detect the loss of connection
          with a speaker.</t>

          <t>The mechanism is based on two timers:</t>

          <t>Hold Timer &ndash; Used by a listener for detection of elapsing
          time without successive KEEPALIVE and/or UPDATE messages from a
          speaker.</t>

          <t>Keep-alive Timer &ndash; Used by a speaker to trigger sending of
          KEEPALIVE messages during intervals when no other information is
          exported via UPDATE messages.</t>

          <t>The keep-alive timer is one-thirds of the negotiated hold-timer
          value.</t>

          <t>Hold Timer for the keep-alive mechanism MAY be negotiated during
          the OPEN/OPEN_RESP exchange at connection setup.</t>

          <t><list style="symbols">
              <t>A listener MAY have desirable range for Hold Time period
              locally configured or a default of [90..180] seconds. A value of
              [0xFFFF..0xFFFF] implies that the keep-alive mechanism is not
              used.</t>

              <t>A speaker MAY have a minimum acceptable Hold Time period
              locally configured or a default of 120 seconds. This is the
              shortest period of time a speaker is willing to send KEEPALIVE
              messages for keeping the connection alive. Any shorter Hold Time
              period would require a faster KEEPALIVE rate from the rate the
              speaker is ready to support. A value of 0xFFFF implies that the
              keep-alive mechanism is not used</t>

              <t>The negotiation succeeds when the speaker&rsquo;s minimum
              acceptable Hold Time falls below or within the desirable Hold
              Time range of the listener. If one end turns off the keep-alive
              mechanism, the other end should also turn it off to make the
              negotiation success.</t>

              <t>The negotiation fails when the speaker&rsquo;s minimum
              acceptable Hold Time is greater than the upper bound of the
              listener&rsquo;s Hold Time range.</t>

              <t>The selected Hold Time period of a successful negotiation is
              the maximum of the speaker&rsquo;s minimum acceptable Hold Time
              and the lower bound of the listener&rsquo;s Hold Time range.</t>

              <t>The speaker calculates the Keep-alive Time to 1/3 of the
              selected Hold Time by default unless a different Keep-alive Time
              is locally configured.</t>

              <t>The negotiation process is designed such that the outcome is
              the same regardless of the mode of the initiator.</t>
            </list></t>

          <t>The diagram below illustrates the Hold Time negotiation
          process.</t>

          <t><figure>
              <artwork><![CDATA[                     +------+                              +------+
                     | Min  |                              | Max  |
                     |      |                              |      |
                     +------+                              +------+
  Listener               |                                    |
                         |                                    |
        -----------------V<---------------------------------->V--------
  Speaker |                               |                        |
          |                               |                        |
         1|                              2|                        |3
        +-v---------+                  +--v--------+      +--------v---+
        | Selected  |                  | Selected  |      |Unacceptable|
        |  Hold     |                  |  Hold     |      | Hold       |
        |  Time     |                  |  Time     |      | Time       |
        |           |                  |           |      |            |
        +-----------+                  +-----------+      +------------+]]></artwork>
            </figure></t>

          <t>Connection initiated by Listener</t>

          <t><list style="symbols">
              <t>A listener MAY include a Hold-Time Attribute in the OPEN
              message with minimum and maximum values set to its configured
              range of Hold Time period. Hold-Time Attribute with just a
              minimum value set to 0xFFFF would indicate to the speaker that
              the keep-alive mechanism is not used.</t>

              <t>When a speaker received an OPEN message it will react as
              follows:<list style="symbols">
                  <t>If the Hold-Time attribute is not present or if it
                  contains a minimum value that is set to 0xFFFF, the speaker
                  will set its Keepalive Time to 0xFFFF to indicate that
                  keep-alive mechanism is disabled.</t>

                  <t>If the received Hold-Time attribute contains a valid
                  range, the speaker MUST include Hold-Time attribute in its
                  OPEN_RESP message with a minimum value set as follows:<list
                      style="symbols">
                      <t>0xFFFF if the speaker does not support the keep-alive
                      mechanism or if the mechanism is supported but disabled
                      due to local configuration which sets the Keep-alive
                      Time to 0xFFFF</t>

                      <t>If the speaker&rsquo;s minimum acceptable Hold Time
                      value is greater than the upper bound of the offered
                      range, the speaker MUST send and Open ERROR message with
                      sub-code set to Unacceptable Hold Time and terminate the
                      connection.</t>

                      <t>Otherwise the speaker&rsquo;s will set the selected
                      Hold Time to the maximum of its minimum acceptable Hold
                      Time value and the lower bound of the offered Hold Time
                      range.</t>

                      <t>The speaker will calculate a new value for its
                      Keep-alive Time as 1/3 of that selected Hold Time.</t>

                      <t>The speaker will set the minimum Hold Time value of
                      the Hold Time attribute to the selected Hold Time.</t>
                    </list></t>
                </list></t>

              <t>When the listener receives the OPEN_RESP from the speaker it
              will look for Hold Time Attribute:<list style="symbols">
                  <t>If Hold-Time attribute is present and contains a minimum
                  Hold Time value of 0xFFFF. The speaker will set its Hold
                  Time value to 0xFFFF to indicate that keep-alive mechanism
                  is not used.</t>

                  <t>If the minimum Hold Time value is within the range
                  offered by the listener, the listener will set its Hold-Time
                  period to the selected value it has received in the
                  OPEN_RESP.</t>

                  <t>If the minimum Hold Time value is outside the offered
                  range, the listener will send Open ERROR message with
                  sub-code set to Unacceptable Hold Time and terminate the
                  connection.</t>
                </list></t>
            </list></t>

          <t>Connection initiated by Speaker</t>

          <t><list style="symbols">
              <t>A speaker MAY include a Hold-Time Attribute in the OPEN
              message with minimum value set to its minimum acceptable Hold
              Time period. Hold-Time Attribute with just a minimum value set
              to 0xFFFF would indicate to the listener that the keep-alive
              mechanism is not used.</t>

              <t>When a listener receives an OPEN message it will react as
              follows:<list style="symbols">
                  <t>If the Hold-Time attribute is not present or if it
                  contains a minimum value that is set to 0xFFFF, the listener
                  will set its Hold Time to 0xFFFF to indicate that keep-alive
                  mechanism is disabled.</t>

                  <t>If the received Hold-Time attribute contains a valid
                  value, the speaker MUST include Hold-Time attribute in its
                  OPEN_RESP message with a minimum value set as follows:<list
                      style="symbols">
                      <t>0xFFFF if the listener does not support the
                      keep-alive mechanism or if the mechanism is supported
                      but disabled due to local configuration which sets the
                      Keep-alive Time to 0xFFFF</t>

                      <t>If the received Hold Time value is greater than the
                      upper bound of the listener&rsquo;s configured Hold Time
                      range, the speaker MUST send and Open ERROR message with
                      sub-code set to Unacceptable Hold Time and terminate the
                      connection.</t>

                      <t>If the received Hold Time value falls within the
                      listener&rsquo;s configured Hold Time range, the
                      listener will make it the selected Hold Time.</t>

                      <t>If the received Hold Time value is less than the
                      lower bound of the listener&rsquo;s configured Hold Time
                      range, the listener will set the selected Hold Time to
                      the lower bound of its Hold Time range.</t>

                      <t>The listener will set the minimum Hold Time value of
                      the Hold Time attribute to the selected Hold Time.</t>
                    </list></t>
                </list></t>

              <t>When the speaker receives the OPEN_RESP from the listener it
              will look for Hold Time Attribute:<list style="symbols">
                  <t>If Hold-Time attribute is present and contains a minimum
                  Hold Time value of 0xFFFF. The speaker will set its Hold
                  Time value to 0xFFFF to indicate that keep-alive mechanism
                  is not used.</t>

                  <t>If the received Hold Time value is greater or equal to
                  the speaker minimum acceptable Hold Time, the speaker will
                  calculate a new value for its Keep-alive Time as 1/3 of that
                  received Hold Time.</t>

                  <t>If the received Hold Time value is lower than the minimum
                  acceptable Hold Time, the speaker MUST send and Open ERROR
                  message with sub-code set to Unacceptable Hold Time and
                  terminate the connection.</t>
                </list></t>
            </list></t>

          <section title="Hold-Time Attribute">
            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | |Hold-Time (7)  | TLV Length 2/4|Reserved       |
   +-+-+-+-+-+-+-+-+---------------+-------------------------------+
   | Hold Time Minimum Value       |  Hold Time Maximum Value      |
   +---------------------------------------------------------------+]]></artwork>
              </figure></t>

            <texttable>
              <ttcol>Field</ttcol>

              <ttcol>Length</ttcol>

              <ttcol>Description</ttcol>

              <c>Optional(O)</c>

              <c>1 Bit</c>

              <c>Value is 0</c>

              <c>Non-Transitive(N)</c>

              <c>1 Bit</c>

              <c>Value is 0</c>

              <c>Partial (P)</c>

              <c>1 Bit</c>

              <c>Value is 0</c>

              <c>Compact (C)</c>

              <c>1 Bit</c>

              <c>Value is 1</c>

              <c>Extended Length (E)</c>

              <c>1 Bit</c>

              <c>Value is 0</c>

              <c>Attribute Type</c>

              <c>1</c>

              <c>Hold-Time (7)</c>

              <c>Attribute Value Length</c>

              <c>1</c>

              <c>2 - when only Hold Time Minimum Value is present. 4 &ndash;
              when both Hold Time Minimum and Maximum values are present</c>

              <c>Hold Time Minimum Value</c>

              <c>2</c>

              <c>Unsigned integer indicating the number of seconds the sender
              proposes as a lower bound for the Hold Timer period or the Hold
              Time period selected by a responder. 0 or at least 3 seconds</c>

              <c>Hold Time Maximum Value</c>

              <c>2</c>

              <c>Unsigned integer indicating the number of seconds the sender
              proposes as a upper bound for the Hold Timer period. MUST be
              greater than Hold Time Minimum Value</c>
            </texttable>

            <t>Hold-Time is a well-known discretionary attribute an initiator
            of a connection MAY include in an OPEN message and a responder MAY
            be REQUIRED to include in an OPEN_RESP in order to negotiate the
            timer periods used for keep-alive mechanism. The Hold-Time
            attribute has to be marked as Non-Transitive and an error has to
            be returned if it's not marked as Non-Transitive.</t>
          </section>
        </section>
      </section>

      <section title="SXP UPDATE Message">
        <t>Prior versions of SXP protocol specify that an UPDATE message
        contains one or more SXP mapping records. This version of SXP protocol
        generalizes the UPDATE message. An UPDATE message MAY contain one or
        more attributes. Some attributes are well-known and additional
        attributes COULD be added in the future without affecting existing
        implementations of SXP version 4. This document defines the format of
        the attributes used within UPDATE message and how they are combined to
        carry the SXP binding information.</t>

        <t><figure>
            <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +---------------------------------------------------------------+
   |                  Attribute 1 (Variable)                       |
   +---------------------------------------------------------------+
   x                    *****                                      x
   +---------------------------------------------------------------+
   |                  Attribute N (Variable)                       |
   +---------------------------------------------------------------+]]></artwork>
          </figure></t>

        <section title="UPDATE Attributes">
          <section title="IPv4-Delete-Prefix Attribute">
            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | |IPv4-Delete-   | TLV Length    |Reserved       |
   | | | | | | | | | Prefix        |  C = 1 EL = 0 |               |
   |0|0|0|1| | | | | Type = 13     +-------------------------------+
   | | | | | | | | |               |TLV Extended Length (C=1 EL=1) |         
   +-+-+-+-+-+-+-+-+---------------+-------------------------------+
   |                 IPv4 Prefix 1 (Variable)                      |
   +---------------------------------------------------------------+
   x                    *****                                      x
   +---------------------------------------------------------------+
   |                 IPv4 N Value (Variable)                       |
   +---------------------------------------------------------------+]]></artwork>
              </figure></t>

            <t>This attribute is used to convey the withdrawal of one or more
            IPv4 bindings which are unambiguously identified by their IPv4
            prefix. This attribute contains a set of IPv4 prefixes. Each IPv4
            prefix is encoded as a 2-tuple of the form &lt;length, prefix&gt;,
            whose fields are encoded as:</t>

            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |  Length =     |                Reserved                       |
   |  [0..32]      |                                               |
   +---------------+-----------------------------------------------+
   |                 Prefix                                        |                                                                 
   +---------------------------------------------------------------+
   | 0 < Length    | 9 <= Length   | 17 <= Length  |25 <= Length   |
   +---------------+---------------+---------------+---------------+
   ]]></artwork>
              </figure></t>

            <texttable>
              <ttcol>Field</ttcol>

              <ttcol>Length (in Octets)</ttcol>

              <ttcol>Description</ttcol>

              <c>Length</c>

              <c>1</c>

              <c>Unsigned integer. The length in bits of the IP address
              prefix. A length of zero indicates a prefix that matches all IP
              addresses (with Prefix field of zero octets)</c>

              <c>Prefix</c>

              <c>Variable &#9121;Length/8&#9124;</c>

              <c>An IP address prefix, followed by the minimum number of
              trailing bits needed to make the end of the field fall on an
              octet boundary. The value of trailing bits is irrelevant</c>
            </texttable>
          </section>

          <section title="IPv6-Delete-Prefix Attribute">
            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | |IPv4-Delete-   | TLV Length    |Reserved       |
   | | | | | | | | | Prefix        |  C = 1 EL = 0 |               |
   |0|0|0|1| | | | | Type = 14     +-------------------------------+
   | | | | | | | | |               |TLV Extended Length (C=1 EL=1) | 
   +-+-+-+-+-+-+-+-+---------------+-------------------------------+
   |                 IPv6 Prefix 1 (Variable)                      |
   +---------------------------------------------------------------+
   x                    *****                                      x
   +---------------------------------------------------------------+
   |                 IPv6 N Value (Variable)                       |
   +---------------------------------------------------------------+]]></artwork>
              </figure></t>

            <t>This attribute is used to convey the withdrawal of one or more
            IPv6 bindings which are unambiguously identified by their IPv6
            prefix. This attribute contains a set of IPv6 prefixes. Each IPv6
            prefix is encoded as a 2-tuple of the form &lt;length, prefix&gt;,
            whose fields are encoded as:</t>

            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |  Length =     |                  Reserved                     |
   |  [0..128]     |                                               |
   +---------------+-----------------------------------------------+
   |                 Prefix[1..4]                                  |                                                                 
   +---------------------------------------------------------------+
   | 0 < Length    | 9 <= Length   | 17 <= Length  |25 <= Length   |
   +---------------+---------------+---------------+---------------+
   |                 Prefix[5..8]                                  |                                                                 
   +---------------------------------------------------------------+
   | 33 < Length   | 41 <= Length  | 49 <= Length  |57 <= Length   |
   |               |               |               |               |
   +---------------+---------------+---------------+---------------+
   |                 Prefix[9..12]                                 |                                                                 
   +---------------------------------------------------------------+
   | 65 < Length   | 73 <= Length  | 81 <= Length  |89 <= Length   |
   +---------------+---------------+---------------+---------------+
   |                 Prefix[13..16]                                |                                                                 
   +---------------------------------------------------------------+
   | 97 < Length   | 105 <= Length | 113 <= Length |121 <= Length  |
   +---------------+---------------+---------------+---------------+
  ]]></artwork>
              </figure></t>

            <texttable>
              <ttcol>Field</ttcol>

              <ttcol>Length (in Octets)</ttcol>

              <ttcol>Description</ttcol>

              <c>Length</c>

              <c>1</c>

              <c>Unsigned integer. The length in bits of the IP address
              prefix. A length of zero indicates a prefix that matches all IP
              addresses (with Prefix field of zero octets)</c>

              <c>Prefix</c>

              <c>Variable &#9121;Length/8&#9124;</c>

              <c>An IP address prefix, followed by the minimum number of
              trailing bits needed to make the end of the field fall on an
              octet boundary. The value of trailing bits is irrelevant</c>
            </texttable>
          </section>

          <section title="Peer-Sequence Attribute">
            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | |Peer-Sequence  | TLV Length    |   Reserved    |
   |0|0|0|1|0| | | | Type = 16     |    4 * N      |               |
   +-+-+-+-+-+-+-+-+---------------+-------------------------------+
   |                         SXP ID 1                              |
   +---------------------------------------------------------------+
   |                         SXP ID 2                              |
   +---------------------------------------------------------------+
   x                         *****                                 x
   +---------------------------------------------------------------+
   |                         SXP ID N                              |
   +---------------------------------------------------------------+
  ]]></artwork>
              </figure></t>

            <t>This attribute contains the SXP nodes through which exported
            bindings has traversed. Each SXP node is identified by a 4 octet
            SXP ID. SXP ID MUST be unique for every SXP node in an SXP
            deployment. As exported bindings are propagated by an SXP Speaker,
            the speaker SHALL prepend its own SXP ID to the sequence of SXP
            IDs of the Peer-Sequence attribute that was received by an SXP
            Listener on the same node. If the exported binding is originated
            by the local node, the Peer-Sequence will contain a single SXP ID
            identifying the local node. When an UPDATE message is received by
            an SXP Listener, the first SXP ID within each Peer-Sequence
            attribute is the SXP node ID of the SXP Speaker on the remote end
            of the connection the message is received on. The last SXP ID is
            the node ID of the SXP Speaker that originates the bindings
            associated with a Peer-Sequence attribute. UPDATE message SHALL
            contain one Peer-Sequence attribute and MAY contain multiple
            Peer-Sequence attributes. Each Peer-Sequence attribute is
            associated with the bindings that follow it up to the next
            Peer-Sequence attribute if more than one Peer-Sequence attribute
            is present or up to the end of the UPDATE message.</t>
          </section>

          <section title="Source-Group-Tag Attribute">
            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | |SGT Type = 17  | TLV Length 2  |    Reserved   |
   |0|0|0|1|0| | | |  Group Tag    |     2         |               |
   +-+-+-+-+-+-+-+-+---------------+---------------+---------------+
   |       SGT Value               |            Reserved           |
   +-------------------------------+-------------------------------+
 ]]></artwork>
              </figure></t>

            <texttable>
              <ttcol>Field</ttcol>

              <ttcol>Length (in Octets)</ttcol>

              <ttcol>Description</ttcol>

              <c>Attribute Type</c>

              <c>1</c>

              <c>Source-Group-Tag (17)</c>

              <c>Attribute Value Length</c>

              <c>1</c>

              <c></c>

              <c>SGT Value</c>

              <c>2</c>

              <c>Unsigned integer value of an SGT</c>
            </texttable>
          </section>

          <section title="IPv4-Add-Prefix Attribute">
            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | |IPv6-Add-Prefix|TLV Length (C=1|     Reserved  |
   |O|N|P|C|E| | | |  Type = 11    |    EL=0)      |               |
   | | | | | | | | |               +---------------+---------------+
   |0|0|0|1| | | | |               |TLV Extended Length (C=1 EL=1) |                                                          
   +-+-+-+-+-+-+-+-+---------------+-------------------------------+
   |             IPv4 Prefix 1 (Variable)                          |
   +---------------------------------------------------------------+
   x                      *****                                    x
   |---------------------------------------------------------------+
   |             IPv4 N Value (Variable)                           |
   +---------------------------------------------------------------+]]></artwork>
              </figure></t>

            <t>This attribute is used to convey the binding of one or more
            IPv4 prefixes with an SGT value or other information. The encoding
            of each IPv4 prefix is described above in IPv4-Delete-Prefix
            Attribute section.</t>

            <t>The unbundling of IP prefixes from the information associated
            with them achieves two major objectives:</t>

            <t><list style="symbols">
                <t>Allows for efficient sharing of common attributes such as
                Peer-Sequence, and Source-Group-Tag with multiple IP
                prefixes.</t>

                <t>Allows for future introduction of new information for
                association with IP prefixes via optional attributes.</t>
              </list></t>

            <t>The associated SGT is the value specified by the latest
            preceding occurrence of Source-Group-Tag attribute within the same
            UPDATE message. An IPv4-Add-Prefix attribute SHALL be preceded
            with an occurrence of Peer-Sequence attribute. The latest
            preceding occurrence provides the path along which the bindings of
            all the prefixes contained in the IPv4-Add-Prefix have been
            traversed.</t>
          </section>

          <section title="IPv6-Add-Prefix Attribute">
            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | |IPv6-Add-Prefix|TLV Length (C=1|     Reserved  |
   |O|N|P|C|E| | | |  Type = 12    |    EL=0)      |               |
   | | | | | | | | |               +---------------+---------------+
   |0|0|0|1| | | | |               |TLV Extended Length (C=1 EL=1) |                                                          
   +-+-+-+-+-+-+-+-+---------------+-------------------------------+
   |             IPv6 Prefix 1 (Variable)                          |
   +---------------------------------------------------------------+
   x                      *****                                    x
   |---------------------------------------------------------------+
   |             IPv6 N Value (Variable)                           |
   +---------------------------------------------------------------+]]></artwork>
              </figure></t>

            <t>This attribute is used to convey the binding of one or more
            IPv6 prefixes with an SGT value or other information. The encoding
            of each IPv6 prefix is described above in IPv6-Delete-Prefix
            Attribute section. The handling of this attribute and its
            relationship with preceding attributes such as Peer-Sequence or
            Source-Group-Tag are the same as what is described above in
            IPv4-Add-Prefix section except for a different attribute type (12)
            and possibly longer IPv6 prefixes.</t>
          </section>

          <section title="IPv4-Add-Table Attribute">
            <t>This attribute provides a flexible tabular representation of
            bindings information. It is provided for efficient aggregation of
            multiple bindings information when an implementation cannot
            aggregate multiple IP prefixes that are associated with the same
            SGT or other common attributes.</t>

            <t><figure>
                <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | | IPv4-Add-Table| TLV Length    |  Reserved     |
   |0|0|0|1| | | | |  Type = 21    | (C = 1 EL = 0)|               |
   | | | | | | | | |               |-------------------------------+
   | | | | | | | | |               | TLV Extended Length (C=1 EL=1)|  
   +-+-+-+-+-+-+-+-+---------------+---------------+---------------+
   | Number of     |                 Reserved                      |
   | Columns C     |                                               |
   +---------------+---------------+---------------+---------------+
   |'1'Column Type | '1'Column Type| '1'Column     |'2'Column Type |
   |   Flags       |               |   Width       |   Flags       |
   +---------------+---------------+---------------+---------------+
   |'2'Column Type | '2'Column     |                               |
   |               |    Width      |           ***                 |
   +---------------+---------------+---------------+---------------+
   x                           ***                                 x
   +---------------+---------------+---------------+---------------+
   |'C'Column Type | 'C'Column Type| 'C'Column     |   Reserved    |
   |   Flags       |               |   Width       |               |
   +---------------+---------------+------------------------------+--+
   | '1''1' Value  |     ***       |'1''C'Value    |'1'IPv4 Prefix   |
   |               |     ***       |               |    (Variable)   |
   +---------------+---------------+---------------+-----------------+
   x         ***   x     ***       x    ***        x         ***     x
   x         ***   x     ***       x    ***        x         ***     x
   x---------------+---------------+---------------+-----------------x
   | 'R''1' Value  |     ***       |'R''C'Value    |'R'IPv4 Prefix   |
   |               |     ***       |               | (Variable)      |
   +---------------+---------------+---------------+-----------------+                                                                       

 ]]></artwork>
              </figure></t>

            <texttable>
              <ttcol>Field</ttcol>

              <ttcol>Bits</ttcol>

              <ttcol>Description</ttcol>

              <c>Number of Columns</c>

              <c>1</c>

              <c>1 - Unsigned integer which specifies the number of columns of
              information (not including the trailing IP prefix) associated
              with each prefix</c>

              <c>[i] Column Type Flags</c>

              <c>1</c>

              <c>0 &ndash; An Attribute Type Flags value defining the flag of
              the attribute in the I&rsquo;th column on each row</c>

              <c>[i] Column Type</c>

              <c>1</c>

              <c>1 &ndash; An Attribute Type value defining what each row have
              in the i&rsquo;th column position</c>

              <c>[i] Column Width</c>

              <c>1</c>

              <c>1 &ndash; The length in octets of the attribute value in the
              i&rsquo;th column on each row</c>

              <c>[j] IPv4 Prefix</c>

              <c>Variable</c>

              <c>0 &ndash; An IP prefix which is associated with the C-tuple
              of attribute values on the j&rsquo;th row of the table. The
              format of is the same as the IP prefix field in the
              IPv4-Add-Prefix attribute</c>
            </texttable>

            <t>Below is an example of an IPv4-Add-Table attribute which
            contain a single SGT attribute value on each row.</t>

            <figure>
              <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | | IPv4-Add-     | TLV Length    |   Reserved    |
   | | | | | | | | |  Table        | (C = 1 EL = 0)|               |
   |0|0|0|1| | | | |  Type = 21    |-------------------------------+
   | | | | | | | | |               | TLV Extended Length (C=1 EL=1)|  
   +-+-+-+-+-+-+-+-+---------------+---------------+---------------+
   | Number of     |                Reserved                       |
   | Columns 1     |                                               |
   +-------------------------------+-------------------------------+
   | Source-Group  | Column        |           Reserved            |
   | Tag Type = 17 | Width = 2     |                               |
   +-------------------------------+-------------------------------+--+
   |     '1'SGT Value              |'1'Prefix      |'1'IPv4 Prefix    |
   |                               | Length        |                  |
   +-------------------------------+---------------+------------------+
   x         ***                   x    ***        x         ***      x
   x-------------------------------+---------------+------------------x
   |     'R'SGT Value              |'R'Prefix      |'R'IPv4 Prefix    |
   |                               | Length        |                  |
   +-------------------------------+---------------+------------------+                                                                              

 ]]></artwork>
            </figure>

            <t></t>
          </section>

          <section title="IPv6-Add-Table Attribute">
            <t>This attribute provides a flexible tabular representation of
            IPv6 bindings information.</t>

            <figure>
              <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   |O|N|P|C|E| | | | IPv4-Add-     | TLV Length    |    Reserved   |
   | | | | | | | | |  Table        | (C = 1 EL = 0)|               |
   |0|0|0|1| | | | |  Type = 22    |-------------------------------+
   | | | | | | | | |               | TLV Extended Length (C=1 EL=1)|  
   +-+-+-+-+-+-+-+-+---------------+-------------------------------+
   | Number of     |                Reserved                       |
   | Columns C     |                                               |
   +---------------+---------------+---------------+---------------+
   |'1'Column Type | '1'Column Type| '1'Column     |'2'Column Type |
   |   Flags       |               |   Width       |   Flags       |
   +---------------+---------------+---------------+---------------+
   |'2'Column Type | '2'Column     |                               |
   |               |    Width      |           ***                 |
   +---------------+---------------+---------------+---------------+
   x                           ***                                 x
   +---------------+---------------+---------------+---------------+
   |'C'Column Type | 'C'Column Type| 'C'Column     |    Reserved   |
   |   Flags       |               |   Width       |               |
   +---------------+---------------+-------------------------------+--+
   | '1''1' Value  |     ***       |'1''C'Value    |'1'IPv6 Prefix    |
   |               |     ***       |               |  (Variable)      |
   +---------------+---------------+---------------+------------------+
   x         ***   x     ***       x    ***        x         ***      x
   x---------------+---------------+---------------+------------------x
   | 'R''1' Value  |     ***       |'R''C'Value    |'R'IPv6 Prefix    |
   |               |     ***       |               |  (Variable)      |
   +---------------+---------------+---------------+------------------+                                                                       

 ]]></artwork>
            </figure>

            <t>The format and handling of IPv6-Add-Table attribute are the
            same as what is described above in IPv4-Add-Table section except
            that the attribute type (22) is used and the trailing IPv6 Prefix
            field in each row could be potentially longer than the
            corresponding trailing IPv4 Prefix fields.</t>
          </section>
        </section>

        <section title="UPDATE Message Samples">
          <t>Single IPv4 host binding as exported by the first Speaker away
          from the originating node:</t>

          <t><figure>
              <artwork><![CDATA[ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
 | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
 |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+------
 |              SXP Message Length = 32                          |SXP
 +---------------------------------------------------------------+Msg
 |              SXP Message Type = UPDATE (3)                    |Header
 +---------------------------------------------------------------+------
 |O|N|P|C|E| | | |Peer-Sequence  | TLV Length    |   Reserved    |
 |0|0|0|1|0| | | | Type = 16     |    8          |               | 
 +-+-+-+-+-+-+-+-+---------------+-------------------------------+Peer-
 |                  Local SXP ID                                 |Seq-
 |                                                               |Attr
 +---------------------------------------------------------------+
 |SXP ID of Speaker end of the connection on which it was        |
 |             originally received                               |
 +---------------------------------------------------------------+-----
 |O|N|P|C|E| | | |Source-Group-| TLV Length    |    Reserved   |
 | | | | | | | | | Tag           |    2          |               |Src-
 |0|0|0|1|0| | | | Type = 17     |               |               |Grp-
 +-+-+-+-+-+-+-+-+---------------+-------------------------------+Tag
 |    SGT Value = <sgt#>         |             Reserved          |Attr
 |                               |                               |
 +---------------------------------------------------------------+-----
 |O|N|P|C|E| | | |IPv4-Add-Prefix| TLV Length    |Prefix Length  |IPv4-
 | | | | | | | | | Type = 11     |    5          |     32        |Add-
 |0|0|0|1|0| | | |               |               |               |Pre-
 +-+-+-+-+-+-+-+-+---------------+-------------------------------+fix
 |                  IPv4 Host Address                            |Attr
 +---------------------------------------------------------------+-----
 ]]></artwork>
            </figure></t>

          <t>Multiple IPv4 host and subnet bindings sharing the same
          Peer-Sequence as exported by the first Speaker away from the
          originating node. 11 subnets bindings of length between 17 and 24
          and as many host bindings as SXP total message size allowed are
          packed into this message:</t>

          <figure>
            <artwork><![CDATA[ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
 | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
 |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+------
 |              SXP Message Length = 4096                        |SXP 
 +---------------------------------------------------------------+Msg
 |              SXP Message Type = UPDATE (3)                    |Header
 +---------------------------------------------------------------+------
 |O|N|P|C|E| | | |Peer-Sequence  | TLV Length    |   Reserved    |
 |0|0|0|1|0| | | | Type = 16     |    8          |               |
 +-+-+-+-+-+-+-+-+---------------+-------------------------------+Peer-
 |                  Local SXP ID                                 |Seq-
 |                                                               |Attr
 +---------------------------------------------------------------+
 |SXP ID of Speaker end of the connection on which it was        |
 |             originally received                               |
 +---------------------------------------------------------------+-----
 |O|N|P|C|E| | | |IPv4-Add-Table | TLV Length    |    Reserved   |IPv4-
 | | | | | | | | |               |3 + 11x6 +572x7|               |Add-
 |0|0|0|1|0| | | | Type = 21     | = 4073        |               |Table
 +-+-+-+-+-+-+-+-+---------------+-------------------------------+Attri-
 |Number of      |               Reserved                        |-bute
 |Columns 1      |                                               |
 +---------------------------------------------------------------+------
 |Source         | Column        |         Reserved              |Col
 |Group Tag      |  Width = 2    |                               |Head
 |Type = 17      |               |                               |ers
 +-+-+-+-+-+-+-+-+---------------+-------------------------------+------
 | '1' SGT Value                 |'1'Prefix      |   Reserved    |
 |                               |Length  =      |               |
 |                               | [17..24]      |               |
 |-------------------------------+---------------+---------------+
 |        '1' IPv4 Subnet Prefix                 |   Reserved    |Subnet
 +-----------------------------------------------+---------------+Bind-
 *                                               *               |ings
 *                                               *   Reserved    |Rows
 * '2..10' <SGT Value, IPv4 Subnet Prefix> rows  *               |
 +-----------------------------------------------+---------------+
 | '11' SGT Value                |'11'Prefix     |    Reserved   |
 |                               |Length  =      |               |
 |                               | '17..24'      |               |
 |-------------------------------+---------------+---------------+
 |        '11' IPv4 Subnet Prefix                |   Reserved    |
 +-----------------------------------------------+---------------+----
 | '1' SGT Value                 |'1'Prefix      |  Reserved     |
 |                               |Length  = 32   |               |
 |-------------------------------+---------------+---------------+
 |                  '1'IPv4 Host Address                         |
 +-----------------------------------------------+---------------+
 x                                               |   Reserved    |Host
 x '2..571' <SGT Value, 32, IPv4 Host Address>   |               |Bind-
 x                                               +---------------+ing
 x                                                               |Rows
 x---------------------------------------------------------------+
 | '572' SGT Value               |'572'Prefix    |   Reserved    |
 |                               |Length  = 32   |               |
 +-------------------------------+---------------+---------------+
 |                  '572'IPv4 Host Address                       |
 +---------------------------------------------------------------+-----
   
 ]]></artwork>
          </figure>
        </section>
      </section>

      <section title="SXP ERROR Message">
        <t><figure>
            <artwork><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
   |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
   | |   0 (E=0)   |  0 (E=0)      |  non-Extended Error Code (E=0)|
   |E+-------------+---------------+-------------------------------|
   | |Error Code   |Error Sub-code |                               |
   | |  (E=1)      |  (E=1)        |                               | 
   +-+-----------------------------+                               |
   |             Data (Variable)                                   |
   +---------------------------------------------------------------+]]></artwork>
          </figure></t>

        <texttable>
          <ttcol>Field</ttcol>

          <ttcol>Bits</ttcol>

          <ttcol>Length (in Octets)</ttcol>

          <ttcol>Description</ttcol>

          <c>Extended</c>

          <c>0</c>

          <c></c>

          <c>1 &ndash; Extended Error format, which includes code, sub-code,
          and variable data 0 &ndash; Legacy non-Extended Error</c>

          <c>Error Code</c>

          <c>[1..7]</c>

          <c>0</c>

          <c>Unsigned integer in the range [0..127] &ndash; indicates the type
          of ERROR</c>

          <c>Error Sub-Code</c>

          <c></c>

          <c>1</c>

          <c>Unsigned integer in the range [0..255] &ndash; Provides extended
          information about the nature of the reported error. Each Error code
          may have one or more Error Sub-codes associated with it. If no
          appropriate Error Sub-code is defined, then zero (Unspecified) value
          is used</c>

          <c>non-Extended Error Code</c>

          <c></c>

          <c>2</c>

          <c>Error code values: 0 &ndash; No error 1 - Version Mismatch 2 -
          Message Parse Error</c>

          <c>Data</c>

          <c></c>

          <c>Variable Message Length - 10</c>

          <c>Additional data for diagnosing the reason for the ERROR message.
          The content depends on the values of Error Code and Error
          Sub-code</c>
        </texttable>

        <section title="Error Codes">
          <t></t>

          <t><figure>
              <artwork><![CDATA[    +-----------+-----------+-------------------------------------+
    | Error     | Error     |          Symbolic Name              |
    |  Code     | Sub-code  |                                     |
    +-----------+-----------+-------------------------------------+ 
    |    1      |    -      |     Message Header Error            |
    |           |           |                                     |
    +-----------+-----------+-------------------------------------+
    |    2      |    -      |    OPEN Message Error               |
    |           |           |                                     |
    +-----------+-----------+-------------------------------------+  
    |    3      |    -      |     UPDATE Message Error            |
    |           |           |                                     |
    +-----------+-----------+-------------------------------------+
    |           |    1      |  Malformed Attribute List           |
    |           |           |                                     |
    +           +-----------+-------------------------------------+
    |           |    2      |  Unexpected Attribute               |
    |           |           |                                     |
    +           +-----------+-------------------------------------+
    |           |    3      |  Missing Well-known Attribute       |
    |           |           |                                     |
    +           +-----------+-------------------------------------+
    |           |    4      |  Attribute Flags Error              |
    |           |           |                                     |
    +           +-----------+-------------------------------------+
    |           |    5      |  Attribute Length Error             |
    |           |           |                                     |
    +           +-----------+-------------------------------------+
    |           |    6      |  Malformed Attribute                |
    |           |           |                                     |
    +           +-----------+-------------------------------------+
    |           |    7      |  Optional Attribute Error           |
    |           |           |                                     |
    +           +-----------+-------------------------------------+
    |           |    8      |  Unsupported Version Number         |
    |           |           |                                     |
    +           +-----------+-------------------------------------+
    |           |    9      |  Unsupported Optional Attribute     |
    |           |           |                                     |
    +           +-----------+-------------------------------------+
    |           |    10     |  Unacceptable Hold Time             |
    |           |           |                                     |
    +-----------+-----------+-------------------------------------+
   ]]></artwork>
            </figure></t>

          <t>The error codes and the error sub-codes are used to intrerpret
          the type of error and the specific attributes that have caused the
          error need not be sent back with the error message.</t>
        </section>
      </section>

      <section title="SXP PURGE-ALL Message">
        <t>There is no payload corresponding to this message type.</t>

        <t>When an SXP connection on which the local SXP node is a speaker is
        administratively deleted, SXP MUST send a PURGE-ALL message to the SXP
        listener at the remote end. This will provide the speaker timely
        knowledge that the connection is about to be torn down and that it is
        not an intermittent loss of communication. The listener will
        immediately delete all bindings that were received on that connection
        and will not go through Delete Hold-Down timer before removal of
        bindings.</t>

        <t>When SXP feature gets administratively disabled, SXP MUST send
        PURGE-ALL message on all the connections on which the local end is a
        speaker.</t>

        <t>Upon receiving a PURGE-ALL message, an SXP speaker MUST immediately
        delete all the bindings that were received on that connection.
        PURGE-ALL message should have the same effect as an UPDATE message
        with IPv4-Delete-Prefix or IPv6-Delete-Prefix attributes that contain
        all bindings which has been exported on the connection. A PURGE-ALL is
        simply an optimization of such delete at-once case.</t>
      </section>

      <section title="SXP KEEPALIVE Message ">
        <t>There is no payload corresponding to this message type. This
        message is send by the speaker to the listener side when KEEPALIVE
        timer expires.</t>
      </section>
    </section>

    <section title="Update Message Handling">
      <t>An SXP UPDATE message may be received only in the ON state. Receiving
      an UPDATE message in any other state is an error. When an UPDATE message
      is received, each field is checked for validity.</t>

      <section title="UPDATE Message Validation">
        <t>UPDATE message SHALL be organized as illustrated below:</t>

        <t><figure>
            <artwork><![CDATA[   +-------------------------------------------------------------+
   |Zero or more global optional attributes which are unrelated  |
   |to any of the binding delete or add attributes or groups     |
   |             below them                                      |
   +-------------------------------------------------------------+
   |At most one each IPv4-Delete-Prefix or IPv6-Delete-Prefix    |
   +-------------------------------------------------------------+
   |Zero or more Del-IPv4 or Del-IPv6 (non-zero only when neither|
   |  IPv4-Delete-Prefix nor IPv6-Delete-Prefix are present)     |
   +-------------------------------------------------------------+]]></artwork>
          </figure></t>

        <t>All errors detected while processing the UPDATE message MUST be
        indicated by sending the ERROR message with the Error Code UPDATE
        Message Error to the SXP speaker from which the UPDATE message was
        received. The Error Sub-code provides additional information about the
        error. UPDATE message is a sequence of attributes. Attributes could be
        further classified as compact, compact with extended length, or
        non-compact attributes. Each attribute consists of a fixed-size
        header, 3, 4, or 8 octets long respectively, which contains TLV Length
        field. The total length of each attribute is thus: Attribute Length =
        3/4/8 + TLV Length If the length of any attribute is larger than the
        SXP Message length or the sum of Attribute Length of all attributes is
        larger than the SXP Message length, the Error Sub-code MUST be set to
        Malformed Attribute List. If any recognized attribute has Attribute
        Flags that conflicts with its Attribute Type, then the Error Sub-code
        MUST be set to Attribute Flags Error. The Data field MUST contain the
        erroneous attribute (flags, type, length, and value). If any
        recognized attribute has Attribute Length that conflicts with the
        expected length (based on its Attribute Type), then the Error Sub-code
        MUST be set to Attribute Length Error. The Data field MUST contain the
        erroneous attribute (flags, type, length, and value).</t>

        <t>If any recognized attribute does not conform to the attribute
        specification in UPDATE Attributes section, then Error Sub-code MUST
        be set to Malformed Attribute. The Data field MUST contain the
        erroneous attribute (flags, type, length, and value). Cases of
        malformed attributes:</t>

        <t>&bull; IP Prefix length field is outside of the permitted range
        [0..32]/[0..128] for IPv4/IPv6 respectively.</t>

        <t>&bull; Implied length of IP Prefix field which extends the prefix
        beyond the extent of the containing attribute.</t>

        <t>If any attribute appears more than once when at most one occurrence
        is permitted then the Error Sub-code MUST be set to Malformed
        Attribute List.</t>

        <t>If any attribute appears in a location where it is not expected
        (such as IPv4-Add-Prefix/IPv6-Add-Prefix without preceding
        Source-Group-Tag) then the Error Sub-code MUST be set to Malformed
        Attribute List.</t>

        <t>If an optional non-transitive attribute is unrecognized, it is
        quietly ignored.</t>

        <t>If an optional transitive attribute is unrecognized, the Partial
        bit (the third high-order bit) in the attribute flags octet is set to
        1, and the attribute is retained for export according to the scope in
        which the attribute appears. A global attribute is exported along
        every binding specified in this UPDATE message on all connections for
        which the local peer is a speaker. A path attribute is exported along
        the bindings from a single path. A per &lt;path, source-group&gt;
        attribute is exported along bindings received from a single path which
        share a single Source-Group-Tag attribute. If an optional attribute is
        recognized and has a valid value, then, depending on the type of the
        optional attribute, it is processed locally, retained, and updated, if
        necessary, for possible export to listener peers. A Peer-Sequence
        attributes is checked for syntactic correction. If the path is
        syntactically incorrect (e.g. length is not a multiple of 4), then an
        ERROR message MUST be sent to the speaker with Error Sub-code set to
        Malformed Attribute. SXP listener learns the SXP Node-ID from the SXP
        Node-ID in the OPEN or OPEN_RESP it receives at connection
        establishment. This Node-ID is used to validate subsequent
        Peer-Sequence attributes from the same peer. SXP MUST check whether
        the leftmost (with respect to the position of octets in the protocol
        message) SXP Node-ID in the Peer-Sequence is equal to the SXP Node-ID
        of the peer that sent the UPDATE message. If the checks determines
        that this is not the case, then an ERROR message MUST be sent to the
        speaker with Error Sub-code set to Malformed Attribute.</t>
      </section>

      <section title="UPDATE Message processing">
        <t>Processing of an UPDATE message by an SXP listener follows the
        organization of the message according to the following high level
        steps:</t>

        <t><list style="numbers">
            <t>UPDATE Message validation as described in section 6.1.</t>

            <t>Processing of global optional attributes.</t>

            <t>Processing of binding delete attributes. Binding delete
            attributes include any of IPv4-Del-Prefix, IPv6-Del-Prefix,
            Del-IPv4, or Del-IPv6 attributes.</t>

            <t>Processing path-groups. <list style="letters">
                <t>Process per-path common optional attributes</t>

                <t>Add-Prefix groups. Each Add-Prefix group starts with a
                Source-Group-Tag attribute.<list style="empty">
                    <t>i. Process per &lt;path, SGT&gt; optional
                    attributed.</t>

                    <t>ii. Process IPv4-Add-Prefix attribute</t>

                    <t>iii. Process IPv6-Add-Prefix attribute</t>
                  </list></t>

                <t>Processing IPv4-Add-Table attribute</t>

                <t>Processing IPv6-Add-Table attribute</t>

                <t>Processing Add-IPv4 attributes</t>

                <t>Processing Add-IPv6 attributes</t>
              </list></t>

            <t>Processing trailing optional non-transitive attributes</t>
          </list> Each path-group starts with an instance of Peer-Sequence
        attribute.</t>

        <t>Processing Binding Delete Attributes (step 3)</t>

        <t>If the UPDATE message contains a non-empty
        IPv4-Del-Prefix/IPv6-Del-Prefix or one or more Del-IPv4/Del-IPv6
        attributes, the previously received bindings from the remote speaker
        peer, whose IP/IPv6 addresses are contained in any of those
        attributes, SHALL be removed from the SXP input bindings database.
        Additional processing of a deleted binding depends on whether it was
        the SXP contributed binding for its IPv4/IPv6 address and whether it
        was the selected and exported binding by the master binding
        data-base:</t>

        <t><list style="symbols">
            <t>Non-contributed binding &ndash; No further processing is
            needed.</t>

            <t>Contributed but not exported &ndash; The binding was the
            preferred binding by SXP and was reported to the master binding
            database. However, the binding was not exported by SXP due to
            higher priority contributors in the master binding database. SXP
            SHALL select a new contribution for the IPv4/IPv6 address of the
            deleted binding from the input bindings database, and, upon change
            of SGT or other associated data that are reported to the master
            bindings database, report the newly selected binding to the master
            binding database. The newly selected contribution will not affect
            the exported binding since an existing higher priority contributor
            is unaffected.</t>

            <t>Contributed and Exported - The binding was the preferred
            binding by SXP and was the selected binding for the IPv4/IPv6
            address by the master binding database. SXP contribution was
            either the only binding contributor or the highest priority
            contributor.</t>
          </list>SXP SHALL select a new contribution for the IPv4/IPv6 address
        of the deleted binding among the bindings for that address from other
        peers.</t>

        <t>SXP SHALL apply the following rules for selecting a binding for
        reporting to the master binding database:</t>

        <t><list style="numbers">
            <t>Shortest Path rule</t>
          </list>Choose a binding which has the shortest Peer-Sequence among
        all the bindings for the same IP address. A binding received without
        Peer-Sequence attribute (i.e. from an earlier version speaker) is
        considered as being received with a Peer-Sequence that contains a
        single NULL SXP Node-ID (value 0).<list style="numbers">
            <t>Most Recently Received rule</t>
          </list>If there are more than one bindings with the shortest
        Peer-Sequence, the binding which has been most recently received is
        selected.</t>

        <t>If the deleted binding was the only binding for its IP address in
        the SXP input binding database, SXP SHALL report it to the master
        binding database. The external outcome when no other contributors to
        the same IP address is present, is that a deletion of the binding
        using IPv4-Del-Prefix/IPv6-Del-Prefix or Del-IPv4/Del-IPv6 attribute
        MUST be exported on all connections on which the local end is a
        speaker.</t>

        <t>If there is one or more additional contributors in the master
        binding database, a new binding is selected and it MUST be exported
        using IPv4-Add-Prefix/IPv6-Add-Prefix, IPv4-Add-Table/IPv6-Add-Table,
        or Add-IPv4/Add-IPv6 and associated with a Peer-Sequence that includes
        only the SXP Node ID of the local instance.</t>

        <t>If the binding selection rule has yielded a newly selected binding
        from SXP input binding database it SHALL be compared to the binding it
        is replacing, and</t>

        <t><list style="symbols">
            <t>upon change of SGT, or, other associated data that are reported
            to the master binding database, report the newly selected binding
            to the master binding database. The newly selected contribution
            will become the selected contribution and will trigger export.</t>

            <t>If the SGT of the newly selected binding, and all other
            associated data that are reported to the master binding database,
            remain the same as those of the deleted binding, SXP SHOULD NOT
            report a new contribution to the master binding database. However,
            the newly selected binding has a different Peer-Sequence attribute
            because binding from a different peer is selected. There could
            also be changes in optional transitive attributes. SXP SHALL
            export the newly selected binding directly and include all
            transitive attributes, thus bypassing the usual notification path
            from the master bindings database.</t>
          </list></t>

        <t>Processing Binding Add Attributes (step 4)</t>

        <t><list style="empty">
            <t>I. Implicit delete of current bindings</t>

            <t>If the UPDATE message contains a non-empty
            IPv4-Add-Prefix/IPv6-Add-Prefix/IPv4-Add-Table/IPv6-Add-Table or
            one or more Add-IPv4/Add-IPv6 attributes, the previously received
            bindings from the remote speaker peer (if any), whose IP/IPv6
            addresses are contained in any of those attributes, SHALL be
            removed from the SXP input bindings database and replaced with the
            new bindings for those IPv4/IPv6 addresses. An added binding is an
            implicit delete of an existing binding for the same IP address
            from the same peer. The external behavior of the implicit deletion
            is as described for the processing of
            IPv4-Del-Prefix/IPv6-Del-Prefix or Del-IPv4/Del-IPv6 attributes
            where the deleted binding is the last binding for its IP
            address.</t>

            <t>II. Loop Detection</t>

            <t>SXP MUST check the Peer-Sequence associated with each added
            binding for the presence of loops before accepting the binding as
            a new binding or as a replacement for an implicitly deleted
            binding. SXP loop detection is done by scanning the entire
            Peer-Sequence attribute, and checking that the SXP Node ID of the
            local system does not appear in the Peer-Sequence.</t>

            <t>III. New or Replaced Bindings</t>

            <t>SXP SHALL keep the most recently received binding for each IP
            address in the input binding database. SXP SHALL keep all the
            mandatory attributes and any optional transitive attributes and
            MAY keep other non-transitive attributes. A subset of the
            attributes, such as Source-Group-Tag, are used locally on the
            system and have to be reported to the master binding database. The
            master binding database arbitrates among multiple binding
            contributors for the same IP address. SXP SHALL report new
            bindings to the master binding database along with the attributes
            the master database is aware of. The arbitration process in the
            master binding database yields a selected binding contributor for
            each IP address. The binding contributor could be a binding source
            other than SXP. SXP MUST NOT export any binding it has received in
            UPDATE message unless it has survived the arbitration process in
            the master binding database to become the selected binding.</t>

            <t>SXP SHALL become aware of the outcome of the arbitration
            process within the master binding database. The arbitration
            process could be triggered by binding add or delete reported by
            SXP or binding changes from other binding contributors. SXP NEED
            NOT be aware of the presence of other binding contributors, their
            nature, or how many such contributors exist. SXP is only aware of
            the possible existence of such binding contributors and only need
            to know whether a selected binding was contributed by SXP itself
            or by some other contributor. The mechanism by which SXP becomes
            aware of changes of selected bindings in the master binding
            database is an implementation detail.</t>
          </list></t>
      </section>

      <section title="Generating UPDATE Message">
        <t>Binding Removal Event</t>

        <t>If SXP becomes aware of a deletion of a binding for an IPv4/IPv6
        prefix it then processes the event as follows:</t>

        <t><list style="symbols">
            <t>The IPv4/IPv6 prefix SHALL be included in either an
            IPv4-Del-Prefix/IPv6-Del-Prefix or a single Del-IPv4/Del-IPv6
            attribute of an outgoing UPDATE message. SXP MAY delay exporting
            of such event for a small and bound duration in order to allow for
            aggregation as long as such aggregation will not exhibit different
            external behavior from individually exported events.</t>
          </list>Binding Change Event</t>

        <t>If SXP becomes aware of a new or changed binding for an IPv4/IPv6
        prefix it then processes the event as follows:</t>

        <t><list style="symbols">
            <t>If the selected contributor is not SXP, SXP SHALL associate the
            binding with a Peer-Sequence that contains the local SXP Node ID
            as the only peer and export the binding in one of
            IPv4-Add-Prefix/IPv6-Add-Prefix, IPv4-Add-Table/IPv6-Add-Table, or
            Add-IPv4/Add-IPv6. SXP SHALL include in the outgoing UPDATE
            message the attributes that are available from the master binding
            database.</t>

            <t>If the selected contributor is SXP, SXP MUST locate the
            contributed binding in its input binding database and extract the
            Peer-Sequence that was associated with the binding when it was
            originally received. SXP SHALL prepend the local SXP Node ID to
            the Peer-Sequence when it is added to an outgoing UPDATE message.
            SXP SHALL include in the UPDATE message the mandatory attributes
            reported by the master binding database and any additional
            well-known or optional transitive attributes that were associated
            with the binding upon its arrival. SXP MAY add additional optional
            transitive or non-transitive attributes.</t>
          </list>SXP SHALL flag an SXP originated binding in its input
        bindings database in order to support UPDATE message processing as
        specified in this section.</t>
      </section>
    </section>

    <section title="SXP Failure Scenarios">
      <t>The following SXP failure scenarios are analyzed in this section:</t>

      <t><list style="symbols">
          <t>SXP Connection Failure</t>

          <t>Operational (Hardware) Failures</t>
        </list>SXP connection can fail for various reasons:</t>

      <t><list style="symbols">
          <t>Peer device offline</t>

          <t>Loss of network connectivity</t>

          <t>Loss message authentication key synchronization with the peer. In
          this case the device re-attempts message exchange for a fixed number
          of times and if the problem persists then the connection is torn
          down.</t>

          <t>Software processing failures, e.g. SXP message decode failure.
          SXP version mismatch and SXP message parse error will result in the
          device sending an Error TLV. When sending an error message, the
          error code is passed as part of the TLV and the action decision is
          left up to the peer device. This error code COULD be simply logged
          for debugging purposes. The SXP connection is closed and retries to
          setup after sending the SXP ERROR message.</t>
        </list></t>
    </section>

    <section title="SXP Timers">
      <t>There are 5 SXP timers defined in SXP protocol:</t>

      <t><list style="symbols">
          <t>Retry open timer<list style="symbols">
              <t>Retry open timer is triggered as long as there is one SXP
              connection on the device that is not up.</t>

              <t>The default timer value is 120 seconds. Value 0 means retry
              timer will not be started.</t>

              <t>The retry continues until the SXP connection is setup or the
              retry timer is configured to be 0.</t>
            </list></t>
        </list><list style="symbols">
          <t>Delete Hold Down Timer<list style="symbols">
              <t>Delete hold down timer is trigger when a connection is on
              listener side is torn down. The bindings learnt are not deleted
              immediately but being held off for the delete hold down timer
              period.</t>

              <t>The bindings are deleted upon the expiry of this timer.</t>

              <t>The timer value is set to 120 seconds and it is not
              configurable.</t>
            </list></t>
        </list><list style="symbols">
          <t>Reconciliation Timer<list style="symbols">
              <t>If a SXP connection is brought up within the delete hold down
              timer period, bindings are re-populated from the speaker side.
              At the same time, the old bindings learnt before the connection
              goes down still holds.</t>

              <t>Reconciliation timer starts right after the connection is
              brought up to wait for the new bindings to be forwarded from the
              peer.</t>

              <t>Upon the timer expiry, SXP checks the bindings in its input
              binding database and delete any stale bindings. Those are
              bindings that could have been deleted on the remote side while
              the connection was down.</t>

              <t>The default timer value is 120 seconds. Value 0 means
              reconciliation timer will not be started.</t>
            </list></t>
        </list><list style="symbols">
          <t>Hold Timer<list style="symbols">
              <t>Hold Timer MAY be used by an SXP Listener for detect when a
              connection is no longer live.</t>

              <t>The usage of Hold Timer and KEEPALIVE is negotiated during
              OPEN/OPEN_RESP exchange.</t>

              <t>The Hold Timer is started when the connection reached ON
              state. The interval is set to the negotiated Hold Time.</t>

              <t>The Hold Timer is restarted whenever a listener receives a
              KEEPALIVE or an UPDATE message.</t>

              <t>If a listener does not receive successive KEEPALIVE, and/or
              UPDATE messages within the period negotiated for the Hold Time
              of a connection, the Hold Timer expires.</t>

              <t>Upon the timer expiry, SXP MUST send an ERROR message with
              Hold Timer Expired code and tear down the connection.</t>

              <t>The rest of the behavior is the same as when TCP indicates to
              SXP the loss of a connection. The Delete Hold Down timer is
              restarted for delayed deletion of bindings as described
              above.</t>

              <t>The suggested period of the Hold Timer is 90 seconds. SXP
              implementation MAY allow for local configuration of Hold Time
              for a listener. The actual value of the Hold Time used for a
              connection is negotiated.</t>
            </list></t>
        </list><list style="symbols">
          <t>Keepalive Timer<list style="symbols">
              <t>Keepalive Timer MAY be used by an SXP Listener for triggering
              sending KEEPALIVE messages to the listener peer which monitors a
              connection using Hold Timer.</t>

              <t>The usage of Keepalive Timer and KEEPALIVE messages is
              negotiated during OPEN/OPEN_RESP exchange.</t>

              <t>The Keepalive Timer is restarted for the first time when the
              connection reaches its ON state.</t>

              <t>The Keepalive Timer is restarted thereafter, when a speaker
              sends an UPDATE or KEEPALIVE message.</t>

              <t>Upon timer expiry, SXP speaker MUST send KEEPALIVE message in
              order to indicate to the listener that the connection remains
              live.</t>

              <t>The suggested period of the Keepalive Timer is 30 seconds.
              SXP implementation MAY allow for local configuration of
              Keepalive Time for a speaker. The actual value of the Keepalive
              Time used for a connection is set to 1/3 of the negotiated Hold
              Time.</t>

              <t>The Keepalive Timer is restarted with a random jitter. The
              actual period of the Keepalive Timer is set to a random value
              between 0.75 to 1.0 of the negotiated Keepalive Time which is
              re-calculated every time the timer is restarted.</t>
            </list></t>
        </list></t>
    </section>

    <section title="SXP Version Negotiation">
      <t>In a software release, SXP always supports the highest version in
      that release and any version lower than that. SXP version negotiation is
      per connection base. On the same device, the connections established
      between this device and the peer devices may have difference versions,
      depending on the SXP version running on the peer devices.</t>

      <t>If the two ends of a SXP connection run the same SXP version, the
      running version is used. If the two ends are running different versions,
      the version of the connection is decided with following process:</t>

      <t>When the initiator of a connection sends a SXP OPEN message, the
      highest supported version is coded in the OPEN message.</t>

      <t>On the receiver side, if the version in the OPEN message is higher
      than the version it can support, it sends back OPEN RESPONSE message
      with the highest version it supports (which is lower than the version in
      OPEN message). When the OPEN RESPONSE message is received by the
      initiator, it accepts the version coded in the OPEN RESPONSE. The
      receiver side&rsquo;s version is used as the connection&rsquo;s
      version.</t>

      <t>In summary, SXP connection picks the highest version that is
      supported on both sides.</t>

      <section title="SXP Versions">
        <t>SXP supports three versions starting from version 2 to 4. The
        details of what is supported in each of the version follows -</t>

        <texttable>
          <ttcol>Ver</ttcol>

          <ttcol>IPv4 Bindings</ttcol>

          <ttcol>IPv6 Bindings</ttcol>

          <ttcol>Subnet Binding Expansion</ttcol>

          <ttcol>Loop Detection</ttcol>

          <ttcol>SXP Capability Exchange</ttcol>

          <c>2</c>

          <c>Yes</c>

          <c>Yes</c>

          <c>No</c>

          <c>No</c>

          <c>No</c>

          <c>3</c>

          <c>Yes</c>

          <c>Yes</c>

          <c>Yes</c>

          <c>No</c>

          <c>No</c>

          <c>4</c>

          <c>Yes</c>

          <c>Yes</c>

          <c>Yes</c>

          <c>Yes</c>

          <c>Yes</c>
        </texttable>

        <t></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>SXP carries mappings between IP addresses and source groups. An
      adversary that can modify the data can potentially gain an advantage
      over the system. This specification defines the use of TCP MD5 Signature
      Option <xref target="RFC5925"></xref> to provide integrity protection
      for the information. The key used with TCP MD5<xref
      target="RFC1321"></xref> should be chosen to be long and have high
      entropy to provide as much protection from dictionary attacks as
      possible.</t>

      <t>MD5 has been shown to contain weaknesses so this protection may not
      be sufficient in many environments. In addition, an adversary who can
      observe the data may be able to use the information learned to identify
      weak or highly valued targets so it is desirable that confidentiality
      also be provided. A future revision of this specification will provide
      more robust security mechanisms such as ones based on IPSEC or TLS.</t>
    </section>

    <section title="Implementation Note">
      <t>Current implementations of the protocol support source and peer IP
      addresses to be IPv4 only. However, the implentation should take care of
      being able to support IPv6 addresses as well in the future. As such,
      there are not changes expected to be done in the protocol itself to
      support IPv6 address based connections.</t>

      <t>The SXP password can be upto 80 ASCII characters.</t>
    </section>

    <section title="IANA Considerations">
      <t>TBD</t>
    </section>

    <section title="IPR Disclosure">
      <t>"By submitting this Internet-Draft, each author represents that any
      applicable patent or other IPR claims of which he or she is aware have
      been or will be disclosed, and any of which he or she becomes aware will
      be disclosed, in accordance with Section 6 of BCP 79."</t>
    </section>

    <section title="Copyright Notice and Disclaimer">
      <t>"Copyright (C) The IETF Trust (year). This document is subject to the
      rights, licenses and restrictions contained in BCP 78, and except as set
      forth therein, the authors retain all their rights." Additional
      copyright notices are not permitted in IETF Documents except in the case
      where such document is the product of a joint development effort between
      the IETF and another standards development organization or the document
      is a republication of the work of another standards organization. Such
      exceptions must be approved on an individual basis by the IAB.</t>

      <t>"This document and the information contained herein are provided on
      an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
      OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY , THE IETF TRUST AND
      THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
      IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
      INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
      WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."</t>
    </section>

    <section title="Acknowledgements">
      <t>Special acknowledgements are due to the following contributors. The
      protocol was originally developed by Michael Smith, Michael Fine and
      Awais Nemat. Enhancements have been made over the years by Ronen Arad,
      Rajesh Bhandari, Lei Fu and Paddy Nallur. Darrin Miller provided
      significant input into requirements for later versions of the protocol.
      Fabio Maino specified the data plane format. Thanks to Joe Salowey and
      Susan Thomson for edits and review.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      &RFC2119;

      &RFC1321;

      &RFC5925;
    </references>

    <references title="Informative References">
      <reference anchor="I-D.draft-quinn-sfc-nsh">
        <front>
          <title>Network Service Header</title>

          <author fullname="Quinn" initials="P" surname="Quinn">
            <organization></organization>
          </author>

          <author fullname="Guichard" initials="J" surname="Guichard">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Surendra" initials="S" surname="Surendra">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Smith" initials="M" surname="Smith">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Henderickx" initials="W" surname="Henderickx">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Nadeau" initials="T" surname="Nadeau">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Agarwal" initials="P" surname="Agarwal">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Manur" initials="R" surname="Manur">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Chauhan" initials="A" surname="Chauhan">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Majee" initials="S" surname="Majee">
            <organization>S</organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Elzur" initials="U" surname="Elzur">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Melman" initials="D" surname="Melman">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Garg" initials="P" surname="Garg">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="McConnell" initials="B" surname="McConnell">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Wright" initials="C" surname="Wright">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Kevin" initials="K" surname="Kevin">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <date day="22" month="January" year="2015" />
        </front>
      </reference>

      <reference anchor="I-D.draft-guichard-sfc-nsh-dc-allocation">
        <front>
          <title>Network Service Header (NSH) Context Header Allocation (Data
          Center)</title>

          <author fullname="Guichard" initials="J" surname="Guichard">
            <organization></organization>
          </author>

          <author fullname="Smith" initials="M" surname="Smith">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Kumar" initials="S" surname="Kumar">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Majee" initials="S" surname="Majee">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Agarwal" initials="P" surname="Agarwal">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Glavin" initials="K" surname="Glavin">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <author fullname="Laribi" initials="Y" surname="Laribi">
            <organization></organization>

            <address>
              <postal>
                <street></street>

                <city></city>

                <region></region>

                <code></code>

                <country></country>
              </postal>

              <phone></phone>

              <facsimile></facsimile>

              <email></email>

              <uri></uri>
            </address>
          </author>

          <date day="17" month="December" year="2014" />
        </front>
      </reference>
    </references>

    <section title="SGT in L2 Cisco Metadata (CMD)">
      <t>The Source Group Tag can be carried in the control plane (using SXP
      described in the main body of this I-D), or in the data plane. Appendix
      A describes Cisco Metadata (CMD) Version 1, the format for carrying SGT
      in the data plane at L2. The SGT is processed hop-by-hop.</t>

      <section title=" CMD Format">
        <t>The CMD format is comprised of a header and payload. The fields are
        transmitted in network byte order from left to right.</t>

        <section title="Metadata Header">
          <t><figure>
              <artwork><![CDATA[ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
 | | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
 |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
 |      Metadata Ethertype       |    Version    |     Length    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
 |                 Metadata Payload (4-12 bytes)                 |
 +                                                               +
 |                            ...                                |
 +                            ...                                +
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+                      ]]></artwork>
            </figure></t>

          <t>Metadata Ethertype:</t>

          <t>The Metadata field is 2 bytes and contains the ethertype assigned
          by IEEE for Cisco Metadata (0x8909).</t>

          <t>Version</t>

          <t>The Version field is 1 byte, and is set to 1 for CMD Header
          version 1 described in this document.</t>

          <t>Length</t>

          <t>The Length field is 1 byte, and specifies the length of the CMD
          in 4-byte units, not including the first 4 bytes. Valid values are
          in the range of 1-3.</t>
        </section>

        <section title="Metadata Payload">
          <t>Metadata payload is composed of 1 or more options. Only one
          option is defined in this document.</t>

          <t><figure>
              <artwork><![CDATA[+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
| | | | | | | | | | |1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|3|3|
|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+
|  Len  |      Option Type      |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                          Value (2-6 bytes)                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-++-+-+-+-+-+-+-+-+-+ ]]></artwork>
            </figure></t>

          <t>Len</t>

          <t>The most significant three bits of the Option are the Option
          Length, expressed in a multiple of 4 bytes not including the first 4
          bytes.</t>

          <t>Option Type</t>

          <t>After Len, the next 13 bits are the Option Type. For SGT Option,
          the value is 1.</t>

          <t>Value</t>

          <t>The Value field is 2-6 bytes of data. For SGT Option, the value
          is 2 bytes, and contains a 16-bit Source Group Tag (SGT). If an
          Option of Type 1 (SGT Option) is present in the Metadata Payload, it
          must be included as the first Option in the Payload.</t>
        </section>

        <section title="Header Protection">
          <t>The CMD header does not have a checksum or CRC, and relies on the
          underlying ethernet CRC for integrity protection.</t>
        </section>

        <section title="Header Insertion, Removal, and Relocation">
          <t>The useful lifespan of a metadata header is expected to be a
          single zone of authority, such as an enterprise or service provider,
          where all routers and switches within that zone are under the
          control of that authority. CMD headers should be inserted upon
          entrance to a zone of authority or while traversing the zone, and
          removed just prior to exit from the zone.</t>

          <section title="Insertion">
            <t>A CMD header can be inserted in a packet at any point during
            network traversal. Any device wishing to add metadata to a packet
            should check for a pre-existing header, and add a new header if
            one is not present.</t>

            <t>When used at layer 2, in order to simplify parsing and allow
            bridging of frames through CMD-unaware bridges, the CMD header
            shall be inserted after the .1Q tag, if present. If the .1Q tag is
            not present the CMD header will immediately follow the MAC Source
            Address. Below is a non-exhaustive list of L2 frames with CMD.</t>

            <t>CMD Insertion only:</t>

            <t>DA,SA,L3pld -&gt; DA,SA,CMD,L3pld</t>

            <t>DA,SA,1Q,L3pld -&gt; DA,SA,1Q,CMD,L3pld</t>

            <t>DA,SA,1Q,1Q,L3pld -&gt; DA,SA,1Q,1Q,CMD,L3pld</t>

            <t>DA,SA,1Q,MPLS,L3pld -&gt; DA,SA,1Q,CMD,MPLS,L3pld</t>

            <t>CMD and MACsec Insertion:</t>

            <t>DA,SA,L3pld -&gt; DA,SA,MACsec,CMD,L3pld</t>

            <t>DA,SA,1Q,L3pld -&gt; DA,SA,MACsec,1Q,CMD,L3pld</t>

            <t>DA,SA,1Q,1Q,L3pld -&gt; DA,SA,MACsec,1Q,1Q,CMD,L3pld</t>
          </section>

          <section title="Removal">
            <t>A CMD header should be removed prior to exit from the zone of
            authority, regardless of contents.</t>
          </section>
        </section>
      </section>

      <section title="Assigned Ethernet Type">
        <t>IEEE has assigned the Ethernet Type Field Number 0x8909 to the CMD
        protocol.</t>
      </section>
    </section>

    <section title="SGT in Network Services Header (NSH)">
      <t>NSH Is defined in <xref target="I-D.draft-quinn-sfc-nsh"></xref>.
      <xref target="I-D.draft-guichard-sfc-nsh-dc-allocation"></xref> provides
      a recommended default allocation for the fixed context headers within
      NSH. Using the recommended default, SGT is carried as follows in the
      NSH:</t>

      <t>Source Class: Set to SGT associated with source IP address in
      packet</t>

      <t>Destination Class: Set to SGT associated with destination IP address
      in packet (when known)</t>
    </section>
  </back>
</rfc>
