Homenet Working Group | M. Stenberg |
Internet-Draft | S. Barth |
Intended status: Standards Track | Independent |
Expires: February 7, 2016 | P. Pfister |
Cisco Systems | |
August 6, 2015 |
Home Networking Control Protocol
draft-ietf-homenet-hncp-08
This document describes the Home Networking Control Protocol (HNCP), an extensible configuration protocol and a set of requirements for home network devices. HNCP is described as a profile of and extension to the Distributed Node Consensus Protocol (DNCP). HNCP enables discovery of network borders, automated configuration of addresses, name resolution, service discovery, and the use of any routing protocol which supports routing based on both source and destination address.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on February 7, 2016.
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
HNCP is designed to facilitate sharing of state among home routers to fulfill the needs of the IPv6 homenet architecture [RFC7368], which assumes zero-configuration operation, multiple subnets, multiple home routers and (potentially) multiple upstream service providers providing (potentially) multiple prefixes to the home network. While RFC7368 sets no requirements for IPv4 support, HNCP aims to support dual-stack mode of operation, and therefore the functionality is designed with that in mind. The state is shared as TLVs among the routers (and potentially advanced hosts) to enable:
HNCP is a DNCP [I-D.ietf-homenet-dncp]-based protocol and includes a DNCP profile which defines transport and synchronization details for sharing state across nodes defined in Section 3. The rest of the document defines behavior of the services noted above, how the required TLVs are encoded [tlvs], as well as additional requirements on how HNCP nodes should behave [nodereq].
While HNCP does not deal with routing protocols directly (except potentially informing them about internal and external interfaces if classification specified in Section 5.3 is used), in homenet environments where multiple IPv6 source-prefixes can be present, routing based on source and destination address is necessary [RFC7368]. Ideally, the routing protocol is also zero-configuration (e.g., no need to configure identifiers or metrics) although HNCP can be used also with a manually configured routing protocol.
As HNCP uses DNCP as the actual state synchronization protocol, the applicability statement of DNCP can be used here as well; HNCP should not be used for any data that changes rapidly and constantly, and locators to find such services should be published using it instead. This is why the naming and service discovery [naming-sd] TLVs contain only DNS server addresses, and no actual per-name or per-service data of hosts.
HNCP TLVs specified within this document, in steady state, stay constant, with one exception: as Delegated Prefix TLVs [dp-tlv] do contain lifetimes, they force re-publishing of that data every time the valid or preferred lifetimes of prefixes are updated (significantly). Therefore, it is desirable for ISPs to provide large enough valid and preferred lifetimes to avoid unnecessary HNCP state churn in homes, but even given non-cooperating ISPs, the state churn is proportional only to the number of externally received delegated prefixes and not the home network size, and should therefore be relatively low.
HNCP assumes a certain level of control over host configuration servers (e.g., DHCP [RFC2131]) on links that are managed by its routers. Some HNCP functionality (such as border discovery or some aspects of naming) might be affected by existing DHCP servers not aware of the HNCP-managed network and thus might need to be reconfigured to not result in unexpected behavior.
While HNCP is designed to be used by (home) routers, it can also be used by advanced hosts that want to do, e.g., their own address assignment and routing.
HNCP is link layer agnostic; if a link supports IPv6 (link-local) multicast and unicast, HNCP will work on it. Trickle retransmissions and keep-alives will handle both packet loss and non-transitive connectivity, ensuring eventual convergence.
The following terms are used as they are defined in [I-D.ietf-homenet-prefix-assignment]:
The following terms are used as they are defined in [I-D.ietf-homenet-dncp]:
(HNCP) node | A device implementing this specification. |
(HNCP) router | A device implementing this specification, which forwards traffic on behalf of other devices. |
Border | separation point between administrative domains; in this case, between the home network and any other network, i.e., usually an ISP network. |
Internal link | a link that does not cross borders. |
Internal interface | an interface that is connected to an internal link. |
External interface | an interface that is connected to a link which is not an internal link. |
Interface category | a local configuration denoting the use of a particular interface. The interface category determines how a HNCP node should treat the particular interface. External and internal category mark the interface as out of or within the network border; there are also a number of sub-categories to internal that further affect local node behavior. See Section 5.1 for a list of interface categories and how they behave. The internal or external categories may also be auto-detected [bd]. |
Border router | a router announcing external connectivity and forwarding traffic across the network border. |
Common Link | a set of nodes on a link which share a common view of it, i.e., they see each other's traffic and the same set of hosts. Unless configured otherwise transitive connectivity is assumed. |
DHCPv4 | refers to Dynamic Host Configuration Protocol [RFC2131] in this document. |
DHCPv6 | refers to Dynamic Host Configuration Protocol for IPv6 (DHCPv6) [RFC3315] in this document. |
DHCP | refers to cases which apply to both DHCPv4 and DHCPv6 in this document. |
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].
The DNCP profile of HNCP is defined as follows:
Multiple versions of HNCP based on compatible DNCP profiles may be present in the same network when transitioning between HNCP versions and for troubleshooting purposes it might be beneficial to identify the HNCP agent version running. Therefore each node MUST include an HNCP-Version TLV [version] in its Node Data and MUST ignore (except for DNCP synchronization purposes) any TLVs with a type greater than 32 published by nodes not also publishing an HNCP-Version TLV or publishing such a TLV with a different Version.
HNCP routers may also have different capabilities regarding interactions with hosts, e.g., for configuration or service discovery. These are indicated by M, P, H and L values. The combined "capability value" is a metric indicated by interpreting the bits as an integer, i.e., (M << 12 | P << 8 | H << 4 | L). These values are used to elect certain servers on a Common Link, as described in Section 7. Nodes that are not routers MUST announce the value 0 for all capabilities and therefore do not take part in these elections.
HNCP specifies the following categories interfaces can be configured to be in:
Auto-detection of interface categories is possible based on interaction with DHCPv4 [RFC2131] and DHCPv6-PD [RFC3633] servers on connected links. HNCP defines special DHCP behavior to differentiate its internal servers from external ones in order to achieve this. Therefore all internal devices (including HNCP nodes) running DHCP servers on links where auto-detection is used by any HNCP node MUST use the following mechanism based on The User Class Option for DHCPv4 [RFC3004] and its DHCPv6 counterpart [RFC3315]:
Not following this rule (e.g., running unmodified DHCP servers) might lead to false positives when auto-detection is used, i.e., HNCP nodes assume an interface to not be internal, even though it was intended to be.
This section defines the interface classification algorithm. It is suitable for both IPv4 and IPv6 (single or dual-stack) and detects the category of an interface either automatically or based on a fixed configuration. By determining the category for all interfaces, the network borders are implicitly defined, i.e., all interfaces not belonging to the External category are considered to be within the borders of the network, all others are not.
The following algorithm MUST be implemented by any node implementing HNCP. However, if the node does not implement auto-detection, only the first step is required. The algorithm works as follows, with evaluation stopping at first match:
Note that as other HNCP nodes will ignore the client due to the user class option, any server that replies is clearly external (or a malicious internal node).
An HNCP router SHOULD allow setting the fixed category for each interface which may be connected to either an internal or external device (e.g., an Ethernet port that can be connected to a modem, another HNCP router or a client).
An HNCP router using auto-detection on an interface MUST run the appropriately configured DHCP clients as long as the interface without a fixed category is active (including states where auto-detection considers it to be internal) and rerun the algorithm above to react to conditions resulting in a different interface category. The router SHOULD wait for a reasonable time period (5 seconds as a default), during which the DHCP clients can acquire a lease, before treating a newly activated or previously external interface as internal.
This section specifies how HNCP nodes configure host and node addresses. At first border routers share information obtained from service providers or local configuration by publishing one or more External Connection TLVs [ec-tlv]. These contain other TLVs such as Delegated Prefix TLVs [dp-tlv] which are then used for prefix assignment. Finally, HNCP nodes obtain addresses either statelessly or using a specific stateful mechanism [node-addr]. Hosts and non-HNCP routers are configured using SLAAC, DHCP or DHCPv6-PD.
HNCP uses the concept of Common Link both in autonomic address configuration and naming and service discovery [naming-sd]. A Common Link refers to the set of interfaces of nodes that see each other's traffic and presumably also the traffic of all hosts that may use the nodes to, e.g., forward traffic. Common Links are used, e.g., to determine where prefixes should be assigned or which peers participate in the election of a DHCP server. The Common Link is computed separately for each local internal interface, and it always contains the local interface. Additionally, if the local interface is not set to ad-hoc category (see Section 5.1), it also contains the set of interfaces that are bidirectionally reachable from the given local interface, that is, every remote interface of a remote node meeting all of the following requirements:
A node MUST be able to detect whether two of its local internal interfaces are connected, e.g., by detecting an identical remote interface being part of the Common Links of both local interfaces.
Each HNCP router MAY obtain external connection information such as address prefixes, DNS server addresses and DNS search paths from one or more sources, e.g., DHCPv6-PD [RFC3633], NETCONF [RFC6241] or static configuration. Each individual external connection to be shared in the network is represented by one External Connection TLV [ec-tlv].
Announcements of individual external connections may consist of the following components:
Whenever information about reserved parts (e.g., as specified in [RFC6603]) is received for a delegated prefix, the reserved parts MUST be advertised using Assigned Prefix TLVs [ap-tlv] with the highest priority (i.e., 15), as if they were assigned to a Private Link.
Some connections or delegated prefixes may have a special meaning and are not regularly used for internal or internet connectivity, instead they may provide access to special services like VPNs, sensor networks, VoIP, IPTV, etc. Care must be taken that these prefixes are properly integrated and dealt with in the network, in order to avoid breaking connectivity for devices who are not aware of their special characteristics or to only selectively allow certain devices to use them. Such prefixes are distinguished using Prefix Policy TLVs [pp-tlv]. Their contents MAY be partly opaque to HNCP nodes, and their identification and usage depends on local policy. However the following general rules MUST be adhered to:
HNCP uses the Prefix Assignment Algorithm [I-D.ietf-homenet-prefix-assignment] in order to assign prefixes to HNCP internal links and uses some of the terminology [terminology] defined there. HNCP furthermore defines the Assigned Prefix TLV [ap-tlv] which MUST be used to announce Published Assigned Prefixes.
All HNCP nodes running the prefix assignment algorithm use the following values for its parameters:
Advertised Prefixes as well as their associated priorities and associated Shared Links MUST be updated as Assigned Prefix TLVs are added, updated or removed, and as Common Links are modified.
Whenever the prefix assignment algorithm subroutine (Section 4.1 of [I-D.ietf-homenet-prefix-assignment]) is run on a Common Link and whenever a new prefix may be assigned (case 1 of the subroutine: no Best Assignment and no Current Assignment), the decision of whether the assignment of a new prefix is desired MUST follow these rules in order:
If the considered delegated prefix is an IPv6 prefix, and whenever there is at least one available prefix of length 64, a prefix of length 64 MUST be selected unless configured otherwise. In case no prefix of length 64 would be available, a longer prefix MAY be selected even without configuration.
If the considered delegated prefix is an IPv4 prefix (Section 6.5 details how IPv4 delegated prefixes are generated), a prefix of length 24 SHOULD be preferred.
In any case, an HNCP router making an assignment MUST support a mechanism suitable to distribute addresses from the considered prefix if the link is intended to be used by clients. In this case a router assigning an IPv4 prefix MUST announce the L-capability and a router assigning an IPv6 prefix with a length greater than 64 MUST announce the H-capability as defined in Section 4.
The prefix assignment algorithm indicates when a prefix is applied to the respective Common Link. When that happens each router connected to said link:
When an HNCP router announcing the P-Capability [versioning] receives a DHCPv6-PD request from a client, it SHOULD assign one prefix per delegated prefix in the network. This set of assigned prefixes is then delegated to the client, after it has been applied as described in the prefix assignment algorithm. Each DHCPv6-PD client MUST be considered as an independent Private Link and delegation MUST be based on the same set of Delegated Prefixes as the one used for Common Link prefix assignments, however the prefix length to be delegated MAY be smaller than 64.
The assigned prefixes MUST NOT be given to DHCPv6-PD clients before they are applied, and MUST be withdrawn whenever they are destroyed. As an exception to this rule, in order to shorten delays of processed requests, a router MAY prematurely give out a prefix which is advertised but not yet applied if it does so with a valid lifetime of not more than 30 seconds and ensures removal or correction of lifetimes as soon as possible.
This section specifies how HNCP nodes reserve addresses for their own use. Nodes MAY, at any time, try to reserve a new address from any Applied Assigned Prefix. Each HNCP node SHOULD announce an IPv6 address and - if it supports IPv4 - MUST announce an IPv4 address, whenever matching prefixes are assigned to at least one of its Common Links. These addresses are published using Node Address TLVs and used to locally reach HNCP nodes for other services. Nodes SHOULD NOT create and announce more than one assignment per IP version to avoid cluttering the node data with redundant information unless a special use case requires it.
Stateless assignment based on Semantically Opaque Interface Identifiers [RFC7217] SHOULD be used for address assignment whenever possible (e.g., the prefix length is 64), otherwise (e.g., for IPv4 if supported) the following method MUST be used instead: For any assigned prefix for which stateless assignment is not used, the first quarter of the addresses are reserved for HNCP based address assignments, whereas the last three quarters are left to the DHCP elected router (Section 4 specifies the DHCP server election process). For example, if the prefix 192.0.2.0/24 is assigned and applied to a Common Link, addresses included in 192.0.2.0/26 are reserved for HNCP nodes and the remaining addresses are reserved for the elected DHCPv4 server.
HNCP nodes assign themselves addresses, and then (to ensure eventual lack of conflicting assignments) publish the assignments using the Node Address TLV [node-address].
The process of obtaining addresses is specified as follows:
HNCP routers can create a ULA or private IPv4 prefix to enable connectivity between local devices. These prefixes are inserted in HNCP as if they were delegated prefixes of a (virtual) external connection [ec]. The following rules apply:
Creation of such ULA and IPv4 prefixes MUST be delayed by a random timespan between 0 and 10 seconds in which the router MUST scan for others trying to do the same.
When a new ULA prefix is created, the prefix is selected based on the configuration, using the last non-deprecated ULA prefix, or generated based on [RFC4193].
HNCP routers need to ensure that hosts and non-HNCP downstream routers on internal links are configured with addresses and routes. Since DHCP clients can usually only bind to one server at a time, a per-link and per-service election takes place.
HNCP routers may have different capabilities for configuring downstream devices and providing naming services. Each router MUST therefore indicate its capabilities as specified in Section 4 in order to participate as a candidate in the election.
In general Stateless Address Autoconfiguration is used for client configuration for its low overhead and fast renumbering capabilities, however stateful DHCPv6 can be used in addition by administrative choice, to, e.g., collect hostnames and use them to provide naming services or whenever stateless configuration is not applicable.
The designated stateful DHCPv6 server for a Common Link [links] is elected based on the capabilities described in Section 4. The winner is the router (connected to the Common Link) advertising the greatest H-capability. In case of a tie, Capability Values are compared, and router with the greatest value is elected. In case of another tie, the router with the highest node identifier is elected among the routers with tied Capability Values.
The elected router MUST serve stateful DHCPv6 and SHOULD provide naming services for acquired hostnames as outlined in Section 8. Stateful addresses SHOULD be assigned in a way not hindering fast renumbering even if the DHCPv6 server or client do not support the DHCPv6 reconfigure mechanism. In case no router was elected, stateful DHCPv6 is not provided.
The designated DHCPv6 server for prefix-delegation on a Common Link is elected based on the capabilities described in Section 4. The winner is the router (connected to the Common Link) advertising the greatest P-capability. In case of a tie, Capability Values are compared, and router with the greatest value is elected. In case of another tie, the router with the highest node identifier is elected among the routers with tied Capability Values.
The elected router MUST provide prefix-delegation services [RFC3633] on the given link and follow the rules in Section 6.3.4.
The designated DHCPv4 server on a Common Link [links] is elected based on the capabilities described in Section 4. The winner is the router (connected to the Common Link) advertising the greatest L-capability. In case of a tie, Capability Values are compared, and router with the greatest value is elected. In case of another tie, the router with the highest node identifier is elected among the routers with tied Capability Values.
The elected router MUST provide DHCPv4 services on the given link. It MUST announce itself as router [RFC2132] to clients if and only if there is an IPv4 default route known in the network. If there is no default route, the elected router MUST announce a Classless Static Route Option [RFC3442] for the IPv4 prefix announced in the Delegated Prefix TLV and MAY announce such an option for known reachable IPv4 destinations not within any local delegated prefix.
DHCPv4 lease times SHOULD be short (i.e., not longer than 5 minutes) in order to provide reasonable response times to changes.
The designated MDNS [RFC6762] proxy on a Common Link is elected based on the capabilities described in Section 4. The winner is the router (connected to the Common Link) advertising the greatest M-capability. In case of a tie, Capability Values are compared, and router with the greatest value is elected. In case of another tie, the router with the highest node identifier is elected among the routers with tied Capability Values.
The elected router MUST provide an MDNS-proxy on the given link and announce it as described in Section 8.
Network-wide naming and service discovery can greatly improve the user-friendliness of a network. The following mechanism provides means to setup and delegate naming and service discovery across multiple HNCP routers.
Each HNCP router SHOULD provide a recursive name resolution server which honors the announcements made in Delegated Zone TLVs [delegated-zone-tlv], Domain Name TLVs [domain-name-tlv] and Node Name TLVs [node-name-tlv], i.e., delegate queries to the designated name servers and hand out appropriate A, AAAA and PTR records according to the mentioned TLVs.
Each HNCP router SHOULD provide and announce an auto-generated or user-configured name for each internal Common Link [links] for which it is the designated DHCPv4, stateful DHCPv6 server, MDNS proxy, or for which it provides forward or reverse DNS services on behalf of connected devices. This announcement is done using Delegated Zone TLVs [delegated-zone-tlv] and MUST be unique in the whole network. In case of a conflict the announcement of the node with the highest node identifier takes precedence and all other nodes MUST cease to announce the conflicting TLV. HNCP routers providing name resolving services MUST use the included DNS server address within the TLV to resolve names belonging to the zone as if there was an NS record.
Each HNCP node SHOULD announce a node name for itself to be easily reachable and MAY do so on behalf of other devices. Announcements are made using Node Name TLVs [node-name-tlv] and MUST be unique in the whole network. In case of a conflict the announcement of the node with the highest node identifier takes precedence and all other nodes MUST cease to announce the conflicting TLV. HNCP routers providing name resolving services MUST resolve these names to their respective IP addresses as if there were corresponding A/AAAA records.
Names and unqualified zones are used in an HNCP network to provide naming and service discovery with local significance. A network-wide zone is appended to all single labels or unqualified zones in order to qualify them. ".home" is the default, however an administrator MAY configure announcing of a Domain Name TLV [domain-name-tlv] for the network to use a different one. In case multiple are announced, the domain of the node with the greatest node identifier takes precedence.
Pre-shared keys (PSKs) are often required to secure (for example) IGPs and other protocols which lack support for asymmetric security. The following mechanism manages PSKs using HNCP to enable bootstrapping of such third-party protocols. The scheme SHOULD be used only in conjunction with secured HNCP unicast transport (=DTLS), as transferring the PSK in plain-text anywhere in the network is a potential risk, especially as the originator may not know about security (and use of DNCP security) on all links. The following rules define how such a PSK is managed and used:
PSKs for individual protocols SHOULD be derived from the random PSK using a suitable one-way hashing algorithm (e.g., by using HMAC-SHA256 [RFC6234] with a per-protocol HMAC-key) so that disclosure of any derived key does not impact other users of the managed PSK. Furthermore derived PSKs MUST be updated whenever the managed PSK changes.
HNCP defines the following TLVs in addition to those defined by DNCP. The same general rules and defaults for encoding as noted in Section 7 of [I-D.ietf-homenet-dncp] apply.
TLVs defined here are only valid when appearing in their designated context, i.e., only directly within container TLVs mentioned in their definition, or - absent any mentions - only as top-level TLVs within the node data set. TLVs appearing outside their designated context MUST be ignored.
Unless specified otherwise, TLVs encoding IP addresses or prefixes allow encoding both IPv6 and IPv4 addresses and prefixes. IPv6 information is encoded as is, whereas for IPv4 IPv4-mapped IPv6 addresses format [RFC4291] is used and prefix lengths are encoded as original IPv4 prefix length increased by 96.
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: HNCP-VERSION (32) | Length: >= 5 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | Reserved | M | P | H | L | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | User-agent |
This TLV is used to indicate the supported version and router capabilities of an HNCP node as described in Section 4.
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: EXTERNAL-CONNECTION (33)| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Nested TLVs |
An External Connection TLV is a container TLV used to gather network configuration information associated with a single external connection [ec] to be shared across the HNCP network. A node MAY publish an arbitrary number of instances of this TLV to share the desired number of external connections.
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: DELEGATED-PREFIX (34) | Length: >= 9 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Valid Lifetime Since Origination | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Preferred Lifetime Since Origination | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | | +-+-+-+-+-+-+-+-+ Prefix [+ nested TLVs] + | |
The Delegated Prefix TLV is used by HNCP routers to advertise prefixes which are allocated to the whole network and can be used for prefix assignment. Delegated Prefix TLVs are only valid inside External Connection TLVs and their prefixes MUST NOT overlap with those of other such TLVs in the same container.
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: PREFIX-POLICY (43) | Length: >= 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Policy Type | | +-+-+-+-+-+-+-+-+ Value + | |
The Prefix Policy TLV contains information about the policy or applicability of a delegated prefix. This information can be used to determine whether prefixes for a certain usecase (e.g., local reachability, internet connectivity) do exist or should be acquired and to make decisions about assigning prefixes to certain links or to fine-tune border firewalls. See Section 6.2 for a more in-depth discussion. This TLV is only valid inside a Delegated Prefix 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: DHCPV6-DATA (37) | Length: > 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DHCPv6 option stream |
This TLV is used to encode auxiliary IPv6 configuration information (e.g., recursive DNS servers) encoded as a stream of DHCPv6 options. It is only valid in an External Connection TLV or a Delegated Prefix TLV encoding an IPv6 prefix and MUST NOT occur more than once in any single container. When included in an External Connection TLV, it contains DHCPv6 options relevant to the External Connection as a whole. When included in a Delegated Prefix, it contains options mandatory to handle said prefix.
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: DHCPV4-DATA (38) | Length: > 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DHCPv4 option stream |
This TLV is used to encode auxiliary IPv4 configuration information (e.g., recursive DNS servers) encoded as a stream of DHCPv4 options. It is only valid in an External Connection TLV and MUST NOT occur more than once in any single container. It contains DHCPv4 options relevant to the External Connection as a whole.
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: ASSIGNED-PREFIX (35) | Length: >= 6 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Endpoint Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Rsv. | Prty. | Prefix Length | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Prefix + | |
This TLV is used to announce Published Assigned Prefixes for the purposes of prefix assignment [pa].
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: NODE-ADDRESS (36) | Length: 20 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Endpoint Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | IP Address | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV is used to announce addresses assigned to an HNCP node as described in Section 6.4.
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: DNS-DELEGATED-ZONE (39) | Length: >= 17 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | IP Address | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Reserved |L|B|S| | +-+-+-+-+-+-+-+-+ Zone (DNS label sequence - variable length) | | |
This TLV is used to announce a forward or reverse DNS zone delegation in the HNCP network. Its meaning is roughly equivalent to specifying an NS and A/AAAA record for said zone. Details are specified in Section 8.
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: DOMAIN-NAME (40) | Length: > 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Domain (DNS label sequence - variable length) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV is used to indicate the base domain name for the network as specified in Section 8. This TLV MUST NOT be announced unless the domain name was explicitly configured by an administrator.
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: NODE-NAME (41) | Length: > 16 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | IP Address | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Name (not null-terminated - variable length) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV is used to assign the name of a node in the network to a certain IP address as specified in Section 8.
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: MANAGED-PSK (42) | Length: 32 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | Random 256-bit PSK | | | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This TLV is used to announce a PSK for securing third-party protocols exclusively supporting symmetric cryptography as specified in Section 9.
Each node implementing HNCP is subject to the following requirements:
If the node is acting as a router, then the following requirements apply in addition:
HNCP enables self-configuring networks, requiring as little user intervention as possible. However this zero-configuration goal usually conflicts with security goals and introduces a number of threats.
General security issues for existing home networks are discussed in [RFC7368]. The protocols used to set up addresses and routes in such networks to this day rarely have security enabled within the configuration protocol itself. However these issues are out of scope for the security of HNCP itself.
HNCP is a DNCP-based state synchronization mechanism carrying information with varying threat potential. For this consideration the payloads defined in DNCP and this document are reviewed:
As described in Section 5.3, an HNCP node determines the internal or external state on a per-interface basis. A firewall perimeter is set up for the external interfaces, and for internal interfaces, HNCP traffic is allowed, with the exception of leaf and guest sub-categories.
Threats concerning automatic interface classification cannot be mitigated by encrypting or authenticating HNCP traffic itself since external routers do not participate in the protocol and often cannot be authenticated by other means. These threats include propagation of forged uplinks in the homenet in order to, e.g., redirect traffic destined to external locations and forged internal status by external routers to, e.g., circumvent the perimeter firewall.
It is therefore imperative to either secure individual links on the physical or link-layer or preconfigure the adjacent interfaces of HNCP routers to an appropriate fixed category in order to secure the homenet border. Depending on the security of the external link eavesdropping, man-in-the-middle and similar attacks on external traffic can still happen between a homenet border router and the ISP, however these cannot be mitigated from inside the homenet. For example, DHCPv4 has defined [RFC3118] to authenticate DHCPv4 messages, but this is very rarely implemented in large or small networks. Further, while PPP can provide secure authentication of both sides of a point to point link, it is most often deployed with one-way authentication of the subscriber to the ISP, not the ISP to the subscriber.
Once the homenet border has been established there are several ways to secure HNCP against internal threats like manipulation or eavesdropping by compromised devices on a link which is enabled for HNCP traffic. If left unsecured, attackers may perform arbitrary eavesdropping, spoofing or denial of service attacks on HNCP services such as address assignment or service discovery.
Detailed interface categories like "leaf" or "guest" can be used to integrate not fully trusted devices to various degrees into the homenet by not exposing them to HNCP traffic or by using firewall rules to prevent them from reaching homenet-internal resources.
On links where this is not practical and lower layers do not provide adequate protection from attackers, DNCP secure mode MUST be used to secure traffic.
IGPs and other protocols are usually run alongside HNCP therefore the individual security aspects of the respective protocols must be considered. It can however be summarized that many protocols to be run in the home (like IGPs) provide - to a certain extent - similar security mechanisms. Most of these protocols do not support encryption and only support authentication based on pre-shared keys natively. This influences the effectiveness of any encryption-based security mechanism deployed by HNCP as homenet routing information is thus usually not encrypted.
IANA should set up a registry for the (decimal values within range 0-1023) "HNCP DNCP-profile TLV Types" under "Distributed Node Consensus Protocol (DNCP)", with the following initial contents: [TO BE REMOVED BY RFC-EDITOR: Ideally as http://www.iana.org/assignments/hncp-registry]
HNCP requires allocation of UDP port numbers HNCP-UDP-PORT and HNCP-DTLS-PORT, as well as an IPv6 link-local multicast address All-Homenet-Nodes.
[I-D.ietf-homenet-dncp] | Stenberg, M. and S. Barth, "Distributed Node Consensus Protocol", Internet-Draft draft-ietf-homenet-dncp-09, August 2015. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC6347] | Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, January 2012. |
[RFC6603] | Korhonen, J., Savolainen, T., Krishnan, S. and O. Troan, "Prefix Exclude Option for DHCPv6-based Prefix Delegation", RFC 6603, DOI 10.17487/RFC6603, May 2012. |
[I-D.ietf-homenet-prefix-assignment] | Pfister, P., Paterson, B. and J. Arkko, "Distributed Prefix Assignment Algorithm", Internet-Draft draft-ietf-homenet-prefix-assignment-07, June 2015. |
draft-ietf-homenet-hncp-08: Editorial reorganization.
draft-ietf-homenet-hncp-07: Using version 1 instead of version 0, as existing implementations already use it.
draft-ietf-homenet-hncp-06: Various edits based on feedback, hopefully without functional delta.
draft-ietf-homenet-hncp-05: Renamed "Adjacent Link" to "Common Link". Changed single IPv4 uplink election from MUST to MAY. Added explicit indication to distinguish (IPv4)-PDs for local connectivity and ones with uplink connectivity allowing, e.g., better local-only IPv4-connectivity.
draft-ietf-homenet-hncp-04: Change the responsibility for sending RAs to the router assigning the prefix.
draft-ietf-homenet-hncp-03: Split to DNCP (generic protocol) and HNCP (homenet profile).
draft-ietf-homenet-hncp-02: Removed any built-in security. Relying on IPsec. Reorganized interface categories, added requirements languages, made manual border configuration a MUST-support. Redesigned routing protocol election to consider non-router devices.
draft-ietf-homenet-hncp-01: Added (MAY) guest, ad-hoc, hybrid categories for interfaces. Removed old hnetv2 reference, and now pointing just to OpenWrt + github. Fixed synchronization algorithm to spread also same update number, but different data hash case. Made purge step require bidirectional connectivity between nodes when traversing the graph. Edited few other things to be hopefully slightly clearer without changing their meaning.
draft-ietf-homenet-hncp-00: Added version TLV to allow for TLV content changes pre-RFC without changing IDs. Added link id to assigned address TLV.
This draft is available at https://github.com/fingon/ietf-drafts/ in source format. Issues and pull requests are welcome.
A GPLv2-licensed implementation of HNCP is currently under development at https://github.com/sbyx/hnetd/ and binaries are available in the OpenWrt package repositories. See <http://www.homewrt.org/doku.php?id=run-conf> for more information. Feedback and contributions are welcome.
Thanks to Ole Troan, Mark Baugher, Mark Townsley, Juliusz Chroboczek and Thomas Clausen for their contributions to the draft.
Thanks to Eric Kline for the original border discovery work.