<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Validating DCCP Simultaneous Feature Negotiation Procedure</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Somsak Vanit-Anunchai</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Telecommunication Engineering, Institute of Engineering Suranaree University of Technology</institution>
          ,
          <addr-line>Muang, Nakhon Ratchasima</addr-line>
          ,
          <country country="TH">Thailand</country>
        </aff>
      </contrib-group>
      <fpage>115</fpage>
      <lpage>132</lpage>
      <abstract>
        <p>This paper investigates the feature negotiation procedure of the Datagram Congestion Control Protocol (DCCP) in RFC 4340 using Coloured Petri Nets (CPNs). After obtaining a formal executable CPN model of DCCP feature negotiation, we analyse it using state space analysis. The experimental result reveals that simultaneous negotiation could be broken on even a simple lossless FIFO channel. In the undesired terminal states, the confirmed feature values of Client and Server do not match.</p>
      </abstract>
      <kwd-group>
        <kwd>Datagram Congestion Control Protocol</kwd>
        <kwd>Feature Negotiation</kwd>
        <kwd>Coloured Petri Nets</kwd>
        <kwd>State Space Analysis</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>1.1</p>
      <sec id="sec-1-1">
        <title>Motivation</title>
        <p>
          Unlike TCP, DCCP does not impose flow control on data transfer. But state
information such as the sequence number sent and received is still required in order
to trace packet loss which is crucial for congestion control. From the sequence
number variables, a sequence number validity window is set up [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] to defend
against attacks from hackers. Thus connection management procedures specified
in RFC4340 are used to set up and clear the state information. Apart from
the reliable connection management, both sides must choose congestion control
mechanisms and agree upon the same CCID. This requires a reliable negotiation
procedure called Feature Negotiation which is also specified in RFC4340. If both
sides are not aware of reaching an agreement with different CCIDs, the situation
will be very harmful and currently there is no recovery mechanisms. Hence it
is vital to verify that the DCCP feature negotiation procedure works correctly.
In this paper we use Coloured Petri Nets (CPNs) [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] to formally model and
analyse DCCP feature negotiation procedures.
1.2
        </p>
      </sec>
      <sec id="sec-1-2">
        <title>Related Work</title>
        <p>
          Formal methods [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] are techniques based on mathematically defined syntax and
semantics for the specification, development and verification of software and
hardware systems. They remove ambiguities and are indispensable for checking
correctness of high-integrity systems. Coloured Petri Net (CPN) [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] is a formal
method which is widely used [
          <xref ref-type="bibr" rid="ref13 ref17 ref2 ref3 ref5">2, 3, 5, 13, 17</xref>
          ] to model and analyse concurrent and
complex system. An important advantage of CPNs is its graphical notation with
the abstract data types providing a high level of user friendliness. CPNs were
used to verify industrial scale protocols such as the Wireless Application
Protocol (WAP) [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], the Internet Open Trading Protocol (IOTP) [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ], TCP [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]
and DCCP [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ]. [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ] studied DCCP connection management operating over
reordering channels with no loss using Coloured Petri Nets. [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ] extended the work
in [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ] by including DCCP simultaneous open procedure (RFC 5596) and
Network Address Translators (NAT) in the model. However regarding DCCP feature
negotiation procedure, there are very few articles [
          <xref ref-type="bibr" rid="ref19 ref20">19, 20</xref>
          ] investigating it. As far
as we are aware of, DCCP feature negotiation has not been formally modelled
and analysed before.
1.3
        </p>
      </sec>
      <sec id="sec-1-3">
        <title>Contribution</title>
        <p>The contribution of this paper is three fold. Firstly, as far as we are aware of
this paper presents the first formal executable model of DCCP feature
negotiation. Secondly the formal analysis helps us identify an error in the specification.
Thirdly, investigating the state space analysis provides us insight what causes
the error.</p>
        <p>This paper is organised as follows. Section 2 provides an overview of the
protocol and packet format. Section 3 briefly describes DCCP feature negotiation
procedure. The description of the CPN model of DCCP feature negotiation is
described in section 4, which starts with modelling assumptions and specification
interpretation. Section 5 discusses analysis result and insight. Section 6 presents
the conclusion of this paper and future work.
DCCP
Header
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</p>
        <p>Source Port</p>
        <p>Destination Port
Generic
Header</p>
        <p>Data Offset CcVal CsCov</p>
        <p>Checksum</p>
        <p>Packet X
Res Type = Reserved Sequence Number (high bits)
1</p>
        <p>Sequence Number (low bits)
Reserved</p>
        <p>Acknowledge Number</p>
        <p>(high bits)</p>
        <p>Acknowledge Number (low bits)
Option Type Length</p>
        <p>Feature No. Values
. . .
. . .</p>
        <p>
          Application Data
The Internet protocol architecture is organized into five layers known as the
TCP/IP reference model. While TCP is a transport protocol that provide the
reliable delivery of a byte stream, DCCP is a transport protocol for the timely but
unreliable delivery of datagrams. DCCP can be viewed as an upgraded version
of UDP equipped with new facilities for connection management;
acknowledgement; feature negotiation and congestion control.
DCCPs exchange packets over the Internet Protocol between a client and a
server. The protocol uses 11 packets to setup and release connections and transfer
data. RFC 4340 [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] defines a DCCP packet as a sequence of 32 bit words
comprising a DCCP Header and Application Data area as shown in Fig. 1. The
header comprises a generic header (applicable to all packets), followed by an
acknowledgement number (if any) and then the options field. The length of the
Option and Application Data fields can vary.
        </p>
        <p>
          The DCCP header contains 16 bit source and destination port numbers, and
a 16 bit checksum. An 8 bit data offset indicates the length in 32-bit words from
the beginning of the Header to the beginning of the Application data. CCVal, a
4 bit field, is a value used by the congestion control mechanisms [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. Checksum
Coverage (CsCov), also a 4 bit field, specifies the part of the packet being
protected by the 16 bit checksum. The four bit Packet Type field specifies the name
of the packet: Request, Response, Data, DataAck, Ack, CloseReq, Close, Reset,
Sync, SyncAck and Listen. Request and Data packets do not include
acknowledgement numbers. The sequence numbers of Data packets and the sequence
numbers and acknowledgement numbers of Ack and DataAck packets can be
reduced to 24-bit short sequence numbers when setting the Extend Sequence
Number (X) field to 0.
        </p>
        <p>
          The Options field contains state information or commands for applications
to negotiate various features such as the Congestion Control Identifier (CCID)
and the width of the Sequence Number validity window [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ].
2.2
        </p>
      </sec>
      <sec id="sec-1-4">
        <title>Options Fields</title>
        <p>
          The options field is a multiple of 32-bit words which may contain more than
one option. Because each option consists of a multiple of 8 bits, the field may
need to be padded to the word boundary. Options are classified into two groups:
single byte and multi-byte. A single byte option has a value from 0 to 31 which
represents an option type. An Option type is a 8-bit integer which represents the
meaning of the option, such as 1 meaning mandatory, 2 meaning slow receiver
[
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. The format of a multi-byte option is shown in Fig. 1. The first byte is an
option type. The second byte is the length in bytes of each option including
the option type field, the length and data of the option. The data comprises a
number of features, the format of which will be explained in section 3.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Feature Negotiation Procedure</title>
      <p>DCCP allows both the client and server to change their parameters called
features using feature negotiation procedures. The negotiation can happen at any
time but typically during connection establishment. Each entity can initiate the
negotiation of two kinds of features: local features (L)-the initiator’s features
and remote features (R)-the other side’s features. Four particular options are
dedicated to feature negotiations; Change L, Confirm L, Change R and Confirm
R. The option types have values of 32 to 35 respectively. The format of Confirm
or Change Options including feature numbers and feature values are shown in
a)
b)
c)</p>
      <p>Option Length Feature
Type Number</p>
      <p>Feature values
Fig. 2. Option format in DCCP header and an example of a Change L option.
Fig 2 a). Fig 2 b) shows six of 8-bit values representing a Change L option when
negotiating CCID. The meaning of each 8-bit values is shown in Fig 2 c).</p>
      <p>
        The feature number identifies the feature. For instance, 1 refers to CCID and
2 means short sequence numbers are allowed. The complete list of features is
given in [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. To reach agreement on a feature value, a reconciliation rule known
to both sides is required. Currently RFC 4340 defines two reconciliation rules:
server priority and non-negotiable.
      </p>
      <p>1. The server priority rule: This rule is applied when the feature value is a
fixed-length byte string. During negotiation DCCP entity keeps an ordered
preference list of the feature values. The initiator sends a Change option containing
its preference list. The receiver responds with the Confirm option containing an
agreed value followed by its preference list. Thus the agree value will appear
twice in the Confirm option. The agreed value is defined as the first element in
the server’s list that matches any element in the client’s list. If there is no match,
the agreed value remains the existing feature value.</p>
      <p>For example, the client sends 32,6,1,2,3,4 corresponding to Change L(32),
length(6), CCID(1), the client’s preference list(2,3,4). This means the client
proposes to change its CCID and the preferred CCIDs are CCID#2, CCID#3 and
CCID#4 respectively. The server responds 35,7,1,3,3,4,2 corresponding to
Confirm R(35), length(7), CCID (1), agreed value (3) and the server’s preference list
(3,4,2). According to the Client’s and Server’s preference lists in this example,
the client must use CCID#3.</p>
      <p>2. Non-negotiable rule: The Change and Confirm options under this rule
contain only one feature value which is a byte string. After receiving the Change
L from the feature local, the feature remote must accept the valid value and reply
with Confirm R containing this value. If the received feature value is invalid, the
feature remote must send an empty Confirm R. This non-negotiable rule must
not be used with Change R and Confirm L options.</p>
      <p>For example the client sends 32,9,3,0,0,0,0,4,0 corresponding to Change
L(32), length(9), Sequence number window (3), value of window size(1024). The
server replies with 35,9,3,0,0,0,0,4,0.
3.1</p>
      <sec id="sec-2-1">
        <title>Finite State Machines</title>
        <p>The feature negotiation procedures are represented by state diagrams. Figure 3
shows the state diagram for feature local. It comprises three states: STABLE;
CHANGING; and UNSTABLE. The entity in the STABLE state always knows
its feature value and expects the other end agrees with the same value. When
the local receives Change R, it calculates a new agreed value and replies Confirm
L. On the other hand the Confirm R received will be discarded.</p>
        <p>After the entity in STABLE sends the first Change L command, it enters
the CHANGING state and goes back to the STABLE state upon receiving a
Confirm R or a empty Confirm R. When the local in CHANGING does not get
reply from the other side, it keeps retransmit the Change L option.
time out or
rcv non-ack packet
retransmit Change L
rcv Confirm R
rcv Change R
calculate a new feature value
snd Confirm L</p>
        <p>When the preference list is changed by its user while the entity is in the
CHANGING state, it enters the UNSTABLE state. Here it ignores the on-going
negotiation but starts a new negotiation by sending a Change command with
the new preference list before going back to the CHANGING state.</p>
        <p>The state diagram for feature remote can be obtained by interchanging Ls
and Rs in Fig. 3. Thus each entity consists of three state machines working
together: connection management, feature local and feature remote. It is possible
that one side initiates Change L while the other side initiates Change R of
the same feature. According to Fig. 3 when the local in CHANGING receives
Change R, it computes a new agree value and replies Confirm L. This situation
is called simultaneous negotiation. The specification also allows the preferences
to be changed at any time.
3.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Important Rules of Feature Negotiation</title>
        <p>Although the feature negotiation procedures explained in the previous section
sound simple, the real situation could be very complex when packets are
reordered and lost. Moreover the negotiation for the same feature could be
simultaneously initiated by both sides and the preference lists can be changed at any
time. To cope with this, the RFC specifies some rules intended to provide reliable
signalling so that both sides reach agreement with the same feature value.</p>
      </sec>
      <sec id="sec-2-3">
        <title>Non-reordered Change and Confirm Options The RFC specifies that the</title>
        <p>Change and Confirm options in packets that do not arrive in strictly increasing
order must be ignored. According to the related pseudo code and algorithms,
the strictly increasing order rule is only enforced for packets that contain the
Change and Confirm options. An ordered packet with the Change and/or
Confirm options may have a sequence number less than GSR if the later packets do
not contain any Change or Confirm options.</p>
        <p>In order to check the order of arrival, the RFC specifies another two variables:
Feature Greatest Sequence Number Received (FGSR) and Feature Greatest
Sequence Number Sent (FGSS). If the received packet’s sequence number is less
than or equal to FGSR, Change or Confirm options received must be ignored.
If the acknowledgement Number is less than FGSS or the packet contains no
acknowledgement, the Confirm option received must be ignored.</p>
        <p>Because DCCP-Data with short sequence numbers is vulnerable to be
attacked, any option attached to DCCP-Data that might cause the connection
to be reset shall be ignore. Thus both Change and Confirm options received
in DCCP-Data must be ignored in all circumstances. A sequence number valid
packet received that contains non-reordered Change or Confirm options updates
FGSR while FGSS is updated when the entity sends a Change Option during a
transition from STABLE or UNSTABLE to CHANGING.</p>
        <p>Retransmission Because the reordered options are ignored or the packet can
be lost, Change options must be retransmitted when the sender does not receive a
non-reordered Confirm option within a specific period. The Confirm option must
be generated only when a non-reordered Change option is received.
Retransmission of options may be achieved by either generating a new packet (DCCP-Ack
or DCCP-Sync) or by including the appropriate option field in a packet that is
about to be transmitted. Retransmission continues until a non-reordered
Confirm option is received or the connection is closed down.
4
4.1</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>CPN Model of DCCP Feature Negotiation (DCCP-FN)</title>
      <sec id="sec-3-1">
        <title>Modelling Assumptions and Specification Interpretation</title>
        <p>We make the following assumptions regarding DCCP feature negotiation when
creating our model.</p>
        <p>1. This paper assumes the medium to be First-in First-out (FIFO)
channels with no loss. There are three reasons supporting this assumption. Firstly,
according to RFC 4340 the Change and Confirm Options must arrive in strictly
increasing order otherwise it will be ignored. This requirement implies that
actually DCCP feature negotiation protocol operates over FIFO channels. Secondly,
reordered and/or lossy channels can mask out inherent errors such as
unspecified receptions which could appear when protocol operates over FIFO channels
with no loss. Thus protocol validation shall be started from operating over the
FIFO channels with no loss. Thirdly, the assumption of FIFO channel makes the
model simpler. We can abstract away irrelevant details such as sequence number,
acknowledgement number, state variables FGSS and FGSR.</p>
        <p>
          2. Although we agree with [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] that the feature negotiation is not
independent of the protocol state machine. To reduce the complexity of our CPN model,
we assume that the feature negotiation is independent of the protocol state
machine. Without loss of generality, instead of modelling three FSMs (connection
management, feature local and feature remote) at each side, only one FSM (Fig.
3) (either the feature local’s or the feature remote’s FSM) is required. In
particular we assign the feature local’s FSM to Client and the feature remote’s FSM to
Server. This assumption makes the CPN model readable and easy to understand.
        </p>
        <p>3. A DCCP packet is modelled by an option type and a list of feature values
(preference list). Other fields such as packet type and sequence-acknowledgement
numbers are omitted because they do not affect the operation of the feature
negotiation.</p>
        <p>
          4. RFC4340 allows many options to be sent in one packet and many
features to be negotiated at the same time. Following an incremental approach [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ],
as a first step we consider the negotiation of Congestion Control Identification
(CCID) that uses the server-priority reconciliation rule because the ability to
negotiate the suitable congestion control mechanism is the main objective of DCCP.
        </p>
        <p>5. Our model does not include the mandatory options, invalid options and
unknown feature numbers.</p>
        <p>
          6. RFC 4340 specifies that the preference list can be changed at any time. It
is unclear what should be happened if the preference list is changed while the
endpoint in STABLE. However according to [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ], the endpoint can remain in
STABLE if it changes the preference list without changing the preferred value.
Thus we assume that the endpoint remains in STABLE after it changes the
preference list. However we investigate the scenario when the endpoint changes the
preference list without changing the preferred value.
4.2
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Model Structure</title>
        <p>
          Our model structure is inspired by [
          <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
          ] who model and analyse DCCP
connection management. However [
          <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
          ] do not include the feature negotiation
procedure. Our DCCP feature negotiation model comprises three hierarchical
levels as shown in Fig. 4. The first level page is Main_FN. This page calls the
second level pages named FN_Local and FN_Remote. The third level has six pages.
Each one is named by a DCCP feature negotiation state. Figure 5 shows Global
Declaration which defines the data associated with the model. The CPN diagram
in the first level page (Fig 6) comprises two substitution transitions (represented
Main_FN
        </p>
        <p>FN_Local
FN_Remote</p>
        <p>Stable_Local
Changing_Local
Unstable_Local
Stable_Remote
Changing_Remote</p>
        <p>Unstable_Remote
1: (* Feature Negotiations *)
2: colset E = with e;
3: colset CCID = int with 2..255;
4: colset Confirmed_Value = CCID;
5: colset Preference_List = list CCID;
6: colset Option_Type = with ChangeL | ConfirmL
7: | ChangeR | ConfirmR;
8: colset Option_Field = product Option_Type
9: * Preference_List;
10: colset List_Option_Field = list Option_Field;
11: colset FN_State = with STABLE | CHANGING | UNSTABLE;
12: colset FN_CB = product FN_State * Confirmed_Value
13: * Preference_List;</p>
        <p>Remote2Local
List_Option_Field</p>
        <p>Local2Remote
List_Option_Field</p>
        <p>FN_CB
Remote</p>
        <p>FN_Remote</p>
        <p>Fig. 6. The Main_FN overview page.</p>
        <p>FN_CB
In/Out</p>
        <p>FN_CB</p>
        <p>In/Out Output</p>
        <p>List_Option_Field
STABLE_Local
ApplicationEvent
lopt2
lopt2
lopt1
Preference_List</p>
        <p>Fusion 1</p>
        <p>New</p>
        <p>Preference</p>
        <p>Fig. 8. The STABLE_Local page.
by double-line rectangles), four places (represented by ellipses) and arcs
connecting between places and transitions. The substitution transition on the left models
the Client (Local) and another on the right models the Server (Remote). Both
communicate via two places named Remote2Local and Local2Remote in the
middle of Fig. 6. Each place models a unidirectional and First-in First-out
channel typed by List_Option_Field. List_Option_Field is a list of product sets
named Option_Field defined in Fig. 5. Option_Field comprises Option_Type
and Preference_List sets also defined in Fig. 5. Through these places, tokens
(which are values taken from the type of the place) are transferred between
Local and Remote.</p>
        <p>Places FN_State_Local and FN_State_Remote, typed by FN_CB, model the
states of the feature negotiation procedure. The FN_CB is defined as a product
comprising colour sets FN_State, Confirmed_Value and Preference_List.</p>
        <p>The substitution transitions Local and Remote in Fig. 6 are linked to the
second level pages named FN_Local (Fig. 7) and FN_Remote. Each of the second
level CPN diagrams comprises further three substitute transitions, named by
the feature negotiation states (Fig. 7) and linked to the CPN diagrams in the
third level. Because these CPN diagrams of FN_Remote are very similar to those
of FN_Local, this paper illustrates only the CPN diagrams of FN_Local.
(UNSTABLE,
cnf, newPrefLS)
(CHANGING,
cnf, prefLS)
(CHANGING,
cnf, prefLS)
(CHANGING,
cnf, prefLS)</p>
        <p>
          Fusion 1 1`[
          <xref ref-type="bibr" rid="ref4 ref5 ref6 ref7 ref8">8,7,6,5,4</xref>
          ]
PreferenceChanges newPrefLS PreNfeerwence
        </p>
        <p>Preference_List
[n &gt; 0]
Retrans
n
n-1
lopt2^^
lopt2 [(ChangeL, prefLS)]</p>
        <p>RCNT
0</p>
        <p>INT
List_Option_Field</p>
        <p>Output In/Out</p>
        <p>lopt2^^
lopt2 [(ConfirmL,
(pphSrrdeeT(ffmALLBSSaL))tcE),h,(prefLPkt, Rcv_Chan^mg^aetpRcrhe(fpLSre)f]:(L:CPlhokapt,nt1pgreeRf,LSp)refLPkt)
(cCnfH,ApNreGfILNSG), lo(pCt1onfirmR, [])
In/Out (cCnHf,ApNreGfILNSG), Rcv_EmptyComfirmR lopt1</p>
        <p>::lopt1
FN_CB</p>
        <p>FN_CB (cSnTf,ApBrLeEfL,S)
(STABLE,
ckLocal(prefLS,
cnf_p::prefLPkt),
prefLS)</p>
        <p>In/Out Input</p>
        <p>List_Option_Field
Rcv_ComfirmR
(ConfirmR, cnf_p
::prefLPkt)::lopt1
lopt1
(CHANGING,
cnf_s, prefLS)</p>
        <p>Fig. 9. The CHANGING_Local page.</p>
        <p>In/Out Output
List_Option_Field
lopt2^^
[(ChangeL,
newPrefLS)]</p>
        <p>lopt2
(UNSTABLE, cnf, newPrefLS)
(CHANGING, cnf, newPrefLS)
In/Out FN_CB
FN_CB
(UNSTABLE, cnf, prefLS)
(UNSTABLE, cnf, prefLS)
(ChangeR, prefLPkt)
::lopt1</p>
        <p>In/Out Input
List_Option_Field
(ConfirmR,
prefLPkt)::lopt1
(UNSTABLE, cnf, prefLS)
(UNSTABLE, cnf, prefLS)</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Analysis of DCCP-FN CPN Model</title>
      <sec id="sec-4-1">
        <title>5.1 Initial Configurations</title>
        <p>
          Our DCCP feature negotiation model is analysed using CPN Tools [
          <xref ref-type="bibr" rid="ref14 ref4">4,14</xref>
          ] version
4.0 on an Intel i5-4300U 1.90GHZ with 4 GB RAM. To analyse a particular
scenario, the CPN model needs to be initialised by distributing initial tokens
to places FN_State_Local and FN_State_Remote (Fig. 6); places FN_Command
and NewPreference in Stable_Local (Fig. 8) as well as places FN_Command
and NewPreference in Stable_Remote. The channel places Remote2Local and
Local2Remote initially contain an empty list. The presence of tokens 1‘e in
place FN_Command allows the entity to start the feature negotiation procedure.
The analysis in this paper assumes no retransmission.
        </p>
        <p>
          We choose to model and analyse the negotiation of the feature CCID. This
feature uses the reconciliation rule: server priority. The default feature value is 2
which represents TCP-like congestion control. Although currently the standard
specifies only CCID2 (RFC4341), CCID3 (RFC4342) and CCID4 (RFC5622),
we make up CCID numbers in each preference list for the purpose of validating
the feature negotiation procedure. Table 1 shows the values in preference lists we
used in our experiment before and after the preference has been changed. The
resolved values before and after the preference changed under the server-priority
reconciliation rule are shown in Table 1 as well. According to [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] the endpoint
can remain in the STABLE state if it changes the preference list without changing
the preferred value. Therefore at Client (Local) we keep the old preference list
but adding the new feature value (4) at the end of the list.
        </p>
        <p>Table 2 shows the initial configurations of twelve possible scenarios. They
are classified according to which sides are allowed to initiate the negotiation and
which sides change their preference lists. Our CPN model allows simultaneous
negotiation and both sides can change their preference lists (Case 12).
5.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Analysis Result</title>
        <p>The analysis results of DCCP feature negotiation CPN model using the initial
configurations described in the previous subsection are shown in Table 3. The
total number of states, arcs in each case are shown in the second and third
columns. Column 4, 5 and 6 show the terminal markings of each scenario. All
terminal markings have both sides in STABLE and no packets left in the channels
and hence there is no unspecified reception. The terminal markings are classified
into 3 types. Type-I is the desired terminal state where both Client and Server
reach the same feature value. Type-II is the undesired terminal state where both</p>
        <p>Terminal Markings
sides reach the different feature values but an endpoint knows that the agreed
value is wrong. Type-III is also the the undesired terminal state where both
sides reach the different feature values and both endpoints do not know that
their feature values do not match.
Figure 11 shows a scenario leading to a Type-II terminal state. Referring Fig.
11, after sending the first Change L Option, Client changes its preference list in
UNSTABLE and sends the second Change L. When receiving the Confirm R of
the first Change L in the CHANGING state, Client enters the STABLE state
and then ignores the Confirm R of the second Change L. The agreed feature
value in the first Confirm R is outdated and different from the feature value in
Server. However when comparing the preference list in the first Confirm R option
with the preference list in Client’s state information, Client is able to know that
the agreed value is wrong. Obviously in this case the Client should resend the
Change option or reset the connection.</p>
        <p>Figure 12 illustrates a scenario leading to an undesired Type-III terminal
state. This is the center of our attention in this paper. This scenario could
happen when both sides initiate the negotiation simultaneously and both sides
change their preference list (Case 12). We notice that all Confirm options in
Fig. 12 are discarded. It becomes one way communication with no
acknowledgement. Figure 12 can be viewed as three attempts of negotiation. Two attempts
are initiated simultaneously from both sides. This could be happened during
DCCP simultaneous open procedure. Preference list changed in CHANGING</p>
        <sec id="sec-4-2-1">
          <title>CLIENT (LOCAL)</title>
          <p>
            (STABLE, 2, [
            <xref ref-type="bibr" rid="ref5 ref6 ref7 ref8">8,7,6,5</xref>
            ])
(CHANGING, 2, [
            <xref ref-type="bibr" rid="ref5 ref6 ref7 ref8">8,7,6,5</xref>
            ])
          </p>
        </sec>
        <sec id="sec-4-2-2">
          <title>Preference Change (UNSTABLE, 2, [8,7,6,5,4]) CHANGING, 2, [8,7,6,5,4]) (STABLE,8, [8,7,6,5,4])</title>
        </sec>
        <sec id="sec-4-2-3">
          <title>CLIENT (LOCAL)</title>
          <p>
            (STABLE, 2, [
            <xref ref-type="bibr" rid="ref5 ref6 ref7 ref8">8,7,6,5</xref>
            ])
(CHANGING, 2, [
            <xref ref-type="bibr" rid="ref5 ref6 ref7 ref8">8,7,6,5</xref>
            ])
(STABLE, 8, [
            <xref ref-type="bibr" rid="ref5 ref6 ref7 ref8">8,7,6,5</xref>
            ])
          </p>
        </sec>
        <sec id="sec-4-2-4">
          <title>Preference Change (STABLE, 8, [8,7,6,5,4]) (STABLE, 4, [8,7,6,5,4])</title>
        </sec>
        <sec id="sec-4-2-5">
          <title>SERVER (REMOTE)</title>
          <p>
            (STABLE, 2, [
            <xref ref-type="bibr" rid="ref3 ref4 ref8">3,4,8</xref>
            ])
(STABLE, 2, [
            <xref ref-type="bibr" rid="ref3 ref4 ref8">3,4,8</xref>
            ])
(STABLE, 8, [
            <xref ref-type="bibr" rid="ref3 ref4 ref8">3,4,8</xref>
            ])
(STABLE, 4, [
            <xref ref-type="bibr" rid="ref3 ref4 ref8">3,4,8</xref>
            ])
          </p>
        </sec>
        <sec id="sec-4-2-6">
          <title>SERVER (REMOTE)</title>
          <p>
            (STABLE, 2, [
            <xref ref-type="bibr" rid="ref3 ref4 ref8">3,4,8</xref>
            ])
(CHANGING, 2, [
            <xref ref-type="bibr" rid="ref3 ref4 ref8">3,4,8</xref>
            ])
(UNSTABLE, 2, [
            <xref ref-type="bibr" rid="ref4 ref5">4,5</xref>
            ])
(CHANGING, 2, [
            <xref ref-type="bibr" rid="ref4 ref5">4,5</xref>
            ])
(STABLE, 5, [
            <xref ref-type="bibr" rid="ref4 ref5">4,5</xref>
            ])
state causes the third attempt of negotiation. All three calls do not receive any
reply. The root of the problem is that the new preference list from the other side
cannot pass through.
          </p>
          <p>Type-III terminal state is worse than type-II because both entities are not
aware that their agreed feature values are different. In our opinion the main
objective of the DCCP feature negotiation protocol is to exchange the preference
lists. After the preference list of the other side is known, the agreed feature value
can be correctly computed. We suggest a solution when the preference list is
changed (either major or minor change), the endpoint shall send Change option
to inform the other side. If the preference list is changed in the STABLE state,
the endpoint shall send Change option and enter CHANGING state. Another
solution could be that the endpoint does not discard Confirm option in STABLE
state.
6</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion and Future Work</title>
      <p>This paper presents Coloured Petri Net model and analysis of DCCP feature
negotiation procedure operating over FIFO with no loss channels. The analysis
result shows that the protocol could fail to an undesired state (Type-III) where
the feature values of both sides do not match and both sides are not aware of
the mismatch.</p>
      <p>Usually when the protocol operates over reordering and/or lossy channels, it
is possible that the protocol could fail due to the channel imperfection. However
if the protocol operates over the ideal channels (FIFO with no loss), the error
indicates the flaw in the protocol itself.</p>
      <p>The terminal state (Type-III) occurs when both sides change their preference
lists during the simultaneous feature negotiation. Although the odds of this
scenario is low, given the large number of potential connection in the Internet,
we consider that this defect could be a serious threat.</p>
      <p>The model development begins with a lot of assumptions. In the future we
would like to relax these assumptions and refine the model. In particular we are
interested to include connection management procedures together with Network
Address Translators (NATs) into the model.</p>
      <p>Acknowledgments This work is supported by Research Grant from the Thai
Network Information Center Foundation and the Thailand Research Fund. The
author is thankful to anonymous reviewers. Their constructive feedback has
helped the author improve the quality of this paper.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>F.</given-names>
            <surname>Babich</surname>
          </string-name>
          and
          <string-name>
            <given-names>L.</given-names>
            <surname>Deotto</surname>
          </string-name>
          .
          <article-title>Formal Methods for the Specification and Analysis of Communication Protocols</article-title>
          .
          <source>IEEE Communications Surveys</source>
          ,
          <volume>4</volume>
          (
          <issue>1</issue>
          ):
          <fpage>2</fpage>
          -
          <lpage>20</lpage>
          ,
          <string-name>
            <surname>Third</surname>
            <given-names>Quarter</given-names>
          </string-name>
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>J.</given-names>
            <surname>Billington</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Diaz</surname>
          </string-name>
          , and G. Rozenberg (Eds.).
          <article-title>Application of Petri Nets to Communication Networks</article-title>
          , volume
          <volume>1605</volume>
          of Lecture Notes in Computer Science. Springer, Heidelberg,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>J.</given-names>
            <surname>Billington</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Gallasch</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B.</given-names>
            <surname>Han</surname>
          </string-name>
          .
          <article-title>A Coloured Petri Net Approach to Protocol Verification</article-title>
          . In J. Desel,
          <string-name>
            <given-names>W.</given-names>
            <surname>Reisig</surname>
          </string-name>
          , and G. Rozenberg, editors,
          <source>Lectures on Concurrency and Petri Nets, Advances in Petri Nets</source>
          , volume
          <volume>3098</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>210</fpage>
          -
          <lpage>290</lpage>
          . Springer, Heidelberg,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>CPN</surname>
          </string-name>
          <article-title>Tools home page</article-title>
          . http://cpntools.org.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>J. C. A.</given-names>
            <surname>Figueiredo</surname>
          </string-name>
          and
          <string-name>
            <given-names>L.M.</given-names>
            <surname>Kristensen</surname>
          </string-name>
          .
          <article-title>Using Coloured Petri Nets to Investigate Behavioural and Performance Issues of TCP Protocols</article-title>
          .
          <source>In Second Workshop and Tutorial on Practical Use of Coloured Petri Nets and Design/CPN, DAIMI PB541</source>
          , pages
          <fpage>21</fpage>
          -
          <lpage>40</lpage>
          . Department of Computer Science, University of Aarhus,
          <fpage>11</fpage>
          -
          <lpage>15</lpage>
          October
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>S.</given-names>
            <surname>Floyd</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Handley</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Kohler</surname>
          </string-name>
          .
          <article-title>Problem Statement for the Datagram Congestion Control Protocol (DCCP), RFC 4336</article-title>
          . Available via http://www.rfceditor.org/rfc/rfc4336.txt,
          <year>March 2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>S.</given-names>
            <surname>Floyd</surname>
          </string-name>
          and
          <string-name>
            <given-names>E.</given-names>
            <surname>Kohler</surname>
          </string-name>
          .
          <article-title>Profile for Datagram Congestion Control Protocol (DCCP) Congestion Control ID 2: TCP-like Congestion Control, RFC 4341</article-title>
          . Available via http://www.rfc-editor.org/rfc/rfc4341.txt,
          <year>March 2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>S.</given-names>
            <surname>Floyd</surname>
          </string-name>
          and
          <string-name>
            <given-names>E.</given-names>
            <surname>Kohler</surname>
          </string-name>
          .
          <article-title>Profile for Datagram Congestion Control Protocol (DCCP) Congestion Control ID 4: TCP-Friendly Rate Control for Small Packets (TFRC-SP)</article-title>
          ,
          <article-title>RFC 5622</article-title>
          . Available via http://www.rfc-editor.org/rfc/rfc5622.txt,
          <year>August 2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>S.</given-names>
            <surname>Floyd</surname>
          </string-name>
          , E. Kohler, and
          <string-name>
            <given-names>J.</given-names>
            <surname>Padhye</surname>
          </string-name>
          .
          <article-title>Profile for Datagram Congestion Control Protocol (DCCP) Congestion Control ID 3: TCP-Friendly Rate Control (TFRC), RFC 4342</article-title>
          . Available via http://www.rfc-editor.org/rfc/rfc4342.txt,
          <year>March 2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>S.</given-names>
            <surname>Gordon</surname>
          </string-name>
          .
          <article-title>Verification of the WAP Transaction Layer uisng Coloured Petri Nets</article-title>
          .
          <source>PhD thesis</source>
          , Institute for Telecommunications Research and Computer Systems Engineering Centre, School of Electrical and Information Engineering, University of South Australia, Adelaide, Australia,
          <year>November 2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. B. Han.
          <article-title>Formal Specification of the TCP Service and Verification of TCP Connection Management</article-title>
          .
          <source>PhD thesis</source>
          , Computer Systems Engineering Centre, School of Electrical and Information Engineering, University of South Australia, Adelaide, Australia,
          <year>December 2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>K.</given-names>
            <surname>Jensen</surname>
          </string-name>
          .
          <source>Coloured Petri Nets: Basic Concepts</source>
          ,
          <source>Analysis Methods and Practical Use</source>
          . Vol.
          <volume>1</volume>
          ,
          <string-name>
            <given-names>Basic</given-names>
            <surname>Concepts</surname>
          </string-name>
          .
          <source>Monographs in Theoretical Computer Science</source>
          . Springer, Heidelberg, 2nd edition,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>K.</given-names>
            <surname>Jensen</surname>
          </string-name>
          .
          <source>Coloured Petri Nets. Basic Concepts</source>
          ,
          <source>Analysis Methods and Practical Use</source>
          . Vol.
          <volume>3</volume>
          ,
          <string-name>
            <given-names>Practical</given-names>
            <surname>Use</surname>
          </string-name>
          .
          <source>Monographs in Theoretical Computer Science</source>
          . Springer, Heidelberg,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>K.</given-names>
            <surname>Jensen</surname>
          </string-name>
          and
          <string-name>
            <given-names>L.M.</given-names>
            <surname>Kristensen</surname>
          </string-name>
          .
          <source>Coloured Petri Nets: Modelling and Validation of Concurrent Systems</source>
          . Springer, Heidelberg,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. E. Kohler,
          <string-name>
            <given-names>M.</given-names>
            <surname>Handley</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Floyd. Designing</surname>
          </string-name>
          <string-name>
            <surname>DCCP</surname>
          </string-name>
          :
          <article-title>Congestion Control Without Reliability</article-title>
          .
          <source>In Proceedings of the 2006 ACM Conference on Applications</source>
          , Technologies, Architectures, and Protocols for Computer
          <source>Communications (SIGCOMM'06)</source>
          , pages
          <fpage>27</fpage>
          -
          <lpage>38</lpage>
          , Pisa, Italy,
          <fpage>11</fpage>
          -
          <issue>15</issue>
          <year>September 2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16. E. Kohler,
          <string-name>
            <given-names>M.</given-names>
            <surname>Handley</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Floyd. Datagram Congestion Control Protocol</surname>
          </string-name>
          , RFC 4340. Available via http://www.rfc-editor.org/rfc/rfc4340.txt,
          <year>March 2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>L. M. Kristensen</surname>
            ,
            <given-names>J.B.</given-names>
          </string-name>
          <string-name>
            <surname>Jørgensen</surname>
            , and
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Jensen</surname>
          </string-name>
          .
          <article-title>Application of Coloured Petri Nets in System Development</article-title>
          . In J. Desel,
          <string-name>
            <given-names>W.</given-names>
            <surname>Reisig</surname>
          </string-name>
          , and G. Rozenberg, editors,
          <source>Lectures on Concurrency and Petri Nets - Advanced in Petri Nets</source>
          , volume
          <volume>3098</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>626</fpage>
          -
          <lpage>685</lpage>
          . Springer, Heidelberg,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Ouyang. Formal Specification and Verification of the Internet Open Trading Protocol using Coloured Petri Nets</article-title>
          .
          <source>PhD thesis</source>
          , Computer Systems Engineering Centre, School of Electrical and Information Engineering, University of South Australia, Adelaide, Australia,
          <year>June 2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>19. University of Aberdeen, Electronics Research Group, School of Engineering. Background on Feature Negotiation. Available via http://www.erg.abdn.ac.uk /users/gerrit/dccp/notes/feature_negotiation/background.html.</mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20. University of Aberdeen, Electronics Research Group, School of Engineering.
          <article-title>Why feature negotiation and protocol state machine are not independent</article-title>
          . Available via http://www.erg.abdn.ac.uk/users/gerrit/dccp/notes/feature_negotiation /dependencies.html.
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <given-names>S.</given-names>
            <surname>Vanit-Anunchai</surname>
          </string-name>
          .
          <article-title>An Investigation of the Datagram Congestion Control Protocol's Connection Management and Synchronisation Procedures</article-title>
          .
          <source>PhD thesis</source>
          , Computer Systems Engineering Centre, School of Electrical and Information Engineering, University of South Australia, Adelaide, Australia,
          <year>November 2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <given-names>S.</given-names>
            <surname>Vanit-Anunchai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Billington</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Kongprakaiwoot</surname>
          </string-name>
          .
          <article-title>Discovering Chatter and Incompleteness in the Datagram Congestion Control Protocol</article-title>
          . In F. Wang, editor,
          <source>Proceedings of the 25th IFIP WG 6.1 International Conference on Formal Techniques for Networked and Distributed Systems (FORTE</source>
          <year>2005</year>
          ), volume
          <volume>3731</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>143</fpage>
          -
          <lpage>158</lpage>
          , Taipei, Taiwan,
          <fpage>2</fpage>
          -
          <lpage>5</lpage>
          October 2005. Springer, Heidelberg.
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Somsak</surname>
          </string-name>
          Vanit-Anunchai.
          <article-title>Analysis of Two-Layer Protocols: DCCP SimultaneousOpen and Hole Punching Procedures</article-title>
          . In Christine Choppy and Jun Sun, editors,
          <source>1st French Singaporean Workshop on Formal Methods and Applications (FSFMA</source>
          <year>2013</year>
          ), volume
          <volume>31</volume>
          of OpenAccess Series in Informatics (OASIcs), pages
          <fpage>3</fpage>
          -
          <lpage>17</lpage>
          , Dagstuhl, Germany,
          <year>2013</year>
          .
          <article-title>Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik</article-title>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>