draft-ietf-homenet-dncp-01.txt   draft-ietf-homenet-dncp-02.txt 
Homenet Working Group M. Stenberg Homenet Working Group M. Stenberg
Internet-Draft Internet-Draft
Intended status: Standards Track S. Barth Intended status: Standards Track S. Barth
Expires: September 6, 2015 Expires: October 24, 2015
March 5, 2015 April 22, 2015
Distributed Node Consensus Protocol Distributed Node Consensus Protocol
draft-ietf-homenet-dncp-01 draft-ietf-homenet-dncp-02
Abstract Abstract
This document describes the Distributed Node Consensus Protocol This document describes the Distributed Node Consensus Protocol
(DNCP), a generic state synchronization protocol which uses Trickle (DNCP), a generic state synchronization protocol which uses Trickle
and Merkle trees. DNCP is transport agnostic and leaves some of the and Merkle trees. DNCP is transport agnostic and leaves some of the
details to be specified in profiles, which define actual details to be specified in profiles, which define actual
implementable DNCP based protocols. implementable DNCP based protocols.
Status of This Memo Status of This Memo
skipping to change at page 1, line 35 skipping to change at page 1, line 35
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 6, 2015. This Internet-Draft will expire on October 24, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 14 skipping to change at page 2, line 14
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
4. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 5
5. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 6 5. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5.1. Trickle-Driven Status Update Messages . . . . . . . . . . 6 5.1. Trickle-Driven Status Update Messages . . . . . . . . . . 7
5.2. Processing of Received Messages . . . . . . . . . . . . . 7 5.2. Processing of Received TLVs . . . . . . . . . . . . . . . 7
5.3. Adding and Removing Peers . . . . . . . . . . . . . . . . 8 5.3. Adding and Removing Peers . . . . . . . . . . . . . . . . 9
5.4. Purging Unreachable Nodes . . . . . . . . . . . . . . . . 9 5.4. Purging Unreachable Nodes . . . . . . . . . . . . . . . . 9
6. Keep-Alive Extension . . . . . . . . . . . . . . . . . . . . 9 6. Optional Extensions . . . . . . . . . . . . . . . . . . . . . 9
6.1. Data Model Additions . . . . . . . . . . . . . . . . . . 10 6.1. Keep-Alives . . . . . . . . . . . . . . . . . . . . . . . 10
6.2. Per-Connection Periodic Keep-Alive Messages . . . . . . . 10 6.1.1. Data Model Additions . . . . . . . . . . . . . . . . 10
6.3. Per-Peer Periodic Keep-Alive Messages . . . . . . . . . . 10 6.1.2. Per-Connection Periodic Keep-Alives . . . . . . . . . 10
6.4. Received Message Processing Additions . . . . . . . . . . 10 6.1.3. Per-Peer Periodic Keep-Alives . . . . . . . . . . . . 11
6.5. Neighbor Removal . . . . . . . . . . . . . . . . . . . . 11 6.1.4. Received TLV Processing Additions . . . . . . . . . . 11
7. Support For Dense Broadcast Links . . . . . . . . . . . . . . 11 6.1.5. Neighbor Removal . . . . . . . . . . . . . . . . . . 11
8. Protocol Messages . . . . . . . . . . . . . . . . . . . . . . 11 6.2. Support For Dense Broadcast Links . . . . . . . . . . . . 11
8.1. Short Network State Update Message . . . . . . . . . . . 12 6.3. Node Data Fragmentation . . . . . . . . . . . . . . . . . 12
8.2. Long Network State Update Message . . . . . . . . . . . . 12 7. Type-Length-Value Objects . . . . . . . . . . . . . . . . . . 12
8.3. Network State Request Message . . . . . . . . . . . . . . 13 7.1. Request TLVs . . . . . . . . . . . . . . . . . . . . . . 13
8.4. Node Data Request Message . . . . . . . . . . . . . . . . 13 7.1.1. Request Network State TLV . . . . . . . . . . . . . . 13
8.5. Node Data Reply Message . . . . . . . . . . . . . . . . . 13 7.1.2. Request Node Data TLV . . . . . . . . . . . . . . . . 13
9. Type-Length-Value Objects . . . . . . . . . . . . . . . . . . 13 7.2. Data TLVs . . . . . . . . . . . . . . . . . . . . . . . . 14
9.1. Request TLVs . . . . . . . . . . . . . . . . . . . . . . 14 7.2.1. Node Connection TLV . . . . . . . . . . . . . . . . . 14
9.1.1. Request Network State TLV . . . . . . . . . . . . . . 14 7.2.2. Network State TLV . . . . . . . . . . . . . . . . . . 14
9.1.2. Request Node Data TLV . . . . . . . . . . . . . . . . 14 7.2.3. Node State TLV . . . . . . . . . . . . . . . . . . . 14
9.2. Data TLVs . . . . . . . . . . . . . . . . . . . . . . . . 15 7.2.4. Node Data TLV . . . . . . . . . . . . . . . . . . . . 15
9.2.1. Node Connection TLV . . . . . . . . . . . . . . . . . 15 7.2.5. Custom TLV . . . . . . . . . . . . . . . . . . . . . 16
9.2.2. Network State TLV . . . . . . . . . . . . . . . . . . 15 7.3. Data TLVs within Node Data TLV . . . . . . . . . . . . . 16
9.2.3. Node State TLV . . . . . . . . . . . . . . . . . . . 15 7.3.1. Fragment Count TLV . . . . . . . . . . . . . . . . . 16
9.2.4. Node Data TLV . . . . . . . . . . . . . . . . . . . . 16 7.3.2. Neighbor TLV . . . . . . . . . . . . . . . . . . . . 17
9.2.5. Neighbor TLV (within Node Data TLV) . . . . . . . . . 17 7.3.3. Keep-Alive Interval TLV . . . . . . . . . . . . . . . 17
9.2.6. Keep-Alive Interval TLV (within Node Data TLV) . . . 17 8. Security and Trust Management . . . . . . . . . . . . . . . . 18
9.3. Custom TLV (within/without Node Data TLV) . . . . . . . . 18 8.1. Pre-Shared Key Based Trust Method . . . . . . . . . . . . 18
10. Security and Trust Management . . . . . . . . . . . . . . . . 18 8.2. PKI Based Trust Method . . . . . . . . . . . . . . . . . 18
10.1. Pre-Shared Key Based Trust Method . . . . . . . . . . . 18 8.3. Certificate Based Trust Consensus Method . . . . . . . . 18
10.2. PKI Based Trust Method . . . . . . . . . . . . . . . . . 18 8.3.1. Trust Verdicts . . . . . . . . . . . . . . . . . . . 18
10.3. Certificate Based Trust Consensus Method . . . . . . . . 19 8.3.2. Trust Cache . . . . . . . . . . . . . . . . . . . . . 19
10.3.1. Trust Verdicts . . . . . . . . . . . . . . . . . . . 19 8.3.3. Announcement of Verdicts . . . . . . . . . . . . . . 20
10.3.2. Trust Cache . . . . . . . . . . . . . . . . . . . . 20 8.3.4. Bootstrap Ceremonies . . . . . . . . . . . . . . . . 21
10.3.3. Announcement of Verdicts . . . . . . . . . . . . . . 20 9. DNCP Profile-Specific Definitions . . . . . . . . . . . . . . 22
10.3.4. Bootstrap Ceremonies . . . . . . . . . . . . . . . . 21 10. Security Considerations . . . . . . . . . . . . . . . . . . . 23
11. DNCP Profile-Specific Definitions . . . . . . . . . . . . . . 22 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24
12. Security Considerations . . . . . . . . . . . . . . . . . . . 24 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 25
13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 12.1. Normative references . . . . . . . . . . . . . . . . . . 25
14. References . . . . . . . . . . . . . . . . . . . . . . . . . 25 12.2. Informative references . . . . . . . . . . . . . . . . . 25
14.1. Normative references . . . . . . . . . . . . . . . . . . 25 Appendix A. Some Questions and Answers [RFC Editor: please
14.2. Informative references . . . . . . . . . . . . . . . . . 25 remove] . . . . . . . . . . . . . . . . . . . . . . 25
Appendix A. Some Outstanding Issues . . . . . . . . . . . . . . 25 Appendix B. Changelog [RFC Editor: please remove] . . . . . . . 26
Appendix B. Some Obvious Questions and Answers . . . . . . . . . 26 Appendix C. Draft Source [RFC Editor: please remove] . . . . . . 26
Appendix C. Changelog . . . . . . . . . . . . . . . . . . . . . 26 Appendix D. Acknowledgements . . . . . . . . . . . . . . . . . . 27
Appendix D. Draft Source . . . . . . . . . . . . . . . . . . . . 27
Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 27
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27
1. Introduction 1. Introduction
DNCP is designed to provide a way for nodes to publish data DNCP is designed to provide a way for nodes to publish data
consisting of an ordered set of TLV (Type-Length-Value) tuples and to consisting of an ordered set of TLV (Type-Length-Value) tuples and to
receive the data published by all other reachable DNCP nodes. receive the data published by all other reachable DNCP nodes.
DNCP validates the set of data within it by ensuring that it is DNCP validates the set of data within it by ensuring that it is
reachable via nodes that are currently accounted for; therefore, reachable via nodes that are currently accounted for; therefore,
skipping to change at page 4, line 8 skipping to change at page 4, line 8
2. Requirements Language 2. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
3. Terminology 3. Terminology
A DNCP profile is a definition of a set of rules and values listed in A DNCP profile is a definition of a set of rules and values listed in
Section 11 specifying the behavior of a DNCP based protocol, such as Section 9 specifying the behavior of a DNCP based protocol, such as
the used transport method. For readability, any DNCP profile the used transport method. For readability, any DNCP profile
specific parameters with a profile-specific fixed value are prefixed specific parameters with a profile-specific fixed value are prefixed
with DNCP_. with DNCP_.
A DNCP node is a single node which runs a protocol based on a DNCP A DNCP node is a single node which runs a protocol based on a DNCP
profile. profile.
The DNCP network is a set of DNCP nodes running the same DNCP profile The DNCP network is a set of DNCP nodes running the same DNCP profile
that can reach each other, either via discovered connectivity in the that can reach each other, either via discovered connectivity in the
underlying network, or using each other's addresses learned via other underlying network, or using each other's addresses learned via other
skipping to change at page 4, line 45 skipping to change at page 4, line 45
that are allowed to contact. that are allowed to contact.
The connection identifier is a 32-bit opaque value, which identifies The connection identifier is a 32-bit opaque value, which identifies
a particular connection of that particular DNCP node. The value 0 is a particular connection of that particular DNCP node. The value 0 is
reserved for DNCP and sub-protocol purposes in the TLVs, and MUST NOT reserved for DNCP and sub-protocol purposes in the TLVs, and MUST NOT
be used to identify an actual connection. This definition is in sync be used to identify an actual connection. This definition is in sync
with [RFC3493], as the non-zero small positive integers should with [RFC3493], as the non-zero small positive integers should
comfortably fit within 32 bits. comfortably fit within 32 bits.
A (DNCP) peer refers to another DNCP node with which a DNCP node A (DNCP) peer refers to another DNCP node with which a DNCP node
communicates directly on a particular connection. communicates directly using a particular local and remote connection
pair.
The node data is a set of TLVs published by a node in the DNCP The node data is a set of TLVs published by a node in the DNCP
network. The whole node data is owned by the node that publishes it, network. The whole node data is owned by the node that publishes it,
and it MUST be passed along as-is, including TLVs unknown to the and it MUST be passed along as-is, including TLVs unknown to the
forwarder. forwarder.
The node state is a set of metadata attributes for node data. It The node state is a set of metadata attributes for node data. It
includes a sequence number for versioning, a hash value for comparing includes a sequence number for versioning, a hash value for comparing
and a timestamp indicating the time passed since its last and a timestamp indicating the time passed since its last
publication. The hash function and the number of bits used are publication. The hash function and the number of bits used are
skipping to change at page 6, line 15 skipping to change at page 6, line 15
roughly every 49 days. roughly every 49 days.
o A timestamp identifying the time it was last reachable based on o A timestamp identifying the time it was last reachable based on
neighbor graph traversal described in Section 5.4. neighbor graph traversal described in Section 5.4.
Additionally, a DNCP node has a set of connections for which DNCP is Additionally, a DNCP node has a set of connections for which DNCP is
configured to be used. For each such connection, a node has: configured to be used. For each such connection, a node has:
o A connection identifier. o A connection identifier.
o An interface, a unicast address of a DNCP peer it should connect o An interface, a unicast address of a DNCP node it should connect
with, or a range of addresses from which DNCP peers are allowed to with, or a range of addresses from which DNCP nodes are allowed to
connect. connect.
o A Trickle [RFC6206] instance with parameters I, T, and c. o A Trickle [RFC6206] instance with parameters I, T, and c.
For each DNCP peer detected on a connection, a DNCP node has: For each remote (DNCP node,connection) pair detected on a particular
connection, a DNCP node has:
o The node identifier of the DNCP peer. o The node identifier of the DNCP peer.
o The connection identifier of the DNCP peer. o The connection identifier of the DNCP peer.
o The most recent address used by the DNCP peer (in an authenticated o The most recent address used by the DNCP peer (in an authenticated
message, if security is enabled). message, if security is enabled).
5. Operation 5. Operation
The DNCP protocol consists of Trickle [RFC6206] driven unicast or The DNCP protocol consists of Trickle [RFC6206] driven unicast or
multicast status messages which indicate the current status of shared multicast status payloads which indicate the current status of shared
TLV data and additional unicast message exchanges which ensure DNCP TLV data and additional unicast exchanges which ensure DNCP peer
peer reachability and synchronize the data when necessary. reachability and synchronize the data when necessary.
If DNCP is to be used on a multicast-capable interface, as opposed to If DNCP is to be used on a multicast-capable interface, as opposed to
only point-to-point using unicast, a datagram-based transport which only point-to-point using unicast, a datagram-based transport which
supports multicast SHOULD be defined in the DNCP profile to be used supports multicast SHOULD be defined in the DNCP profile to be used
for the messages to be sent to the whole link. As this is used only for the TLVs to be sent to the whole link. As this is used only to
to identify potential new DNCP nodes and to notify that an unicast identify potential new DNCP nodes and to notify that an unicast
exchange should be triggered, the multicast transport does not have exchange should be triggered, the multicast transport does not have
to be particularly secure. to be particularly secure.
A DNCP message in and of itself is just an abstraction; when using
reliable stream transport, the whole stream of TLVs can be considered
a single message, with new TLVs becoming gradually available once
they have been fully received. On datagram transport, each
individual datagram is a separate message. In order to facilitate
fast comparing of local state with that in a received update, TLVs in
every container TLV MUST be placed in ascending order based on the
binary comparison of both TLV header and value.
5.1. Trickle-Driven Status Update Messages 5.1. Trickle-Driven Status Update Messages
Each node MUST send either a Long Network State Update message When employing unreliable transport, each node MUST send a Network
(Section 8.2) or a Short Network State Update message (Section 8.1) State TLV (Section 7.2.2) every time the connection-specific Trickle
every time the connection-specific Trickle algorithm [RFC6206] algorithm [RFC6206] instance indicates that an update should be sent.
instance indicates that an update should be sent. The destination Multicast MUST be employed on a multicast-capable interface;
address of the message should be multicast in case of an interface otherwise, unicast can be used as well. If possible, most recent,
which is multicast-capable, or the unicast address of the remote recently changed, or best of all, all known Node State TLVs
party in case of a point-to-point connection. By default, Long (Section 7.2.3) SHOULD be also included, unless it is defined as
Network State Update messages SHOULD be used, but if it is defined as undesirable for some reason by the DNCP profile. Avoiding sending
undesirable for some case by the DNCP profile, Short Network State some or all Node State TLVs may make sense to avoid fragmenting
Update message MUST be sent instead. This may be useful to avoid packets to multicast destinations, or for security reasons.
fragmenting packets to multicast destinations, or for security
reasons.
A Trickle state MUST be maintained separately for each connection. A Trickle state MUST be maintained separately for each connection
The Trickle state for all connections is considered inconsistent and which employs unreliable transport. The Trickle state for all
reset if and only if the locally calculated network state hash connections is considered inconsistent and reset if and only if the
changes. This occurs either due to a change in the local node's own locally calculated network state hash changes. This occurs either
node data, or due to receipt of more recent data from another node. due to a change in the local node's own node data, or due to receipt
of more recent data from another node.
The Trickle algorithm has 3 parameters: Imin, Imax and k. Imin and The Trickle algorithm has 3 parameters: Imin, Imax and k. Imin and
Imax represent the minimum and maximum values for I, which is the Imax represent the minimum and maximum values for I, which is the
time interval during which at least k Trickle updates must be seen on time interval during which at least k Trickle updates must be seen on
a connection to prevent local state transmission. The actual a connection to prevent local state transmission. The actual
suggested Trickle algorithm parameters are DNCP profile specific, as suggested Trickle algorithm parameters are DNCP profile specific, as
described in Section 11. described in Section 9.
5.2. Processing of Received Messages 5.2. Processing of Received TLVs
This section describes how received messages are processed. The DNCP This section describes how received TLVs are processed. The DNCP
profile may specify criteria based on which received messages are profile may specify criteria based on which particular TLVs are
ignored. Any 'reply' mentioned in the steps below denotes sending of ignored. Any 'reply' mentioned in the steps below denotes sending of
the specified message via unicast to the originator of the message the specified TLV(s) via unicast to the originator of the message
being processed. If the reply was caused by a multicast message and being processed. If the reply was caused by a multicast message and
sent to a link with shared bandwidth it SHOULD be delayed by a random sent to a link with shared bandwidth it SHOULD be delayed by a random
timespan in [0, Imin/2]. Sending of replies SHOULD be rate-limited timespan in [0, Imin/2]. Sending of replies SHOULD be rate-limited
by the implementation, and in case of excess load (or some other by the implementation, and in case of excess load (or some other
reason), a reply MAY be omitted altogether. reason), a reply MAY be omitted altogether.
Upon receipt of: Upon receipt of:
Short Network State Update (Section 8.1): If the network state o Request Network State TLV (Section 7.1.1): The receiver MUST reply
hash within the message differs from the locally calculated with a Network State TLV (Section 7.2.2) and a Node State TLV
network state hash, the receiver MUST reply with a Network State (Section 7.2.3) for each Node Data TLV used to calculate the
Request message (Section 8.3). network state hash.
Long Network State Update (Section 8.2): o Network State TLV (Section 7.2.2): If the network state hash
differs from the locally calculated network state hash, and the
receiver is unaware of any particular node state differences with
the sender, the receiver MUST reply with a Request Network State
TLV (Section 7.1.1). The receiver MAY omit this, if there are
already recent pending requests for node state or node data.
* If the network state hash within the message matches the o Node State TLV (Section 7.2.3):
locally calculated network state hash, stop processing.
* Otherwise the receiver MUST identify all nodes for which local * If the node identifier matches the local node identifier and
information is outdated (local update sequence number is lower the TLV has a higher update sequence number than its current
than that within the message), potentially incorrect (local local value, or the same update sequence number and a different
update sequence number matches but the hash of the node data hash, the node SHOULD re-publish its own node data with an
TLV differs) or missing. update sequence number 1000 higher than the received one. This
may occur normally once due to the local node restarting and
not storing the most recently used update sequence number. If
this occurs more than once, the DNCP profile should provide
guidance on how to handle these situations as it indicates the
existence of another active node with the same node identifier.
* If any such nodes are identified, the receiver MUST reply with * If the node identifier does not match the local node
one or more Node Data Request message(s) (Section 8.4) identifier, and the local information is outdated for the
containing Request Node Data TLV(s) (Section 9.1.2) for the corresponding node (local update sequence number is lower than
corresponding nodes. that within the TLV), potentially incorrect (local update
sequence number matches but the hash of the node data TLV
differs), or the data is altogether missing, and there is no
corresponding Node Data TLV available, the receiver MUST reply
with a Request Node Data TLV (Section 7.1.2) for the
corresponding node.
Network State Request (Section 8.3): the receiver MUST reply with o Request Node Data TLV (Section 7.1.2): If the receiver has node
a Long Network State Update (Section 8.2). data for the corresponding node, it MUST reply with a Node State
TLV (Section 7.2.3) and a Node Data TLV (Section 7.2.4) for the
corresponding node.
Node Data Request (Section 8.4): the receiver MUST reply with the o Node Data TLV (Section 7.2.4): If the message contains also a Node
requested data in a Node Data Reply message (Section 8.5). State TLV (Section 7.2.3) with the same update sequence number,
Optionally - if specified by the DNCP profile - multiple replies that is more recent than the local state (the received TLV has a
MAY be sent in order to e.g. keep size of each datagram within the higher update sequence number, the node data TLV hash differs from
PMTU to the destination. However these replies must be valid the local one, or local data is missing altogether), the receiver
stand-alone Node Data Reply messages, with the full state for the MUST update its locally stored state for that node (node data,
particular nodes. update sequence number, relative time) to match the received TLVs.
Node Data Reply (Section 8.5): If the message contains Node State o Any other TLV: DNCP profiles MAY add additional TLVs to the
TLVs that are more recent than the local state (the received TLV message specified here, or even define additional messages as
has a higher update sequence number, the node data TLV hash needed. TLVs not recognized by the receiver MUST be silently
differs from the local one, or local data is missing altogether) ignored.
and if the message also contains corresponding Node Data TLVs, the
receiver MUST update its locally stored state.
If a message containing Node State TLVs (Section 9.2.3) is received If secure unicast transport is configured for a connection, any Node
with the node identifier matching the local node identifier and a Data TLVs and Node State TLVs received via insecure multicast MUST be
higher update sequence number than its current local value, or the silently ignored.
same update sequence number and a different hash, the node SHOULD re-
publish its own node data with an update sequence number 1000 higher
than the received one. This may occur normally once due to the local
node restarting and not storing the most recently used update
sequence number. If this occurs more than once, the DNCP profile
should provide guidance on how to handle these situations as it
indicates the existence of another active node with the same node
identifier.
5.3. Adding and Removing Peers 5.3. Adding and Removing Peers
When receiving a message on a connection from an unknown peer: When receiving a message on a connection from an unknown peer:
If it is a unicast message, and the message contains a Node o If it is a unicast message, and the message contains a Node
Connection TLV (Section 9.2.1), the remote node MUST be added as a Connection TLV (Section 7.2.1), the remote node MUST be added as a
peer on the connection and a Neighbor TLV (Section 9.2.5) MUST be peer on the connection and a Neighbor TLV (Section 7.3.2) MUST be
created for it. created for it.
If it is a multicast message, and the message contains a Node o If it is a multicast message, and the message contains a Node
Connection TLV (Section 9.2.1), the remote node SHOULD be sent a Connection TLV (Section 7.2.1), the node SHOULD be sent a
(possibly rate-limited) unicast Network State Request Message (possibly rate-limited) unicast Request Network State TLV
(Section 8.3). (Section 7.1.1).
If keep-alives are NOT sent by the peer (either the DNCP profile does If keep-alives specified in Section 6.1 are NOT sent by the peer
not specify the use of keep-alives or the particular peer chooses not (either the DNCP profile does not specify the use of keep-alives or
to send keep-alive messages), some other means MUST be employed to the particular peer chooses not to send keep-alives), some other
ensure a DNCP peer is present. When the peer is no longer present, means MUST be employed to ensure a DNCP peer is present. When the
the Neighbor TLV and the local DNCP peer state MUST be removed. peer is no longer present, the Neighbor TLV and the local DNCP peer
state MUST be removed.
5.4. Purging Unreachable Nodes 5.4. Purging Unreachable Nodes
When a Neighbor TLV or a whole node is added or removed, the neighbor When a Neighbor TLV or a whole node is added or removed, the neighbor
graph SHOULD be traversed, starting from the local node. The edges graph SHOULD be traversed, starting from the local node. The edges
to be traversed are identified by looking for Neighbor TLVs on both to be traversed are identified by looking for Neighbor TLVs on both
nodes, that have the other node's identifier in the neighbor node nodes, that have the other node's identifier in the neighbor node
identifier, and local and neighbor connection identifiers swapped. identifier, and local and neighbor connection identifiers swapped.
Each node reached should be marked currently reachable. Each node reached should be marked currently reachable.
DNCP nodes MUST be either purged immediately when not marked DNCP nodes MUST be either purged immediately when not marked
reachable in a particular graph traversal, or eventually after they reachable in a particular graph traversal, or eventually after they
have not been marked reachable within DNCP_GRACE_INTERVAL. During have not been marked reachable within DNCP_GRACE_INTERVAL. During
the grace period, the nodes that were not marked reachable in the the grace period, the nodes that were not marked reachable in the
most recent graph traversal MUST NOT be used for calculation of the most recent graph traversal MUST NOT be used for calculation of the
network state hash, be provided to any applications that need to use network state hash, be provided to any applications that need to use
the whole TLV graph, or be provided to remote nodes. the whole TLV graph, or be provided to remote nodes.
6. Keep-Alive Extension 6. Optional Extensions
This section specifies extensions to the core protocol that a DNCP
profile may want to use.
6.1. Keep-Alives
The Trickle-driven messages provide a mechanism for handling of new The Trickle-driven messages provide a mechanism for handling of new
peer detection (if applicable) on a connection, as well as state peer detection (if applicable) on a connection, as well as state
change notifications. Another mechanism may be needed to get rid of change notifications. Another mechanism may be needed to get rid of
old, no longer valid DNCP peers if the transport or lower layers do old, no longer valid DNCP peers if the transport or lower layers do
not provide one. not provide one.
If keep-alives are not specified in the DNCP profile, the rest of If keep-alives are not specified in the DNCP profile, the rest of
this section MUST be ignored. this subsection MUST be ignored.
A DNCP profile MAY specify either per-connection or per-peer keep- A DNCP profile MAY specify either per-connection or per-peer keep-
alive support. alive support.
For every connection that a keep-alive is specified for in the DNCP For every connection that a keep-alive is specified for in the DNCP
profile, the connection-specific keep-alive interval MUST be profile, the connection-specific keep-alive interval MUST be
maintained. By default, it is DNCP_KEEPALIVE_INTERVAL. If there is maintained. By default, it is DNCP_KEEPALIVE_INTERVAL. If there is
a local value that is preferred for that for any reason a local value that is preferred for that for any reason
(configuration, energy conservation, media type, ..), it should be (configuration, energy conservation, media type, ..), it should be
substituted instead. If a non-default keep-alive interval is used on substituted instead. If a non-default keep-alive interval is used on
any connection, a DNCP node MUST publish appropriate Keep-Alive any connection, a DNCP node MUST publish appropriate Keep-Alive
Interval TLV(s) (Section 9.2.6). Interval TLV(s) (Section 7.3.3) within its node data.
6.1. Data Model Additions 6.1.1. Data Model Additions
The following additions to the Data Model (Section 4) are needed to The following additions to the Data Model (Section 4) are needed to
support keep-alive: support keep-alive:
Each node MUST have a timestamp which indicates the last time a Each node MUST have a timestamp which indicates the last time a
Network State TLV (Section 9.2.2) was sent for each connection, i.e. Network State TLV (Section 7.2.2) was sent for each connection, i.e.
on an interface or to the point-to-point peer(s). on an interface or to the point-to-point peer(s).
Each node MUST have for each peer: Each node MUST have for each peer:
o Last consistent state timestamp: a timestamp which indicates the o Last contact timestamp: a timestamp which indicates the last time
last time a consistent Network State TLV (Section 9.2.2) was a consistent Network State TLV (Section 7.2.2) was received from
received from the peer. When adding a new peer, it should be the peer via multicast, or anything was received via unicast.
initialized to the current time. When adding a new peer, it should be initialized to the current
time.
6.2. Per-Connection Periodic Keep-Alive Messages 6.1.2. Per-Connection Periodic Keep-Alives
If per-connection keep-alives are enabled on connection with a If per-connection keep-alives are enabled on a connection with a
multicast-enabled link, and if no traffic containing a Network State multicast-enabled link, and if no traffic containing a Network State
TLV (Section 9.2.2) has been sent to a particular connection within TLV (Section 7.2.2) has been sent to a particular connection within
the connection-specific keep-alive interval, a Long Network State the connection-specific keep-alive interval, a Network State TLV
Update message (Section 8.2) or a Short Network State Update message (Section 7.2.2) MUST be sent on that connection, and a new Trickle
(Section 8.1) MUST be sent on that connection. The type of message transmission time 't' in [I/2, I] MUST be randomly chosen. The
should be chosen based on the considerations in Section 5.1. The
actual sending time SHOULD be further delayed by a random timespan in actual sending time SHOULD be further delayed by a random timespan in
[0, Imin/2]. When such a message is sent, a new Trickle transmission [0, Imin/2].
time 't' in [I/2, I] MUST be randomly chosen.
6.3. Per-Peer Periodic Keep-Alive Messages 6.1.3. Per-Peer Periodic Keep-Alives
If per-peer keep-alives are enabled on a unicast-only connection, and If per-peer keep-alives are enabled on a unicast-only connection, and
if no traffic containing a Network State TLV (Section 9.2.2) has been if no traffic containing a Network State TLV (Section 7.2.2) has been
sent to a particular peer within the connection-specific keep-alive sent to a particular peer within the connection-specific keep-alive
interval, a Long Network State Update message (Section 8.2) or a interval, a Network State TLV (Section 7.2.2) MUST be sent to the
Short Network State Update message (Section 8.1) MUST be sent to the peer and a new Trickle transmission time 't' in [I/2, I] MUST be
peer. The type of message should be chosen based on the randomly chosen.
considerations in Section 5.1. When such a message is sent, a new
Trickle transmission time 't' in [I/2, I] MUST be randomly chosen.
6.4. Received Message Processing Additions 6.1.4. Received TLV Processing Additions
If a message is received via unicast from the peer, the Last If a TLV is received via unicast from the peer, the Last contact
consistent state timestamp for the peer MUST be updated. timestamp for the peer MUST be updated.
If the received multicast message contains a Network State TLV On receipt of a Network State TLV (Section 7.2.2) which is consistent
(Section 9.2.2) which is consistent with the locally calculated with the locally calculated network state hash, the Last contact
network state hash, the Last consistent state timestamp for the peer timestamp for the peer MUST be updated.
MUST be updated. If the TLV is inconsistent, and would not cause any
unicast exchange, Network State Request (Section 8.3) SHOULD be sent
via unicast.
6.5. Neighbor Removal 6.1.5. Neighbor Removal
For every peer on every connection, the connection-specific keep- For every peer on every connection, the connection-specific keep-
alive interval must be calculated by looking for Keep-Alive Interval alive interval must be calculated by looking for Keep-Alive Interval
TLVs (Section 9.2.6) published by the node, and if none exist, using TLVs (Section 7.3.3) published by the node, and if none exist, using
the default value of DNCP_KEEPALIVE_INTERVAL. If the peer's last the default value of DNCP_KEEPALIVE_INTERVAL. If the peer's last
consistent state timestamp has not been updated for at least contact state timestamp has not been updated for at least
DNCP_KEEPALIVE_MULTIPLIER times the peer's connection-specific keep- DNCP_KEEPALIVE_MULTIPLIER times the peer's connection-specific keep-
alive interval, the Neighbor TLV for that peer and the local DNCP alive interval, the Neighbor TLV for that peer and the local DNCP
peer state MUST be removed. peer state MUST be removed.
7. Support For Dense Broadcast Links 6.2. Support For Dense Broadcast Links
The DNCP profile or a user configuration should limit the number of An upper bound for the number of neighbors that are allowed for a
neighbors that are allowed for a (particular type of) link that a (particular type of) link that a connection runs on SHOULD be
connection runs on. If that limit is exceeded, nodes without the provided by a DNCP profile, user configuration, or some hardcoded
highest Node Identifier on the link SHOULD treat the connection as an default in the implementation. If an implementation does not support
unicast connection connected to the node that has the highest Node this, the rest of this subsection MUST be ignored.
Identifier detected on the link. The nodes MUST also keep listening
to multicast traffic to both detect the presence of that node, and to If the specified limit is exceeded, nodes without the highest Node
Identifier on the link SHOULD treat the connection as an unicast
connection connected to the node that has the highest Node Identifier
detected on the link. The nodes MUST also keep listening to
multicast traffic to both detect the presence of that node, and to
react to nodes with a higher Node Identifier appearing. If the react to nodes with a higher Node Identifier appearing. If the
highest Node Identifier present on the link changes, the connection highest Node Identifier present on the link changes, the connection
endpoint MUST be changed. If the Node Identifier of the local node endpoint MUST be changed. If the Node Identifier of the local node
is the highest one, the node MUST keep the connection in normal is the highest one, the node MUST keep the connection in normal
multicast mode, and the node MUST allow others to peer with it over multicast mode, and the node MUST allow others to peer with it over
the link. the link.
8. Protocol Messages 6.3. Node Data Fragmentation
For point-to-point exchanges, DNCP can run across datagram-based or
reliable ordered stream-based transports. If a stream-based
transport is used, a 32-bit length-value in network byte order is
sent before each message to indicate the number of bytes the
following message consists of.
DNCP messages are encoded as a concatenated sequence of Type-Length-
Value objects (Section 9). In order to facilitate fast comparing of
local state with that in a received message update, all TLVs in every
encoding scope (either within the message itself, or within a
container TLV) MUST be placed in ascending order based on the binary
comparison of both TLV header and value. By design, the TLVs which
MUST be present have the lowest available type values, ensuring they
will naturally occur at the start of the Protocol Message, resembling
a fixed format header.
DNCP profiles MAY add additional TLVs to the message specified here,
or even define additional messages as needed. TLVs not recognized by
the receiver MUST be ignored.
8.1. Short Network State Update Message
The Short Network State Update Message is used to announce the
sender's view of the network state using multicast.
The following TLVs MUST be present:
o One Node Connection TLV (Section 9.2.1) identifying the
originating node and connection.
o One Network State TLV (Section 9.2.2) containing the network state
hash as calculated by the sender.
The Short Network Status update message MUST NOT contain any Node
State TLV(s) (Section 9.2.3).
8.2. Long Network State Update Message
The Long Network State Update Message is used to announce the
sender's view of the network state and all node states using
multicast or unicast.
The following TLVs MUST be present:
o One Node Connection TLV (Section 9.2.1) identifying the
originating node and connection.
o One Network State TLV (Section 9.2.2) containing the network state
hash as calculated by the sender.
o One or more Node State TLVs (Section 9.2.3) containing the node
state of DNCP nodes as currently known to the sender.
The Long Network State Update message MUST include the corresponding
Node State TLV (Section 9.2.3) for each Node Data TLV used to
calculate the network state hash.
8.3. Network State Request Message
The Network State Request message is used to request the recipient's
view of the network state and all node states currently known to it.
The following TLVs MUST be present:
o One Request Network State TLV (Section 9.1.1) indicating the type
of request.
8.4. Node Data Request Message
The Node Data Request message is used to request the node state and
data of one or more DNCP nodes in the network.
The following TLVs MUST be present:
o One or more Request Node Data TLVs (Section 9.1.2) indicating the
nodes for which state and data is requested.
8.5. Node Data Reply Message
The Node Data Request message is used to provide the node data of one A DNCP profile may require a node to exceed the maximum size of a
or more DNCP nodes in the network. single Node Data TLV (Section 7.2.4) (65535 bytes of payload), or use
a datagram-only transport with a limited MTU and no reliable support
for fragmentation. To handle such cases, a DNCP profile MAY specify
a fixed number of trailing bytes in the Node Identifier to represent
a fragment number indicating a part of a node's node data. The
profile MAY also specify an upper bound for the size of a single
fragment to accommodate limitations of links in the network.
The following TLVs MUST be present: The data within Node Data TLVs of fragments with non-zero fragment
number must be treated as opaque (as they may not contain even a
single full TLV). However, the concatenated node data for a
particular node MUST be produced by concatenating all node data for
each fragment, in ascending fragment number order. The concatenated
node data MUST follow the ordering described in Section 4.
o One Node Connection TLV (Section 9.2.1) identifying the Any Node Identifiers on the wire used to identify the own or any
originating node and connection. other node MUST have the fragment number 0. For algorithm purposes,
the relative time since the most recent fragment change MUST be used,
regardless of fragment number. Therefore, even if just part of the
node data fragments change, they all are considered refreshed if one
of them is.
o One or more Node State TLV (Section 9.2.3) and Node Data TLV If using fragmentation, the unreachable node purging defined in
(Section 9.2.4) pairs with matching node identifiers for each node Section 5.4 is extended so that if a Fragment Count TLV
previously requested in a Node Data Request message (Section 8.4). (Section 7.3.1) is present within the fragment number 0, all
fragments up to fragment number specified in the Count field are also
considered reachable if the fragment number 0 itself is reachable
based on graph traversal.
9. Type-Length-Value Objects 7. Type-Length-Value Objects
Each TLV is encoded as a 2 byte type field, followed by a 2 byte Each TLV is encoded as a 2 byte type field, followed by a 2 byte
length field (of the value, excluding header; 0 means no value) length field (of the value, excluding header; 0 means no value)
followed by the value itself (if any). Both type and length fields followed by the value itself (if any). Both type and length fields
in the header as well as all integer fields inside the value - unless in the header as well as all integer fields inside the value - unless
explicitly stated otherwise - are represented in network byte order. explicitly stated otherwise - are represented in network byte order.
Zero padding bytes MUST be added up to the next 4 byte boundary if Zero padding bytes MUST be added up to the next 4 byte boundary if
the length is not divisible by 4. These padding bytes MUST NOT be the length is not divisible by 4. These padding bytes MUST NOT be
included in the length field. included in the length field.
skipping to change at page 14, line 23 skipping to change at page 13, line 23
For example, type=123 (0x7b) TLV with value 'x' (120 = 0x78) is For example, type=123 (0x7b) TLV with value 'x' (120 = 0x78) is
encoded as: 007B 0001 7800 0000. encoded as: 007B 0001 7800 0000.
Notation: Notation:
.. = octet string concatenation operation. .. = octet string concatenation operation.
H(x) = non-cryptographic hash function specified by DNCP profile. H(x) = non-cryptographic hash function specified by DNCP profile.
9.1. Request TLVs 7.1. Request TLVs
9.1.1. Request Network State TLV 7.1.1. Request Network State TLV
0 1 2 3 0 1 2 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: REQ-NETWORK-STATE (2) | Length: 0 | | Type: REQ-NETWORK-STATE (2) | Length: 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV is used to identify a Network State Request message This TLV is used to request response with a Network State TLV
(Section 8.3). (Section 7.2.2) and all Node State TLVs (Section 7.2.3).
9.1.2. Request Node Data TLV 7.1.2. Request Node Data TLV
0 1 2 3 0 1 2 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: REQ-NODE-DATA (3) | Length: >0 | | Type: REQ-NODE-DATA (3) | Length: >0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Node Identifier | | Node Identifier |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV is used within a Node Data Request message (Section 8.4) to This TLV is used to request response with a Node State TLV
request node state and node data for the node with matching node (Section 7.2.3) and a Node Data TLV (Section 7.2.4) for the node with
identifier, if any, to be included in a subsequent Node Data Reply matching node identifier.
message (Section 8.5).
9.2. Data TLVs 7.2. Data TLVs
9.2.1. Node Connection TLV 7.2.1. Node Connection TLV
0 1 2 3 0 1 2 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: NODE-CONNECTION (1) | Length: > 4 | | Type: NODE-CONNECTION (1) | Length: > 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Node Identifier | | Node Identifier |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Connection Identifier | | Connection Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV identifies both the local node's node identifier, as well as This TLV identifies both the local node's node identifier, as well as
the particular connection identifier. It MUST be sent in all the particular connection identifier. It MUST be sent in every
messages if bidirectional peer relationship is desired with remote message if bidirectional peer relationship is desired with remote
nodes. Bidirectional peer relationship is not necessary for read- nodes. Bidirectional peer relationship is not necessary for read-
only access to the DNCP state, but it is required to be able to only access to the DNCP state, but it is required to be able to
publish something. publish something.
9.2.2. Network State TLV 7.2.2. Network State TLV
0 1 2 3 0 1 2 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: NETWORK-STATE (10) | Length: > 0 | | Type: NETWORK-STATE (10) | Length: > 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| H(H(node data TLV 1) .. [...] .. H(node data TLV N)) | | H(H(node data TLV 1) .. [...] .. H(node data TLV N)) |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV contains the current locally calculated network state hash. This TLV contains the current locally calculated network state hash.
The network state hash is derived by calculating the hash value for The network state hash is derived by calculating the hash value for
each currently reachable node's Node Data TLV, concatenating said each currently reachable node's Node Data TLV, concatenating said
hash values based on the ascending order of their corresponding node hash values based on the ascending order of their corresponding node
identifiers, and hashing the resulting concatenated hash values. identifiers, and hashing the resulting concatenated hash values.
9.2.3. Node State TLV 7.2.3. Node State TLV
0 1 2 3 0 1 2 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: NODE-STATE (11) | Length: > 8 | | Type: NODE-STATE (11) | Length: > 8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Node Identifier | | Node Identifier |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Update Sequence Number | | Update Sequence Number |
skipping to change at page 16, line 34 skipping to change at page 15, line 34
field in the TLV. field in the TLV.
The whole network should have roughly same idea about the time since The whole network should have roughly same idea about the time since
origination of any particular published state. Therefore every node, origination of any particular published state. Therefore every node,
including the originating one, MUST increment the time whenever it including the originating one, MUST increment the time whenever it
needs to send a Node State TLV for an already published Node Data needs to send a Node State TLV for an already published Node Data
TLV. This age value is not included within the Node Data TLV, TLV. This age value is not included within the Node Data TLV,
however, as that is immutable and used to detect changes in the however, as that is immutable and used to detect changes in the
network state. network state.
9.2.4. Node Data TLV 7.2.4. Node Data TLV
0 1 2 3 0 1 2 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: NODE-DATA (12) | Length: > 4 | | Type: NODE-DATA (12) | Length: > 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| node identifier | | node identifier |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Update Sequence Number | | Update Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Nested TLVs containing node information | | Nested TLVs containing node information |
9.2.5. Neighbor TLV (within Node Data TLV) 7.2.5. Custom TLV
0 1 2 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: CUSTOM-DATA (15) | Length: > 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| H(URI) |
| (length fixed in DNCP profile) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opaque Data |
This TLV can be used to contain anything; the URI used should be
under control of the author of that specification. The TLV may
appear within protocol exchanges, or within Node Data TLV
(Section 7.2.4). For example:
V = H('http://example.com/author/json-for-dncp') .. '{"cool": "json
extension!"}'
or
V = H('mailto:author@example.com') .. '{"cool": "json extension!"}'
7.3. Data TLVs within Node Data TLV
7.3.1. Fragment Count TLV
0 1 2 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: FRAGMENT-COUNT (9) | Length: > 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Count |
| (length fixed in DNCP profile) |
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
If the DNCP profile supports Node Data fragmentation as specified in
Section 6.3, this TLV indicates that the Node Data is encoded as a
series of Node Data TLVs. Subsequent Node Data with Node Identifiers
up to Count higher than the current one MUST be considered reachable
and part of the same logical set of Node Data that this TLV is
within. The fragment portion of the Node Identifier of the Node Data
this is within MUST be zeros.
7.3.2. Neighbor TLV
0 1 2 3 0 1 2 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: NEIGHBOR (13) | Length: > 8 | | Type: NEIGHBOR (13) | Length: > 8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| neighbor node identifier | | neighbor node identifier |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 17, line 28 skipping to change at page 17, line 28
| Local Connection Identifier | | Local Connection Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV indicates that the node in question vouches that the This TLV indicates that the node in question vouches that the
specified neighbor is reachable by it on the specified local specified neighbor is reachable by it on the specified local
connection. The presence of this TLV at least guarantees that the connection. The presence of this TLV at least guarantees that the
node publishing it has received traffic from the neighbor recently. node publishing it has received traffic from the neighbor recently.
For guaranteed up-to-date bidirectional reachability, the existence For guaranteed up-to-date bidirectional reachability, the existence
of both nodes' matching Neighbor TLVs should be checked. of both nodes' matching Neighbor TLVs should be checked.
9.2.6. Keep-Alive Interval TLV (within Node Data TLV) 7.3.3. Keep-Alive Interval TLV
0 1 2 3 0 1 2 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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: KEEP-ALIVE-INTERVAL (14)| Length: 8 | | Type: KEEP-ALIVE-INTERVAL (14)| Length: 8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Connection Identifier | | Connection Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Interval | | Interval |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV indicates a non-default interval being used to send keep- This TLV indicates a non-default interval being used to send keep-
alive messages specified in Section 6. alives specified in Section 6.1.
Connection identifier is used to identify the particular connection Connection identifier is used to identify the particular connection
for which the interval applies. If 0, it applies for ALL connections for which the interval applies. If 0, it applies for ALL connections
for which no specific TLV exists. for which no specific TLV exists.
Interval specifies the interval in milliseconds at which the node Interval specifies the interval in milliseconds at which the node
sends keep-alives. A value of zero means no keep-alives are sent at sends keep-alives. A value of zero means no keep-alives are sent at
all; in that case, some lower layer mechanism that ensures presence all; in that case, some lower layer mechanism that ensures presence
of nodes MUST be available and used. of nodes MUST be available and used.
9.3. Custom TLV (within/without Node Data TLV) 8. Security and Trust Management
0 1 2 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type: CUSTOM-DATA (15) | Length: > 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| H(URI) |
| (length fixed in DNCP profile) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opaque Data |
This TLV can be used to contain anything; the URI used should be
under control of the author of that specification. For example:
V = H('http://example.com/author/json-for-dncp') .. '{"cool": "json
extension!"}'
or
V = H('mailto:author@example.com') .. '{"cool": "json extension!"}'
10. Security and Trust Management
If specified in the DNCP profile, either DTLS [RFC6347] or TLS If specified in the DNCP profile, either DTLS [RFC6347] or TLS
[RFC5246] may be used to authenticate and encrypt either some (if [RFC5246] may be used to authenticate and encrypt either some (if
specified optional in the profile), or all unicast traffic. The specified optional in the profile), or all unicast traffic. The
following methods for establishing trust are defined, but it is up to following methods for establishing trust are defined, but it is up to
the DNCP profile to specify which ones may, should or must be the DNCP profile to specify which ones may, should or must be
supported. supported.
10.1. Pre-Shared Key Based Trust Method 8.1. Pre-Shared Key Based Trust Method
A PSK-based trust model is a simple security management mechanism A PSK-based trust model is a simple security management mechanism
that allows an administrator to deploy devices to an existing network that allows an administrator to deploy devices to an existing network
by configuring them with a pre-defined key, similar to the by configuring them with a pre-defined key, similar to the
configuration of an administrator password or WPA-key. Although configuration of an administrator password or WPA-key. Although
limited in nature it is useful to provide a user-friendly security limited in nature it is useful to provide a user-friendly security
mechanism for smaller networks. mechanism for smaller networks.
10.2. PKI Based Trust Method 8.2. PKI Based Trust Method
A PKI-based trust-model enables more advanced management capabilities A PKI-based trust-model enables more advanced management capabilities
at the cost of increased complexity and bootstrapping effort. It at the cost of increased complexity and bootstrapping effort. It
however allows trust to be managed in a centralized manner and is however allows trust to be managed in a centralized manner and is
therefore useful for larger networks with a need for an authoritative therefore useful for larger networks with a need for an authoritative
trust management. trust management.
10.3. Certificate Based Trust Consensus Method 8.3. Certificate Based Trust Consensus Method
The certificate-based consensus model is designed to be a compromise The certificate-based consensus model is designed to be a compromise
between trust management effort and flexibility. It is based on between trust management effort and flexibility. It is based on
X.509-certificates and allows each DNCP node to provide a verdict on X.509-certificates and allows each DNCP node to provide a verdict on
any other certificate and a consensus is found to determine whether a any other certificate and a consensus is found to determine whether a
node using this certificate or any certificate signed by it is to be node using this certificate or any certificate signed by it is to be
trusted. trusted.
The current effective trust verdict for any certificate is defined as The current effective trust verdict for any certificate is defined as
the one with the highest priority from all verdicts announced for the one with the highest priority from all verdicts announced for
said certificate at the time. said certificate at the time.
10.3.1. Trust Verdicts 8.3.1. Trust Verdicts
Trust Verdicts are statements of DNCP nodes about the trustworthiness Trust Verdicts are statements of DNCP nodes about the trustworthiness
of X.509-certificates. There are 5 possible verdicts in order of of X.509-certificates. There are 5 possible verdicts in order of
ascending priority: ascending priority:
0 Neutral : no verdict exists but the DNCP network should determine 0 Neutral : no verdict exists but the DNCP network should determine
one. one.
1 Cached Trust : the last known effective verdict was Configured or 1 Cached Trust : the last known effective verdict was Configured or
Cached Trust. Cached Trust.
skipping to change at page 20, line 18 skipping to change at page 19, line 43
trusted for participating in the DNCP network if and only if the trusted for participating in the DNCP network if and only if the
current effective verdict for its own certificate or any one in its current effective verdict for its own certificate or any one in its
certificate hierarchy is (Cached or Configured) Trust and none of the certificate hierarchy is (Cached or Configured) Trust and none of the
certificates in its hierarchy have an effective verdict of (Cached or certificates in its hierarchy have an effective verdict of (Cached or
Configured) Distrust. In case a node has a configured verdict, which Configured) Distrust. In case a node has a configured verdict, which
is different from the current effective verdict for a certificate, is different from the current effective verdict for a certificate,
the current effective verdict takes precedence in deciding the current effective verdict takes precedence in deciding
trustworthiness. Despite that, the node still retains and announces trustworthiness. Despite that, the node still retains and announces
its configured verdict. its configured verdict.
10.3.2. Trust Cache 8.3.2. Trust Cache
Each node SHOULD maintain a trust cache containing the current Each node SHOULD maintain a trust cache containing the current
effective trust verdicts for all certificates currently announced in effective trust verdicts for all certificates currently announced in
the DNCP network. This cache is used as a backup of the last known the DNCP network. This cache is used as a backup of the last known
state in case there is no node announcing a configured verdict for a state in case there is no node announcing a configured verdict for a
known certificate. It SHOULD be saved to a non-volatile memory at known certificate. It SHOULD be saved to a non-volatile memory at
reasonable time intervals to survive a reboot or power outage. reasonable time intervals to survive a reboot or power outage.
Every time a node (re)joins the network or detects the change of an Every time a node (re)joins the network or detects the change of an
effective trust verdict for any certificate, it will synchronize its effective trust verdict for any certificate, it will synchronize its
cache, i.e. store new effective verdicts overwriting any previously cache, i.e. store new effective verdicts overwriting any previously
cached verdicts. Configured verdicts are stored in the cache as cached verdicts. Configured verdicts are stored in the cache as
their respective cached counterparts. Neutral verdicts are never their respective cached counterparts. Neutral verdicts are never
stored and do not override existing cached verdicts. stored and do not override existing cached verdicts.
10.3.3. Announcement of Verdicts 8.3.3. Announcement of Verdicts
A node SHOULD always announce any configured trust verdicts it has A node SHOULD always announce any configured trust verdicts it has
established by itself, and it MUST do so if announcing the configured established by itself, and it MUST do so if announcing the configured
trust verdict leads to a change in the current effective verdict for trust verdict leads to a change in the current effective verdict for
the respective certificate. In absence of configured verdicts, it the respective certificate. In absence of configured verdicts, it
MUST announce cached trust verdicts it has stored in its trust cache, MUST announce cached trust verdicts it has stored in its trust cache,
if one of the following conditions applies: if one of the following conditions applies:
o The stored verdict is Cached Trust and the current effective o The stored verdict is Cached Trust and the current effective
verdict for the certificate is Neutral or does not exist. verdict for the certificate is Neutral or does not exist.
skipping to change at page 21, line 45 skipping to change at page 21, line 34
(reserved) is reserved for future additions and MUST be set to 0 (reserved) is reserved for future additions and MUST be set to 0
when creating TLVs and ignored when parsing them. when creating TLVs and ignored when parsing them.
SHA-256 Fingerprint contains the SHA-256 [RFC6234] hash value of SHA-256 Fingerprint contains the SHA-256 [RFC6234] hash value of
the certificate in DER-format. the certificate in DER-format.
Common Name contains the variable-length (1-64 bytes) common name Common Name contains the variable-length (1-64 bytes) common name
of the certificate. Final byte MUST have value of 0. of the certificate. Final byte MUST have value of 0.
10.3.4. Bootstrap Ceremonies 8.3.4. Bootstrap Ceremonies
The following non-exhaustive list of methods describes possible ways The following non-exhaustive list of methods describes possible ways
to establish trust relationships between DNCP nodes and node to establish trust relationships between DNCP nodes and node
certificates. Trust establishment is a two-way process in which the certificates. Trust establishment is a two-way process in which the
existing network must trust the newly added node and the newly added existing network must trust the newly added node and the newly added
node must trust at least one of its neighboring nodes. It is node must trust at least one of its neighboring nodes. It is
therefore necessary that both the newly added node and an already therefore necessary that both the newly added node and an already
trusted node perform such a ceremony to successfully introduce a node trusted node perform such a ceremony to successfully introduce a node
into the DNCP network. In all cases an administrator MUST be into the DNCP network. In all cases an administrator MUST be
provided with external means to identify the node belonging to a provided with external means to identify the node belonging to a
certificate based on its fingerprint and a meaningful common name. certificate based on its fingerprint and a meaningful common name.
10.3.4.1. Trust by Identification 8.3.4.1. Trust by Identification
A node implementing certificate-based trust MUST provide an interface A node implementing certificate-based trust MUST provide an interface
to retrieve the current set of effective trust verdicts, fingerprints to retrieve the current set of effective trust verdicts, fingerprints
and names of all certificates currently known and set configured and names of all certificates currently known and set configured
trust verdicts to be announced. Alternatively it MAY provide a trust verdicts to be announced. Alternatively it MAY provide a
companion DNCP node or application with these capabilities with which companion DNCP node or application with these capabilities with which
it has a pre-established trust relationship. it has a pre-established trust relationship.
10.3.4.2. Preconfigured Trust 8.3.4.2. Preconfigured Trust
A node MAY be preconfigured to trust a certain set of node or CA A node MAY be preconfigured to trust a certain set of node or CA
certificates. However such trust relationships MUST NOT result in certificates. However such trust relationships MUST NOT result in
unwanted or unrelated trust for nodes not intended to be run inside unwanted or unrelated trust for nodes not intended to be run inside
the same network (e.g. all other devices by the same manufacturer). the same network (e.g. all other devices by the same manufacturer).
10.3.4.3. Trust on Button Press 8.3.4.3. Trust on Button Press
A node MAY provide a physical or virtual interface to put one or more A node MAY provide a physical or virtual interface to put one or more
of its internal network interfaces temporarily into a mode in which of its internal network interfaces temporarily into a mode in which
it trusts the certificate of the first DNCP node it can successfully it trusts the certificate of the first DNCP node it can successfully
establish a connection with. establish a connection with.
10.3.4.4. Trust on First Use 8.3.4.4. Trust on First Use
A node which is not associated with any other DNCP node MAY trust the A node which is not associated with any other DNCP node MAY trust the
certificate of the first DNCP node it can successfully establish a certificate of the first DNCP node it can successfully establish a
connection with. This method MUST NOT be used when the node has connection with. This method MUST NOT be used when the node has
already associated with any other DNCP node. already associated with any other DNCP node.
11. DNCP Profile-Specific Definitions 9. DNCP Profile-Specific Definitions
Each DNCP profile MUST define following: Each DNCP profile MUST define following:
o How the messages are secured: Not at all, optionally or always o How the messages are secured: Not at all, optionally or always
with the TLS scheme defined here using one or more of the methods, with the TLS scheme defined here using one or more of the methods,
or with something else. If the links with DNCP nodes can be or with something else. If the links with DNCP nodes can be
sufficiently secured or isolated, it is possible to run DNCP in a sufficiently secured or isolated, it is possible to run DNCP in a
secure manner without using any form of authentication or secure manner without using any form of authentication or
encryption. encryption.
skipping to change at page 23, line 14 skipping to change at page 23, line 5
DTLS support for at least the unicast transport protocol is DTLS support for at least the unicast transport protocol is
mandatory. mandatory.
o Transport protocols' parameters such as port numbers to be used, o Transport protocols' parameters such as port numbers to be used,
or multicast address to be used. Unicast, multicast, and secure or multicast address to be used. Unicast, multicast, and secure
unicast may each require different parameters, if applicable. unicast may each require different parameters, if applicable.
o When receiving messages, what sort of messages are dropped, as o When receiving messages, what sort of messages are dropped, as
specified in Section 5.2. specified in Section 5.2.
o What is the criteria for sending Trickle-based Long Network State
Update message (Section 8.2) on an interface or to a DNCP peer.
o How to deal with node identifier collision as described in o How to deal with node identifier collision as described in
Section 5.2. Main options are either for one or both nodes to Section 5.2. Main options are either for one or both nodes to
assign new node identifiers to themselves, or to notify someone assign new node identifiers to themselves, or to notify someone
about a fatal error condition in the DNCP network. about a fatal error condition in the DNCP network.
o Imin, Imax and k ranges to be suggested for implementations to be o Imin, Imax and k ranges to be suggested for implementations to be
used in the Trickle algorithm. The Trickle algorithm does not used in the Trickle algorithm. The Trickle algorithm does not
require these to be same across all implementations for it to require these to be same across all implementations for it to
work, but similar orders of magnitude helps implementations of a work, but similar orders of magnitude helps implementations of a
DNCP profile to behave more consistently and to facilitate DNCP profile to behave more consistently and to facilitate
skipping to change at page 23, line 45 skipping to change at page 23, line 33
o DNCP_NODE_IDENTIFIER_LENGTH: The fixed length of a node identifier o DNCP_NODE_IDENTIFIER_LENGTH: The fixed length of a node identifier
(in bytes). (in bytes).
o DNCP_GRACE_INTERVAL: How long node data for unreachable nodes is o DNCP_GRACE_INTERVAL: How long node data for unreachable nodes is
kept. kept.
o Whether to send keep-alives, and if so, on an interface, using o Whether to send keep-alives, and if so, on an interface, using
multicast, or directly using unicast to peers. Keep-alive has multicast, or directly using unicast to peers. Keep-alive has
also associated parameters: also associated parameters:
* DNCP_KEEPALIVE_INTERVAL: How often keep-alive messages are to * DNCP_KEEPALIVE_INTERVAL: How often keep-alives are to be sent
be sent by default (if enabled). by default (if enabled).
* DNCP_KEEPALIVE_MULTIPLIER: How many times the * DNCP_KEEPALIVE_MULTIPLIER: How many times the
DNCP_KEEPALIVE_INTERVAL (or peer-supplied keep-alive interval DNCP_KEEPALIVE_INTERVAL (or peer-supplied keep-alive interval
value) a node may not be heard from to be considered still value) a node may not be heard from to be considered still
valid. valid.
12. Security Considerations o Whether to support fragmentation, and if so, the number of bytes
reserved for fragment count in the node identifier.
10. Security Considerations
DNCP profiles may use multicast to indicate DNCP state changes and DNCP profiles may use multicast to indicate DNCP state changes and
for keep-alive purposes. However, no actual data TLVs will be sent for keep-alive purposes. However, no actual data TLVs will be sent
across that channel. Therefore an attacker may only learn hash across that channel. Therefore an attacker may only learn hash
values of the state within DNCP and may be able to trigger unicast values of the state within DNCP and may be able to trigger unicast
synchronization attempts between nodes on a local link this way. A synchronization attempts between nodes on a local link this way. A
DNCP node should therefore rate-limit its reactions to multicast DNCP node should therefore rate-limit its reactions to multicast
packets. packets.
When using DNCP to bootstrap a network, PKI based solutions may have When using DNCP to bootstrap a network, PKI based solutions may have
skipping to change at page 24, line 27 skipping to change at page 24, line 17
accurate time, or due to inability to use the network to either check accurate time, or due to inability to use the network to either check
Certifcate Revocation Lists or perform on-line validation. Certifcate Revocation Lists or perform on-line validation.
The Certificate-based trust consensus mechanism defined in this The Certificate-based trust consensus mechanism defined in this
document allows for a consenting revocation, however in case of a document allows for a consenting revocation, however in case of a
compromised device the trust cache may be poisoned before the actual compromised device the trust cache may be poisoned before the actual
revocation happens allowing the distrusted device to rejoin the revocation happens allowing the distrusted device to rejoin the
network using a different identity. Stopping such an attack might network using a different identity. Stopping such an attack might
require physical intervention and flushing of the trust caches. require physical intervention and flushing of the trust caches.
13. IANA Considerations 11. IANA Considerations
IANA should set up a registry for DNCP TLV types, with the following IANA should set up a registry for DNCP TLV types, with the following
initial contents: initial contents:
0: Reserved (should not happen on wire) 0: Reserved (should not happen on wire)
1: Node connection 1: Node connection
2: Request network state 2: Request network state
3: Request node data 3: Request node data
4-9: Reserved for DNCP profile use 4-8: Reserved for DNCP profile use
9: Fragment count
10: Network state 10: Network state
11: Node state 11: Node state
12: Node data 12: Node data
13: Neighbor 13: Neighbor
14: Keep-alive interval 14: Keep-alive interval
skipping to change at page 25, line 16 skipping to change at page 25, line 10
17-31: Reserved for future DNCP versions. 17-31: Reserved for future DNCP versions.
192-255: Reserved for per-implementation experimentation. The nodes 192-255: Reserved for per-implementation experimentation. The nodes
using TLV types in this range SHOULD use e.g. Custom TLV to identify using TLV types in this range SHOULD use e.g. Custom TLV to identify
each other and therefore eliminate potential conflict caused by each other and therefore eliminate potential conflict caused by
potential different use of same TLV numbers. potential different use of same TLV numbers.
For the rest of the values (32-191, 256-65535), policy of 'standards For the rest of the values (32-191, 256-65535), policy of 'standards
action' should be used. action' should be used.
14. References 12. References
14.1. Normative references 12.1. Normative references
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC6206] Levis, P., Clausen, T., Hui, J., Gnawali, O., and J. Ko, [RFC6206] Levis, P., Clausen, T., Hui, J., Gnawali, O., and J. Ko,
"The Trickle Algorithm", RFC 6206, March 2011. "The Trickle Algorithm", RFC 6206, March 2011.
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, January 2012. Security Version 1.2", RFC 6347, January 2012.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008. (TLS) Protocol Version 1.2", RFC 5246, August 2008.
14.2. Informative references 12.2. Informative references
[RFC3493] Gilligan, R., Thomson, S., Bound, J., McCann, J., and W. [RFC3493] Gilligan, R., Thomson, S., Bound, J., McCann, J., and W.
Stevens, "Basic Socket Interface Extensions for IPv6", RFC Stevens, "Basic Socket Interface Extensions for IPv6", RFC
3493, February 2003. 3493, February 2003.
[RFC6234] Eastlake, D. and T. Hansen, "US Secure Hash Algorithms [RFC6234] Eastlake, D. and T. Hansen, "US Secure Hash Algorithms
(SHA and SHA-based HMAC and HKDF)", RFC 6234, May 2011. (SHA and SHA-based HMAC and HKDF)", RFC 6234, May 2011.
Appendix A. Some Outstanding Issues Appendix A. Some Questions and Answers [RFC Editor: please remove]
Should better forms of combined messages be defined? e.g. allow
sending both request-network-state, and currently set of known local
state at same time in one message.
Should some sort of fragmentation scheme be defined for the data?
Currently, DNCP uses Merkle tree of depth 2 (node data -> node hash
-> network hash). However, it essentially treats all TLVs published
by a single node as a single chunk on the protocol level. Is that a
scalability problem? Adding one more level to the tree might address
this.
Appendix B. Some Obvious Questions and Answers
Q: Should there be nested container syntax that is actually self-
describing? (i.e. type flag that indicates container, no body except
sub-TLVs?)
A: Not for now, but perhaps valid design.. TBD.
Q: Add third case for multicast - 'medium' network state, which is
'long' one, but partial?
A: Drops typical convergence on large networks 5->3 packets, at
expense of some specification/implementation complexity. However, as
anything else than short network state leaks information via
multicast, it does not seem worth it as secure protocols probably
want to prevent multicast sending of anything else than short network
state in any case. Additionally, the long network state being
complete set of nodes actually facilitates light-weight nodes that do
not want to do graph-based pruning. So all in all, perhaps not worth
it.
Q: 32-bit connection id? Q: 32-bit connection id?
A: Here, it would save 32 bits per neighbor if it was 16 bits (and A: Here, it would save 32 bits per neighbor if it was 16 bits (and
less is not realistic). However, TLVs defined elsewhere would not less is not realistic). However, TLVs defined elsewhere would not
seem to even gain that much on average. 32 bits is also used for seem to even gain that much on average. 32 bits is also used for
ifindex in various operating systems, making for simpler ifindex in various operating systems, making for simpler
implementation. implementation.
Q: Why have topology information at all? Q: Why have topology information at all?
A: It is an alternative to the more traditional seq#/TTL-based A: It is an alternative to the more traditional seq#/TTL-based
flooding schemes. In steady state, there is no need to e.g. re- flooding schemes. In steady state, there is no need to e.g. re-
publish every now and then. publish every now and then.
Appendix C. Changelog Appendix B. Changelog [RFC Editor: please remove]
draft-ietf-homenet-dncp-02:
o Changed DNCP "messages" into series of TLV streams, allowing
optimized round-trip saving synchronization.
o Added fragmentation support for bigger node data and for chunking
in absence of reliable L2 and L3 fragmentation.
draft-ietf-homenet-dncp-01: draft-ietf-homenet-dncp-01:
o Fixed keep-alive semantics to consider unicast requests also o Fixed keep-alive semantics to consider unicast requests also
updates of most recently consistent, and added proactive unicast updates of most recently consistent, and added proactive unicast
request to ensure even inconsistent keep-alive messages eventually request to ensure even inconsistent keep-alive messages eventually
triggering consistency timestamp update. triggering consistency timestamp update.
o Facilitated (simple) read-only clients by making Node Connection o Facilitated (simple) read-only clients by making Node Connection
TLV optional if just using DNCP for read-only purposes. TLV optional if just using DNCP for read-only purposes.
skipping to change at page 27, line 30 skipping to change at page 26, line 47
than 4). than 4).
o Trickle is reset only when locally calculated network state hash o Trickle is reset only when locally calculated network state hash
is changes, not as remote different network state hash is seen. is changes, not as remote different network state hash is seen.
This prevents e.g. attacks by multicast with one multicast packet This prevents e.g. attacks by multicast with one multicast packet
to force Trickle reset on every interface of every node on a link. to force Trickle reset on every interface of every node on a link.
o Instead of 'ping', use 'keep-alive' (optional) for dead peer o Instead of 'ping', use 'keep-alive' (optional) for dead peer
detection. Different message used! detection. Different message used!
Appendix D. Draft Source Appendix C. Draft Source [RFC Editor: please remove]
As usual, this draft is available at https://github.com/fingon/ietf- As usual, this draft is available at https://github.com/fingon/ietf-
drafts/ in source format (with nice Makefile too). Feel free to send drafts/ in source format (with nice Makefile too). Feel free to send
comments and/or pull requests if and when you have changes to it! comments and/or pull requests if and when you have changes to it!
Appendix E. Acknowledgements Appendix D. Acknowledgements
Thanks to Ole Troan, Pierre Pfister, Mark Baugher, Mark Townsley, Thanks to Ole Troan, Pierre Pfister, Mark Baugher, Mark Townsley,
Juliusz Chroboczek and Jiazi Yi for their contributions to the draft. Juliusz Chroboczek and Jiazi Yi for their contributions to the draft.
Authors' Addresses Authors' Addresses
Markus Stenberg Markus Stenberg
Helsinki 00930 Helsinki 00930
Finland Finland
 End of changes. 96 change blocks. 
372 lines changed or deleted 330 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/