idnits 2.17.1 draft-ietf-manet-olsrv2-metrics-rationale-03.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 (April 9, 2013) is 4034 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- No issues found here. Summary: 0 errors (**), 0 flaws (~~), 2 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: October 11, 2013 LIX, Ecole Polytechnique 6 P. Jacquet 7 Alcatel-Lucent Bell Labs 8 April 9, 2013 10 Link Metrics for the Mobile Ad Hoc Network (MANET) Routing Protocol 11 OLSRv2 - Rationale 12 draft-ietf-manet-olsrv2-metrics-rationale-03 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 October 11, 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 Node metrics were not included in OLSRv2. Node metrics can be 169 implemented by the addition of the corresponding value to all 170 incoming link metrics by the corresponding router. 172 o The separation of the two functions performed by MPRs in OLSRv1, 173 optimized flooding and reduced topology advertisement for routing, 174 into separate sets of MPRs in OLSRv2 [OLSRv2], denoted "flooding 175 MPRs" and "routing MPRs". Flooding MPRs can be calculated as in 176 [RFC3626], but the use of link metrics in OLSRv2 can improve the 177 MPR selection. Routing MPRs need a metric-aware selection 178 algorithm. The selection of routing MPRs guarantees the use of 179 minimum distance routes using the chosen metric, while using only 180 symmetric 2-hop neighborhood information from HELLO messages and 181 routing MPR selector information from TC messages. 183 o The protocol Information Bases defined in OLSRv2 include required 184 metric values. This has included additions to the protocol 185 Information Bases defined in NHDP [RFC6130] when used by OLSRv2. 187 2. Terminology 189 All terms introduced in [RFC5444], including "message" and "TLV", are 190 to be interpreted as described there. 192 All terms introduced in [RFC6130], including "MANET interface", 193 "HELLO message", "heard", "link", "symmetric link", "1-hop neighbor", 194 "symmetric 1-hop neighbor", "2-hop neighbor", "symmetric 2-hop 195 neighbor", and "symmetric 2-hop neighborhood", are to be interpreted 196 as described there. 198 All terms introduced in [OLSRv2], including "router", "OLSRv2 199 interface", "willingness", "MultiPoint Relay (MPR)", "MPR selector", 200 and "MPR flooding" are to be interpreted as described there. 202 3. Applicability 204 The objective of this document is to retain the design considerations 205 behind how link metrics were included in [OLSRv2]. This document 206 does not prescribe any behavior, but explains some aspects of the 207 operation of OLSRv2. 209 4. Motivational Scenarios 211 The basic situation that suggests the desirability of use of routes 212 other than minimum hop routes is shown in Figure 1. 214 A ----- X ----- B 215 \ / 216 \ / 217 Y ------- Z 219 Figure 1 221 The minimum hop route from A to B is via X. However if the links A to 222 X and X to B are poor (e.g., having low data rate or being 223 unreliable) but the links A to Y, Y to Z and Z to B are better (e.g., 224 having reliable high data rate) then the route A to B via Y and Z may 225 be preferred to that via X. 227 There are other situations where, even if the avoidance of some links 228 does not show immediately obvious benefits to users, their use should 229 be discouraged. Consider a network with many short range links, and 230 a few long range links. Use of minimum hop routes will immediately 231 lead to heavy use of the long range links. This will be particularly 232 undesirable if those links achieve their longer range through reduced 233 data rate, or through being less reliable. However, even if the long 234 range links have the same characteristics as the short range links, 235 it may be better to reserve usage of the long range links for when 236 this usage is particularly valuable - for example when the use of one 237 long range link saves several short range links, rather than the 238 single link saving that is all that is needed for a minimum hop 239 route. 241 A related case is that of a privileged relay. An example is an 242 aerial router in an otherwise ground based network. The aerial 243 router may have a link to many, or even all, other routers. That 244 would lead to all routers attempting to send all their traffic (other 245 than to symmetric 1-hop neighbors and some symmetric 2-hop neighbors) 246 via the aerial router. It may however be important to reserve that 247 capacity for cases where the aerial router is actually essential, 248 such as if the ground based portion of the network is not connected. 250 Other cases may involve attempts to avoid areas of congestion, to 251 route around insecure routers (by preference, but prepared to use 252 them if there is no other alternative) and routers attempting to 253 discourage their use as relays due to, for example, limited battery 254 power. OLSRv2 does have another mechanism to aid in this, a router's 255 willingness to act as an MPR. However there are cases where that 256 cannot help, but where use of non-minimum hop routes could. 258 Similarly, note that OLSRv2's optional use of link quality (through 259 its use of [RFC6130]) is not a solution to these problems. Use of 260 link quality as specified in [RFC6130] allows a router to decline to 261 use a link, not only on its own, but on all routers' behalf. It does 262 not, for example, allow the use of a link otherwise determined to be 263 too low quality to be generally useful, as part of a route where no 264 better links exist. These mechanisms (link quality and link metrics) 265 solve distinctly different problems. 267 It should also be noted that the loop-free property of OLSRv2 applies 268 strictly only in the static state. When the network topology is 269 changing, and when messages can be lost, it is possible for transient 270 loops to form. However with update rates appropriate to the rate of 271 topology change, such loops will be sufficiently rare. Changing link 272 metrics is a form of network topology change, and should be limited 273 to a rate slower than the message information update rate (defined by 274 the parameters HELLO_INTERVAL, HELLO_MIN_INTERVAL, REFRESH_INTERVAL, 275 TC_INTERVAL and TC_MIN_INTERVAL). 277 5. Link Metrics 279 This section describes the required and selected properties of the 280 link metrics used in OLSRv2, followed by implementation details 281 achieving those properties. 283 5.1. Link Metric Properties 285 Link metrics in OLSRv2 are: 287 o Dimensionless. While they may, directly or indirectly, correspond 288 to specific physical information (such as delay, loss rate or data 289 rate), this knowledge is not used by OLSRv2. Instead, generating 290 the metric value is the responsibility of a mechanism external to 291 OLSRv2. 293 o Additive, so that the metric of a route is the sum of the metrics 294 of the links forming that route. Note that this requires a metric 295 where a low value of a link metric indicates a "good" link and a 296 high value of a link metric indicates a "bad" link, and the former 297 will be preferred to the latter. 299 o Directional, the metric from router A to router B need not be the 300 same as the metric from router B to router A, even when using the 301 same OLSRv2 interfaces. At router A, a link metric from router B 302 to router A is referred to as an incoming link metric, while a 303 link metric from router A to router B is referred to as an 304 outgoing link metric. (These are, of course, reversed at router 305 B.) 307 o Specific to a pair of OLSRv2 interfaces, so that if there is more 308 than one link from router A to router B, each has its own link 309 metric in that direction. There is also an overall metric, a 310 "neighbor metric", from router A to router B (its 1-hop neighbor). 311 This is the minimum value of the link metrics from router A to 312 router B, considering symmetric links only; it is undefined if 313 there are no such symmetric links. A neighbor metric from one 314 router to another is always equal to a link metric in the same 315 direction between OLSRv2 interfaces of those routers. When 316 referring to a specific OLSRv2 interface (for example in a Link 317 Tuple or a HELLO message sent on that OLSRv2 interface) a link 318 metric always refers to a link on that OLSRv2 interface, to or 319 from the indicated 1-hop neighbor OLSRv2 interface, while a 320 neighbor metric may be equal to a link metric to and/or from 321 another OLSRv2 interface. 323 5.2. Link Metric Types 325 There are various physical characteristics that may be used to define 326 a link metric. Some examples, which also illustrate some 327 characteristics of metrics that result, are: 329 o Delay is a straightforward metric, as it is naturally additive, 330 the delay of a multi-link route is the sum of the delays of the 331 links. This does not directly take into account delays due to 332 routers (such as due to router queues or transiting packets 333 between router interfaces), rather than links, but these delays 334 can be divided among incoming and outgoing links. 336 o Probability of loss on a link is, as long as probabilities of loss 337 are small and independent, approximately additive. (A slightly 338 more accurate approach is using a negatively scaled logarithm of 339 the probability of not losing a packet.) If losses are not 340 independent then this will be pessimistic. 342 o Data rates are not additive, it even has the wrong characteristic 343 of being good when high, bad when low; thus a mapping that inverts 344 its ordering must be applied. Such a mapping can, at best, only 345 produce a metric that it is acceptable to treat as additive. 346 Consider, for example, a preference for a route that maximizes the 347 minimum data rate link on the route, and then prefers a route with 348 the fewest links of each data rate from the lowest. If links may 349 be of three discrete data rates, "high", "medium", and "low", then 350 this preference can be achieved, on the assumption that no route 351 will have more than 10 links, with metric values of 1, 10 and 100 352 for the three data rates. 354 If routes can have more than 10 links, the range of metrics must 355 be increased; this was one reason for a preference for a wide 356 "dynamic range" of link metric values. Depending on the ratios of 357 the numerical values of the three data rates, the same effect may 358 be achieved by using a scaling of an inverse power of the 359 numerical values of the data rates. For example if the three data 360 rates were 2, 5 and 10 Mbit/s, then a possible mapping would be 361 the fourth power of 10 Mbit/s divided by the data rate, giving 362 metric values of 625, 16 and 1 (good for up to 16 links in a 363 route). This mapping can be extended to a system with more data 364 rate values, for example giving a 4 Mbit/s data rate a metric 365 value of about 39. This may lose the capability to produce an 366 absolutely maximum minimum data rate route, but will usually 367 produce either that, or something close (and at times maybe 368 better, is a route of three 5 Mbit/s links really better than one 369 of a single 4 Mbit/s link?). Specific metrics will need to define 370 the mapping. 372 There are also many other possible metrics, including using physical 373 layer information (such as signal to noise ratio, and error control 374 statistics) and information such as packet queuing statistics. 376 In a well-designed network, all routers will use the same metric 377 type. It will not produce good routes if, for example, some link 378 metrics are based on data rate and some on path loss (except to the 379 extent that these may be correlated). How to achieve this is an 380 administrative matter, outside the scope of OLSRv2. In fact even the 381 actual physical meanings of the metrics is outside the scope of 382 OLSRv2. This is because new metrics may be added in the future, for 383 example as data rates increase, and may be based on new, possibly 384 non-physical, considerations, for example financial cost. Each such 385 type will have a metric type number. Initially a single link metric 386 type zero is defined as indicating a dimensionless metric with no 387 predefined physical meaning. 389 An OLSRv2 router is instructed which single link metric type to use 390 and recognize, without knowing whether it represents delay, 391 probability of loss, data rate, cost or any other quantity. This 392 recognized link metric type number is a router parameter, and subject 393 to change in case of reconfiguration, or possibly the use of a 394 protocol (outside the scope of OLSRv2) permitting a process of link 395 metric type agreement between routers. 397 The use of link metric type numbers also suggests the possibility of 398 use of multiple link metric types and multiple network topologies. 399 This is a possible future extension to OLSRv2. To allow for that 400 future possibility, the sending of more than one metric, of different 401 physical types, which should otherwise not be done for reasons of 402 efficiency, is not prohibited, but types other than that configured 403 will be ignored. 405 The following three sections assume a chosen single link metric type, 406 of unspecified physical nature. 408 5.3. Directional Link Metrics 410 OLSRv2 uses only "symmetric" (bidirectional) links, which may carry 411 traffic in either direction. A key decision was whether these links 412 should each be assigned a single metric, used in both directions, or 413 a metric in each direction, noting that: 415 o Links can have different characteristics in each direction, use of 416 directional link metrics recognizes this. 418 o In many (possibly most) cases, the two ends of a link will 419 naturally form different views as to what the link metric should 420 be. To use a single link metric requires a coordination between 421 the two that can be avoided if using directional metrics. Note 422 that if using a single metric, it would be essential that the two 423 ends agree as to its value, otherwise it is possible for looping 424 to occur. This problem does not occur for directional metrics. 426 Based on these considerations, directional metrics are used in 427 OLSRv2. Each router must thus be responsible for defining the metric 428 in one direction only. This could have been in either direction, 429 i.e., that a router is responsible for either incoming or outgoing 430 link metrics, as long as the choice is universal. The former 431 (incoming) case is used in OLSRv2 because, in general, receiving 432 routers have more information available to determine link metrics 433 (for example received signal strength, interference levels, and error 434 control coding statistics). 436 Note that, using directional metrics, if router A defines the metric 437 of the link from router B to router A, then router B must use router 438 A's definition of that metric on that link in that direction. 439 (Router B could, if appropriate, use a bad mismatch between 440 directional metrics as a reason to discontinue use of this link, 441 using the link quality mechanism in [RFC6130].) 443 5.4. Reporting Link and Neighbor Metrics 445 Links, and hence link metrics, are reported in HELLO messages. A 446 router must report incoming link metrics in its HELLO messages in 447 order that these are each available at the other end of the link. 448 This means that, for a symmetric link, both ends of the link will 449 know both of the incoming and outgoing link metrics. 451 As well as advertising incoming link metrics, HELLO messages also 452 advertise incoming neighbor metrics. These are used for routing MPR 453 selection (see Section 6.2), which requires use of the lowest metric 454 link between two routers when more than one link exists. This 455 neighbor metric may be using another OLSRv2 interface, and hence the 456 link metric alone is insufficient. 458 Metrics are also reported in TC messages. It can be shown that these 459 need to be outgoing metrics: 461 o Router A must be responsible for advertising a metric from router 462 A to router B in TC messages. This can be seen by considering a 463 route connecting single OLSRv2 interface routers P to Q to R to S. 464 Router P receives its only information about the link from R to S 465 in the TC messages transmitted by router R, which is an MPR of 466 router S (assuming that only MPR selectors are reported in TC 467 messages). Router S may not even transmit TC messages (if no 468 routers have selected it as an MPR and it has no attached networks 469 to report). So any information about the metric of the link from 470 R to S must also be included in the TC messages sent by router R, 471 hence router R is responsible for reporting the metric for the 472 link from R to S. 474 o In a more general case, where there may be more than one link from 475 R to S, the TC message must, in order that minimum metric routes 476 can be constructed (e.g., by router P) report the minimum of these 477 outgoing link metrics, i.e., the outgoing neighbor metric from R 478 to S. 480 In this example, router P also receives information about the 481 existence of a link between Q and R in the HELLO messages sent by 482 router Q. Without the use of metrics, this link could be used by 483 OLSRv2 for two hop routing to router R, using just HELLO messages 484 sent by router Q. For this property (which accelerates local route 485 formation) to be retained (from OLSRv1) router P must receive the 486 metric from Q to R in HELLO messages sent by router Q. This indicates 487 that router Q must be responsible for reporting the metric for the 488 outgoing link from Q to R. This is in addition to the incoming link 489 metric information that a HELLO message must report. Again, in 490 general, this must be the outgoing neighbor metric, rather than the 491 outgoing link metric. 493 In addition, Section 6.1 offers an additional reason for reporting 494 outgoing neighbor metrics in HELLO messages, without which metrics 495 can properly affect only routing, not flooding. 497 Note that there is no need to report an outgoing link metric in a 498 HELLO message. The corresponding 1-hop neighbor knows that value, it 499 specified it. Furthermore, for 2-hop neighborhood use, neighbor 500 metrics are required (as these will, in general, not use the same 501 OLSRv2 interface). 503 5.5. Defining Incoming Link Metrics 505 When a router reports a 1-hop neighbor in a HELLO message, it may do 506 so for the first time with link status HEARD. As the router is 507 responsible for defining and reporting incoming link metrics, it must 508 evaluate that metric, and attach that link metric to the appropriate 509 address (which will have link status HEARD) in the next HELLO message 510 reporting that address on that OLSRv2 interface. There will, at this 511 time, be no outgoing link metric available to report, but a router 512 must be able to immediately decide on an incoming link metric once it 513 has heard a 1-hop neighbor on an OLSRv2 interface for the first time. 515 This is because, when receiving a HELLO message from this router, the 516 1-hop neighbor seeing its own address listed with link status HEARD 517 will (unless link quality indicates otherwise) immediately consider 518 that link to be SYMMETRIC, advertise it with that link status in 519 future HELLO messages, and use it (for MPR selection and data traffic 520 forwarding). 522 It may, depending on the physical nature of the link metric, be too 523 early for an ideal decision as to that metric, however a choice must 524 be made. The metric value may later be refined based on further 525 observation of HELLO messages, other message transmissions between 526 the routers, or other observations of the environment. It will 527 probably be best to over-estimate the metric if initially uncertain 528 as to its value, to discourage, rather than over-encourage, its use. 529 If no information other than the receipt of the HELLO message is 530 available, then a conservative maximum link metric value, denoted 531 MAXIMUM_METRIC in [OLSRv2], should be used. 533 5.6. Link Metric Values 535 Link metric values are recorded in LINK_METRIC TLVs, defined in 536 [OLSRv2], using a compressed representation that occupies 12 bits. 537 The use of 12 bits is convenient because, when combined with 4 flag 538 bits of additional information, described below, this results in a 2 539 octet value field. However the use of 12 bits was a consequence of a 540 design to use a modified exponent/mantissa form with the following 541 characteristics: 543 o The values represented are to be positive integers starting 1, 2, 544 ... 546 o The maximum value represented should be close to, but less than 547 2^24 (^ denotes exponentiation in this section). This is so that 548 with a route limited to no more than 255 hops, the maximum route 549 metric is less than 2^32, i.e., can be stored in 32 bits. (The 550 link metric value can be stored in 24 bits.) 552 A representation, modified from an exponent/mantissa form with e bits 553 of exponent and m bits of mantissa, and which has the first of these 554 properties is one that starts at 1, then is incremented by 1 up to 555 2^m, then has a further 2^m increments by 2, then a further 2^m 556 increments by 4, and so on for 2^e sets of increments. 558 The position in the increment sequence, from 0 to 2^m-1, is 559 considered as a form of mantissa, and denoted a. The increment 560 sequence number, from 0 to 2^e-1, is considered as a form of 561 exponent, and denoted b. 563 The value represented by (a,b) can then be shown to be equal to (2^m+ 564 a+1)2^b-2^m. To verify this, note that: 566 o With fixed b, the difference between two values with consecutive 567 values of a is 2^b, as expected. 569 o The value represented by (b,2^m-1) is (2^m+2^m)2^b-2^m. The value 570 represented by (b+1,0) is (2^m+1)(2^(b+1))-2^m. The difference 571 between these two values is 2^(b+1), as expected. 573 The maximum represented value has b = 2^e-1 and a = 2^m-1, and is 574 (2^m+2^m)(2^(2^e-1))-2^m = 2^(2^e+m)-2^m. This is slightly less than 575 2^(2^e+m). The required 24 bit limit can be achieved if 2^e+m = 24. 576 An appropriate pair of values to achieve this is e = 4, m = 8. 578 As noted above, the 12 bit representation shares two octets with 4 579 flag bits. Putting the flag bits first, it is then natural to put 580 the exponent bits in the last four bits of the first octet, and to 581 put the mantissa bits in the second octet. The 12 consecutive bits, 582 using network byte order (most significant octet first), then 583 represent 256b+a. Note that the ordering of these 12 bit 584 representation values is the same as the ordering of the 24 bit 585 metric values. In other words, two 12 bit metrics fields can be 586 compared for equality/ordering as if they were unsigned integers. 588 The four flag bits each represent one kind of metric, defined by its 589 direction (incoming or outgoing) and whether the metric is a link 590 metric or a neighbor metric. As indicated by the flag bits set, a 591 metric value may be of any combination of these four kinds of metric. 593 6. MPRs with Link Metrics 595 MPRs are used for two purposes in OLSRv2. In both cases it is MPR 596 selectors that are actually used, MPR selectors being determined from 597 MPRs advertised in HELLO messages. 599 o Optimized Flooding. This uses the MPR selector status of 600 symmetric 1-hop neighbor routers from which messages are received 601 in order to determine if these messages are to be forwarded. MPR 602 selector status is recorded in the Neighbor Set (defined in 603 [RFC6130] and extended in [OLSRv2]), and determined from received 604 HELLO messages. 606 o Routing. Non-local link information is based on information 607 recorded in this router's Topology Information Base. That 608 information is based on received TC messages. The neighbor 609 information in these TC messages consists of addresses of the 610 originating router's advertised (1-hop) neighbors, as recorded in 611 that router's Neighbor Set (defined in [RFC6130] and extended in 612 [OLSRv2]). These advertised neighbors include all of the MPR 613 selectors of the originating router. 615 Metrics interact with these two uses of MPRs differently, as 616 described in the following two sections, and which leads to the 617 requirement for two separate sets of MPRs for these two uses when 618 using metrics. The relationship between these two sets of MPRs is 619 considered in Section 6.3. 621 6.1. Flooding MPRs 623 The essential detail of the "flooding MPR" selection specification is 624 that a router must select a set of MPRs such that a message 625 transmitted by a router, and re-transmitted by all its flooding MPRs, 626 will reach all of the selecting router's symmetric 2-hop neighbors. 628 Flooding MPR selection can ignore metrics and produce produce a 629 solution that meets the required specification. However, that does 630 not mean that metrics cannot be usefully considered in selecting 631 flooding MPRs. Consider the network in Figure 2, where numbers are 632 metrics of links in the direction away from router A, towards router 633 D. 635 3 636 A ----- B 637 | | 638 1 | | 1 639 | | 640 C ----- D 641 4 643 Figure 2 645 Which is the better flooding MPR selection by router A: B or C? If 646 the metric represents probability of message loss, then clearly 647 choosing B maximizes the probability of a message sent by A reaching 648 D. This is despite that C has a lower metric in its connection to A 649 than B does. (Similar arguments about a preference for B can be made 650 if, for example, the metric represents data rate or delay rather than 651 probability of loss.) 653 However, neither should only the second hop be considered. If this 654 example is modified to that in Figure 3, where the numbers still are 655 metrics of links in the direction away from router A, towards router 656 D: 658 3 659 A ----- B 660 | | 661 1 | | 3 662 | | 663 C ----- D 664 4 666 Figure 3 668 then it is possible that, when A is selecting flooding MPRs, 669 selecting C is preferable to selecting B. If the metrics represent 670 scaled values of delay, or the probability of loss, then selecting C 671 is clearly better. This indicates that the sum of metrics is an 672 appropriate measure to use to choose between B and C. 674 However, this is a particularly simple example. Usually it is not a 675 simple choice between two routers as a flooding MPR, each only adding 676 one router coverage. A more general process, when considering which 677 router to next add as a flooding MPR, should incorporate the metric 678 to that router, and the metric from that router to each symmetric 679 2-hop neighbor, as well as the number of newly covered symmetric 680 2-hop neighbors, and may include other factors. 682 The required specification for flooding MPR selection is in Section 683 18.4 (also using Section 18.3) of [OLSRv2]. which may use the example 684 MPR selection algorithm in Appendix B of [OLSRv2]. However, note 685 that (as in [RFC3626]) each router can make its own independent 686 choice of flooding MPRs, and flooding MPR selection algorithm, and 687 still interoperate. 689 Also note that the references above to the direction of the metrics 690 is correct: for flooding, directional metrics outward from a router 691 are appropriate, i.e., metrics in the direction of the flooding. 692 This is an additional reason for including outward metrics in HELLO 693 messages, as otherwise a metric-aware MPR selection for flooding is 694 not possible. The second hop metrics are outgoing neighbor metrics 695 because the OLSRv2 interface used for a second hop transmission may 696 not be the same as that used for the first hop reception. 698 6.2. Routing MPRs 700 The essential detail of the "routing MPR" selection specification is 701 that a router must, per OLSRv2 interface, select a set of MPRs such 702 that there is a two hop route from each symmetric 2-hop neighbor of 703 the selecting router to the selecting router, with the intermediate 704 router on each such route being a routing MPR of the selecting 705 router. 707 It is sufficient, when using an additive link metric rather than a 708 hop count, to require that these routing MPRs provide not just a two 709 hop route, but a minimum distance two hop route. In addition, a 710 router is a symmetric 2-hop neighbor even if it is a symmetric 1-hop 711 neighbor, as long as there is a two hop route from it that is shorter 712 than the one hop link from it. (The property that no routes go 713 through routers with willingness WILL_NEVER is retained. Examples 714 below assume that all routers are equally willing, with none having 715 willingness WILL_NEVER.) 717 For example, consider the network in Figure 4. Numbers are metrics 718 of links in the direction towards router A, away from router D. 719 Router A must pick router B as a routing MPR, whereas for minimum hop 720 count routing it could alternatively pick router C. Note that the use 721 of incoming neighbor metrics in this case follows the same reasoning 722 as for the directionality of metrics in TC messages, as described in 723 Section 5.4. 725 2 726 A ----- B 727 | | 728 1 | | 1 729 | | 730 C ----- D 731 3 733 Figure 4 735 In Figure 5, where numbers are metrics of links in the direction 736 towards router A, away from router C, router A must pick router B as 737 a routing MPR, but for minimum hop count routing it would not need to 738 pick any MPRs. 740 1 741 A - B 742 \ | 743 4 \ | 2 744 \| 745 C 747 Figure 5 749 In Figure 6, where numbers are metrics of links in the direction 750 towards router A, away from routers D and E, router A must pick both 751 routers B and C as routing MPRs, but for minimum hop count routing it 752 could pick either. 754 D E 755 |\ /| 756 | \ 3 / | 757 | \ / | 758 1 | \/ | 1 759 | /\ | 760 | / \ | 761 | / 2 \ | 762 |/ \| 763 B C 764 \ | 765 \ / 766 3 \ / 2 767 \ / 768 A 770 Figure 6 772 It is shown in Appendix A that selecting routing MPRs according to 773 this definition, and advertising only such links (plus knowledge of 774 local links from HELLO messages), will result in selection of lowest 775 total metric routes, even if all links (advertised or not) are 776 considered in the definition of a shortest route. 778 However the definition noted above as sufficient for routing MPR 779 selection is not necessary. For example, consider the network in 780 Figure 7, where numbers are metrics of links in the direction towards 781 router A, away from other routers; the metrics from B to C and C to B 782 are both assumed to be 2. 784 1 785 A ----- B 786 \ / 787 4 \ / 2 788 \ / 789 C ----- D ----- E 790 3 5 792 Figure 7 794 Using the above definition, A must pick both B and C as routing MPRs, 795 in order to cover the symmetric 2-hop neighbors C and D, 796 respectively. (C is a symmetric 2-hop neighbor because the route 797 length via B is shorter than the 1-hop link.) 799 However, A only needs to pick B as a routing MPR, because the only 800 reason to pick C as a routing MPR would be so that C can advertise 801 the link to A for routing - to be used by, for example, E. But A 802 knows that no other router should use the link C to A in a shortest 803 route, because routing via B is shorter. So if there is no need to 804 advertise the link from C to A, then there is no reason for A to 805 select C as a routing MPR. 807 This process of "thinning out" the routing MPR selection uses only 808 local information from HELLO messages. Using any minimum distance 809 algorithm, the router identifies shortest routes, whether one, two or 810 more hops, from all routers in its symmetric 2-hop neighborhood. It 811 then selects as MPRs all symmetric 1-hop neighbors that are the last 812 router (before the selecting router itself) on any such route. Where 813 there is more than one shortest distance route from a router, only 814 one such route is required. Alternative routes may be selected so as 815 to minimize the number of last routers - this is the equivalent to 816 the selection of a minimal set of MPRs in the non-metric case. 818 Note that this only removes routing MPRs whose selection can be 819 directly seen to be unnecessary. Consequently if (as is shown in 820 Appendix A) the first approach creates minimum distance routes, then 821 so does this process. 823 The examples in Figure 5 and Figure 6 show that use of link metrics 824 may require a router to select more routing MPRs than when not using 825 metrics, and even require a router to select routing MPRs when 826 without metrics it would not need any routing MPRs. This may result 827 in more, and larger, messages being generated, and forwarded more 828 often. Thus the use of link metrics is not without cost, even 829 excluding the cost of link metric signaling. 831 These examples consider only single OLSRv2 interface routers. 832 However if routers have more than one OLSRv2 interface, then the 833 process is unchanged, other than that if there is more than one known 834 metric between two routers (on different OLSRv2 interfaces), then, 835 considering symmetric links only (as only these are used for routing) 836 the smallest link metric, i.e., the neighbor metric, is used. There 837 is no need to calculate routing MPRs per OLSRv2 interface. That 838 requirement results from the consideration of flooding and the need 839 to avoid certain "race" conditions, which are not relevant to 840 routing, only to flooding. 842 The required specification for routing MPR selection is in Section 843 18.5 (also using Section 18.3) of [OLSRv2]. which may use the example 844 MPR selection algorithm in Appendix B of [OLSRv2]. However, note 845 that (as in [RFC3626]) each router can make its own independent 846 choice of routing MPRs, and routing MPR selection algorithm, and 847 still interoperate. 849 6.3. Relationship Between MPR Sets 851 It would be convenient if the two sets of flooding and routing MPRs 852 were the same. This can be the case if all metrics are equal, but in 853 general, for "good" sets of MPRs they are not. (A reasonable 854 definition of this is that there is no common minimal set of MPRs.) 855 If metrics are asymmetrically valued (the two sets of MPRs use 856 opposite direction metrics), or routers have multiple OLSRv2 857 interfaces (where routing MPRs can ignore this, but flooding MPRs 858 cannot) this is particularly unlikely. However even using a 859 symmetrically valued metric with a single OLSRv2 interface on each 860 router, the ideal sets need not be equal, nor is one always a subset 861 of the other. To show this, consider these examples, where all 862 lettered routers are assumed equally willing to be MPRs, and numbers 863 are bidirectional metrics for links. 865 In Figure 8, A does not require any flooding MPRs. However A must 866 select B as a routing MPR. 868 1 869 A - B 870 \ | 871 4 \ | 2 872 \| 873 C 875 Figure 8 877 In Figure 9, A must select C and D as routing MPRs. However A's 878 minimal set of flooding MPRs is just B. In this example the set of 879 routing MPRs serves as a set of flooding MPRs, but a non-minimal one 880 (although one that might be better, depending on the relative 881 importance of number of MPRs and flooding link metrics). 883 2 884 C --- E 885 / / 886 1 / / 1 887 / 4 / 888 A --- B 889 \ \ 890 1 \ \ 1 891 \ \ 892 D --- F 893 2 895 Figure 9 897 However, this is not always the case. In Figure 10, A's set of 898 routing MPRs must contain B, but need not contain C. A's set of 899 flooding MPRs need not contain B, but must contain C. (In this case, 900 flooding with A selecting B rather than C as a flooding MPR will 901 reach D, but in three hops rather than the minimum two that MPR 902 flooding guarantees.) 904 2 1 905 B - C - D 906 | / 907 1 | / 4 908 |/ 909 A 911 Figure 10 913 7. IANA Considerations 915 This document has no actions for IANA. 917 This section may be removed by the RFC Editor. 919 8. Security Considerations 921 No new security issues arose from the inclusion of metrics in OLSRv2, 922 and hence the subject did not receive any additional discussion. The 923 security considerations in [OLSRv2] cover the complete protocol, and 924 thus there is nothing further to say in this document. 926 9. Acknowledgements 928 The authors would like to gratefully acknowledge the following people 929 for intense technical discussions, early reviews and comments on the 930 documents and its components (listed alphabetically): Brian Adamson 931 (NRL), Alan Cullen (BAE Systems), Justin Dean (NRL), Ulrich Herberg 932 (Fujitsu), Stan Ratliff (Cisco), Charles Perkins (Huawei), and 933 Henning Rogge (FGAN). 935 Finally, the authors would like to express their gratitude to Adrian 936 Farrel, for his review and comments on the later versions of this 937 document. 939 10. Informative References 941 [RFC2501] Macker, J. and S. Corson, "Mobile Ad hoc Networking 942 (MANET): Routing Protocol Performance Issues and 943 Evaluation Considerations", RFC 2501, January 1999. 945 [RFC3626] Clausen, T. and P. Jacquet, "The Optimized Link State 946 Routing Protocol", RFC 3626, October 2003. 948 [RFC5444] Clausen, T., Dean, J., Dearlove, C., and C. Adjih, 949 "Generalized MANET Packet/Message Format", RFC 5444, 950 February 2009. 952 [RFC6130] Clausen, T., Dean, J., and C. Dearlove, "Mobile Ad Hoc 953 Network (MANET) Neighborhood Discovery Protocol (NHDP)", 954 RFC 6130, April 2011. 956 [OLSRv2] Clausen, T., Dearlove, C., Jacquet, P., and U. Herberg, 957 "The Optimized Link State Routing Protocol version 2", 958 draft-ietf-manet-olsrv2-19.txt (work in progress), 959 March 2013. 961 Appendix A. MPR Routing Property 963 In order that routers can find and use shortest routes in a network 964 while using the minimum reduced topology supported by OLSRv2 (that a 965 router only advertises its MPR selectors in TC messages), routing MPR 966 selection must result in the property that there are shortest routes 967 with all intermediate routers being routing MPRs. 969 This appendix uses the following terminology and assumptions: 971 o The network is a graph of nodes connected by arcs, where nodes 972 correspond to routers with willingness not equal to WILL_NEVER 973 (except possibly at the ends of routes). An arc corresponds to 974 the set of symmetric links connecting those routers; the OLSRv2 975 interfaces used by those links are not relevant. 977 o Each arc has a metric in each direction, being the minimum of the 978 corresponding link metrics in that direction, i.e., the 979 corresponding neighbor metric. This metric must be positive. 981 o A sequence of arcs joining two nodes is referred to as a path. 983 o Node A is an MPR of node B, if corresponding router A is a routing 984 MPR of router B. 986 The required property (of using shortest routes with reduced 987 topology) is equivalent to that for any pair of distinct nodes X and 988 Z there is a shortest path from X to Z, X - Y1 - Y2 - ... - Ym - Z 989 such that Y1 is an MPR of Y2, ... Ym is an MPR of Z. Call such a 990 path a routable path, and call this property the routable path 991 property. 993 The required definition for a node X selecting MPRs is that for each 994 distinct node Z from which there is a two arc path, there is a 995 shorter, or equally short, path which is either Z - Y - X where Y is 996 an MPR of X, or is the one arc path Z - X. Note that the existence of 997 locally known, shorter, but more than two arc paths, which can be 998 used to reduce the numbers of MPRs, is not considered here. (Such 999 reductions are only when the remaining MPRs can be seen to retain all 1000 necessary shortest paths, and therefore retains the required 1001 property.) 1003 Although this appendix is concerned with paths with minimum total 1004 metric, not number of arcs (hop count), it proceeds by induction on 1005 the number of arcs in a path. Although it considers minimum metric 1006 routes with a bounded number of arcs, it then allows that number of 1007 arcs to increase so that overall minimum metric paths, regardless of 1008 the number of arcs, are considered. 1010 Specifically, the routable path property is a corollary of the 1011 property that for all positive integers n, and all distinct nodes X 1012 and Z, if there is any path from X to Z of n arcs or fewer, then 1013 there is a shortest path, from among those of n arcs or fewer, that 1014 is a routable path. This may be called the n-arc routable path 1015 property. 1017 The n-arc routable path property is trivial for n = 1, and directly 1018 follows from the definition of the MPRs of Z for n = 2. 1020 Proceeding by induction, assuming the n-arc routable path property is 1021 true for n = k, consider the case that n = k+1. 1023 Suppose that X - V1 - V2 - ... - Vk - Z is a shortest k+1 arc path 1024 from X to Z. We construct a path which has no more than k+1 arcs, has 1025 the same or shorter length (hence has the same, shortest, length 1026 considering only paths of up to k+1 arcs, by assumption) and is a 1027 routable path. 1029 First consider whether Vk is an MPR of Z. If it is not then consider 1030 the two arc path Vk-1 - Vk - Z. This can be replaced either by a one 1031 arc path Vk-1 - Z or by a two arc path Vk-1 - Wk - Z where Wk is an 1032 MPR of Z, such that the metric from Vk-1 to Z by the replacement path 1033 is no longer. In the former case (replacement one arc path) this now 1034 produces a path of length k, and the previous inductive step may be 1035 applied. In the latter case we have replaced Vk by Wk, where Wk is 1036 an MPR of Z. Thus we need only consider the case that Vk is an MPR of 1037 Z. 1039 We now apply the previous inductive step to the path X - V1 - ... - 1040 Vk-1 - Vk, replacing it by an equal length path X - W1 - ... Wm-1 - 1041 Vk, where m <= k, where this path is a routable path. Then because 1042 Vk is an MPR of Z, the path X - W1 - ... - Wm-1 - Vk - Z is a 1043 routable path, and demonstrates the n-arc routable path property for 1044 n = k+1. 1046 This thus shows that for any distinct nodes X and Z, there is a 1047 routable path using the MPR-reduced topology from X to Z, i.e., that 1048 OLSRv2 finds minimum length paths (minimum total metric routes). 1050 Authors' Addresses 1052 Christopher Dearlove 1053 BAE Systems Advanced Technology Centre 1054 West Hanningfield Road 1055 Great Baddow, Chelmsford 1056 United Kingdom 1058 Phone: +44 1245 242194 1059 EMail: chris.dearlove@baesystems.com 1060 URI: http://www.baesystems.com/ 1062 Thomas Heide Clausen 1063 LIX, Ecole Polytechnique 1064 91128 Palaiseau Cedex 1065 France 1067 Phone: +33 6 6058 9349 1068 EMail: T.Clausen@computer.org 1069 URI: http://www.thomasclausen.org/ 1071 Philippe Jacquet 1072 Alcatel-Lucent Bell Labs 1074 Phone: +33 6 7337 1880 1075 EMail: philippe.jacquet@alcatel-lucent.com