idnits 2.17.1 draft-stenberg-homenet-hncp-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (February 05, 2014) is 3731 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 120 -- Looks like a reference, but probably isn't: '2' on line 125 -- Looks like a reference, but probably isn't: '3' on line 1196 == Unused Reference: 'I-D.arkko-homenet-prefix-assignment' is defined on line 1111, but no explicit reference was found in the text == Unused Reference: 'I-D.stenberg-homenet-dnssdext-hybrid-proxy-ospf' is defined on line 1116, but no explicit reference was found in the text == Outdated reference: A later version (-02) exists of draft-pfister-homenet-prefix-assignment-00 == Outdated reference: A later version (-02) exists of draft-pfister-homenet-prefix-assignment-00 -- Duplicate reference: draft-pfister-homenet-prefix-assignment, mentioned in 'I-D.stenberg-homenet-dnssd-hybrid-proxy-network-zeroconf', was also mentioned in 'I-D.pfister-homenet-prefix-assignment'. -- Obsolete informational reference (is this intentional?): RFC 3315 (Obsoleted by RFC 8415) -- Obsolete informational reference (is this intentional?): RFC 3633 (Obsoleted by RFC 8415) -- Obsolete informational reference (is this intentional?): RFC 1597 (Obsoleted by RFC 1918) == Outdated reference: A later version (-17) exists of draft-ietf-homenet-arch-11 == Outdated reference: A later version (-02) exists of draft-behringer-homenet-trust-bootstrap-00 == Outdated reference: A later version (-02) exists of draft-baker-rtgwg-src-dst-routing-use-cases-00 Summary: 0 errors (**), 0 flaws (~~), 9 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Stenberg 3 Internet-Draft 4 Intended status: Standards Track S. Barth 5 Expires: August 09, 2014 6 February 05, 2014 8 Home Networking Control Protocol 9 draft-stenberg-homenet-hncp-00 11 Abstract 13 This document describes the HomeNet Control Protocol (HNCP), a 14 minimalist state synchronization protocol for Homenet routers. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at http://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on August 09, 2014. 33 Copyright Notice 35 Copyright (c) 2014 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (http://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 51 2. Requirements language . . . . . . . . . . . . . . . . . . . . 3 52 3. Data model . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 4. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 4 54 4.1. Trickle-Driven Status Updates . . . . . . . . . . . . . . 4 55 4.2. Protocol Messages . . . . . . . . . . . . . . . . . . . . 5 56 4.2.1. Network State Update (NetState) . . . . . . . . . . . 5 57 4.2.2. Network State Request, (NetState-Req) . . . . . . . . 5 58 4.2.3. Node Data Request (Node-Req) . . . . . . . . . . . . 6 59 4.2.4. Network and Node State Reply (NetNode-Reply) . . . . 6 60 4.3. HNCP Protocol Message Processing . . . . . . . . . . . . 6 61 4.4. Adding and Removing Neighbors . . . . . . . . . . . . . . 8 62 4.5. Purging Unreachable Nodes . . . . . . . . . . . . . . . . 8 63 5. Type-Length-Value objects . . . . . . . . . . . . . . . . . . 8 64 5.1. Request TLVs (for use within unicast requests) . . . . . 9 65 5.1.1. Request Network State TLV . . . . . . . . . . . . . . 9 66 5.1.2. Request Node Data TLV . . . . . . . . . . . . . . . . 9 67 5.2. Data TLVs (for use in both multi- and unicast data) . . . 10 68 5.2.1. Node Link TLV . . . . . . . . . . . . . . . . . . . . 10 69 5.2.2. Network State TLV . . . . . . . . . . . . . . . . . . 10 70 5.2.3. Node State TLV . . . . . . . . . . . . . . . . . . . 10 71 5.2.4. Node Data TLV . . . . . . . . . . . . . . . . . . . . 11 72 5.2.5. Node Public Key TLV (within 73 Node Data TLV) . . . . . . . . . . . . . . . . . . . 11 74 5.2.6. Neighbor TLV (within Node Data TLV) . . . . . . . . . 12 75 5.3. Custom TLV (within/without Node Data TLV) . . . . . . . . 12 76 5.4. Authentication TLVs . . . . . . . . . . . . . . . . . . . 13 77 5.4.1. Certificate-related TLVs . . . . . . . . . . . . . . 13 78 5.4.2. Signature TLV . . . . . . . . . . . . . . . . . . . . 13 79 6. Border Discovery and Prefix Assignment . . . . . . . . . . . 13 80 7. DNS-based Service Discovery . . . . . . . . . . . . . . . . . 17 81 7.1. DNS Delegated Zone TLV . . . . . . . . . . . . . . . . . 18 82 7.2. Domain Name TLV . . . . . . . . . . . . . . . . . . . . . 18 83 7.3. Router Name TLV . . . . . . . . . . . . . . . . . . . . . 18 84 8. Routing support . . . . . . . . . . . . . . . . . . . . . . . 18 85 8.1. Protocol Requirements . . . . . . . . . . . . . . . . . . 18 86 8.2. Announcement . . . . . . . . . . . . . . . . . . . . . . 19 87 8.3. Protocol Selection . . . . . . . . . . . . . . . . . . . 20 88 8.4. Fallback Mechanism . . . . . . . . . . . . . . . . . . . 20 89 9. Security Considerations . . . . . . . . . . . . . . . . . . . 21 90 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 91 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 92 11.1. Normative references . . . . . . . . . . . . . . . . . . 23 93 11.2. Informative references . . . . . . . . . . . . . . . . . 23 94 Appendix A. Some Outstanding Issues . . . . . . . . . . . . . . 25 95 Appendix B. Some Obvious Questions and Answers . . . . . . . . . 25 96 Appendix C. Draft source . . . . . . . . . . . . . . . . . . . . 26 97 Appendix D. Acknowledgements . . . . . . . . . . . . . . . . . . 26 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27 100 1. Introduction 102 HNCP is designed to synchronize state across a Homenet (or other 103 small site) in order to facilitate automated configuration within the 104 site, integration with trusted bootstrapping 105 [I-D.behringer-homenet-trust-bootstrap] and default perimeter 106 detection [I-D.kline-homenet-default-perimeter], automatic IP prefix 107 distribution [I-D.pfister-homenet-prefix-assignment], and service 108 discovery across multiple links within the homenet as defined in 109 [I-D.stenberg-homenet-dnssd-hybrid-proxy-network-zeroconf]. 111 HNCP is designed to provide enough information for a routing protocol 112 to operate without homenet-specific extensions. In homenet 113 environments where multiple IPv6 prefixes are present, routing based 114 on source and destination address is necessary 115 [I-D.troan-homenet-sadr]. Routing protocol requirements for source 116 and destination routing are described in section 3 of 117 [I-D.baker-rtgwg-src-dst-routing-use-cases]. 119 A GPLv2-licensed implementation of the HNCP protocol is currently 120 under development at https://github.com/sbyx/hnetd/ [1]. Comments 121 and/or pull requests are welcome. 123 An earlier implementation using many of the same principles, 124 algorithms and data structures built within OSPFv3 is available at 125 http://www.homewrt.org/doku.php?id=downloads [2]. 127 2. Requirements language 129 In this document, the key words "MAY", "MUST, "MUST NOT", "OPTIONAL", 130 "RECOMMENDED", "SHOULD", and "SHOULD NOT", are to be interpreted as 131 described in [RFC2119]. 133 3. Data model 135 The data model of the HNCP protocol is simple: Every participating 136 node has (and also knows for every other participating node): 138 A unique node identifier. It may be a public key, unique hardware 139 ID, or some other unique blob of binary data which HNCP can run a 140 hash upon to obtain a node identifer that is very likely unique 141 among the set of routers in the Homenet. 143 A set of Type-Length-Value (TLV) data it wants to share with other 144 routers. The set of TLVs have a well-defined order based on 145 ascending binary content that is used to quickly identify changes 146 in the set as they occur. 148 Latest update sequence number. A four octet number that is 149 incremented anytime TLV data changes are detected. 151 Relative time, in milliseconds, since last publishing of the 152 current TLV data set. 154 If HNCP security is enabled, each node will have a public/private key 155 pair defined. The private key is used to create signatures for 156 messages and node state updates and never sent across the network by 157 HNCP. The public key is used to verify signatures of messages and 158 node state updates. 160 4. Operation 162 HNCP is designed to run on UDP port IANA-UDP-PORT, using both link- 163 local scoped IPv6 unicast and link-local scoped IPv6 multicast 164 messages to address IANA-MULTICAST-ADDRESS for transport. The 165 protocol consists of Trickle [RFC6206] driven multicast status 166 messages to indicate changes in shared TLV data, and unicast state 167 synchronization message exchanges when the Trickle state is found to 168 be inconsistent. 170 4.1. Trickle-Driven Status Updates 172 Each node MUST send link-local multicast NetState Messages 173 (Section 4.2.1) each time the Trickle algorithm [RFC6206] indicates 174 they should on each link the protocol is active on. When the locally 175 stored network state hash changes (either by a local node event that 176 affects the TLV data, or upon receipt of more recent data from 177 another node), all Trickle instances MUST be reset. Trickle state 178 MUST be maintained separately for each link. 180 Trickle algorithm has 3 parameters; Imin, Imax and k. Imin and Imax 181 represent minimum and maximum values for I, which is the time 182 interval during which at least k Trickle updates must be seen on a 183 link to prevent local state transmission. Bounds for recommended 184 Trickle values are described below. 186 k=1 SHOULD be used, as given the timer reset on data updates, 187 retransmissions should handle packet loss. 189 Imax MUST be at least one minute. 191 Imin MUST be at least 200 milliseconds (earliest transmissions may 192 occur at Imin/2 = 100 milliseconds given minimum values as per the 193 Trickle algorithm). 195 4.2. Protocol Messages 197 Protocol messages are encoded as purely as a sequence of TLV objects 198 (Section 5). This section describes which set of TLVs MUST or MAY be 199 present in a given message. 201 In order to facilitate fast comparing of local state with that in a 202 received message update, all TLVs in every encoding scope (either 203 root level, within the message itself, or within a container TLV) 204 MUST be placed in ascending order based on the binary comparison of 205 both TLV header and value. By design, the TLVs which MUST be present 206 have the lowest available type values, ensuring they will naturally 207 occur at the start of the Protocol Message, resembling a fixed format 208 preamble. 210 4.2.1. Network State Update (NetState) 212 This Message SHOULD be sent as a multicast message. 214 The following TLVs MUST be present at the start of the message: 216 Node Link TLV (Section 5.2.1). 218 Network State TLV (Section 5.2.2). 220 The NetState Message MAY contain Node State TLV(s) (Section 5.2.3). 221 If so, either all Node State TLVs are included (referred to as a 222 "long" NetState Message), or none are included (refered to as a 223 "short" NetState Message). The NetState Message MUST NOT contain 224 only a portion of Node State TLVs as this could cause problems with 225 the Protocol Message Processing (Section 4.3) algorithm. Finally, if 226 the long version of the NetState message would exceed the minimum 227 IPv6 MTU when sent, the short version of the NetState message MUST be 228 used instead. 230 If HNCP security is enabled, authentication TLVs (Section 5.4) MUST 231 be present. 233 4.2.2. Network State Request, (NetState-Req) 235 This Message MUST be sent as a unicast message. 237 The following TLVs MUST be present at the start of the message: 239 Node Link TLV (Section 5.2.1). 241 Request Network State TLV (Section 5.1.1). 243 If HNCP security is enabled, authentication TLVs (Section 5.4) MUST 244 be present. 246 4.2.3. Node Data Request (Node-Req) 248 This Message MUST be sent as a unicast message. 250 MUST be present: 252 Node Link TLV (Section 5.2.1). 254 one or more Request Node Data TLVs (Section 5.1.2). 256 If HNCP security is enabled, authentication TLVs (Section 5.4) MUST 257 be present. 259 4.2.4. Network and Node State Reply (NetNode-Reply) 261 This Message MUST be sent as a unicast message. 263 MUST be present: 265 Node Link TLV (Section 5.2.1). 267 Network State TLV (Section 5.2.2) and Node State TLV 268 (Section 5.2.3) for every known node by the sender, or 270 one or more combinations of Node State and Node Data TLVs 271 (Section 5.2.4). 273 If HNCP security is enabled, authentication TLVs (Section 5.4) MUST 274 be present. 276 4.3. HNCP Protocol Message Processing 278 The majority of status updates among known nodes are handled via the 279 Trickle-Driven updates (Section 4.1). This section describes 280 processing of messages as received, along with associated actions or 281 responses. 283 HNCP is designed to operate between directly connected neighbors on a 284 shared link using link-local IPv6 addresses. If the source address 285 of a received HNCP packet is not an IPv6 link-local unicast address, 286 the packet SHOULD be dropped. Similarly, if the destination address 287 is not IPv6 link-local unicast or IPv6 link-local multicast address, 288 packet SHOULD be dropped. 290 Upon receipt of: 292 NetState Message (Section 4.2.1): If the network state hash within 293 the message matches the hash of the locally stored network state, 294 consider Trickle state as consistent with no further processing 295 required. If the hashes do not match, consider Trickle state as 296 inconsistent. In this case, if the message is "short" (contains 297 zero Node State TLVs), reply with a NetState-Req Message 298 (Section 4.2.2). If the message was in long format (contained all 299 Node State TLVs), reply with NodeState-Req (Section 4.2.3) for any 300 nodes for which local information is outdated (local update number 301 is lower than that within the message) or missing. Note that if 302 local information is more recent than that of the neighbor, there 303 is no need to send a message. 305 NetState-Req (Section 4.2.2): Provide requested data in a NetNode- 306 Reply Message containing Network State TLV and all Node State 307 TLVs. 309 NodeState-Req (Section 4.2.3): Provide requested data in a 310 NetNode-Reply containing Node State and Node Data TLVs. 312 State-Reply (Section 4.2.4): If the message contains Node State 313 TLVs that are more recent than local state (higher update number 314 or we lack the node data altogether), if the message also contains 315 corresponding Node Data TLVs, update local state and reset 316 Trickle. If the message is lacking Node Data TLVs for some Node 317 State TLVs which are more recent than local state, reply with a 318 NodeState-Req (Section 4.2.3) for the corresponding nodes. 320 Each node is responsible for publishing a valid set of data TLVs. 321 When there is a change in a node's set of data TLVs, the update 322 number MUST be incremented accordingly. 324 If a message containing Node State TLVs (Section 5.2.3) is received 325 via unicast or multicast with the node's own node identifier and a 326 higher update number than current local value, or the same update 327 number and different hash, there is an error somewhere. A 328 recommended default way to handle this is to attempt to assert local 329 state by increasing the local update number to a value higher than 330 that received and republish node data using the same node identifier. 331 If this happens more than 3 times in 60 seconds and the local node 332 identifier is not globally unique, there may be more than one router 333 with the same node identifier on the network. If HNCP security is 334 not enabled, a new node identifier SHOULD be generated and node data 335 republished accordingly. If HNCP security is enabled, this is event 336 is highly unlikely to occur as collision of identifier hashes for 337 public keys is highly unlikely. 339 In all cases, if node data for any node changes, all Trickle 340 instances MUST be considered inconsistent (I=Imin + timer reset). 342 4.4. Adding and Removing Neighbors 344 Whenever multicast message or unicast reply is received on a link 345 from another node, the node should be added as Neighbor TLV 346 (Section 5.2.6) for current node. If nothing (for example - no 347 router advertisements, no HNCP traffic) is received from that 348 neighbor in Imax seconds and the neighbor is not in neighbor 349 discovery cache (and L2 indication of presence is available), at 350 least 3 attempts to ping it with request network state message 351 (Section 4.2.2) SHOULD be sent with increasing timeouts (e.g. 1, 2, 4 352 seconds). If even after suitable period after the last message 353 nothing is received, the Neighbor TLV MUST be removed so that there 354 are no dangling neighbors. As an alternative, if there is a layer 2 355 unreachability notification of some sort available for either whole 356 link or for individual neighbor, it MAY be used to immediately 357 trigger removal of corresponding Neighbor TLV(s). 359 4.5. Purging Unreachable Nodes 361 Nodes should be purged when unreachable. When node data has changed, 362 the neighbor graph SHOULD be traversed for each node following the 363 Neighbor TLVs, purging nodes that were found entirely unreachable 364 (not traversed). 366 5. Type-Length-Value objects 368 Every TLV is encoded as 2 octet type, followed by 2 octet length (of 369 the whole TLV, including header; 4 means no value whatsoever), and 370 then the value itself (if any). The actual length of TLV MUST be 371 always divisible by 4; if the length of the value is not, zeroed 372 padding bytes MUST be inserted at the end of TLV. The padding bytes 373 MUST NOT be included in the length field. 375 0 1 2 3 376 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 377 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 378 | Type | Length | 379 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 380 | Value | 381 | (variable # of bytes) | 382 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 384 Encoding of type=123 (0x7b) TLV with value 'x' (120 = 0x78): 007B 385 0005 7800 0000 387 Notation: 389 .. = octet string concatenation operation 391 H(x) = MD5 hash of x 393 H-64(x) = H(x) truncated by taking just first 64 bits of the 394 result. 396 5.1. Request TLVs (for use within unicast requests) 398 5.1.1. Request Network State TLV 400 0 1 2 3 401 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 402 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 403 | Type: REQ-NETWORK-STATE (2) | Length: 4 | 404 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 406 5.1.2. Request Node Data TLV 408 0 1 2 3 409 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 410 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 411 | Type: REQ-NODE-DATA (3) | Length: 20 | 412 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 413 | | 414 | H(node identifier) | 415 | | 416 | | 417 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 419 5.2. Data TLVs (for use in both multi- and unicast data) 421 5.2.1. Node Link TLV 423 0 1 2 3 424 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 425 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 426 | Type: NODE-LINK (1) | Length: 24 | 427 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 428 | | 429 | H(node identifier) | 430 | | 431 | | 432 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 433 | Link-Identifier | 434 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 436 5.2.2. Network State TLV 438 0 1 2 3 439 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 440 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 441 | Type: NETWORK-STATE (4) | Length: 20 | 442 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 443 | | 444 | H(H(node data TLV 1) .. H(node data TLV N)) | 445 | | 446 | | 447 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 449 The Node Data TLVs are ordered for hashing by octet comparison of the 450 corresponding node identifier hashes in ascending order. 452 5.2.3. Node State TLV 454 0 1 2 3 455 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 456 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 457 | Type: NODE-STATE (5) | Length: 44 | 458 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 459 | | 460 | H(node identifier) | 461 | | 462 | | 463 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 464 | Update Sequence Number | 465 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 466 | Milliseconds since Origination | 467 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 468 | | 469 | H(node data TLV) | 470 | | 471 | | 472 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 474 The whole network should have roughly the same idea about the time 475 since origination, i.e. even the originating router should increment 476 the time whenever it needs to send a new Node State TLV regarding 477 itself without changing the corresponding Node Data TLV. This age 478 value is not included within the Node Data TLV, however, as that is 479 immutable and potentially signed by the originating node at the time 480 of origination. 482 5.2.4. Node Data TLV 484 0 1 2 3 485 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 486 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 487 | Type: NODE-DATA (6) | Length: >= 24 | 488 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 489 | | 490 | H(node identifier) | 491 | | 492 | | 493 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 494 | Update Sequence Number | 495 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 496 | Nested TLVs containing node information | 498 The Node Public Key TLV (Section 5.2.5) SHOULD be always included if 499 signatures are ever used. 501 If signatures are in use, the Node Data TLV SHOULD also contain the 502 originator's own Signature TLV (Section 5.4.2). 504 5.2.5. Node Public Key TLV (within Node Data TLV) 506 0 1 2 3 507 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 508 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 509 | Type: PUBLIC-KEY (7) | Length: >= 4 | 510 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 511 | Public Key (raw node identifier) | 513 Public key data for the node. Only relevant if signatures are used. 514 Can be used to verify that H(node identifier) equals public key, and 515 that the Signature TLVs are signed by appropriate public keys. 517 5.2.6. Neighbor TLV (within Node Data TLV) 519 0 1 2 3 520 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 521 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 522 | Type: NEIGHBOR (8) | Length: 28 | 523 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 524 | | 525 | H(neighbor node identifier) | 526 | | 527 | | 528 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 529 | Neighbor Link Identifier | 530 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 531 | Local Link Identifier | 532 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 534 This TLV indicates that the node in question vouches that the 535 specified neighbor is reachable by it on the local link id given. 536 This reachability may be unidirectional (if no unicast exchanges have 537 been performed with the neighbor). The presence of this TLV at least 538 guarantees that the node publishing it has received traffic from the 539 neighbor recently. For guaranteed bidirectional reachability, 540 existence of both nodes' matching Neighbor TLVs should be checked. 542 5.3. Custom TLV (within/without Node Data TLV) 544 0 1 2 3 545 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 546 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 547 | Type: CUSTOM-DATA (9) | Length: >= 12 | 548 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 549 | H-64(URI) | 550 | | 551 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 552 | Opaque Data | 554 This TLV can be used to contain anything; the URI used should be 555 under control of the author of that specification. For example: 557 V=H-64('http://example.com/author/json-for-hncp') .. '{"cool": "json 558 extension!"}' 560 or 562 V=H-64('mailto:author@example.com') .. '{"cool": "json extension!"}' 564 5.4. Authentication TLVs 566 5.4.1. Certificate-related TLVs 568 TBD; should be probably some sort of certificate ID to be used in a 569 lookup at most, as raw certificates will overflow easily IPv6 minimum 570 MTU. 572 5.4.2. Signature TLV 574 TLV with T=0xFFFF, V=(TBD) public key algorithm based signature of 575 all TLVs within current scope as well as the parent TLV header, if 576 any. The assumed signature key is private key matching the public 577 key of the the originator of node link TLV (if signature TLV is 578 within main body of message), or that of the originator of the node 579 data TLV (if signature TLV is within Node Data TLV).. 581 6. Border Discovery and Prefix Assignment 583 Using Default Border Definition [I-D.kline-homenet-default-perimeter] 584 as a basis, this section defines border discovery algorithm specifics 585 derived from the edge router interactions described in the Basic 586 Requirements for IPv6 Customer Edge Routers [RFC7084]. The algorithm 587 is designed to work for both IPv4 and IPv6 (single or dual-stack). 589 In order to avoid conflicts between border discovery and homenet 590 routers running DHCP [RFC2131] or DHCPv6-PD [RFC3633] servers each 591 router MUST implement the following mechanism based on The User Class 592 Option for DHCP [RFC3004] or its DHCPv6 counterpart [RFC3315] 593 respectively into its DHCP and DHCPv6-logic: 595 A homenet router running a DHCP-client on a homenet-interface MUST 596 include a DHCP User-Class consisting of the ASCII-String 597 "HOMENET". 599 A homenet router running a DHCP-server on a homenet-interface MUST 600 ignore or reject DHCP-Requests containing a DHCP User-Class 601 consisting of the ASCII-String "HOMENET". 603 An interface MUST be considered external if at least one of the 604 following conditions is satisfied: 606 1. The interface has a fixed category classifying it as external. 608 2. A delegated prefix could be acquired by running a DHCPv6-client 609 on the interface. 611 3. An IPv4-address could be acquired by running a DHCP-client on the 612 interface. 614 4. HNCP security is enabled and there are routers on the interface 615 which could not be authenticated. 617 Each router MUST continuously scan each active interface that does 618 not have a fixed category in order to dynamically reclassify it if 619 necessary. The router therefore runs an appropriately configured 620 DHCP and DHCPv6-client as long as the interface is active including 621 states where it considers the interface to be internal. The router 622 SHOULD wait for a reasonable time period (5 seconds as a possible 623 default) in which the DHCP-clients can acquire a lease before 624 treating a newly activated or previously external interface as 625 internal. Once it treats a certain interface as internal it MUST 626 start forwarding traffic with appropriate source addresses between 627 its internal interfaces and allow internal traffic to reach external 628 networks. Once a router detects an interface to be external it MUST 629 stop any previously enabled internal forwarding. In addition it 630 SHOULD announce the acquired information for use in the homenet as 631 described in later sections of this draft if the interface appears to 632 be connected to an external network. 634 To distribute an external connection in the homenet an edge router 635 announces one or more delegated prefixes and associated 636 DHCP(v6)-encoded auxiliary information like recursive DNS-servers. 637 Each external connection is announced using one container-TLV as 638 follows: 640 0 1 2 3 641 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 642 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 643 | Type: EXTERNAL-CONNECTION (41)| Length: > 4 | 644 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 645 | Nested TLVs | 646 Auxiliary connectivity information is encoded as a stream of 647 DHCPv6-attributes or DHCP-attributes placed inside a TLV of type 648 EXTERNAL-CONNECTION or DELEGATED-PREFIX (for IPv6 prefix-specific 649 information). There MUST NOT be more than one instance of this TLV 650 inside a container and the order of the DHCP(v6)-attributes contained 651 within it MUST be preserved as long as the information contained does 652 not change. The TLVs are encoded as follows: 654 0 1 2 3 655 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 656 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 657 | Type: DHCPV6-DATA (45) | Length: > 4 | 658 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 659 | DHCPv6 attribute stream | 661 and 663 0 1 2 3 664 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 665 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 666 | Type: DHCP-DATA (44) | Length: > 4 | 667 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 668 | DHCP attribute stream | 670 Each delegated prefix is encoded using one TLV inside an EXTERNAL- 671 CONNECTION TLV. For external IPv4 connections the prefix is encoded 672 in the form of an IPv4-mapped address [RFC4291] and is usually from a 673 private address range [RFC1597]. The related TLV is defined as 674 follows. 676 0 1 2 3 677 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 678 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 679 | Type: DELEGATED-PREFIX (42) | Length: >= 13 | 680 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 681 | Valid until (milliseconds) | 682 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 683 | Preferred until (milliseconds) | 684 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 685 | Prefix Length | | 686 +-+-+-+-+-+-+-+-+ Prefix Address [+ nested TLVs] + 687 | | 688 Valid until is the time in milliseconds the delegated prefix is 689 valid. The value is relative to the point in time the TLV is 690 first announced. 692 Preferred until is the time in milliseconds the delegated prefix 693 is preferred. The value is relative to the point in time the TLV 694 is first announced. 696 Prefix length specifies the number of significant bits in the 697 prefix. 699 Prefix address is of variable length and contains the significant 700 bits of the prefix padded with zeroes up to the next byte 701 boundary. 703 Nested TLVs might contain prefix-specific information like 704 DHCPv6-options. 706 In order for routers to use the distributed information, prefixes and 707 addresses have to be assigned to the interior links of the homenet. 708 A router MUST therefore implement the algorithm defined in Prefix and 709 Address Assignment in a Home Network 710 [I-D.pfister-homenet-prefix-assignment]. In order to announce the 711 assigned prefixes the following TLVs are defined. 713 Each assigned prefix is given to an interior link and is encoded 714 using one TLVs. Assigned IPv4 prefixes are stored as mapped 715 IPv4-addresses. The TLV is defined as follows: 717 0 1 2 3 718 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 719 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 720 | Type: ASSIGNED-PREFIX (43) | Length: >= 9 | 721 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 722 | Link Identifier | 723 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 724 | R. |A| Pref. | Prefix Length | | 725 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Prefix Address + 726 | | 728 Link Identifier is the local HNCP identifier of the link the 729 prefix is assigned to. 731 R. is reserved for future additions and MUST be set to 0 when 732 creating TLVs and ignored when parsing them. 734 A is the authoritative flag which indicates that an assigment is 735 enforced and ignores usual collision detection rules. 737 Pref. describes the preference of the assignment and can be used 738 to differentiate the importance of a given assignment over others. 740 Prefix length specifies the number of significant bits in the 741 prefix. 743 Prefix address is of variable length and contains the significant 744 bits of the prefix padded with zeroes up to the next byte 745 boundary. 747 In some cases (e.g. IPv4) the set of addresses is very limited and 748 stateless mechanisms are not really suitable for address assignment. 749 Therefore HNCP can manage router address in these cases by itself. 750 Each router assigning an address to one of its interfaces announces 751 one TLV of the following kind: 753 0 1 2 3 754 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 755 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 756 | Type: ROUTER-ADDRESS (46) | Length: 20 | 757 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 758 | | 759 | Router Address | 760 | | 761 | | 762 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 764 Router Address is the address assigned to one of the router 765 interfaces. 767 7. DNS-based Service Discovery 769 Service discovery is generally limited to a local link. 770 [I-D.stenberg-homenet-dnssd-hybrid-proxy-network-zeroconf] defines a 771 mechanism to automatically extended DNS-based service discovery 772 across multiple links within the home automatically. Of the three 773 TLVs, the DNS Delegated Zone TLV MUST be supported, and the remaining 774 two SHOULD be. 776 7.1. DNS Delegated Zone TLV 778 0 1 2 3 779 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 780 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 781 | Type: DNS-DELEGATED-ZONE (50) | Length: >= 21 | 782 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 783 | | 784 | Address | 785 | | 786 | | 787 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 788 | Reserved |S|B| | 789 +-+-+-+-+-+-+-+-+ Zone (DNS label sequence - variable length) | 790 | | 792 7.2. Domain Name TLV 794 0 1 2 3 795 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 796 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 797 | Type: DOMAIN-NAME (51) | Length: >= 4 | 798 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 799 | Domain (DNS label sequence - variable length) | 800 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 802 7.3. Router Name TLV 804 0 1 2 3 805 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 806 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 807 | Type: ROUTER-NAME (52) | Length: >= 4 | 808 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 809 | Name (not null-terminated - variable length) | 810 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 812 8. Routing support 814 8.1. Protocol Requirements 816 In order to be advertised for use within the Homenet, a routing 817 protocol MUST: 819 Comply with Requirements and Use Cases for Source/Destination 820 Routing [I-D.baker-rtgwg-src-dst-routing-use-cases]. 822 Be configured with suitable defaults or have an autoconfiguration 823 mechanism (e.g. [I-D.acee-ospf-ospfv3-autoconfig]) such that it 824 will run in a Homenet without requiring specific configuration 825 from the Home user. 827 A router MUST NOT announce that it supports a certain routing 828 protocol if its implementation of the routing protocol does not meet 829 these requirements, e.g. it does not implement extensions that are 830 necessary for compliance. 832 8.2. Announcement 834 Each router SHOULD announce all routing protocols that it is capable 835 of supporting in the Homenet. It SHOULD assign a preference value 836 for each protocol that indicates its desire to use said protocol over 837 other protocols it supports and SHOULD make these values 838 configurable. 840 Each router includes one HNCP TLV of type ROUTING-PROTOCOL for every 841 such routing protocol. This TLV is defined as follows: 843 0 1 2 3 844 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 845 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 846 | Type: ROUTING-PROTOCOL (60) | Length: 6 | 847 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 848 | Protocol ID | Preference | 849 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 851 Protocol ID is one of: 853 0 = reserved 855 1 = Babel (dual-stack) 857 2 = OSPFv3 (dual-stack) 859 3 = IS-IS (dual-stack) 861 4 = RIP (dual-stack) 863 Preference is a value from 0 to 255. If a router is neutral about 864 a routing protocol it SHOULD use the value 128, otherwise a lower 865 value indicating lower preference or a higher value indicating 866 higher preference respectively. 868 8.3. Protocol Selection 870 When HNCP detects that a router has joined or left the Homenet it 871 MUST examine all advertised routing protocols and preference values 872 from all routers in the Homenet in order to find the one routing 873 protocol which: 875 1. Is understood by all routers in the homenet 877 2. Has the highest preference value among all routers (calculated as 878 sum of preference values) 880 3. Has the highest protocol ID among those with the highest 881 preference 883 If the router protocol selection results in the need to change from 884 one routing protocol to another on the homenet, the router MUST stop 885 the previously running protocol, remove associated routes, and start 886 the new protocol in a graceful manner. If there is no common routing 887 protocol available among all Homenet routers, routers MUST utilize 888 the Fallback Mechanism (Section 8.4). 890 8.4. Fallback Mechanism 892 In cases where there is no commonly supported routing protocol 893 available the following fallback algorithm is run to setup routing 894 and preserve interoperability among the homenet. While not intended 895 to replace a routing protocol, this mechanism provides a valid - but 896 not necessarily optimal - routing topology. This algorithm uses the 897 node and neighbor state already synchronized by HNCP, and therefore 898 does not require any additional protocol message exchange. 900 1. Interpret the neighbour information received via HNCP as a graph 901 of connected routers. 903 2. Use breadth-first traversal to determine the next-hop and hop- 904 count in the path to each router in the homenet: 906 Start the traversal with the immediate neighbours of the 907 router running the algorithm. 909 Always visit the immediate neighbours of a router in ascending 910 order of their router ID. 912 Never visit a router more often than once. 914 3. For each delegated prefix P of any router R in the homenet: 915 Create a default route via the next-hop for R acquired in #2. 917 Each such route MUST be source-restricted to only apply to 918 traffic with a source address within P and its metric MUST 919 reflect the hop-count to R. 921 4. For each assigned prefix A of a router R: Create a route to A via 922 the next-hop for R acquired in #2. Each such route MUST NOT be 923 source-restricted. 925 5. For the first router R visited in the traversal annuncing an 926 IPv4-uplink: Create a default IPv4-route via the next-hop for R 927 acquired in #2. 929 6. For each assigned IPv4-prefix A of a router R: Create an 930 IPv4-route to A via the next-hop for R acquired in #2. 932 9. Security Considerations 934 General security issues for Home Networks are discussed at length in 935 [I-D.ietf-homenet-arch]. The protocols used to setup IP in home 936 networks today have very little security enabled within the control 937 protocol itself. For example, DHCP has defined [RFC3118] to 938 authenticate DHCP messages, but this is very rarely implemented in 939 large or small networks. Further, while PPP can provide secure 940 authentication of both sides of a point to point link, it is most 941 often deployed with one-way authentication of the subscriber to the 942 ISP, not the ISP to the subscriber. HNCP aims to make security as 943 easy as possible for the implementer by including built-in 944 capabilities for authentication of node data being exchanged as well 945 as the protocol messages themselves, but it is ultimately up to the 946 shipping system to take advantage of the protocol constructs defined. 948 HNCP is designed to integrate with trusted bootstrapping 949 [I-D.behringer-homenet-trust-bootstrap] including the ability to 950 authenticate messages between nodes. This authentication can be used 951 to securely define a border as well as protect against malicious 952 attacks and spoofing attempts from inside or outside the border. 954 HNCP itself sends messages as (possibly authenticated) clear text 955 which is as secure, or insecure, as the security of the link below as 956 discussed in [I-D.kline-homenet-default-perimeter]. When no unique 957 public key is available, a hardware fingerprint or equivalent to 958 identify routers must be available for use by HNCP. 960 As HNCP messages are sent over UDP/IP, IPsec may be used for 961 confidentiality or additional message authenitation. However, this 962 requires manually keyed IPsec per-port granularity for port IANA-UDP- 963 PORT UDP traffic. Also, a pre-shared key has to be utilized in this 964 case given IKE cannot be used with multicast traffic. 966 If no router can be trusted and additional guarantees about source of 967 node status updates is necessary, real public and private keys should 968 be used to create signatures and verify them in HNCP on both on per- 969 node data TLVs as well as across the entire HNCP message. In this 970 mode, care must be taken in rate limiting verification of invalid 971 packets, as otherwise denial of service may occur due to exhaustion 972 of computation resources. 974 As a performance optimization, instead of providing signatures for 975 actual node data and the protocol messages themselves, it is also 976 possible to provide signatures just for protocol messages. While 977 this means it is no longer possible to verify the original source of 978 the node data itself, as long as the set of routers is trusted (i.e., 979 no router in the set has itself been hacked to provide malicious node 980 data) then one can assume the node data is trusted because the router 981 is trusted and the data arrived in a protected protocol message. 983 10. IANA Considerations 985 IANA should set up a registry (policy TBD) for HNCP TLV types, with 986 following initial contents: 988 0: Reserved (should not happen on wire) 990 1: Node link 992 2: Request network state 994 3: Request node data 996 4: Network state 998 5: Node state 1000 6: Node data 1002 7: Node public key 1004 8: Neighbor 1006 9: Custom 1008 41: External connection 1010 42: Delegated prefix 1012 43: Assigned prefix 1013 44: DHCP-data 1015 45: DHCPv6-data 1017 46: Router-address 1019 50: DNS Delegated Zone 1021 51: Domain name 1023 52: Node name 1025 60: Routing protocol 1027 65535: Signature 1029 HNCP will also require allocation of a UDP port number IANA-UDP-PORT, 1030 as well as IPv6 link-local multicast address IANA-MULTICAST-ADDRESS. 1032 11. References 1034 11.1. Normative references 1036 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1037 Requirement Levels", BCP 14, RFC 2119, March 1997. 1039 [RFC6206] Levis, P., Clausen, T., Hui, J., Gnawali, O., and J. Ko, 1040 "The Trickle Algorithm", RFC 6206, March 2011. 1042 [I-D.pfister-homenet-prefix-assignment] 1043 Pfister, P., Arkko, J., and B. Paterson, "Prefix and 1044 Address Assignment in a Home Network", draft-pfister- 1045 homenet-prefix-assignment-00 (work in progress), January 1046 2014. 1048 [I-D.stenberg-homenet-dnssd-hybrid-proxy-network-zeroconf] 1049 Stenberg, M., "Auto-Configuration of a Network of Hybrid 1050 Unicast/Multicast DNS-Based Service Discovery Proxy Nodes 1051 ", draft-pfister-homenet-prefix-assignment-00 (work in 1052 progress), January 2014. 1054 11.2. Informative references 1056 [RFC7084] Singh, H., Beebee, W., Donley, C., and B. Stark, "Basic 1057 Requirements for IPv6 Customer Edge Routers", RFC 7084, 1058 November 2013. 1060 [RFC3004] Stump, G., Droms, R., Gu, Y., Vyaghrapuri, R., Demirtjis, 1061 A., Beser, B., and J. Privat, "The User Class Option for 1062 DHCP", RFC 3004, November 2000. 1064 [RFC3118] Droms, R. and W. Arbaugh, "Authentication for DHCP 1065 Messages", RFC 3118, June 2001. 1067 [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", RFC 1068 2131, March 1997. 1070 [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., 1071 and M. Carney, "Dynamic Host Configuration Protocol for 1072 IPv6 (DHCPv6)", RFC 3315, July 2003. 1074 [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic 1075 Host Configuration Protocol (DHCP) version 6", RFC 3633, 1076 December 2003. 1078 [RFC1597] Rekhter, Y., Moskowitz, R., Karrenberg, D., and G. de 1079 Groot, "Address Allocation for Private Internets", RFC 1080 1597, March 1994. 1082 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 1083 Architecture", RFC 4291, February 2006. 1085 [I-D.ietf-homenet-arch] 1086 Chown, T., Arkko, J., Brandt, A., Troan, O., and J. Weil, 1087 "IPv6 Home Networking Architecture Principles", draft- 1088 ietf-homenet-arch-11 (work in progress), October 2013. 1090 [I-D.troan-homenet-sadr] 1091 Troan, O. and L. Colitti, "IPv6 Multihoming with Source 1092 Address Dependent Routing (SADR)", draft-troan-homenet- 1093 sadr-01 (work in progress), September 2013. 1095 [I-D.behringer-homenet-trust-bootstrap] 1096 Behringer, M., Pritikin, M., and S. Bjarnason, 1097 "Bootstrapping Trust on a Homenet", draft-behringer- 1098 homenet-trust-bootstrap-00 (work in progress), October 1099 2012. 1101 [I-D.baker-rtgwg-src-dst-routing-use-cases] 1102 Baker, F., "Requirements and Use Cases for Source/ 1103 Destination Routing", draft-baker-rtgwg-src-dst-routing- 1104 use-cases-00 (work in progress), August 2013. 1106 [I-D.kline-homenet-default-perimeter] 1107 Kline, E., "Default Border Definition", draft-kline- 1108 homenet-default-perimeter-00 (work in progress), March 1109 2013. 1111 [I-D.arkko-homenet-prefix-assignment] 1112 Arkko, J., Lindem, A., and B. Paterson, "Prefix Assignment 1113 in a Home Network", draft-arkko-homenet-prefix- 1114 assignment-04 (work in progress), May 2013. 1116 [I-D.stenberg-homenet-dnssdext-hybrid-proxy-ospf] 1117 Stenberg, M., "Hybrid Unicast/Multicast DNS-Based Service 1118 Discovery Auto-Configuration Using OSPFv3", draft- 1119 stenberg-homenet-dnssdext-hybrid-proxy-ospf-00 (work in 1120 progress), June 2013. 1122 [I-D.acee-ospf-ospfv3-autoconfig] 1123 Lindem, A. and J. Arkko, "OSPFv3 Auto-Configuration", 1124 draft-acee-ospf-ospfv3-autoconfig-03 (work in progress), 1125 July 2012. 1127 Appendix A. Some Outstanding Issues 1129 Should we use MD5 hashes, or EUI-64 node identifier to identify 1130 nodes? 1132 Is there a case for non-link-local unicast? Currently explicitly 1133 stating this is link-local only protocol. 1135 Consider if using Trickle with k=1 really pays off, as we need to do 1136 reachability checks if L2 doesn't provide them periodically in any 1137 case. Using Trickle with k=inf would remove the need for unicast 1138 reachability checks, but at cost of extra multicast traffic. On the 1139 other hand, N*(N-1)/2 unicast reachability checks when lot of routers 1140 share a link is not appealing either. 1142 Should we use something else than MD5 as hash? It IS somewhat 1143 insecure; however signature stuff (TBD) should rely on it mainly for 1144 security in any case, and MD5 is used in a non-security role. 1146 Appendix B. Some Obvious Questions and Answers 1148 Q: Why not use TCP? 1150 A: It doesn't address the node discovery problem. It also leads to 1151 N*(N-1)/2 connections when N nodes share a link, which is awkward. 1153 Q: Why effectively build a link state routing protocol without 1154 routing? 1155 A: It felt like a good idea at the time. It does not require 1156 periodic flooding except for very minimal Trickle-based per-link 1157 state maintenance (potentially also neighbor reachability checks if 1158 so desired). 1160 Q: Why not multicast-only? 1162 A: It would require defining application level fragmentation scheme. 1163 Hopefully the data amounts used will stay small so we just trust 1164 unicast UDP to handle 'big enough' packets to contain single node's 1165 TLV data. On some link layers unicast is also much more reliable 1166 than multicast, especially for large packets. 1168 Q: Why so long IDs? Why real hash even in insecure mode? 1170 A: Scalability of protocol isn't really affected by using real 1171 (=cryptographic) hash function. 1173 Q: Why trust IPv6 fragmentation in unicast case? Why not do L7 1174 fragmentation? 1176 A: Because it will be there for a while at least. And while PMTU et 1177 al may be problems on open internet, in a home network environment 1178 UDP fragmentation should NOT be broken in the foreseeable future. 1180 Q: Should there be nested container syntax that is actually self- 1181 describing? (i.e. type flag that indicates container, no body except 1182 sub-TLVs?) 1184 A: Not for now, but perhaps valid design.. TBD. 1186 Q: Why not doing (performance thing X, Y or Z)? 1188 A: This is designed mostly to be minimal (only timers Trickle ones; 1189 everything triggered by Trickle-driven messages or local state 1190 changes). However, feel free to suggest better (even more minimal) 1191 design which works. 1193 Appendix C. Draft source 1195 As usual, this draft is available at https://github.com/fingon/ietf- 1196 drafts/ [3] in source format (with nice Makefile too). Feel free to 1197 send comments and/or pull requests if and when you have changes to 1198 it! 1200 Appendix D. Acknowledgements 1201 Thanks to Ole Troan, Pierre Pfister, Mark Baugher, Mark Townsley and 1202 Juliusz Chroboczek for their contributions to the draft. 1204 Authors' Addresses 1206 Markus Stenberg 1207 Helsinki 00930 1208 Finland 1210 Email: markus.stenberg@iki.fi 1212 Steven Barth 1214 Email: cyrus@openwrt.org