draft-ietf-manet-aodv-13.txt   rfc3561.txt 
Mobile Ad Hoc Networking Working Group Charles E. Perkins Network Working Group C. Perkins
INTERNET DRAFT Nokia Research Center Request for Comments: 3561 Nokia Research Center
17 February 2003 Elizabeth M. Belding-Royer Category: Experimental E. Belding-Royer
University of California, Santa Barbara University of California, Santa Barbara
Samir R. Das S. Das
University of Cincinnati University of Cincinnati
July 2003
Ad hoc On-Demand Distance Vector (AODV) Routing Ad hoc On-Demand Distance Vector (AODV) Routing
draft-ietf-manet-aodv-13.txt
Status of This Memo Status of this Memo
This document is a submission by the Mobile Ad Hoc Networking Working
Group of the Internet Engineering Task Force (IETF). Comments should
be submitted to the manet@ietf.org mailing list.
This memo defines an Experimental Protocol for the Internet
community. It does not specify an Internet standard of any kind.
Discussion and suggestions for improvement are requested.
Distribution of this memo is unlimited. Distribution of this memo is unlimited.
This document is an Internet-Draft and is in full conformance with Copyright Notice
all provisions of Section 10 of RFC2026. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas,
and its working groups. Note that other groups may also distribute
working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at
any time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at: Copyright (C) The Internet Society (2003). All Rights Reserved.
http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at:
http://www.ietf.org/shadow.html.
Abstract Abstract
The Ad hoc On-Demand Distance Vector (AODV) routing protocol The Ad hoc On-Demand Distance Vector (AODV) routing protocol is
is intended for use by mobile nodes in an ad hoc network. It intended for use by mobile nodes in an ad hoc network. It offers
offers quick adaptation to dynamic link conditions, low processing quick adaptation to dynamic link conditions, low processing and
and memory overhead, low network utilization, and determines memory overhead, low network utilization, and determines unicast
unicast routes to destinations within the ad hoc network. It uses routes to destinations within the ad hoc network. It uses
destination sequence numbers to ensure loop freedom at all times destination sequence numbers to ensure loop freedom at all times
(even in the face of anomalous delivery of routing control messages), (even in the face of anomalous delivery of routing control messages),
avoiding problems (such as ``counting to infinity'') associated with avoiding problems (such as "counting to infinity") associated with
classical distance vector protocols. classical distance vector protocols.
Contents Table of Contents
Status of This Memo i
Abstract i
1. Introduction 1
2. Overview 1
3. AODV Terminology 3
4. Applicability Statement 5
5. Message Formats 5
5.1. Route Request (RREQ) Message Format . . . . . . . . . . . 5
5.2. Route Reply (RREP) Message Format . . . . . . . . . . . . 7
5.3. Route Error (RERR) Message Format . . . . . . . . . . . . 8
5.4. Route Reply Acknowledgment (RREP-ACK) Message Format . . 9
6. AODV Operation 9
6.1. Maintaining Sequence Numbers . . . . . . . . . . . . . . 10
6.2. Route Table Entries and Precursor Lists . . . . . . . . . 11
6.3. Generating Route Requests . . . . . . . . . . . . . . . . 12
6.4. Controlling Dissemination of Route Request Messages . . . 13
6.5. Processing and Forwarding Route Requests . . . . . . . . 14
6.6. Generating Route Replies . . . . . . . . . . . . . . . . 16
6.6.1. Route Reply Generation by the Destination . . . . 16
6.6.2. Route Reply Generation by an Intermediate Node . 17
6.6.3. Generating Gratuitous RREPs . . . . . . . . . . . 17
6.7. Receiving and Forwarding Route Replies . . . . . . . . . 18
6.8. Operation over Unidirectional Links . . . . . . . . . . . 19
6.9. Hello Messages . . . . . . . . . . . . . . . . . . . . . 20
6.10. Maintaining Local Connectivity . . . . . . . . . . . . . 21
6.11. Route Error (RERR) Messages, Route Expiry and Route
Deletion . . . . . . . . . . . . . . . . . . . . . . . 22
6.12. Local Repair . . . . . . . . . . . . . . . . . . . . . . 23
6.13. Actions After Reboot . . . . . . . . . . . . . . . . . . 25
6.14. Interfaces . . . . . . . . . . . . . . . . . . . . . . . 26
7. AODV and Aggregated Networks 26
8. Using AODV with Other Networks 27
9. Extensions 28
9.1. Hello Interval Extension Format . . . . . . . . . . . . . 28
10. Configuration Parameters 29
11. Security Considerations 31
12. IANA Considerations 32
13. IPv6 Considerations 32
14. Acknowledgments 32
A. Draft Modifications 34 1. Introduction ............................................... 2
2. Overview .................................................. 3
3. AODV Terminology ........................................... 4
4. Applicability Statement .................................... 6
5. Message Formats ............................................ 7
5.1. Route Request (RREQ) Message Format ................... 7
5.2. Route Reply (RREP) Message Format ..................... 8
5.3. Route Error (RERR) Message Format ..................... 10
5.4. Route Reply Acknowledgment (RREP-ACK) Message Format .. 11
6. AODV Operation ............................................. 11
6.1. Maintaining Sequence Numbers .......................... 11
6.2. Route Table Entries and Precursor Lists ............... 13
6.3. Generating Route Requests ............................. 14
6.4. Controlling Dissemination of Route Request Messages ... 15
6.5. Processing and Forwarding Route Requests .............. 16
6.6. Generating Route Replies .............................. 18
6.6.1. Route Reply Generation by the Destination ...... 18
6.6.2. Route Reply Generation by an Intermediate
Node ........................................... 19
6.6.3. Generating Gratuitous RREPs .................... 19
6.7. Receiving and Forwarding Route Replies ................ 20
6.8. Operation over Unidirectional Links ................... 21
6.9. Hello Messages ........................................ 22
6.10 Maintaining Local Connectivity ........................ 23
6.11 Route Error (RERR) Messages, Route Expiry and Route
Deletion .............................................. 24
6.12 Local Repair .......................................... 26
6.13 Actions After Reboot ................................. 27
6.14 Interfaces ............................................ 28
7. AODV and Aggregated Networks ............................... 28
8. Using AODV with Other Networks ............................. 29
9. Extensions ................................................. 30
9.1. Hello Interval Extension Format ....................... 30
10. Configuration Parameters ................................... 31
11. Security Considerations .................................... 33
12. IANA Considerations ........................................ 34
13. IPv6 Considerations ........................................ 34
14. Acknowledgments ............................................ 34
15. Normative References ....................................... 35
16. Informative References ..................................... 35
17. Authors' Addresses ......................................... 36
18. Full Copyright Statement ................................... 37
1. Introduction 1. Introduction
The Ad hoc On-Demand Distance Vector (AODV) algorithm enables The Ad hoc On-Demand Distance Vector (AODV) algorithm enables
dynamic, self-starting, multihop routing between participating mobile dynamic, self-starting, multihop routing between participating mobile
nodes wishing to establish and maintain an ad hoc network. AODV nodes wishing to establish and maintain an ad hoc network. AODV
allows mobile nodes to obtain routes quickly for new destinations, allows mobile nodes to obtain routes quickly for new destinations,
and does not require nodes to maintain routes to destinations that and does not require nodes to maintain routes to destinations that
are not in active communication. AODV allows mobile nodes to respond are not in active communication. AODV allows mobile nodes to respond
to link breakages and changes in network topology in a timely manner. to link breakages and changes in network topology in a timely manner.
The operation of AODV is loop-free, and by avoiding the Bellman-Ford The operation of AODV is loop-free, and by avoiding the Bellman-Ford
``counting to infinity'' problem offers quick convergence when the "counting to infinity" problem offers quick convergence when the ad
ad hoc network topology changes (typically, when a node moves in the hoc network topology changes (typically, when a node moves in the
network). When links break, AODV causes the affected set of nodes to network). When links break, AODV causes the affected set of nodes to
be notified so that they are able to invalidate the routes using the be notified so that they are able to invalidate the routes using the
lost link. lost link.
One distinguishing feature of AODV is its use of a destination One distinguishing feature of AODV is its use of a destination
sequence number for each route entry. The destination sequence sequence number for each route entry. The destination sequence
number is created by the destination to be included along with any number is created by the destination to be included along with any
route information it sends to requesting nodes. Using destination route information it sends to requesting nodes. Using destination
sequence numbers ensures loop freedom and is simple to program. sequence numbers ensures loop freedom and is simple to program.
Given the choice between two routes to a destination, a requesting Given the choice between two routes to a destination, a requesting
node is required to select the one with the greatest sequence number. node is required to select the one with the greatest sequence number.
2. Overview 2. Overview
Route Requests (RREQs), Route Replies (RREPs), and Route Errors Route Requests (RREQs), Route Replies (RREPs), and Route Errors
(RERRs) are the message types defined by AODV. These message types (RERRs) are the message types defined by AODV. These message types
are received via UDP, and normal IP header processing applies. are received via UDP, and normal IP header processing applies. So,
So, for instance, the requesting node is expected to use its IP for instance, the requesting node is expected to use its IP address
address as the Originator IP address for the messages. For broadcast as the Originator IP address for the messages. For broadcast
messages, the IP limited broadcast address (255.255.255.255) is used. messages, the IP limited broadcast address (255.255.255.255) is used.
This means that such messages are not blindly forwarded. However, This means that such messages are not blindly forwarded. However,
AODV operation does require certain messages (e.g., RREQ) to be AODV operation does require certain messages (e.g., RREQ) to be
disseminated widely, perhaps throughout the ad hoc network. The disseminated widely, perhaps throughout the ad hoc network. The
range of dissemination of such RREQs is indicated by the TTL in the range of dissemination of such RREQs is indicated by the TTL in the
IP header. Fragmentation is typically not required. IP header. Fragmentation is typically not required.
As long as the endpoints of a communication connection have valid As long as the endpoints of a communication connection have valid
routes to each other, AODV does not play any role. When a route to a routes to each other, AODV does not play any role. When a route to a
new destination is needed, the node broadcasts a RREQ to find a route new destination is needed, the node broadcasts a RREQ to find a route
to the destination. A route can be determined when the RREQ reaches to the destination. A route can be determined when the RREQ reaches
either the destination itself, or an intermediate node with a 'fresh either the destination itself, or an intermediate node with a 'fresh
enough' route to the destination. A 'fresh enough' route is a valid enough' route to the destination. A 'fresh enough' route is a valid
route entry for the destination whose associated sequence number is route entry for the destination whose associated sequence number is
at least as great as that contained in the RREQ. The route is made at least as great as that contained in the RREQ. The route is made
available by unicasting a RREP back to the origination of the RREQ. available by unicasting a RREP back to the origination of the RREQ.
Each node receiving the request caches a route back to the originator Each node receiving the request caches a route back to the originator
of the request, so that the RREP can be unicast from the destination of the request, so that the RREP can be unicast from the destination
along a path to that originator, or likewise from any intermediate along a path to that originator, or likewise from any intermediate
node that is able to satisfy the request. node that is able to satisfy the request.
Nodes monitor the link status of next hops in active routes. When a Nodes monitor the link status of next hops in active routes. When a
link break in an active route is detected, a RERR message is used to link break in an active route is detected, a RERR message is used to
notify other nodes that the loss of that link has occurred. The RERR notify other nodes that the loss of that link has occurred. The RERR
message indicates those destinations (possibly subnets) which are no message indicates those destinations (possibly subnets) which are no
longer reachable by way of the broken link. In order to enable this longer reachable by way of the broken link. In order to enable this
reporting mechanism, each node keeps a ``precursor list'', containing reporting mechanism, each node keeps a "precursor list", containing
the IP address for each its neighbors that are likely to use it as a the IP address for each its neighbors that are likely to use it as a
next hop towards each destination. The information in the precursor next hop towards each destination. The information in the precursor
lists is most easily acquired during the processing for generation lists is most easily acquired during the processing for generation of
of a RREP message, which by definition has to be sent to a node in a a RREP message, which by definition has to be sent to a node in a
precursor list (see section 6.6). If the RREP has a nonzero prefix precursor list (see section 6.6). If the RREP has a nonzero prefix
length, then the originator of the RREQ which solicited the RREP length, then the originator of the RREQ which solicited the RREP
information is included among the precursors for the subnet route information is included among the precursors for the subnet route
(not specifically for the particular destination). (not specifically for the particular destination).
A RREQ may also be received for a multicast IP address. In this A RREQ may also be received for a multicast IP address. In this
document, full processing for such messages is not specified. For document, full processing for such messages is not specified. For
example, the originator of such a RREQ for a multicast IP address example, the originator of such a RREQ for a multicast IP address may
may have to follow special rules. However, it is important to have to follow special rules. However, it is important to enable
enable correct multicast operation by intermediate nodes that are correct multicast operation by intermediate nodes that are not
not enabled as originating or destination nodes for IP multicast enabled as originating or destination nodes for IP multicast
addresses, and likewise are not equipped for any special multicast addresses, and likewise are not equipped for any special multicast
protocol processing. For such multicast-unaware nodes, processing protocol processing. For such multicast-unaware nodes, processing
for a multicast IP address as a destination IP address MUST be for a multicast IP address as a destination IP address MUST be
carried out in the same way as for any other destination IP address. carried out in the same way as for any other destination IP address.
AODV is a routing protocol, and it deals with route table AODV is a routing protocol, and it deals with route table management.
management. Route table information must be kept even Route table information must be kept even for short-lived routes,
for short-lived routes, such as are created to temporarily such as are created to temporarily store reverse paths towards nodes
store reverse paths towards nodes originating RREQs. AODV originating RREQs. AODV uses the following fields with each route
uses the following fields with each route table entry: table entry:
- Destination IP Address - Destination IP Address
- Destination Sequence Number - Destination Sequence Number
- Valid Destination Sequence Number flag - Valid Destination Sequence Number flag
- - Other state and routing flags (e.g., valid, invalid, repairable,
- Other state and routing flags (e.g., valid, invalid, repairable, being repaired)
being repaired) - Network Interface
- Network Interface - Hop Count (number of hops needed to reach destination)
- Hop Count (number of hops needed to reach destination) - Next Hop
- Next Hop - List of Precursors (described in Section 6.2)
- List of Precursors (described in Section 6.2) - Lifetime (expiration or deletion time of the route)
- Lifetime (expiration or deletion time of the route)
Managing the sequence number is crucial to avoiding routing loops, Managing the sequence number is crucial to avoiding routing loops,
even when links break and a node is no longer reachable to supply even when links break and a node is no longer reachable to supply its
its own information about its sequence number. A destination own information about its sequence number. A destination becomes
becomes unreachable when a link breaks or is deactivated. When these unreachable when a link breaks or is deactivated. When these
conditions occur, the route is invalidated by operations involving conditions occur, the route is invalidated by operations involving
the sequence number and marking the route table entry state as the sequence number and marking the route table entry state as
invalid. See section 6.1 for details. invalid. See section 6.1 for details.
3. AODV Terminology 3. AODV Terminology
This protocol specification uses conventional meanings [1] for This protocol specification uses conventional meanings [1] for
capitalized words such as MUST, SHOULD, etc., to indicate requirement capitalized words such as MUST, SHOULD, etc., to indicate requirement
levels for various protocol features. This section defines other levels for various protocol features. This section defines other
terminology used with AODV that is not already defined in [3]. terminology used with AODV that is not already defined in [3].
skipping to change at page 4, line 22 skipping to change at page 5, line 42
the unicast destination along a path that has been set up using the unicast destination along a path that has been set up using
routing control messages. routing control messages.
forward route forward route
A route set up to send data packets from a node originating a A route set up to send data packets from a node originating a
Route Discovery operation towards its desired destination. Route Discovery operation towards its desired destination.
invalid route invalid route
A route that has expired, denoted by a state of invalid in A route that has expired, denoted by a state of invalid in the
the routing table entry. An invalid route is used to store routing table entry. An invalid route is used to store
previously valid route information for an extended period of previously valid route information for an extended period of
time. An invalid route cannot be used to forward data packets, time. An invalid route cannot be used to forward data packets,
but it can provide information useful for route repairs, and but it can provide information useful for route repairs, and
also for future RREQ messages. also for future RREQ messages.
originating node originating node
A node that initiates an AODV route discovery message to be A node that initiates an AODV route discovery message to be
processed and possibly retransmitted by other nodes in the processed and possibly retransmitted by other nodes in the ad
ad hoc network. For instance, the node initiating a Route hoc network. For instance, the node initiating a Route
Discovery process and broadcasting the RREQ message is called Discovery process and broadcasting the RREQ message is called
the originating node of the RREQ message. the originating node of the RREQ message.
reverse route reverse route
A route set up to forward a reply (RREP) packet back to the A route set up to forward a reply (RREP) packet back to the
originator from the destination or from an intermediate node originator from the destination or from an intermediate node
having a route to the destination. having a route to the destination.
sequence number sequence number
A monotonically increasing number maintained by each A monotonically increasing number maintained by each
originating node. In AODV routing protocol messages, it originating node. In AODV routing protocol messages, it is
is used by other nodes to determine the freshness of the used by other nodes to determine the freshness of the
information contained from the originating node. information contained from the originating node.
valid route valid route
See active route. See active route.
4. Applicability Statement 4. Applicability Statement
The AODV routing protocol is designed for mobile ad hoc networks The AODV routing protocol is designed for mobile ad hoc networks with
with populations of tens to thousands of mobile nodes. AODV can populations of tens to thousands of mobile nodes. AODV can handle
handle low, moderate, and relatively high mobility rates, as well low, moderate, and relatively high mobility rates, as well as a
as a variety of data traffic levels. AODV is designed for use in variety of data traffic levels. AODV is designed for use in networks
networks where the nodes can all trust each other, either by use where the nodes can all trust each other, either by use of
of preconfigured keys, or because it is known that there are no preconfigured keys, or because it is known that there are no
malicious intruder nodes. AODV has been designed to reduce the malicious intruder nodes. AODV has been designed to reduce the
dissemination of control traffic and eliminate overhead on data dissemination of control traffic and eliminate overhead on data
traffic, in order to improve scalability and performance. traffic, in order to improve scalability and performance.
5. Message Formats 5. Message Formats
5.1. Route Request (RREQ) Message Format 5.1. Route Request (RREQ) Message Format
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
skipping to change at page 5, line 49 skipping to change at page 7, line 37
Type 1 Type 1
J Join flag; reserved for multicast. J Join flag; reserved for multicast.
R Repair flag; reserved for multicast. R Repair flag; reserved for multicast.
G Gratuitous RREP flag; indicates whether a G Gratuitous RREP flag; indicates whether a
gratuitous RREP should be unicast to the node gratuitous RREP should be unicast to the node
specified in the Destination IP Address field (see specified in the Destination IP Address field (see
sections 6.3, 6.6.3) sections 6.3, 6.6.3).
D Destination only flag; indicates only the D Destination only flag; indicates only the
destination may respond to this RREQ (see destination may respond to this RREQ (see
section 6.5). section 6.5).
U Unknown sequence number; indicates the destination U Unknown sequence number; indicates the destination
sequence number is unknown (see section 6.3). sequence number is unknown (see section 6.3).
Reserved Sent as 0; ignored on reception. Reserved Sent as 0; ignored on reception.
skipping to change at page 8, line 9 skipping to change at page 9, line 31
route. route.
Originator IP Address Originator IP Address
The IP address of the node which originated the RREQ The IP address of the node which originated the RREQ
for which the route is supplied. for which the route is supplied.
Lifetime The time in milliseconds for which nodes receiving Lifetime The time in milliseconds for which nodes receiving
the RREP consider the route to be valid. the RREP consider the route to be valid.
Note that the Prefix Size allows a subnet router to supply a route Note that the Prefix Size allows a subnet router to supply a route
for every host in the subnet defined by the routing prefix, which for every host in the subnet defined by the routing prefix, which is
is determined by the IP address of the subnet router and the Prefix determined by the IP address of the subnet router and the Prefix
Size. In order to make use of this feature, the subnet router has Size. In order to make use of this feature, the subnet router has to
to guarantee reachability to all the hosts sharing the indicated guarantee reachability to all the hosts sharing the indicated subnet
subnet prefix. See section 7 for details. When the prefix size is prefix. See section 7 for details. When the prefix size is nonzero,
nonzero, any routing information (and precursor data) MUST be kept any routing information (and precursor data) MUST be kept with
with respect to the subnet route, not the individual destination IP respect to the subnet route, not the individual destination IP
address on that subnet. address on that subnet.
The 'A' bit is used when the link over which the RREP message is sent The 'A' bit is used when the link over which the RREP message is sent
may be unreliable or unidirectional. When the RREP message contains may be unreliable or unidirectional. When the RREP message contains
the 'A' bit set, the receiver of the RREP is expected to return a the 'A' bit set, the receiver of the RREP is expected to return a
RREP-ACK message. See section 6.8. RREP-ACK message. See section 6.8.
5.3. Route Error (RERR) Message Format 5.3. Route Error (RERR) Message Format
0 1 2 3 0 1 2 3
skipping to change at page 9, line 24 skipping to change at page 11, line 9
The RERR message is sent whenever a link break causes one or more The RERR message is sent whenever a link break causes one or more
destinations to become unreachable from some of the node's neighbors. destinations to become unreachable from some of the node's neighbors.
See section 6.2 for information about how to maintain the appropriate See section 6.2 for information about how to maintain the appropriate
records for this determination, and section 6.11 for specification records for this determination, and section 6.11 for specification
about how to create the list of destinations. about how to create the list of destinations.
5.4. Route Reply Acknowledgment (RREP-ACK) Message Format 5.4. Route Reply Acknowledgment (RREP-ACK) Message Format
The Route Reply Acknowledgment (RREP-ACK) message MUST be sent in The Route Reply Acknowledgment (RREP-ACK) message MUST be sent in
response to a RREP message with the 'A' bit set (see section 5.2). response to a RREP message with the 'A' bit set (see section 5.2).
This is typically done when there is danger of unidirectional This is typically done when there is danger of unidirectional links
links preventing the completion of a Route Discovery cycle (see preventing the completion of a Route Discovery cycle (see section
section 6.8). 6.8).
0 1 0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Reserved | | Type | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type 4 Type 4
Reserved Sent as 0; ignored on reception. Reserved Sent as 0; ignored on reception.
skipping to change at page 10, line 12 skipping to change at page 11, line 41
All AODV messages are sent to port 654 using UDP. All AODV messages are sent to port 654 using UDP.
6.1. Maintaining Sequence Numbers 6.1. Maintaining Sequence Numbers
Every route table entry at every node MUST include the latest Every route table entry at every node MUST include the latest
information available about the sequence number for the IP address of information available about the sequence number for the IP address of
the destination node for which the route table entry is maintained. the destination node for which the route table entry is maintained.
This sequence number is called the "destination sequence number". It This sequence number is called the "destination sequence number". It
is updated whenever a node receives new (i.e., not stale) information is updated whenever a node receives new (i.e., not stale) information
about the sequence number from RREQ, RREP, or RERR messages that about the sequence number from RREQ, RREP, or RERR messages that may
may be received related to that destination. AODV depends on each be received related to that destination. AODV depends on each node
node in the network to own and maintain its destination sequence in the network to own and maintain its destination sequence number to
number to guarantee the loop-freedom of all routes towards that guarantee the loop-freedom of all routes towards that node. A
node. A destination node increments its own sequence number in two destination node increments its own sequence number in two
circumstances: circumstances:
- Immediately before a node originates a route discovery, it MUST - Immediately before a node originates a route discovery, it MUST
increment its own sequence number. This prevents conflicts with increment its own sequence number. This prevents conflicts with
previously established reverse routes towards the originator of a previously established reverse routes towards the originator of a
RREQ. RREQ.
- Immediately before a destination node originates a RREP in
response to a RREQ, it MUST update its own sequence number to
the maximum of its current sequence number and the destination
sequence number in the RREQ packet.
When the destination increments its sequence number, it MUST do so - Immediately before a destination node originates a RREP in
by treating the sequence number value as if it were an unsigned response to a RREQ, it MUST update its own sequence number to the
number. To accomplish sequence number rollover, if the sequence maximum of its current sequence number and the destination
number has already been assigned to be the largest possible number sequence number in the RREQ packet.
representable as a 32-bit unsigned integer (i.e., 4294967295), then
when it is incremented it will then have a value of zero (0). On When the destination increments its sequence number, it MUST do so by
the other hand, if the sequence number currently has the value treating the sequence number value as if it were an unsigned number.
2147483647, which is the largest possible positive integer if 2's To accomplish sequence number rollover, if the sequence number has
complement arithmetic is in use with 32-bit integers, the next value already been assigned to be the largest possible number representable
will be 2147483648, which is the most negative possible integer in as a 32-bit unsigned integer (i.e., 4294967295), then when it is
the same numbering system. The representation of negative numbers incremented it will then have a value of zero (0). On the other
is not relevant to the increment of AODV sequence numbers. This is hand, if the sequence number currently has the value 2147483647,
in contrast to the manner in which the result of comparing two AODV which is the largest possible positive integer if 2's complement
arithmetic is in use with 32-bit integers, the next value will be
2147483648, which is the most negative possible integer in the same
numbering system. The representation of negative numbers is not
relevant to the increment of AODV sequence numbers. This is in
contrast to the manner in which the result of comparing two AODV
sequence numbers is to be treated (see below). sequence numbers is to be treated (see below).
In order to ascertain that information about a destination is not In order to ascertain that information about a destination is not
stale, the node compares its current numerical value for the sequence stale, the node compares its current numerical value for the sequence
number with that obtained from the incoming AODV message. This number with that obtained from the incoming AODV message. This
comparison MUST be done using signed 32-bit arithmetic, this is comparison MUST be done using signed 32-bit arithmetic, this is
necessary to accomplish sequence number rollover. If the result of necessary to accomplish sequence number rollover. If the result of
subtracting the currently stored sequence number from the value of subtracting the currently stored sequence number from the value of
the incoming sequence number is less than zero, then the information the incoming sequence number is less than zero, then the information
related to that destination in the AODV message MUST be discarded, related to that destination in the AODV message MUST be discarded,
since that information is stale compared to the node's currently since that information is stale compared to the node's currently
stored information. stored information.
The only other circumstance in which a node may change the The only other circumstance in which a node may change the
destination sequence number in one of its route table entries is destination sequence number in one of its route table entries is in
in response to a lost or expired link to the next hop towards that response to a lost or expired link to the next hop towards that
destination. The node determines which destinations use a particular destination. The node determines which destinations use a particular
next hop by consulting its routing table. In this case, for each next hop by consulting its routing table. In this case, for each
destination that uses the next hop, the node increments the sequence destination that uses the next hop, the node increments the sequence
number and marks the route as invalid (see also sections 6.11, 6.12). number and marks the route as invalid (see also sections 6.11, 6.12).
Whenever any fresh enough (i.e., containing a sequence number at Whenever any fresh enough (i.e., containing a sequence number at
least equal to the recorded sequence number) routing information for least equal to the recorded sequence number) routing information for
an affected destination is received by a node that has marked that an affected destination is received by a node that has marked that
route table entry as invalid, the node SHOULD update its route table route table entry as invalid, the node SHOULD update its route table
information according to the information contained in the update. information according to the information contained in the update.
A node may change the sequence number in the routing table entry of a A node may change the sequence number in the routing table entry of a
destination only if: destination only if:
- it is itself the destination node, and offers a new route to - it is itself the destination node, and offers a new route to
itself, or itself, or
- it receives an AODV message with new information about the - it receives an AODV message with new information about the
sequence number for a destination node, or sequence number for a destination node, or
- the path towards the destination node expires or breaks. - the path towards the destination node expires or breaks.
6.2. Route Table Entries and Precursor Lists 6.2. Route Table Entries and Precursor Lists
When a node receives an AODV control packet from a neighbor, or When a node receives an AODV control packet from a neighbor, or
creates or updates a route for a particular destination or subnet, creates or updates a route for a particular destination or subnet, it
it checks its route table for an entry for the destination. In the checks its route table for an entry for the destination. In the
event that there is no corresponding entry for that destination, an event that there is no corresponding entry for that destination, an
entry is created. The sequence number is either determined from entry is created. The sequence number is either determined from the
the information contained in the control packet, or else the valid information contained in the control packet, or else the valid
sequence number field is set to false. The route is only updated if sequence number field is set to false. The route is only updated if
the new sequence number is either the new sequence number is either
(i) higher than the destination sequence number in the route (i) higher than the destination sequence number in the route
table, or table, or
(ii) the sequence numbers are equal, but the hop count (of (ii) the sequence numbers are equal, but the hop count (of the
the new information) plus one, is smaller than the new information) plus one, is smaller than the existing hop
existing hop count in the routing table, or count in the routing table, or
(iii) the sequence number is unknown. (iii) the sequence number is unknown.
The Lifetime field of the routing table entry is either The Lifetime field of the routing table entry is either determined
determined from the control packet, or it is initialized to from the control packet, or it is initialized to
ACTIVE_ROUTE_TIMEOUT. This route may now be used to send any queued ACTIVE_ROUTE_TIMEOUT. This route may now be used to send any queued
data packets and fulfills any outstanding route requests. data packets and fulfills any outstanding route requests.
Each time a route is used to forward a data packet, its Active Each time a route is used to forward a data packet, its Active Route
Route Lifetime field of the source, destination and the next hop Lifetime field of the source, destination and the next hop on the
on the path to the destination is updated to be no less than the path to the destination is updated to be no less than the current
current time plus ACTIVE_ROUTE_TIMEOUT. Since the route between time plus ACTIVE_ROUTE_TIMEOUT. Since the route between each
each originator and destination pair is expected to be symmetric, originator and destination pair is expected to be symmetric, the
the Active Route Lifetime for the previous hop, along the reverse Active Route Lifetime for the previous hop, along the reverse path
path back to the IP source, is also updated to be no less than the back to the IP source, is also updated to be no less than the current
current time plus ACTIVE_ROUTE_TIMEOUT. The lifetime for an Active time plus ACTIVE_ROUTE_TIMEOUT. The lifetime for an Active Route is
Route is updated each time the route is used regardless of whether updated each time the route is used regardless of whether the
the destination is a single node or a subnet. destination is a single node or a subnet.
For each valid route maintained by a node as a routing table entry, For each valid route maintained by a node as a routing table entry,
the node also maintains a list of precursors that may be forwarding the node also maintains a list of precursors that may be forwarding
packets on this route. These precursors will receive notifications packets on this route. These precursors will receive notifications
from the node in the event of detection of the loss of the next hop from the node in the event of detection of the loss of the next hop
link. The list of precursors in a routing table entry contains those link. The list of precursors in a routing table entry contains those
neighboring nodes to which a route reply was generated or forwarded. neighboring nodes to which a route reply was generated or forwarded.
6.3. Generating Route Requests 6.3. Generating Route Requests
A node disseminates a RREQ when it determines that it needs a route A node disseminates a RREQ when it determines that it needs a route
to a destination and does not have one available. This can happen if to a destination and does not have one available. This can happen if
the destination is previously unknown to the node, or if a previously the destination is previously unknown to the node, or if a previously
valid route to the destination expires or is marked as invalid. The valid route to the destination expires or is marked as invalid. The
Destination Sequence Number field in the RREQ message is the last Destination Sequence Number field in the RREQ message is the last
known destination sequence number for this destination and is copied known destination sequence number for this destination and is copied
from the Destination Sequence Number field in the routing table. If from the Destination Sequence Number field in the routing table. If
no sequence number is known, the unknown sequence number flag MUST no sequence number is known, the unknown sequence number flag MUST be
be set. The Originator Sequence Number in the RREQ message is the set. The Originator Sequence Number in the RREQ message is the
node's own sequence number, which is incremented prior to insertion node's own sequence number, which is incremented prior to insertion
in a RREQ. The RREQ ID field is incremented by one from the last RREQ in a RREQ. The RREQ ID field is incremented by one from the last
ID used by the current node. Each node maintains only one RREQ ID. RREQ ID used by the current node. Each node maintains only one RREQ
The Hop Count field is set to zero. ID. The Hop Count field is set to zero.
Before broadcasting the RREQ, the originating node buffers the RREQ Before broadcasting the RREQ, the originating node buffers the RREQ
ID and the Originator IP address (its own address) of the RREQ for ID and the Originator IP address (its own address) of the RREQ for
PATH_DISCOVERY_TIME. In this way, when the node receives the packet PATH_DISCOVERY_TIME. In this way, when the node receives the packet
again from its neighbors, it will not reprocess and re-forward the again from its neighbors, it will not reprocess and re-forward the
packet. packet.
An originating node often expects to have bidirectional An originating node often expects to have bidirectional
communications with a destination node. In such cases, it is communications with a destination node. In such cases, it is not
not sufficient for the originating node to have a route to the sufficient for the originating node to have a route to the
destination node; the destination must also have a route back to destination node; the destination must also have a route back to the
the originating node. In order for this to happen as efficiently originating node. In order for this to happen as efficiently as
as possible, any generation of a RREP by an intermediate node (as possible, any generation of a RREP by an intermediate node (as in
in section 6.6) for delivery to the originating node SHOULD be section 6.6) for delivery to the originating node SHOULD be
accompanied by some action that notifies the destination about a accompanied by some action that notifies the destination about a
route back to the originating node. The originating node selects route back to the originating node. The originating node selects
this mode of operation in the intermediate nodes by setting the `G' this mode of operation in the intermediate nodes by setting the 'G'
flag. See section 6.6.3 for details about actions taken by the flag. See section 6.6.3 for details about actions taken by the
intermediate node in response to a RREQ with the `G' flag set. intermediate node in response to a RREQ with the 'G' flag set.
A node SHOULD NOT originate more than RREQ_RATELIMIT RREQ messages A node SHOULD NOT originate more than RREQ_RATELIMIT RREQ messages
per second. After broadcasting a RREQ, a node waits for a RREP (or per second. After broadcasting a RREQ, a node waits for a RREP (or
other control message with current information regarding a route to other control message with current information regarding a route to
the appropriate destination). If a route is not received within the appropriate destination). If a route is not received within
NET_TRAVERSAL_TIME milliseconds, the node MAY try again to discover a NET_TRAVERSAL_TIME milliseconds, the node MAY try again to discover a
route by broadcasting another RREQ, up to a maximum of RREQ_RETRIES route by broadcasting another RREQ, up to a maximum of RREQ_RETRIES
times at the maximum TTL value. Each new attempt MUST increment and times at the maximum TTL value. Each new attempt MUST increment and
update the RREQ ID. For each attempt, the TTL field of the IP header update the RREQ ID. For each attempt, the TTL field of the IP header
is set according to the mechanism specified in section 6.4, in order is set according to the mechanism specified in section 6.4, in order
to enable control over how far the RREQ is disseminated for the each to enable control over how far the RREQ is disseminated for the each
retry. retry.
Data packets waiting for a route (i.e., waiting for a RREP after a Data packets waiting for a route (i.e., waiting for a RREP after a
RREQ has been sent) SHOULD be buffered. The buffering SHOULD be RREQ has been sent) SHOULD be buffered. The buffering SHOULD be
"first-in, first-out" (FIFO). If a route discovery has been attempted "first-in, first-out" (FIFO). If a route discovery has been
RREQ_RETRIES times at the maximum TTL without receiving any RREP, all attempted RREQ_RETRIES times at the maximum TTL without receiving any
data packets destined for the corresponding destination SHOULD be RREP, all data packets destined for the corresponding destination
dropped from the buffer and a Destination Unreachable message SHOULD SHOULD be dropped from the buffer and a Destination Unreachable
be delivered to the application. message SHOULD be delivered to the application.
To reduce congestion in a network, repeated attempts by a source To reduce congestion in a network, repeated attempts by a source node
node at route discovery for a single destination MUST utilize a at route discovery for a single destination MUST utilize a binary
binary exponential backoff. The first time a source node broadcasts exponential backoff. The first time a source node broadcasts a RREQ,
a RREQ, it waits NET_TRAVERSAL_TIME milliseconds for the reception it waits NET_TRAVERSAL_TIME milliseconds for the reception of a RREP.
of a RREP. If a RREP is not received within that time, the source If a RREP is not received within that time, the source node sends a
node sends a new RREQ. When calculating the time to wait for new RREQ. When calculating the time to wait for the RREP after
the RREP after sending the second RREQ, the source node MUST use sending the second RREQ, the source node MUST use a binary
a binary exponential backoff. Hence, the waiting time for the exponential backoff. Hence, the waiting time for the RREP
RREP corresponding to the second RREQ is 2 * NET_TRAVERSAL_TIME corresponding to the second RREQ is 2 * NET_TRAVERSAL_TIME
milliseconds. If a RREP is not receivied within this time period, milliseconds. If a RREP is not received within this time period,
another RREQ may be sent, up to RREQ_RETRIES additional attempts another RREQ may be sent, up to RREQ_RETRIES additional attempts
after the first RREQ. For each additional attempt, the waiting time after the first RREQ. For each additional attempt, the waiting time
for the RREP is multiplied by 2, so that the time conforms to a for the RREP is multiplied by 2, so that the time conforms to a
binary exponential backoff. binary exponential backoff.
6.4. Controlling Dissemination of Route Request Messages 6.4. Controlling Dissemination of Route Request Messages
To prevent unnecessary network-wide dissemination of RREQs, the To prevent unnecessary network-wide dissemination of RREQs, the
originating node SHOULD use an expanding ring search technique. originating node SHOULD use an expanding ring search technique. In
In an expanding ring search, the originating node initially an expanding ring search, the originating node initially uses a TTL =
uses a TTL = TTL_START in the RREQ packet IP header and sets the TTL_START in the RREQ packet IP header and sets the timeout for
timeout for receiving a RREP to RING_TRAVERSAL_TIME milliseconds. receiving a RREP to RING_TRAVERSAL_TIME milliseconds.
RING_TRAVERSAL_TIME is calculcated as described in section 10. The RING_TRAVERSAL_TIME is calculated as described in section 10. The
TTL_VALUE used in calculating RING_TRAVERSAL_TIME is set equal to TTL_VALUE used in calculating RING_TRAVERSAL_TIME is set equal to the
the value of the TTL field in the IP header. If the RREQ times out value of the TTL field in the IP header. If the RREQ times out
without a corresponding RREP, the originator broadcasts the RREQ without a corresponding RREP, the originator broadcasts the RREQ
again with the TTL incremented by TTL_INCREMENT. This continues until again with the TTL incremented by TTL_INCREMENT. This continues
the TTL set in the RREQ reaches TTL_THRESHOLD, beyond which a TTL = until the TTL set in the RREQ reaches TTL_THRESHOLD, beyond which a
NET_DIAMETER is used for each attempt. Each time, the timeout for TTL = NET_DIAMETER is used for each attempt. Each time, the timeout
receiving a RREP is RING_TRAVERSAL_TIME. When it is desired to have for receiving a RREP is RING_TRAVERSAL_TIME. When it is desired to
all retries traverse the entire ad hoc network, this can be achieved have all retries traverse the entire ad hoc network, this can be
by configuring TTL_START and TTL_INCREMENT both to be the same value achieved by configuring TTL_START and TTL_INCREMENT both to be the
as NET_DIAMETER. same value as NET_DIAMETER.
The Hop Count stored in an invalid routing table entry indicates The Hop Count stored in an invalid routing table entry indicates the
the last known hop count to that destination in the routing table. last known hop count to that destination in the routing table. When
When a new route to the same destination is required at a later time a new route to the same destination is required at a later time
(e.g., upon route loss), the TTL in the RREQ IP header is initially (e.g., upon route loss), the TTL in the RREQ IP header is initially
set to the Hop Count plus TTL_INCREMENT. Thereafter, following set to the Hop Count plus TTL_INCREMENT. Thereafter, following each
each timeout the TTL is incremented by TTL_INCREMENT until TTL = timeout the TTL is incremented by TTL_INCREMENT until TTL =
TTL_THRESHOLD is reached. Beyond this TTL = NET_DIAMETER is used. TTL_THRESHOLD is reached. Beyond this TTL = NET_DIAMETER is used.
Once TTL = NET_DIAMETER, the timeout for waiting for the RREP is set Once TTL = NET_DIAMETER, the timeout for waiting for the RREP is set
to NET_TRAVERSAL_TIME, as specified in section 6.3. to NET_TRAVERSAL_TIME, as specified in section 6.3.
An expired routing table entry SHOULD NOT be expunged before An expired routing table entry SHOULD NOT be expunged before
(current_time + DELETE_PERIOD) (see section 6.11). Otherwise, the (current_time + DELETE_PERIOD) (see section 6.11). Otherwise, the
soft state corresponding to the route (e.g., last known hop count) soft state corresponding to the route (e.g., last known hop count)
will be lost. Furthermore, a longer routing table entry expunge time will be lost. Furthermore, a longer routing table entry expunge time
MAY be configured. Any routing table entry waiting for a RREP SHOULD MAY be configured. Any routing table entry waiting for a RREP SHOULD
NOT be expunged before (current_time + 2 * NET_TRAVERSAL_TIME). NOT be expunged before (current_time + 2 * NET_TRAVERSAL_TIME).
6.5. Processing and Forwarding Route Requests 6.5. Processing and Forwarding Route Requests
When a node receives a RREQ, it first creates or updates a route to When a node receives a RREQ, it first creates or updates a route to
the previous hop without a valid sequence number (see section 6.2) the previous hop without a valid sequence number (see section 6.2)
then checks to determine whether it has received a RREQ with then checks to determine whether it has received a RREQ with the same
the same Originator IP Address and RREQ ID within at least the Originator IP Address and RREQ ID within at least the last
last PATH_DISCOVERY_TIME. If such a RREQ has been received, the PATH_DISCOVERY_TIME. If such a RREQ has been received, the node
node silently discards the newly received RREQ. The rest of this silently discards the newly received RREQ. The rest of this
subsection describes actions taken for RREQs that are not discarded. subsection describes actions taken for RREQs that are not discarded.
First, it first increments the hop count value in the RREQ by one, First, it first increments the hop count value in the RREQ by one, to
to account for the new hop through the intermediate node. Then the account for the new hop through the intermediate node. Then the node
node searches for a reverse route to the Originator IP Address (see searches for a reverse route to the Originator IP Address (see
section 6.2), using longest-prefix matching. If need be, the route section 6.2), using longest-prefix matching. If need be, the route
is created, or updated using the Originator Sequence Number from the is created, or updated using the Originator Sequence Number from the
RREQ in its routing table. This reverse route will be needed if RREQ in its routing table. This reverse route will be needed if the
the node receives a RREP back to the node that originated the RREQ node receives a RREP back to the node that originated the RREQ
(identified by the Originator IP Address). When the reverse route (identified by the Originator IP Address). When the reverse route is
is created or updated, the following actions on the route are also created or updated, the following actions on the route are also
carried out: carried out:
1. the Originator Sequence Number from the RREQ is compared to the 1. the Originator Sequence Number from the RREQ is compared to the
corresponding destination sequence number in the route table corresponding destination sequence number in the route table entry
entry and copied if greater than the existing value there and copied if greater than the existing value there
2. the valid sequence number field is set to true; 2. the valid sequence number field is set to true;
3. the next hop in the routing table becomes the node from which the 3. the next hop in the routing table becomes the node from which the
RREQ was received (it is obtained from the source IP address in RREQ was received (it is obtained from the source IP address in
the IP header and is often not equal to the Originator IP Address the IP header and is often not equal to the Originator IP Address
field in the RREQ message); field in the RREQ message);
4. the hop count is copied from the Hop Count in the RREQ message; 4. the hop count is copied from the Hop Count in the RREQ message;
Whenever a RREQ message is received, the Lifetime of the reverse Whenever a RREQ message is received, the Lifetime of the reverse
route entry for the Originator IP address is set to be the maximum of route entry for the Originator IP address is set to be the maximum of
(ExistingLifetime, MinimalLifetime), where (ExistingLifetime, MinimalLifetime), where
MinimalLifetime = (current time + 2*NET_TRAVERSAL_TIME - MinimalLifetime = (current time + 2*NET_TRAVERSAL_TIME -
2*HopCount*NODE_TRAVERSAL_TIME). 2*HopCount*NODE_TRAVERSAL_TIME).
The current node can use the reverse route to forward data packets in The current node can use the reverse route to forward data packets in
the same way as for any other route in the routing table. the same way as for any other route in the routing table.
If a node does not generate a RREP (following the processing rules in If a node does not generate a RREP (following the processing rules in
section 6.6), and if the incoming IP header has TTL larger than 1, section 6.6), and if the incoming IP header has TTL larger than 1,
the node updates and broadcasts the RREQ to address 255.255.255.255 the node updates and broadcasts the RREQ to address 255.255.255.255
on each of its configured interfaces (see section 6.14). To update on each of its configured interfaces (see section 6.14). To update
the RREQ, the TTL or hop limit field in the outgoing IP header the RREQ, the TTL or hop limit field in the outgoing IP header is
is decreased by one, and the Hop Count field in the RREQ message decreased by one, and the Hop Count field in the RREQ message is
is incremented by one, to account for the new hop through the incremented by one, to account for the new hop through the
intermediate node. Lastly, the Destination Sequence number for the intermediate node. Lastly, the Destination Sequence number for the
requested destination is set to the maximum of the corresponding requested destination is set to the maximum of the corresponding
value received in the RREQ message, and the destination sequence value received in the RREQ message, and the destination sequence
value currently maintained by the node for the requested destination. value currently maintained by the node for the requested destination.
However, the forwarding node MUST NOT modify its maintained value for However, the forwarding node MUST NOT modify its maintained value for
the destination sequence number, even if the value received in the the destination sequence number, even if the value received in the
incoming RREQ is larger than the value currently maintained by the incoming RREQ is larger than the value currently maintained by the
forwarding node. forwarding node.
Otherwise, if a node does generate a RREP, then the node discards the Otherwise, if a node does generate a RREP, then the node discards the
RREQ. Notice that, if intermediate nodes reply to every transmission RREQ. Notice that, if intermediate nodes reply to every transmission
of RREQs for a particular destination, it might turn out that the of RREQs for a particular destination, it might turn out that the
destination does not receive any of the discovery messages. In destination does not receive any of the discovery messages. In this
this situation, the destination does not learn of a route to the situation, the destination does not learn of a route to the
originating node from the RREQ messages. This could cause the originating node from the RREQ messages. This could cause the
destination to initiate a route discovery (for example, if the destination to initiate a route discovery (for example, if the
originator is attempting to establish a TCP session). In order originator is attempting to establish a TCP session). In order that
that the destination learn of routes to the originating node, the the destination learn of routes to the originating node, the
originating node SHOULD set the ``gratuitous RREP'' ('G') flag in the originating node SHOULD set the "gratuitous RREP" ('G') flag in the
RREQ if for any reason the destination is likely to need a route to RREQ if for any reason the destination is likely to need a route to
the originating node. If, in response to a RREQ with the 'G' flag the originating node. If, in response to a RREQ with the 'G' flag
set, an intermediate node returns a RREP, it MUST also unicast a set, an intermediate node returns a RREP, it MUST also unicast a
gratuitous RREP to the destination node (see section 6.6.3). gratuitous RREP to the destination node (see section 6.6.3).
6.6. Generating Route Replies 6.6. Generating Route Replies
A node generates a RREP if either: A node generates a RREP if either:
(i) it is itself the destination, or (i) it is itself the destination, or
(ii) it has an active route to the destination, the (ii) it has an active route to the destination, the destination
destination sequence number in the node's existing route sequence number in the node's existing route table entry
table entry for the destination is valid and greater for the destination is valid and greater than or equal to
than or equal to the Destination Sequence Number of the the Destination Sequence Number of the RREQ (comparison
RREQ (comparison using signed 32-bit arithmetic), and using signed 32-bit arithmetic), and the "destination only"
the ``destination only'' ('D') flag is NOT set. ('D') flag is NOT set.
When generating a RREP message, a node copies the Destination IP When generating a RREP message, a node copies the Destination IP
Address and the Originator Sequence Number from the RREQ message Address and the Originator Sequence Number from the RREQ message into
into the corresponding fields in the RREP message. Processing is the corresponding fields in the RREP message. Processing is slightly
slightly different, depending on whether the node is itself the different, depending on whether the node is itself the requested
requested destination (see section 6.6.1), or instead if it is an destination (see section 6.6.1), or instead if it is an intermediate
intermediate node with an fresh enough route to the destination (see node with an fresh enough route to the destination (see section
section 6.6.2). 6.6.2).
Once created, the RREP is unicast to the next hop toward the Once created, the RREP is unicast to the next hop toward the
originator of the RREQ, as indicated by the route table entry for originator of the RREQ, as indicated by the route table entry for
that originator. As the RREP is forwarded back towards the node that originator. As the RREP is forwarded back towards the node
which originated the RREQ message, the Hop Count field is incremented which originated the RREQ message, the Hop Count field is incremented
by one at each hop. Thus, when the RREP reaches the originator, the by one at each hop. Thus, when the RREP reaches the originator, the
Hop Count represents the distance, in hops, of the destination from Hop Count represents the distance, in hops, of the destination from
the originator. the originator.
6.6.1. Route Reply Generation by the Destination 6.6.1. Route Reply Generation by the Destination
If the generating node is the destination itself, it MUST increment If the generating node is the destination itself, it MUST increment
its own sequence number by one if the sequence number in the its own sequence number by one if the sequence number in the RREQ
RREQ packet is equal to that incremented value. Otherwise, the packet is equal to that incremented value. Otherwise, the
destination does not change its sequence number before generating destination does not change its sequence number before generating the
the RREP message. The destination node places its (perhaps newly RREP message. The destination node places its (perhaps newly
incremented) sequence number into the Destination Sequence Number incremented) sequence number into the Destination Sequence Number
field of the RREP, and enters the value zero in the Hop Count field field of the RREP, and enters the value zero in the Hop Count field
of the RREP. of the RREP.
The destination node copies the value MY_ROUTE_TIMEOUT (see The destination node copies the value MY_ROUTE_TIMEOUT (see section
section 10) into the Lifetime field of the RREP. Each node MAY 10) into the Lifetime field of the RREP. Each node MAY reconfigure
reconfigure its value for MY_ROUTE_TIMEOUT, within mild constraints its value for MY_ROUTE_TIMEOUT, within mild constraints (see section
(see section 10). 10).
6.6.2. Route Reply Generation by an Intermediate Node 6.6.2. Route Reply Generation by an Intermediate Node
If the node generating the RREP is not the destination node, but If the node generating the RREP is not the destination node, but
instead is an intermediate hop along the path from the originator instead is an intermediate hop along the path from the originator to
to the destination, it copies its known sequence number for the the destination, it copies its known sequence number for the
destination into the Destination Sequence Number field in the RREP destination into the Destination Sequence Number field in the RREP
message. message.
The intermediate node updates the forward route entry by placing the The intermediate node updates the forward route entry by placing the
last hop node (from which it received the RREQ, as indicated by the last hop node (from which it received the RREQ, as indicated by the
source IP address field in the IP header) into the precursor list for source IP address field in the IP header) into the precursor list for
the forward route entry -- i.e., the entry for the Destination IP the forward route entry -- i.e., the entry for the Destination IP
Address. The intermediate node also updates its route table entry Address. The intermediate node also updates its route table entry
for the node originating the RREQ by placing the next hop towards for the node originating the RREQ by placing the next hop towards the
the destination in the precursor list for the reverse route entry destination in the precursor list for the reverse route entry --
-- i.e., the entry for the Originator IP Address field of the RREQ i.e., the entry for the Originator IP Address field of the RREQ
message data. message data.
The intermediate node places its distance in hops from the The intermediate node places its distance in hops from the
destination (indicated by the hop count in the routing table) Count destination (indicated by the hop count in the routing table) Count
field in the RREP. The Lifetime field of the RREP is calculated by field in the RREP. The Lifetime field of the RREP is calculated by
subtracting the current time from the expiration time in its route subtracting the current time from the expiration time in its route
table entry. table entry.
6.6.3. Generating Gratuitous RREPs 6.6.3. Generating Gratuitous RREPs
After a node receives a RREQ and responds with a RREP, it discards After a node receives a RREQ and responds with a RREP, it discards
the RREQ. If the RREQ has the 'G' flag set, and the intermediate the RREQ. If the RREQ has the 'G' flag set, and the intermediate
node returns a RREP to the originating node, it MUST also unicast a node returns a RREP to the originating node, it MUST also unicast a
gratuitous RREP to the destination node. The gratuitous RREP that is gratuitous RREP to the destination node. The gratuitous RREP that is
to be sent to the desired destination contains the following values to be sent to the desired destination contains the following values
in the RREP message fields: in the RREP message fields:
Hop Count The Hop Count as indicated in the node's route table Hop Count The Hop Count as indicated in the
entry for the originator node's route table entry for the
originator
Destination IP Address Destination IP Address The IP address of the node that
The IP address of the node that originated the RREQ originated the RREQ
Destination Sequence Number Destination Sequence Number The Originator Sequence Number from
The Originator Sequence Number from the RREQ the RREQ
Originator IP Address Originator IP Address The IP address of the Destination
The IP address of the Destination node in the RREQ node in the RREQ
Lifetime The remaining lifetime of the route towards the Lifetime The remaining lifetime of the route
originator of the RREQ, as known by the intermediate towards the originator of the RREQ,
node. as known by the intermediate node.
The gratuitous RREP is then sent to the next hop along the path to The gratuitous RREP is then sent to the next hop along the path to
the destination node, just as if the destination node had already the destination node, just as if the destination node had already
issued a RREQ for the originating node and this RREP was produced issued a RREQ for the originating node and this RREP was produced in
in response to that (fictitious) RREQ. The RREP that is sent to the response to that (fictitious) RREQ. The RREP that is sent to the
originator of the RREQ is the same whether or not the 'G' bit is set. originator of the RREQ is the same whether or not the 'G' bit is set.
6.7. Receiving and Forwarding Route Replies 6.7. Receiving and Forwarding Route Replies
When a node receives a RREP message, it searches (using When a node receives a RREP message, it searches (using longest-
longest-prefix matching) for a route to the previous hop. If needed, prefix matching) for a route to the previous hop. If needed, a route
a route is created for the previous hop, but without a valid sequence is created for the previous hop, but without a valid sequence number
number (see section 6.2). Next, the node then increments the hop (see section 6.2). Next, the node then increments the hop count
count value in the RREP by one, to account for the new hop through value in the RREP by one, to account for the new hop through the
the intermediate node. Call this incremented value the "New Hop intermediate node. Call this incremented value the "New Hop Count".
Count". Then the forward route for this destination is created if it Then the forward route for this destination is created if it does not
does not already exist. Otherwise, the node compares the Destination already exist. Otherwise, the node compares the Destination Sequence
Sequence Number in the message with its own stored destination Number in the message with its own stored destination sequence number
sequence number for the Destination IP Address in the RREP message. for the Destination IP Address in the RREP message. Upon comparison,
Upon comparison, the existing entry is updated only in the following the existing entry is updated only in the following circumstances:
circumstances:
(i) the sequence number in the routing table is marked as (i) the sequence number in the routing table is marked as
invalid in route table entry. invalid in route table entry.
(ii) the Destination Sequence Number in the RREP is greater (ii) the Destination Sequence Number in the RREP is greater than
than the node's copy of the destination sequence number the node's copy of the destination sequence number and the
and the known value is valid, or known value is valid, or
(iii) the sequence numbers are the same, but the route is is (iii) the sequence numbers are the same, but the route is is
marked as inactive, or marked as inactive, or
(iv) the sequence numbers are the same, and the New Hop Count (iv) the sequence numbers are the same, and the New Hop Count is
is smaller than the hop count in route table entry. smaller than the hop count in route table entry.
If the route table entry to the destination is created or updated, If the route table entry to the destination is created or updated,
then the following actions occur: then the following actions occur:
- the route is marked as active, - the route is marked as active,
- the destination sequence number is marked as valid, - the destination sequence number is marked as valid,
- the next hop in the route entry is assigned to be the node - the next hop in the route entry is assigned to be the node from
from which the RREP is received, which is indicated by the which the RREP is received, which is indicated by the source IP
source IP address field in the IP header, address field in the IP header,
- the hop count is set to the value of the New Hop Count, - the hop count is set to the value of the New Hop Count,
- the expiry time is set to the current time plus the value of - the expiry time is set to the current time plus the value of the
the Lifetime in the RREP message, Lifetime in the RREP message,
- and the destination sequence number is the Destination - and the destination sequence number is the Destination Sequence
Sequence Number in the RREP message. Number in the RREP message.
The current node can subsequently use this route to forward data The current node can subsequently use this route to forward data
packets to the destination. packets to the destination.
If the current node is not the node indicated by the Originator IP If the current node is not the node indicated by the Originator IP
Address in the RREP message AND a forward route has been created or Address in the RREP message AND a forward route has been created or
updated as described above, the node consults its route table entry updated as described above, the node consults its route table entry
for the originating node to determine the next hop for the RREP for the originating node to determine the next hop for the RREP
packet, and then forwards the RREP towards the originator using the packet, and then forwards the RREP towards the originator using the
information in that route table entry. If a node forwards a RREP information in that route table entry. If a node forwards a RREP
over a link that is likely to have errors or be unidirectional, the over a link that is likely to have errors or be unidirectional, the
node SHOULD set the `A' flag to require that the recipient of the node SHOULD set the 'A' flag to require that the recipient of the
RREP acknowledge receipt of the RREP by sending a RREP-ACK message RREP acknowledge receipt of the RREP by sending a RREP-ACK message
back (see section 6.8). back (see section 6.8).
When any node transmits a RREP, the precursor list for the When any node transmits a RREP, the precursor list for the
corresponding destination node is updated by adding to it the corresponding destination node is updated by adding to it the next
next hop node to which the RREP is forwarded. Also, at each hop node to which the RREP is forwarded. Also, at each node the
node the (reverse) route used to forward a RREP has its lifetime (reverse) route used to forward a RREP has its lifetime changed to be
changed to be the maximum of (existing-lifetime, (current time + the maximum of (existing-lifetime, (current time +
ACTIVE_ROUTE_TIMEOUT)). Finally, the precursor list for the next hop ACTIVE_ROUTE_TIMEOUT). Finally, the precursor list for the next hop
towards the destination is updated to contain the next hop towards towards the destination is updated to contain the next hop towards
the source. the source.
6.8. Operation over Unidirectional Links 6.8. Operation over Unidirectional Links
It is possible that a RREP transmission may fail, especially if the It is possible that a RREP transmission may fail, especially if the
RREQ transmission triggering the RREP occurs over a unidirectional RREQ transmission triggering the RREP occurs over a unidirectional
link. If no other RREP generated from the same route discovery link. If no other RREP generated from the same route discovery
attempt reaches the node which originated the RREQ message, the attempt reaches the node which originated the RREQ message, the
originator will reattempt route discovery after a timeout (see originator will reattempt route discovery after a timeout (see
section 6.3). However, the same scenario might well be repeated section 6.3). However, the same scenario might well be repeated
without any improvement, and no route would be discovered even after without any improvement, and no route would be discovered even after
repeated retries. Unless corrective action is taken, this can happen repeated retries. Unless corrective action is taken, this can happen
even when bidirectional routes between originator and destination even when bidirectional routes between originator and destination do
do exist. Link layers using broadcast transmissions for the RREQ exist. Link layers using broadcast transmissions for the RREQ will
will not be able to detect the presence of such unidirectional links. not be able to detect the presence of such unidirectional links. In
In AODV, any node acts on only the first RREQ with the same RREQ ID AODV, any node acts on only the first RREQ with the same RREQ ID and
and ignores any subsequent RREQs. Suppose, for example, that the ignores any subsequent RREQs. Suppose, for example, that the first
first RREQ arrives along a path that has one or more unidirectional RREQ arrives along a path that has one or more unidirectional
link(s). A subsequent RREQ may arrive via a bidirectional path link(s). A subsequent RREQ may arrive via a bidirectional path
(assuming such paths exist), but it will be ignored. (assuming such paths exist), but it will be ignored.
To prevent this problem, when a node detects that its transmission of To prevent this problem, when a node detects that its transmission of
a RREP message has failed, it remembers the next-hop of the failed a RREP message has failed, it remembers the next-hop of the failed
RREP in a ``blacklist'' set. Such failures can be detected via RREP in a "blacklist" set. Such failures can be detected via the
the absence of a link-layer or network-layer acknowledgment (e.g., absence of a link-layer or network-layer acknowledgment (e.g., RREP-
RREP-ACK). A node ignores all RREQs received from any node in its ACK). A node ignores all RREQs received from any node in its
blacklist set. Nodes are removed from the blacklist set after a blacklist set. Nodes are removed from the blacklist set after a
BLACKLIST_TIMEOUT period (see section 10). This period should be set BLACKLIST_TIMEOUT period (see section 10). This period should be set
to the upper bound of the time it takes to perform the allowed number to the upper bound of the time it takes to perform the allowed number
of route request retry attempts as described in section 6.3. of route request retry attempts as described in section 6.3.
Note that the RREP-ACK packet does not contain any information about Note that the RREP-ACK packet does not contain any information about
which RREP it is acknowledging. The time at which the RREP-ACK which RREP it is acknowledging. The time at which the RREP-ACK is
is received will likely come just after the time when the RREP received will likely come just after the time when the RREP was sent
was sent with the 'A' bit. This information is expected to be with the 'A' bit. This information is expected to be sufficient to
sufficient to provide assurance to the sender of the RREP that the provide assurance to the sender of the RREP that the link is
link is currently bidirectional, without any real dependence on the currently bidirectional, without any real dependence on the
particular RREP message being acknowledged. However, that assurance particular RREP message being acknowledged. However, that assurance
typically cannot be expected to remain in force permanently. typically cannot be expected to remain in force permanently.
6.9. Hello Messages 6.9. Hello Messages
A node MAY offer connectivity information by broadcasting local Hello A node MAY offer connectivity information by broadcasting local Hello
messages. A node SHOULD only use hello messages if it is part of an messages. A node SHOULD only use hello messages if it is part of an
active route. Every HELLO_INTERVAL milliseconds, the node checks active route. Every HELLO_INTERVAL milliseconds, the node checks
whether it has sent a broadcast (e.g., a RREQ or an appropriate layer whether it has sent a broadcast (e.g., a RREQ or an appropriate layer
2 message) within the last HELLO_INTERVAL. If it has not, it MAY 2 message) within the last HELLO_INTERVAL. If it has not, it MAY
broadcast a RREP with TTL = 1, called a Hello message, with the RREP broadcast a RREP with TTL = 1, called a Hello message, with the RREP
message fields set as follows: message fields set as follows:
Destination IP Address Destination IP Address The node's IP address.
The node's IP address.
Destination Sequence Number Destination Sequence Number The node's latest sequence number.
The node's latest sequence number.
Hop Count 0 Hop Count 0
Lifetime ALLOWED_HELLO_LOSS * HELLO_INTERVAL Lifetime ALLOWED_HELLO_LOSS * HELLO_INTERVAL
A node MAY determine connectivity by listening for packets from its A node MAY determine connectivity by listening for packets from its
set of neighbors. If, within the past DELETE_PERIOD, it has received set of neighbors. If, within the past DELETE_PERIOD, it has received
a Hello message from a neighbor, and then for that neighbor does a Hello message from a neighbor, and then for that neighbor does not
not receive any packets (Hello messages or otherwise) for more than receive any packets (Hello messages or otherwise) for more than
ALLOWED_HELLO_LOSS * HELLO_INTERVAL milliseconds, the node SHOULD ALLOWED_HELLO_LOSS * HELLO_INTERVAL milliseconds, the node SHOULD
assume that the link to this neighbor is currently lost. When this assume that the link to this neighbor is currently lost. When this
happens, the node SHOULD proceed as in Section 6.11. happens, the node SHOULD proceed as in Section 6.11.
Whenever a node receives a Hello message from a neighbor, the Whenever a node receives a Hello message from a neighbor, the node
node SHOULD make sure that it has an active route to the neighbor, SHOULD make sure that it has an active route to the neighbor, and
and create one if necessary. If a route already exists, then the create one if necessary. If a route already exists, then the
Lifetime for the route should be increased, if necessary, to be at Lifetime for the route should be increased, if necessary, to be at
least ALLOWED_HELLO_LOSS * HELLO_INTERVAL. The route to the neighbor, least ALLOWED_HELLO_LOSS * HELLO_INTERVAL. The route to the
if it exists, MUST subsequently contain the latest Destination neighbor, if it exists, MUST subsequently contain the latest
Sequence Number from the Hello message. The current node can now Destination Sequence Number from the Hello message. The current node
begin using this route to forward data packets. Routes that are can now begin using this route to forward data packets. Routes that
created by hello messages and not used by any other active routes are created by hello messages and not used by any other active routes
will have empty precursor lists and would not trigger a RERR message will have empty precursor lists and would not trigger a RERR message
if the neighbor moves away and a neighbor timeout occurs. if the neighbor moves away and a neighbor timeout occurs.
6.10. Maintaining Local Connectivity 6.10. Maintaining Local Connectivity
Each forwarding node SHOULD keep track of its continued connectivity Each forwarding node SHOULD keep track of its continued connectivity
to its active next hops (i.e., which next hops or precursors have to its active next hops (i.e., which next hops or precursors have
forwarded packets to or from the forwarding node during the last forwarded packets to or from the forwarding node during the last
ACTIVE_ROUTE_TIMEOUT), as well as neighbors that have transmitted ACTIVE_ROUTE_TIMEOUT), as well as neighbors that have transmitted
Hello messages during the last (ALLOWED_HELLO_LOSS * HELLO_INTERVAL). Hello messages during the last (ALLOWED_HELLO_LOSS * HELLO_INTERVAL).
A node can maintain accurate information about its continued A node can maintain accurate information about its continued
connectivity to these active next hops, using one or more of the connectivity to these active next hops, using one or more of the
available link or network layer mechanisms, as described below. available link or network layer mechanisms, as described below.
- Any suitable link layer notification, such as those provided by - Any suitable link layer notification, such as those provided by
IEEE 802.11, can be used to determine connectivity, each time IEEE 802.11, can be used to determine connectivity, each time a
a packet is transmitted to an active next hop. For example, packet is transmitted to an active next hop. For example, absence
absence of a link layer ACK or failure to get a CTS after sending of a link layer ACK or failure to get a CTS after sending RTS,
RTS, even after the maximum number of retransmission attempts, even after the maximum number of retransmission attempts,
indicates loss of the link to this active next hop. indicates loss of the link to this active next hop.
- If layer-2 notification is not available, passive acknowledgment - If layer-2 notification is not available, passive acknowledgment
SHOULD be used when the next hop is expected to forward the SHOULD be used when the next hop is expected to forward the
packet, by listening to the channel for a transmission attempt packet, by listening to the channel for a transmission attempt
made by the next hop. If transmission is not detected within made by the next hop. If transmission is not detected within
NEXT_HOP_WAIT milliseconds or the next hop is the destination NEXT_HOP_WAIT milliseconds or the next hop is the destination (and
(and thus is not supposed to forward the packet) one of the thus is not supposed to forward the packet) one of the following
following methods SHOULD be used to determine connectivity: methods SHOULD be used to determine connectivity:
* Receiving any packet (including a Hello message) from the * Receiving any packet (including a Hello message) from the next
next hop. hop.
* A RREQ unicast to the next hop, asking for a route to the * A RREQ unicast to the next hop, asking for a route to the next
next hop. hop.
* An ICMP Echo Request message unicast to the next hop. * An ICMP Echo Request message unicast to the next hop.
If a link to the next hop cannot be detected by any of these methods, If a link to the next hop cannot be detected by any of these methods,
the forwarding node SHOULD assume that the link is lost, and take the forwarding node SHOULD assume that the link is lost, and take
corrective action by following the methods specified in Section 6.11. corrective action by following the methods specified in Section 6.11.
6.11. Route Error (RERR) Messages, Route Expiry and Route Deletion 6.11. Route Error (RERR) Messages, Route Expiry and Route Deletion
Generally, route error and link breakage processing requires the Generally, route error and link breakage processing requires the
following steps: following steps:
- Invalidating existing routes - Invalidating existing routes
- Listing affected destinations - Listing affected destinations
- Determining which, if any, neighbors may be affected - Determining which, if any, neighbors may be affected
- Delivering an appropriate RERR to such neighbors - Delivering an appropriate RERR to such neighbors
A Route Error (RERR) message MAY be either broadcast (if there A Route Error (RERR) message MAY be either broadcast (if there are
are many precursors), unicast (if there is only 1 precursor), many precursors), unicast (if there is only 1 precursor), or
or iteratively unicast to all precursors (if broadcast is iteratively unicast to all precursors (if broadcast is
inappropriate). Even when the RERR message is iteratively unicast inappropriate). Even when the RERR message is iteratively unicast to
to several precursors, it is considered to be a single control several precursors, it is considered to be a single control message
message for the purposes of the description in the text that follows. for the purposes of the description in the text that follows. With
With that understanding, a node SHOULD NOT generate more than that understanding, a node SHOULD NOT generate more than
RERR_RATELIMIT RERR messages per second. RERR_RATELIMIT RERR messages per second.
A node initiates processing for a RERR message in three situations: A node initiates processing for a RERR message in three situations:
(i) if it detects a link break for the next hop of an active (i) if it detects a link break for the next hop of an active
route in its routing table while transmitting data (and route in its routing table while transmitting data (and
route repair, if attempted, was unsuccessful), or route repair, if attempted, was unsuccessful), or
(ii) if it gets a data packet destined to a node for which it (ii) if it gets a data packet destined to a node for which it
does not have an active route and is not repairing (if does not have an active route and is not repairing (if
using local repair), or using local repair), or
(iii) if it receives a RERR from a neighbor for one or more (iii) if it receives a RERR from a neighbor for one or more
active routes. active routes.
For case (i), the node first makes a list of unreachable destinations For case (i), the node first makes a list of unreachable destinations
consisting of the unreachable neighbor and any additional consisting of the unreachable neighbor and any additional
destinations (or subnets, see section 7) in the local routing destinations (or subnets, see section 7) in the local routing table
table that use the unreachable neighbor as the next hop. In this that use the unreachable neighbor as the next hop. In this case, if
case, if a subnet route is found to be newly unreachable, an IP a subnet route is found to be newly unreachable, an IP destination
destination address for the subnet is constructed by appending address for the subnet is constructed by appending zeroes to the
zeroes to the subnet prefix as shown in the route table entry. This subnet prefix as shown in the route table entry. This is
is unambiguous, since the precursor is known to have route table unambiguous, since the precursor is known to have route table
information with a compatible prefix length for that subnet. information with a compatible prefix length for that subnet.
For case (ii), there is only one unreachable destination, which is For case (ii), there is only one unreachable destination, which is
the destination of the data packet that cannot be delivered. For the destination of the data packet that cannot be delivered. For
case (iii), the list should consist of those destinations in the RERR case (iii), the list should consist of those destinations in the RERR
for which there exists a corresponding entry in the local routing for which there exists a corresponding entry in the local routing
table that has the transmitter of the received RERR as the next hop. table that has the transmitter of the received RERR as the next hop.
Some of the unreachable destinations in the list could be used by Some of the unreachable destinations in the list could be used by
neighboring nodes, and it may therefore be necessary to send a (new) neighboring nodes, and it may therefore be necessary to send a (new)
RERR. The RERR should contain those destinations that are part of RERR. The RERR should contain those destinations that are part of
the created list of unreachable destinations and have a non-empty the created list of unreachable destinations and have a non-empty
precursor list. precursor list.
The neighboring node(s) that should receive the RERR are all those The neighboring node(s) that should receive the RERR are all those
that belong to a precursor list of at least one of the unreachable that belong to a precursor list of at least one of the unreachable
destination(s) in the newly created RERR. In case there is only one destination(s) in the newly created RERR. In case there is only one
unique neighbor that needs to receive the RERR, the RERR SHOULD be unique neighbor that needs to receive the RERR, the RERR SHOULD be
unicast toward that neighbor. Otherwise the RERR is typically sent unicast toward that neighbor. Otherwise the RERR is typically sent
to the local broadcast address (Destination IP == 255.255.255.255, to the local broadcast address (Destination IP == 255.255.255.255,
TTL == 1) with the unreachable destinations, and their corresponding TTL == 1) with the unreachable destinations, and their corresponding
destination sequence numbers, included in the packet. The DestCount destination sequence numbers, included in the packet. The DestCount
field of the RERR packet indicates the number of unreachable field of the RERR packet indicates the number of unreachable
destinations included in the packet. destinations included in the packet.
Just before transmitting the RERR, certain updates are made on the Just before transmitting the RERR, certain updates are made on the
routing table that may affect the destination sequence numbers for routing table that may affect the destination sequence numbers for
the unreachable destinations. For each one of these destinations, the unreachable destinations. For each one of these destinations,
the corresponding routing table entry is updated as follows: the corresponding routing table entry is updated as follows:
1. The destination sequence number of this routing entry, if it 1. The destination sequence number of this routing entry, if it
exists and is valid, is incremented for cases (i) and (ii) above, exists and is valid, is incremented for cases (i) and (ii) above,
and copied from the incoming RERR in case (iii) above. and copied from the incoming RERR in case (iii) above.
2. The entry is invalidated by marking the route entry as invalid 2. The entry is invalidated by marking the route entry as invalid
3. The Lifetime field is updated to current time plus DELETE_PERIOD. 3. The Lifetime field is updated to current time plus DELETE_PERIOD.
Before this time, the entry SHOULD NOT be deleted. Before this time, the entry SHOULD NOT be deleted.
Note that the Lifetime field in the routing table plays dual role Note that the Lifetime field in the routing table plays dual role --
-- for an active route it is the expiry time, and for an invalid for an active route it is the expiry time, and for an invalid route
route it is the deletion time. If a data packet is received for an it is the deletion time. If a data packet is received for an invalid
invalid route, the Lifetime field is updated to current time plus route, the Lifetime field is updated to current time plus
DELETE_PERIOD. The determination of DELETE_PERIOD is discussed in DELETE_PERIOD. The determination of DELETE_PERIOD is discussed in
Section 10. Section 10.
6.12. Local Repair 6.12. Local Repair
When a link break in an active route occurs, the node upstream of When a link break in an active route occurs, the node upstream of
that break MAY choose to repair the link locally if the destination that break MAY choose to repair the link locally if the destination
was no farther than MAX_REPAIR_TTL hops away. To repair the link was no farther than MAX_REPAIR_TTL hops away. To repair the link
break, the node increments the sequence number for the destination break, the node increments the sequence number for the destination
and then broadcasts a RREQ for that destination. The TTL of the RREQ and then broadcasts a RREQ for that destination. The TTL of the RREQ
should initially be set to the following value: should initially be set to the following value:
max(MIN_REPAIR_TTL, 0.5 * #hops) + LOCAL_ADD_TTL, max(MIN_REPAIR_TTL, 0.5 * #hops) + LOCAL_ADD_TTL,
where #hops is the number of hops to the sender (originator) of the where #hops is the number of hops to the sender (originator) of the
currently undeliverable packet. Thus, local repair attempts will currently undeliverable packet. Thus, local repair attempts will
often be invisible to the originating node, and will always have TTL often be invisible to the originating node, and will always have TTL
>= MIN_REPAIR_TTL + LOCAL_ADD_TTL. The node initiating the repair >= MIN_REPAIR_TTL + LOCAL_ADD_TTL. The node initiating the repair
then waits the discovery period to receive RREPs in response to the then waits the discovery period to receive RREPs in response to the
RREQ. During local repair data packets SHOULD be buffered. If, at RREQ. During local repair data packets SHOULD be buffered. If, at
the end of the discovery period, the reparing node has not received the end of the discovery period, the repairing node has not received
a RREP (or other control message creating or updating the route) a RREP (or other control message creating or updating the route) for
for that destination, it proceeds as described in Section 6.11 by that destination, it proceeds as described in Section 6.11 by
transmitting a RERR message for that destination. transmitting a RERR message for that destination.
On the other hand, if the node receives one or more RREPs (or On the other hand, if the node receives one or more RREPs (or other
other control message creating or updating the route to the desired control message creating or updating the route to the desired
destination) during the discovery period, it first compares the hop destination) during the discovery period, it first compares the hop
count of the new route with the value in the hop count field of the count of the new route with the value in the hop count field of the
invalid route table entry for that destination. If the hop count of invalid route table entry for that destination. If the hop count of
the newly determined route to the destination is greater than the the newly determined route to the destination is greater than the hop
hop count of the previously known route the node SHOULD issue a RERR count of the previously known route the node SHOULD issue a RERR
message for the destination, with the 'N' bit set. Then it proceeds message for the destination, with the 'N' bit set. Then it proceeds
as described in Section 6.7, updating its route table entry for that as described in Section 6.7, updating its route table entry for that
destination. destination.
A node that receives a RERR message with the 'N' flag set MUST NOT A node that receives a RERR message with the 'N' flag set MUST NOT
delete the route to that destination. The only action taken should delete the route to that destination. The only action taken should
be the retransmission of the message, if the RERR arrived from the be the retransmission of the message, if the RERR arrived from the
next hop along that route, and if there are one or more precursor next hop along that route, and if there are one or more precursor
nodes for that route to the destination. When the originating node nodes for that route to the destination. When the originating node
receives a RERR message with the 'N' flag set, if this message receives a RERR message with the 'N' flag set, if this message came
came from its next hop along its route to the destination then from its next hop along its route to the destination then the
the originating node MAY choose to reinitiate route discovery, as originating node MAY choose to reinitiate route discovery, as
described in Section 6.3. described in Section 6.3.
Local repair of link breaks in routes sometimes results in increased Local repair of link breaks in routes sometimes results in increased
path lengths to those destinations. Repairing the link locally is path lengths to those destinations. Repairing the link locally is
likely to increase the number of data packets that are able to be likely to increase the number of data packets that are able to be
delivered to the destinations, since data packets will not be dropped delivered to the destinations, since data packets will not be dropped
as the RERR travels to the originating node. Sending a RERR to the as the RERR travels to the originating node. Sending a RERR to the
originating node after locally repairing the link break may allow the originating node after locally repairing the link break may allow the
originator to find a fresh route to the destination that is better, originator to find a fresh route to the destination that is better,
based on current node positions. However, it does not require the based on current node positions. However, it does not require the
originating node to rebuild the route, as the originator may be done, originating node to rebuild the route, as the originator may be done,
or nearly done, with the data session. or nearly done, with the data session.
When a link breaks along an active route, there are often multiple When a link breaks along an active route, there are often multiple
destinations that become unreachable. The node that is upstream destinations that become unreachable. The node that is upstream of
of the lost link tries an immediate local repair for only the one the lost link tries an immediate local repair for only the one
destination towards which the data packet was traveling. Other destination towards which the data packet was traveling. Other
routes using the same link MUST be marked as invalid, but the node routes using the same link MUST be marked as invalid, but the node
handling the local repair MAY flag each such newly lost route as handling the local repair MAY flag each such newly lost route as
locally repairable; this local repair flag in the route table MUST be locally repairable; this local repair flag in the route table MUST be
reset when the route times out (e.g., after the route has been not reset when the route times out (e.g., after the route has been not
been active for ACTIVE_ROUTE_TIMEOUT). Before the timeout occurs, been active for ACTIVE_ROUTE_TIMEOUT). Before the timeout occurs,
these other routes will be repaired as needed when packets arrive for these other routes will be repaired as needed when packets arrive for
the other destinations. Hence, these routes are repaired as needed; the other destinations. Hence, these routes are repaired as needed;
if a data packet does not arrive for the route, then that route will if a data packet does not arrive for the route, then that route will
not be repaired. Alternatively, depending upon local congestion, not be repaired. Alternatively, depending upon local congestion, the
the node MAY begin the process of establishing local repairs for node MAY begin the process of establishing local repairs for the
the other routes, without waiting for new packets to arrive. By other routes, without waiting for new packets to arrive. By
proactively repairing the routes that have broken due to the loss proactively repairing the routes that have broken due to the loss of
of the link, incoming data packets for those routes will not be the link, incoming data packets for those routes will not be subject
subject to the delay of repairing the route and can be immediately to the delay of repairing the route and can be immediately forwarded.
forwarded. However, repairing the route before a data packet is However, repairing the route before a data packet is received for it
received for it runs the risk of repairing routes that are no longer runs the risk of repairing routes that are no longer in use.
in use. Therefore, depending upon the local traffic in the network Therefore, depending upon the local traffic in the network and
and whether congestion is being experienced, the node MAY elect to whether congestion is being experienced, the node MAY elect to
proactively repair the routes before a data packet is received; proactively repair the routes before a data packet is received;
otherwise, it can wait until a data is received, and then commence otherwise, it can wait until a data is received, and then commence
the repair of the route. the repair of the route.
6.13. Actions After Reboot 6.13. Actions After Reboot
A node participating in the ad hoc network must take certain actions A node participating in the ad hoc network must take certain actions
after reboot as it might lose all sequence number records for all after reboot as it might lose all sequence number records for all
destinations, including its own sequence number. However, there destinations, including its own sequence number. However, there may
may be neighboring nodes that are using this node as an active be neighboring nodes that are using this node as an active next hop.
next hop. This can potentially create routing loops. To prevent This can potentially create routing loops. To prevent this
this possibility, each node on reboot waits for DELETE_PERIOD possibility, each node on reboot waits for DELETE_PERIOD before
before transmitting any route discovery messages. If the node transmitting any route discovery messages. If the node receives a
receives a RREQ, RREP, or RERR control packet, it SHOULD create route RREQ, RREP, or RERR control packet, it SHOULD create route entries as
entries as appropriate given the sequence number information in the appropriate given the sequence number information in the control
control packets, but MUST not forward any control packets. If the packets, but MUST not forward any control packets. If the node
node receives a data packet for some other destination, it SHOULD receives a data packet for some other destination, it SHOULD
broadcast a RERR as described in subsection 6.11 and MUST reset the broadcast a RERR as described in subsection 6.11 and MUST reset the
waiting timer to expire after current time plus DELETE_PERIOD. waiting timer to expire after current time plus DELETE_PERIOD.
It can be shown [4] that by the time the rebooted node comes out It can be shown [4] that by the time the rebooted node comes out of
of the waiting phase and becomes an active router again, none of the waiting phase and becomes an active router again, none of its
its neighbors will be using it as an active next hop any more. Its neighbors will be using it as an active next hop any more. Its own
own sequence number gets updated once it receives a RREQ from any sequence number gets updated once it receives a RREQ from any other
other node, as the RREQ always carries the maximum destination node, as the RREQ always carries the maximum destination sequence
sequence number seen en route. If no such RREQ arrives, the node number seen en route. If no such RREQ arrives, the node MUST
MUST initialize its own sequence number to zero. initialize its own sequence number to zero.
6.14. Interfaces 6.14. Interfaces
Because AODV should operate smoothly over wired, as well as wireless, Because AODV should operate smoothly over wired, as well as wireless,
networks, and because it is likely that AODV will also be used with networks, and because it is likely that AODV will also be used with
multiple wireless devices, the particular interface over which multiple wireless devices, the particular interface over which
packets arrive must be known to AODV whenever a packet is received. packets arrive must be known to AODV whenever a packet is received.
This includes the reception of RREQ, RREP, and RERR messages. This includes the reception of RREQ, RREP, and RERR messages.
Whenever a packet is received from a new neighbor, the interface Whenever a packet is received from a new neighbor, the interface on
on which that packet was received is recorded into the route table which that packet was received is recorded into the route table entry
entry for that neighbor, along with all the other appropriate routing for that neighbor, along with all the other appropriate routing
information. Similarly, whenever a route to a new destination is information. Similarly, whenever a route to a new destination is
learned, the interface through which the destination can be reached learned, the interface through which the destination can be reached
is also recorded into the destination's route table entry. is also recorded into the destination's route table entry.
When multiple interfaces are available, a node retransmitting a RREQ When multiple interfaces are available, a node retransmitting a RREQ
message rebroadcasts that message on all interfaces that have been message rebroadcasts that message on all interfaces that have been
configured for operation in the ad-hoc network, except those on which configured for operation in the ad-hoc network, except those on which
it is known that all of the nodes neighbors have already received it is known that all of the nodes neighbors have already received the
the RREQ For instance, for some broadcast media (e.g., Ethernet) it RREQ For instance, for some broadcast media (e.g., Ethernet) it may
may be presumed that all nodes on the same link receive a broadcast be presumed that all nodes on the same link receive a broadcast
message at the same time. When a node needs to transmit a RERR, it message at the same time. When a node needs to transmit a RERR, it
SHOULD only transmit it on those interfaces that have neighboring SHOULD only transmit it on those interfaces that have neighboring
precursor nodes for that route. precursor nodes for that route.
7. AODV and Aggregated Networks 7. AODV and Aggregated Networks
AODV has been designed for use by mobile nodes with IP addresses AODV has been designed for use by mobile nodes with IP addresses that
that are not necessarily related to each other, to create an ad hoc are not necessarily related to each other, to create an ad hoc
network. However, in some cases a collection of mobile nodes MAY network. However, in some cases a collection of mobile nodes MAY
operate in a fixed relationship to each other and share a common operate in a fixed relationship to each other and share a common
subnet prefix, moving together within an area where an ad hoc network subnet prefix, moving together within an area where an ad hoc network
has formed. Call such a collection of nodes a ``subnet''. In this has formed. Call such a collection of nodes a "subnet". In this
case, it is possible for a single node within the subnet to advertise case, it is possible for a single node within the subnet to advertise
reachability for all other nodes on the subnet, by responding with reachability for all other nodes on the subnet, by responding with a
a RREP message to any RREQ message requesting a route to any node RREP message to any RREQ message requesting a route to any node with
with the subnet routing prefix. Call the single node the ``subnet the subnet routing prefix. Call the single node the "subnet router".
router''. In order for a subnet router to operate the AODV protocol In order for a subnet router to operate the AODV protocol for the
for the whole subnet, it has to maintain a destination sequence whole subnet, it has to maintain a destination sequence number for
number for the entire subnet. In any such RREP message sent by the the entire subnet. In any such RREP message sent by the subnet
subnet router, the Prefix Size field of the RREP message MUST be router, the Prefix Size field of the RREP message MUST be set to the
set to the length of the subnet prefix. Other nodes sharing the length of the subnet prefix. Other nodes sharing the subnet prefix
subnet prefix SHOULD NOT issue RREP messages, and SHOULD forward RREQ SHOULD NOT issue RREP messages, and SHOULD forward RREQ messages to
messages to the subnet router. the subnet router.
The processing for RREPs that give routes to subnets (i.e., have The processing for RREPs that give routes to subnets (i.e., have
nonzero prefix length) is the same as processing for host-specific nonzero prefix length) is the same as processing for host-specific
RREP messages. Every node that receives the RREP with prefix size RREP messages. Every node that receives the RREP with prefix size
information SHOULD create or update the route table entry for the information SHOULD create or update the route table entry for the
subnet, including the sequence number supplied by the subnet router, subnet, including the sequence number supplied by the subnet router,
and including the appropriate precursor information. Then, in the and including the appropriate precursor information. Then, in the
future the node can use the information to avoid sending future RREQs future the node can use the information to avoid sending future RREQs
for other nodes on the same subnet. for other nodes on the same subnet.
When a node uses a subnet route it may be that a packet is routed to When a node uses a subnet route it may be that a packet is routed to
an IP address on the subnet that is not assigned to any existing node an IP address on the subnet that is not assigned to any existing node
in the ad hoc network. When that happens, the subnet router MUST in the ad hoc network. When that happens, the subnet router MUST
return ICMP Host Unreachable message to the sending node. Upstream return ICMP Host Unreachable message to the sending node. Upstream
nodes receiving such an ICMP message SHOULD record the information nodes receiving such an ICMP message SHOULD record the information
that the partcular IP address is unreachable, but MUST NOT invalidate that the particular IP address is unreachable, but MUST NOT
the route entry for any matching subnet prefix. invalidate the route entry for any matching subnet prefix.
If several nodes in the subnet advertise reachability to the subnet If several nodes in the subnet advertise reachability to the subnet
defined by the subnet prefix, the node with the lowest IP address defined by the subnet prefix, the node with the lowest IP address is
is elected to be the subnet router, and all other nodes MUST stop elected to be the subnet router, and all other nodes MUST stop
advertising reachability. advertising reachability.
The behavior of default routes (i.e., routes with routing prefix The behavior of default routes (i.e., routes with routing prefix
length 0) is not defined in this specification. Selection of routes length 0) is not defined in this specification. Selection of routes
sharing prefix bits should be according to longest match first. sharing prefix bits should be according to longest match first.
8. Using AODV with Other Networks 8. Using AODV with Other Networks
In some configurations, an ad hoc network may be able to provide In some configurations, an ad hoc network may be able to provide
connectivity between external routing domains that do not use AODV. connectivity between external routing domains that do not use AODV.
skipping to change at page 28, line 19 skipping to change at page 30, line 24
data, and have the following format: data, and have the following format:
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | type-specific data ... | Type | Length | type-specific data ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where: where:
Type 1-255 Type 1-255
Length The length of the type-specific data, not including the Length The length of the type-specific data, not including the Type
Type and Length fields of the extension in bytes. and Length fields of the extension in bytes.
Extensions with types between 128 and 255 may NOT be skipped. The Extensions with types between 128 and 255 may NOT be skipped. The
rules for extensions will be spelled out more fully, and conform to rules for extensions will be spelled out more fully, and conform to
the rules for handling IPv6 options. the rules for handling IPv6 options.
9.1. Hello Interval Extension Format 9.1. Hello Interval Extension Format
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | Hello Interval ... | | Type | Length | Hello Interval ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... Hello Interval, continued | | ... Hello Interval, continued |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type 1 Type 1
Length 4 Length 4
Hello Interval Hello Interval
The number of milliseconds between successive The number of milliseconds between successive transmissions
transmissions of a Hello message. of a Hello message.
The Hello Interval extension MAY be appended to a RREP message with The Hello Interval extension MAY be appended to a RREP message with
TTL == 1, to be used by a neighboring receiver in determine how long TTL == 1, to be used by a neighboring receiver in determine how long
to wait for subsequent such RREP messages (i.e., Hello messages; see to wait for subsequent such RREP messages (i.e., Hello messages; see
section 6.9). section 6.9).
10. Configuration Parameters 10. Configuration Parameters
This section gives default values for some important parameters This section gives default values for some important parameters
associated with AODV protocol operations. A particular mobile node associated with AODV protocol operations. A particular mobile node
may wish to change certain of the parameters, in particular the may wish to change certain of the parameters, in particular the
NET_DIAMETER, MY_ROUTE_TIMEOUT, ALLOWED_HELLO_LOSS, RREQ_RETRIES, NET_DIAMETER, MY_ROUTE_TIMEOUT, ALLOWED_HELLO_LOSS, RREQ_RETRIES, and
and possibly the HELLO_INTERVAL. In the latter case, the node possibly the HELLO_INTERVAL. In the latter case, the node should
should advertise the HELLO_INTERVAL in its Hello messages, by advertise the HELLO_INTERVAL in its Hello messages, by appending a
appending a Hello Interval Extension to the RREP message. Choice Hello Interval Extension to the RREP message. Choice of these
of these parameters may affect the performance of the protocol. parameters may affect the performance of the protocol. Changing
Changing NODE_TRAVERSAL_TIME also changes the node's estimate NODE_TRAVERSAL_TIME also changes the node's estimate of the
of the NET_TRAVERSAL_TIME, and so can only be done with suitable NET_TRAVERSAL_TIME, and so can only be done with suitable knowledge
knowledge about the behavior of other nodes in the ad hoc network. about the behavior of other nodes in the ad hoc network. The
The configured value for MY_ROUTE_TIMEOUT MUST be at least 2 * configured value for MY_ROUTE_TIMEOUT MUST be at least 2 *
PATH_DISCOVERY_TIME. PATH_DISCOVERY_TIME.
Parameter Name Value Parameter Name Value
---------------------- ----- ---------------------- -----
ACTIVE_ROUTE_TIMEOUT 3,000 Milliseconds ACTIVE_ROUTE_TIMEOUT 3,000 Milliseconds
ALLOWED_HELLO_LOSS 2 ALLOWED_HELLO_LOSS 2
BLACKLIST_TIMEOUT RREQ_RETRIES * NET_TRAVERSAL_TIME BLACKLIST_TIMEOUT RREQ_RETRIES * NET_TRAVERSAL_TIME
DELETE_PERIOD see note below DELETE_PERIOD see note below
HELLO_INTERVAL 1,000 Milliseconds HELLO_INTERVAL 1,000 Milliseconds
LOCAL_ADD_TTL 2 LOCAL_ADD_TTL 2
MAX_REPAIR_TTL 0.3 * NET_DIAMETER MAX_REPAIR_TTL 0.3 * NET_DIAMETER
MIN_REPAIR_TTL see note below MIN_REPAIR_TTL see note below
MY_ROUTE_TIMEOUT 2 * ACTIVE_ROUTE_TIMEOUT MY_ROUTE_TIMEOUT 2 * ACTIVE_ROUTE_TIMEOUT
NET_DIAMETER 35 NET_DIAMETER 35
NET_TRAVERSAL_TIME 2 * NODE_TRAVERSAL_TIME * NET_DIAMETER NET_TRAVERSAL_TIME 2 * NODE_TRAVERSAL_TIME * NET_DIAMETER
NEXT_HOP_WAIT NODE_TRAVERSAL_TIME + 10 NEXT_HOP_WAIT NODE_TRAVERSAL_TIME + 10
NODE_TRAVERSAL_TIME 40 milliseconds NODE_TRAVERSAL_TIME 40 milliseconds
PATH_DISCOVERY_TIME 2 * NET_TRAVERSAL_TIME PATH_DISCOVERY_TIME 2 * NET_TRAVERSAL_TIME
RERR_RATELIMIT 10 RERR_RATELIMIT 10
RING_TRAVERSAL_TIME 2 * NODE_TRAVERSAL_TIME * RING_TRAVERSAL_TIME 2 * NODE_TRAVERSAL_TIME *
(TTL_VALUE + TIMEOUT_BUFFER) (TTL_VALUE + TIMEOUT_BUFFER)
RREQ_RETRIES 2 RREQ_RETRIES 2
RREQ_RATELIMIT 10 RREQ_RATELIMIT 10
TIMEOUT_BUFFER 2 TIMEOUT_BUFFER 2
TTL_START 1 TTL_START 1
TTL_INCREMENT 2 TTL_INCREMENT 2
TTL_THRESHOLD 7 TTL_THRESHOLD 7
TTL_VALUE see note below TTL_VALUE see note below
The MIN_REPAIR_TTL should be the last known hop count to the
The MIN_REPAIR_TTL should be the last known hop count to destination. If Hello messages are used, then the
the destination. If Hello messages are used, then the ACTIVE_ROUTE_TIMEOUT parameter value MUST be more than the value
ACTIVE_ROUTE_TIMEOUT parameter value MUST be more than the (ALLOWED_HELLO_LOSS * HELLO_INTERVAL). For a given
value (ALLOWED_HELLO_LOSS * HELLO_INTERVAL). For a given ACTIVE_ROUTE_TIMEOUT value, this may require some adjustment to the
ACTIVE_ROUTE_TIMEOUT value, this may require some adjustment to value of the HELLO_INTERVAL, and consequently use of the Hello
the value of the HELLO_INTERVAL, and consequently use of the Hello
Interval Extension in the Hello messages. Interval Extension in the Hello messages.
TTL_VALUE is the value of the TTL field in the IP header while the TTL_VALUE is the value of the TTL field in the IP header while the
expanding ring search is being performed. This is described further expanding ring search is being performed. This is described further
in section 6.4. The TIMEOUT_BUFFER is configurable. Its purpose is in section 6.4. The TIMEOUT_BUFFER is configurable. Its purpose is
to provide a buffer for the timeout so that if the RREP is delayed to provide a buffer for the timeout so that if the RREP is delayed
due to congestion, a timeout is less likely to occur while the RREP due to congestion, a timeout is less likely to occur while the RREP
is still en route back to the source. To omit this buffer, set is still en route back to the source. To omit this buffer, set
TIMEOUT_BUFFER = 0. TIMEOUT_BUFFER = 0.
DELETE_PERIOD is intended to provide an upper bound on the time DELETE_PERIOD is intended to provide an upper bound on the time for
for which an upstream node A can have a neighbor B as an active which an upstream node A can have a neighbor B as an active next hop
next hop for destination D, while B has invalidated the route to for destination D, while B has invalidated the route to D. Beyond
D. Beyond this time B can delete the (already invalidated) route this time B can delete the (already invalidated) route to D. The
to D. The determination of the upper bound depends somewhat on the determination of the upper bound depends somewhat on the
characteristics of the underlying link layer. If Hello messages characteristics of the underlying link layer. If Hello messages are
are used to determine the continued availability of links to next used to determine the continued availability of links to next hop
hop nodes, DELETE_PERIOD must be at least ALLOWED_HELLO_LOSS * nodes, DELETE_PERIOD must be at least ALLOWED_HELLO_LOSS *
HELLO_INTERVAL. If the link layer feedback is used to detect loss HELLO_INTERVAL. If the link layer feedback is used to detect loss of
of link, DELETE_PERIOD must be at least ACTIVE_ROUTE_TIMEOUT. If link, DELETE_PERIOD must be at least ACTIVE_ROUTE_TIMEOUT. If hello
hello messages are received from a neighbor but data packets to that messages are received from a neighbor but data packets to that
neighbor are lost, (due to temporary link asymmetry, e.g.) we have neighbor are lost (e.g., due to temporary link asymmetry), we have to
to make more concrete assumptions about the underlying link layer. make more concrete assumptions about the underlying link layer. We
We assume that such asymmetry cannot persist beyond a certain time, assume that such asymmetry cannot persist beyond a certain time, say,
say, a multiple K of HELLO_INTERVAL. In other words, a node will a multiple K of HELLO_INTERVAL. In other words, a node will
invariably receive at least one out of K subsequent Hello messages invariably receive at least one out of K subsequent Hello messages
from a neighbor if the link is working and the neighbor is sending no from a neighbor if the link is working and the neighbor is sending no
other traffic. Covering all possibilities, other traffic. Covering all possibilities,
DELETE_PERIOD = K * max (ACTIVE_ROUTE_TIMEOUT, HELLO_INTERVAL) DELETE_PERIOD = K * max (ACTIVE_ROUTE_TIMEOUT, HELLO_INTERVAL)
(K = 5 is recommended). (K = 5 is recommended).
NET_DIAMETER measures the maximum possible number of hops between NET_DIAMETER measures the maximum possible number of hops between two
two nodes in the network. NODE_TRAVERSAL_TIME is a conservative nodes in the network. NODE_TRAVERSAL_TIME is a conservative estimate
estimate of the average one hop traversal time for packets and should of the average one hop traversal time for packets and should include
include queuing delays, interrupt processing times and transfer queuing delays, interrupt processing times and transfer times.
times. ACTIVE_ROUTE_TIMEOUT SHOULD be set to a longer value (at ACTIVE_ROUTE_TIMEOUT SHOULD be set to a longer value (at least 10,000
least 10,000 milliseconds) if link-layer indications are used to milliseconds) if link-layer indications are used to detect link
detect link breakages such as in IEEE 802.11 [5] standard. TTL_START breakages such as in IEEE 802.11 [5] standard. TTL_START should be
should be set to at least 2 if Hello messages are used for local set to at least 2 if Hello messages are used for local connectivity
connectivity information. Performance of the AODV protocol is information. Performance of the AODV protocol is sensitive to the
sensitive to the chosen values of these constants, which often depend chosen values of these constants, which often depend on the
on the characteristics of the underlying link layer protocol, radio characteristics of the underlying link layer protocol, radio
technologies etc. BLACKLIST_TIMEOUT should be suitably increased technologies etc. BLACKLIST_TIMEOUT should be suitably increased if
if an expanding ring search is used. In such cases, it should be an expanding ring search is used. In such cases, it should be
{[(TTL_THRESHOLD - TTL_START)/TTL_INCREMENT] + 1 + RREQ_RETRIES} * {[(TTL_THRESHOLD - TTL_START)/TTL_INCREMENT] + 1 + RREQ_RETRIES} *
NET_TRAVERSAL_TIME. This is to account for possible additional route NET_TRAVERSAL_TIME. This is to account for possible additional route
discovery attempts. discovery attempts.
11. Security Considerations 11. Security Considerations
Currently, AODV does not specify any special security measures. Currently, AODV does not specify any special security measures. Route
Route protocols, however, are prime targets for impersonation protocols, however, are prime targets for impersonation attacks. In
attacks. In networks where the node membership is not known, it networks where the node membership is not known, it is difficult to
is difficult to determine the occurrence of impersonation attacks, determine the occurrence of impersonation attacks, and security
and security prevention techniques are difficult at best. However, prevention techniques are difficult at best. However, when the
when the network membership is known and there is a danger of network membership is known and there is a danger of such attacks,
such attacks, AODV control messages must be protected by use of AODV control messages must be protected by use of authentication
authentication techniques, such as those involving generation techniques, such as those involving generation of unforgeable and
of unforgeable and cryptographically strong message digests or cryptographically strong message digests or digital signatures.
digital signatures. While AODV does not place restrictions on the While AODV does not place restrictions on the authentication
authentication mechanism used for this purpose, IPsec AH is an mechanism used for this purpose, IPsec AH is an appropriate choice
appropriate choice for cases where the nodes share an appropriate for cases where the nodes share an appropriate security association
security association that enables the use of AH. that enables the use of AH.
In particular, RREP messages SHOULD be authenticated to avoid In particular, RREP messages SHOULD be authenticated to avoid
creation of spurious routes to a desired destination. Otherwise, an creation of spurious routes to a desired destination. Otherwise, an
attacker could masquerade as the desired destination, and maliciously attacker could masquerade as the desired destination, and maliciously
deny service to the destination and/or maliciously inspect and deny service to the destination and/or maliciously inspect and
consume traffic intended for delivery to the destination. RERR consume traffic intended for delivery to the destination. RERR
messages, while less dangerous, SHOULD be authenticated in order to messages, while less dangerous, SHOULD be authenticated in order to
prevent malicious nodes from disrupting valid routes between nodes prevent malicious nodes from disrupting valid routes between nodes
that are communication partners. that are communication partners.
AODV does not make any assumption about the method by which addresses AODV does not make any assumption about the method by which addresses
are assigned to the mobile nodes, except that they are presumed to are assigned to the mobile nodes, except that they are presumed to
have unique IP addresses. Therefore, no special consideration, other have unique IP addresses. Therefore, no special consideration, other
than what is natural because of the general protocol specifications, than what is natural because of the general protocol specifications,
can be made about the applicability of IPsec authentication headers can be made about the applicability of IPsec authentication headers
or key exchange mechanisms. However, if the mobile nodes in the or key exchange mechanisms. However, if the mobile nodes in the ad
ad hoc network have pre-established security associations, it is hoc network have pre-established security associations, it is
presumed that the purposes for which the security associations are presumed that the purposes for which the security associations are
created include that of authorizing the processing of AODV control created include that of authorizing the processing of AODV control
messages. Given this understanding, the mobile nodes should be able messages. Given this understanding, the mobile nodes should be able
to use the same authentication mechanisms based on their IP addresses to use the same authentication mechanisms based on their IP addresses
as they would have used otherwise. as they would have used otherwise.
12. IANA Considerations 12. IANA Considerations
AODV defines a "Type" field for messages sent to port 654. A new AODV defines a "Type" field for messages sent to port 654. A new
registry is to be created for the values for this Type field, and the registry has been created for the values for this Type field, and the
following values assigned: following values have been assigned:
Message Type Value Message Type Value
--------------------------- ----- --------------------------- -----
Route Request (RREQ) 1 Route Request (RREQ) 1
Route Reply (RREP) 2 Route Reply (RREP) 2
Route Error (RERR) 3 Route Error (RERR) 3
Route-Reply Ack (RREP-ACK) 4 Route-Reply Ack (RREP-ACK) 4
AODV control messages can have extensions. Currently, only one AODV control messages can have extensions. Currently, only one
extension is defined. A new registry is to be created for the Type extension is defined. A new registry has been created for the Type
field of the extensions: field of the extensions:
Extension Type Value Extension Type Value
--------------------------- ----- --------------------------- -----
Hello Interval 1 Hello Interval 1
Future values of the Message Type or Extension Type can be allocated Future values of the Message Type or Extension Type can be allocated
using standards action [2]. using standards action [2].
13. IPv6 Considerations 13. IPv6 Considerations
See [6] for detailed operation for IPv6. The only changes to the See [6] for detailed operation for IPv6. The only changes to the
protocol are that the address fields are enlarged. protocol are that the address fields are enlarged.
14. Acknowledgments 14. Acknowledgments
Special thanks to Ian Chakeres, UCSB, for his extensive suggestions Special thanks to Ian Chakeres, UCSB, for his extensive suggestions
and contributions to recent revisions. and contributions to recent revisions.
We acknowledge with gratitude the work done at University of We acknowledge with gratitude the work done at University of
Pennsylvania within Carl Gunter's group, as well as at Stanford and Pennsylvania within Carl Gunter's group, as well as at Stanford and
CMU, to determine some conditions (especially involving reboots and CMU, to determine some conditions (especially involving reboots and
lost RERRs) under which previous versions of AODV could suffer from lost RERRs) under which previous versions of AODV could suffer from
routing loops. Contributors to those efforts include Karthikeyan routing loops. Contributors to those efforts include Karthikeyan
Bhargavan, Joshua Broch, Dave Maltz, Madanlal Musuvathi, and Bhargavan, Joshua Broch, Dave Maltz, Madanlal Musuvathi, and Davor
Davor Obradovic. The idea of a DELETE_PERIOD, for which expired Obradovic. The idea of a DELETE_PERIOD, for which expired routes
routes (and, in particular, the sequence numbers) to a particular (and, in particular, the sequence numbers) to a particular
destination must be maintained, was also suggested by them. destination must be maintained, was also suggested by them.
We also acknowledge the comments and improvements suggested by We also acknowledge the comments and improvements suggested by Sung-
Sung-Ju Lee (especially regarding local repair), Mahesh Marina, Erik Ju Lee (especially regarding local repair), Mahesh Marina, Erik
Nordstrom (who provided text for section 6.11), Yves Prelot, Marc Nordstrom (who provided text for section 6.11), Yves Prelot, Marc
Mosko, Manel Guerrero Zapata, Philippe Jacquet, and Fred Baker. Mosko, Manel Guerrero Zapata, Philippe Jacquet, and Fred Baker.
References 15. Normative References
[1] S. Bradner. Key words for use in RFCs to Indicate Requirement [1] Bradner, S. "Key words for use in RFCs to Indicate Requirement
Levels. Request for Comments (Best Current Practice) 2119, Levels", BCP 14, RFC 2119, March 1997.
Internet Engineering Task Force, March 1997.
[2] T. Narten and H. Alvestrand. Guidelines for Writing an IANA [2] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA
Considerations Section in RFCs. Request for Comments (Best Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
Current Practice) 2434, Internet Engineering Task Force, October
1998.
[3] J. Manner et al. Mobility Related Terminology (work in 16. Informative References
progress). draft-manner-seamoby-terms-02.txt, July 2001.
[4] Karthikeyan Bhargavan, Carl A. Gunter, and Davor Obradovic. [3] Manner, J., et al., "Mobility Related Terminology", Work in
Fault Origin Adjudication. In Proceedings of the Workshop on Progress, July 2001.
Formal Methods in Software Practice, Portland, OR, August 2000.
[5] IEEE 802.11 Committee, AlphaGraphics #35, 10201 N.35th Avenue, [4] Karthikeyan Bhargavan, Carl A. Gunter, and Davor Obradovic.
Phoenix AZ 85051. Wireless LAN Medium Access Control MAC and Fault Origin Adjudication. In Proceedings of the Workshop on
Physical Layer PHY Specifications, June 1997. IEEE Standard Formal Methods in Software Practice, Portland, OR, August 2000.
802.11-97.
[6] C. Perkins, E. Royer, and S. Das. Ad hoc on demand distance [5] IEEE 802.11 Committee, AlphaGraphics #35, 10201 N.35th Avenue,
vector (AODV) routing for ip version 6 (work in progress). Phoenix AZ 85051. Wireless LAN Medium Access Control MAC and
Internet Draft, Internet Engineering Task Force, November 2001. Physical Layer PHY Specifications, June 1997. IEEE Standard
802.11-97.
References [1] and [2] are normative; all others are informative. [6] Perkins, C., Royer, E. and S. Das, "Ad hoc on demand distance
vector (AODV) routing for ip version 6", Work in Progress.
A. Draft Modifications 17. Authors' Addresses
The following are major changes between this version (13) of the AODV Charles E. Perkins
draft and previous versions: Communications Systems Laboratory
Nokia Research Center
313 Fairchild Drive
Mountain View, CA 94303
USA
- RERR clarifications for handling subnet routes. A processing Phone: +1 650 625 2986
step was added to eliminate host routes that are redundant with Fax: +1 650 691 2170 (fax)
subnet routes. EMail: Charles.Perkins@nokia.com
- Added explicit specification to clarify that subnet routes are Elizabeth M. Belding-Royer
handled the same way as host routes for managing timeouts and Department of Computer Science
route table entries. University of California, Santa Barbara
Santa Barbara, CA 93106
- Applicability Statement and IANA Considerations sections added. Phone: +1 805 893 3411
Fax: +1 805 893 8553
EMail: ebelding@cs.ucsb.edu
- Normative References placed at beginning of bibliography. Samir R. Das
Department of Electrical and Computer Engineering
& Computer Science
University of Cincinnati
Cincinnati, OH 45221-0030
- Updated Security Considerations section. AH is suggested but not Phone: +1 513 556 2594
mandated as a good choice for authenticating control messages. Fax: +1 513 556 7326
EMail: sdas@ececs.uc.edu
- Updated the AODV and Aggregated Networks section to include the 18. Full Copyright Statement
transmission of an ICMP Host Unreachable message for data packets
sent to non-existent destinations.
Author's Addresses Copyright (C) The Internet Society (2003). All Rights Reserved.
Questions about this memo can be directed to: This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
Charles E. Perkins The limited permissions granted above are perpetual and will not be
Communications Systems Laboratory revoked by the Internet Society or its successors or assigns.
Nokia Research Center
313 Fairchild Drive
Mountain View, CA 94303
USA
+1 650 625 2986
+1 650 691 2170 (fax)
charliep@iprg.nokia.com
Elizabeth M. Belding-Royer This document and the information contained herein is provided on an
Department of Computer Science "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
University of California, Santa Barbara TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
Santa Barbara, CA 93106 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+1 805 893 3411 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+1 805 893 8553 (fax) MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
ebelding@cs.ucsb.edu
Samir R. Das Acknowledgement
Department of Electrical and Computer Engineering
& Computer Science Funding for the RFC Editor function is currently provided by the
University of Cincinnati Internet Society.
Cincinnati, OH 45221-0030
+1 513 556 2594
+1 513 556 7326 (fax)
sdas@ececs.uc.edu
 End of changes. 182 change blocks. 
668 lines changed or deleted 649 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/