idnits 2.17.1 draft-ietf-roll-p2p-measurement-04.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 date (March 7, 2012) is 4434 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '1' on line 427 == Missing Reference: 'Index' is mentioned on line 630, but not defined == Outdated reference: A later version (-17) exists of draft-ietf-roll-p2p-rpl-09 == Outdated reference: A later version (-13) exists of draft-ietf-roll-terminology-06 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force M. Goyal, Ed. 3 Internet-Draft University of Wisconsin 4 Intended status: Experimental Milwaukee 5 Expires: September 8, 2012 E. Baccelli 6 INRIA 7 A. Brandt 8 Sigma Designs 9 J. Martocci 10 Johnson Controls 11 March 7, 2012 13 A Mechanism to Measure the Quality of a Point-to-point Route in a Low 14 Power and Lossy Network 15 draft-ietf-roll-p2p-measurement-04 17 Abstract 19 This document specifies a mechanism that enables an RPL router to 20 measure the quality of an existing route towards another RPL router 21 in a low power and lossy network, thereby allowing the router to 22 decide if it wants to initiate the discovery of a better route. 24 Status of this Memo 26 This Internet-Draft is submitted to IETF in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on September 8, 2012. 41 Copyright Notice 43 Copyright (c) 2012 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 60 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 3. The Measurement Object (MO) . . . . . . . . . . . . . . . . . 4 62 3.1. Format of the base MO . . . . . . . . . . . . . . . . . . 5 63 3.2. Secure MO . . . . . . . . . . . . . . . . . . . . . . . . 9 64 4. Originating a Measurement Request . . . . . . . . . . . . . . 9 65 4.1. To Measure A Hop-by-hop Route with a Global 66 RPLInstanceID . . . . . . . . . . . . . . . . . . . . . . 10 67 4.2. To Measure A Hop-by-hop Route with a Local 68 RPLInstanceID . . . . . . . . . . . . . . . . . . . . . . 10 69 4.3. To Measure A Source Route . . . . . . . . . . . . . . . . 11 70 5. Processing a Measurement Request at an Intermediate Router . . 12 71 5.1. Determining Next Hop For An MO Measuring A Source Route . 13 72 5.2. Determining Next Hop For An MO Measuring A Hop-by-hop 73 Route . . . . . . . . . . . . . . . . . . . . . . . . . . 14 74 6. Processing a Measurement Request at the Target . . . . . . . . 15 75 7. Processing a Measurement Reply at the Origin . . . . . . . . . 16 76 8. Security Considerations . . . . . . . . . . . . . . . . . . . 16 77 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 78 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 18 79 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 18 80 11.1. Normative References . . . . . . . . . . . . . . . . . . . 18 81 11.2. Informative References . . . . . . . . . . . . . . . . . . 18 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 19 84 1. Introduction 86 Point to point (P2P) communication between arbitrary routers in a Low 87 power and Lossy Network (LLN) is a key requirement for many 88 applications [RFC5826][RFC5867]. RPL [I-D.ietf-roll-rpl], the IPv6 89 Routing Protocol for LLNs, constrains the LLN topology to a Directed 90 Acyclic Graph (DAG) built to optimize the routing costs to reach the 91 DAG's root. The P2P routing functionality, available under RPL, has 92 the following key limitations: 94 o The P2P routes are restricted to use the DAG links only. Such P2P 95 routes may potentially be suboptimal and may lead to traffic 96 congestion near the DAG root. 98 o RPL is a proactive routing protocol and hence requires all P2P 99 routes to be established ahead of the time they are used. Many 100 LLN applications require the ability to establish P2P routes "on 101 demand". 103 To ameliorate situations, where the core RPL's P2P routing 104 functionality does not meet the application requirements, 105 [I-D.ietf-roll-p2p-rpl] describes P2P-RPL, an extension to core RPL. 106 P2P-RPL provides a reactive mechanism to discover P2P routes that 107 meet the specified routing constraints 108 [I-D.ietf-roll-routing-metrics]. In some cases, the application 109 requirements or the LLN's topological features allow a router to 110 infer these routing constraints implicitly. For example, the 111 application may require the end-to-end loss rate and/or latency along 112 the route to be below certain thresholds or the LLN topology may be 113 such that a router can safely assume its destination to be less than 114 a certain number of hops away from itself. 116 When the existing routes are deemed unsatisfactory but the router 117 does not implicitly know the routing constraints to be used in P2P- 118 RPL route discovery, it may be necessary for the router to measure 119 the aggregated values of the routing metrics along the existing 120 route. This knowledge will allow the router to frame reasonable 121 routing constraints to discover a better route using P2P-RPL. For 122 example, if the router determines the aggregate ETX 123 [I-D.ietf-roll-routing-metrics] along an existing route to be "x", it 124 can use "ETX < x*y", where y is a certain fraction, as the routing 125 constraint for use in P2P-RPL route discovery. Note that it is 126 important that the routing constraints are not overly strict; 127 otherwise the P2P-RPL route discovery may fail even though a route, 128 much better than the one currently being used, exists. 130 This document specifies a mechanism that enables an RPL router to 131 measure the aggregated values of the routing metrics along an 132 existing route to another RPL router in an LLN, thereby allowing the 133 router to decide if it wants to discover a better route using P2P-RPL 134 and determine the routing constraints to be used for this purpose. 136 1.1. Terminology 138 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 139 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 140 "OPTIONAL" in this document are to be interpreted as described in 141 [RFC2119]. 143 Additionally, this document uses terminology from 144 [I-D.ietf-roll-terminology], [I-D.ietf-roll-rpl] and 145 [I-D.ietf-roll-p2p-rpl]. The following terms, originally defined in 146 [I-D.ietf-roll-p2p-rpl], are redefined in the following manner. 148 Origin: The origin refers to the RPL router that initiates the 149 measurement process defined in this document and is the start point 150 of the P2P route being measured. 152 Target: The target refers to the RPL router at the end point of the 153 P2P route being measured. 155 Intermediate Router: An RPL router, other than the origin and the 156 target, on the P2P route being measured. 158 2. Overview 160 The mechanism described in this document can be used by an origin in 161 an LLN to measure the aggregated values of the routing metrics along 162 a P2P route to a target within the LLN. Such a route could be a 163 source route or a hop-by-hop route established using RPL 164 [I-D.ietf-roll-rpl] or P2P-RPL [I-D.ietf-roll-p2p-rpl]. The origin 165 sends a Measurement Request message along the route. The Measurement 166 Request accumulates the values of the routing metrics as it travels 167 towards the target. Upon receiving the Measurement Request, the 168 target unicasts a Measurement Reply message, carrying the accumulated 169 values of the routing metrics, back to the origin. Optionally, the 170 origin may allow an intermediate router to generate the Measurement 171 Reply if it already knows the relevant routing metric values along 172 rest of the route. 174 3. The Measurement Object (MO) 176 This document defines two new RPL Control Message types, the 177 Measurement Object (MO), with code 0x06 (to be confirmed by IANA), 178 and the Secure MO, with code 0x86 (to be confirmed by IANA). An MO 179 serves as both Measurement Request and Measurement Reply. 181 3.1. Format of the base MO 183 0 1 2 3 184 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 185 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 186 | RPLInstanceID | Compr |T|H|A|R|B|I| SequenceNo| Num | Index | 187 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 188 | | 189 | Origin Address | 190 | | 191 | | 192 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 193 | | 194 | Target Address | 195 | | 196 | | 197 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 198 | | 199 . Address[1..Num] . 200 . . 201 | | 202 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 203 | | 204 . Metric Container Option(s) . 205 . . 206 | | 207 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 209 Figure 1: Format of the base Measurement Object (MO) 211 The format of a base MO is shown in Figure 1. A base MO consists of 212 the following fields: 214 o RPLInstanceID: This field is relevant only if a hop-by-hop route 215 is being measured, i.e., the H flag, described subsequently, is 216 set to one. In this case, the origin MUST set this field to the 217 RPLInstanceID of the hop-by-hop route being measured. If a source 218 route is being measured, the origin MUST set this field to binary 219 value 10000000. An intermediate router MUST set the RPLInstanceID 220 field in the outgoing MO packet to the same value that it had in 221 the corresponding incoming MO packet unless it is the root of a 222 non-storing global DAG, identified by the RPLInstanceID, along 223 which the MO packet had been traveling so far and the router 224 intends to insert a source route inside the Address vector to 225 direct it towards the target. In that case, the router MUST set 226 the RPLInstanceID field in the outgoing MO packet to binary value 227 10000000. 229 o Compr: In many LLN deployments, IPv6 addresses share a well known, 230 common prefix. In such cases, the common prefix can be elided 231 when specifying IPv6 addresses in the Origin/Target Address fields 232 and the Address vector. The "Compr" field, a 4-bit unsigned 233 integer, is set by the origin to specify the number of prefix 234 octets that are elided from the IPv6 addresses in Origin/Target 235 Address fields and the Address vector. An intermediate router 236 MUST set the Compr field in the outgoing MO packet to the same 237 value that it had in the corresponding incoming MO packet. The 238 intermediate router MUST drop the received MO message if the Compr 239 value specified in the message does not match what the router 240 considers the length of the common prefix to be. The origin will 241 set the Compr value to zero if full IPv6 addresses are to be 242 carried in the Origin Address/Target Address fields and the 243 Address vector. 245 o Type (T): This flag is set to one if the MO represents a 246 Measurement Request. The flag is set to zero if the MO is a 247 Measurement Reply. 249 o Hop-by-hop (H): The origin MUST set this flag to one if the route 250 being measured is a hop-by-hop route. In that case, the hop-by- 251 hop route is identified by the RPLInstanceID and, if the 252 RPLInstanceID is a local value, the Origin Address and Target 253 Address fields inside the message. The origin MUST set this flag 254 to zero if the route being measured is a source route specified in 255 the Address vector. An intermediate router MUST set the H flag in 256 an outgoing MO packet to the same value that it had in the 257 corresponding incoming MO packet unless the router is the root of 258 the non-storing global DAG, identified by the RPLInstanceID, along 259 which the MO packet had been traveling so far and the router 260 intends to insert a source route inside the Address vector to 261 direct it towards the target. In that case, the router MUST reset 262 the H flag to zero in the outgoing MO packet. 264 o Accumulate Route (A): This flag is relevant only if the MO 265 represents a Measurement Request that travels along a hop-by-hop 266 route represented by a local RPLInstanceID. In other words, this 267 flag MAY be set to one only if T = 1, H = 1 and the RPLInstanceID 268 field has a local value. Otherwise, this flag MUST be set to 269 zero. A value 1 in this flag indicates that the Measurement 270 Request MUST accumulate a source route for use by the target to 271 send the Measurement Reply back to the origin. In this case, an 272 intermediate router MUST add its unicast IPv6 address (after 273 eliding Compr number of prefix octets) to the Address vector in 274 the manner specified later. Route accumulation is not allowed 275 when the Measurement Request travels along a hop-by-hop route with 276 a global RPLInstanceID, i.e., along a global DAG, because: 278 * The DAG's root may need the Address vector to insert a source 279 route to the target; and 281 * The target can presumably reach the origin along this global 282 DAG. 284 o Reverse (R): This flag is relevant only if the MO represents a 285 Measurement Request that travels along a source route, specified 286 in the Address vector, to the target. In other words, this flag 287 MAY be set to one only if T = 1 and H = 0. Otherwise, this flag 288 MUST be set to zero. A value 1 in the flag indicates that the 289 Address vector contains a complete source route from the origin to 290 the target, which can be used, after reversal, by the target to 291 source route the Measurement Reply message back to the origin. 293 o Back Request (B): This flag serves as a request to the target to 294 send a Measurement Request towards the origin. The origin MAY set 295 this flag to one to make such a request to the target. An 296 intermediate router MUST set the B flag in an outgoing MO packet 297 to the same value that it had in the corresponding incoming MO 298 packet. On receiving a Measurement Request with the B flag set to 299 one, the target SHOULD generate a Measurement Request to measure 300 the cost of its current (or the most preferred) route to the 301 origin. Receipt of this Measurement Request would allow the 302 origin to know the cost of the back route from the target to 303 itself and thus determine the round-trip cost of reaching the 304 target. 306 o Intermediate Reply (I): Relevant only if a hop-by-hop route is 307 being measured, this flag serves as a permission to an 308 intermediate router to generate a Measurement Reply if it knows 309 the cost of the rest of the route being measured. The origin MAY 310 set this flag to one if a hop-by-hop route is being measured 311 (i.e., H = 1) and the origin wants to allow an intermediate router 312 to generate the Measurement Reply in response to this Measurement 313 Request. Setting this flag to one may be useful in scenarios 314 where the Hop Count [I-D.ietf-roll-routing-metrics] is the routing 315 metric of interest and the origin expects an intermediate router 316 (e.g. the root of a non-storing DAG or a common ancestor of the 317 origin and the target in a storing DAG) to know the Hop Count of 318 the remainder of the route to the target. This flag MUST be set 319 to zero if the route being measured is a source route (i.e., H = 320 0). 322 o SequenceNo: A 6-bit sequence number, assigned by the origin, that 323 allows the origin to uniquely identify a Measurement Request and 324 the corresponding Measurement Reply. An intermediate router MUST 325 set this field in the outgoing MO packet to the same value that it 326 had in the corresponding incoming MO packet. The target MUST set 327 this field in a Measurement Reply message to the same value that 328 it had in the corresponding Measurement Request message. 330 o Num: This field indicates the number of elements, each (16 - 331 Compr) octets in size, inside the Address vector. If the value of 332 this field is zero, the Address vector is not present in the MO. 334 o Index: If the Measurement Request is traveling along a source 335 route contained in the Address vector (T=1,H=0), this field 336 indicates the index in the Address vector of the next hop on the 337 route. If the Measurement Request is traveling along a hop-by-hop 338 route with a local RPLInstanceID and the A flag is set 339 (T=1,H=1,A=1 and RPLInstanceID field has a local value), this 340 field indicates the index in the Address vector where an 341 intermediate router receiving the MO message must store its IPv6 342 address. Otherwise, this field MUST be set to zero on 343 transmission and ignored on reception. 345 o Origin Address: A unicast IPv6 address of the origin after eliding 346 Compr number of prefix octets. If the MO is traveling along a 347 hop-by-hop route and the RPLInstanceID field indicates a local 348 value, the Origin Address field MUST specify the DODAGID value 349 that, along with the RPLInstanceID and the Target Address, 350 uniquely identifies the hop-by-hop route being measured. 352 o Target Address: A unicast IPv6 address of the target after eliding 353 Compr number of prefix octets. 355 o Address[1..Num]: A vector of unicast IPv6 addresses (with Compr 356 number of prefix octets elided) representing a source route to the 357 target: 359 * Each element in the vector has size (16 - Compr) octets. 361 * The total number of elements inside the Address vector is given 362 by the Num field. 364 * When the Measurement Request is traveling along a hop-by-hop 365 route with local RPLInstanceID and has the A flag set, the 366 Address vector is used to accumulate a source route to be used 367 by the target to send the Measurement Reply back to the origin. 368 In this case, the route MUST be accumulated in the forward 369 direction, i.e., from the origin to the target. The target 370 router would reverse this route to obtain a source route from 371 itself to the origin. The IPv6 addresses in the accumulated 372 route MUST be reachable in the backward direction, i.e., from 373 the target to the origin. An intermediate router adding its 374 address to the Address vector MUST ensure that its address does 375 not already exist in the vector. 377 * When the Measurement Request is traveling along a source route, 378 the Address vector MUST contain a complete route to the target 379 and the IPv6 addresses in the Address vector MUST be reachable 380 in the forward direction, i.e., from the origin to the target. 381 A router (origin or an intermediate router) inserting an 382 Address vector inside an MO MUST ensure that no address appears 383 more than once inside the vector. Each router on the way MUST 384 ensure that the loops do not exist within the source route. 385 The origin MAY set the R flag in the MO if the route in the 386 Address vector represents a complete route from the origin to 387 the target and this route can be used after reversal by the 388 target to send the Measurement Reply message back to the origin 389 (i.e., the IPv6 addresses in the Address vector are reachable 390 in the backward direction - from the target to the origin). 392 * The origin and target addresses MUST NOT be included in the 393 Address vector. 395 * The Address vector MUST NOT contain any multicast addresses. 397 o Metric Container Options: An MO MUST contain one or more Metric 398 Container options to accumulate the routing metric values for the 399 route being measured. 401 3.2. Secure MO 403 A Secure MO message follows the format in Figure 7 of 404 [I-D.ietf-roll-rpl], where the base format is the base MO shown in 405 Figure 1. 407 4. Originating a Measurement Request 409 If an origin needs to measure the routing metric values along a P2P 410 route towards a target, it generates an MO message and sets its 411 fields as described in Section 3.1. The setting of MO fields in 412 specific cases is described below. In all cases, the origin MUST set 413 the T flag to one to indicate that the MO represents a Measurement 414 Request. The origin MUST also include one or more Metric Container 415 options inside the MO to carry the routing metric objects of 416 interest. Depending on the metrics being measured, the origin must 417 also initiate these routing metric objects by including the values of 418 the routing metrics for the first hop on the P2P route being 419 measured. 421 After setting the MO fields appropriately, the origin determines the 422 next hop on the P2P route being measured. If a hop-by-hop route is 423 being measured (i.e., the H flag is set to one), the next hop is 424 determined using the RPLInstanceID, the Target Address and, if 425 RPLInstanceID is a local value, the Origin Address fields in the MO. 426 If a source route is being measured (i.e., the H flag is set to 427 zero), the Address[1] element contains the next hop address. 429 The origin MUST discard the MO message if: 431 o the next hop address is not a unicast address; or 433 o the next hop is not on-link; or 435 o the next hop is not in the same RPL routing domain as the origin. 437 Otherwise, the origin MUST unicast the MO message to the next hop on 438 the P2P route. 440 4.1. To Measure A Hop-by-hop Route with a Global RPLInstanceID 442 If a hop-by-hop route with a global RPLInstanceID is being measured, 443 the MO message MUST NOT contain the Address vector and the following 444 MO fields MUST be set in the manner specified below: 446 o Hop-by-hop (H): This flag MUST be set to one. 448 o Accumulate Route (A): This flag MUST be set to zero. 450 o Reverse (R): This flag MUST be set to zero. 452 o Num: This field MUST be set to zero. 454 o Index: This field MUST be set to zero. 456 4.2. To Measure A Hop-by-hop Route with a Local RPLInstanceID 458 If a hop-by-hop route with a local RPLInstanceID is being measured 459 and the MO is not accumulating a source route for the target's use, 460 the MO message MUST NOT contain the Address vector and the following 461 MO fields MUST be set in the manner specified below: 463 o Hop-by-hop (H): This flag MUST be set to one. 465 o Accumulate Route (A): This flag MUST be set to zero. 467 o Reverse (R): This flag MUST be set to zero. 469 o Num: This field MUST be set to zero. 471 o Index: This field MUST be set to zero. 473 o Origin Address: This field MUST contain the DODAGID value (after 474 eliding Compr number of prefix octets) associated with the route 475 being measured. 477 If a hop-by-hop route with a local RPLInstanceID is being measured 478 and the origin desires the MO to accumulate a source route for the 479 target to send the Measurement Reply message back, it MUST set the 480 following MO fields in the manner specified below: 482 o Hop-by-hop (H): This flag MUST be set to one. 484 o Accumulate Route (A): This flag MUST be set to one. 486 o Reverse (R): This flag MUST be set to zero. 488 o Intermediate Reply (I): This flag MUST be set to zero. 490 o Address vector: The Address vector must be large enough to 491 accomodate a complete source route from the origin to the target. 492 All the bits in the Address vector field MUST be set to zero. 494 o Num: This field MUST specify the number of address elements that 495 can fit inside the Address vector. 497 o Index: This field MUST be set to one. 499 o Origin Address: This field MUST contain the DODAGID value (after 500 eliding Compr number of prefix octets) associated with the route 501 being measured. 503 4.3. To Measure A Source Route 505 If a source route is being measured, the origin MUST set the 506 following MO fields in the manner specified below: 508 o Hop-by-hop (H): This flag MUST be set to zero. 510 o Accumulate Route (A): This flag MUST be set to zero. 512 o Reverse (R): This flag SHOULD be set to one if the source route in 513 the Address vector can be reversed and used by the target to 514 source route the Measurement Reply message back to the origin. 515 Otherwise, this flag MUST be set to zero. 517 o Intermediate Reply (I): This flag MUST be set to zero. 519 o Address vector: 521 * The Address vector MUST contain a complete route from the 522 origin to the target (excluding the origin and the target). 524 * The IPv6 addresses (with Compr prefix octets elided) in the 525 Address vector MUST be reachable in the forward direction, 526 i.e., from the origin to the target. 528 * If the R flag is set to one, the IPv6 addresses (with Compr 529 prefix octets elided) in the Address vector MUST also be 530 reachable in the backward direction, i.e., from the target to 531 the origin. 533 * To prevent loops in the source route, the origin MUST ensure 534 compliance to the following rules: 536 + Any IPv6 address MUST NOT appear more than once in the 537 Address vector. 539 + If the Address vector includes multiple IPv6 addresses 540 assigned to the origin's interfaces, such addresses MUST 541 appear back to back inside the Address vector. 543 * Each address appearing in the Address vector MUST be a unicast 544 address. 546 o Num: This field MUST be set to indicate the number of elements in 547 the Address vector. 549 o Index: This field MUST be set to one. 551 5. Processing a Measurement Request at an Intermediate Router 553 A router (an intermediate router or the target) MAY discard a 554 received MO with no processing to meet any policy-related goal. Such 555 policy goals may include the need to reduce the router's CPU load or 556 to enhance its battery life. 558 A router MUST discard a received MO with no further processing if the 559 Compr field inside the received message is not same as what the 560 router considers the length of the common prefix used in IPv6 561 addresses in the LLN to be. 563 On receiving an MO, if a router chooses to process the packet 564 further, it MUST check if one of its IPv6 addresses is listed as 565 either the Origin or the Target Address. If neither, the router 566 considers itself an Intermediate Router and MUST process the received 567 MO in the following manner. 569 An intermediate router MUST discard the packet with no further 570 processing if the received MO is not a Measurement Request. 572 If the H and I flags are set to one in the received MO and the 573 intermediate router knows the values of the routing metrics, 574 specified in the Metric Container, for the remainder of the route, it 575 MAY generate a Measurement Reply on the target's behalf in the manner 576 specified in Section 6 (after including in the Measurement Reply the 577 relevant routing metric values for the complete route being 578 measured). Otherwise, the intermediate router MUST process the 579 received MO in the following manner. 581 The router MUST determine the next hop on the P2P route being 582 measured in the manner described below. The router MUST drop the MO 583 with no further processing and MAY send an ICMPv6 Destination 584 Unreachable (with Code 0 - No Route To Destination) error message to 585 the source of the message if it can not determine the next hop for 586 the message. The router MUST drop the MO with no further processing: 588 o If the next hop address is not a unicast address; or 590 o If the next hop is not on-link; or 592 o If the next hop is not in the same RPL routing domain as the 593 router. 595 Next, the router MUST update the routing metric objects, contained in 596 the Metric Container options inside the MO, either by updating the 597 aggregated value for the routing metric or by attaching the local 598 values for the metric inside the object. After updating the routing 599 metrics, the router MUST unicast the MO to the next hop. 601 5.1. Determining Next Hop For An MO Measuring A Source Route 603 In case the received MO is measuring a source route (H=0), 605 o The router MUST verify that the Address[Index] element lists one 606 of its unicast IPv6 addresses, failing which the router MUST 607 discard the MO packet with no further processing; 609 o The router MUST then increment the Index field and use the 610 Address[Index] element as the next hop. If Index is greater than 611 Num, the router MUST use the Target Address as the next hop. 613 To prevent loops, an intermediate router MUST discard the MO packet 614 with no further processing if the Address vector includes multiple 615 IPv6 addresses assigned to the router's interfaces and if such 616 addresses do not appear back to back inside the Address vector. 618 5.2. Determining Next Hop For An MO Measuring A Hop-by-hop Route 620 If the received MO is measuring a hop-by-hop route (H=1), the router 621 MUST use the RPLInstanceID, the Target Address and, if RPLInstanceID 622 is a local value, the Origin Address to determine the next hop for 623 the MO. Moreover, 625 o If the RPLInstanceID of the hop-by-hop route is a local value and 626 the A flag is set, the router MUST check if the Address vector 627 already contains one of its IPv6 addresses. If yes, the router 628 MUST discard the packet with no further processing. Otherwise, 629 the router MUST store one of its IPv6 addresses (after eliding 630 Compr prefix octets) at location Address[Index] and then increment 631 the Index field. 633 o If the router is the root of the non-storing global DAG along 634 which the received MO message had been traveling so far, 636 * The router discards the MO packet with no further processing if 637 it does not know of a source route to reach the target 638 (specified by the Target Address listed in the packet). 640 * Otherwise, the router MUST do the following: 642 + Set the H, A and R flags to zero and the RPLInstanceID field 643 to binary value 10000000. 645 + Remove any existing Address vector inside the MO. 647 + Insert a new Address vector inside the MO and specify a 648 source route to the target inside the Address vector as per 649 the following rules: 651 - The Address vector MUST contain a complete route from the 652 router to the target (excluding the router and the 653 target); 655 - The IPv6 addresses (with Compr prefix octets elided) in 656 the Address vector MUST be reachable in the forward 657 direction, i.e., towards the target; 659 - To prevent loops in the source route, the router MUST 660 ensure that 662 o Any IPv6 address MUST NOT appear more than once in the 663 Address vector; 665 o If the Address vector includes multiple IPv6 addresses 666 assigned to the router's interfaces, such addresses 667 MUST appear back to back inside the Address vector. 669 - Each address appearing in the Address vector MUST be a 670 unicast address. 672 + Specify in the Num field the number of address elements in 673 the Address vector. 675 + Set the Index field to one. 677 6. Processing a Measurement Request at the Target 679 On receiving an MO, if a router chooses to process the packet further 680 and finds one of its unicast IPv6 addresses listed as the Target 681 Address, the router considers itself the target and MUST process the 682 received MO in the following manner. 684 The target MUST discard the packet with no further processing if the 685 received MO is not a Measurement Request. 687 The target MUST update the routing metric objects in the Metric 688 Container options if required and MAY note the measured values for 689 the complete route (especially, if the received Measurement Request 690 is likely a response to an earlier Measurement Request that the 691 target had sent to the origin with B flag set to one). 693 The target MUST generate a Measurement Reply message. The 694 Measurement Reply message MUST have the same SequenceNo field as the 695 received Measurement Request message. The received Measurement 696 Request message can be trivially converted into the Measurement Reply 697 by setting the T flag to zero. The target MAY remove the Address 698 vector from the Measurement Reply if desired. The target MUST then 699 unicast the Measurement Reply back to the origin: 701 o If the Measurement Request traveled along a global DAG (i.e., one 702 with a global RPLInstanceID), the Measurement Reply MAY be unicast 703 back to the origin along the same DAG. 705 o If the Measurement Request traveled along a hop-by-hop route with 706 a local RPLInstanceID and the A flag inside the received message 707 is set to one, the target MAY reverse the source route contained 708 in the Address vector and use it to send the Measurement Reply 709 back to the origin. 711 o If the Measurement Request traveled along a source route and the R 712 flag inside the received message is set to one, the target MAY 713 reverse the source route contained in the Address vector and use 714 it to send the Measurement Reply back to the origin. 716 If the B flag in the received Measurement Request is set to one, the 717 target SHOULD generate a new Measurement Request to measure the cost 718 of its current (or the most preferred) route to the origin. The 719 routing metrics used in the new Measurement Request MUST include the 720 routing metrics specified in the received Measurement Request. 722 7. Processing a Measurement Reply at the Origin 724 When a router receives an MO, it examines if one of its unicast IPv6 725 addresses is listed as the Origin Address. If yes, the router is the 726 origin and MUST process the received message in the following manner. 728 The origin MUST discard the packet with no further processing if the 729 received MO is not a Measurement Reply or if the origin has no 730 recollection of sending a Measurement Request with the sequence 731 number listed in the received MO. 733 The origin MUST examine the routing metric objects inside the Metric 734 Container options to evaluate the quality of the measured P2P route. 735 If a routing metric object contains local metric values recorded by 736 routers on the route, the origin MUST aggregate these local values 737 into an end-to-end value as per the aggregation rules for the metric. 739 8. Security Considerations 741 The mechanism defined in this document can potentially be used by a 742 compromised router to generate bogus Measurement Requests to 743 arbitrary target routers. Such Measurement Requests may cause CPU 744 overload in the routers in the network, drain their batteries and 745 cause traffic congestion in the network. Note that some of these 746 problems would occur even if the compromised router were to generate 747 bogus data traffic to arbitrary destinations. 749 Since a Measurement Request can travel along a source route specified 750 in the Address vector, some of the security concerns that led to the 751 deprecation of Type 0 routing header [RFC5095] may be valid here. To 752 address such concerns, the mechanism described in this document 753 includes several remedies: 755 o This document requires that a route inserted inside the Address 756 vector must be a strict source route and must not include any 757 multicast addresses. 759 o This document requires that an MO message must not cross the 760 boundaries of the RPL routing domain where it originated. A 761 router must not forward a received MO message further if the next 762 hop belongs to a different RPL routing domain. Hence, any 763 security problems associated with the mechanism would be limited 764 to one RPL routing domain. 766 o This document requires that a router must drop a received MO 767 message if the next hop address is not on-link or if it is not a 768 unicast address. 770 o This document requires that a router must check the source route 771 inside the Address vector of each received MO message to ensure 772 that it does not contain a loop involving the router. The router 773 must drop the received packet if the source route does contain 774 such a loop. This and the previous two rules protect the network 775 against some of the security concerns even if a compromised node 776 inserts a malformed Address vector inside the MO message. 778 9. IANA Considerations 780 IANA is requested to allocate new code points in the "RPL Control 781 Codes" registry for the "Measurement Object" and "Secure Measurement 782 Object" described in this document. 784 +------+---------------------------+---------------+ 785 | Code | Description | Reference | 786 +------+---------------------------+---------------+ 787 | 0x06 | Measurement Object | This document | 788 | 0x86 | Secure Measurement Object | This document | 789 +------+---------------------------+---------------+ 791 RPL Control Codes 793 10. Acknowledgements 795 Authors gratefully acknowledge the contributions of Matthias Philipp, 796 Pascal Thubert, Richard Kelsey and Zach Shelby in the development of 797 this document. 799 11. References 801 11.1. Normative References 803 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 804 Requirement Levels", BCP 14, RFC 2119, March 1997. 806 11.2. Informative References 808 [I-D.ietf-roll-p2p-rpl] 809 Goyal, M., Baccelli, E., Philipp, M., Brandt, A., and J. 810 Martocci, "Reactive Discovery of Point-to-Point Routes in 811 Low Power and Lossy Networks", draft-ietf-roll-p2p-rpl-09 812 (work in progress), March 2012. 814 [I-D.ietf-roll-routing-metrics] 815 Barthel, D., Vasseur, J., Pister, K., Kim, M., and N. 816 Dejean, "Routing Metrics used for Path Calculation in Low 817 Power and Lossy Networks", 818 draft-ietf-roll-routing-metrics-19 (work in progress), 819 March 2011. 821 [I-D.ietf-roll-rpl] 822 Brandt, A., Vasseur, J., Hui, J., Pister, K., Thubert, P., 823 Levis, P., Struik, R., Kelsey, R., Clausen, T., and T. 824 Winter, "RPL: IPv6 Routing Protocol for Low power and 825 Lossy Networks", draft-ietf-roll-rpl-19 (work in 826 progress), March 2011. 828 [I-D.ietf-roll-terminology] 829 Vasseur, J., "Terminology in Low power And Lossy 830 Networks", draft-ietf-roll-terminology-06 (work in 831 progress), September 2011. 833 [RFC5095] Abley, J., Savola, P., and G. Neville-Neil, "Deprecation 834 of Type 0 Routing Headers in IPv6", RFC 5095, 835 December 2007. 837 [RFC5826] Brandt, A., Buron, J., and G. Porcu, "Home Automation 838 Routing Requirements in Low-Power and Lossy Networks", 839 RFC 5826, April 2010. 841 [RFC5867] Martocci, J., De Mil, P., Riou, N., and W. Vermeylen, 842 "Building Automation Routing Requirements in Low-Power and 843 Lossy Networks", RFC 5867, June 2010. 845 Authors' Addresses 847 Mukul Goyal (editor) 848 University of Wisconsin Milwaukee 849 3200 N Cramer St 850 Milwaukee, WI 53211 851 USA 853 Phone: +1 414 2295001 854 Email: mukul@uwm.edu 856 Emmanuel Baccelli 857 INRIA 859 Phone: +33-169-335-511 860 Email: Emmanuel.Baccelli@inria.fr 861 URI: http://www.emmanuelbaccelli.org/ 863 Anders Brandt 864 Sigma Designs 865 Emdrupvej 26A, 1. 866 Copenhagen, Dk-2100 867 Denmark 869 Phone: +45 29609501 870 Email: abr@sdesigns.dk 872 Jerald Martocci 873 Johnson Controls 874 507 E Michigan Street 875 Milwaukee 53202 876 USA 878 Phone: +1 414 524 4010 879 Email: jerald.p.martocci@jci.com