idnits 2.17.1 draft-ietf-roll-minrank-hysteresis-of-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (See https://trustee.ietf.org/license-info/) 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 (April 27, 2011) is 4738 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) == Outdated reference: A later version (-19) exists of draft-ietf-roll-routing-metrics-01 == Outdated reference: A later version (-19) exists of draft-ietf-roll-rpl-05 == Outdated reference: A later version (-13) exists of draft-ietf-roll-terminology-01 Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Networking Working Group O. Gnawali 3 Internet-Draft P. Levis 4 Intended status: Standards Track Stanford University 5 Expires: October 29, 2011 April 27, 2011 7 The Minimum Rank Objective Function with Hysteresis 8 draft-ietf-roll-minrank-hysteresis-of-02 10 Abstract 12 The Routing Protocol for Low Power and Lossy Networks (RPL) uses 13 objective functions to construct routes that optimize or constrain 14 the routes it selects and uses. This specification describes the 15 Minimum Rank Objective Function with Hysteresis (MRHOF), an objective 16 function that selects routes that minimize a metric, while using 17 hysteresis to reduce churn in response to small metric changes. 18 MRHOF works with metrics that are additive along a route, and the 19 metric it uses is determined by the metrics RPL Destination 20 Information Object (DIO) messages advertise. 22 Status of this Memo 24 This Internet-Draft is submitted to IETF in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF), its areas, and its working groups. Note that 29 other groups may also distribute working documents as Internet- 30 Drafts. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 The list of current Internet-Drafts can be accessed at 38 http://www.ietf.org/ietf/1id-abstracts.txt. 40 The list of Internet-Draft Shadow Directories can be accessed at 41 http://www.ietf.org/shadow.html. 43 This Internet-Draft will expire on October 29, 2011. 45 Copyright Notice 47 Copyright (c) 2011 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (http://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 63 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 3. The Minimum Rank Objective Function with Hysteresis . . . . . 4 65 3.1. Computing the Path cost . . . . . . . . . . . . . . . . . 4 66 3.2. Parent Selection . . . . . . . . . . . . . . . . . . . . . 5 67 3.3. Computing Rank . . . . . . . . . . . . . . . . . . . . . . 6 68 3.4. Advertising the Path Cost . . . . . . . . . . . . . . . . 7 69 3.5. Working Without Metric Containers . . . . . . . . . . . . 7 70 4. Using MRHOF for Metric Maximization . . . . . . . . . . . . . 7 71 5. Settings of RPL parameters . . . . . . . . . . . . . . . . . . 8 72 6. MRHOF Variables and Parameters . . . . . . . . . . . . . . . . 8 73 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9 74 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 75 9. Security Considerations . . . . . . . . . . . . . . . . . . . 9 76 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 77 10.1. Normative References . . . . . . . . . . . . . . . . . . . 9 78 10.2. Informative References . . . . . . . . . . . . . . . . . . 9 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 10 81 1. Introduction 83 An objective function specifies how RPL [I-D.ietf-roll-rpl] selects 84 paths. Objective functions can choose paths based on routing metrics 85 or constraints. For example, if an RPL instance uses an objective 86 function that minimizes hop-count, RPL will select paths with minimum 87 hop count. 89 The nodes running RPL might use a number of metrics to describe a 90 link or a node [I-D.ietf-roll-routing-metrics] and make it available 91 for route selection. These metrics are advertised in RPL Destination 92 Information Object (DIO) messages using a Metric Container suboption. 93 An objective function can use these metrics to choose routes. 95 To decouple the details of an individual metric or objective function 96 from forwarding and routing, RPL describes routes through a value 97 called Rank. Rank, roughly speaking, corresponds to the distance 98 associated with a route. An objective function is responsible for 99 computing a node's advertised Rank value based on the Rank of its 100 potential parents, metrics, and other network properties. 102 This specification describes MRHOF, an objective function for RPL. 103 MRHOF uses hysteresis while selecting the path with the smallest 104 metric value. The metric that MRHOF uses is determined by the 105 metrics in the DIO Metric Container. For example, the use of MRHOF 106 with the latency metric allows RPL to find stable minimum-latency 107 paths from the nodes to a root in the DAG instance. The use of MRHOF 108 with the ETX metric allows RPL to find the stable minimum-ETX paths 109 from the nodes to a root in the DAG instance. 111 MRHOF can only be used with an additive metric that must be minimized 112 on the paths selected for routing. 114 2. Terminology 116 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 117 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 118 "OPTIONAL" in this document are to be interpreted as described in RFC 119 2119 [RFC2119]. 121 This terminology used in this document is consistent with the 122 terminologies described in [I-D.ietf-roll-terminology], 123 [I-D.ietf-roll-rpl], and [I-D.ietf-roll-routing-metrics]. 125 This document introduces two terms: 127 Selected metric: The metric chosen by the network operator to use 128 for path selection. This metric can be any additive metric 129 listed in [I-D.ietf-roll-routing-metrics]. 131 Path cost: Path cost quantifies a property of an end-to-end path. 132 Path cost is obtained by summing up the selected metric of the 133 links or nodes along the path. Path cost can be used by RPL to 134 compare different paths. 136 Worst parent: The node in the parent set with the largest path cost. 138 3. The Minimum Rank Objective Function with Hysteresis 140 The Minimum Rank Objective Function with Hysteresis, MRHOF, is 141 designed to find the paths with the smallest path cost while 142 preventing excessive churn in the network. It does so by finding the 143 minimum cost path and switching to that path only if it is shorter 144 (in terms of path cost) than the current path by at least a given 145 threshold. MRHOF may be used with any additive metric listed in 146 [I-D.ietf-roll-routing-metrics] as long the routing objective is to 147 minimize the given routing metric. 149 3.1. Computing the Path cost 151 Nodes compute the path cost for each candidate neighbor reachable on 152 an interface. The Path cost represents the cost of the path, in 153 terms of the selected metric, from a node to the root of the DODAG 154 through the neighbor. 156 Root nodes (Grounded or Floating) set the variable cur_min_path_cost 157 to MIN_PATH_COST. 159 A non-root node computes the path cost for a path to the root through 160 each candidate neighbor by adding these two components: 162 1. If the selected metric is a link metric, the selected metric for 163 the link to a candidate neighbor. If the selected metric is a 164 node metric, the selected metric for the node. 166 2. The value of the selected metric in the metric container in the 167 DIO sent by that neighbor. 169 A node SHOULD compute the path cost for the path through each 170 candidate neighbor reachable through an interface. If a node cannot 171 compute the path cost for the path through a candidate neighbor, the 172 node MUST NOT select the candidate neighbor as its preferred parent, 173 with one exception. If the node does not have metrics to compute the 174 path cost through any of the candidate neighbors, it MUST join one of 175 the candidate neighbors as a leaf node. 177 If the selected metric is a link metric and the metric of the link to 178 a neighbor is not available, the path cost for the path through that 179 neighbor SHOULD be set to MAX_PATH_COST. This cost value will 180 prevent this path from being considered for path selection. 182 If the selected metric is a node metric, and the metric is not 183 available, the path cost through all the neighbors SHOULD be set to 184 MAX_PATH_COST. 186 The path cost corresponding to a neighbor SHOULD be re-computed each 187 time: 189 1. The selected metric of the link to the candidate neighbor is 190 updated. 192 2. If the selected metric is a node metric and the metric is 193 updated. 195 3. A node receives a new metric advertisement from the candidate 196 neighbor. 198 This computation MAY also be performed periodically. Too much delay 199 in updating the path cost after the metric is updated or a new metric 200 advertisement is received can lead to stale Rank or parent set. 202 3.2. Parent Selection 204 After computing the path cost for all the candidate neighbors 205 reachable through an interface for the current DODAG iteration, a 206 node selects the preferred parent. This process is called parent 207 selection. Parent Selection SHOULD be performed each time: 209 1. The path cost for an existing candidate neighbor, including the 210 preferred parent, changes. This condition can be checked 211 immediately after the path cost is computed. 213 2. A new candidate neighbor is inserted into the neighbor table. 215 The parent selection MAY be deferred until a later time. Deferring 216 the parent selection can delay the use of better paths available in 217 the network. 219 A node MUST select a candidate neighbor as its preferred parent if 220 the path cost corresponding to that neighbor is smaller than the path 221 cost corresponding to the rest of the neighbors, except as indicated 222 below: 224 1. If the smallest path cost for paths through the candidate 225 neighbors is smaller than cur_min_path_cost by less than 226 PARENT_SWITCH_THRESHOLD, the node MAY continue to use the current 227 preferred parent. 229 2. If there are multiple paths with the smallest path cost and the 230 smallest path cost is smaller than cur_min_path_cost by at least 231 PARENT_SWITCH_THRESHOLD, a node MAY use a different objective 232 function to select the preferred parent among the candidate 233 neighbors on the path with the minimum cost. 235 3. A node MAY declare itself as a Floating root, and hence no 236 preferred parent, depending on the configuration. 238 4. If the selected metric for a link is greater than 239 MAX_LINK_METRIC, the node SHOULD exclude that link from 240 consideration for parent selection. 242 5. If cur_min_path_cost is greater than MAX_PATH_COST, the node MAY 243 declare itself as a Floating root. 245 6. If the configuration disallows a node to be a Floating root and 246 no neighbors are discovered, the node does not have a preferred 247 parent, and MUST set cur_min_path_cost to MAX_PATH_COST. 249 Except in the cases above, the candidate neighbor on the path with 250 the smallest path cost is the preferred parent. A node MAY include a 251 total of PARENT_SET_SIZE candidate neighbors in the parent set. The 252 cost of path through the nodes in the parent set is smaller than or 253 equal to the cost of the paths through any of the nodes that are not 254 in the parent set. If the cost of the path through the preferred 255 parent and the worst parent is too large, a node MAY keep a smaller 256 parent set. 258 3.3. Computing Rank 260 The DAG roots set their rank to MIN_PATH_COST for the selected 261 metric. 263 Once a non-root node selects its parent set, it can use the following 264 table to covert the the path cost of the worst parent (written as 265 Cost in the table) to its rank: 267 +--------------------+------------+ 268 | Node/link Metric | Rank | 269 +--------------------+------------+ 270 | Node Energy | 255 - Cost | 271 | Hop-Count | Cost | 272 | Latency | Cost/65536 | 273 | Link Quality Level | Cost | 274 | ETX | Cost | 275 +--------------------+------------+ 277 Table 1: Conversion of metric to rank. 279 Nodes MUST support at least one of the above metrics. Nodes SHOULD 280 support the ETX metric. 282 Node rank is undefined for these node/link metrics: Node state and 283 attributes, throughput, and link color. If the rank is undefined, 284 the node MUST join one of the neighbors as a leaf node. 286 3.4. Advertising the Path Cost 288 Once the preferred parent is selected, the node sets its 289 cur_min_path_cost variable to the path cost corresponding to the 290 preferred parent. Thus, cur_min_path_cost is the cost of the minimum 291 cost path from the node to the root. The value of the 292 cur_min_path_cost is carried in the metric container corresponding to 293 the selected metric when DIO messages are sent. 295 3.5. Working Without Metric Containers 297 In the absence of metric container, MRHOF uses ETX as its metric. It 298 locally computes the ETX of links to its neighbors and adds this 299 value to their advertised Rank to compute the associated Rank of 300 routes. Once parent selection and rank computation is performed 301 using the ETX metric, the node advertises a Rank equal to the ETX 302 cost and SHOULD NOT include a metric container in its DIO messages. 304 4. Using MRHOF for Metric Maximization 306 MRHOF cannot be directly used for parent selection using metrics 307 which require finding paths with maximum value of the selected 308 metric, such as path reliability. It is possible to convert such a 309 metric maximization problem to a metric minimization problem and use 310 MRHOF provided: 312 There is a fixed and well-known maximum metric value corresponding 313 to the best path. This is the path cost for the DAG root. 314 Example, the best link reliability has a value of 1. 316 Metrics are all positive. Example, link reliability is always 317 positive. 319 For metrics meeting the above conditions, the problem of maximizing 320 the metric value is equivalent to minimizing the negative of the 321 metric value. MRHOF is not required to work with these metrics. 323 5. Settings of RPL parameters 325 The MinHopRankIncrease parameter MUST be set to 1. 327 6. MRHOF Variables and Parameters 329 MRHOF uses the following variable: 331 cur_min_path_cost: The cost of the path from a node through its 332 preferred parent to the root computed at the last parent 333 selection. 335 MRHOF uses the following parameters: 337 MAX_LINK_METRIC: Maximum allowed value for the selected link 338 metric for each link on the path. 340 MAX_PATH_COST: Maximum allowed value for the path metric of a 341 selected path. 343 MIN_PATH_COST: The minimum allowed value for the path metric of 344 the selected path. 346 PARENT_SWITCH_THRESHOLD: The difference between metric of the path 347 through the preferred parent and the minimum-metric path in order 348 to trigger the selection of a new preferred parent. 350 PARENT_SET_SIZE: The number of candidate parents, including the 351 preferred parent, in the parent set. 353 The parameter values are assigned depending on the selected metric. 354 The best values for these parameters should be experimentally 355 determined. The working group has long experience routing with the 356 ETX metric. Based on those experiences, these ETX parameters are 357 known to work in many settings: 359 MAX_LINK_METRIC: 10. Disallow links with greater than 10 expected 360 transmission count on the selected path. 362 MAX_PATH_COST: 100. Disallow paths with greater than 100 expected 363 transmission count. 365 MIN_PATH_COST: 0. At root, the expected transmission count is 0. 367 PARENT_SWITCH_THRESHOLD: 1.5. Switch to a new path only if it is 368 expected to require at least 1.5 fewer transmission than the 369 current path. 371 PARENT_SET_SIZE: 3. If the preferred parent is not available, two 372 candidate parents are still available without triggering a new 373 round of route discovery. 375 7. Acknowledgements 377 Thanks to Antonio Grilo, Nicolas Tsiftes, Matteo Paris, JP Vasseur, 378 and Phoebus Chen for their comments. 380 8. IANA Considerations 382 This specification requires an allocated OCP. A value of 1 is 383 requested. 385 9. Security Considerations 387 Security considerations to be developed in accordance to the output 388 of the WG. 390 10. References 392 10.1. Normative References 394 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 395 Requirement Levels", BCP 14, RFC 2119, March 1997. 397 10.2. Informative References 399 [I-D.ietf-roll-routing-metrics] 400 Vasseur, J. and D. Networks, "Routing Metrics used for 401 Path Calculation in Low Power and Lossy Networks", 402 draft-ietf-roll-routing-metrics-01 (work in progress), 403 October 2009. 405 [I-D.ietf-roll-rpl] 406 Winter, T., Thubert, P., and R. Team, "RPL: IPv6 Routing 407 Protocol for Low power and Lossy Networks", 408 draft-ietf-roll-rpl-05 (work in progress), December 2009. 410 [I-D.ietf-roll-terminology] 411 Vasseur, J., "Terminology in Low power And Lossy 412 Networks", draft-ietf-roll-terminology-01 (work in 413 progress), May 2009. 415 Authors' Addresses 417 Omprakash Gnawali 418 Stanford University 419 S255 Clark Center, 318 Campus Drive 420 Stanford, CA 94305 421 USA 423 Phone: +1 650 725 6086 424 Email: gnawali@cs.stanford.edu 426 Philip Levis 427 Stanford University 428 358 Gates Hall, Stanford University 429 Stanford, CA 94305 430 USA 432 Email: pal@cs.stanford.edu