draft-ietf-homenet-dncp-07.txt   draft-ietf-homenet-dncp-08.txt 
Homenet Working Group M. Stenberg Homenet Working Group M. Stenberg
Internet-Draft Internet-Draft S. Barth
Intended status: Standards Track S. Barth Intended status: Standards Track Independent
Expires: January 4, 2016 Expires: January 22, 2016 July 21, 2015
July 3, 2015
Distributed Node Consensus Protocol Distributed Node Consensus Protocol
draft-ietf-homenet-dncp-07 draft-ietf-homenet-dncp-08
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 that uses Trickle
and Merkle trees. DNCP leaves some details unspecified or provides and hash trees. DNCP is an abstract protocol, that must be combined
alternative options. Therefore, only profiles which specify those with a specific profile to make a complete implementable protocol.
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 January 4, 2016. This Internet-Draft will expire on January 22, 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Requirements Language . . . . . . . . . . . . . . . . . . 6 2.1. Requirements Language . . . . . . . . . . . . . . . . . . 6
3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.1. Merkle Tree . . . . . . . . . . . . . . . . . . . . . . . 7 4.1. Hash 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 . . . . . . . . . . . . . . . 12 4.6. Data Liveliness Validation . . . . . . . . . . . . . . . 12
5. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 13 5. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 13
6. Optional Extensions . . . . . . . . . . . . . . . . . . . . . 14 6. Optional Extensions . . . . . . . . . . . . . . . . . . . . . 14
6.1. Keep-Alives . . . . . . . . . . . . . . . . . . . . . . . 14 6.1. Keep-Alives . . . . . . . . . . . . . . . . . . . . . . . 15
6.1.1. Data Model Additions . . . . . . . . . . . . . . . . 15 6.1.1. Data Model Additions . . . . . . . . . . . . . . . . 15
6.1.2. Per-Endpoint Periodic Keep-Alives . . . . . . . . . . 15 6.1.2. Per-Endpoint Periodic Keep-Alives . . . . . . . . . . 16
6.1.3. Per-Peer Periodic Keep-Alives . . . . . . . . . . . . 16 6.1.3. Per-Peer Periodic Keep-Alives . . . . . . . . . . . . 16
6.1.4. Received TLV Processing Additions . . . . . . . . . . 16 6.1.4. Received TLV Processing Additions . . . . . . . . . . 16
6.1.5. Neighbor Removal . . . . . . . . . . . . . . . . . . 16 6.1.5. Peer Removal . . . . . . . . . . . . . . . . . . . . 16
6.2. Support For Dense Broadcast Links . . . . . . . . . . . . 16 6.2. Support For Dense Broadcast Links . . . . . . . . . . . . 16
6.3. Node Data Fragmentation . . . . . . . . . . . . . . . . . 17 7. Type-Length-Value Objects . . . . . . . . . . . . . . . . . . 17
7. Type-Length-Value Objects . . . . . . . . . . . . . . . . . . 18 7.1. Request TLVs . . . . . . . . . . . . . . . . . . . . . . 18
7.1. Request TLVs . . . . . . . . . . . . . . . . . . . . . . 19 7.1.1. Request Network State TLV . . . . . . . . . . . . . . 18
7.1.1. Request Network State TLV . . . . . . . . . . . . . . 19
7.1.2. Request Node State TLV . . . . . . . . . . . . . . . 19 7.1.2. Request Node State TLV . . . . . . . . . . . . . . . 19
7.2. Data TLVs . . . . . . . . . . . . . . . . . . . . . . . . 19 7.2. Data TLVs . . . . . . . . . . . . . . . . . . . . . . . . 19
7.2.1. Node Endpoint TLV . . . . . . . . . . . . . . . . . . 19 7.2.1. Node Endpoint TLV . . . . . . . . . . . . . . . . . . 19
7.2.2. Network State TLV . . . . . . . . . . . . . . . . . . 20 7.2.2. Network State TLV . . . . . . . . . . . . . . . . . . 19
7.2.3. Node State TLV . . . . . . . . . . . . . . . . . . . 20 7.2.3. Node State TLV . . . . . . . . . . . . . . . . . . . 20
7.3. Data TLVs within Node State TLV . . . . . . . . . . . . . 21 7.3. Data TLVs within Node State TLV . . . . . . . . . . . . . 21
7.3.1. Fragment Count TLV . . . . . . . . . . . . . . . . . 21 7.3.1. Peer TLV . . . . . . . . . . . . . . . . . . . . . . 21
7.3.2. Neighbor TLV . . . . . . . . . . . . . . . . . . . . 22 7.3.2. 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. Alternative Modes of Operation . . . . . . . . . . . 29
Appendix A. Alternative Modes of Operation . . . . . . . . . . . 30 A.1. Read-only Operation . . . . . . . . . . . . . . . . . . . 29
A.1. Read-only Operation . . . . . . . . . . . . . . . . . . . 30 A.2. Forwarding Operation . . . . . . . . . . . . . . . . . . 30
A.2. Forwarding Operation . . . . . . . . . . . . . . . . . . 31
Appendix B. Some Questions and Answers [RFC Editor: please Appendix B. Some Questions and Answers [RFC Editor: please
remove] . . . . . . . . . . . . . . . . . . . . . . 31 remove] . . . . . . . . . . . . . . . . . . . . . . 30
Appendix C. Changelog [RFC Editor: please remove] . . . . . . . 31 Appendix C. Changelog [RFC Editor: please remove] . . . . . . . 30
Appendix D. Draft Source [RFC Editor: please remove] . . . . . . 33 Appendix D. Draft Source [RFC Editor: please remove] . . . . . . 32
Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 33 Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 32
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32
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 hash tree is used. It is formed by first
first calculating a hash for the dataset, called node data, published calculating a hash for the dataset published by each node, called
by each node, and then calculating another hash over those node data node data, and then calculating another hash over those node data
hashes. The single resulting hash, called network state hash, is hashes. The single resulting hash, called network state hash, is
transmitted using the Trickle algorithm [RFC6206] to ensure that all transmitted using the Trickle algorithm [RFC6206] to ensure that all
nodes share the same view of the current state of the published data nodes share the same view of the current state of the published data
within the network. The use of Trickle with only short network state within the network. The use of Trickle with only short network state
hashes sent infrequently (in steady state) makes DNCP very thrifty hashes sent infrequently (in steady state) makes DNCP very thrifty
when updates happen rarely. when updates happen rarely.
For maintaining liveliness of the topology and the data within it, a For maintaining liveliness of the topology and the data within it, a
combination of Trickled network state, keep-alives, and "other" means combination of Trickled network state, keep-alives, and "other" means
of ensuring reachability are used. The core idea is that if every of ensuring reachability are used. The core idea is that if every
node ensures its neighbors are present, transitively, the whole node ensures its peers are present, transitively, the whole network
network state also stays up-to-date. state also stays up-to-date.
DNCP is most suitable for data that changes only infrequently to gain DNCP is most suitable for data that changes only infrequently to gain
the maximum benefit from using Trickle. As the network of nodes, or the maximum benefit from using Trickle. As the network of nodes, or
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.
skipping to change at page 4, line 40 skipping to change at page 4, line 33
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 As DNCP itself is relatively transport agnostic, an
address in this specification denotes just address in this specification denotes just
something that identifies an endpoint used by the something that identifies an endpoint used by the
transport protocol employed by a DNCP-based transport protocol that is used by a DNCP-based
protocol. In case of an IPv6 UDP transport, an protocol. In case of an IPv6 UDP transport, an
address in this specification refers to a tuple address in this specification refers to a tuple
(IPv6 address, UDP port). (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. An endpoint
bound to an Interface for multicast and unicast may be bound to a set of predefined unicast
communication, or configured for explicit unicast Addresses representing remote DNCP nodes to
communication with a predefined set of remote individually connect to or to accept connections
addresses. Endpoints are usually in one of the from whereby communication with each node is
transport modes specified in Section 4.2. separated (e.g., an individual unicast UDP message
flow per remote node). An endpoint may also be
bound to a whole network interface, then multicast
communication is used (in addition to individual
unicast flows) to send certain messages to all DNCP
nodes connected therewith at once as well as to
automatically discover new DNCP nodes. Endpoints
are usually in one of the 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-based value 0 is reserved for DNCP and DNCP-based
protocol purposes and not used to identify an protocol purposes and not used to identify an
actual endpoint. This definition is in sync with actual endpoint. This definition is in sync with
the 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.
skipping to change at page 6, line 28 skipping to change at page 6, line 28
DNCP discovers the topology of its nodes and maintains the liveliness DNCP discovers the topology of its nodes and maintains the liveliness
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 hash tree is maintained by each node to represent the state of all
all currently reachable nodes and the Trickle algorithm is used to currently reachable nodes and the Trickle algorithm is used to
trigger synchronization. The need to check neighboring nodes for trigger synchronization. The need to check peer nodes for state
state changes is thereby determined by comparing the current root of changes is thereby determined by comparing the current root of their
their respective trees, i.e., their individually calculated network respective trees, i.e., their individually calculated network state
state hashes. hashes.
Before joining a DNCP network, a node starts with a Merkle tree (and Before joining a DNCP network, a node starts with a hash 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 a different When an update is detected by a node (e.g., by receiving a different
network state hash from a peer) the originator of the event is network state hash from a peer) the originator of the event is
requested to provide a list of the state of all nodes, i.e., all the requested to provide a list of the state of all nodes, i.e., all the
information it uses to calculate its own Merkle tree. The node uses information it uses to calculate its own hash tree. The node uses
the list to determine whether its own information is outdated and - the list to determine whether its own information is outdated and -
if necessary - requests the actual node data that has changed. if necessary - requests the actual node data that has 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 hash 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. Hash Tree
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
network as a whole, the root of the tree.
Each DNCP node maintains an arbitrary width hash tree of height 1.
Each leaf represents one recently bidirectionally reachable DNCP node Each leaf represents one recently bidirectionally reachable DNCP node
(see Section 4.6), and is represented by a tuple consisting of the (see Section 4.6), and is represented by a tuple consisting of the
node's 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 node data hashes in the leaves and the root network state hash
whenever any locally stored per-node state changes. This includes are updated on-demand and whenever any locally stored per-node state
local unidirectional reachability encoded in the published Neighbor changes. This includes local unidirectional reachability encoded in
TLVs (Section 7.3.2) and - when combined with remote data - results the published Peer TLVs (Section 7.3.1) and - when combined with
in awareness of bidirectional reachability changes. remote data - results 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
skipping to change at page 7, line 52 skipping to change at page 7, line 50
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. As bidirectional peer relationships are required for communication. As bidirectional peer relationships are required for
validating liveliness of published node data as described in validating liveliness of published node data as described in
Section 4.6, a DNCP node MUST send an Endpoint TLV (Section 7.2.1). Section 4.6, a DNCP node MUST send a Node Endpoint TLV
(Section 7.2.1). When it is sent varies, depending on the underlying
When it is sent varies, depending on the underlying transport, but transport, but conceptually it should be available whenever
conceptually it should be available whenever processing a Network processing a Network State TLV:
State TLV:
o If using a stream transport, the TLV MUST be sent at least once, o If using a stream transport, the TLV MUST be sent at least once
and it SHOULD be sent only once. per connection, but SHOULD NOT be sent more than once.
o If using a datagram transport, it MUST be included in every o If using a datagram transport, it MUST be included in every
datagram that also contains a Network State TLV (Section 7.2.2) datagram that also contains a Network State TLV (Section 7.2.2)
and MUST be located before any such TLV. It SHOULD also be and MUST be located before any such TLV. It SHOULD also be
included in any other datagram, to speeds up initial peer included in any other datagram, to speeds up initial peer
detection. 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 used, Trickle is not used
used at all. Where Trickle reset has been specified, a single at all. Where Trickle reset has been specified, a single
Network State TLV (Section 7.2.2) is sent instead to every Network State TLV (Section 7.2.2) is sent instead to every
unicast peer. Additionally, recently changed Node State TLVs unicast peer. Additionally, recently changed Node State TLVs
(Section 7.2.3) 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 used, Trickle state is
is kept per each peer and it is used to send Network State TLVs kept per peer and it is used to send Network State TLVs
every now and then, as specified in Section 4.3. intermittently, 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
Section 6.1.2. Section 6.1.2.
MulticastListen+Unicast: Just like Unicast, except multicast MulticastListen+Unicast: Just like Unicast, except multicast
transmissions are listened to in order to detect changes of the transmissions are listened to in order to detect changes of the
highest node identifier. This mode is used only if the DNCP highest node identifier. This mode is used only if the DNCP
profile supports dense broadcast link optimization (Section 6.2). profile supports dense broadcast link optimization (Section 6.2).
4.3. Trickle-Driven Status Updates 4.3. Trickle-Driven Status Updates
The Trickle algorithm has 3 parameters: Imin, Imax and k. Imin and The Trickle algorithm [RFC6206] has 3 parameters: Imin, Imax and k.
Imax represent the minimum and maximum values for I, which is the Imin and Imax represent the minimum and maximum values for I, which
time interval during which at least k Trickle updates must be seen on is the time interval during which at least k Trickle updates must be
an endpoint to prevent local state transmission. The actual seen on 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. A node MUST NOT reset its Trickle state merely based 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 on receiving a Network State TLV (Section 7.2.2) with a network state
hash which is different from its locally calculated one. hash which is different from its locally calculated one.
skipping to change at page 9, line 29 skipping to change at page 9, line 27
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
sent over unicast. sent over unicast.
A (sub)set of all Node State TLVs (Section 7.2.3) MAY also be A (sub)set of all Node State TLVs (Section 7.2.3) MAY also be
included, unless it is defined as undesirable for some reason by the included, unless it is defined as undesirable for some reason by the
DNCP profile, or to avoid exposure of the node state TLVs by DNCP profile, or to avoid exposure of the node state TLVs by
transmitting them within insecure multicast when using also secure transmitting them within insecure multicast when using secure
unicast. unicast.
4.4. Processing of Received TLVs 4.4. Processing of Received TLVs
This section describes how received TLVs are processed. The DNCP This section describes how received TLVs are processed. The DNCP
profile may specify when to ignore particular TLVs, e.g., to modify profile may specify when to ignore particular TLVs, e.g., to modify
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 multiple access link,
bandwidth, the reply SHOULD be delayed by a random timespan in [0, the reply SHOULD be delayed by a random timespan in [0, Imin/2], to
Imin/2], to avoid potential simultaneous replies that may cause avoid potential simultaneous replies that may cause problems on some
problems on some links. Sending of replies MAY also be rate-limited links. Sending of replies MAY also be rate-limited or omitted for a
or omitted for a short period of time by an implementation. However, short period of time by an implementation. However, an
an implementation MUST eventually reply to similar repeated requests, implementation MUST eventually reply to similar repeated requests, as
as otherwise state synchronization breaks. 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 the DNCP profile and the configuration of a particular specified by the DNCP profile and the configuration of a particular
endpoint, whether this address is known to be the address of a endpoint, whether this address is known to be the address of a peer
neighbor or not. This provision satisfies the needs of monitoring or or not. This provision satisfies the needs of monitoring or other
other host software that needs to discover the DNCP topology without host software that needs to discover the DNCP topology without adding
adding to the state in the network. 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 SHOULD NOT contain the optional
node data part unless explicitly specified in the DNCP profile. node data part to avoid redundant transmission of node data,
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
data for the corresponding node, it MUST reply with a Node State data for the corresponding node, it MUST reply with a Node State
TLV (Section 7.2.3) for the corresponding node. The optional node TLV (Section 7.2.3) for the corresponding node. The optional node
data part MUST be included in the TLV. data part MUST be included in the TLV.
o Network State TLV (Section 7.2.2): If the network state hash o Network State TLV (Section 7.2.2): If the network state hash
differs from the locally calculated network state hash, and the differs from the locally calculated network state hash, and the
receiver is unaware of any particular node state differences with receiver is unaware of any particular node state differences with
the sender, the receiver MUST reply with a Request Network State the sender, the receiver MUST reply with a Request Network State
skipping to change at page 10, line 37 skipping to change at page 10, line 36
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 sequence number than its current local the TLV has a greater sequence number than its current local
value, or the same sequence number and a different hash, the value, or the same sequence number and a different hash, the
node SHOULD re-publish its own node data with an sequence node SHOULD re-publish its own node data with a sequence number
number significantly (e.g., 1000) greater than the received significantly (e.g., 1000) greater than the received one, to
one, to reclaim the node identifier. This may occur normally reclaim the node identifier. This difference is needed in
once due to the local node restarting and not storing the most order to ensure that it is higher then any potentially
recently used sequence number. If this occurs more than once lingering copies of the node state in the network. This may
or for nodes not re-publishing their own node data, the DNCP occur normally once due to the local node restarting and not
profile MUST provide guidance on how to handle these situations storing the most recently used sequence number. If this occurs
as it indicates the existence of another active node with the more than once or for nodes not re-publishing their own node
same node identifier. data, the DNCP profile MUST provide guidance on how to handle
these situations as it indicates the existence of another
active node with the 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 sequence number is less than that within the TLV). (local sequence number is less than that within the TLV).
+ The local information is potentially incorrect (local + 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).
skipping to change at page 11, line 34 skipping to change at page 11, line 34
receiver MUST reply with a Request Node State TLV receiver MUST reply with a Request Node State TLV
(Section 7.1.2) for the corresponding node. (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 based on Node Data field if for that node (node data based on Node Data field if
present, sequence number and relative time) to match the present, sequence number and relative time) to match the
received TLV. received TLV.
For comparison purposes of the 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)) &
!= 0 is RECOMMENDED unless the DNCP profile defines another. (2^31) != 0 where (a % b) represents the remainder of a modulo b
and (a & b) represents bitwise conjunction of a and b 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 unless they are sent within another TLV (for
example, TLVs within the Node Data field of a Node State TLV).
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.
4.5. Adding and Removing Peers 4.5. Adding and Removing Peers
When receiving a Node Endpoint TLV (Section 7.2.1) on an endpoint When receiving a Node Endpoint TLV (Section 7.2.1) on an endpoint
from an unknown peer: from an unknown peer:
o If received over unicast, the remote node MUST be added as a peer o If received over unicast, the remote node MUST be added as a peer
on the endpoint and a Neighbor TLV (Section 7.3.2) MUST be created on the endpoint and a Peer TLV (Section 7.3.1) MUST be created for
for it. it.
o If received over multicast, the node MAY be sent a (possibly rate- o If received over multicast, the node MAY be sent a (possibly rate-
limited) unicast Request Network State TLV (Section 7.1.1). limited) unicast Request Network State TLV (Section 7.1.1).
If keep-alives specified in Section 6.1 are NOT sent by the peer If keep-alives specified in Section 6.1 are NOT sent by the peer
(either the DNCP profile does not specify the use of keep-alives or (either the DNCP profile does not specify the use of keep-alives or
the particular peer chooses not to send keep-alives), some other the particular peer chooses not to send keep-alives), some other
existing local transport-specific means (such as Ethernet carrier- existing local transport-specific means (such as Ethernet carrier-
detection or TCP keep-alive) MUST be employed to ensure its presence. detection or TCP keep-alive) MUST be used 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 Peer TLV and the local DNCP
DNCP peer state MUST be removed. 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 Peer TLV (Section 7.3.1) MUST NOT be published for the peers
peers not having the highest node identifier. not having the highest node identifier.
4.6. Data Liveliness Validation 4.6. Data Liveliness Validation
The topology graph MUST be traversed either immediately or with a The topology graph MUST be traversed either immediately or with a
small delay shorter than the DNCP profile-defined Trickle Imin, small delay shorter than the DNCP profile-defined Trickle Imin,
whenever: whenever:
o A Neighbor TLV or a whole node is added or removed, or o A Peer TLV or a whole node is added or removed, or
o the origination time (in milliseconds) of some node's node data is o the origination time (in milliseconds) of some node's node data is
less than current time - 2^32 + 2^15. less than current time - 2^32 + 2^15.
The topology graph traversal starts with the local node marked as The topology graph traversal starts with the local node marked as
reachable. Other nodes are then iteratively marked as reachable reachable. Other nodes are then iteratively marked as reachable
using the following algorithm: A candidate not-yet-reachable node N using the following algorithm: A candidate not-yet-reachable node N
with an endpoint NE is marked as reachable if there is a reachable 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: 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 o The origination time (in milliseconds) of R's node data is greater
than current time in - 2^32 + 2^15. than current time in - 2^32 + 2^15.
o R publishes a Neighbor TLV with: o R publishes a Peer TLV with:
* Neighbor Node Identifier = N's node identifier * Peer Node Identifier = N's node identifier
* Neighbor Endpoint Identifier = NE's endpoint identifier * Peer Endpoint Identifier = NE's endpoint identifier
* Endpoint Identifier = RE's endpoint identifier * Endpoint Identifier = RE's endpoint identifier
o N publishes a Neighbor TLV with: o N publishes a Peer TLV with:
* Neighbor Node Identifier = R's node identifier * Peer Node Identifier = R's node identifier
* Peer Endpoint Identifier = RE's endpoint identifier
* Neighbor Endpoint Identifier = RE's endpoint identifier
* Endpoint Identifier = NE's endpoint identifier * Endpoint Identifier = NE's endpoint identifier
The algorithm terminates, when no more candidate nodes fulfilling The algorithm terminates, when no more candidate nodes fulfilling
these criteria can be found. 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
skipping to change at page 14, line 9 skipping to change at page 14, line 14
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 sequence number was published. It is used to with the current sequence number was published. It is used to
populate the Milliseconds Since Origination field in a Node State populate the Milliseconds Since Origination field in a Node State
TLV (Section 7.2.3). Ideally it also has millisecond accuracy. TLV (Section 7.2.3). Ideally it also has millisecond 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. the endpoint within the local node. It SHOULD NOT be reused
immediately after an endpoint is disabled.
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).
and one (or more) of the following: and one (or more) of the following:
o Interface: the assigned local network interface. o Interface: the assigned local network interface.
o Unicast address: the DNCP node it should connect with. o Unicast address: the DNCP node it should connect with.
o Range of addresses: the DNCP nodes that are allowed to connect. o Set of addresses: the DNCP nodes from which connections are
accepted.
For each remote (peer, endpoint) pair detected on a local endpoint, a For each remote (peer, endpoint) pair detected on a local endpoint, a
DNCP node has: DNCP node has:
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
skipping to change at page 15, line 5 skipping to change at page 15, line 16
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
this subsection MUST be ignored. this subsection MUST be ignored.
A DNCP profile MAY specify either per-endpoint or per-peer keep-alive A DNCP profile MAY specify either per-endpoint (sent using multicast
support. to all DNCP nodes connected to a multiple access link) or per-peer
(sent using unicast to each peer individually) keep-alive support.
For every endpoint that a keep-alive is specified for in the DNCP For every endpoint that a keep-alive is specified for in the DNCP
profile, the endpoint-specific keep-alive interval MUST be profile, the endpoint-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 can be (configuration, energy conservation, media type, ..), it can 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 endpoint, a DNCP node MUST publish appropriate Keep-Alive any endpoint, a DNCP node MUST publish appropriate Keep-Alive
Interval TLV(s) (Section 7.3.3) within its node data. Interval TLV(s) (Section 7.3.2) within its node data.
6.1.1. Data Model Additions 6.1.1. Data Model Additions
The following additions to the Data Model (Section 5) are needed to The following additions to the Data Model (Section 5) are needed to
support keep-alives: support keep-alives:
For each configured endpoint that has per-endpoint keep-alives For each configured endpoint that has per-endpoint keep-alives
enabled: enabled:
o Last sent: If a timestamp which indicates the last time a Network o Last sent: If a timestamp which indicates the last time a Network
skipping to change at page 15, line 48 skipping to change at page 16, line 12
sent to to that point-to-point peer. When adding a new peer, it sent to to that point-to-point peer. When adding a new peer, it
is initialized to the current time. is initialized to the current time.
6.1.2. Per-Endpoint Periodic Keep-Alives 6.1.2. Per-Endpoint Periodic Keep-Alives
If per-endpoint keep-alives are enabled on an endpoint in If per-endpoint keep-alives are enabled on an endpoint in
Multicast+Unicast transport mode, and if no traffic containing a Multicast+Unicast transport mode, and if no traffic containing a
Network State TLV (Section 7.2.2) has been sent to a particular Network State TLV (Section 7.2.2) has been sent to a particular
endpoint within the endpoint-specific keep-alive interval, a Network endpoint within the endpoint-specific keep-alive interval, a Network
State TLV (Section 7.2.2) MUST be sent on that endpoint, and a new State TLV (Section 7.2.2) MUST be sent on that endpoint, and a new
Trickle transmission time 't' in [I/2, I] MUST be randomly chosen. Trickle interval started, as specified in the step 2 of Section 4.2
The actual sending time SHOULD be further delayed by a random of [RFC6206]. The actual sending time SHOULD be further delayed by a
timespan in [0, Imin/2]. random timespan in [0, Imin/2].
6.1.3. Per-Peer Periodic Keep-Alives 6.1.3. Per-Peer Periodic Keep-Alives
If per-peer keep-alives are enabled on a unicast-only endpoint, and If per-peer keep-alives are enabled on a unicast-only endpoint, and
if no traffic containing a Network State TLV (Section 7.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 endpoint-specific keep-alive sent to a particular peer within the endpoint-specific keep-alive
interval, a Network State TLV (Section 7.2.2) MUST be sent to the interval, a Network State TLV (Section 7.2.2) MUST be sent to the
peer and a new Trickle transmission time 't' in [I/2, I] MUST be peer, and a new Trickle interval started, as specified in the step 2
randomly chosen. of Section 4.2 of [RFC6206].
6.1.4. Received TLV Processing Additions 6.1.4. Received TLV Processing Additions
If a TLV is received over unicast from the peer, the Last contact If a TLV is received over unicast from the peer, the Last contact
timestamp for the peer MUST be updated. timestamp for the peer MUST be updated.
On receipt of a Network State TLV (Section 7.2.2) which is consistent On receipt of a Network State TLV (Section 7.2.2) which is consistent
with the locally calculated network state hash, the Last contact with the locally calculated network state hash, the Last contact
timestamp for the peer MUST be updated. timestamp for the peer MUST be updated.
6.1.5. Neighbor Removal 6.1.5. Peer Removal
For every peer on every endpoint, the endpoint-specific keep-alive For every peer on every endpoint, the endpoint-specific keep-alive
interval must be calculated by looking for Keep-Alive Interval TLVs interval must be calculated by looking for Keep-Alive Interval TLVs
(Section 7.3.3) published by the node, and if none exist, using the (Section 7.3.2) published by the node, and if none exist, using the
default value of DNCP_KEEPALIVE_INTERVAL. If the peer's last contact default value of DNCP_KEEPALIVE_INTERVAL. If the peer's last contact
timestamp has not been updated for at least locally chosen timestamp has not been updated for at least locally chosen
potentially endpoint-specific keep-alive multiplier (defaults to potentially endpoint-specific keep-alive multiplier (defaults to
DNCP_KEEPALIVE_MULTIPLIER) times the peer's endpoint-specific keep- DNCP_KEEPALIVE_MULTIPLIER) times the peer's endpoint-specific keep-
alive interval, the Neighbor TLV for that peer and the local DNCP alive interval, the Peer TLV for that peer and the local DNCP peer
peer state MUST be removed. state MUST be removed.
6.2. Support For Dense Broadcast Links 6.2. Support For Dense Broadcast Links
This optimization is needed to avoid a state space explosion. Given This optimization is needed to avoid a state space explosion. Given
a large set of DNCP nodes publishing data on an endpoint that a large set of DNCP nodes publishing data on an endpoint that uses
actually uses multicast on a link, every node will add a Neighbor TLV multicast on a link, every node will add a Peer TLV (Section 7.3.1)
(Section 7.3.2) for each peer. While Trickle limits the amount of for each peer. While Trickle limits the amount of traffic on the
traffic on the link in stable state to some extent, the total amount link in stable state to some extent, the total amount of data that is
of data that is added to and maintained in the DNCP network given N added to and maintained in the DNCP network given N nodes on a
nodes on a multicast-enabled link is O(N^2). Additionally if per- multicast-enabled link is O(N^2). Additionally if per-peer keep-
peer keep-alives are employed, there will be O(N^2) keep-alives alives are used, there will be O(N^2) keep-alives running on the link
running on the link if liveliness of peers is not ensured using some if liveliness of peers is not ensured using some other way (e.g., TCP
other way (e.g., TCP connection lifetime, layer 2 notification, per- 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 peers 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 peers
neighbors case is likely to happen during the use of that DNCP case is likely to happen during the use of that DNCP profile on that
profile on that particular type of link. If neither is likely, there particular type of link. If neither is likely, there is little point
is little point specifying support for this for that particular link specifying support for this for that particular 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 used, the state within the DNCP network only contains a subset of
of the full topology of the network. Therefore every node must be the full topology of the network. Therefore every node must be aware
aware of the potential of it being used in a particular DNCP profile. 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
a unicast endpoint connected to the node that has the highest node a unicast endpoint connected to the node that has the highest node
identifier detected on the link, therefore transitioning to identifier detected on the link, therefore transitioning to
Multicast-listen+Unicast transport mode. The nodes in Multicast- Multicast-listen+Unicast transport mode. See Section 4.2 for
listen+Unicast transport mode MUST keep listening to multicast implications on the specific endpoint behavior. The nodes in
traffic to both receive messages from the node(s) still in Multicast-listen+Unicast transport mode MUST keep listening to
multicast traffic to both receive messages from the node(s) still in
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
A DNCP-based protocol may be required to support node data which
would not fit the maximum size of a single Node State TLV
(Section 7.2.3) (roughly 64KB 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. Note that the
maximum size of fragment also constrains the maximum size of a single
TLV published by a node.
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
particular node MUST be produced by concatenating node data in each
fragment, in ascending fragment number order. The locally used
concatenated node data MUST still follow the ordering described in
Section 7.2.3.
Any transmitted node identifiers used to identify the own or any
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 some of the
node data fragments change, they all are considered refreshed if one
of them is.
If using fragmentation, the data liveliness validation defined in
Section 4.6 is extended so that if a Fragment Count TLV
(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.
7. 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, in bytes, 0 meaning no length field (of the value excluding header, in bytes, 0 meaning no
value) followed by the value itself, if any. Both type and length value) followed by the value itself, if any. Both type and length
fields in the header as well as all integer fields inside the value - fields in the header as well as all integer fields inside the value -
unless explicitly stated otherwise - are represented in network byte unless explicitly stated otherwise - are represented in network byte
order. Padding bytes with value zero MUST be added up to the next 4 order. Padding bytes with value zero MUST be added up to the next 4
byte boundary if the length is not divisible by 4. These padding byte boundary if the length is not divisible by 4. These padding
bytes MUST NOT be included in the number stored in the length field. bytes MUST NOT be included in the number stored in the length field.
Each TLV which does not define optional fields or variable-length
content MAY be sent with additional nested TLVs appended after the
required TLV fields - and padding (if applicable) to allow for
extensibility. In this case the length field includes the length of
the original TLV, the length of the padding that are inserted before
the embedded TLVs and the length of the added TLVs. Therefore, each
node MUST accept received TLVs that are longer than the fixed fields
specified and ignore embedded TLVs it does not understand.
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 | Length | | Type | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Value | | Value |
..
| (variable # of bytes) | | (variable # of bytes) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| (Optional nested TLVs) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
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. If it were to have sub-TLV of
type=124 (0x7c) with value 'y', it would be encoded as 007B 0009 7800
0000 007C 0001 7900 0000.
In this section, the following special notation is used: In this section, the following special notation is used:
.. = 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.
7.1. Request TLVs 7.1. Request TLVs
7.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 (1) | Length: 0 | | Type: REQ-NETWORK-STATE (1) | Length: >= 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV is used to request response with a Network State TLV This TLV is used to request response with a Network State TLV
(Section 7.2.2) and all Node State TLVs (Section 7.2.3) (without node (Section 7.2.2) and all Node State TLVs (Section 7.2.3) (without node
data). data).
7.1.2. Request Node State TLV 7.1.2. Request 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: REQ-NODE-STATE (2) | Length: >0 | | Type: REQ-NODE-STATE (2) | Length: > 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Node Identifier | | Node Identifier |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV is used to request a Node State TLV (Section 7.2.3) This TLV is used to request a Node State TLV (Section 7.2.3)
(including node data) for the node with the matching node identifier. (including node data) for the node with the matching node identifier.
skipping to change at page 19, line 52 skipping to change at page 19, line 38
| 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. the particular endpoint's endpoint identifier. Section 4.2 specifies
when it is sent.
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(sequence number of node 1 .. H(node data of node 1) .. | | H(sequence number of node 1 .. H(node data of node 1) .. |
| .. sequence number of node N .. H(node data of node N)) | | .. sequence number of node N .. H(node data of node N)) |
skipping to change at page 21, line 14 skipping to change at page 20, line 49
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 the optional Node Data field. In a DNCP profile which well in the optional Node Data field. The set of TLVs MUST be
supports fragmentation, described in Section 6.3, the TLV data may be strictly ordered based on ascending binary content (including TLV
only partial but it MUST contain full individual TLVs. The set of type and length). This enables, e.g., efficient state delta
TLVs MUST be strictly ordered based on ascending binary content processing and no-copy indexing by TLV type by the recipient. The
(including TLV type and length). This enables, e.g., efficient state Node Data content MUST be passed along exactly as it was received.
delta processing and no-copy indexing by TLV type by the recipient. It SHOULD be also verified on receipt that the locally calculated
The Node Data content MUST be passed along exactly as it was H(Node Data) matches the content of the field within the TLV, and if
received. It SHOULD be also verified on receipt that the locally the hash differs, the TLV SHOULD be ignored.
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. Peer 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 (7) | 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
sequence of Node State TLVs. Following Node State TLVs with Node
Identifiers up to Count greater 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 State TLV this TLV appears in MUST be zero.
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 (8) | Length: > 8 | | Type: PEER (8) | Length: > 8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Neighbor Node Identifier | | Peer Node Identifier |
| (length fixed in DNCP profile) | | (length fixed in DNCP profile) |
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Neighbor Endpoint Identifier | | Peer Endpoint Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Local Endpoint Identifier | | Local Endpoint 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 peer is reachable by it on the specified local endpoint.
endpoint. The presence of this TLV at least guarantees that the node The presence of this TLV at least guarantees that the node publishing
publishing it has received traffic from the neighbor recently. For it has received traffic from the peer recently. For guaranteed up-
guaranteed up-to-date bidirectional reachability, the existence of to-date bidirectional reachability, the existence of both nodes'
both nodes' matching Neighbor TLVs needs to be checked. matching Peer TLVs needs to be checked.
7.3.3. Keep-Alive Interval TLV 7.3.2. 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 (9) | Length: 8 | | Type: KEEP-ALIVE-INTERVAL (9) | Length: >= 8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Endpoint Identifier | | Endpoint 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-
alives specified in Section 6.1. alives specified in Section 6.1.
Endpoint identifier is used to identify the particular endpoint for Endpoint identifier is used to identify the particular endpoint for
which the interval applies. If 0, it applies for ALL endpoints for which the interval applies. If 0, it applies for ALL endpoints for
which no specific TLV exists. 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
skipping to change at page 26, line 8 skipping to change at page 25, line 13
reasonable amount of time (10 minutes is suggested) with no reaction reasonable amount of time (10 minutes is suggested) with no reaction
and no further authentication attempts has passed. Such trust and no further authentication attempts has passed. Such trust
verdicts SHOULD also be limited in rate and number to prevent denial- verdicts SHOULD also be limited in rate and number to prevent denial-
of-service attacks. of-service attacks.
Trust verdicts are announced using Trust-Verdict TLVs: Trust verdicts are announced using Trust-Verdict TLVs:
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: Trust-Verdict (10) | Length: 37-100 | | Type: Trust-Verdict (10) | Length: > 36 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Verdict | (reserved) | | Verdict | (reserved) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
| | | |
| | | |
| SHA-256 Fingerprint | | SHA-256 Fingerprint |
| | | |
| | | |
| | | |
skipping to change at page 26, line 32 skipping to change at page 25, line 37
Verdict represents the numerical index of the trust verdict. Verdict represents the numerical index of the trust verdict.
(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.
8.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 peer nodes. It is therefore
therefore necessary that both the newly added node and an already necessary that both the newly added node and an already trusted node
trusted node perform such a ceremony to successfully introduce a node perform such a ceremony to successfully introduce a node into the
into the DNCP network. In all cases an administrator MUST be DNCP network. In all cases an administrator MUST be provided with
provided with external means to identify the node belonging to a external means to identify the node belonging to a certificate based
certificate based on its fingerprint and a meaningful common name. on its fingerprint and a meaningful common name.
8.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.
skipping to change at page 28, line 49 skipping to change at page 28, line 5
* DNCP_KEEPALIVE_INTERVAL: How often keep-alives are to be sent * DNCP_KEEPALIVE_INTERVAL: How often keep-alives are to 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. 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
reserved for fragment count in the node identifier.
10. Security Considerations 10. Security Considerations
DNCP-based protocols may use multicast to indicate DNCP state changes DNCP-based protocols may use multicast to indicate DNCP state changes
and for keep-alive purposes. However, no actual published data TLVs and for keep-alive purposes. However, no actual published data TLVs
will be sent across that channel. Therefore an attacker may only will be sent across that channel. Therefore an attacker may only
learn 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 MUST 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
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
skipping to change at page 29, line 46 skipping to change at page 28, line 46
2: Request node state 2: Request node state
3: Node endpoint 3: Node endpoint
4: Network state 4: Network state
5: Node state 5: Node state
6: Reserved (was: Custom) 6: Reserved (was: Custom)
7: Fragment count 7: Reserved (was: Fragment count)
8: Neighbor 8: Peer
9: Keep-alive interval 9: Keep-alive interval
10: Trust-Verdict 10: Trust-Verdict
32-191: Reserved for per-DNCP profile use 32-191: Reserved for per-DNCP profile use
192-255: Reserved for per-implementation experimentation. How 192-255: Reserved for per-implementation experimentation. How
collision is avoided is out of scope of this document. collision is avoided is out of scope of this document.
For the rest of the values (11-31, 256-65535), policy of 'standards For the rest of the values (11-31, 256-65535), policy of 'standards
skipping to change at page 30, line 28 skipping to change at page 29, line 28
[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.
[RFC6234] Eastlake, D. and T. Hansen, "US Secure Hash Algorithms
(SHA and SHA-based HMAC and HKDF)", RFC 6234, May 2011.
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
(SHA and SHA-based HMAC and HKDF)", RFC 6234, May 2011.
Appendix A. Alternative Modes of Operation Appendix A. Alternative Modes of Operation
Beyond what is described in the main text, the protocol allows for Beyond what is described in the main text, the protocol allows for
other uses. These are provided as examples. other uses. These are provided as examples.
A.1. Read-only Operation A.1. Read-only Operation
If a node uses just a single endpoint and does not need to publish 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 any TLVs, full DNCP node functionality is not required. Such limited
node can acquire and maintain view of the TLV space by implementing node can acquire and maintain view of the TLV space by implementing
skipping to change at page 31, line 22 skipping to change at page 30, line 22
Any tinkering with the TLVs would remove guarantees of this scheme Any tinkering with the TLVs would remove guarantees of this scheme
working; however passive monitoring would obviously be fine. This working; however passive monitoring would obviously be fine. This
type of simple forwarding cannot be chained, as it does not send type of simple forwarding cannot be chained, as it does not send
anything proactively. anything proactively.
Appendix B. Some Questions and Answers [RFC Editor: please remove] 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 peer if it was 16 bits (and less
less is not realistic). However, TLVs defined elsewhere would not is not realistic). However, TLVs defined elsewhere would not seem to
seem to even gain that much on average. 32 bits is also used for even gain that much on average. 32 bits is also used for ifindex in
ifindex in various operating systems, making for simpler 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 [RFC Editor: please remove] Appendix C. Changelog [RFC Editor: please remove]
draft-ietf-homenet-dncp-08:
o Removed fragmentation as it is somewhat underspecified and
unimplemented. It may be specified in some future extension draft
or new version of DNCP.
o Added generic sub-TLV extensibility mechanism.
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 33, line 20 skipping to change at page 32, line 26
Appendix D. 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 E. 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, Juliusz Chroboczek, Jiazi Yi, Mikael Abrahamsson, Brian Carpenter,
Thomas Clausen and DENG Hui for their contributions to the draft. Thomas Clausen, DENG Hui and Margaret Cullen for their contributions
to the draft.
Authors' Addresses Authors' Addresses
Markus Stenberg Markus Stenberg
Independent
Helsinki 00930 Helsinki 00930
Finland Finland
Email: markus.stenberg@iki.fi Email: markus.stenberg@iki.fi
Steven Barth Steven Barth
Independent
Halle 06114 Halle 06114
Germany Germany
Email: cyrus@openwrt.org Email: cyrus@openwrt.org
 End of changes. 91 change blocks. 
272 lines changed or deleted 245 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/