idnits 2.17.1 draft-ietf-manet-aodvv2-08.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 : ---------------------------------------------------------------------------- == There are 4 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 24, 2015) is 3320 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'MANETs' is mentioned on line 166, but not defined == Missing Reference: 'Address' is mentioned on line 407, but not defined == Missing Reference: 'OrigAddr' is mentioned on line 3268, but not defined == Missing Reference: 'MetricType' is mentioned on line 3165, but not defined == Missing Reference: 'TargAddr' is mentioned on line 1561, but not defined == Missing Reference: 'TBD' is mentioned on line 2276, but not defined -- Looks like a reference, but probably isn't: '0' on line 3478 == Unused Reference: 'RFC5082' is defined on line 2434, but no explicit reference was found in the text == Outdated reference: A later version (-03) exists of draft-perkins-irrep-02 Summary: 0 errors (**), 0 flaws (~~), 10 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Mobile Ad hoc Networks Working Group C. Perkins 3 Internet-Draft Futurewei 4 Intended status: Standards Track S. Ratliff 5 Expires: September 25, 2015 Idirect 6 J. Dowdell 7 Airbus Defence and Space 8 L. Steenbrink 9 HAW Hamburg, Dept. Informatik 10 V. Mercieca 11 Airbus Defence and Space 12 March 24, 2015 14 Dynamic MANET On-demand (AODVv2) Routing 15 draft-ietf-manet-aodvv2-08 17 Abstract 19 The revised Ad Hoc On-demand Distance Vector (AODVv2) routing 20 protocol is intended for use by mobile routers in wireless, multihop 21 networks. AODVv2 determines unicast routes among AODVv2 routers 22 within the network in an on-demand fashion, offering rapid 23 convergence in dynamic topologies. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on September 25, 2015. 42 Copyright Notice 44 Copyright (c) 2015 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 61 3. Data Elements and Notational Conventions . . . . . . . . . . 9 62 4. Applicability Statement . . . . . . . . . . . . . . . . . . . 10 63 5. AODVv2 Message Transmission . . . . . . . . . . . . . . . . . 12 64 6. Data Structures . . . . . . . . . . . . . . . . . . . . . . . 12 65 6.1. Route Table Entry . . . . . . . . . . . . . . . . . . . . 12 66 6.2. Next-hop Router Adjacency Monitoring and Blacklists . . . 14 67 6.3. Router Clients and Client Networks . . . . . . . . . . . 15 68 6.4. Sequence Numbers . . . . . . . . . . . . . . . . . . . . 16 69 6.5. Table for Multicast RteMsgs . . . . . . . . . . . . . . . 17 70 7. Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 71 7.1. The Cost() function . . . . . . . . . . . . . . . . . . . 19 72 7.2. The LoopFree() function . . . . . . . . . . . . . . . . . 19 73 7.3. Default Metric type . . . . . . . . . . . . . . . . . . . 19 74 7.4. Alternate Metrics . . . . . . . . . . . . . . . . . . . . 19 75 8. AODVv2 Protocol Operations . . . . . . . . . . . . . . . . . 20 76 8.1. Evaluating Incoming Routing Information . . . . . . . . . 20 77 8.2. Applying Route Updates To Route Table Entries . . . . . . 22 78 8.3. Route Maintenance . . . . . . . . . . . . . . . . . . . . 23 79 8.4. Route Table Entry Timeouts . . . . . . . . . . . . . . . 23 80 8.5. Route Discovery, Retries and Buffering . . . . . . . . . 24 81 8.6. Suppressing Redundant RteMsgs . . . . . . . . . . . . . . 25 82 9. AODVv2 Protocol Messages . . . . . . . . . . . . . . . . . . 26 83 9.1. RREQ Messages . . . . . . . . . . . . . . . . . . . . . . 27 84 9.1.1. RREQ Generation . . . . . . . . . . . . . . . . . . . 28 85 9.1.2. RREQ Reception . . . . . . . . . . . . . . . . . . . 29 86 9.1.3. RREQ Regeneration . . . . . . . . . . . . . . . . . . 31 87 9.2. RREP Messages . . . . . . . . . . . . . . . . . . . . . . 32 88 9.2.1. RREP Generation . . . . . . . . . . . . . . . . . . . 33 89 9.2.2. RREP Reception . . . . . . . . . . . . . . . . . . . 34 90 9.2.3. RREP Regeneration . . . . . . . . . . . . . . . . . . 35 91 9.3. RERR Messages . . . . . . . . . . . . . . . . . . . . . . 36 92 9.3.1. RERR Generation . . . . . . . . . . . . . . . . . . . 37 93 9.3.2. RERR Reception . . . . . . . . . . . . . . . . . . . 39 94 9.3.3. RERR Regeneration . . . . . . . . . . . . . . . . . . 40 95 9.4. RREP_Ack Messages . . . . . . . . . . . . . . . . . . . . 41 96 9.4.1. RREP_Ack Generation . . . . . . . . . . . . . . . . . 41 97 9.4.2. RREP_Ack Reception . . . . . . . . . . . . . . . . . 41 98 10. Representing AODVv2 data elements using RFC 5444 . . . . . . 42 99 11. Simple Internet Attachment . . . . . . . . . . . . . . . . . 43 100 12. Optional Features . . . . . . . . . . . . . . . . . . . . . . 44 101 12.1. Expanding Rings Multicast . . . . . . . . . . . . . . . 45 102 12.2. Precursor Lists and Notifications . . . . . . . . . . . 45 103 12.2.1. Overview . . . . . . . . . . . . . . . . . . . . . . 45 104 12.2.2. Precursor Notification Details . . . . . . . . . . . 45 105 12.3. Multicast RREP Response to RREQ . . . . . . . . . . . . 46 106 12.4. Intermediate RREP . . . . . . . . . . . . . . . . . . . 46 107 12.5. Message Aggregation Delay . . . . . . . . . . . . . . . 46 108 13. Administratively Configurable Parameters and Timer Values . . 47 109 13.1. Timers . . . . . . . . . . . . . . . . . . . . . . . . . 47 110 13.2. Protocol Constants . . . . . . . . . . . . . . . . . . . 48 111 13.3. Administrative (functional) controls . . . . . . . . . . 49 112 13.4. Other administrative parameters and lists . . . . . . . 49 113 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 49 114 14.1. AODVv2 Message Types Specification . . . . . . . . . . . 50 115 14.2. Message TLV Type Specification . . . . . . . . . . . . . 50 116 14.3. Address Block TLV Specification . . . . . . . . . . . . 50 117 14.4. MetricType Number Allocation . . . . . . . . . . . . . . 50 118 15. Security Considerations . . . . . . . . . . . . . . . . . . . 51 119 16. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 52 120 17. References . . . . . . . . . . . . . . . . . . . . . . . . . 52 121 17.1. Normative References . . . . . . . . . . . . . . . . . . 52 122 17.2. Informative References . . . . . . . . . . . . . . . . . 53 123 Appendix A. Example Algorithms for AODVv2 Protocol Operations . 54 124 A.1. Subroutines for AODVv2 Operations . . . . . . . . . . . . 58 125 A.1.1. Process_Routing_Info . . . . . . . . . . . . . . . . 58 126 A.1.2. Fetch_Route_Table_Entry . . . . . . . . . . . . . . . 59 127 A.1.3. Update_Route_Table_Entry . . . . . . . . . . . . . . 60 128 A.1.4. Create_Route_Table_Entry . . . . . . . . . . . . . . 60 129 A.1.5. LoopFree . . . . . . . . . . . . . . . . . . . . . . 61 130 A.1.6. Fetch_Rte_Msg_Table_Entry . . . . . . . . . . . . . . 62 131 A.1.7. Update_Rte_Msg_Table . . . . . . . . . . . . . . . . 62 132 A.1.8. Build_RFC_5444_message_header . . . . . . . . . . . . 64 133 A.2. Example Algorithms for AODVv2 RREQ Operations . . . . . . 64 134 A.2.1. Generate_RREQ . . . . . . . . . . . . . . . . . . . . 64 135 A.2.2. Receive_RREQ . . . . . . . . . . . . . . . . . . . . 65 136 A.2.3. Regenerate_RREQ . . . . . . . . . . . . . . . . . . . 66 137 A.3. Example Algorithms for AODVv2 RREP Operations . . . . . . 68 138 A.3.1. Generate_RREP . . . . . . . . . . . . . . . . . . . . 68 139 A.3.2. Receive_RREP . . . . . . . . . . . . . . . . . . . . 69 140 A.3.3. Regenerate_RREP . . . . . . . . . . . . . . . . . . . 71 141 A.4. Example Algorithms for AODVv2 RERR Operations . . . . . . 72 142 A.4.1. Generate_RERR . . . . . . . . . . . . . . . . . . . . 73 143 A.4.2. Receive_RERR . . . . . . . . . . . . . . . . . . . . 74 144 A.4.3. Regenerate_RERR . . . . . . . . . . . . . . . . . . . 76 146 A.5. Example Algorithms for AODVv2 RREP_Ack Operations . . . . 78 147 A.5.1. Generate_RREP_Ack . . . . . . . . . . . . . . . . . . 78 148 A.5.2. Receive_RREP_Ack . . . . . . . . . . . . . . . . . . 78 149 A.5.3. Timeout_RREP_Ack . . . . . . . . . . . . . . . . . . 78 150 Appendix B. Changes since revision ...-06.txt . . . . . . . . . 78 151 Appendix C. Changes between revisions 5 and 6 . . . . . . . . . 80 152 Appendix D. Changes from revision ...-04.txt . . . . . . . . . . 81 153 Appendix E. Changes from revision ...-03.txt . . . . . . . . . . 82 154 Appendix F. Changes from revision ...-02.txt . . . . . . . . . . 82 155 Appendix G. Features of IP needed by AODVv2 . . . . . . . . . . 83 156 Appendix H. Multi-homing Considerations . . . . . . . . . . . . 84 157 Appendix I. Shifting Network Prefix Advertisement Between AODVv2 158 Routers . . . . . . . . . . . . . . . . . . . . . . 84 159 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 84 161 1. Overview 163 The revised Ad Hoc On-demand Distance Vector (AODVv2) routing 164 protocol [formerly named DYMO] enables on-demand, multihop unicast 165 routing among AODVv2 routers in mobile ad hoc networks 166 [MANETs][RFC2501]. The basic operations of the AODVv2 protocol are 167 route discovery and route maintenance. Route discovery is performed 168 when an AODVv2 router must transmit a packet towards a destination 169 for which it does not have a route. Route maintenance is performed 170 to avoid prematurely expunging routes from the route table, and to 171 avoid dropping packets when a route breaks. 173 During route discovery, the originating AODVv2 router (RREQ_Gen) 174 disseminates a Route Request message (RREQ) to find a route toward 175 some target destination. Using a hop-by-hop regeneration algorithm, 176 each AODVv2 router receiving the RREQ message records a route toward 177 the originator. When the target's AODVv2 router (RREP_Gen) receives 178 the RREQ, it records a route toward RREQ_Gen and generates a Route 179 Reply (RREP) unicast toward RREQ_Gen. Each AODVv2 router that 180 receives the RREP stores a route toward the target, and again 181 unicasts the RREP toward the originator. When RREQ_Gen receives the 182 RREP, routes have then been established between RREQ_Gen (the 183 originating AODVv2 router) and RREP_Gen (the target's AODVv2 router) 184 in both directions. 186 Route maintenance consists of two operations: continuously extending 187 the lifetime of active routes, and using Route Error (RERR) message 188 to invalidate routes that cannot be used to forward packets. In 189 order to maintain routes, AODVv2 routers extend route lifetimes upon 190 successfully forwarding a packet. When a data packet is received to 191 be forwarded and no valid route exists, then the upstream routers and 192 AODVv2 router of the source of the packet is notified of the error by 193 way of an RERR message. Route discovery would re-establish the 194 route. RERR messages are also used to notify upstream routers when 195 routes break (say, due to loss of a link to a neighbor). 197 AODVv2 uses sequence numbers to assure loop freedom [Perkins99], 198 similarly to AODV. Sequence numbers enable AODVv2 routers to 199 determine the temporal order of AODVv2 route discovery messages, 200 thereby avoiding use of stale routing information. 202 See Section 10 for the mapping of AODVv2 data elements to RFC 5444 203 Address Block, Address TLV, and Message TLV formats. Security for 204 authentication of AODVv2 routers, and/or encryption of traffic is 205 dealt with by the underlying transport mechanism (e.g., by using the 206 techniques for Authentication, Integrity, and Confidentiality 207 documented in [RFC5444]). 209 2. Terminology 211 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 212 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 213 "OPTIONAL" in this document are to be interpreted as described in 214 [RFC2119]. In addition, this document uses terminology from 215 [RFC5444], and defines the following terms: 217 Adjacency 218 A bi-directional relationship between neighboring AODVv2 routers 219 for the purpose of exchanging routing information. Not every pair 220 of neighboring routers will necessarily form an adjacency. 221 Monitoring of adjacencies where packets are being forwarded is 222 required (see Section 6.2). 224 AckReq 225 Request for acknowledgement (of an RREP message). 227 AODVv2 Router 228 An IP addressable device in the ad-hoc network that performs the 229 AODVv2 protocol operations specified in this document. 231 Current_Time 232 The current time as maintained by the AODVv2 router. 234 Data Element 235 A named object used within AODVv2 protocol messages 237 Disregard 238 Ignore for further processing. 240 Handling Router (HandlingRtr) 241 HandlingRtr denotes the AODVv2 router receiving and handling an 242 AODVv2 message. 244 Invalid route 245 A route that cannot be used for forwarding. 247 MANET 248 A Mobile Ad Hoc Network as defined in [RFC2501]. 250 MetricList 251 The metrics associated with the addresses in an AddressList. 253 Node 254 An IP addressable device in the ad-hoc network. A node may be an 255 AODVv2 router, or it may be a device in the network that does not 256 perform any AODVv2 protocol operations. All nodes in this 257 document are either AODVv2 Routers or else Router Clients. 259 OrigAddr 260 An IP address of the Originating Node used as a data element 261 within AODVv2 messages. 263 OrigAddrMetric 264 The metric associated with the route to OrigAddr. 266 OrigSeqNum 267 The Sequence Number maintained by OrigNode for OrigAddr. 269 Originating Node (OrigNode) 270 The Originating Node is the node that launched the application 271 requiring communication with the Target Address. If OrigNode is a 272 Router Client, its AODVv2 router (RREQ_Gen) has the responsibility 273 to generate a AODVv2 RREQ message on behalf of OrigNode as 274 necessary to discover a route. 276 PktSource 277 The source address of a packet sent to an unreachable address. 279 PrefixLengthList 280 The prefix lengths associated with addresses in an AddressList. 282 Reactive 283 A protocol operation is called "reactive" if it is performed only 284 in reaction to specific events. As used in this document, 285 "reactive" is synonymous with "on-demand". 287 Routable Unicast IP Address 288 A routable unicast IP address is a unicast IP address that is 289 scoped sufficiently to be forwarded by a router. Globally-scoped 290 unicast IP addresses and Unique Local Addresses (ULAs).[RFC4193] 291 are examples of routable unicast IP addresses. 293 Route Error (RERR) 294 A RERR message is used to indicate that an AODVv2 router does not 295 have a route toward one or more particular destinations. 297 Route Reply (RREP) 298 A RREP message is used to establish a route between the Target 299 Address and the Originating Address, at all the AODVv2 routers 300 between them. 302 Route Request (RREQ) 303 An AODVv2 router uses a RREQ message to discover a valid route to 304 a particular destination address, called the Target Address. An 305 AODVv2 router processing a RREQ receives routing information for 306 the Originating Address. 308 Router Client 309 A node that requires the services of an AODVv2 router for route 310 discovery and maintenance. An AODVv2 router is always its own 311 client, so that its list of client IP addresses is never empty. 313 Router Interface 314 An interface supporting the transmission or reception of Router 315 Messages. 317 RREP Generating Router (RREP_Gen) 318 The RREP Generating Router is the AODVv2 router that serves 319 TargNode. RREP_Gen generates the RREP message to advertise a 320 route towards TargAddr from OrigAddr. 322 RREQ Generating Router (RREQ_Gen) 323 The RREQ Generating Router is the AODVv2 router that serves 324 OrigNode. RREQ_Gen generates the RREQ message to discover a route 325 for TargAddr. 327 Sequence Number (SeqNum) 328 A Sequence Number is an unsigned integer maintained by an AODVv2 329 router to avoid re-use of stale messages. The router associates 330 SeqNum with an IP address of one or more of its network 331 interfaces. The value zero (0) is reserved to indicate that the 332 Sequence Number for an address is unknown. 334 SeqNumList 335 The list of Sequence Numbers associated with addresses in an 336 AddressList, used in RERR messages. 338 TargAddr 339 An IP address of the Target Node used as a data element within 340 AODVv2 messages. 342 TargAddrMetric 343 The metric associated with the route to TargAddr. 345 TargSeqNum 346 The Sequence Number maintained by TargNode for TargAddr. 348 Target Node (TargNode) 349 The node hosting the IP address towards which a route is needed. 351 Type-Length-Value structure (TLV) 352 A generic way to represent information, for example as used in 353 [RFC5444]. 355 Unreachable Address 356 An address for which a valid route is not known. 358 upstream 359 In the direction from TargAddr to OrigAddr. 361 Valid route 362 A route that can be used for forwarding. 364 ValidityTime 365 The duration of time for which a route should be considered to be 366 a valid route. 368 3. Data Elements and Notational Conventions 370 This document uses the Data Elements and conventions found in Table 1 371 and Table 2. 373 +--------------------+----------------------------------------------+ 374 | Data Elements | Meaning | 375 +--------------------+----------------------------------------------+ 376 | msg_hop_limit | Number of hops allowable for the message | 377 | msg_hop_count | Number of hops traversed so far by the | 378 | | message | 379 | AckReq | Acknowledgement Requested for RREP | 380 | PktSource | Source address of a data packet | 381 | AddressList | A list of IP addresses | 382 | OrigAddr | IP address of the Originating Node | 383 | TargAddr | IP address of the Target Node | 384 | UnreachableAddress | An unreachable IP address | 385 | PrefixLengthList | Routing prefixes associated with addresses | 386 | | in AddressList | 387 | SeqNum | Sequence Number, used in RERR messages | 388 | SeqNumList | A list of SeqNums | 389 | OrigSeqNum | Originating Node Sequence Number | 390 | TargSeqNum | Target Node Sequence Number | 391 | MetricType | The metric type for values in MetricList | 392 | MetricList | Metric values for routes to addresses in | 393 | | AddressList | 394 | OrigAddrMetric | Metric value for route to OrigAddr | 395 | TargAddrMetric | Metric value for route to TargAddr | 396 | ValidityTime | Included in ValidityTimeList | 397 | ValidityTimeList | ValidityTime values for routes to Addresses | 398 | | in AddressList | 399 +--------------------+----------------------------------------------+ 401 Table 1 403 +------------------------+------------------------------------------+ 404 | Notation | Meaning | 405 +------------------------+------------------------------------------+ 406 | Route[Address] | A route table entry towards Address | 407 | Route[Address].{field} | A field in such a route table entry | 408 | -- | -- | 409 | RREQ_Gen | AODVv2 router originating an RREQ | 410 | RREP_Gen | AODVv2 router responding to an RREQ | 411 | RERR_Gen | AODVv2 router originating an RERR | 412 | RteMsg | Either RREQ or RREP | 413 | RteMsg.{field} | Field in RREQ or RREP | 414 | AdvRte | A route advertised in an incoming RteMsg | 415 | HandlingRtr | Handling Router | 416 +------------------------+------------------------------------------+ 418 Table 2 420 4. Applicability Statement 422 The AODVv2 routing protocol is a reactive routing protocol designed 423 for stub (i.e., non-transit) or disconnected (i.e., from the 424 Internet) mobile ad hoc networks (MANETs). AODVv2 handles a wide 425 variety of mobility patterns by determining routes on-demand. AODVv2 426 also handles a wide variety of traffic patterns. In networks with a 427 large number of routers, AODVv2 is best suited for relatively sparse 428 traffic scenarios where any particular router forwards packets to 429 only a small percentage of the AODVv2 routers in the network, due to 430 the on-demand nature of route discovery and route maintenance. 431 AODVv2 supports routers with multiple interfaces, as long as each 432 interface has its own (unicast routeable) IP address; the set of all 433 network interfaces supporting AODVv2 is administratively configured 434 in a list (namely, AODVv2_INTERFACES). 436 Ad Hoc networks have been deployed in many circumstances, including 437 for emergency and disaster relief. In those circumstances, it is 438 sometimes the case that the simple ability to communicate is much 439 more important than being assured of secure operations. AODVv2 is 440 very well suited for such reactive scenarios. For other ad hoc 441 networking applications, in which insecure operation could negate the 442 value of establishing communication paths, it is important for 443 neighboring AODVv2 nodes to establish security associations with one 444 another. 446 Although AODVv2 is closely related to AODV [RFC3561], and shares some 447 features of DSR [RFC4728], AODVv2 is not interoperable with either of 448 those other two protocols. 450 AODVv2 is applicable to memory constrained devices, since only a 451 little routing state is maintained in each AODVv2 router. Routes 452 that are not needed for forwarding data do not have to be maintained, 453 in contrast to proactive routing protocols that require routing 454 information to all routers within the MANET be maintained. 456 In addition to routing for its own local applications, each AODVv2 457 router can also route on behalf of other non-routing nodes (in this 458 document, "Router Clients") that are directly reachable via its 459 network interfaces. Each AODVv2 router, if serving router clients 460 other than itself, SHOULD be configured with information about the IP 461 addresses of its clients, using any suitable method. In the initial 462 state, no AODVv2 router is required to have information about the 463 relationship between any other AODVv2 router and its Router Clients 464 (see Section 6.3). 466 The coordination among multiple AODVv2 routers to distribute routing 467 information correctly for a shared address (i.e. an address that is 468 advertised and can be reached via multiple AODVv2 routers) is not 469 described in this document. The AODVv2 router operation of shifting 470 responsibility for a routing client from one AODVv2 router to another 471 is described in Appendix I. Address assignment procedures are 472 entirely out of scope for AODVv2. A Router Client SHOULD NOT be 473 served by more than one AODVv2 router at any one time. 475 AODVv2 routers perform route discovery to find a route toward a 476 particular destination. AODVv2 routers MUST must be configured to 477 respond to RREQs for themselves and their clients. When AODVv2 is 478 the only protocol interacting with the forwarding table, AODVv2 MAY 479 be configured to perform route discovery for all unknown unicast 480 destinations. Such routers will reply for each address request. 482 By default, AODVv2 only supports bidirectional links. In the case of 483 possible unidirectional links, blacklists (see Section 6.2) SHOULD be 484 used, or other means (e.g. adjacency establishment with only 485 neighboring routers that have bidirectional communication as 486 indicated by NHDP HELLO messages [RFC6130]) of assuring and 487 monitoring bi-directionality are recommended. Otherwise, persistent 488 packet loss or persistent protocol failures could occur. If received 489 over a link that is unidirectional, metric information from incoming 490 AODVv2 messages MUST NOT be used for route table updates. 492 The routing algorithm in AODVv2 may be operated at layers other than 493 the network layer, using layer-appropriate addresses. The routing 494 algorithm makes use of some persistent state; if there is no 495 persistent storage available for this state, recovery can impose a 496 performance penalty (e.g., in case of AODVv2 router reboots). 498 5. AODVv2 Message Transmission 500 In its default mode of operation, AODVv2 sends messages using the 501 parameters for port number and IP protocol specified in [RFC5498]. 502 Unless otherwise specified, the address for AODVv2 multicast messages 503 (for example, RREQ or RERR) is the link-local multicast address LL- 504 MANET-Routers [RFC5498]. All AODVv2 routers MUST subscribe to LL- 505 MANET-Routers [RFC5498] to receive AODVv2 messages. Implementations 506 are free to choose their own heuristics for reducing multicast 507 overhead. Some methods for doing so are described in [RFC6621]. 508 AODVv2 does not specify which method should be used to restrict the 509 set of AODVv2 routers that have the responsibility to regenerate 510 multicast packets. Note that multicast packets MAY be sent via 511 unicast. For example, this may occur for certain link-types (non- 512 broadcast media), for manually configured router adjacencies, or in 513 order to improve robustness. 515 When multiple interfaces are available, a node transmitting a 516 multicast packet to LL-MANET-Routers MUST send the packet on all 517 interfaces that have been configured for AODVv2 operation. 518 Similarly, AODVv2 routers MUST subscribe to LL-MANET-Routers on all 519 their AODVv2 interfaces. 521 IP packets containing AODVv2 protocol messages SHOULD be given 522 priority queuing and channel access. 524 6. Data Structures 526 6.1. Route Table Entry 528 The route table entry is a conceptual data structure. 529 Implementations MAY use any internal representation so long as it 530 provides access to the information specified below. 532 A route table entry has the following fields: 534 Route.Address 535 An address or address prefix of a node 537 Route.PrefixLength 538 The length of the address or prefix. If the value of 539 Route.PrefixLength is less than the length of Route.Address, the 540 route can be thought of as a route to the subnet on which 541 Route.Address resides. A PrefixLength is stored for every route 542 in the route table. 544 Route.SeqNum 545 The Sequence Number associated with Route.Address, as obtained 546 from the last packet that successfully updated this route table 547 entry. 549 Route.NextHop 550 The IP address of the adjacent AODVv2 router used for the path 551 toward the Route.Address 553 Route.NextHopInterface 554 The interface used to send packets toward Route.Address 556 Route.LastUsed 557 The time that this route was last used to forward a packet 559 Route.LastSeqNum 560 The time that the destination SeqNum for this route was last 561 updated 563 Route.ExpirationTime 564 The time at which this route must be marked as Invalid 566 Route.MetricType 567 The type of the metric for the route towards Route.Address 569 Route.Metric 570 The cost of the route towards Route.Address expressed in units 571 consistent with Route.MetricType 573 Route.State 574 The last *known* state (one of Active, Idle, or Invalid) of the 575 route 577 Route.Timed 578 TRUE if the route was specified to have a ValidityTime 580 Route.Precursors (optional) 581 A list of upstream neighbors using the route (see Section 12.2) 583 A route table entry (i.e., a route) is in one of the following 584 states: 586 Active 587 An Active route is in current use for forwarding packets. An 588 Active route is maintained continuously by AODVv2 and is 589 considered to remain active as long as it is used at least once 590 during every ACTIVE_INTERVAL, or if the Route.Timed flag is true. 591 When a route that is not a timed route is no longer active the 592 route becomes an Idle route. 594 Idle 595 An Idle route can be used for forwarding packets, even though it 596 is not in current use. If an Idle route is used to forward a 597 packet, it becomes an Active route once again. After an Idle 598 route remains idle for MAX_IDLETIME, it becomes an Invalid route. 600 Invalid 601 A route marked as Invalid cannot be used for forwarding, but the 602 sequence number information MAY be maintained until the 603 destination sequence number has not had any updates for 604 MAX_SEQNUM_LIFETIME; after that time, old sequence number 605 information may no longer be valid and the Invalid route MUST be 606 expunged. 608 MAX_SEQNUM_LIFETIME is the time after a reboot during which an AODVv2 609 router MUST NOT respond to any routing messages that require 610 information about its Sequence Number. Thus, if all other AODVv2 611 routers expunge routes to the rebooted router after that time 612 interval, the rebooted AODVv2 router's sequence number will not be 613 considered stale by any other AODVv2 router in the MANET. 615 The invalidation of a Timed route is controlled by the ExpirationTime 616 time of the route table entry (instead of MAX_IDLETIME). Until that 617 time, a Timed route can be used for forwarding packets. A route is 618 indicated to be a Timed route by the setting of the Timed flag in the 619 route table entry. Afterwards, the route MAY be expunged; otherwise 620 the route must be must be marked as Invalid. 622 6.2. Next-hop Router Adjacency Monitoring and Blacklists 624 Neighboring routers MAY form an adjacency based on AODVv2 messages, 625 other protocols (e.g. NDP [RFC4861] or NHDP [RFC6130]), or manual 626 configuration. Loss of a routing adjacency may also be indicated 627 similarly. AODVv2 routers SHOULD monitor connectivity to adjacent 628 routers along active routes. In the absence of other information 629 about bidirectional connectivity, the default approach for AODVv2 630 routers to monitor connectivity to neighboring AODVv2 routers is to 631 include the AckReq data element in RREP messages, and send RREP_Ack 632 messages to fulfill the requests (see Sections 9.2 and 9.4). 633 However, when routers perform other operations such as those from the 634 list below, these can also be used as indications of connectivity. 636 o NHDP HELLO Messages [RFC6130], if is implemented by its neighbors 638 o Route timeout 640 o Lower layer triggers, e.g. message reception or link status 641 notifications 643 o TCP timeouts 645 o Promiscuous listening 647 o Other monitoring mechanisms or heuristics 649 For example, receipt of a Neighborhood Discovery message would signal 650 a connection to the sender. In this case, the AODVv2 router doesn't 651 need to request an acknowledgement in the RREP. Similarly, if AODVv2 652 received notification of a timeout, this may possibly be due to a 653 disconnection, and the AODVv2 router SHOULD attempt to verify 654 connectivity by including AckReq data element when sending a RREP to 655 that neighbor. 657 When a link to a neighbor is determined to be unidirectional, either 658 by failure to respond with a RREP_Ack as requested, or by some other 659 means, the neighbor MUST be placed in a blacklist. However, the 660 blacklisted neighbor SHOULD NOT be permanently blacklisted; after a 661 certain time (MAX_BLACKLIST_TIME), it SHOULD once again be considered 662 as a viable neighbor for route discovery operations. 664 For this purpose, a list of blacklisted routers along with their time 665 of removal SHOULD be maintained: 667 Blacklist.Router 668 An IP address of the router that did not verify bidirectional 669 connectivity 671 Blacklist.RemoveTime 672 The time at which Blacklist.Router SHOULD be removed from the 673 blacklist 675 RREQs received from a blacklisted router, or any router over a link 676 that is known to be incoming-only, MUST be disregarded. If other 677 indications are received that a blacklisted router has restored 678 bidirectional connectivity, for instance receiving NHDP HELLO 679 messages, then the router SHOULD be immediately removed from the 680 blacklist. 682 6.3. Router Clients and Client Networks 684 An AODVv2 router may offer routing services to other nodes that are 685 not AODVv2 routers; such nodes are called Router Clients in this 686 document. 688 For this purpose, CLIENT_ADDRESSES must be configured on each AODVv2 689 router with the following information: 691 Client IP address 692 The IP address of the node that requires routing service from the 693 AODVv2 router. 695 Client Prefix Length 696 The length of the routing prefix associated with the client IP 697 address. 699 The list of Routing Clients for an AODVv2 router is never empty, 700 since an AODVv2 router is always its own client as well. If the 701 Client Prefix Length is not the full length of the Client IP address, 702 then the prefix defines a Client Network. If an AODVv2 router is 703 configured to serve a Client Network, then the AODVv2 router MUST 704 serve every node that has an address within the range defined by the 705 routing prefix of the Client Network. 707 6.4. Sequence Numbers 709 Sequence Numbers allow AODVv2 routers to evaluate the freshness of 710 routing information. Each AODVv2 router in the network MUST maintain 711 its own sequence number (SeqNum). Each RREQ and RREP generated by an 712 AODVv2 router includes its SeqNum. Each AODVv2 router MUST ensure 713 that its SeqNum is monotonically increasing. The router can ensure 714 this by incrementing SeqNum whenever it generates RREQ or RREP . 716 A router receiving a RREQ or RREP message uses the Sequence Number in 717 the message to determine the freshness of a route update: if a new 718 Sequence Number in the message is lower than the one stored in the 719 route table, the stored information for that route is considered 720 stale. 722 As a consequence, loop freedom is assured. 724 If the router has multiple network interfaces, it can use the same 725 SeqNum for the IP addresses of all of them, or it can assign 726 different SeqNums for use with different IP addresses. However, the 727 router MUST NOT use multiple SeqNums for any particular IP address. 728 A Router Client has the same SeqNum as the IP address of the network 729 interface that the AODVv2 router uses to forward packets to that 730 Router Client. Similarly, a route to a subnet has the same SeqNum as 731 the IP address of the network interface that the AODVv2 router uses 732 to forward packets to that subnet. The Sequence Number fulfills the 733 same role as the "Destination Sequence Number" of DSDV [Perkins94], 734 and as the AODV Sequence Number in RFC 3561[RFC3561]. 736 An AODVv2 router increments its SeqNum as follows. Most of the time, 737 SeqNum is incremented by simply adding one (1). But when the SeqNum 738 has the value of the largest possible number representable as a 739 16-bit unsigned integer (i.e., 65,535), it MUST be incremented by 740 setting to one (1). In other words, the sequence number after 65,535 741 is 1. 743 An AODVv2 router SHOULD maintain its SeqNum in persistent storage. 744 If an AODVv2 router's SeqNum is lost, it MUST take the following 745 actions to avoid the danger of routing loops. First, the AODVv2 746 router MUST set Route.State := Invalid for each entry. Furthermore 747 the AODVv2 router MUST wait for at least MAX_SEQNUM_LIFETIME before 748 transmitting or regenerating any AODVv2 RREQ or RREP messages. If an 749 AODVv2 protocol message is received during this waiting period, the 750 AODVv2 router SHOULD perform normal route table entry updates, but 751 not forward the message to other nodes. If, during this waiting 752 period, a data packet is received to be forwarded to another 753 destination that is not among the router's Clients, then the AODVv2 754 router MUST transmit a RERR message indicating that no route is 755 available. However, packets destined to a Client are forwarded as 756 usual. At the end of the waiting period the AODVv2 router sets its 757 SeqNum to one (1) and begins performing AODVv2 protocol operations 758 again. 760 6.5. Table for Multicast RteMsgs 762 Two multicast RteMsgs (i.e., RREQ or RREP) are considered to be 763 "comparable" if they have the same Message Type, OrigAddr, TargAddr, 764 and MetricType. When RteMsgs are flooded in a MANET, an AODVv2 765 router may well receive such comparable RteMsgs from its neighbors. 766 A router, after receiving a RteMsg, MUST check against previous 767 RteMsgs to assure that its response message would contain information 768 that is not redundant. Otherwise, multicast RteMsgs are likely to be 769 regenerated repeatedly with almost no additional benefit, but 770 generating a great deal of unnecessary signaling traffic and 771 interference. See Section 8.6 regarding suppression of redundant 772 RteMsgs. 774 To avoid transmission of redundant RteMsgs, while still enabling the 775 proper handling of earlier RteMsgs that may have somehow been delayed 776 in the network, each AODVv2 router keeps a list of certain 777 information about recently received RteMsgs. This list is called the 778 AODVv2 Multicast RteMsg Table -- or, more briefly, the RteMsg Table. 780 Each entry in the RteMsg Table has the following fields: 782 o Message Type (either RREQ or RREP) 784 o OrigAddr 786 o TargAddr 787 o OrigSeqNum (if present) 789 o TargSeqNum (if present) 791 o MetricType 793 o Timestamp (Current_Time at the time the entry is updated) 795 The RteMsg Table is maintained so that no two entries in the RteMsg 796 Table are comparable -- that is, all RteMsgs represented in the 797 RteMsg Table either have different Message Types, different OrigAddr, 798 different TargAddr, or different metric types. If two RteMsgs have 799 the same Message Type, MetricType, OrigAddr, and TargAddr, the 800 information from the one with the older Sequence Number is not needed 801 in the table; in case they have the same Sequence Number, the one 802 with the greater Metric value is not needed; in case they have the 803 same Metric as well, it does not matter which table entry is 804 maintained. Whenever a RteMsg Table entry is updated, its Timestamp 805 field MUST also set to be the Current_Time. 807 7. Metrics 809 Metrics measure a cost or quality associated to a route or a link. 810 They can account for various characteristics such as latency, delay, 811 financial, energy, etc. A metric value is included in each routing 812 table entry. Determining whether to use incoming information about a 813 route requires comparing metric values. Whenever an AODV router 814 receives metric information in an incoming message, the received 815 value of the metric is as measured by the neighbor router, and does 816 not reflect the cost of traversing the link to that neighbor. 818 Each metric has a MetricType, which is allocated by IANA as specified 819 in [RFC6551]. Apart from its default metric type as detailed in 820 Section 7.3, AODVv2 enables the use of monotonically increasing 821 metrics, whose data type depends on the metric used. Using non- 822 default metrics in a RteMsg requires the inclusion of the MetricType 823 data element. Routes are looked up according to metric type, and 824 intermediate routers handling a RteMsg assign the same metric type to 825 all metric information in the RteMsg. 827 For each type of metric, a maximum value is defined, denoted 828 MAX_METRIC[i] where 'i' is the MetricType. AODVv2 cannot store 829 routes in its route table that cost more than MAX_METRIC[i]. 831 7.1. The Cost() function 833 In order to simplify the description of storing accumulated route 834 costs in the route table, a Cost() function is defined. This 835 function returns the Cost of traversing a Route ('Cost(R)') or a Link 836 ('Cost(L)'). Cost(L) for DEFAULT_METRIC_TYPE is specified in 837 Section 7.3. The Cost() function for other metrics is beyond the 838 scope of this document. 840 7.2. The LoopFree() function 842 Since determining loop freedom is known to depend on comparing the 843 Cost(R1) of advertised route update information to the Cost(R2) of an 844 existing stored route using the same metric type, AODVv2 invokes a 845 function called "LoopFree(R1, R2)". LoopFree(R1, R2) returns TRUE 846 when R1 is guaranteed to not rely on the route R2, i.e. R2 is not a 847 subroute of the route R1. An AODVv2 router invokes LoopFree() to 848 compare an advertised route to a stored route. The advertised route 849 is referred to as AdvRte and is used as parameter R1. The stored 850 route is referred to as Route and is used as parameter R2. 852 7.3. Default Metric type 854 The default MetricType (DEFAULT_METRIC_TYPE) is HopCount (but see 855 Section 7.4). HopCount is the only metric described in detail in 856 this document. For the HopCount metric, Cost(L) is always 1, and 857 Cost(R) is the hop count between the router and the destination. 859 MAX_METRIC[DEFAULT_METRIC_TYPE] is defined to be MAX_HOPCOUNT. 860 MAX_HOPCOUNT MUST be larger than the AODVv2 network diameter. 861 Otherwise, AODVv2 protocol messages may not reach their intended 862 destinations. 864 Using MetricType DEFAULT_METRIC_TYPE, LoopFree (AdvRte, Route) is 865 TRUE when Cost(AdvRte) <= Cost(Route). The specification of Cost(R) 866 and LoopFree(AdvRte, Route) for metric types other than 867 DEFAULT_METRIC_TYPE is beyond the scope of this document. 869 7.4. Alternate Metrics 871 Some applications may require metric information other than HopCount, 872 which has traditionally been the default metric associated with 873 routes in MANET. It is well known that reliance on HopCount can 874 cause selection of the worst possible route in some situations. For 875 this reason, AODVv2 enables route selection based on metric 876 information other than HopCount -- in other words, based on 877 "alternate metrics". 879 The range and data type of each such alternate metric may be 880 different. For instance, the data type might be integers, or 881 floating point numbers, or restricted subsets thereof. It is out of 882 the scope of this document to specify for alternate metrics the 883 Cost(L) and Cost(R) functions, or their return type. Where necessary 884 these should take into account any differences in the link cost in 885 each direction. 887 8. AODVv2 Protocol Operations 889 In this section, operations are specified for updating the route 890 table using information within AODVv2 RteMsgs (either RREQ or RREP), 891 and due to timeouts. AdvRte is the route advertised by the RteMsg. 892 RteMsgs include IP addresses as well as possibly the SeqNum and the 893 prefix lengths associated with those IP addresses. The AdvRte also 894 includes the metric measured from the neighbor transmitting the 895 RteMsg to the IP address originating the route update. All SeqNum 896 comparisons use signed 16-bit arithmetic. 898 8.1. Evaluating Incoming Routing Information 900 After determining that the incoming information is correctly 901 formatted and contains values in the correct ranges, the AODVv2 902 router will use the information to update local routing information 903 if possible. This section explains how to determine whether the 904 incoming information should be used to update the route table, and 905 how to perform the update. 907 The incoming RteMsg may be a RREQ or a RREP. If it is a RREQ, it 908 contains information about a route to OrigAddr. Prefix length 909 information in a RREQ, if present, describes the subnet on which 910 OrigAddr resides. If it is a RREP, it contains information about a 911 route to TargAddr. AdvRte is used to denote the route information 912 contained in the RteMsg. AdvRte has the following properties: 914 o AdvRte.Address = OrigAddr (in RREQ) or TargAddr (in RREP). 916 o AdvRte.SeqNum = OrigSeqNum (in RREQ) or TargSeqNum (in RREP). 918 o AdvRte.MetricType = RteMsg.MetricType, if present, else 919 DEFAULT_METRIC_TYPE. 921 o AdvRte.Metric = RteMsg.Metric. 923 o AdvRte.Cost = AdvRte.Metric + Cost(L) according to the indicated 924 MetricType, where L is the link from the advertising router. 926 o AdvRte.ValidityTime = ValidityTime in the RteMsg, if present. 928 In the description below, Route denotes the stored routing table 929 entry and HandlingRtr is the router receiving the RteMsg. 930 HandlingRtr MUST process the incoming information as follows. If the 931 routing table does not contain an entry matching AdvRte's Address and 932 MetricType, create a new route table entry according to the procedure 933 in Section 8.2. Otherwise determine whether or not to use AdvRte for 934 updating the route entry (Route) matching the AdvRte's Address and 935 MetricType as follows: 937 1. Check whether AdvRte is stale (AdvRte.SeqNum < Route.SeqNum). 939 * If AdvRte's sequence number is newer, HandlingRtr MUST use 940 AdvRte to update the Route. 942 * If stale, using the incoming information might result in a 943 routing loops. In this case the HandlingRtr MUST NOT use 944 AdvRte to update the Route. 946 * If the SeqNums are equal, continue checking as below. 948 2. Check whether AdvRte advertises a more costly route (AdvRte.Cost 949 >= Route.Metric). 951 * If the advertised route's cost is the same or greater than the 952 stored route, and the stored route is valid, the incoming 953 information does not offer any improvement and SHOULD NOT be 954 used to update the stored route table entry. 956 * If the advertised route's cost is lower than the stored route, 957 AdvRte offers improvement and SHOULD be used to update the 958 stored route table entry. 960 * If the advertised route's cost is the same or greater than the 961 stored route, but the stored route's state is Invalid, 962 continue processing to see whether there is a danger of a 963 routing loop. 965 3. Check whether the information is safe against loops (LoopFree 966 (AdvRte, Route) == TRUE). 968 * If LoopFree (see Section 7.2) returns false, using the 969 incoming information might cause a routing loop. AdvRte MUST 970 NOT be used to update the stored route table entry. 972 4. If the advertised route can be used to update the route table 973 entry, follow the procedure in Section 8.2. 975 To briefly summarize, AdvRte must satisfy the following conditions 976 compared to the existing route table entry before it can be used: 978 o AdvRte is more recent, (i.e., AdvRte.SeqNum > Route.SeqNum) OR 980 o AdvRte is not stale and can safely restore an invalid route (i.e. 981 LoopFree (AdvRte, Route) == TRUE), OR 983 o AdvRte is not stale and is less costly. 985 Also see the pseudocode in Appendix A.1.1. 987 If the route has been updated based on information in a received 988 RREQ, the AODVv2 router MAY force regeneration of the RREQ, to ensure 989 the most recent information is propagated to other routers, but it 990 MAY suppress this to avoid extra control traffic. 992 8.2. Applying Route Updates To Route Table Entries 994 To apply the route update, a route table entry for AdvRte.Address is 995 either found to already exist in the route table, or else a new route 996 table entry for AdvRte.Address is created and inserted into the route 997 table. If the route table entry had to be created, or if the state 998 is Invalid, the state is set to be Idle. The fields of route table 999 entry are assigned as follows: 1001 o If AdvRte.PrefixLength exists, then Route.PrefixLength := 1002 AdvRte.PrefixLength. Otherwise, Route.PrefixLength := maximum 1003 length for address family (either 32 or 128). 1005 o Route.SeqNum := AdvRte.SeqNum 1007 o Route.NextHop := IP.SourceAddress (i.e., the address from which 1008 the RteMsg was received) 1010 o Route.NextHopInterface is set to the interface on which RteMsg was 1011 received 1013 o Route.MetricType := AdvRte.MetricType 1015 o Route.Metric := AdvRte.Cost 1017 o Route.LastUsed := Current_Time 1019 o Route.LastSeqnum := Current_Time 1021 o If RteMsg.ValidityTime is included, then 1022 Route.ExpirationTime := Current_Time + RteMsg.ValidityTime and 1023 Route.Timed := TRUE. Otherwise, Route.Timed := FALSE and 1024 Route.ExpirationTime := MAXTIME. 1026 With these assignments to the route table entry, a route has been 1027 made available, and the route can be used to send any buffered data 1028 packets (and subsequently to forward any incoming data packets) for 1029 Route.Address. An updated route entry also fulfills any outstanding 1030 route discovery (RREQ) attempts for Route.Address. Any retry timers 1031 for the RREQ SHOULD be cancelled. 1033 8.3. Route Maintenance 1035 AODVv2 routers attempt to maintain active routes. Before using a 1036 route to forward a packet, an AODVv2 router MUST check the status of 1037 the route as specified in Section 8.4. If the route has been marked 1038 as Invalid, it cannot be used for forwarding. Otherwise, set 1039 Route.LastUsed := Current_Time, Route.State := Active, and forward 1040 the packet to the route's next hop. 1042 When a routing problem is encountered, an AODVv2 router (denoted 1043 RERR_Gen) sends the RERR to quickly notify upstream routers. Two 1044 kinds of routing problems can trigger generation of a RERR message. 1045 The first happens when the router receives a packet but does not have 1046 a valid route for the destination of the packet. The second case 1047 happens immediately upon detection of a broken link (see Section 6.2) 1048 for an valid route. 1050 Optionally, if a precursor list is maintained for the route, see 1051 Section 12.2 for precursor lifetime operations. 1053 8.4. Route Table Entry Timeouts 1055 During normal operation, AODVv2 does not require any explicit 1056 timeouts to manage the lifetime of a route. At any time, any route 1057 table entry can be examined and then either expunged or marked as 1058 Invalid according to the following rules. 1060 The following rules are used to manage the state of route table 1061 entries: 1063 o If Current_Time > Route.ExpirationTime, set Route.State := 1064 Invalid. 1066 o If (Current_Time - Route.LastUsed) > (ACTIVE_INTERVAL + 1067 MAX_IDLETIME), and if (Route.Timed == FALSE), set Route.State := 1068 Invalid. 1070 o If (Current_Time - Route.LastUsed) > ACTIVE_INTERVAL, and if 1071 (Route.Timed == FALSE), set Route.State := Idle. 1073 o If (Current_Time - Route.LastSeqNum > MAX_SEQNUM_LIFETIME), and 1074 the route is Invalid, the route table entry MUST be expunged. If 1075 the route is not invalid and MAX_SEQNUM_LIFETIME has expired, the 1076 SeqNum information should be removed from the route, to avoid 1077 problems with boot sequence and lost SeqNum behaviour. 1079 Memory constrained devices MAY choose to expunge routes from the 1080 AODVv2 route table at other times, but MUST adhere to the following 1081 rules: 1083 o An Active route MUST NOT be expunged. 1085 o An Idle route SHOULD NOT be expunged. 1087 o Any Invalid route MAY be expunged; least recently used Invalid 1088 routes SHOULD be expunged first. 1090 If precursor lists are maintained for the route (as described in 1091 Section 12.2) then the precursor lists must also be expunged at the 1092 same time that the route itself is expunged. 1094 8.5. Route Discovery, Retries and Buffering 1096 AODVv2 message types RREQ and RREP are together known as Routing 1097 Messages (RteMsgs) and are used to discover a route between an 1098 Originating and Target Address, denoted by OrigAddr and TargAddr. 1099 The constructed route is bidirectional, enabling packets to flow 1100 between OrigAddr and TargAddr. RREQ and RREP have similar 1101 information and function, but have some differences in their rules 1102 for handling. When a node receives a RREQ or a RREP, the node then 1103 creates or updates a route to the OrigAddr or the TargAddr 1104 respectively (see Section 8.1). The main difference between the two 1105 messages is that, by default, RREQ messages are multicast to solicit 1106 a RREP, whereas RREP is unicast as a response to RREQ. 1108 When an AODVv2 router needs to forward a data packet from a node 1109 (with IP address OrigAddr) in its set of router clients, and it does 1110 not have a forwarding route toward the packet's IP destination 1111 address (TargAddr), the AODVv2 router (RREQ_Gen) generates a RREQ (as 1112 described in Section 9.1.1) to discover a route toward TargAddr. 1113 Subsequently RREQ_Gen awaits reception of an RREP message (see 1114 Section 9.2.1) or other route table update (see Section 8.2) to 1115 establish a route toward TargAddr. The RREQ message contains routing 1116 information to enable RREQ recipients to route packets one hop 1117 towards the OrigAddr, and the RREP message contains routing 1118 information to enable RREP recipients to route packets one hop 1119 towards the TargAddr. 1121 After issuing a RREQ, as described above RREQ_Gen awaits a RREP 1122 providing a bidirectional route toward the Target Address. If the 1123 RREP is not received within RREQ_WAIT_TIME, RREQ_Gen MAY retry the 1124 Route Discovery by generating another RREQ. Route Discovery SHOULD 1125 be considered to have failed after DISCOVERY_ATTEMPTS_MAX and the 1126 corresponding wait time for a RREP response to the final RREQ. After 1127 the attempted Route Discovery has failed, RREQ_Gen MUST wait at least 1128 RREQ_HOLDDOWN_TIME before attempting another Route Discovery to the 1129 same destination. 1131 To reduce congestion in a network, repeated attempts at route 1132 discovery for a particular Target Address SHOULD utilize a binary 1133 exponential backoff, as described in [RFC3561], where the initial 1134 wait time is RREQ_WAIT_TIME and the wait time is doubled for each 1135 retry based. 1137 Data packets awaiting a route SHOULD be buffered by RREQ_Gen. This 1138 buffer SHOULD have a fixed limited size (BUFFER_SIZE_PACKETS or 1139 BUFFER_SIZE_BYTES). Determining which packets to discard first is a 1140 matter of policy at each AODVv2 router; in the absence of policy 1141 constraints, by default older data packets SHOULD be discarded first. 1142 Buffering of data packets can have both positive and negative effects 1143 (albeit usually positive). Nodes without sufficient memory available 1144 for buffering SHOULD be configured to disable buffering by 1145 configuring BUFFER_SIZE_PACKETS = 0 and BUFFER_SIZE_BYTES = 0. This 1146 will affect the latency required for launching TCP applications to 1147 new destinations. 1149 If a route discovery attempt has failed (i.e., DISCOVERY_ATTEMPTS_MAX 1150 attempts have been made without receiving a RREP) to find a route 1151 toward the Target Address, any data packets buffered for the 1152 corresponding Target Address MUST BE dropped and a Destination 1153 Unreachable ICMP message (Type 3) SHOULD be delivered to the source 1154 of the data packet. The code for the ICMP message is 1 (Host 1155 unreachable error). If RREQ_Gen is not the source (OrigNode), then 1156 the ICMP is sent to OrigAddr. 1158 8.6. Suppressing Redundant RteMsgs 1160 When RREQ messages are flooded in a MANET, an AODVv2 router may 1161 receive similar RREQ messages from more than one of its neighbours. 1162 To avoid processing and transmission associated with redundant 1163 RteMsgs, while still enabling proper handling of earlier RteMsgs that 1164 may have somehow been delayed in the network, it is necessary for 1165 each AODVv2 router store information about RteMsgs which it has 1166 recently received (see the RteMsg table defined in Section 6.5). 1168 When a RREQ is received, it is checked against the RteMsg Table to 1169 see if it contains redundant information. If so it does not need to 1170 be processed. 1172 For RREQ messages, the process for comparison is as follows: 1174 o Look for a "comparable" entry in the RteMsg Table with the same 1175 MsgType, OrigAddr, TargAddr, and MetricType. 1177 o If there is none, create an entry to store information about the 1178 received RREQ, and continue to regenerate the RREQ. 1180 o If there is an entry, and it has a lower SeqNum for OrigAddr than 1181 the received RREQ, update it using the new RREQ and continue to 1182 regenerate the RREQ. 1184 o If there is an entry and it has a higher SeqNum for OrigAddr than 1185 the received RREQ, do not replace the entry and do not process the 1186 RREQ. 1188 o If there is an entry and it has the same SeqNum for OrigAddr and a 1189 higher Metric than the received RREQ, update it with the new RREQ 1190 information. 1192 o If there is an entry and it has the same SeqNum for OrigAddr and a 1193 Metric less than or equal to the received RREQ, do not replace the 1194 entry and do not regenerate the RREQ. 1196 o In all cases, update the timestamp field, since other comparable 1197 RREQs may still be traversing the network. 1199 The process of comparison for optional multicast RREP messages is 1200 analogous, substituting RREP for RREQ, and TargAddr for OrigAddr. 1201 Entries in the RteMsg Table MUST be deleted after 1202 MAX_SEQNUM_LIFETIME, but should be maintained for at least 1203 RteMsg_ENTRY_TIME in order to account for long-lived RREQs traversing 1204 the network. 1206 9. AODVv2 Protocol Messages 1208 This section specifies the data elements and values required in 1209 AODVv2 protocol messages, namely RREQ, RREP, RERR, and RREP_Ack. 1211 To avoid congestion, each AODVv2 router's rate of packet/message 1212 generation SHOULD be limited. The rate and algorithm for limiting 1213 messages (CONTROL_TRAFFIC_LIMIT) is left to the implementor and 1214 should be administratively configurable. AODVv2 messages SHOULD be 1215 discarded in the following order of preference: RREQ, RREP, RERR, and 1216 finally RREP_Ack. 1218 See Section 10 for the mapping of AODVv2 data elements to RFC 5444 1219 Message TLVs, Address Blocks, and Address TLVs. 1221 9.1. RREQ Messages 1223 RREQ messages are used in Route Discovery operations to request a 1224 route to a specified Target address. RREQ messages have the 1225 following general structure: 1227 +-----------------------------------------------------------------+ 1228 | msg_hop_limit, msg_hop_count | 1229 +-----------------------------------------------------------------+ 1230 | AddressList := {OrigAddr, TargAddr} | 1231 +-----------------------------------------------------------------+ 1232 | PrefixLengthList := {PrefixLength for OrigAddr, null}(optional) | 1233 +-----------------------------------------------------------------+ 1234 | OrigSeqNum, (optional) TargSeqNum | 1235 +-----------------------------------------------------------------+ 1236 | MetricType (optional) | 1237 +-----------------------------------------------------------------+ 1238 | MetricList := {Metric for OrigAddr, null} | 1239 +-----------------------------------------------------------------+ 1240 | ValidityTimeList := {ValidityTime for OrigAddr, null}(optional) | 1241 +-----------------------------------------------------------------+ 1243 Figure 1: RREQ message structure 1245 RREQ Data Elements 1247 msg_hop_limit 1248 The remaining number of hops allowed for dissemination of the 1249 RREQ message. 1251 msg_hop_count 1252 The number of hops already traversed during dissemination of 1253 the RREQ message. 1255 AddressList 1256 AddressList contains OrigAddr and TargAddr. 1258 PrefixLengthList 1259 PrefixLengthList contains the length of the prefix for 1260 OrigAddr, if OrigAddr resides on a Client Network with a prefix 1261 length shorter than the number of bits of the address family 1262 for OrigAddr. 1264 OrigSeqNum 1265 OrigSeqNum is REQUIRED and carries the destination sequence 1266 number associated with OrigNode. 1268 TargSeqNum 1269 TargSeqNum is optional and carries a destination sequence 1270 number associated with TargNode. 1272 MetricList 1273 The MetricList data element is REQUIRED, and carries the route 1274 metric information associated with OrigAddr. 1276 MetricType 1277 The MetricType element defines the type of Metric associated 1278 with the entries in the MetricList. 1280 ValidityTimeList 1281 The ValidityTimeList is optional and carries the length of time 1282 that the sender is willing to offer a route towards OrigAddr. 1284 RREQ messages carry information about OrigAddr and TargAddr, as 1285 identified in the context of the RREQ_Gen. The OrigSeqNum MUST 1286 appear. Both MAY appear in the same RREQ when SeqNum is available 1287 for both OrigAddr and TargAddr. 1289 The OrigSeqNum data element in a RteMsg MUST apply only to OrigAddr. 1290 The other address in the AddressList is TargAddr. 1292 If the TargSeqNum data element appears, then it MUST apply only to 1293 TargAddr. The other address in the AddressList is OrigAddr. 1295 9.1.1. RREQ Generation 1297 Upon receiving an IP packet from one of its Router Clients, it often 1298 happens that an AODVv2 router has no valid route to the destination. 1299 In this case the AODVv2 router is responsible for generating a RREQ 1300 and associated data elements on behalf of its client OrigNode. The 1301 router is referred to as RREQ_Gen. Before creating a RREQ, RREQ_Gen 1302 should check if an RREQ has recently been sent for this destination 1303 and a response is awaited, or if the limit of AODVv2 RREQ retries has 1304 been reached. 1306 In constructing the RREQ, RREQ_Gen uses AddressList, OrigSeqNum, 1307 MetricList, and optionally PrefixLengthList, TargSeqNum, MetricType, 1308 and ValidityTime. 1310 RREQ_Gen follows the steps in this section. OrigAddr MUST be a 1311 unicast address. The order of data elements is illustrated 1312 schematically in Figure 1. RREQ_Gen SHOULD include TargSeqNum, if a 1313 previous value of the TargAddr's SeqNum is known (e.g. from an 1314 invalid route table entry using longest-prefix matching). If 1315 TargSeqNum is not included, AODVv2 routers handling the RREQ assume 1316 that RREQ_Gen does not have that information. 1318 1. Set msg_hop_limit to MAX_HOPCOUNT. 1320 2. Set msg_hop_count to zero, if including it. 1322 3. Set AddressList := {OrigAddr, TargAddr}. 1324 4. For the PrefixLengthList: 1326 * If OrigAddr resides on a subnet of Router Clients, set 1327 PrefixLengthList := { OrigAddr subnet's prefix, null }. 1329 * Otherwise, the PrefixLengthList is omitted. 1331 5. For the Sequence Number List: 1333 * Increment the SeqNum as specified in Section 6.4. 1335 * Set OrigSeqNum to the new value of SeqNum. 1337 * If an Invalid route exists matching TargAddr using longest 1338 prefix matching, include TargSeqNum and set it to the sequence 1339 number on the Invalid route. Otherwise omit TargSeqNum. 1341 6. Set MetricList := { Route[OrigAddr].Metric, null }. 1343 7. Include the MetricType data element if requesting a route for a 1344 non-default metric type. 1346 8. If the RREQ_Gen wishes to limit the time that the route to 1347 OrigAddr may be used, include the ValidityTime data element. 1349 9.1.2. RREQ Reception 1351 Upon receiving an RREQ, an AODVv2 router performs the following 1352 steps. 1354 1. A router MUST handle RREQs only from neighbors. RREQs from nodes 1355 that are not neighbors MUST be disregarded. 1357 2. Check whether the sender is on the blacklist of AODVv2 routers 1358 (see Section 6.2). If not, continue processing. Otherwise, 1359 check the Blacklist Remove Time. 1361 * If Current_Time < Remove Time, ignore this RREQ for further 1362 processing. 1364 * If Current_Time >= Remove Time, remove the Blacklist entry and 1365 continue processing. 1367 3. Verify that the message contains the required data elements: 1368 msg_hop_limit, OrigAddr, TargAddr, OrigSeqNum, OrigAddrMetric, 1369 and verify that OrigAddr and TargAddr are valid addresses 1370 (routable and unicast). If not, ignore this message for further 1371 processing. 1373 4. If the MetricType data element is present, check that the 1374 MetricType is known. 1376 * If not, ignore this RREQ for further processing. 1378 * Otherwise continue processing . 1380 5. Verify that OrigAddrMetric <= {MAX_METRIC[MetricType] - 1381 Cost(Link)}. 1383 * If not, ignore this RREQ for further processing. 1385 * Otherwise continue processing . 1387 6. Process the route to OrigAddr as specified in Section 8.1. 1389 7. Check if the message is a duplicate or redundant by comparing to 1390 entries in the RteMsg table as described in Section 8.6. 1392 * If duplicate or redundant, ignore this RREQ for further 1393 processing. 1395 * Otherwise save the information in the RteMsg table to identify 1396 future duplicates and continue processing. 1398 8. Check if the TargAddr belongs to one of the Router Clients. 1400 * If so, generate a RREP as specified in Section 9.2.1. 1402 * Otherwise, continue to RREQ regeneration. 1404 9.1.3. RREQ Regeneration 1406 Unless the router is prepared to advertise the new route, it halts 1407 processing. By sending a RREQ, a router advertises that it will 1408 forward packets to the OrigAddr contained in the RREQ according to 1409 the information enclosed. The router MAY choose not to regenerate 1410 the RREQ, though this could decrease connectivity in the network or 1411 result in non-optimal paths. 1413 The circumstances under which a router MAY choose not to regenerate a 1414 RREQ are not specified in this document. Some examples may include 1415 the router being heavily loaded and not advertising routing for more 1416 traffic, or being low on energy and having to reduce energy expended 1417 for sending AODVv2 messages or packet forwarding. 1419 The procedure for RREQ regeneration is as follows: 1421 1. Check the msg_hop_limit. 1423 * If it is zero, do not regenerate. 1425 * Otherwise, decrement the value by one. 1427 2. Check if msg_hop_count is present and greater than or equal to 1428 MAX_HOPCOUNT 1430 * If so, do not regenerate. 1432 * Otherwise, increment msg_hop_count by one. 1434 3. Change OrigAddrMetric to match the route table entry for 1435 OrigAddr, which should match the advertised value in the received 1436 RREQ plus the cost of the link to the router which forwarded the 1437 RREQ. 1439 4. If the incoming RREQ contains a ValidityTimeList, it MUST be 1440 copied into the regenerated RREQ. If not present, and the 1441 regenerating router wishes to limit the time that its route to 1442 OrigAddr may be used, set ValidityTimeList := {ValidityTime for 1443 OrigAddr, null}. 1445 If the received RREQ was unicast, the regenerated RREQ can be unicast 1446 to the next hop address of the route towards TargAddr, if known. 1447 Otherwise, the RREQ SHOULD be multicast to the LL-MANET-Routers IP 1448 and MAC address [RFC5498], [RFC4291]. 1450 9.2. RREP Messages 1452 RREP messages are used to offer a route to a target address, and are 1453 sent in response to a RREQ message. RREP messages have the following 1454 general structure: 1456 +-----------------------------------------------------------------+ 1457 | msg_hop_limit, msg_hop_count | 1458 +-----------------------------------------------------------------+ 1459 | AckReq (optional) | 1460 +-----------------------------------------------------------------+ 1461 | AddressList := {OrigAddr,TargAddr} | 1462 +-----------------------------------------------------------------+ 1463 | PrefixLengthList := {null, PrefixLength for TargAddr(optional)} | 1464 +-----------------------------------------------------------------+ 1465 | TargSeqNum | 1466 +-----------------------------------------------------------------+ 1467 | MetricList := {null, metric for TargAddr} | 1468 +-----------------------------------------------------------------+ 1469 | MetricType (optional) | 1470 +-----------------------------------------------------------------+ 1471 | ValidityTimeList := {null, ValidityTime for TargAddr}(optional) | 1472 +-----------------------------------------------------------------+ 1474 Figure 2: RREP message structure 1476 RREP Data Elements 1478 msg_hop_limit 1479 The remaining number of hops allowed for dissemination of the 1480 RREP message. 1482 msg_hop_count 1483 The number of hops already traversed during dissemination of 1484 the RREP message. 1486 AckReq 1487 Acknowledgement Requested by sender (optional). 1489 AddressList 1490 AddressList contains OrigAddr and TargAddr. 1492 PrefixLengthList 1493 PrefixLengthList contains the length of the prefix for 1494 TargAddr, if TargAddr resides on a Client Network with a prefix 1495 length shorter than the number of bits of the address family 1496 for TargAddr. 1498 TargSeqNum 1499 TargSeqNum is REQUIRED and carries the destination sequence 1500 number associated with TargNode. 1502 MetricList 1503 The MetricList data element is REQUIRED, and carries the route 1504 metric information associated with TargAddr. 1506 MetricType 1507 The MetricType element defines the type of Metric associated 1508 with the entries in the MetricList. 1510 ValidityTimeList 1511 The ValidityTimeList is optional and carries the length of time 1512 that the sender is willing to offer a route towards TargAddr. 1514 RREP messages carry information about OrigAddr and TargAddr, as known 1515 in the context of the RREP_Gen. The TargSeqNum MUST appear. It MUST 1516 apply only to TargAddr. The other address in the AddressList is 1517 OrigAddr. 1519 9.2.1. RREP Generation 1521 This section specifies the generation of an RREP by an AODVv2 router 1522 (RREP_Gen) that provides connectivity for TargAddr, thus enabling the 1523 establishment of a route between OrigAddr and TargAddr. In 1524 constructing the RREP, AODVv2 uses AddressList, TargSeqNumber List, 1525 MetricList, and optionally AckReq, PrefixLengthList and/or 1526 ValidityTimeList. These elements are then used to create a RFC5444 1527 message; see Section 10 for details. 1529 The AckReq data element indicates that an acknowledgement to the RREP 1530 has been requested. If no corresponding RREP_Ack is received within 1531 the RREP_Ack_SENT_TIMEOUT, the next hop is added to the blacklist as 1532 discussed in Section 6.2. 1534 The procedure for RREP generation is as follows: 1536 1. Set msg_hop_limit to the msg_hop_count from the received RREQ 1537 message. 1539 2. Set msg_hop_count, if including it, to zero. 1541 3. Include the AckReq data element if RREP_Ack is requested from the 1542 next hop (as described in Section 6.2). 1544 4. Include the MetricType data element and set the type accordingly. 1546 5. Set the Address List := {OrigAddr, TargAddr}. 1548 6. For the PrefixLengthList: 1550 * If TargAddr resides on a subnet of Router Clients, set 1551 PrefixLengthList := {null, TargAddr subnet's prefix}. 1553 * Otherwise, no PrefixLengthList is needed. 1555 7. For the TargSeqNum: 1557 * RREP_Gen increments its SeqNum as specified in Section 6.4. 1559 * Set TargSeqNum := the new value of SeqNum. 1561 8. Set MetricList := { null, Route[TargAddr].Metric }. 1563 9. If the RREP_Gen wishes to limit the time that the route to 1564 TargAddr may be used, set ValidityTimeList := {null, TargAddr 1565 ValidityTime}. 1567 By default, the RREP is sent by unicast to the IP address of the next 1568 hop of the RREP_Gen's route to OrigAddr. 1570 9.2.2. RREP Reception 1572 Upon receiving an RREP, an AODVv2 router performs the following 1573 steps. 1575 1. Verify that the RREP message contains the required data elements: 1576 msg_hop_limit, OrigAddr, TargAddr, TargAddrMetric, TargSeqNum, 1577 and verify that OrigAddr and TargAddr are valid addresses 1578 (routable and unicast). If not, ignore this RREP message for 1579 further processing. 1581 2. Check that the MetricType is known. 1583 * If not, ignore this RREP for further processing. 1585 * Otherwise continue processing . 1587 3. Verify that TargAddrMetric <= {MAX_METRIC[MetricType] - 1588 Cost(Link)}. 1590 * If not, ignore this RREP for further processing. 1592 * Otherwise continue processing . 1594 4. Process the route to TargAddr as specified in Section 8.1. 1596 5. If the AckReq data element is present, send a RREP_Ack as 1597 specified in Section 9.4. 1599 6. Check if the message is a duplicate or redundant by comparing to 1600 entries in the RREP table as described in Section 8.6. 1602 * If duplicate or redundant, ignore this RREP for further 1603 processing. 1605 * Otherwise save the information in the RREP table to identify 1606 future duplicates and continue processing. 1608 7. Check if the OrigAddr belongs to one of the Router Clients. 1610 * If so, the RREP satisfies a previously sent RREQ. Processing 1611 is complete and data can now be forwarded along the route. 1612 Any packets from OrigAddr that were buffered for later 1613 delivery SHOULD be transmitted. 1615 * Otherwise, continue to RREP regeneration. 1617 9.2.3. RREP Regeneration 1619 Similar to rules for RREQ regeneration, unless the router is prepared 1620 to advertise the route to TargAddr, it halts processing. By 1621 forwarding a RREP, a router advertises that it will forward packets 1622 to the TargAddr contained in the RREP according to the information 1623 enclosed. The router MAY choose not to regenerate the RREP, for the 1624 same reasons as mentioned under RREQ regeneration Section 9.1.3, 1625 though this could decrease connectivity in the network or result in 1626 non-optimal paths. 1628 If no valid route exists to OrigAddr, a RERR SHOULD be transmitted to 1629 TargAddr as specified in Section 9.3.1 and the RREP should not be 1630 regenerated. 1632 The procedure for RREP regeneration is as follows: 1634 1. Check the msg_hop_limit. 1636 * If it is zero, do not regenerate. 1638 * Otherwise, decrement the value by one. 1640 2. If msg_hop_count is present, then: 1642 * If msg_hop_count >= MAX_HOPCOUNT, do not regenerate. 1644 * Otherwise, increment msg_hop_count by one. 1646 3. The RREP SHOULD be unicast to the next hop on the route to 1647 OrigAddr. If no valid route exists to OrigAddr, a RERR SHOULD be 1648 transmitted to TargAddr as specified in Section 9.3.1. 1650 4. Change TargAddrMetric to match the route table entry for 1651 TargAddr, which should match the advertised value in the received 1652 RREP plus the cost of the link to the router which forwarded the 1653 RREP. 1655 5. Include the AckReq data element if this device requires 1656 acknowledgement of the RREP message. 1658 6. If the incoming RREP contains a ValidityTimeList, it MUST be 1659 copied into the regenerated RREP. If not present, and the 1660 regenerating router wishes to limit the time that its route to 1661 TargAddr may be used, set ValidityTimeList := {null, ValidityTime 1662 for TargAddr}. 1664 The RREP SHOULD be unicast to the next hop on the route to OrigAddr. 1666 9.3. RERR Messages 1668 An RERR message is generated by a AODVv2 router (i.e., RERR_Gen) in 1669 order to notify upstream routers that packets cannot be delivered to 1670 one or more destinations. An RERR message has the following general 1671 structure: 1673 +-----------------------------------------------------------------+ 1674 | msg_hop_limit | 1675 +-----------------------------------------------------------------+ 1676 | PktSource (optional) | 1677 +-----------------------------------------------------------------+ 1678 | RERR AddressList | 1679 +-----------------------------------------------------------------+ 1680 | PrefixLengthList for UnreachableAddresses (optional) | 1681 +-----------------------------------------------------------------+ 1682 | SeqNumList (one entry per address) | 1683 +-----------------------------------------------------------------+ 1684 | MetricType (optional) | 1685 +-----------------------------------------------------------------+ 1687 Figure 3: RERR message structure 1689 RERR Data Elements 1690 msg_hop_limit 1691 The remaining number of hops allowed for dissemination of the 1692 RERR message. 1694 PktSource 1695 The IP address of the unreachable destination triggering RERR 1696 generation. If this RERR message was triggered by a broken 1697 link, the PktSource data element is not required. 1699 RERR AddressList 1700 A list of IP addresses not reachable by the AODVv2 router 1701 transmitting the RERR. 1703 PrefixLengthList 1704 PrefixLengthList contains the prefix lengths associated with 1705 the addresses in the RERR AddressList, if any of them reside on 1706 a Client Network with a prefix length shorter than the number 1707 of bits of their address family. 1709 MetricType 1710 If MetricType != DEFAULT_METRIC_TYPE, the MetricType associated 1711 with routes affected by a broken link. 1713 SeqNumList 1714 The list of sequence numbers associated with the 1715 UnreachableAddresses in the RERR AddressList. 1717 9.3.1. RERR Generation 1719 There are two types of events which trigger generation of a RERR 1720 message. The first is the arrival of a packet for which there is no 1721 route to the destination address. This can be a packet forwarded by 1722 the routing process, or a RREP when there is no route to OrigAddr. 1723 In this case, exactly one UnreachableAddress will be included in 1724 RERR's AddressList (either the Destination Address of the IP header 1725 from a data packet, or the OrigAddr found in the AddressList of an 1726 RREP message). RERR_Gen MUST discard the packet or message that 1727 triggered generation of the RERR. 1729 The second type of event happens when a link breaks. All routes 1730 (whether valid or not) that use the broken link MUST be marked as 1731 Invalid. If the broken link was not used by any Active route, no 1732 RERR message is generated. Every Invalid route reported in the RERR 1733 MUST have the same MetricType. If the broken link affects routes to 1734 destinations that have different MetricTypes, multiple RERR messages 1735 must be generated. 1737 If an AODVv2 router receives an ICMP packet to or from the address of 1738 one of its client nodes, it simply forwards the ICMP packet, and does 1739 not generate any RERR message. 1741 In constructing the RERR, AODVv2 uses MetricType, AddressList, 1742 SeqNumList, and in some cases PktSource and PrefixLengthList. These 1743 elements are then used to create a RFC5444 message; see Section 10 1744 for details. 1746 The procedure for RERR generation is as follows: 1748 1. Set msg_hop_limit to MAX_HOPCOUNT. 1750 2. If the RERR was triggered by an Undeliverable Packet, the 1751 PktSource data element MUST be included, containing the source IP 1752 address of the Undeliverable Packet. 1754 3. Include the MetricType data element if reporting a Invalid route 1755 for a non-default metric type. 1757 4. For the RERR AddressList: 1759 * If the RERR was triggered by an undeliverable packet, insert 1760 the destination IP address of the undeliverable packet, or if 1761 the packet was a RREP, insert the OrigAddr. 1763 * If the RERR was triggered by a broken link, include the 1764 addresses of all previously Active routes which are now 1765 Invalid, up to the limit imposed by the MTU (interface 1766 "Maximum Transfer Unit") of the physical medium. If there are 1767 too many such previously Active routes, additional RERR 1768 messages should be constructed and transmitted to contain the 1769 remaining addresses. If the configuration option 1770 ENABLE_IDLE_IN_RERR is enabled, include any previously Idle 1771 routes which are now Invalid, as long as the packet size of 1772 the RERR does not exceed the MTU. 1774 5. If there are destinations reported in the RERR AddressList that 1775 have associated subnet prefixes in the route table, insert those 1776 prefixes in the PrefixLengthList; otherwise, omit the 1777 PrefixLengthList. 1779 6. If known, the sequence numbers associated with the routes to the 1780 addresses in the RERR AddressList SHOULD be included in the 1781 SeqNumList; otherwise, omit the SeqNumList. 1783 If the RERR is sent in response to an Undeliverable Packet: 1785 o It SHOULD be sent unicast to the next hop towards the source IP 1786 address of the packet which triggered the RERR. 1788 o Otherwise the RERR MUST be sent to the multicast IP and MAC 1789 address for LL-MANET-Routers. 1791 If the RERR is sent in response to a broken link: 1793 o If precursor lists are maintained for the addresses in the RERR 1794 AddressList (see Section 12.2), the RERR SHOULD be unicast to the 1795 precursors. 1797 o Otherwise the RERR MUST be sent to the multicast IP and MAC 1798 address for LL-MANET-Routers. 1800 9.3.2. RERR Reception 1802 Upon receiving an RERR, the following steps are performed. 1804 1. If the message does not contain the msg_hop_limit and at least 1805 one UnreachableAddress, do not process the RERR. 1807 2. If the MetricType data element is present, check that the 1808 MetricType is known. 1810 * If not, ignore this RERR for further processing. 1812 * Otherwise continue processing . 1814 3. For each UnreachableAddress, 1816 * Check that the address is valid (routable and unicast). 1818 * Check that there is a valid route with the same MetricType 1819 matching the address using longest prefix matching. 1821 * Check that the route's next hop is the sender of the RERR. 1823 * Check that the route's next hop interface is the interface on 1824 which the RERR was received. 1826 * Check that the Unreachable Address SeqNum is either unknown, 1827 or is greater than the route's SeqNum. 1829 * If any of the above are false, the UnreachableAddress does not 1830 need to be advertised in a regenerated RERR. 1832 * If all of the above are true: 1834 + If the route's prefix length is the same as the 1835 UnreachableAddress's prefix length, set the route state to 1836 Invalid. 1838 + If the prefix length is shorter than the original route, 1839 the route MUST be expunged from the routing table, since it 1840 is a sub-route of the larger route which is reported to be 1841 Invalid. 1843 + If the prefix length is different, create a new route with 1844 the UnreachableAddress and its prefix, and set the state to 1845 Invalid. 1847 If there are no UnreachableAddresses which need to be advertised in a 1848 regenerated RERR, take no further action. 1850 Otherwise regenerate the RERR as specified in Section 9.3.3. 1852 9.3.3. RERR Regeneration 1854 The procedure for RERR regeneration is as follows: 1856 1. Check the msg_hop_limit. 1858 * If it is zero, do not regenerate. 1860 * Otherwise, decrement the value by one. 1862 2. If the PktSource data element was included in the original RERR, 1863 copy it into the regenerated RERR. 1865 3. For the RERR AddressList, include all UnreachableAddresses which 1866 have been determined to need regeneration. 1868 4. For the PrefixLengthList, insert the prefix lengths associated 1869 with the addresses in the RERR AddressList. 1871 5. For the SeqNumList, include the sequence numbers corresponding to 1872 the addresses in the RERR AddressList. 1874 If the original RERR contained the PktSource data element, and a 1875 route exists to the source address, the regenerated RERR MUST be sent 1876 unicast to the next hop of the route towards PktSource. 1878 Otherwise, if precursor lists are maintained, the regenerated RERR 1879 SHOULD be sent to the active precursors of the Invalid routes as 1880 specified in Section 12.2. 1882 Otherwise the regenerated RERR MUST be sent to the multicast IP and 1883 MAC address for LL-MANET-Routers. 1885 9.4. RREP_Ack Messages 1887 RREP_Ack is modeled on the RREP_Ack message type from AODV [RFC3561]. 1888 RREP_Ack messages have the following general structure: 1890 +-----------------------------------------------------------------+ 1891 | msg_hop_limit := 1 | 1892 +-----------------------------------------------------------------+ 1894 Figure 4: RREP_Ack message structure 1896 RREP_Ack Data Elements 1898 msg_hop_limit 1899 The remaining number of hops allowed for dissemination of the 1900 RREP_Ack message. 1902 9.4.1. RREP_Ack Generation 1904 This section specifies the generation of an RREP_Ack by an AODVv2 1905 router. The procedure is as follows: 1907 1. Set msg_hop_limit := 1. 1909 The RREP_Ack is sent by unicast to the IP address of router that 1910 inserted a AckReq data element into a RREP message. 1912 9.4.2. RREP_Ack Reception 1914 Upon receiving an RREP_Ack, an AODVv2 router performs the following 1915 steps. 1917 1. The router checks whether the sender's IP address is in the 1918 blacklist. If so, the IP address is deleted from the blacklist. 1920 2. The router checks whether an RREP_Ack message was expected from 1921 the sending IP address, in response to an AckReq data element 1922 that the router included in a preceding RREP message as specified 1923 in Section 9.2.1. If so, the router records that the required 1924 RREP_Ack has been received and cancels the associated timeout. 1926 10. Representing AODVv2 data elements using RFC 5444 1928 AODVv2 specifies that all control plane messages between Routers 1929 SHOULD use the Generalised Mobile Ad-hoc Network Packet and Message 1930 Format [RFC5444], which provides a multiplexed transport for multiple 1931 protocols. AODVv2 therefore specifies Route Messages comprising data 1932 elements that map to message elements in RFC5444 but, in line with 1933 the concept of use, does not specify which order the messages should 1934 be arranged in an RFC5444 packet. An implementation of an RFC5444 1935 multiplexer may choose to optimise the content of certain message 1936 elements to reduce control plane overhead. For handling of messages 1937 that contain unknown TLV types, the multiplexer SHOULD ignore the 1938 information for processing, but preserve it unmodified for 1939 forwarding. 1941 Here is a brief summary of the RFC 5444 format. 1943 1. A packet formatted according to RFC 5444 contains zero or more 1944 messages. 1946 2. A message contains a message header, message TLV block, and zero 1947 or more address blocks. 1949 3. Each address block MAY also have one TLV blocks; each TLV block 1950 MAY encode any number of TLVs (including zero). Each TLV value 1951 in an Address TLV block is associated with exactly one of the 1952 addresses in the address block. 1954 The following table shows how AODVv2 data elements are represented in 1955 RFC 5444 messages. 1957 +------------------------+------------------------------------------+ 1958 | Data Element | RFC 5444 Message Representation | 1959 +------------------------+------------------------------------------+ 1960 | msg_hop_limit | RFC 5444 Message Header | 1961 | msg_hop_count | RFC 5444 Message Header | 1962 | AckReq | Acknowledgement Request Message TLV | 1963 | PktSource | The Packet Source Message TLV | 1964 | RteMsg AddressList | RFC 5444 Address Block | 1965 | - OrigAddr | | 1966 | - TargAddr | | 1967 | - PrefixLengthList | | 1968 | RERR AddressList | RFC 5444 Address Block | 1969 | - UnreachableAddress | | 1970 | - PrefixLengthList | | 1971 | SeqNumList | Sequence Number Address Block TLV | 1972 | - SeqNum | | 1973 | OrigSeqNum | Originating Node Sequence Number Address | 1974 | | Block TLV | 1975 | TargSeqNum | Target Node Sequence Number Address | 1976 | | Block TLV | 1977 | MetricType | Extension byte of Metric Address Block | 1978 | | TLV | 1979 | MetricList | Metric Address Block TLV | 1980 | - OrigAddrMetric | - corresponds to OrigAddr | 1981 | - TargAddrMetric | - corresponds to TargAddr | 1982 | ValidityTimeList | VALIDITY_TIME Address Block TLV | 1983 | - ValidityTime | | 1984 +------------------------+------------------------------------------+ 1986 Table 3 1988 AODVv2 neither requires any inclusion nor uses any information from 1989 the packet header. The length of an address (32 bits for IPv4 and 1990 128 bits for IPv6) inside an AODVv2 message is indicated by the msg- 1991 addr-length (MAL) in the msg-header. Although the addresses in an 1992 Address Block may appear in any order, each TLV value in a TLV Block 1993 is associated with exactly one Address in the Address Block. So, for 1994 instance, the ordering of the OrigAddrMetric and TargAddrMetric 1995 values in the MetricList is determined by the order of OrigAddr and 1996 TargAddr in the preceding RteMsg Address List. See Section 14.2 for 1997 more information about AODVv2 Message TLVs. See Section 14.3 for 1998 more information about AODVv2 Address Block TLVs. 2000 11. Simple Internet Attachment 2002 Simple Internet attachment means attachment of a stub (i.e., non- 2003 transit) network of AODVv2 routers to the Internet via a single 2004 Internet AODVv2 router (called IAR). 2006 As in any Internet-attached network, AODVv2 routers, and their 2007 clients, wishing to be reachable from hosts on the Internet MUST have 2008 IP addresses within the IAR's routable and topologically correct 2009 prefix (e.g. 191.0.2.0/24). 2011 /-------------------------\ 2012 / +----------------+ \ 2013 / | AODVv2 Router | \ 2014 | | 191.0.2.2/32 | | 2015 | +----------------+ | Routable 2016 | +-----+--------+ Prefix 2017 | | Internet | /191.0.2/24 2018 | | AODVv2 Router| / 2019 | | 191.0.2.1 |/ /---------------\ 2020 | | serving net +------+ Internet \ 2021 | | 191.0.2/24 | \ / 2022 | +-----+--------+ \---------------/ 2023 | +----------------+ | 2024 | | AODVv2 Router | | 2025 | | 191.0.2.3/32 | | 2026 \ +----------------+ / 2027 \ / 2028 \-------------------------/ 2030 Figure 5: Simple Internet Attachment Example 2032 When an AODVv2 router within the AODVv2 MANET wants to discover a 2033 route toward a node on the Internet, it uses the normal AODVv2 route 2034 discovery for that IP Destination Address. The IAR MUST respond to 2035 RREQ on behalf of all Internet destinations. 2037 When a packet from a node on the Internet destined for a node in the 2038 AODVv2 MANET reaches the IAR, if the IAR does not have a route toward 2039 that destination it will perform normal AODVv2 route discovery for 2040 that destination. 2042 12. Optional Features 2044 Some optional features of AODVv2, associated with AODV, are not 2045 required by minimal implementations. These features are expected to 2046 apply in networks with greater mobility, or larger node populations, 2047 or requiring reduced latency for application launches. The optional 2048 features are as follows: 2050 o Expanding Rings Multicast 2052 o Precursor lists. 2054 o Multicast RREP Response to RREQ 2056 o Intermediate RREPs (iRREPs): Without iRREP, only the destination 2057 can respond to a RREQ. 2059 o Message Aggregation Delay. 2061 12.1. Expanding Rings Multicast 2063 For multicast RREQ, msg_hop_limit MAY be set in accordance with an 2064 expanding ring search as described in [RFC3561] to limit the RREQ 2065 propagation to a subset of the local network and possibly reduce 2066 route discovery overhead. 2068 12.2. Precursor Lists and Notifications 2070 This section specifies an interoperable enhancement to AODVv2 (and 2071 possibly other reactive routing protocols) enabling more economical 2072 RERR notifications to traffic sources upon determination that a route 2073 needed to forward such traffic to its destination has become Invalid. 2075 12.2.1. Overview 2077 In many circumstances, there can be several sources of traffic for a 2078 certain destination. Each such source of traffic is known as a 2079 "precursor" for the destination, as well as all upstream routers 2080 between the forwarding AODVv2 router and the traffic source. There 2081 is no need to keep track of upstream routers any farther away than 2082 the next hop. For each destination, an AODVv2 router MAY choose to 2083 keep track of the upstream neighbors that have provided traffic for 2084 that destination. 2086 Moreover, any particular link to an adjacent AODVv2 router may be a 2087 path component of multiple routes towards various destinations. The 2088 precursors for all destinations using the next hop across any link 2089 are collectively known as the precursors for that next hop. 2091 When an AODVv2 router marks a route as Invalid, the precursors of the 2092 Invalid route should be notified (using RERR) about the change in 2093 status of their route to the destination of that Invalid route. 2095 12.2.2. Precursor Notification Details 2097 During normal operation, each AODVv2 router wishing to maintain 2098 precursor lists as described above, maintains a precursor table and 2099 updates the table whenever the node forwards traffic to one of the 2100 destinations in its route table. For each precursor in the precursor 2101 list, a record must be maintained to indicate whether the precursor 2102 has been used for recent traffic (in other words, whether the 2103 precursor is an Active precursor). So, when traffic arrives from a 2104 precursor, the Current_Time is used to mark the time of last use for 2105 the precursor list element associated with that precursor. 2107 When an AODVv2 router detects that a link is broken, then for each 2108 Active precursor using that next hop, the node MAY notify the 2109 precursor using either unicast or multicast RERR: 2111 unicast RERR to each Active precursor 2112 This option is applicable when there are few Active precursors 2113 compared to the number of neighboring AODVv2 routers. 2115 multicast RERR to RERR_PRECURSORS 2116 RERR_PRECURSORS is, by default, LL-MANET-Routers [RFC5498]. This 2117 option is typically preferable when there are many precursors, 2118 since fewer packet transmissions are required. 2120 Each neighbor receiving the RERR MAY then execute the same procedure 2121 until all upstream routers have received the RERR notification. 2123 12.3. Multicast RREP Response to RREQ 2125 The RREQ Target Router (RREP_Gen) MAY, as an alternative to 2126 unicasting a RREP, be configured to use multicast to distribute 2127 routing information about the route toward TargAddr. RREP_Gen does 2128 this as described in Section 9.2.1, but multicasting the RREP to LL- 2129 MANET-Routers [RFC5498]. Routers receiving the multicast RREP must 2130 perform RteMsg suppression (see Section 8.6). 2132 Broadcast RREP response to incoming RREQ was originally specified to 2133 handle unidirectional links, but it is expensive. Due to the 2134 significant overhead, AODVv2 routers MUST NOT use multicast RREP 2135 unless configured to do so by setting the administrative parameter 2136 USE_MULTICAST_RREP. This technique can be used to find the best 2137 return path rather than follow the same path as the RREQ took. 2139 12.4. Intermediate RREP 2141 This specification has been published as a separate Internet Draft 2142 [I-D.perkins-irrep]. 2144 12.5. Message Aggregation Delay 2146 The aggregation of multiple messages into a packet is specified in 2147 RFC 5444 [RFC5444]. 2149 Implementations MAY choose to briefly delay transmission of messages 2150 for the purpose of aggregation (into a single packet) or to improve 2151 performance by using jitter [RFC5148]. 2153 13. Administratively Configurable Parameters and Timer Values 2155 AODVv2 uses various configurable parameters of various types: 2157 o Timers 2159 o Protocol constants 2161 o Administrative (functional) controls 2163 o Other administrative parameters and lists 2165 The tables in the following sections show the parameters along their 2166 definitions and default values (if any). 2168 Note: several fields have limited size (bits or bytes). These sizes 2169 and their encoding may place specific limitations on the values that 2170 can be set. For example, is a 8-bit field and 2171 therefore MAX_HOPCOUNT cannot be larger than 255. 2173 13.1. Timers 2175 AODVv2 requires certain timing information to be associated with 2176 route table entries. The default values are as follows: 2178 +------------------------+---------------+ 2179 | Name | Default Value | 2180 +------------------------+---------------+ 2181 | ACTIVE_INTERVAL | 5 second | 2182 | MAX_IDLETIME | 200 seconds | 2183 | MAX_BLACKLIST_TIME | 200 seconds | 2184 | MAX_SEQNUM_LIFETIME | 300 seconds | 2185 | RteMsg_ENTRY_TIME | 12 seconds | 2186 | RREQ_WAIT_TIME | 2 seconds | 2187 | RREP_Ack_SENT_TIMEOUT | 1 second | 2188 | RREQ_HOLDDOWN_TIME | 10 seconds | 2189 +------------------------+---------------+ 2191 Table 4: Timing Parameter Values 2193 The above timing parameter values have worked well for small and 2194 medium well-connected networks with moderate topology changes. The 2195 timing parameters SHOULD be administratively configurable for the 2196 network where AODVv2 is used. Ideally, for networks with frequent 2197 topology changes the AODVv2 parameters should be adjusted using 2198 either experimentally determined values or dynamic adaptation. For 2199 example, in networks with infrequent topology changes MAX_IDLETIME 2200 may be set to a much larger value. 2202 13.2. Protocol Constants 2204 AODVv2 protocol constants typically do not require changes. The 2205 following table lists these constants, along with their values and a 2206 reference to the specification describing their use. 2208 +------------------------+-----------------+------------------------+ 2209 | Name | Default Value | Description | 2210 +------------------------+-----------------+------------------------+ 2211 | DISCOVERY_ATTEMPTS_MAX | 3 | Section 8.5 | 2212 | MAX_HOPCOUNT | 20 hops | Section 7 | 2213 | MAX_METRIC[i] | Specified only | Section 7 | 2214 | | for HopCount | | 2215 | MAXTIME | [TBD] | Maximum expressible | 2216 | | | clock time Section 8.4 | 2217 +------------------------+-----------------+------------------------+ 2219 Table 5: Parameter Values 2221 These values MUST have the same values for all AODVv2 routers in the 2222 ad hoc network. If the configured values are different, the 2223 following consequences may be observed: 2225 o DISCOVERY_ATTEMPTS_MAX: some nodes are likely to be more 2226 successful at finding routes, but at the cost of additional 2227 control traffic for unsuccessful attempts. 2229 o MAX_HOPCOUNT: If some nodes use a value that is too small, they 2230 would not be able to discover routes to distant addresses. 2232 o MAX_METRIC[DEFAULT_METRIC_TYPE]: MUST always be the maximum 2233 expressible metric of type DEFAULT_METRIC_TYPE. No 2234 interoperability problems due to variations on different nodes, 2235 but if a lesser value is used, route comparisons may exhibit 2236 overly restrictive behavior. 2238 o MAXTIME: Variations on different nodes would not cause problems 2239 for interoperability. If a lesser value is used, route state 2240 management may exhibit overly restrictive behavior. 2242 13.3. Administrative (functional) controls 2244 The following administrative controls may be used to change the 2245 operation of the network, by enabling optional behaviors. These 2246 options are not required for correct routing behavior, although they 2247 may potentially reduce AODVv2 protocol messaging in certain 2248 situations. The default behavior is typically to NOT enable the 2249 options. Inconsistent settings at different nodes in the network 2250 will not result in protocol errors. In the case of inconsistent 2251 settings for DEFAULT_METRIC_TYPE, inconsistent setting might result 2252 in messages specifying metric types unknown to some nodes and 2253 consequent poor performance. 2255 +------------------------+------------------------------------+ 2256 | Name | Description | 2257 +------------------------+------------------------------------+ 2258 | DEFAULT_METRIC_TYPE | 3 (i.e, Hop Count (see [RFC6551])) | 2259 | ENABLE_IDLE_IN_RERR | Section 9.3.1 | 2260 | ENABLE_IRREP | Section 9.1.1 | 2261 | USE_MULTICAST_RREP | Section 12.3 | 2262 +------------------------+------------------------------------+ 2264 Table 6: Administratively Configured Controls 2266 13.4. Other administrative parameters and lists 2268 The following table lists contains AODVv2 parameters which should be 2269 administratively configured for each node. 2271 +-----------------------+-----------------------+-----------------+ 2272 | Name | Default Value | Cross Reference | 2273 +-----------------------+-----------------------+-----------------+ 2274 | AODVv2_INTERFACES | | Section 4 | 2275 | BUFFER_SIZE_PACKETS | 2 | Section 8.5 | 2276 | BUFFER_SIZE_BYTES | MAX_PACKET_SIZE [TBD] | Section 8.5 | 2277 | CLIENT_ADDRESSES | AODVv2_INTERFACES | Section 6.3 | 2278 | CONTROL_TRAFFIC_LIMIT | TBD [50 packets/sec?] | Section 9 | 2279 +-----------------------+-----------------------+-----------------+ 2281 Table 7: Other Administrative Parameters 2283 14. IANA Considerations 2285 This section specifies several RFC 5444 message types, message tlv- 2286 types, and address tlv-types. Also, a new registry of 16-bit 2287 alternate metric types is specified. 2289 14.1. AODVv2 Message Types Specification 2291 +----------------------------------------+----------+ 2292 | Name of AODVv2 Message | Type | 2293 +----------------------------------------+----------+ 2294 | Route Request (RREQ) | 10 (TBD) | 2295 | Route Reply (RREP) | 11 (TBD) | 2296 | Route Error (RERR) | 12 (TBD) | 2297 | Route Reply Acknowledgement (RREP_Ack) | 13 (TBD) | 2298 +----------------------------------------+----------+ 2300 Table 8: AODVv2 Message Types 2302 14.2. Message TLV Type Specification 2304 +-----------------------------+----------+----------+---------------+ 2305 | Name of Message TLV | Type | Length | Cross | 2306 | | | (octets) | Reference | 2307 +-----------------------------+----------+----------+---------------+ 2308 | AckReq (Acknowledgment | 10 (TBD) | 0 | Section 6.2 | 2309 | Request) | | | | 2310 | PktSource (Packet Source) | 11 (TBD) | 4 or 16 | Section 9.3.1 | 2311 +-----------------------------+----------+----------+---------------+ 2313 Table 9: Message TLV Types 2315 14.3. Address Block TLV Specification 2317 +----------------------------+-----------+------------+-------------+ 2318 | Name of Address Block TLV | Type | Length | Value | 2319 +----------------------------+-----------+------------+-------------+ 2320 | Metric | 10 (TBD) | depends on | Section 9.1 | 2321 | | | MetricType | | 2322 | Sequence Number (SeqNum) | 11 (TBD) | 2 octets | Section 9.1 | 2323 | Originating Node Sequence | 12 (TBD) | 2 octets | Section 9.1 | 2324 | Number (OrigSeqNum) | | | | 2325 | Target Node Sequence | 13 (TBD) | 2 octets | Section 9.1 | 2326 | Number (TargSeqNum) | | | | 2327 | VALIDITY_TIME | 1 | 1 octet | [RFC5497] | 2328 +----------------------------+-----------+------------+-------------+ 2330 Table 10: Address Block TLV (AddrTLV) Types 2332 14.4. MetricType Number Allocation 2334 Metric types are identified according to the assignments as specified 2335 in [RFC6551]. The metric type of the Hop Count metric is assigned to 2336 be 3, in order to maintain compatibility with that existing table of 2337 values from RFC 6551. 2339 +-----------------------+----------+-------------+ 2340 | Name of MetricType | Type | Metric Size | 2341 +-----------------------+----------+-------------+ 2342 | Unallocated | 0 -- 2 | TBD | 2343 | Hop Count | 3 - TBD | 1 octet | 2344 | Unallocated | 4 -- 254 | TBD | 2345 | Reserved | 255 | Undefined | 2346 +-----------------------+----------+-------------+ 2348 Table 11: Metric Types 2350 15. Security Considerations 2352 The objective of the AODVv2 protocol is for each router to 2353 communicate reachability information about addresses for which it is 2354 responsible. Positive routing information (i.e. a route exists) is 2355 distributed via RREQ and RREP messages. Negative routing information 2356 (i.e. a route does not exist) is distributed via RERRs. AODVv2 2357 routers store the information contained in these messages in order to 2358 properly forward data packets, and they generally provide this 2359 information to other AODVv2 routers. 2361 This section describes various security considerations and potential 2362 avenues to secure AODVv2 routing. Security for authentication of 2363 AODVv2 routers, and/or encryption of traffic is dealt with by the 2364 underlying transport mechanism (e.g., by using the techniques for 2365 Authentication, Integrity, and Confidentiality documented in 2366 [RFC5444]). The most important security mechanism for AODVv2 routing 2367 is integrity/authentication. 2369 In situations where routing information are suspect, integrity and 2370 authentication techniques SHOULD be applied to AODVv2 messages. In 2371 these situations, routing information that is distributed over 2372 multiple hops SHOULD also verify the integrity of information based 2373 on originator of the routing information. 2375 In situations where confidentiality of AODVv2 messages is important, 2376 cryptographic techniques can be applied. 2378 In certain situations, for example sending a RREP or RERR, an AODVv2 2379 router could include proof that it has previously received valid 2380 routing information to reach the destination, at one point of time in 2381 the past. In situations where routers are suspected of transmitting 2382 maliciously erroneous information, the original routing information 2383 along with its security credentials SHOULD be included. 2385 Note that if multicast is used, any confidentiality and integrity 2386 algorithms used MUST permit multiple receivers to handle the message 2387 [RFC7182]. 2389 Routing protocols, however, are prime targets for impersonation 2390 attacks. In networks where the node membership is not known, it is 2391 difficult to determine the occurrence of impersonation attacks, and 2392 security prevention techniques are difficult at best. However, when 2393 the network membership is known and there is a danger of such 2394 attacks, AODVv2 messages must be protected by the use of 2395 authentication techniques, such as those involving generation of 2396 unforgeable and cryptographically strong message digests or digital 2397 signatures. 2399 Most AODVv2 messages are transmitted to the multicast address LL- 2400 MANET-Routers [RFC5498]. It is therefore required for security that 2401 AODVv2 neighbors exchange security information that can be used to 2402 insert an ICV [RFC7182] into the AODVv2 message block [RFC5444]. 2403 This enables hop-by-hop security. For destination-only RREP 2404 discovery procedures, AODVv2 routers that share a security 2405 association SHOULD use the appropriate mechanisms as specified in 2406 [RFC7182]. The establishment of these security associations is out 2407 of scope for this document. 2409 16. Acknowledgments 2411 AODVv2 is a descendant of the design of previous MANET on-demand 2412 protocols, especially AODV [RFC3561] and DSR [RFC4728]. Changes to 2413 previous MANET on-demand protocols stem from research and 2414 implementation experiences. Thanks to Elizabeth Belding and Ian 2415 Chakeres for their long time authorship of AODV. Additional thanks 2416 to Derek Atkins, Emmanuel Baccelli, Abdussalam Baryun, Ramon Caceres, 2417 Thomas Clausen, Christopher Dearlove, Ulrich Herberg, Henner Jakob, 2418 Luke Klein-Berndt, Lars Kristensen, Tronje Krop, Koojana Kuladinithi, 2419 Kedar Namjoshi, Alexandru Petrescu, Henning Rogge, Fransisco Ros, 2420 Pedro Ruiz, Christoph Sommer, Lotte Steenbrink, Romain Thouvenin, 2421 Richard Trefler, Jiazi Yi, Seung Yi, and Cong Yuan, for their reviews 2422 AODVv2 and DYMO, as well as numerous specification suggestions. 2424 17. References 2426 17.1. Normative References 2428 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2429 Requirement Levels", BCP 14, RFC 2119, March 1997. 2431 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 2432 Architecture", RFC 4291, February 2006. 2434 [RFC5082] Gill, V., Heasley, J., Meyer, D., Savola, P., and C. 2435 Pignataro, "The Generalized TTL Security Mechanism 2436 (GTSM)", RFC 5082, October 2007. 2438 [RFC5444] Clausen, T., Dearlove, C., Dean, J., and C. Adjih, 2439 "Generalized Mobile Ad Hoc Network (MANET) Packet/Message 2440 Format", RFC 5444, February 2009. 2442 [RFC5497] Clausen, T. and C. Dearlove, "Representing Multi-Value 2443 Time in Mobile Ad Hoc Networks (MANETs)", RFC 5497, March 2444 2009. 2446 [RFC5498] Chakeres, I., "IANA Allocations for Mobile Ad Hoc Network 2447 (MANET) Protocols", RFC 5498, March 2009. 2449 [RFC6551] Vasseur, JP., Kim, M., Pister, K., Dejean, N., and D. 2450 Barthel, "Routing Metrics Used for Path Calculation in 2451 Low-Power and Lossy Networks", RFC 6551, March 2012. 2453 17.2. Informative References 2455 [I-D.perkins-irrep] 2456 Perkins, C. and I. Chakeres, "Intermediate RREP for 2457 dynamic MANET On-demand (AODVv2) Routing", draft-perkins- 2458 irrep-02 (work in progress), November 2012. 2460 [Perkins94] 2461 Perkins, C. and P. Bhagwat, "Highly Dynamic Destination- 2462 Sequenced Distance-Vector Routing (DSDV) for Mobile 2463 Computers", Proceedings of the ACM SIGCOMM '94 Conference 2464 on Communications Architectures, Protocols and 2465 Applications, London, UK, pp. 234-244, August 1994. 2467 [Perkins99] 2468 Perkins, C. and E. Royer, "Ad hoc On-Demand Distance 2469 Vector (AODV) Routing", Proceedings of the 2nd IEEE 2470 Workshop on Mobile Computing Systems and Applications, New 2471 Orleans, LA, pp. 90-100, February 1999. 2473 [RFC2501] Corson, M. and J. Macker, "Mobile Ad hoc Networking 2474 (MANET): Routing Protocol Performance Issues and 2475 Evaluation Considerations", RFC 2501, January 1999. 2477 [RFC3561] Perkins, C., Belding-Royer, E., and S. Das, "Ad hoc On- 2478 Demand Distance Vector (AODV) Routing", RFC 3561, July 2479 2003. 2481 [RFC4193] Hinden, R. and B. Haberman, "Unique Local IPv6 Unicast 2482 Addresses", RFC 4193, October 2005. 2484 [RFC4728] Johnson, D., Hu, Y., and D. Maltz, "The Dynamic Source 2485 Routing Protocol (DSR) for Mobile Ad Hoc Networks for 2486 IPv4", RFC 4728, February 2007. 2488 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 2489 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 2490 September 2007. 2492 [RFC5148] Clausen, T., Dearlove, C., and B. Adamson, "Jitter 2493 Considerations in Mobile Ad Hoc Networks (MANETs)", RFC 2494 5148, February 2008. 2496 [RFC6130] Clausen, T., Dearlove, C., and J. Dean, "Mobile Ad Hoc 2497 Network (MANET) Neighborhood Discovery Protocol (NHDP)", 2498 RFC 6130, April 2011. 2500 [RFC6621] Macker, J., "Simplified Multicast Forwarding", RFC 6621, 2501 May 2012. 2503 [RFC7182] Herberg, U., Clausen, T., and C. Dearlove, "Integrity 2504 Check Value and Timestamp TLV Definitions for Mobile Ad 2505 Hoc Networks (MANETs)", RFC 7182, April 2014. 2507 Appendix A. Example Algorithms for AODVv2 Protocol Operations 2509 The following subsections show example algorithms for protocol 2510 operations required by AODVv2, including RREQ, RREP, RERR, and 2511 RREP_Ack. 2513 Processing for RREQ, RREP, and RERR messages follows the following 2514 general outline: 2516 1. Receive incoming message. 2518 2. Update route table as appropriate. 2520 3. Respond as needed, often regenerating the incoming message with 2521 updated information. 2523 Once the route table has been updated, the information contained 2524 there is known to be the most recent available information for any 2525 fields in the outgoing message. For this reason, the algorithms are 2526 written as if outgoing message field values are assigned from the 2527 route table information, even though it is often equally appropriate 2528 to use fields from the incoming message. 2530 AODVv2_algorithms: 2532 o Process_Routing_Info 2534 o Fetch_Route_Table_Entry 2536 o Update_Route_Table_Entry 2538 o Create_Route_Table_Entry 2540 o LoopFree 2542 o 2544 o Update_Rte_Msg_Table 2546 o 2548 o Generate_RREQ 2550 o Receive_RREQ 2552 o Regenerate_RREQ 2554 o 2556 o Generate_RREP 2558 o Receive_RREP 2560 o Regenerate_RREP 2562 o 2564 o Generate_RERR 2566 o Receive_RERR 2568 o Regenerate_RERR 2570 o 2572 o Generate_RREP_Ack 2574 o Receive_RREP_Ack 2576 o Timeout RREP_Ack 2577 The following lists indicate the meaning of the field names used in 2578 subsequent sections to describe message processing for the above 2579 algorithms. 2581 RteMsg parameters, where rteMsg can be inRREQ, outRREQ, inRREP or 2582 outRREP: 2584 rteMsg.hopLimit 2586 rteMsg.hopCount 2588 rteMsg.ackReq (RREP only, optional) 2590 rteMsg.metricType (optional) 2592 rteMsg.origAddr 2594 rteMsg.targAddr 2596 rteMsg.origPrefixLen (optional) 2598 rteMsg.targPrefixLen (optional) 2600 rteMsg.origSeqNum (RREQ only) 2602 rteMsg.targSeqNum (optional in RREQ) 2604 rteMsg.origAddrMetric (RREQ only) 2606 rteMsg.targAddrMetric (RREP only) 2608 rteMsg.validityTime 2610 rteMsg.nbrIP 2612 AdvRte has the following properties as described in Section 8.1: 2614 AdvRte.Address = OrigAddr (in a RREQ) or TargAddr (in a RREP) 2616 AdvRte.PrefixLength = PrefixLength for OrigAddr (in a RREQ) or 2617 TargAddr (in a RREP), or if not present, the maximum address 2618 length for the address family of AdvRte.Address 2620 AdvRte.SeqNum = SeqNum for OrigAddr (in a RREQ) or for TargAddr 2621 (in a RREP) 2623 AdvRte.MetricType = RteMsg.MetricType 2624 AdvRte.Metric = RteMsg.Metric 2626 AdvRte.Cost = AdvRte.Metric + Cost(L) according to the indicated 2627 MetricType, where L is the link from the advertising router 2629 AdvRte.ValidityTime = ValidityTime in the RteMsg, if present 2631 AdvRte.NextHopIP = IP source of the RteMsg 2633 AdvRte.NextHopIntf = interface the RteMsg was received on 2635 AdvRte.HopCount = value from RteMsg header 2637 AdvRte.HopLimit = value from RteMsg header 2639 AdvRte.AckReq = true/false whether present in RteMsg (optional in 2640 RREP) 2642 A route table entry has properties as described in Section 6.1: 2644 Route.Address 2646 Route.PrefixLength 2648 Route.SeqNum 2650 Route.NextHop 2652 Route.NextHopInterface 2654 Route.LastUsed 2656 Route.LastSeqNum 2658 Route.ExpirationTime 2660 Route.MetricType 2662 Route.Metric 2664 Route.State 2666 Route.Timed 2668 Route.Precursors (optional) 2670 A.1. Subroutines for AODVv2 Operations 2672 A.1.1. Process_Routing_Info 2674 /* Compare incoming route information to stored route, maybe use 2675 linkMetric: either Cost(inRREQ.netif) or (inRREP.netif) */ 2676 Process_Routing_Info (advRte) 2677 { 2678 rte := Fetch_Route_Table_Entry (advRte); 2679 if (!rte exists) 2680 { 2681 rte := Create_Route_Table_Entry(advRte); 2682 return rte; 2683 } 2685 /* rule from 8.1 */ 2686 if ( 2687 (AdvRte.SeqNum > Route.SeqNum) /* stored route is stale */ 2688 OR 2689 ((AdvRte.SeqNum == Route.SeqNum) /* same SeqNum */ 2690 AND 2691 [( (Route.State == Invalid) 2692 AND 2693 (LoopFree(advRte, rte))) /* advRte can repair stored */ 2694 OR 2695 (AdvRte.Cost < Route.Metric)])) /* advRte is better */ 2696 { 2697 Update_Route_Table_Entry (rte, advRte); 2698 } 2699 return rte; 2700 } 2702 A.1.2. Fetch_Route_Table_Entry 2704 /* lookup a route table entry matching an advertised route */ 2705 Fetch_Route_Table_Entry (advRte) 2706 { 2707 foreach (rteTableEntry in rteTable) 2708 { 2709 if (rteTableEntry.Address == advRte.Address AND 2710 rteTableEntry.MetricType == advRte.MetricType) 2711 return rteTableEntry; 2712 } 2713 return null; 2714 } 2716 /* lookup a route table entry matching address and metric type */ 2717 Fetch_Route_Table_Entry (destination, metricType) 2718 { 2719 foreach (rteTableEntry in rteTable) 2720 { 2721 if (rteTableEntry.Address == destination AND 2722 rteTableEntry.MetricType == metricType) 2723 return rteTableEntry; 2724 } 2725 return null; 2726 } 2728 A.1.3. Update_Route_Table_Entry 2730 /* update a route table entry using AdvRte in received RteMsg */ 2731 Update_Route_Table_Entry (rte, advRte); 2732 { 2733 rte.SeqNum := advRte.SeqNum; 2734 rte.NextHop := advRte.NextHopIp; 2735 rte.NextHopInterface := advRte.NextHopIntf; 2736 rte.LastUsed := Current_Time; 2737 rte.LastSeqNum := Current_Time; 2738 if (validityTime) 2739 { 2740 rte.ExpirationTime := Current_Time + advRte.validityTime; 2741 rte.Timed := true; 2742 } 2743 else 2744 { 2745 rte.Timed := false; 2746 rte.ExpirationTime := MAXTIME; 2747 } 2749 rte.Metric := advRte.Cost; 2750 if (rte.State == Invalid) 2751 rte.State := Idle; 2752 } 2754 A.1.4. Create_Route_Table_Entry 2756 /* Create a route table entry from address and prefix length */ 2757 Create_Route_Table_Entry (address, prefixLength, 2758 seqNum, metricType) 2759 { 2760 rte := allocate_memory(); 2761 rte.Address := address; 2762 rte.PrefixLength := prefixLength; 2763 rte.SeqNum := seqNum; 2764 rte.MetricType := metricType; 2765 } 2766 /* Create a route table entry from the advertised route */ 2767 Create_Route_Table_Entry(advRte) 2768 { 2769 rte := allocate_memory(); 2771 rte.Address := advRte.Address; 2772 if (advRte.PrefixLength) 2773 rte.PrefixLength := advRte.PrefixLength; 2774 else 2775 rte.PrefixLength := maxPrefixLenForAddressFamily; 2777 rte.SeqNum := advRte.SeqNum; 2778 rte.NextHop := advRte.NextHopIp; 2779 rte.NextHopInterface := advRte.NextHopIntf; 2780 rte.LastUsed := Current_Time 2781 rte.LastSeqnum := Current_Time 2782 if (validityTime) 2783 { 2784 rte.ExpirationTime := Current_Time + advRte.ValidityTime; 2785 rte.Timed := true; 2786 } 2787 else 2788 { 2789 rte.Timed := false; 2790 rte.ExpirationTime := MAXTIME; 2791 } 2792 rte.MetricType := advRte.MetricType; 2793 rte.Metric := advRte.Metric; 2794 rte.State := Idle; 2795 } 2797 A.1.5. LoopFree 2799 /* return TRUE if the route advRte is LoopFree compared to rte */ 2800 LoopFree(advRte, rte) 2801 { 2802 if (advRte.Cost <= rte.Cost) 2803 return true; 2804 else 2805 return false; 2806 } 2808 A.1.6. Fetch_Rte_Msg_Table_Entry 2810 /* Find an entry in the RteMsg table matching the given 2811 message's msg-type, OrigAddr, TargAddr, MetricType */ 2812 Fetch_Rte_Msg_Table_Entry (rteMsg) 2813 { 2814 foreach (entry in RteMsgTable) 2815 { 2816 if (entry.msg-type == rteMsg.msg-type AND 2817 entry.OrigAddr == rteMsg.OrigAddr AND 2818 entry.TargAddr == rteMsg.TargAddr AND 2819 entry.MetricType == rteMsg.MetricType) 2820 { 2821 return entry; 2822 } 2823 } 2824 return NULL; 2825 } 2827 A.1.7. Update_Rte_Msg_Table 2829 /* update the multicast route message suppression table based 2830 on the received RteMsg, return true if it was created or 2831 the SeqNum was updated (i.e. it needs to be regenerated) */ 2832 Update_Rte_Msg_Table(rteMsg) 2833 { 2834 /* search for a comparable entry */ 2835 entry := Fetch_Rte_Msg_Table_Entry(rteMsg) 2837 /* if there is none, create one (see 6.5 and 8.6) */ 2838 if (entry does not exist) 2839 { 2840 entry.MessageType := rteMsg.msg_type 2841 entry.OrigAddr := rteMsg.OrigAddr 2842 entry.TargAddr := rteMsg.TargAddr 2843 entry.OrigSeqNum := rteMsg.origSeqNum (if present) 2844 entry.TargSeqNum := rteMsg.targSeqNum (if present) 2845 entry.MetricType := rteMsg.MetricType 2846 entry.Metric := rteMsg.origAddrMetric(for RREQ) 2847 or rteMsg.targAddrMetric(for RREP) 2848 entry.Timestamp := Current_Time 2849 return true; 2850 } 2851 /* if current entry is stale */ 2852 if ( (rteMsg.msg-type == RREQ AND 2853 entry.OrigSeqNum < rteMsg.OrigSeqNum) 2854 OR 2855 (rteMsg.msg-type == RREP AND 2856 entry.TargSeqNum < rteMsg.TargSeqNum)) 2857 { 2858 entry.OrigSeqNum := rteMsg.OrigSeqNum (if present) 2859 entry.TargSeqNum := rteMsg.TargSeqNum (if present) 2860 entry.Timestamp := Current_Time 2861 return true; 2862 } 2864 /* if received rteMsg is stale */ 2865 if ( (rteMsg.msg-type == RREQ AND 2866 entry.OrigSeqNum > rteMsg.OrigSeqNum) 2867 OR 2868 (rteMsg.msg-type == RREP AND 2869 entry.TargSeqNum > rteMsg.TargSeqNum)) 2870 { 2871 entry.Timestamp := Current_Time 2872 return false; 2873 } 2875 /* if same SeqNum but rteMsg has lower metric */ 2876 if (entry.Metric > rteMsg.Metric) 2877 entry.Metric := rteMsg.Metric 2879 entry.Timestamp := Current_Time 2880 return false; 2881 } 2883 A.1.8. Build_RFC_5444_message_header 2885 /* This pseudocode shows possible RFC 5444 actions, and 2886 would not be performed by the AODVv2 implementation. 2887 It is shown only to provide more understanding about 2888 the AODVv2 message that will be constructed by RFC 5444 */ 2889 Build_RFC_5444_message_header (msgType, Flags, 2890 AddrFamily, Size, hopLimit, hopCount, tlvLength) 2891 { 2892 /* Build RFC 5444 message header fields */ 2893 msg-type := msgType 2894 MF (Message Flags) := Flags 2895 MAL (Message Address Length) := 3 for IPv4, 15 for IPv6 2896 msg-size := Size (octets - counting MsgHdr, AddrBlk, AddrTLVs) 2897 msg-hop-limit := hopLimit 2898 if (hopCount != 0) /* hopCount == 0 means do not include */ 2899 msg-hop-count := hopCount 2900 msg.tlvs-length := tlvLength 2901 } 2903 A.2. Example Algorithms for AODVv2 RREQ Operations 2905 A.2.1. Generate_RREQ 2907 Generate_RREQ 2908 { 2909 /* Increment sequence number */ 2910 mySeqNum := (1 + mySeqNum) /* from nonvolatile storage */ 2912 /* Marshall parameters */ 2913 outRREQ.hopLimit := MAX_HOPCOUNT /* RFC 5444 */ 2914 outRREQ.hopCount := (if included) 0 2915 outRREQ.metricType := if not DEFAULT_METRIC_TYPE, 2916 metric type needed by application 2917 outRREQ.origAddr := IP address of Router Client which generated 2918 the packet to be forwarded 2919 outRREQ.targAddr := destination IP address in 2920 the packet to be forwarded 2921 outRREQ.origPrefixLen := if included, the prefix length 2922 associated with the Router Client 2923 outRREQ.origSeqNum := mySeqNum 2924 outRREQ.targSeqNum := if known from route table, 2925 target sequence number 2926 outRREQ.origAddrMetric := 0 (default) or 2927 MIN_METRIC(outRREQ.metricType) 2928 outRREQ.validityTime := if included, the validity time 2929 for route to OrigAddr 2931 /* Build Address Blk */ 2932 AddrBlk := outRREQ.origAddr and outRREQ.targAddr addresses 2933 /* using prefix length information from 2934 outRREQ.origPrefixLen if necessary */ 2936 /* Include each available Sequence Number in appropriate 2937 Address Block TLV */ 2938 /* OrigSeqNum Address Block TLV */ 2939 origSeqNumAddrBlkTlv.value := outRREQ.origSeqNum 2941 /* TargSeqNum Address Block TLV */ 2942 if (outRREQ.targSeqNum is known) 2943 { 2944 targSeqNumAddrBlkTlv.value := outRREQ.targSeqNum 2945 } 2947 /* Build Metric Address Block TLV */ 2948 metricAddrBlkTlv.value := outRREQ.origAddrMetric 2949 if (outRREQ.metricType != DEFAULT_METRIC_TYPE) 2950 { /* include Metric AddrBlkTlv Extension byte */ 2951 metricAddrBlkTlv.typeExtension := outRREQ.MetricType 2952 } 2954 if (outRREQ.validityTime is required) 2955 { 2956 /* Build VALIDITY_TIME Address Block TLV */ 2957 VALIDITY_TIMEAddrBlkTlv.value := outRREQ.validityTime 2958 } 2960 /* multicast RFC 5444 message to LL-MANET-Routers */ 2961 } 2963 A.2.2. Receive_RREQ 2965 Receive_RREQ (inRREQ) 2966 { 2967 if (inRREQ.nbrIP present in blacklist) { 2968 if (blacklist_expiration_time < current_time) 2969 return; /* don't process or regenerate RREQ... */ 2970 else 2971 remove nbrIP from blacklist; 2972 } 2973 if (inRREQ does not contain msg_hop_limit, OrigAddr, 2974 TargAddr, OrigSeqNum, OrigAddrMetric) 2975 return; 2977 if (inRREQ.origAddr and inRREQ.targAddr are not valid 2978 routable and unicast addresses) 2980 return; 2982 if (inRREQ.metricType is present but an unknown value) 2983 return; 2985 if (inRREQ.origAddrMetric > 2986 MAX_METRIC[inRREQ.metricType] - Cost(Link) 2987 return; 2989 /* Extract inRREQ values */ 2990 advRte.Address = inRREQ.origAddr 2991 advRte.PrefixLength = inRREQ.origPrefixLen (if present), 2992 or the maximum address length for the 2993 address family of advRte.Address 2994 advRte.SeqNum = inRREQ.origSeqNum 2995 advRte.MetricType = inRREQ.metricType 2996 advRte.Metric = inRREQ.origAddrMetric 2997 advRte.Cost = inRREQ.origAddrMetric + Cost(L) 2998 according to the indicated MetricType, where 2999 L is the link from the advertising router 3000 advRte.ValidityTime = inRREQ.validityTime (if present) 3001 advRte.NextHopIP = inRREQ.nbrIP 3002 advRte.NextHopIntf = interface the RteMsg was received on 3003 advRte.HopCount = inRREQ.hopCount 3004 advRte.HopLimit = inRREQ.hopLimit 3006 rte = Process_Routing_Info (advRte) 3008 /* update the RteMsgTableand determine if the RREQ needs 3009 to be regenerated */ 3010 regenerate = Update_Rte_Msg_Table(inRREQ) 3012 if (inRREQ.targAddr is in Router Client list) 3013 Generate_RREP(inRREQ, rte) 3014 else if (regenerate) 3015 Regenerate_RREQ(inRREQ, rte) 3016 } 3018 A.2.3. Regenerate_RREQ 3020 Regenerate_RREQ (inRREQ, rte) /* called from receive_RREQ(), 3021 rte is the route to OrigAddr */ 3022 { 3023 outRREQ.hopLimit := inRREQ.hopLimit - 1 3024 if (outRREQ.hopLimit == 0) 3025 return; /* don't regenerate */ 3027 if (inRREQ.hopCount exists) 3028 { 3029 if (inRREQ.hopCount >= MAX_HOPCOUNT) 3030 return; /* don't regenerate */ 3031 outRREQ.hopCount := inRREQ.hopCount + 1 3032 } 3034 /* Marshall parameters */ 3035 outRREQ.metricType := rte.MetricType 3036 outRREQ.origAddr := rte.Address 3037 outRREQ.targAddr := inRREQ.targAddr 3038 outRREQ.origPrefixLen := rte.PrefixLength 3039 (if not equal to address length) 3040 outRREQ.origSeqNum := rte.SeqNum 3041 outRREQ.targSeqNum := inRREQ.targSeqNum /* if present */ 3042 outRREQ.origAddrMetric := rte.Metric 3043 outRREQ.validityTime := rte.ValidityTime or length of time 3044 HandlingRtr wishes to advertise route to OrigAddr 3046 /* Build Address Block */ 3047 AddrBlk := outRREQ.origAddr and outRREQ.targAddr addresses 3048 using prefix length information from outRREQ.origPrefixLen 3049 if necessary 3051 /* Include available Sequence Numbers in Address Block TLV */ 3052 /* OrigSeqNum Address Block TLV */ 3053 origSeqNumAddrBlkTlv.value := outRREQ.origSeqNum 3055 /* TargSeqNum Address Block TLV */ 3056 if (outRREQ.targSeqNum is known) { 3057 targSeqNumAddrBlkTlv.value := outRREQ.targSeqNum 3058 } 3060 /* Build Metric Address Block TLV */ 3061 metricAddrBlkTlv.value = outRREQ.origAddrMetric 3062 if (outRREQ.metricType != DEFAULT_METRIC_TYPE) 3063 { /* include Metric AddrBlkTlv extension byte */ 3064 metricAddrBlkTlv.typeExtension := outRREQ.MetricType 3065 } 3067 if (outRREQ.validityTime is required) 3068 { 3069 /* Build VALIDITY_TIME Address Block TLV */ 3070 VALIDITY_TIMEAddrBlkTlv.value = outRREQ.validityTime 3071 } 3072 Build_RFC_5444_message_header (RREQ, 4, IPv4 or IPv6, NN, 3073 outRREQ.hopLimit, outRREQ.hopCount, tlvLength) 3075 /* multicast RFC 5444 message to LL-MANET-Routers, or if 3076 inRREQ was unicast the message can be unicast to the next 3077 hop on the route to TargAddr, if known */ 3078 } 3080 A.3. Example Algorithms for AODVv2 RREP Operations 3082 A.3.1. Generate_RREP 3084 Generate_RREP(inRREQ, rte) 3085 { 3086 /* Increment Sequence Number */ 3087 mySeqNum := (1 + mySeqNum) /* from nonvolatile storage */ 3089 /* Marshall parameters */ 3090 outRREP.hopLimit := inRREQ.hopCount 3091 outRREP.hopCount := 0 3092 /* Include the AckReq when: 3093 - previous RREP does not seem to enable any data flow, OR 3094 - when RREQ is received from same OrigAddr after RREP was 3095 unicast to rte.nextHop 3096 */ 3097 outRREP.ackReq := if included, TRUE otherwise FALSE 3099 if (rte.metricType != DEFAULT_METRIC_TYPE) 3100 outRREP.metricType := rte.metricType 3101 outRREP.origAddr := rte.Address 3102 outRREP.targAddr := inRREQ.targAddr 3103 outRREP.targPrefixLen := rte.PrefixLength 3104 (if not equal to address length) 3105 outRREP.targSeqNum := mySeqNum 3106 outRREP.targAddrMetric := 0 (default) or 3107 MIN_METRIC(rte.metricType) 3109 outRREP.validityTime := (if included) the validity time 3110 for route to TargAddr 3112 if (outRREP.ackReq == TRUE) 3113 { 3114 /* include AckReq Message TLV */ 3115 } 3117 /* Build Address Block */ 3118 AddrBlk := outRREP.origAddr and outRREP.targAddr addresses 3119 using prefix length information from outRREP.targPrefixLen 3120 if necessary 3122 /* TargSeqNum Address Block TLV */ 3123 targSeqNumAddrBlkTlv.value := outRREP.targSeqNum 3125 /* Build Metric Address Block TLV containing TargAddr metric */ 3126 metricAddrBlkTlv.value := outRREP.targAddrMetric 3127 if (outRREP.metricType != DEFAULT_METRIC_TYPE) 3128 { /* include Metric AddrBlkTlv extension byte */ 3129 metricAddrBlkTlv.typeExtension := outRREP.MetricType 3130 } 3132 if (outRREP.validityTime is required) 3133 { 3134 /* Build VALIDITY_TIME Address Block TLV */ 3135 VALIDITY_TIMEAddrBlkTlv.value = outRREP.validityTime 3136 } 3138 Build_RFC_5444_message_header (RREP, 4, IPv4 or IPv6, NN, 3139 outRREP.hopLimit, outRREQ.hopCount, tlvLength) 3140 /* unicast RFC 5444 message to rte[OrigAddr].NextHop */ 3141 } 3143 A.3.2. Receive_RREP 3145 Receive_RREP (inRREP) 3146 { 3147 if (inRREP.nbrIP present in blacklist) { 3148 if (blacklist_expiration_time < current_time) 3149 return; /* don't process or regenerate RREQ... */ 3150 else 3151 remove nbrIP from blacklist; 3152 } 3154 if (inRREP does not contain msg_hop_limit, OrigAddr, 3155 TargAddr, TargSeqNum, TargAddrMetric) 3156 return; 3158 if (inRREP.origAddr and inRREQ.targAddr are not 3159 valid routable and unicast addresses) 3160 return; 3162 if (inRREP.metricType is present but an unknown value) 3163 return; 3164 if (inRREP.targAddrMetric > 3165 MAX_METRIC[MetricType] - Cost(Link) 3166 return; 3168 /* Extract inRREP values */ 3169 advRte.Address := inRREP.targAddr 3170 advRte.PrefixLength := inRREP.targPrefixLen f present), or the 3171 maximum address length for address family of advRte.Address 3172 advRte.SeqNum := inRREP.targSeqNum 3173 advRte.MetricType := inRREP.metricType 3174 advRte.Metric := inRREP.targAddrMetric 3175 advRte.Cost := inRREP.targAddrMetric + Cost(L) according to 3176 inRREP's MetricType. L is the link from the advertising router 3177 advRte.ValidityTime := inRREP.validityTime (if present) 3178 advRte.NextHopIP := inRREP.nbrIP 3179 advRte.NextHopIntf := interface the RteMsg was received on 3180 advRte.HopCount := inRREP.hopCount 3181 advRte.HopLimit := inRREP.hopLimit (if included) 3183 rte := Process_Routing_Info (advRte) 3185 if (inRREP includes AckReq data element) 3186 Generate_RREP_Ack(inRREP) 3188 /* update the RteMsgTable and determine if the RREP needs 3189 to be regenerated */ 3190 regenerate := Update_Rte_Msg_Table(inRREP) 3192 if (inRREP.targAddr is in the Router Client list) 3193 send_buffered_packets(rte) /* start to use the route */ 3194 else if (regenerate) 3195 Regenerate_RREP(inRREP, rte) 3196 } 3198 A.3.3. Regenerate_RREP 3200 Regenerate_RREP(inRREP, rte) 3201 { 3202 if (rte does not exist) 3203 { 3204 Generate_RERR(inRREP) 3205 return; 3206 } 3208 outRREP.hopLimit := inRREP.hopLimit - 1 3209 if (outRREP.hopLimit == 0) /* don't regenerate */ 3210 return; 3212 if (inRREP.hopCount exists) 3213 { 3214 if (inRREP.hopCount >= MAX_HOPCOUNT) 3215 return; /* don't regenerate */ 3216 outRREP.hopCount := inRREP.hopCount + 1 3217 } 3219 /* Marshall parameters */ 3220 /* Include the AckReq when: 3221 - previous unicast RREP seems not to enable data flow, OR 3222 - when RREQ is received from same OrigAddr after RREP 3223 was unicast to rte.nextHop 3224 */ 3225 outRREP.ackReq := true or false whether to include 3226 /* if included, set timeout RREP_Ack_SENT_TIMEOUT */ 3227 if (rte.metricType != DEFAULT_METRIC_TYPE) 3228 outRREP.metricType := rte.metricType 3229 outRREP.origAddr := inRREP.origAddr 3230 outRREP.targAddr := rte.Address 3231 outRREP.targPrefixLen := rte.PrefixLength 3232 (if not equal to address length) 3233 outRREP.targSeqNum := rte.SeqNum 3234 outRREP.targAddrMetric := rte.Metric 3235 outRREP.validityTime := (if included) the validity time 3236 for route to TargAddr 3238 outRREP.nextHop := rte.nextHop 3240 if (outRREP.ackReq == TRUE) 3241 { 3242 /* include AckReq Message TLV */ 3243 /* set timeout RREP_Ack_SENT_TIMEOUT */ 3244 } 3245 /* Build Address Block */ 3246 AddrBlk := {outRREP.origAddr and outRREP.targAddr} 3247 using prefix length information from 3248 outRREP.targPrefixLen if necessary 3250 /* TargSeqNum Address Block TLV */ 3251 targSeqNumAddrBlkTlv.value := outRREP.targSeqNum 3253 /* Build Metric Address Block TLV containing TargAddrMetric*/ 3254 metricAddrBlkTlv.value := outRREP.targAddrMetric 3255 if (outRREP.metricType != DEFAULT_METRIC_TYPE) 3256 { /* include Metric AddrBlkTlv extension byte */ 3257 metricAddrBlkTlv.typeExtension := outRREP.MetricType 3258 } 3260 if (outRREP.validityTime is required) 3261 { 3262 /* Build VALIDITY_TIME Address Block TLV */ 3263 VALIDITY_TIMEAddrBlkTlv.value := outRREP.validityTime 3264 } 3266 Build_RFC_5444_message_header (RREP, 4, IPv4 or IPv6, NN, 3267 outRREP.hopLimit, 0, tlvLength) 3268 /* unicast RFC 5444 message to rte[OrigAddr].NextHop */ 3269 } 3271 A.4. Example Algorithms for AODVv2 RERR Operations 3273 RERR message parameters, where RERR can be inRERR or outRERR: 3275 RERR.hopLimit := the maximum number of hops this RERR can traverse 3277 RERR.pktSource := source IP of unforwardable packet (if present) 3279 RERR.metricType := metric type for routes to unreachable 3280 destinations 3282 RERR.unreachableAddressList[] := addresses of unreachable 3283 destinations 3285 RERR.prefixLengthList[] := prefix lengths of unreachable 3286 destinations 3288 RERR.seqNumList[] := sequence numbers for unreachable destinations 3290 RERR.intf := the interface on which the RERR was received 3292 A.4.1. Generate_RERR 3294 There are two parts to this function, based on whether it was 3295 triggered by an undeliverable packet or a broken link to neighboring 3296 AODVv2 router. 3298 Generate_RERR(errorType, triggerPkt, brokenLinkNbrIp) 3299 /* errorType is either undeliverablePacket or brokenLink */ 3300 { 3301 switch (errorType) 3302 { 3303 case (brokenLink): 3304 /* a RERR will be required for each MetricType */ 3305 foreach metric type in use 3306 { 3307 doGenerate := FALSE 3308 num-broken-addr := 0 3309 precursors[] := new empty precursor list 3310 outRERR.hopLimit := MAX_HOPCOUNT 3311 outRERR.metricType := the metric type for this loop 3312 /* find routes which are now Invalid */ 3313 foreach (rte in route table) 3314 { 3315 if (brokenLinkNbrIp == rte.nextHop AND 3316 rte.MetricType == outRERR.metricType AND 3317 (rte.State == Active OR 3318 (rte.State == Idle AND ENABLE_IDLE_IN_RERR))) 3319 { 3320 if (rte.State == Active) 3321 { 3322 doGenerate := TRUE 3323 } 3324 rte.State := Invalid 3325 precursors += rte.Precursors (if any) 3326 outRERR.unreachableAddressList[num-broken-addr] := 3327 rte.Address 3328 outRERR.prefixLengthList[num-broken-addr] := 3329 rte.PrefixLength 3330 outRERR.seqNumList[num-broken-addr] := rte.SeqNum 3331 num-broken-addr := num-broken-addr + 1 3332 } 3333 } 3334 if (doGenerate == TRUE) 3335 { /* build and send RFC5444 message as below, then 3336 repeat loop for other MetricTypes */ } 3337 } 3338 case (undeliverablePacket): 3339 num-broken-addr := 1 3340 outRERR.hopLimit := MAX_HOPCOUNT 3341 outRERR.pktSource := triggerPkt.srcIP or 3342 triggerPkt.targAddr if packet was a RREP 3343 /* optional to include outRERR.metricType */ 3344 outRERR.unreachableAddressList[0] := triggerPkt.destIP or 3345 triggerPkt.origAddr if packet was a RREP 3346 } 3347 if (triggerPkt exists) 3348 { /* Build PktSource Message TLV */ 3349 pktSourceMessageTlv.value := outRERR.pktSource 3350 } 3352 /* The remaining steps add address, prefix length 3353 and sequence number information for each 3354 UnreachableAddress, while conforming to the allowed MTU. 3355 If the MTU is reached, a new message MUST be created. */ 3356 /* Build Address Block */ 3357 AddrBlk := outRERR.unreachableAddressList[] 3358 using prefix length information from 3359 outRERR.prefixLengthList[] if necessary 3361 /* Add SeqNum Address Block TLV including index values */ 3362 seqNumAddrBlkTLV := outRERR.seqNumList[] 3364 if (outRERR.metricType != DEFAULT_METRIC_TYPE) 3365 { /* include Metric AddrBlkTlv extension byte */ 3366 metricAddrBlkTlv.typeExtension := outRERR.MetricType 3367 } 3369 Build_RFC_5444_message_header (RERR, 4, IPv4 or IPv6, NN, 3370 outRERR.hopLimit, 0, tlvLength) 3371 if (undeliverablePacket) 3372 /* unicast outRERR to rte[outRERR.pktSource].NextHop */ 3373 else if (brokenLink) 3374 /* unicast to precursors, or multicast to LL-MANET-Routers */ 3375 } 3377 A.4.2. Receive_RERR 3379 Receive_RERR (inRERR) 3380 { 3381 if (inRERR does not contain msg_hop_limit and at least 3382 one UnreachableAddress) 3383 return; 3385 if (inRERR.metricType is present but an unknown value) 3386 return; 3388 /* Extract inRERR values, copy relevant UnreachableAddresses, 3389 their prefix lengths, and sequence numbers to outRERR */ 3390 num-broken-addr := 0; 3391 precursors[] := new empty list of type precursors/; 3393 foreach (unreachableAddress in inRERR.unreachableAddressList) 3394 { 3395 if (unreachableAddress is not valid routable 3396 and unicast address) 3397 continue; 3398 /* find a matching route table entry, assume 3399 DEFAULT_METRIC_TYPE if no MetricType included */ 3400 rte := Fetch_Route_Table_Entry (unreachableAddress, 3401 inRERR.metricType) 3402 if (rte does not exist) 3403 continue; 3404 if (rte.State == Invalid)/* ignore already invalid routes */ 3405 continue; 3406 if (rte.NextHop != inRERR.nbrIP OR 3407 rte.NextHopInterface != inRERR.intf) 3408 continue; 3409 if (unreachableAddress SeqNum (if known) < rte.SeqNum) 3410 continue; 3412 /* keep a note of all precursors of newly Invalid routes */ 3413 precursors += rte.Precursors (if any) 3415 /* assume prefix length is address length if not included*/ 3416 if (rte.PrefixLength != unreachableAddress prefixLength) 3417 { 3418 /* create new route with unreachableAddress information */ 3419 invalidRte := Create_Route_Table_Entry(unreachableAddress, 3420 unreachableAddress prefixLength, 3421 unreachableAddress seqNum, inRERR.metricType) 3422 invalidRte.State := Invalid 3424 if (rte.PrefixLength > unreachableAddress prefixLength) 3425 expunge_route(rte); 3426 rte := invalidRte; 3427 } 3428 else if (rte.PrefixLength == unreachableAddress prefixLength) 3429 rte.State := Invalid; 3431 outRERR.unreachableAddressList[num-broken-addr] :=rte.Address 3432 outRERR.prefixLengthList[num-broken-addr] := rte.PrefixLength 3433 outRERR.seqNumList[num-broken-addr] := rte.SeqNum 3434 num-broken-addr := num-broken-addr + 1 3435 } 3436 if (num-broken-addr) 3437 Regenerate_RERR(outRERR, inRERR, precursors) 3438 } 3440 A.4.3. Regenerate_RERR 3441 Regenerate_RERR (outRERR, inRERR, precursors) 3442 { 3443 /* Marshal parameters */ 3444 outRERR.hopLimit := inRERR.hopLimit - 1 3445 if (outRERR.hopLimit == 0) /* don't regenerate */ 3446 return; 3448 outRERR.pktSource := inRERR.pktSource (if included) 3449 outRERR.metricType := inRERR.MetricType (if included) 3450 or DEFAULT_METRIC_TYPE 3451 /* UnreachableAddressList[], SeqNumList[], and 3452 PrefixLengthList[] are already up-to-date */ 3454 if (outRERR.pktSource exists) 3455 { 3456 /* Build PktSource Message TLV */ 3457 pktSourceMessageTlv.value := outRERR.pktSource 3458 } 3459 if (outRERR.metricType != DEFAULT_METRIC_TYPE) 3460 { 3461 /* Build MetricType Message TLV */ 3462 metricMsgTlv.value := outRERR.metricType 3463 } 3465 /* Build Address Block */ 3467 AddrBlk := outRERR.unreachableAddressList[] using prefix length 3468 information from outRERR.prefixLengthList[] if necessary 3470 /* Add SeqNum AddressBlock TLV including index values */ 3471 seqNumAddrTLV := outRERR.seqNumList[] 3473 Build_RFC_5444_message_header (RERR, 4, IPv4 or IPv6, NN, 3474 outRERR.hopLimit, 0, tlvLength) 3475 if (outRERR.pktSource exists) { 3476 /* unicast RFC 5444 message to outRERR.pktSource */ 3477 } else if (number of precursors == 1) { 3478 /* unicast RFC 5444 message to precursors[0] */ 3479 } else if (number of precursors > 1) { 3480 /* unicast RFC 5444 message to all precursors, or multicast 3481 RFC 5444 message to RERR_PRECURSORS if preferable */ 3482 } else { 3483 /* multicast RFC 5444 message to LL-MANET-Routers */ 3484 } 3485 } 3487 A.5. Example Algorithms for AODVv2 RREP_Ack Operations 3489 A.5.1. Generate_RREP_Ack 3491 /* To be sent when RREP includes the AckReq data element */ 3492 Generate_RREP_Ack(inRREP) 3493 { 3494 Build_RFC_5444_message_header (RREP_Ack, 4, IPv4 or IPv6, NN, 3495 1, 0, 0) 3496 /* unicast RFC 5444 message to inRREP.nbrIP */ 3497 } 3499 A.5.2. Receive_RREP_Ack 3501 Receive_RREP_Ack(inRREP_Ack) 3502 { 3503 /* cancel timeout event for the node sending RREP_Ack */ 3504 } 3506 A.5.3. Timeout_RREP_Ack 3508 Timeout_RREP_Ack(outRREP) 3509 { 3510 /* insert unresponsive node into blacklist */ 3511 } 3513 Appendix B. Changes since revision ...-06.txt 3515 This section lists the changes since AODVv2 revision ...-06.txt 3517 o Added Victoria Mercieca as co-author. 3519 o Reorganized protocol message descriptions into major subsections 3520 for each protocol message. For protocol messages, organized 3521 processing into Generation, Reception, and Regeneration 3522 subsections. 3524 o Separated RREQ and RREP message processing description into 3525 separate major subsection which had previously been combined into 3526 RteMsg description. 3528 o Enlarged RREQ Table function to include similar processing for 3529 optional flooded RREP messages. The table name has been 3530 correspondingly been changed to be the Table for Multicast 3531 RteMsgs. 3533 o Moved sections for Multiple Interfaces and AODVv2 Control Message 3534 Generation Limits to be major subsections of the AODVv2 Protocol 3535 Operations section. 3537 o Reorganized the protocol message processing steps into the 3538 subsections as previously described, adopting a more step-by-step 3539 presentation. 3541 o Coalesced the router states Broken and Expired into a new combined 3542 state named the Invalid state. No changes in processing are 3543 required for this. 3545 o Merged the sections describing Next-hop Router Adjacency 3546 Monitoring and Blacklists. 3548 o Specified that routes created during Route Discovery are marked as 3549 Idle routes. If they are used for carrying data they become 3550 Active routes. 3552 o Added Route.LastSeqnum information to route table, so that route 3553 activity and sequence number validity can be tracked separately. 3554 An active route can still forward traffic even if the sequence 3555 number has not been refreshed within MAX_SEQNUM_LIFETIME. 3557 o Mandated implementation of RREP_Ack as response to AckReq Message 3558 TLV in RREP messages. Added field to RREP_Ack to ensure 3559 correspondence to the correct AckReq message. 3561 o Added explanations for what happens if protocol constants are 3562 given different values on different AODVv2 routers. 3564 o Specified that AODVv2 implementations are free to choose their own 3565 heuristics for reducing multicast overhead, including RFC 6621. 3567 o Added appendix to identify AODVv2 requirements from OS 3568 implementation of IP and ICMP. 3570 o Deleted appendix showing example RFC 5444 packet formats. 3572 o Clarification on the use of RFC 5497 VALIDITY_TIME. 3574 o In Terminology, deleted superfluous definitions, added missing 3575 definitions. 3577 o Numerous editorial improvements and clarifications. 3579 Appendix C. Changes between revisions 5 and 6 3581 This section lists the changes between AODVv2 revisions ...-05.txt 3582 and ...-06.txt. 3584 o Added Lotte Steenbrink as co-author. 3586 o Reorganized section on Metrics to improve readability by putting 3587 specific topics into subsections. 3589 o Introduced concept of data element, which is used to clarify the 3590 method of enabling RFC 5444 representation for AODVv2 data 3591 elements. A list of Data Elements was introduced in section 3, 3592 which provides a better understanding of their role than was 3593 previously supplied by the table of notational devices. 3595 o Replaced instances of OrigNode by OrigAddr whenever the more 3596 specific meaning is appropriate. Similarly for instances of other 3597 node versus address terminology. 3599 o Introduced concepts of PrefixLengthList and MetricList in order to 3600 avoid use of index-based terminology such as OrigNdx and TargNdx. 3602 o Added section 5, "AODVv2 Message Transmission", describing the 3603 intended interface to RFC 5444. 3605 o Included within the main body of the specification the mandatory 3606 setting of the TLV flag thassingleindex for TLVs OrigSeqNum and 3607 TargSeqNum. 3609 o Removed the Route.Timed state. Created a new flag for route table 3610 entries known as Route.Timed. This flag can be set when the route 3611 is in the active state. Previous description would require that 3612 the route table entry be in two states at the same time, which 3613 seems to be misleading. The new flag is used to clarify other 3614 specification details for Timed routes. 3616 o Created table 3 to show the correspondence between AODVv2 data 3617 elements and RFC 5444 message components. 3619 o Replaced "invalid" terminology by the more specific terms "broken" 3620 or "expired" where appropriate. 3622 o Eliminated the instance of duplicate specification for inclusion 3623 of OrigNode (now, OrigAddr) in the message. 3625 o Corrected the terminology to be Mid instead of Tail for the 3626 trailing address bits of OrigAddr and TargAddr for the example 3627 message formats in the appendices. 3629 o Repaired remaining instances of phraseology that could be 3630 construed as indicating that AODV only supports a single network 3631 interface. 3633 o Numerous editorial improvements and clarifications. 3635 Appendix D. Changes from revision ...-04.txt 3637 This section lists the changes between AODVv2 revisions ...-04.txt 3638 and ...-05.txt. 3640 o Normative text moved out of definitions into the relevant section 3641 of the body of the specification. 3643 o Editorial improvements and improvements to consistent terminology 3644 were made. Replaced "retransmit" by the slightly more accurate 3645 term "regenerate". 3647 o Issues were resolved as discussed on the mailing list. 3649 o Changed definition of LoopFree as suggested by Kedar Namjoshi and 3650 Richard Trefler to avoid the failure condition that they have 3651 described. In order to make understanding easier, replaced 3652 abstract parameters R1 by RteMsg and R2 by Route to reduce the 3653 level of abstraction when the function LoopFree is discussed. 3655 o Added text to clarify that different metrics may have different 3656 data types and different ranges of acceptable values. 3658 o Added text to section "RteMsg Structure" to emphasize the proper 3659 use of RFC 5444. 3661 o Included within the main body of the specification the mandatory 3662 setting of the TLV flag thassingleindex for TLVs OrigSeqNum and 3663 TargSeqNum. 3665 o Made more extensive use of the AdvRte terminology, in order to 3666 better distinguish between the incoming RREQ or RREP message 3667 (i.e., RteMsg) versus the route advertised by the RteMsg (i.e., 3668 AdvRte). 3670 Appendix E. Changes from revision ...-03.txt 3672 This section lists the changes between AODVv2 revisions ...-03.txt 3673 and ...-04.txt. 3675 o An appendix was added to exhibit algorithmic code for 3676 implementation of AODVv2 functions. 3678 o Numerous editorial improvements and improvements to consistent 3679 terminology were made. Terminology related to prefix lengths was 3680 made consistent. Some items listed in "Notational Conventions" 3681 were no longer used, and so deleted. 3683 o Issues were resolved as discussed on the mailing list. 3685 o Appropriate instances of "may" were changed to "MAY". 3687 o Definition inserted for "upstream". 3689 o Route.Precursors included as an *optional* route table field 3691 o Reworded text to avoid use of "relevant". 3693 o Deleted references to "DestOnly" flag. 3695 o Refined statements about MetricType TLV to allow for omission when 3696 MetricType == HopCount. 3698 o Bulletized list in section 8.1 3700 o ENABLE_IDLE_UNREACHABLE renamed to be ENABLE_IDLE_IN_RERR 3702 o Transmission and subscription to LL-MANET-Routers converted to 3703 MUST from SHOULD. 3705 Appendix F. Changes from revision ...-02.txt 3707 This section lists the changes between AODVv2 revisions ...-02.txt 3708 and ...-03.txt. 3710 o The "Added Node" feature was removed. This feature was intended 3711 to enable additional routing information to be carried within a 3712 RREQ or a RREP message, thus increasing the amount of topological 3713 information available to nodes along a routing path. However, 3714 enlarging the packet size to include information which might never 3715 be used can increase congestion of the wireless medium. The 3716 feature can be included as an optional feature at a later date 3717 when better algorithms are understood for determining when the 3718 inclusion of additional routing information might be worthwhile. 3720 o Numerous editorial improvements and improvements to consistent 3721 terminology were made. Instances of OrigNodeNdx and TargNodeNdx 3722 were replaced by OrigNdx and TargNdx, to be consistent with the 3723 terminology shown in Table 2. 3725 o Example RREQ and RREP message formats shown in the Appendices were 3726 changed to use OrigSeqNum and TargSeqNum message TLVs instead of 3727 using the SeqNum message TLV. 3729 o Inclusion of the OrigNode's SeqNum in the RREP message is not 3730 specified. The processing rules for the OrigNode's SeqNum were 3731 incompletely specified in previous versions of the draft, and very 3732 little benefit is foreseen for including that information, since 3733 reverse path forwarding is used for the RREP. 3735 o Additional acknowledgements were included, and contributors names 3736 were alphabetized. 3738 o Definitions in the Terminology section capitalize the term to be 3739 defined. 3741 o Uncited bibliographic entries deleted. 3743 o Ancient "Changes" sections were deleted. 3745 Appendix G. Features of IP needed by AODVv2 3747 AODVv2 needs the following: 3749 o information that IP routes are requested 3751 o information that packets are flowing 3753 o the ability to queue packets. 3755 A reactive protocol reacts when a route is needed. One might say 3756 that a route is requested when an application tries to send a packet. 3757 The fundamental concept of reactive routing is to avoid creating 3758 routes that are not needed, and the way that has been used to know 3759 whether a route is needed is when an application tries to send a 3760 packet. 3762 If an application tries to send a packet, and the route is not 3763 available, the packet has to wait until the route is available. 3765 Appendix H. Multi-homing Considerations 3767 This non-normative information is provided simply to document the 3768 results of previous efforts to enable multi-homing. The intention is 3769 to simplify the task of future specification if multihoming becomes 3770 needed for reactive protocol operation. 3772 Multi-homing is not supported by the AODVv2 specification. There has 3773 been previous work indicating that it can be supported by expanding 3774 the sequence number to include the AODVv2 router's IP address as a 3775 parsable field of the SeqNum. Otherwise, comparing sequence numbers 3776 would not work to evaluate freshness. Even when the IP address is 3777 included, there isn't a good way to compare sequence numbers from 3778 different IP addresses, but at least a handling node can determine 3779 whether the two given sequence numbers are comparable. If the route 3780 table can store multiple routes for the same destination, then multi- 3781 homing can work with sequence numbers augmented by IP addresses. 3783 This non-normative information is provided simply to document the 3784 results of previous efforts to enable multi-homing. The intention is 3785 to simplify the task of future specification if multihoming becomes 3786 needed for reactive protocol operation. 3788 Appendix I. Shifting Network Prefix Advertisement Between AODVv2 3789 Routers 3791 Only one AODVv2 router within a MANET SHOULD be responsible for a 3792 particular address at any time. If two AODVv2 routers dynamically 3793 shift the advertisement of a network prefix, correct AODVv2 routing 3794 behavior must be observed. The AODVv2 router adding the new network 3795 prefix must wait for any existing routing information about this 3796 network prefix to be purged from the network. Therefore, it must 3797 wait at least ROUTER_SEQNUM_AGE_MAX_TIMEOUT after the previous AODVv2 3798 router for this address stopped advertising routing information on 3799 its behalf. 3801 Authors' Addresses 3803 Charles E. Perkins 3804 Futurewei Inc. 3805 2330 Central Expressway 3806 Santa Clara, CA 95050 3807 USA 3809 Phone: +1-408-330-4586 3810 Email: charliep@computer.org 3811 Stan Ratliff 3812 Idirect 3813 13861 Sunrise Valley Drive, Suite 300 3814 Herndon, VA 20171 3815 USA 3817 Email: ratliffstan@gmail.com 3819 John Dowdell 3820 Airbus Defence and Space 3821 Celtic Springs 3822 Newport, Wales NP10 8FZ 3823 United Kingdom 3825 Email: john.dowdell@airbus.com 3827 Lotte Steenbrink 3828 HAW Hamburg, Dept. Informatik 3829 Berliner Tor 7 3830 D-20099 Hamburg 3831 Germany 3833 Email: lotte.steenbrink@haw-hamburg.de 3835 Victoria Mercieca 3836 Airbus Defence and Space 3837 Celtic Springs 3838 Newport, Wales NP10 8FZ 3839 United Kingdom 3841 Email: victoria.mercieca@airbus.com