idnits 2.17.1 draft-ietf-manet-olsrv2-metrics-rationale-02.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 contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (February 22, 2013) is 4078 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-19) exists of draft-ietf-manet-olsrv2-17 Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Mobile Ad hoc Networking (MANET) C. Dearlove 3 Internet-Draft BAE Systems ATC 4 Intended status: Informational T. Clausen 5 Expires: August 26, 2013 LIX, Ecole Polytechnique, France 6 P. Jacquet 7 Alcatel-Lucent Bell Labs 8 February 22, 2013 10 Link Metrics for the Mobile Ad Hoc Network (MANET) Routing Protocol 11 OLSRv2 - Rationale 12 draft-ietf-manet-olsrv2-metrics-rationale-02 14 Abstract 16 OLSRv2 includes the ability to assign metrics to links and to use 17 those metrics to allow routing by other than minimum hop count 18 routes. This document provides a historic record of the rationale 19 for, and design considerations behind, how link metrics were included 20 in OLSRv2. 22 Status of This Memo 24 This Internet-Draft is submitted 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). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 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 This Internet-Draft will expire on August 26, 2013. 39 Copyright Notice 41 Copyright (c) 2013 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 This document may contain material from IETF Documents or IETF 55 Contributions published or made publicly available before November 56 10, 2008. The person(s) controlling the copyright in some of this 57 material may not have granted the IETF Trust the right to allow 58 modifications of such material outside the IETF Standards Process. 59 Without obtaining an adequate license from the person(s) controlling 60 the copyright in such materials, this document may not be modified 61 outside the IETF Standards Process, and derivative works of it may 62 not be created outside the IETF Standards Process, except to format 63 it for publication as an RFC or to translate it into languages other 64 than English. 66 Table of Contents 68 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 69 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 70 3. Applicability . . . . . . . . . . . . . . . . . . . . . . . . 6 71 4. Motivational Scenarios . . . . . . . . . . . . . . . . . . . . 7 72 5. Link Metrics . . . . . . . . . . . . . . . . . . . . . . . . . 9 73 5.1. Link Metric Properties . . . . . . . . . . . . . . . . . . 9 74 5.2. Link Metric Types . . . . . . . . . . . . . . . . . . . . 10 75 5.3. Directional Link Metrics . . . . . . . . . . . . . . . . . 11 76 5.4. Reporting Link and Neighbor Metrics . . . . . . . . . . . 12 77 5.5. Defining Incoming Link Metrics . . . . . . . . . . . . . . 13 78 5.6. Link Metric Values . . . . . . . . . . . . . . . . . . . . 14 79 6. MPRs with Link Metrics . . . . . . . . . . . . . . . . . . . . 16 80 6.1. Flooding MPRs . . . . . . . . . . . . . . . . . . . . . . 16 81 6.2. Routing MPRs . . . . . . . . . . . . . . . . . . . . . . . 18 82 6.3. Relationship Between MPR Sets . . . . . . . . . . . . . . 21 83 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 84 8. Security Considerations . . . . . . . . . . . . . . . . . . . 24 85 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 25 86 10. Informative References . . . . . . . . . . . . . . . . . . . . 26 87 Appendix A. MPR Routing Property . . . . . . . . . . . . . . . . 27 89 1. Introduction 91 The Optimized Link State Routing Protocol version 1 (OLSRv1) 92 [RFC3626] is a proactive routing protocol for Mobile Ad hoc NETworks 93 (MANETs) [RFC2501]. OLSRv1 finds shortest, defined as minimum number 94 of hops, routes from a router to all possible destinations. 96 Using only minimum hop routes may result in what are, in practice, 97 inferior routes. Some examples are given in Section 4. Thus, one of 98 the distinguishing features of the Optimized Link State Routing 99 Protocol version 2 (OLSRv2) [OLSRv2] is the introduction of the 100 ability to select routes using link metrics other than the number of 101 hops. 103 During the development of OLSRv2 the working group and authors 104 repeatedly discussed how and why some choices were made in the 105 protocol specification, particularly at the metric integration level. 106 Some of the issues may be non-intuitive and this document is 107 presented as a record of the considerations and decisions to provide 108 informational discussion about motivation and historic design 109 choices. This document is intended to be useful as a reference if 110 those questions arise again. 112 OLSRv2 essentially first determines local link metrics from 1-hop 113 neighbors, these being defined by a process outside OLSRv2, then 114 distributes required link metric values in HELLO messages and TC 115 messages, and then finally forms routes with minimum total link 116 metric. Using a definition of route metric other than number of hops 117 is a natural extension that is commonly used in link state protocols. 119 Use of the extensible message format [RFC5444] by OLSRv2 has allowed 120 the addition, by OLSRv2, of link metric information to the HELLO 121 messages defined in the MANET NeighborHood Discovery Protocol (NHDP) 122 [RFC6130] as well as inclusion in the Topology Control (TC) messages 123 defined in [OLSRv2]. 125 A metric-based route selection processes for OLSRv2 could have been 126 handled as an extension to OLSRv2. However in this case, legacy 127 OLSRv2 routers, which would not recognize any link metric 128 information, would still attempt to use minimum hop-count routes. 129 This would mean that, in effect, routers differed over their 130 valuation of links and routes. This would have led to the 131 fundamental routing problem of "looping". Thus if metric-based route 132 selection were to have been considered only as an extension to 133 OLSRv2, then routers which did, and routers which did not, implement 134 the extension would not have been able to interoperate. This would 135 have been a significant limitation of such an extension. Link 136 metrics were therefore included as standard in OLSRv2. 138 This document discusses the motivation and design rationale behind 139 how link metrics were included in OLSRv2. The principal issues 140 involved when including link metrics in OLSRv2 were: 142 o Assigning metrics to links involved considering separate metrics 143 for the two directions of a link, with the receiving router 144 determining the metric from transmitter to receiver. A metric 145 used by OLSRv2 may be either of: 147 * A link metric, the metric of a specific link from an OLSRv2 148 interface of the transmitting router to an OLSRv2 interface of 149 the receiving router. 151 * A neighbor metric, the minimum of the link metrics between two 152 OLSRv2 routers, in the indicated direction. 154 These metrics are necessarily the same when these routers each 155 have a single OLSRv2 interface, but may differ when either has 156 more. HELLO messages may include both link metrics and neighbor 157 metrics. TC messages include only neighbor metrics. 159 o Metrics as used in OLSRv2 are defined to be dimensionless and 160 additive. The assignment of metrics, including their relationship 161 to real parameters such as data rate, loss rate and delay, is 162 outside the scope of OLSRv2, which simply uses these metrics in a 163 consistent manner. However by use of a registry of metric types 164 (employing extended types of a single address block TLV type), 165 routers can be configured to use only a subset of the available 166 metric types. 168 o The separation of the two functions performed by MPRs in OLSRv1, 169 optimized flooding and reduced topology advertisement for routing, 170 into separate sets of MPRs in OLSRv2 [OLSRv2], denoted "flooding 171 MPRs" and "routing MPRs". Flooding MPRs can be calculated as in 172 [RFC3626], but the use of link metrics in OLSRv2 can improve the 173 MPR selection. Routing MPRs need a metric-aware selection 174 algorithm. The selection of routing MPRs guarantees the use of 175 minimum distance routes using the chosen metric, while using only 176 symmetric 2-hop neighborhood information from HELLO messages and 177 routing MPR selector information from TC messages. 179 o The protocol Information Bases defined in OLSRv2 include required 180 metric values. This has included additions to the protocol 181 Information Bases defined in NHDP [RFC6130] when used by OLSRv2. 183 2. Terminology 185 All terms introduced in [RFC5444], including "message" and "TLV", are 186 to be interpreted as described there. 188 All terms introduced in [RFC6130], including "MANET interface", 189 "HELLO message", "heard", "link", "symmetric link", "1-hop neighbor", 190 "symmetric 1-hop neighbor", "2-hop neighbor", "symmetric 2-hop 191 neighbor", and "symmetric 2-hop neighborhood", are to be interpreted 192 as described there. 194 All terms introduced in [OLSRv2], including "router", "OLSRv2 195 interface", "willingness", "MultiPoint Relay (MPR)", "MPR selector", 196 and "MPR flooding" are to be interpreted as described there. 198 3. Applicability 200 The objective of this document is to retain the design considerations 201 behind how link metrics were included in [OLSRv2]. This document 202 does not prescribe any behavior, but explains some aspects of the 203 operation of OLSRv2. 205 4. Motivational Scenarios 207 The basic situation that suggests the desirability of use of routes 208 other than minimum hop routes is shown in Figure 1. 210 A ----- X ----- B 211 \ / 212 \ / 213 Y ------- Z 215 Figure 1 217 The minimum hop route from A to B is via X. However if the links A to 218 X and X to B are poor (e.g., having low data rate or being 219 unreliable) but the links A to Y, Y to Z and Z to B are better (e.g., 220 having reliable high data rate) then the route A to B via Y and Z may 221 be preferred to that via X. 223 There are other situations where, even if the avoidance of some links 224 does not show immediately obvious benefits to users, their use should 225 be discouraged. Consider a network with many short range links, and 226 a few long range links. Use of minimum hop routes will immediately 227 lead to heavy use of the long range links. This will be particularly 228 undesirable if those links achieve their longer range through reduced 229 data rate, or through being less reliable. However, even if the long 230 range links have the same characteristics as the short range links, 231 it may be better to reserve usage of the long range links for when 232 this usage is particularly valuable - for example when the use of one 233 long range link saves several short range links, rather than the 234 single link saving that is all that is needed for a minimum hop 235 route. 237 A related case is that of a privileged relay. An example is an 238 aerial router in an otherwise ground based network. The aerial 239 router may have a link to many, or even all, other routers. That 240 would lead to all routers attempting to send all their traffic (other 241 than to symmetric 1-hop neighbors and some symmetric 2-hop neighbors) 242 via the aerial router. It may however be important to reserve that 243 capacity for cases where the aerial router is actually essential, 244 such as if the ground based portion of the network is not connected. 246 Other cases may involve attempts to avoid areas of congestion, to 247 route around insecure routers (by preference, but prepared to use 248 them if there is no other alternative) and routers attempting to 249 discourage their use as relays due to, for example, limited battery 250 power. OLSRv2 does have another mechanism to aid in this, a router's 251 willingness to act as an MPR. However there are cases where that 252 cannot help, but where use of non-minimum hop routes could. 254 Similarly, note that OLSRv2's optional use of link quality (through 255 its use of [RFC6130]) is not a solution to these problems. Use of 256 link quality as specified in [RFC6130] allows a router to decline to 257 use a link, not only on its own, but on all routers' behalf. It does 258 not, for example, allow the use of a link otherwise determined to be 259 too low quality to be generally useful, as part of a route where no 260 better links exist. These mechanisms (link quality and link metrics) 261 solve distinctly different problems. 263 It should also be noted that the loop-free property of OLSRv2 applies 264 strictly only in the static state. When the network topology is 265 changing, and when messages can be lost, it is possible for transient 266 loops to form. However with update rates appropriate to the rate of 267 topology change, such loops will be sufficiently rare. Changing link 268 metrics is a form of network topology change, and should be limited 269 to a rate slower than the message information update rate (defined by 270 the parameters HELLO_INTERVAL, HELLO_MIN_INTERVAL, REFRESH_INTERVAL, 271 TC_INTERVAL and TC_MIN_INTERVAL). 273 5. Link Metrics 275 This section describes the required and selected properties of the 276 link metrics used in OLSRv2, followed by implementation details 277 achieving those properties. 279 5.1. Link Metric Properties 281 Link metrics in OLSRv2 are: 283 o Dimensionless. While they may, directly or indirectly, correspond 284 to specific physical information (such as delay, loss rate or data 285 rate), this knowledge is not used by OLSRv2. Instead, generating 286 the metric value is the responsibility of a mechanism external to 287 OLSRv2. 289 o Additive, so that the metric of a route is the sum of the metrics 290 of the links forming that route. Note that this requires a metric 291 where a low value of a link metric indicates a "good" link and a 292 high value of a link metric indicates a "bad" link, and the former 293 will be preferred to the latter. 295 o Directional, the metric from router A to router B need not be the 296 same as the metric from router B to router A, even when using the 297 same OLSRv2 interfaces. At router A, a link metric from router B 298 to router A is referred to as an incoming link metric, while a 299 link metric from router A to router B is referred to as an 300 outgoing link metric. (These are, of course, reversed at router 301 B.) 303 o Specific to a pair of OLSRv2 interfaces, so that if there is more 304 than one link from router A to router B, each has its own link 305 metric in that direction. There is also an overall metric, a 306 "neighbor metric", from router A to router B (its 1-hop neighbor). 307 This is the minimum value of the link metrics from router A to 308 router B, considering symmetric links only; it is undefined if 309 there are no such symmetric links. A neighbor metric from one 310 router to another is always equal to a link metric in the same 311 direction between OLSRv2 interfaces of those routers. When 312 referring to a specific OLSRv2 interface (for example in a Link 313 Tuple or a HELLO message sent on that OLSRv2 interface) a link 314 metric always refers to a link on that OLSRv2 interface, to or 315 from the indicated 1-hop neighbor OLSRv2 interface, while a 316 neighbor metric may be equal to a link metric to and/or from 317 another OLSRv2 interface. 319 5.2. Link Metric Types 321 There are various physical characteristics that may be used to define 322 a link metric. Some examples, which also illustrate some 323 characteristics of metrics that result, are: 325 o Delay is a straightforward metric, as it is naturally additive, 326 the delay of a multi-link route is the sum of the delays of the 327 links. This does not directly take into account delays due to 328 routers (such as due to router queues or transiting packets 329 between router interfaces), rather than links, but these delays 330 can be divided among incoming and outgoing links. 332 o Probability of loss on a link is, as long as probabilities of loss 333 are small and independent, approximately additive. (A slightly 334 more accurate approach is using a negatively scaled logarithm of 335 the probability of not losing a packet.) If losses are not 336 independent then this will be pessimistic. 338 o Data rates are not additive, it even has the wrong characteristic 339 of being good when high, bad when low; thus a mapping that inverts 340 its ordering must be applied. Such a mapping can, at best, only 341 produce a metric that it is acceptable to treat as additive. 342 Consider, for example, a preference for a route that maximizes the 343 minimum data rate link on the route, and then prefers a route with 344 the fewest links of each data rate from the lowest. If links may 345 be of three discrete data rates, "high", "medium", and "low", then 346 this preference can be achieved, on the assumption that no route 347 will have more than 10 links, with metric values of 1, 10 and 100 348 for the three data rates. 350 If routes can have more than 10 links, the range of metrics must 351 be increased; this was one reason for a preference for a wide 352 "dynamic range" of link metric values. Depending on the ratios of 353 the numerical values of the three data rates, the same effect may 354 be achieved by using a scaling of an inverse power of the 355 numerical values of the data rates. For example if the three data 356 rates were 2, 5 and 10 Mbit/s, then a possible mapping would be 357 the fourth power of 10 Mbit/s divided by the data rate, giving 358 metric values of 625, 16 and 1 (good for up to 16 links in a 359 route). This mapping can be extended to a system with more data 360 rate values, for example giving a 4 Mbit/s data rate a metric 361 value of about 39. This may lose the capability to produce an 362 absolutely maximum minimum data rate route, but will usually 363 produce either that, or something close (and at times maybe 364 better, is a route of three 5 Mbit/s links really better than one 365 of a single 4 Mbit/s link?). Specific metrics will need to define 366 the mapping. 368 There are also many other possible metrics, including using physical 369 layer information (such as signal to noise ratio, and error control 370 statistics) and information such as packet queuing statistics. 372 In a well-designed network, all routers will use the same metric 373 type. It will not produce good routes if, for example, some link 374 metrics are based on data rate and some on path loss (except to the 375 extent that these may be correlated). How to achieve this is an 376 administrative matter, outside the scope of OLSRv2. In fact even the 377 actual physical meanings of the metrics is outside the scope of 378 OLSRv2. This is because new metrics may be added in the future, for 379 example as data rates increase, and may be based on new, possibly 380 non-physical, considerations, for example financial cost. Each such 381 type will have a metric type number. Initially a single link metric 382 type zero is defined as indicating a dimensionless metric with no 383 predefined physical meaning. 385 An OLSRv2 router is instructed which single link metric type to use 386 and recognize, without knowing whether it represents delay, 387 probability of loss, data rate, cost or any other quantity. This 388 recognized link metric type number is a router parameter, and subject 389 to change in case of reconfiguration, or possibly the use of a 390 protocol (outside the scope of OLSRv2) permitting a process of link 391 metric type agreement between routers. 393 The use of link metric type numbers also suggests the possibility of 394 use of multiple link metric types and multiple network topologies. 395 This is a possible future extension to OLSRv2. To allow for that 396 future possibility, the sending of more than one metric, of different 397 physical types, which should otherwise not be done for reasons of 398 efficiency, is not prohibited, but types other than that configured 399 will be ignored. 401 The following three sections assume a chosen single link metric type, 402 of unspecified physical nature. 404 5.3. Directional Link Metrics 406 OLSRv2 uses only "symmetric" (bidirectional) links, which may carry 407 traffic in either direction. A key decision was whether these links 408 should each be assigned a single metric, used in both directions, or 409 a metric in each direction, noting that: 411 o Links can have different characteristics in each direction, use of 412 directional link metrics recognizes this. 414 o In many (possibly most) cases, the two ends of a link will 415 naturally form different views as to what the link metric should 416 be. To use a single link metric requires a coordination between 417 the two that can be avoided if using directional metrics. Note 418 that if using a single metric, it would be essential that the two 419 ends agree as to its value, otherwise it is possible for looping 420 to occur. This problem does not occur for directional metrics. 422 Based on these considerations, directional metrics are used in 423 OLSRv2. Each router must thus be responsible for defining the metric 424 in one direction only. This could have been in either direction, 425 i.e., that a router is responsible for either incoming or outgoing 426 link metrics, as long as the choice is universal. The former 427 (incoming) case is used in OLSRv2 because, in general, receiving 428 routers have more information available to determine link metrics 429 (for example received signal strength, interference levels, and error 430 control coding statistics). 432 Note that, using directional metrics, if router A defines the metric 433 of the link from router B to router A, then router B must use router 434 A's definition of that metric on that link in that direction. 435 (Router B could, if appropriate, use a bad mismatch between 436 directional metrics as a reason to discontinue use of this link, 437 using the link quality mechanism in [RFC6130].) 439 5.4. Reporting Link and Neighbor Metrics 441 Links, and hence link metrics, are reported in HELLO messages. A 442 router must report incoming link metrics in its HELLO messages in 443 order that these are each available at the other end of the link. 444 This means that, for a symmetric link, both ends of the link will 445 know both of the incoming and outgoing link metrics. 447 As well as advertising incoming link metrics, HELLO messages also 448 advertise incoming neighbor metrics. These are used for routing MPR 449 selection (see Section 6.2), which requires use of the lowest metric 450 link between two routers when more than one link exists. This 451 neighbor metric may be using another OLSRv2 interface, and hence the 452 link metric alone is insufficient. 454 Metrics are also reported in TC messages. It can be shown that these 455 need to be outgoing metrics: 457 o Router A must be responsible for advertising a metric from router 458 A to router B in TC messages. This can be seen by considering a 459 route connecting single OLSRv2 interface routers P to Q to R to S. 460 Router P receives its only information about the link from R to S 461 in the TC messages transmitted by router R, which is an MPR of 462 router S (assuming that only MPR selectors are reported in TC 463 messages). Router S may not even transmit TC messages (if no 464 routers have selected it as an MPR and it has no attached networks 465 to report). So any information about the metric of the link from 466 R to S must also be included in the TC messages sent by router R, 467 hence router R is responsible for reporting the metric for the 468 link from R to S. 470 o In a more general case, where there may be more than one link from 471 R to S, the TC message must, in order that minimum metric routes 472 can be constructed (e.g., by router P) report the minimum of these 473 outgoing link metrics, i.e., the outgoing neighbor metric from R 474 to S. 476 In this example, router P also receives information about the 477 existence of a link between Q and R in the HELLO messages sent by 478 router Q. Without the use of metrics, this link could be used by 479 OLSRv2 for two hop routing to router R, using just HELLO messages 480 sent by router Q. For this property (which accelerates local route 481 formation) to be retained (from OLSRv1) router P must receive the 482 metric from Q to R in HELLO messages sent by router Q. This indicates 483 that router Q must be responsible for reporting the metric for the 484 outgoing link from Q to R. This is in addition to the incoming link 485 metric information that a HELLO message must report. Again, in 486 general, this must be the outgoing neighbor metric, rather than the 487 outgoing link metric. 489 In addition, Section 6.1 offers an additional reason for reporting 490 outgoing neighbor metrics in HELLO messages, without which metrics 491 can properly affect only routing, not flooding. 493 Note that there is no need to report an outgoing link metric in a 494 HELLO message. The corresponding 1-hop neighbor knows that value, it 495 specified it. Furthermore, for 2-hop neighborhood use, neighbor 496 metrics are required (as these will, in general, not use the same 497 OLSRv2 interface). 499 5.5. Defining Incoming Link Metrics 501 When a router reports a 1-hop neighbor in a HELLO message, it may do 502 so for the first time with link status HEARD. As the router is 503 responsible for defining and reporting incoming link metrics, it must 504 evaluate that metric, and attach that link metric to the appropriate 505 address (which will have link status HEARD) in the next HELLO message 506 reporting that address on that OLSRv2 interface. There will, at this 507 time, be no outgoing link metric available to report, but a router 508 must be able to immediately decide on an incoming link metric once it 509 has heard a 1-hop neighbor on an OLSRv2 interface for the first time. 511 This is because, when receiving a HELLO message from this router, the 512 1-hop neighbor seeing its own address listed with link status HEARD 513 will (unless link quality indicates otherwise) immediately consider 514 that link to be SYMMETRIC, advertise it with that link status in 515 future HELLO messages, and use it (for MPR selection and data traffic 516 forwarding). 518 It may, depending on the physical nature of the link metric, be too 519 early for an ideal decision as to that metric, however a choice must 520 be made. The metric value may later be refined based on further 521 observation of HELLO messages, other message transmissions between 522 the routers, or other observations of the environment. It will 523 probably be best to over-estimate the metric if initially uncertain 524 as to its value, to discourage, rather than over-encourage, its use. 525 If no information other than the receipt of the HELLO message is 526 available, then a conservative maximum link metric value, denoted 527 MAXIMUM_METRIC in [OLSRv2], should be used. 529 5.6. Link Metric Values 531 Link metric values are recorded in LINK_METRIC TLVs, defined in 532 [OLSRv2], using a compressed representation that occupies 12 bits. 533 The use of 12 bits is convenient because, when combined with 4 flag 534 bits of additional information, described below, this results in a 2 535 octet value field. However the use of 12 bits was a consequence of a 536 design to use a modified exponent/mantissa form with the following 537 characteristics: 539 o The values represented are to be positive integers starting 1, 2, 540 ... 542 o The maximum value represented should be close to, but less than 543 2^24 (^ denotes exponentiation in this section). This is so that 544 with a route limited to no more than 255 hops, the maximum route 545 metric is less than 2^32, i.e., can be stored in 32 bits. (The 546 link metric value can be stored in 24 bits.) 548 A representation, modified from an exponent/mantissa form with e bits 549 of exponent and m bits of mantissa, and which has the first of these 550 properties is one that starts at 1, then is incremented by 1 up to 551 2^m, then has a further 2^m increments by 2, then a further 2^m 552 increments by 4, and so on for 2^e sets of increments. 554 The position in the increment sequence, from 0 to 2^m-1, is 555 considered as a form of mantissa, and denoted a. The increment 556 sequence number, from 0 to 2^e-1, is considered as a form of 557 exponent, and denoted b. 559 The value represented by (a,b) can then be shown to be equal to (2^m+ 560 a+1)2^b-2^m. To verify this, note that: 562 o With fixed b, the difference between two values with consecutive 563 values of a is 2^b, as expected. 565 o The value represented by (b,2^m-1) is (2^m+2^m)2^b-2^m. The value 566 represented by (b+1,0) is (2^m+1)(2^(b+1))-2^m. The difference 567 between these two values is 2^(b+1), as expected. 569 The maximum represented value has b = 2^e-1 and a = 2^m-1, and is 570 (2^m+2^m)(2^(2^e-1))-2^m = 2^(2^e+m)-2^m. This is slightly less than 571 2^(2^e+m). The required 24 bit limit can be achieved if 2^e+m = 24. 572 An appropriate pair of values to achieve this is e = 4, m = 8. 574 As noted above, the 12 bit representation shares two octets with 4 575 flag bits. Putting the flag bits first, it is then natural to put 576 the exponent bits in the last four bits of the first octet, and to 577 put the mantissa bits in the second octet. The 12 consecutive bits, 578 using network byte order (most significant octet first), then 579 represent 256b+a. Note that the ordering of these 12 bit 580 representation values is the same as the ordering of the 24 bit 581 metric values. In other words, two 12 bit metrics fields can be 582 compared for equality/ordering as if they were unsigned integers. 584 The four flag bits each represent one kind of metric, defined by its 585 direction (incoming or outgoing) and whether the metric is a link 586 metric or a neighbor metric. As indicated by the flag bits set, a 587 metric value may be of any combination of these four kinds of metric. 589 6. MPRs with Link Metrics 591 MPRs are used for two purposes in OLSRv2. In both cases it is MPR 592 selectors that are actually used, MPR selectors being determined from 593 MPRs advertised in HELLO messages. 595 o Optimized Flooding. This uses the MPR selector status of 596 symmetric 1-hop neighbor routers from which messages are received 597 in order to determine if these messages are to be forwarded. MPR 598 selector status is recorded in the Neighbor Set (defined in 599 [RFC6130] and extended in [OLSRv2]), and determined from received 600 HELLO messages. 602 o Routing. Non-local link information is based on information 603 recorded in this router's Topology Information Base. That 604 information is based on received TC messages. The neighbor 605 information in these TC messages consists of addresses of the 606 originating router's advertised (1-hop) neighbors, as recorded in 607 that router's Neighbor Set (defined in [RFC6130] and extended in 608 [OLSRv2]). These advertised neighbors include all of the MPR 609 selectors of the originating router. 611 Metrics interact with these two uses of MPRs differently, as 612 described in the following two sections, and which leads to the 613 requirement for two separate sets of MPRs for these two uses when 614 using metrics. The relationship between these two sets of MPRs is 615 considered in Section 6.3. 617 6.1. Flooding MPRs 619 The essential detail of the "flooding MPR" selection specification is 620 that a router must select a set of MPRs such that a message 621 transmitted by a router, and re-transmitted by all its flooding MPRs, 622 will reach all of the selecting router's symmetric 2-hop neighbors. 624 Flooding MPR selection can ignore metrics and produce produce a 625 solution that meets the required specification. However, that does 626 not mean that metrics cannot be usefully considered in selecting 627 flooding MPRs. Consider the network in Figure 2, where numbers are 628 metrics of links in the direction away from router A, towards router 629 D. 631 3 632 A ----- B 633 | | 634 1 | | 1 635 | | 636 C ----- D 637 4 639 Figure 2 641 Which is the better flooding MPR selection by router A: B or C? If 642 the metric represents probability of message loss, then clearly 643 choosing B maximizes the probability of a message sent by A reaching 644 D. This is despite that C has a lower metric in its connection to A 645 than B does. (Similar arguments about a preference for B can be made 646 if, for example, the metric represents data rate or delay rather than 647 probability of loss.) 649 However, neither should only the second hop be considered. If this 650 example is modified to that in Figure 3, where the numbers still are 651 metrics of links in the direction away from router A, towards router 652 D: 654 3 655 A ----- B 656 | | 657 1 | | 3 658 | | 659 C ----- D 660 4 662 Figure 3 664 then it is possible that, when A is selecting flooding MPRs, 665 selecting C is preferable to selecting B. If the metrics represent 666 scaled values of delay, or the probability of loss, then selecting C 667 is clearly better. This indicates that the sum of metrics is an 668 appropriate measure to use to choose between B and C. 670 However, this is a particularly simple example. Usually it is not a 671 simple choice between two routers as a flooding MPR, each only adding 672 one router coverage. A more general process, when considering which 673 router to next add as a flooding MPR, should incorporate the metric 674 to that router, and the metric from that router to each symmetric 675 2-hop neighbor, as well as the number of newly covered symmetric 676 2-hop neighbors, and may include other factors. 678 The required specification for flooding MPR selection is in Section 679 18.4 (also using Section 18.3) of [OLSRv2]. which may use the example 680 MPR selection algorithm in Appendix B of [OLSRv2]. However, note 681 that (as in [RFC3626]) each router can make its own independent 682 choice of flooding MPRs, and flooding MPR selection algorithm, and 683 still interoperate. 685 Also note that the references above to the direction of the metrics 686 is correct: for flooding, directional metrics outward from a router 687 are appropriate, i.e., metrics in the direction of the flooding. 688 This is an additional reason for including outward metrics in HELLO 689 messages, as otherwise a metric-aware MPR selection for flooding is 690 not possible. The second hop metrics are outgoing neighbor metrics 691 because the OLSRv2 interface used for a second hop transmission may 692 not be the same as that used for the first hop reception. 694 6.2. Routing MPRs 696 The essential detail of the "routing MPR" selection specification is 697 that a router must, per OLSRv2 interface, select a set of MPRs such 698 that there is a two hop route from each symmetric 2-hop neighbor of 699 the selecting router to the selecting router, with the intermediate 700 router on each such route being a routing MPR of the selecting 701 router. 703 It is sufficient, when using an additive link metric rather than a 704 hop count, to require that these routing MPRs provide not just a two 705 hop route, but a minimum distance two hop route. In addition, a 706 router is a symmetric 2-hop neighbor even if it is a symmetric 1-hop 707 neighbor, as long as there is a two hop route from it that is shorter 708 than the one hop link from it. (The property that no routes go 709 through routers with willingness WILL_NEVER is retained. Examples 710 below assume that all routers are equally willing, with none having 711 willingness WILL_NEVER.) 713 For example, consider the network in Figure 4. Numbers are metrics 714 of links in the direction towards router A, away from router D. 715 Router A must pick router B as a routing MPR, whereas for minimum hop 716 count routing it could alternatively pick router C. Note that the use 717 of incoming neighbor metrics in this case follows the same reasoning 718 as for the directionality of metrics in TC messages, as described in 719 Section 5.4. 721 2 722 A ----- B 723 | | 724 1 | | 1 725 | | 726 C ----- D 727 3 729 Figure 4 731 In Figure 5, where numbers are metrics of links in the direction 732 towards router A, away from router C, router A must pick router B as 733 a routing MPR, but for minimum hop count routing it would not need to 734 pick any MPRs. 736 1 737 A - B 738 \ | 739 4 \ | 2 740 \| 741 C 743 Figure 5 745 In Figure 6, where numbers are metrics of links in the direction 746 towards router A, away from routers D and E, router A must pick both 747 routers B and C as routing MPRs, but for minimum hop count routing it 748 could pick either. 750 D E 751 |\ /| 752 | \ 3 / | 753 | \ / | 754 1 | \/ | 1 755 | /\ | 756 | / \ | 757 | / 2 \ | 758 |/ \| 759 B C 760 \ | 761 \ / 762 3 \ / 2 763 \ / 764 A 766 Figure 6 768 It is shown in Appendix A that selecting routing MPRs according to 769 this definition, and advertising only such links (plus knowledge of 770 local links from HELLO messages), will result in selection of lowest 771 total metric routes, even if all links (advertised or not) are 772 considered in the definition of a shortest route. 774 However the definition noted above as sufficient for routing MPR 775 selection is not necessary. For example, consider the network in 776 Figure 7, where numbers are metrics of links in the direction towards 777 router A, away from other routers; the metrics from B to C and C to B 778 are both assumed to be 2. 780 1 781 A ----- B 782 \ / 783 4 \ / 2 784 \ / 785 C ----- D ----- E 786 3 5 788 Figure 7 790 Using the above definition, A must pick both B and C as routing MPRs, 791 in order to cover the symmetric 2-hop neighbors C and D, 792 respectively. (C is a symmetric 2-hop neighbor because the route 793 length via B is shorter than the 1-hop link.) 795 However, A only needs to pick B as a routing MPR, because the only 796 reason to pick C as a routing MPR would be so that C can advertise 797 the link to A for routing - to be used by, for example, E. But A 798 knows that no other router should use the link C to A in a shortest 799 route, because routing via B is shorter. So if there is no need to 800 advertise the link from C to A, then there is no reason for A to 801 select C as a routing MPR. 803 This process of "thinning out" the routing MPR selection uses only 804 local information from HELLO messages. Using any minimum distance 805 algorithm, the router identifies shortest routes, whether one, two or 806 more hops, from all routers in its symmetric 2-hop neighborhood. It 807 then selects as MPRs all symmetric 1-hop neighbors that are the last 808 router (before the selecting router itself) on any such route. Where 809 there is more than one shortest distance route from a router, only 810 one such route is required. Alternative routes may be selected so as 811 to minimize the number of last routers - this is the equivalent to 812 the selection of a minimal set of MPRs in the non-metric case. 814 Note that this only removes routing MPRs whose selection can be 815 directly seen to be unnecessary. Consequently if (as is shown in 816 Appendix A) the first approach creates minimum distance routes, then 817 so does this process. 819 The examples in Figure 5 and Figure 6 show that use of link metrics 820 may require a router to select more routing MPRs than when not using 821 metrics, and even require a router to select routing MPRs when 822 without metrics it would not need any routing MPRs. This may result 823 in more, and larger, messages being generated, and forwarded more 824 often. Thus the use of link metrics is not without cost, even 825 excluding the cost of link metric signaling. 827 These examples consider only single OLSRv2 interface routers. 828 However if routers have more than one OLSRv2 interface, then the 829 process is unchanged, other than that if there is more than one known 830 metric between two routers (on different OLSRv2 interfaces), then, 831 considering symmetric links only (as only these are used for routing) 832 the smallest link metric, i.e., the neighbor metric, is used. There 833 is no need to calculate routing MPRs per OLSRv2 interface. That 834 requirement results from the consideration of flooding and the need 835 to avoid certain "race" conditions, which are not relevant to 836 routing, only to flooding. 838 The required specification for routing MPR selection is in Section 839 18.5 (also using Section 18.3) of [OLSRv2]. which may use the example 840 MPR selection algorithm in Appendix B of [OLSRv2]. However, note 841 that (as in [RFC3626]) each router can make its own independent 842 choice of routing MPRs, and routing MPR selection algorithm, and 843 still interoperate. 845 6.3. Relationship Between MPR Sets 847 It would be convenient if the two sets of flooding and routing MPRs 848 were the same. This can be the case if all metrics are equal, but in 849 general, for "good" sets of MPRs they are not. (A reasonable 850 definition of this is that there is no common minimal set of MPRs.) 851 If metrics are asymmetrically valued (the two sets of MPRs use 852 opposite direction metrics), or routers have multiple OLSRv2 853 interfaces (where routing MPRs can ignore this, but flooding MPRs 854 cannot) this is particularly unlikely. However even using a 855 symmetrically valued metric with a single OLSRv2 interface on each 856 router, the ideal sets need not be equal, nor is one always a subset 857 of the other. To show this, consider these examples, where all 858 lettered routers are assumed equally willing to be MPRs, and numbers 859 are bidirectional metrics for links. 861 In Figure 8, A does not require any flooding MPRs. However A must 862 select B as a routing MPR. 864 1 865 A - B 866 \ | 867 4 \ | 2 868 \| 869 C 871 Figure 8 873 In Figure 9, A must select C and D as routing MPRs. However A's 874 minimal set of flooding MPRs is just B. In this example the set of 875 routing MPRs serves as a set of flooding MPRs, but a non-minimal one 876 (although one that might be better, depending on the relative 877 importance of number of MPRs and flooding link metrics). 879 2 880 C --- E 881 / / 882 1 / / 1 883 / 4 / 884 A --- B 885 \ \ 886 1 \ \ 1 887 \ \ 888 D --- F 889 2 891 Figure 9 893 However, this is not always the case. In Figure 10, A's set of 894 routing MPRs must contain B, but need not contain C. A's set of 895 flooding MPRs need not contain B, but must contain C. (In this case, 896 flooding with A selecting B rather than C as a flooding MPR will 897 reach D, but in three hops rather than the minimum two that MPR 898 flooding guarantees.) 900 2 1 901 B - C - D 902 | / 903 1 | / 4 904 |/ 905 A 907 Figure 10 909 7. IANA Considerations 911 This document has no actions for IANA. 913 This section may be removed by the RFC Editor. 915 8. Security Considerations 917 This document does not specify any security considerations. 919 This section may be removed by the RFC Editor. 921 9. Acknowledgements 923 The authors would like to gratefully acknowledge the following people 924 for intense technical discussions, early reviews and comments on the 925 documents and its components (listed alphabetically): Brian Adamson 926 (NRL), Alan Cullen (BAE Systems), Justin Dean (NRL), Ulrich Herberg 927 (Fujitsu), Stan Ratliff (Cisco), Charles Perkins (Huawei), and 928 Henning Rogge (FGAN). 930 Finally, the authors would like to express their gratitude to Adrian 931 Farrel, for his review and comments on the later versions of this 932 document. 934 10. Informative References 936 [RFC2501] Macker, J. and S. Corson, "Mobile Ad hoc Networking 937 (MANET): Routing Protocol Performance Issues and 938 Evaluation Considerations", RFC 2501, January 1999. 940 [RFC3626] Clausen, T. and P. Jacquet, "The Optimized Link State 941 Routing Protocol", RFC 3626, October 2003. 943 [RFC5444] Clausen, T., Dean, J., Dearlove, C., and C. Adjih, 944 "Generalized MANET Packet/Message Format", RFC 5444, 945 February 2009. 947 [RFC6130] Clausen, T., Dean, J., and C. Dearlove, "Mobile Ad Hoc 948 Network (MANET) Neighborhood Discovery Protocol (NHDP)", 949 RFC 6130, April 2011. 951 [OLSRv2] Clausen, T., Dearlove, C., Jacquet, P., and U. Herberg, 952 "The Optimized Link State Routing Protocol version 2", 953 draft-ietf-manet-olsrv2-17.txt (work in progress), 954 October 2012. 956 Appendix A. MPR Routing Property 958 In order that routers can find and use shortest routes in a network 959 while using the minimum reduced topology supported by OLSRv2 (that a 960 router only advertises its MPR selectors in TC messages), routing MPR 961 selection must result in the property that there are shortest routes 962 with all intermediate routers being routing MPRs. 964 This appendix uses the following terminology and assumptions: 966 o The network is a graph of nodes connected by arcs, where nodes 967 correspond to routers with willingness not equal to WILL_NEVER 968 (except possibly at the ends of routes). An arc corresponds to 969 the set of symmetric links connecting those routers; the OLSRv2 970 interfaces used by those links are not relevant. 972 o Each arc has a metric in each direction, being the minimum of the 973 corresponding link metrics in that direction, i.e., the 974 corresponding neighbor metric. This metric must be positive. 976 o A sequence of arcs joining two nodes is referred to as a path. 978 o Node A is an MPR of node B, if corresponding router A is a routing 979 MPR of router B. 981 The required property (of using shortest routes with reduced 982 topology) is equivalent to that for any pair of distinct nodes X and 983 Z there is a shortest path from X to Z, X - Y1 - Y2 - ... - Ym - Z 984 such that Y1 is an MPR of Y2, ... Ym is an MPR of Z. Call such a 985 path a routable path, and call this property the routable path 986 property. 988 The required definition for a node X selecting MPRs is that for each 989 distinct node Z from which there is a two arc path, there is a 990 shorter, or equally short, path which is either Z - Y - X where Y is 991 an MPR of X, or is the one arc path Z - X. Note that the existence of 992 locally known, shorter, but more than two arc paths, which can be 993 used to reduce the numbers of MPRs, is not considered here. (Such 994 reductions are only when the remaining MPRs can be seen to retain all 995 necessary shortest paths, and therefore retains the required 996 property.) 998 Although this appendix is concerned with paths with minimum total 999 metric, not number of arcs (hop count), it proceeds by induction on 1000 the number of arcs in a path. Although it considers minimum metric 1001 routes with a bounded number of arcs, it then allows that number of 1002 arcs to increase so that overall minimum metric paths, regardless of 1003 the number of arcs, are considered. 1005 Specifically, the routable path property is a corollary of the 1006 property that for all positive integers n, and all distinct nodes X 1007 and Z, if there is any path from X to Z of n arcs or fewer, then 1008 there is a shortest path, from among those of n arcs or fewer, that 1009 is a routable path. This may be called the n-arc routable path 1010 property. 1012 The n-arc routable path property is trivial for n = 1, and directly 1013 follows from the definition of the MPRs of Z for n = 2. 1015 Proceeding by induction, assuming the n-arc routable path property is 1016 true for n = k, consider the case that n = k+1. 1018 Suppose that X - V1 - V2 - ... - Vk - Z is a shortest k+1 arc path 1019 from X to Z. We construct a path which has no more than k+1 arcs, has 1020 the same or shorter length (hence has the same, shortest, length 1021 considering only paths of up to k+1 arcs, by assumption) and is a 1022 routable path. 1024 First consider whether Vk is an MPR of Z. If it is not then consider 1025 the two arc path Vk-1 - Vk - Z. This can be replaced either by a one 1026 arc path Vk-1 - Z or by a two arc path Vk-1 - Wk - Z where Wk is an 1027 MPR of Z, such that the metric from Vk-1 to Z by the replacement path 1028 is no longer. In the former case (replacement one arc path) this now 1029 produces a path of length k, and the previous inductive step may be 1030 applied. In the latter case we have replaced Vk by Wk, where Wk is 1031 an MPR of Z. Thus we need only consider the case that Vk is an MPR of 1032 Z. 1034 We now apply the previous inductive step to the path X - V1 - ... - 1035 Vk-1 - Vk, replacing it by an equal length path X - W1 - ... Wm-1 - 1036 Vk, where m <= k, where this path is a routable path. Then because 1037 Vk is an MPR of Z, the path X - W1 - ... - Wm-1 - Vk - Z is a 1038 routable path, and demonstrates the n-arc routable path property for 1039 n = k+1. 1041 This thus shows that for any distinct nodes X and Z, there is a 1042 routable path using the MPR-reduced topology from X to Z, i.e., that 1043 OLSRv2 finds minimum length paths (minimum total metric routes). 1045 Authors' Addresses 1047 Christopher Dearlove 1048 BAE Systems ATC 1050 Phone: +44 1245 242194 1051 EMail: chris.dearlove@baesystems.com 1052 URI: http://www.baesystems.com/ 1054 Thomas Heide Clausen 1055 LIX, Ecole Polytechnique, France 1057 Phone: +33 6 6058 9349 1058 EMail: T.Clausen@computer.org 1059 URI: http://www.ThomasClausen.org/ 1061 Philippe Jacquet 1062 Alcatel-Lucent Bell Labs 1064 Phone: +33 6 7337 1880 1065 EMail: philippe.jacquet@alcatel-lucent.com