draft-ietf-homenet-dncp-06.txt   draft-ietf-homenet-dncp-07.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: December 22, 2015 Expires: January 4, 2016
June 20, 2015 July 3, 2015
Distributed Node Consensus Protocol Distributed Node Consensus Protocol
draft-ietf-homenet-dncp-06 draft-ietf-homenet-dncp-07
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 leaves some details unspecified or provides and Merkle trees. DNCP leaves some details unspecified or provides
alternative options. Therefore, only profiles which specify those alternative options. Therefore, only profiles which specify those
missing parts define actual implementable DNCP based protocols. missing parts define actual implementable DNCP-based protocols.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 December 22, 2015. This Internet-Draft will expire on January 4, 2016.
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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
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. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 2.1. Requirements Language . . . . . . . . . . . . . . . . . . 6
3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.1. Merkle Tree . . . . . . . . . . . . . . . . . . . . . . . 6 4.1. Merkle Tree . . . . . . . . . . . . . . . . . . . . . . . 7
4.2. Data Transport . . . . . . . . . . . . . . . . . . . . . 7 4.2. Data Transport . . . . . . . . . . . . . . . . . . . . . 7
4.3. Trickle-Driven Status Updates . . . . . . . . . . . . . . 8 4.3. Trickle-Driven Status Updates . . . . . . . . . . . . . . 8
4.4. Processing of Received TLVs . . . . . . . . . . . . . . . 9 4.4. Processing of Received TLVs . . . . . . . . . . . . . . . 9
4.5. Adding and Removing Peers . . . . . . . . . . . . . . . . 11 4.5. Adding and Removing Peers . . . . . . . . . . . . . . . . 11
4.6. Data Liveliness Validation . . . . . . . . . . . . . . . 11 4.6. Data Liveliness Validation . . . . . . . . . . . . . . . 12
5. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 12 5. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 13
6. Optional Extensions . . . . . . . . . . . . . . . . . . . . . 13 6. Optional Extensions . . . . . . . . . . . . . . . . . . . . . 14
6.1. Keep-Alives . . . . . . . . . . . . . . . . . . . . . . . 13 6.1. Keep-Alives . . . . . . . . . . . . . . . . . . . . . . . 14
6.1.1. Data Model Additions . . . . . . . . . . . . . . . . 14 6.1.1. Data Model Additions . . . . . . . . . . . . . . . . 15
6.1.2. Per-Endpoint Periodic Keep-Alives . . . . . . . . . . 14 6.1.2. Per-Endpoint Periodic Keep-Alives . . . . . . . . . . 15
6.1.3. Per-Peer Periodic Keep-Alives . . . . . . . . . . . . 14 6.1.3. Per-Peer Periodic Keep-Alives . . . . . . . . . . . . 16
6.1.4. Received TLV Processing Additions . . . . . . . . . . 15 6.1.4. Received TLV Processing Additions . . . . . . . . . . 16
6.1.5. Neighbor Removal . . . . . . . . . . . . . . . . . . 15 6.1.5. Neighbor Removal . . . . . . . . . . . . . . . . . . 16
6.2. Support For Dense Broadcast Links . . . . . . . . . . . . 15 6.2. Support For Dense Broadcast Links . . . . . . . . . . . . 16
6.3. Node Data Fragmentation . . . . . . . . . . . . . . . . . 16 6.3. Node Data Fragmentation . . . . . . . . . . . . . . . . . 17
7. Type-Length-Value Objects . . . . . . . . . . . . . . . . . . 17 7. Type-Length-Value Objects . . . . . . . . . . . . . . . . . . 18
7.1. Request TLVs . . . . . . . . . . . . . . . . . . . . . . 17 7.1. Request TLVs . . . . . . . . . . . . . . . . . . . . . . 19
7.1.1. Request Network State TLV . . . . . . . . . . . . . . 17 7.1.1. Request Network State TLV . . . . . . . . . . . . . . 19
7.1.2. Request Node State TLV . . . . . . . . . . . . . . . 18 7.1.2. Request Node State TLV . . . . . . . . . . . . . . . 19
7.2. Data TLVs . . . . . . . . . . . . . . . . . . . . . . . . 18 7.2. Data TLVs . . . . . . . . . . . . . . . . . . . . . . . . 19
7.2.1. Node Endpoint TLV . . . . . . . . . . . . . . . . . . 18 7.2.1. Node Endpoint TLV . . . . . . . . . . . . . . . . . . 19
7.2.2. Network State TLV . . . . . . . . . . . . . . . . . . 18 7.2.2. Network State TLV . . . . . . . . . . . . . . . . . . 20
7.2.3. Node State TLV . . . . . . . . . . . . . . . . . . . 19 7.2.3. Node State TLV . . . . . . . . . . . . . . . . . . . 20
7.3. Data TLVs within Node State TLV . . . . . . . . . . . . . 20 7.3. Data TLVs within Node State TLV . . . . . . . . . . . . . 21
7.3.1. Fragment Count TLV . . . . . . . . . . . . . . . . . 20 7.3.1. Fragment Count TLV . . . . . . . . . . . . . . . . . 21
7.3.2. Neighbor TLV . . . . . . . . . . . . . . . . . . . . 20 7.3.2. Neighbor TLV . . . . . . . . . . . . . . . . . . . . 22
7.3.3. Keep-Alive Interval TLV . . . . . . . . . . . . . . . 21 7.3.3. Keep-Alive Interval TLV . . . . . . . . . . . . . . . 22
8. Security and Trust Management . . . . . . . . . . . . . . . . 22 8. Security and Trust Management . . . . . . . . . . . . . . . . 23
8.1. Pre-Shared Key Based Trust Method . . . . . . . . . . . . 22 8.1. Pre-Shared Key Based Trust Method . . . . . . . . . . . . 23
8.2. PKI Based Trust Method . . . . . . . . . . . . . . . . . 22 8.2. PKI Based Trust Method . . . . . . . . . . . . . . . . . 23
8.3. Certificate Based Trust Consensus Method . . . . . . . . 22 8.3. Certificate Based Trust Consensus Method . . . . . . . . 23
8.3.1. Trust Verdicts . . . . . . . . . . . . . . . . . . . 23 8.3.1. Trust Verdicts . . . . . . . . . . . . . . . . . . . 24
8.3.2. Trust Cache . . . . . . . . . . . . . . . . . . . . . 24 8.3.2. Trust Cache . . . . . . . . . . . . . . . . . . . . . 25
8.3.3. Announcement of Verdicts . . . . . . . . . . . . . . 24 8.3.3. Announcement of Verdicts . . . . . . . . . . . . . . 25
8.3.4. Bootstrap Ceremonies . . . . . . . . . . . . . . . . 25 8.3.4. Bootstrap Ceremonies . . . . . . . . . . . . . . . . 26
9. DNCP Profile-Specific Definitions . . . . . . . . . . . . . . 26 9. DNCP Profile-Specific Definitions . . . . . . . . . . . . . . 27
10. Security Considerations . . . . . . . . . . . . . . . . . . . 28 10. Security Considerations . . . . . . . . . . . . . . . . . . . 29
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 29 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 30
12.1. Normative references . . . . . . . . . . . . . . . . . . 29 12.1. Normative references . . . . . . . . . . . . . . . . . . 30
12.2. Informative references . . . . . . . . . . . . . . . . . 29 12.2. Informative references . . . . . . . . . . . . . . . . . 30
Appendix A. Some Questions and Answers [RFC Editor: please Appendix A. Alternative Modes of Operation . . . . . . . . . . . 30
remove] . . . . . . . . . . . . . . . . . . . . . . 29 A.1. Read-only Operation . . . . . . . . . . . . . . . . . . . 30
Appendix B. Changelog [RFC Editor: please remove] . . . . . . . 30 A.2. Forwarding Operation . . . . . . . . . . . . . . . . . . 31
Appendix C. Draft Source [RFC Editor: please remove] . . . . . . 31 Appendix B. Some Questions and Answers [RFC Editor: please
Appendix D. Acknowledgements . . . . . . . . . . . . . . . . . . 31 remove] . . . . . . . . . . . . . . . . . . . . . . 31
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31 Appendix C. Changelog [RFC Editor: please remove] . . . . . . . 31
Appendix D. Draft Source [RFC Editor: please remove] . . . . . . 33
Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 33
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33
1. Introduction 1. Introduction
DNCP is designed to provide a way for each participating node to DNCP is designed to provide a way for each participating node to
publish a set of TLV (Type-Length-Value) tuples, and to provide a publish a set of TLV (Type-Length-Value) tuples, and to provide a
shared and common view about the data published by every currently or shared and common view about the data published by every currently or
recently bidirectionally reachable DNCP node in a network. recently bidirectionally reachable DNCP node in a network.
For state synchronization a Merkle tree is used. It is formed by For state synchronization a Merkle tree is used. It is formed by
first calculating a hash for the dataset, called node data, published first calculating a hash for the dataset, called node data, published
skipping to change at page 4, line 7 skipping to change at page 4, line 7
the rate of data changes grows over a given time interval, Trickle is the rate of data changes grows over a given time interval, Trickle is
eventually used less and less and the benefit of using DNCP eventually used less and less and the benefit of using DNCP
diminishes. In these cases Trickle just provides extra complexity diminishes. In these cases Trickle just provides extra complexity
within the specification and little added value. If constant rapid within the specification and little added value. If constant rapid
state changes are needed, the preferable choice is to use an state changes are needed, the preferable choice is to use an
additional point-to-point channel whose address or locator is additional point-to-point channel whose address or locator is
published using DNCP. published using DNCP.
2. Terminology 2. Terminology
DNCP profile a definition of the set of rules and values listed DNCP profile a definition of the set of rules and values
in Section 9 specifying the behavior of a DNCP defining the behavior of a fully specified,
based protocol, such as the transport method in implementable protocol which uses DNCP. The DNCP
use. In this document, any DNCP profile specific profile specifies transport method to be used,
parameter with a profile-specific fixed value is which optional parts of the DNCP specification are
prefixed with DNCP_. required by that particular protocol, and various
parameters and optional behaviors. In this
document any parameter that a DNCP profile
specifies is prefixed with DNCP_. Contents of a
DNCP profile are specified in Section 9.
DNCP node a single node which runs a protocol based on a DNCP DNCP-based a protocol which provides a DNCP profile, and
profile. protocol potentially much more, e.g., protocol-specific TLVs
and guidance on how they should be used.
DNCP node a single node which runs a DNCP-based protocol.
Link a link-layer media over which directly connected Link a link-layer media over which directly connected
nodes can communicate. nodes can communicate.
DNCP network a set of DNCP nodes running the same DNCP profile. DNCP network a set of DNCP nodes running the same DNCP-based
The set consists of nodes that have discovered each protocol. The set consists of nodes that have
other using the transport method defined in the discovered each other using the transport method
DNCP profile, via multicast on local links, and/or defined in the DNCP profile, via multicast on local
by using unicast communication. links, and/or by using unicast communication.
Node identifier an opaque fixed-length identifier consisting of Node identifier an opaque fixed-length identifier consisting of
DNCP_NODE_IDENTIFIER_LENGTH bytes which uniquely DNCP_NODE_IDENTIFIER_LENGTH bytes which uniquely
identifies a DNCP node within a DNCP network. identifies a DNCP node within a DNCP network.
Interface a node's attachment to a particular link. Interface a node's attachment to a particular link.
Address As DNCP itself is relatively transport agnostic, an
address in this specification denotes just
something that identifies an endpoint used by the
transport protocol employed by a DNCP-based
protocol. In case of an IPv6 UDP transport, an
address in this specification refers to a tuple
(IPv6 address, UDP port).
Endpoint a locally configured communication endpoint of a Endpoint a locally configured communication endpoint of a
DNCP node, such as a network socket. It is either DNCP node, such as a network socket. It is either
bound to an Interface for multicast and unicast bound to an Interface for multicast and unicast
communication, or configured for explicit unicast communication, or configured for explicit unicast
communication with a predefined set of remote communication with a predefined set of remote
addresses. Endpoints are usually in one of the addresses. Endpoints are usually in one of the
transport modes specified in Section 4.2. transport modes specified in Section 4.2.
Endpoint a 32-bit opaque value, which identifies a Endpoint a 32-bit opaque value, which identifies a
identifier particular endpoint of a particular DNCP node. The identifier particular endpoint of a particular DNCP node. The
value 0 is reserved for DNCP and DNCP profile value 0 is reserved for DNCP and DNCP-based
purposes and not used to identify an actual protocol purposes and not used to identify an
endpoint. This definition is in sync with the actual endpoint. This definition is in sync with
interface index definition in [RFC3493], as the the interface index definition in [RFC3493], as the
non-zero small positive integers should comfortably non-zero small positive integers should comfortably
fit within 32 bits. fit within 32 bits.
Peer another DNCP node with which a DNCP node Peer another DNCP node with which a DNCP node
communicates using a particular local and remote communicates using a particular local and remote
endpoint pair. endpoint pair.
Node data a set of TLVs published and owned by a node in the Node data a set of TLVs published and owned by a node in the
DNCP network. Other nodes pass it along as-is, even DNCP network. Other nodes pass it along as-is, even
if they cannot fully interpret it. if they cannot fully interpret it.
skipping to change at page 6, line 12 skipping to change at page 6, line 30
of published node data by ensuring that the publishing node was - at of published node data by ensuring that the publishing node was - at
least recently - bidirectionally reachable. This is determined, least recently - bidirectionally reachable. This is determined,
e.g., by a recent and consistent multicast or unicast TLV exchange e.g., by a recent and consistent multicast or unicast TLV exchange
with its peers. New potential peers can be discovered autonomously with its peers. New potential peers can be discovered autonomously
on multicast-enabled links, their addresses may be manually on multicast-enabled links, their addresses may be manually
configured or they may be found by some other means defined in a configured or they may be found by some other means defined in a
later specification. later specification.
A Merkle tree is maintained by each node to represent the state of A Merkle tree is maintained by each node to represent the state of
all currently reachable nodes and the Trickle algorithm is used to all currently reachable nodes and the Trickle algorithm is used to
trigger synchronization. Consistency among neighboring nodes is trigger synchronization. The need to check neighboring nodes for
thereby determined by comparing the current root of their respective state changes is thereby determined by comparing the current root of
trees, i.e., their individually calculated network state hashes. their respective trees, i.e., their individually calculated network
state hashes.
Before joining a DNCP network, a node starts with a Merkle tree (and Before joining a DNCP network, a node starts with a Merkle tree (and
therefore a calculated network state hash) only consisting of the therefore a calculated network state hash) only consisting of the
node itself. It then announces said hash by means of the Trickle node itself. It then announces said hash by means of the Trickle
algorithm on all its configured endpoints. algorithm on all its configured endpoints.
When an update is detected by a node (e.g., by receiving an When an update is detected by a node (e.g., by receiving a different
inconsistent network state hash from a peer) the originator of the network state hash from a peer) the originator of the event is
event is requested to provide a list of the state of all nodes, i.e., requested to provide a list of the state of all nodes, i.e., all the
all the information it uses to calculate its own Merkle tree. The information it uses to calculate its own Merkle tree. The node uses
node uses the list to determine whether its own information is the list to determine whether its own information is outdated and -
outdated and - if necessary - requests the actual node data that has if necessary - requests the actual node data that has changed.
changed.
Whenever a node's local copy of any node data and its Merkle tree are Whenever a node's local copy of any node data and its Merkle tree are
updated (e.g., due to its own or another node's node state changing updated (e.g., due to its own or another node's node state changing
or due to a peer being added or removed) its Trickle instances are or due to a peer being added or removed) its Trickle instances are
reset which eventually causes any update to be propagated to all of reset which eventually causes any update to be propagated to all of
its peers. its peers.
4. Operation 4. Operation
4.1. Merkle Tree 4.1. Merkle Tree
Each DNCP node maintains a Merkle tree of height 1 to manage state Each DNCP node maintains a Merkle tree of height 1 to manage state
updates of individual DNCP nodes, the leaves of the tree, and the updates of individual DNCP nodes, the leaves of the tree, and the
network as a whole, the root of the tree. network as a whole, the root of the tree.
Each leaf represents one recently bidirectionally reachable node (see Each leaf represents one recently bidirectionally reachable DNCP node
Section 4.6), and is represented by a tuple consisting of the node's (see Section 4.6), and is represented by a tuple consisting of the
update sequence number in network byte order concatenated with the node's sequence number in network byte order concatenated with the
hash-value of the node's ordered node data published in the Node hash-value of the node's ordered node data published in the Node
State TLV (Section 7.2.3). These leaves are ordered in ascending State TLV (Section 7.2.3). These leaves are ordered in ascending
order of the respective node identifiers. The root of the tree - the order of the respective node identifiers. The root of the tree - the
network state hash - is represented by the hash-value calculated over network state hash - is represented by the hash-value calculated over
all such leaf tuples concatenated in order. It is used to determine all such leaf tuples concatenated in order. It is used to determine
whether the view of the network of two or more nodes is consistent whether the view of the network of two or more nodes is consistent
and shared. and shared.
The leaves and the root network state hash are updated on-demand and The leaves and the root network state hash are updated on-demand and
whenever any locally stored per-node state changes. This includes whenever any locally stored per-node state changes. This includes
local unidirectional reachability encoded in the published Neighbor local unidirectional reachability encoded in the published Neighbor
TLV (Section 7.3.2)s and - when combined with remote data - results TLVs (Section 7.3.2) and - when combined with remote data - results
in awareness of bidirectional reachability changes. in awareness of bidirectional reachability changes.
4.2. Data Transport 4.2. Data Transport
DNCP has relatively few requirements for the underlying transport; it DNCP has relatively few requirements for the underlying transport; it
requires some way of transmitting either unicast datagram or stream requires some way of transmitting either unicast datagram or stream
data to a peer and, if used in multicast mode, a way of sending data to a peer and, if used in multicast mode, a way of sending
multicast datagrams. As multicast is used only to identify potential multicast datagrams. As multicast is used only to identify potential
new DNCP nodes and to send status messages which merely notify that a new DNCP nodes and to send status messages which merely notify that a
unicast exchange should be triggered, the multicast transport does unicast exchange should be triggered, the multicast transport does
not have to be secured. If unicast security is desired and one of not have to be secured. If unicast security is desired and one of
the built-in security methods is to be used, support for some TLS- the built-in security methods is to be used, support for some TLS-
derived transport scheme - such as TLS [RFC5246] on top of TCP or derived transport scheme - such as TLS [RFC5246] on top of TCP or
DTLS [RFC6347] on top of UDP - is also required. A specific DTLS [RFC6347] on top of UDP - is also required. A specific
definition of the transport(s) in use and their parameters MUST be definition of the transport(s) in use and their parameters MUST be
provided by the DNCP profile. provided by the DNCP profile.
TLVs are sent across the transport as is, and they SHOULD be sent TLVs are sent across the transport as is, and they SHOULD be sent
together where, e.g., MTU considerations do not recommend sending together where, e.g., MTU considerations do not recommend sending
them in multiple batches. TLVs in general are handled individually them in multiple batches. TLVs in general are handled individually
and statelessly, with one exception. To form bidirectional peer and statelessly, with one exception: To form bidirectional peer
relationships DNCP requires identification of the endpoints used for relationships DNCP requires identification of the endpoints used for
communication. A DNCP node desiring bidirectional peer relationship communication. As bidirectional peer relationships are required for
therefore MUST send an Endpoint TLV (Section 7.2.1). When it is sent validating liveliness of published node data as described in
varies, depending on the underlying transport: Section 4.6, a DNCP node MUST send an Endpoint TLV (Section 7.2.1).
o If using a stream transport, the TLV SHOULD be sent only once When it is sent varies, depending on the underlying transport, but
within the stream. conceptually it should be available whenever processing a Network
State TLV:
o If using datagram transport, it MUST be included in every o If using a stream transport, the TLV MUST be sent at least once,
datagram. and it SHOULD be sent only once.
Bidirectional peer relationship is not necessary for read-only access o If using a datagram transport, it MUST be included in every
to the DNCP state, but it is required to be able to publish data. datagram that also contains a Network State TLV (Section 7.2.2)
and MUST be located before any such TLV. It SHOULD also be
included in any other datagram, to speeds up initial peer
detection.
Given the assorted transport options as well as potential endpoint Given the assorted transport options as well as potential endpoint
configuration, a DNCP endpoint may be used in various transport configuration, a DNCP endpoint may be used in various transport
modes: modes:
Unicast: Unicast:
* If only reliable unicast transport is employed, Trickle is not * If only reliable unicast transport is employed, Trickle is not
used at all. Where Trickle reset occurs, a single Network used at all. Where Trickle reset has been specified, a single
State TLV (Section 7.2.2) is sent instead to every unicast Network State TLV (Section 7.2.2) is sent instead to every
peer. Additionally, recently changed Node State TLV unicast peer. Additionally, recently changed Node State TLVs
(Section 7.2.3)s MAY be included. (Section 7.2.3) MAY be included.
* If only unreliable unicast transport is employed, Trickle state * If only unreliable unicast transport is employed, Trickle state
is kept per each peer and it is used to send Network State TLVs is kept per each peer and it is used to send Network State TLVs
every now and then, as specified in Section 4.3. every now and then, as specified in Section 4.3.
Multicast+Unicast: If multicast datagram transport is available on Multicast+Unicast: If multicast datagram transport is available on
an endpoint, Trickle state is only maintained for the endpoint as an endpoint, Trickle state is only maintained for the endpoint as
a whole. It is used to send Network State TLVs every now and a whole. It is used to send Network State TLVs every now and
then, as specified in Section 4.3. Additionally, per-endpoint then, as specified in Section 4.3. Additionally, per-endpoint
keep-alives MAY be defined in the DNCP profile, as specified in keep-alives MAY be defined in the DNCP profile, as specified in
skipping to change at page 8, line 40 skipping to change at page 9, line 11
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
an endpoint to prevent local state transmission. The actual an endpoint 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 9. described in Section 9.
The Trickle state for all Trickle instances is considered The Trickle state for all Trickle instances is considered
inconsistent and reset if and only if the locally calculated network inconsistent and reset if and only if the locally calculated network
state hash changes. This occurs either due to a change in the local state hash changes. This occurs either due to a change in the local
node's own node data, or due to receipt of more recent data from node's own node data, or due to receipt of more recent data from
another node. another node. A node MUST NOT reset its Trickle state merely based
on receiving a Network State TLV (Section 7.2.2) with a network state
hash which is different from its locally calculated one.
Every time a particular Trickle instance indicates that an update Every time a particular Trickle instance indicates that an update
should be sent, the node MUST send a Network State TLV should be sent, the node MUST send a Network State TLV
(Section 7.2.2) if and only if: (Section 7.2.2) if and only if:
o the endpoint is in Multicast+Unicast transport mode, in which case o the endpoint is in Multicast+Unicast transport mode, in which case
the TLV MUST be sent over multicast. the TLV MUST be sent over multicast.
o the endpoint is NOT in Multicast+Unicast transport mode, and the o the endpoint is NOT in Multicast+Unicast transport mode, and the
unicast transport is unreliable, in which case the TLV MUST be unicast transport is unreliable, in which case the TLV MUST be
skipping to change at page 9, line 25 skipping to change at page 9, line 46
security properties - see Section 9 for what may be safely defined to security properties - see Section 9 for what may be safely defined to
be ignored in a profile. Any 'reply' mentioned in the steps below be ignored in a profile. Any 'reply' mentioned in the steps below
denotes sending of the specified TLV(s) over unicast to the denotes sending of the specified TLV(s) over unicast to the
originator of the TLV being processed. If the TLV being replied to originator of the TLV being processed. If the TLV being replied to
was received via multicast and it was sent to a link with shared was received via multicast and it was sent to a link with shared
bandwidth, the reply SHOULD be delayed by a random timespan in [0, bandwidth, the reply SHOULD be delayed by a random timespan in [0,
Imin/2], to avoid potential simultaneous replies that may cause Imin/2], to avoid potential simultaneous replies that may cause
problems on some links. Sending of replies MAY also be rate-limited problems on some links. Sending of replies MAY also be rate-limited
or omitted for a short period of time by an implementation. However, or omitted for a short period of time by an implementation. However,
an implementation MUST eventually reply to similar repeated requests, an implementation MUST eventually reply to similar repeated requests,
as otherwise state synchronization would break. as otherwise state synchronization breaks.
A DNCP node MUST process TLVs received from any valid address, as A DNCP node MUST process TLVs received from any valid address, as
specified by a given DNCP profile and the configuration of a specified by the DNCP profile and the configuration of a particular
particular endpoint, whether this address is known to be the address endpoint, whether this address is known to be the address of a
of a neighbor or not. This provision satisfies the needs of neighbor or not. This provision satisfies the needs of monitoring or
monitoring or other host software that needs to discover the DNCP other host software that needs to discover the DNCP topology without
topology without adding to the state in the network. adding to the state in the network.
Upon receipt of: Upon receipt of:
o Request Network State TLV (Section 7.1.1): The receiver MUST reply o Request Network State TLV (Section 7.1.1): The receiver MUST reply
with a Network State TLV (Section 7.2.2) and a Node State TLV with a Network State TLV (Section 7.2.2) and a Node State TLV
(Section 7.2.3) for each node data used to calculate the network (Section 7.2.3) for each node data used to calculate the network
state hash. The Node State TLVs MUST NOT contain the optional state hash. The Node State TLVs MUST NOT contain the optional
node data part unless explicitly specified in the DNCP profile. node data part unless explicitly specified in the DNCP profile.
o Request Node State TLV (Section 7.1.2): If the receiver has node o Request Node State TLV (Section 7.1.2): If the receiver has node
skipping to change at page 10, line 13 skipping to change at page 10, line 35
at most one reply per link per unique network state hash within at most one reply per link per unique network state hash within
Imin. The simplest way to ensure this rate limit is a timestamp Imin. The simplest way to ensure this rate limit is a timestamp
indicating requests, and sending at most one Request Network State indicating requests, and sending at most one Request Network State
TLV (Section 7.1.1) per Imin. To facilitate faster state TLV (Section 7.1.1) per Imin. To facilitate faster state
synchronization, if a Request Network State TLV is sent in a synchronization, if a Request Network State TLV is sent in a
reply, a local, current Network State TLV MAY also be sent. reply, a local, current Network State TLV MAY also be sent.
o Node State TLV (Section 7.2.3): o Node State TLV (Section 7.2.3):
* If the node identifier matches the local node identifier and * If the node identifier matches the local node identifier and
the TLV has a greater update sequence number than its current the TLV has a greater sequence number than its current local
local value, or the same update sequence number and a different value, or the same sequence number and a different hash, the
hash, the node SHOULD re-publish its own node data with an node SHOULD re-publish its own node data with an sequence
update sequence number significantly (e.g., 1000) greater than number significantly (e.g., 1000) greater than the received
the received one, to reclaim the node identifier. This may one, to reclaim the node identifier. This may occur normally
occur normally once due to the local node restarting and not once due to the local node restarting and not storing the most
storing the most recently used update sequence number. If this recently used sequence number. If this occurs more than once
occurs more than once or for nodes not re-publishing their own or for nodes not re-publishing their own node data, the DNCP
node data, the DNCP profile MUST provide guidance on how to profile MUST provide guidance on how to handle these situations
handle these situations as it indicates the existence of as it indicates the existence of another active node with the
another active node with the same node identifier. same node identifier.
* If the node identifier does not match the local node * If the node identifier does not match the local node
identifier, and one or more of the following conditions are identifier, and one or more of the following conditions are
true: true:
+ The local information is outdated for the corresponding node + The local information is outdated for the corresponding node
(local update sequence number is less than that within the (local sequence number is less than that within the TLV).
TLV).
+ The local information is potentially incorrect (local update + The local information is potentially incorrect (local
sequence number matches but the node data hash differs). sequence number matches but the node data hash differs).
+ There is no data for that node altogether. + There is no data for that node altogether.
Then: Then:
+ If the TLV does not contain node data, and the hash of the + If the TLV contains the Node Data field, it SHOULD also be
node data differs, the receiver MUST reply with a Request verified by ensuring that the locally calculated H(Node
Node State TLV (Section 7.1.2) for the corresponding node. Data) matches the content of the H(Node Data) field within
the TLV. If they differ, the TLV SHOULD be ignored and not
processed further.
+ If the TLV does not contain the Node Data field, and the
H(Node Data) field within the TLV differs from the local
node data hash for that node (or there is none), the
receiver MUST reply with a Request Node State TLV
(Section 7.1.2) for the corresponding node.
+ Otherwise the receiver MUST update its locally stored state + Otherwise the receiver MUST update its locally stored state
for that node (node data if present, update sequence number, for that node (node data based on Node Data field if
relative time) to match the received TLV. present, sequence number and relative time) to match the
received TLV.
For comparison purposes of the update sequence number, a looping For comparison purposes of the sequence number, a looping
comparison function MUST be used to avoid problems in case of comparison function MUST be used to avoid problems in case of
overflow. The comparison function a < b <=> (a - b) % 2^32 & 2^31 overflow. The comparison function a < b <=> (a - b) % 2^32 & 2^31
!= 0 is RECOMMENDED unless the DNCP profile defines another. != 0 is RECOMMENDED unless the DNCP profile defines another.
o Any other TLV: TLVs not recognized by the receiver MUST be o Any other TLV: TLVs not recognized by the receiver MUST be
silently ignored. silently ignored.
If secure unicast transport is configured for an endpoint, any Node If secure unicast transport is configured for an endpoint, any Node
State TLVs received over insecure multicast MUST be silently ignored. State TLVs received over insecure multicast MUST be silently ignored.
skipping to change at page 11, line 37 skipping to change at page 12, line 22
detection or TCP keep-alive) MUST be employed to ensure its presence. detection or TCP keep-alive) MUST be employed to ensure its presence.
When the peer is no longer present, the Neighbor TLV and the local When the peer is no longer present, the Neighbor TLV and the local
DNCP peer state MUST be removed. DNCP peer state MUST be removed.
If the local endpoint is in the Multicast-Listen+Unicast transport If the local endpoint is in the Multicast-Listen+Unicast transport
mode, a Neighbor TLV (Section 7.3.2) MUST NOT be published for the mode, a Neighbor TLV (Section 7.3.2) MUST NOT be published for the
peers not having the highest node identifier. peers not having the highest node identifier.
4.6. Data Liveliness Validation 4.6. Data Liveliness Validation
When a Neighbor TLV or a whole node is added or removed, the topology The topology graph MUST be traversed either immediately or with a
graph MUST be traversed either immediately or with a small delay small delay shorter than the DNCP profile-defined Trickle Imin,
shorter than the DNCP profile-defined Trickle Imin. whenever:
The topology graph traversal starts with the local node. The edges o A Neighbor TLV or a whole node is added or removed, or
to be traversed are identified by looking for Neighbor TLVs on both
nodes, that have the other node's node identifier in the Neighbor o the origination time (in milliseconds) of some node's node data is
Node Identifier, and local and neighbor endpoint identifiers swapped. less than current time - 2^32 + 2^15.
Each node reached is marked currently reachable.
The topology graph traversal starts with the local node marked as
reachable. Other nodes are then iteratively marked as reachable
using the following algorithm: A candidate not-yet-reachable node N
with an endpoint NE is marked as reachable if there is a reachable
node R with an endpoint RE that meet all of the following criteria:
o The origination time (in milliseconds) of R's node data is greater
than current time in - 2^32 + 2^15.
o R publishes a Neighbor TLV with:
* Neighbor Node Identifier = N's node identifier
* Neighbor Endpoint Identifier = NE's endpoint identifier
* Endpoint Identifier = RE's endpoint identifier
o N publishes a Neighbor TLV with:
* Neighbor Node Identifier = R's node identifier
* Neighbor Endpoint Identifier = RE's endpoint identifier
* Endpoint Identifier = NE's endpoint identifier
The algorithm terminates, when no more candidate nodes fulfilling
these criteria can be found.
DNCP nodes that have not been reachable in the most recent topology DNCP nodes that have not been reachable in the most recent topology
graph traversal MUST NOT be used for calculation of the network state graph traversal MUST NOT be used for calculation of the network state
hash, be provided to any applications that need to use the whole TLV hash, be provided to any applications that need to use the whole TLV
graph, or be provided to remote nodes. They MAY be removed graph, or be provided to remote nodes. They MAY be removed
immediately after the topology graph traversal, however it is immediately after the topology graph traversal, however it is
RECOMMENDED to keep them at least briefly to improve the speed of RECOMMENDED to keep them at least briefly to improve the speed of
DNCP network state convergence and to reduce the number of redundant DNCP network state convergence and to reduce the number of redundant
state transmissions between nodes. state transmissions between nodes.
skipping to change at page 12, line 26 skipping to change at page 13, line 37
o A data structure containing data about the most recently sent o A data structure containing data about the most recently sent
Request Network State TLVs (Section 7.1.1). The simplest option Request Network State TLVs (Section 7.1.1). The simplest option
is keeping a timestamp of the most recent request (required to is keeping a timestamp of the most recent request (required to
fulfill reply rate limiting specified in Section 4.4). fulfill reply rate limiting specified in Section 4.4).
A DNCP node has for every DNCP node in the DNCP network: A DNCP node has for every DNCP node in the DNCP network:
o Node identifier: the unique identifier of the node. The length, o Node identifier: the unique identifier of the node. The length,
how it is produced, and how collisions are handled, is up to the how it is produced, and how collisions are handled, is up to the
particular DNCP profile. DNCP profile.
o Node data: the set of TLV tuples published by that particular o Node data: the set of TLV tuples published by that particular
node. As they are transmitted ordered (see Node State TLV node. As they are transmitted ordered (see Node State TLV
(Section 7.2.3) for details), maintaining the order within the (Section 7.2.3) for details), maintaining the order within the
data structure here may be reasonable. data structure here may be reasonable.
o Latest update sequence number: the 32-bit sequence number that is o Latest sequence number: the 32-bit sequence number that is
incremented any time the TLV set is published. The comparison incremented any time the TLV set is published. The comparison
function used to compare them is described in Section 4.4. function used to compare them is described in Section 4.4.
o Origination time: the (estimated) time when the current TLV set o Origination time: the (estimated) time when the current TLV set
with the current update sequence number was published. It is used with the current sequence number was published. It is used to
to populate the Milliseconds Since Origination field in a Node populate the Milliseconds Since Origination field in a Node State
State TLV (Section 7.2.3). Ideally it also has millisecond TLV (Section 7.2.3). Ideally it also has millisecond accuracy.
accuracy.
Additionally, a DNCP node has a set of endpoints for which DNCP is Additionally, a DNCP node has a set of endpoints for which DNCP is
configured to be used. For each such endpoint, a node has: configured to be used. For each such endpoint, a node has:
o Endpoint identifier: the 32-bit opaque value uniquely identifying o Endpoint identifier: the 32-bit opaque value uniquely identifying
it within the local node. it within the local node.
o Trickle instance: the endpoint's Trickle instance with parameters o Trickle instance: the endpoint's Trickle instance with parameters
I, T, and c (only on an endpoint in Multicast+Unicast transport I, T, and c (only on an endpoint in Multicast+Unicast transport
mode). mode).
skipping to change at page 13, line 25 skipping to change at page 14, line 35
o Node identifier: the unique identifier of the peer. o Node identifier: the unique identifier of the peer.
o Endpoint identifier: the unique endpoint identifier used by the o Endpoint identifier: the unique endpoint identifier used by the
peer. peer.
o Peer address: the most recently used address of the peer o Peer address: the most recently used address of the peer
(authenticated and authorized, if security is enabled). (authenticated and authorized, if security is enabled).
o Trickle instance: the particular peer's Trickle instance with o Trickle instance: the particular peer's Trickle instance with
parameters I, T, and c (only on a unicast-only endpoint with parameters I, T, and c (only on an endpoint in Unicast mode, when
unreliable unicast transport) . using an unreliable unicast transport) .
6. Optional Extensions 6. Optional Extensions
This section specifies extensions to the core protocol that a DNCP This section specifies extensions to the core protocol that a DNCP
profile may use. profile may specify to be used.
6.1. Keep-Alives 6.1. Keep-Alives
Trickle-driven status updates (Section 4.3) provide a mechanism for Trickle-driven status updates (Section 4.3) provide a mechanism for
handling of new peer detection on an endpoint, as well as state handling of new peer detection on an endpoint, 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 peers if the transport or lower layers do not old, no longer valid peers if the transport or lower layers do not
provide one. 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
skipping to change at page 15, line 46 skipping to change at page 17, line 6
running on the link if liveliness of peers is not ensured using some running on the link if liveliness of peers is not ensured using some
other way (e.g., TCP connection lifetime, layer 2 notification, per- other way (e.g., TCP connection lifetime, layer 2 notification, per-
endpoint keep-alive). endpoint keep-alive).
An upper bound for the number of neighbors that are allowed for a An upper bound for the number of neighbors that are allowed for a
particular type of link that an endpoint in Multicast+Unicast particular type of link that an endpoint in Multicast+Unicast
transport mode is used on SHOULD be provided by a DNCP profile, but transport mode is used on SHOULD be provided by a DNCP profile, but
MAY also be chosen at runtime. Main consideration when selecting a MAY also be chosen at runtime. Main consideration when selecting a
bound (if any) for a particular type of link should be whether it bound (if any) for a particular type of link should be whether it
supports broadcast traffic, and whether a too large number of supports broadcast traffic, and whether a too large number of
neighbors case is likely to happen during the use of that particular neighbors case is likely to happen during the use of that DNCP
DNCP profile on that particular type of link. If neither is likely, profile on that particular type of link. If neither is likely, there
there is little point specifying support for this for that particular is little point specifying support for this for that particular link
link type. type.
If a DNCP profile does not support this extension at all, the rest of If a DNCP profile does not support this extension at all, the rest of
this subsection MUST be ignored. This is because when this extension this subsection MUST be ignored. This is because when this extension
is employed, the state within the DNCP network only contains a subset is employed, the state within the DNCP network only contains a subset
of the full topology of the network. Therefore every node must be of the full topology of the network. Therefore every node must be
aware of the potential of it being used in a particular DNCP profile. aware of the potential of it being used in a particular DNCP profile.
If the specified upper bound is exceeded for some endpoint in If the specified upper bound is exceeded for some endpoint in
Multicast+Unicast transport mode and if the node does not have the Multicast+Unicast transport mode and if the node does not have the
highest node identifier on the link, it SHOULD treat the endpoint as highest node identifier on the link, it SHOULD treat the endpoint as
skipping to change at page 16, line 26 skipping to change at page 17, line 35
Multicast+Unicast mode, and as well to react to nodes with a greater Multicast+Unicast mode, and as well to react to nodes with a greater
node identifier appearing. If the highest node identifier present on node identifier appearing. If the highest node identifier present on
the link changes, the remote unicast address of the endpoints in the link changes, the remote unicast address of the endpoints in
Multicast-Listen+Unicast transport mode MUST be changed. If the node Multicast-Listen+Unicast transport mode MUST be changed. If the node
identifier of the local node is the highest one, the node MUST switch identifier of the local node is the highest one, the node MUST switch
back to, or stay in Multicast+Unicast mode, and normally form peer back to, or stay in Multicast+Unicast mode, and normally form peer
relationships with all peers. relationships with all peers.
6.3. Node Data Fragmentation 6.3. Node Data Fragmentation
A DNCP profile may be required to support node data which would not A DNCP-based protocol may be required to support node data which
fit the maximum size of a single Node State TLV (Section 7.2.3) would not fit the maximum size of a single Node State TLV
(roughly 64KB of payload), or use a datagram-only transport with a (Section 7.2.3) (roughly 64KB of payload), or use a datagram-only
limited MTU and no reliable support for fragmentation. To handle transport with a limited MTU and no reliable support for
such cases, a DNCP profile MAY specify a fixed number of trailing fragmentation. To handle such cases, a DNCP profile MAY specify a
bytes in the node identifier to represent a fragment number fixed number of trailing bytes in the node identifier to represent a
indicating a part of a node's node data. The profile MAY also fragment number indicating a part of a node's node data. The profile
specify an upper bound for the size of a single fragment to MAY also specify an upper bound for the size of a single fragment to
accommodate limitations of links in the network. Note that the accommodate limitations of links in the network. Note that the
maximum size of fragment also constrains the maximum size of a single maximum size of fragment also constrains the maximum size of a single
TLV published by a node. TLV published by a node.
The data within Node State TLVs of all fragments MUST be valid, as The data within Node State TLVs of all fragments MUST be valid, as
specified in Section 7.2.3. The locally used node data for a specified in Section 7.2.3. The locally used node data for a
particular node MUST be produced by concatenating node data in each particular node MUST be produced by concatenating node data in each
fragment, in ascending fragment number order. The locally used fragment, in ascending fragment number order. The locally used
concatenated node data MUST still follow the ordering described in concatenated node data MUST still follow the ordering described in
Section 7.2.3. Section 7.2.3.
skipping to change at page 18, line 41 skipping to change at page 19, line 52
| Type: NODE-ENDPOINT (3) | Length: > 4 | | Type: NODE-ENDPOINT (3) | Length: > 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Node Identifier | | Node Identifier |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Endpoint Identifier | | Endpoint 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 endpoint's endpoint identifier. It is used when the particular endpoint's endpoint identifier.
bidirectional peering is desired, as described in the Section 4.2.
7.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 (4) | Length: > 0 | | Type: NETWORK-STATE (4) | Length: > 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| H(update number of node 1 .. H(node data of node 1) .. | | H(sequence number of node 1 .. H(node data of node 1) .. |
| .. update number of node N .. H(node data of node N)) | | .. sequence number of node N .. H(node data of node 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,
see Section 4.1 for how it is calculated. see Section 4.1 for how it is calculated.
7.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 (5) | Length: > 8 | | Type: NODE-STATE (5) | Length: > 8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Node Identifier | | Node Identifier |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Update Sequence Number | | Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Milliseconds Since Origination | | Milliseconds Since Origination |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| H(node data) | | H(Node Data) |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|(optionally) Nested TLVs containing node information | | (optionally) Node Data (a set of nested TLVs) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV represents the local node's knowledge about the published This TLV represents the local node's knowledge about the published
state of a node in the DNCP network identified by the Node Identifier state of a node in the DNCP network identified by the Node Identifier
field in the TLV. field in the TLV.
Every node, including the originating one, MUST update the Every node, including the originating one, MUST update the
Milliseconds Since Origination whenever it sends a Node State TLV Milliseconds Since Origination whenever it sends a Node State TLV
based on when the node estimates the data was originally published. based on when the node estimates the data was originally published.
skipping to change at page 20, line 12 skipping to change at page 21, line 14
interpreted. Ultimately, what is provided is just an approximation, interpreted. Ultimately, what is provided is just an approximation,
as transmission delays are not accounted for. as transmission delays are not accounted for.
Absent any changes, if the originating node notices that the 32-bit Absent any changes, if the originating node notices that the 32-bit
milliseconds since origination value would be close to overflow milliseconds since origination value would be close to overflow
(greater than 2^32-2^16), the node MUST re-publish its TLVs even if (greater than 2^32-2^16), the node MUST re-publish its TLVs even if
there is no change. In other words, absent any other changes, the there is no change. In other words, absent any other changes, the
TLV set MUST be re-published roughly every 48 days. TLV set MUST be re-published roughly every 48 days.
The actual node data of the node may be included within the TLV as The actual node data of the node may be included within the TLV as
well. In a DNCP profile which supports fragmentation, described in well in the optional Node Data field. In a DNCP profile which
Section 6.3, the TLV data may be only partial but it MUST contain supports fragmentation, described in Section 6.3, the TLV data may be
full individual TLVs. This set of TLVs MUST be strictly ordered only partial but it MUST contain full individual TLVs. The set of
based on ascending binary content (including TLV type and length). TLVs MUST be strictly ordered based on ascending binary content
This enables, e.g., efficient state delta processing and no-copy (including TLV type and length). This enables, e.g., efficient state
indexing by TLV type by the recipient. delta processing and no-copy indexing by TLV type by the recipient.
The Node Data content MUST be passed along exactly as it was
received. It SHOULD be also verified on receipt that the locally
calculated H(Node Data) matches the content of the field within the
TLV, and if the hash differs, the TLV SHOULD be ignored.
7.3. Data TLVs within Node State TLV 7.3. Data TLVs within Node State TLV
These TLVs are published by the DNCP nodes, and therefore only These TLVs are published by the DNCP nodes, and therefore only
encoded within the Node State TLVs. If encountered outside Node encoded within the Node State TLVs. If encountered outside Node
State TLV, they MUST be silently ignored. State TLV, they MUST be silently ignored.
7.3.1. Fragment Count TLV 7.3.1. Fragment Count TLV
0 1 2 3 0 1 2 3
skipping to change at page 28, line 7 skipping to change at page 29, line 7
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. This is just a default used in absence of any other valid. This is just a default used in absence of any other
configuration information, or particular per-endpoint configuration information, or particular per-endpoint
configuration. configuration.
o Whether to support fragmentation, and if so, the number of bytes o Whether to support fragmentation, and if so, the number of bytes
reserved for fragment count in the node identifier. reserved for fragment count in the node identifier.
10. Security Considerations 10. Security Considerations
DNCP profiles may use multicast to indicate DNCP state changes and DNCP-based protocols may use multicast to indicate DNCP state changes
for keep-alive purposes. However, no actual published data TLVs will and for keep-alive purposes. However, no actual published data TLVs
be sent across that channel. Therefore an attacker may only learn will be sent across that channel. Therefore an attacker may only
hash values of the state within DNCP and may be able to trigger learn hash values of the state within DNCP and may be able to trigger
unicast synchronization attempts between nodes on a local link this unicast synchronization attempts between nodes on a local link this
way. A DNCP node should therefore rate-limit its reactions to way. A DNCP node should therefore rate-limit its reactions to
multicast packets. multicast 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
issues when validating certificates due to potentially unavailable issues when validating certificates due to potentially unavailable
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
skipping to change at page 29, line 37 skipping to change at page 30, line 37
12.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 Questions and Answers [RFC Editor: please remove] Appendix A. Alternative Modes of Operation
Beyond what is described in the main text, the protocol allows for
other uses. These are provided as examples.
A.1. Read-only Operation
If a node uses just a single endpoint and does not need to publish
any TLVs, full DNCP node functionality is not required. Such limited
node can acquire and maintain view of the TLV space by implementing
the processing logic as specified in Section 4.4. Such node would
not need Trickle, peer-maintenance or even keep-alives at all, as the
DNCP nodes' use of it would guarantee eventual receipt of network
state hashes, and synchronization of node data, even in presence of
unreliable transport.
A.2. Forwarding Operation
If a node with a pair of endpoints does not need to publish any TLVs,
it can detect (for example) nodes with the highest node identifier on
each of the endpoints (if any). Any TLVs received from one of them
would be forwarded verbatim as unicast to the other node with highest
node identifier.
Any tinkering with the TLVs would remove guarantees of this scheme
working; however passive monitoring would obviously be fine. This
type of simple forwarding cannot be chained, as it does not send
anything proactively.
Appendix B. Some Questions and Answers [RFC Editor: please remove]
Q: 32-bit endpoint id? Q: 32-bit endpoint 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 B. Changelog [RFC Editor: please remove] Appendix C. Changelog [RFC Editor: please remove]
draft-ietf-homenet-dncp-06: draft-ietf-homenet-dncp-06:
o Removed custom TLV. o Removed custom TLV.
o Made keep-alive multipliers local implementation choice, profiles o Made keep-alive multipliers local implementation choice, profiles
just provide guidance on sane default value. just provide guidance on sane default value.
o Removed the DNCP_GRACE_INTERVAL as it is really implementation o Removed the DNCP_GRACE_INTERVAL as it is really implementation
choice. choice.
skipping to change at page 31, line 28 skipping to change at page 33, line 10
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 This prevents, e.g., attacks by multicast with one multicast
packet to force Trickle reset on every interface of every node on packet to force Trickle reset on every interface of every node on
a link. 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 C. Draft Source [RFC Editor: please remove] Appendix D. 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 D. Acknowledgements Appendix E. Acknowledgements
Thanks to Ole Troan, Pierre Pfister, Mark Baugher, Mark Townsley, Thanks to Ole Troan, Pierre Pfister, Mark Baugher, Mark Townsley,
Juliusz Chroboczek, Jiazi Yi, Mikael Abrahamsson, Brian Carpenter and Juliusz Chroboczek, Jiazi Yi, Mikael Abrahamsson, Brian Carpenter,
Thomas Clausen for their contributions to the draft. Thomas Clausen and DENG Hui for their contributions to the draft.
Authors' Addresses Authors' Addresses
Markus Stenberg Markus Stenberg
Helsinki 00930 Helsinki 00930
Finland Finland
Email: markus.stenberg@iki.fi Email: markus.stenberg@iki.fi
Steven Barth Steven Barth
Halle 06114 Halle 06114
Germany Germany
Email: cyrus@openwrt.org Email: cyrus@openwrt.org
 End of changes. 53 change blocks. 
176 lines changed or deleted 265 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/