Mobile Ad Hoc Networking Working Group Mika Rantonen INTERNET-DRAFT Johanna Keisala 26 August 2003 VTT Technical Research Centre of Finland IP Address Autoconfiguration with DAD minimization for Ad Hoc Networks draft-rantonen-manet-idaddress-dad-adhocnet-00.txt Status of This Memo This document is an Internet-Draft and is subject to all provisions of Section 10 of RFC2026 except that the right to produce derivative works is not granted. 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 http://www.ietf.org/1id-abstracts.html The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html Abstract Many kinds of mobile user equipments may want to join or create wireless local area network. Today connectivity is usually based on using the IP address as the identifier for the device. However, such kinds of devices do not necessary have a static IP address. Some autoconfiguration procedures are developed for fixed networks, but those procedures have requirements that Manet does not satisfy. For ad hoc networks, some IPv6 address autoconfiguration solutions are developed during recent years. In this document, an autoconfiguration mechanism for mobile ad hoc network nodes will be described. A hardware based addressing will be presented as one approach to create a temporary IPv6 address. Furthermore, a solution for minimizing Duplicate Address Detection procedures while generating a globally unique IPv6 address will be explained. Rantonen, et. al. Expires 26 February 2004 [Page i] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 Table of Contents Status of This Memo i Abstract i 1. Introduction 1 2. Applicability Statement 2 3. Terminology 2 4. Overview 4 5. Packet Formats 5 5.1. IPv6 Address Request . . . . . . . . . . . . . . . . . . 5 5.2. IPv6 Address Reply . . . . . . . . . . . . . . . . . . . 6 6. IPv6 Address Autoconfiguration 7 6.1. Hardware Based Temporary Address . . . . . . . . . . . . 7 6.2. Address Request (AREQ) . . . . . . . . . . . . . . . . . 7 6.3. Address Request Processing . . . . . . . . . . . . . . . 8 6.4. Address Reply Processing . . . . . . . . . . . . . . . . 9 7. Global Connectivity 10 8. Security Considerations 10 9. Configuration Parameters 10 1. Introduction Many kinds of mobile user equipment may want to join or create wireless local area network at any specific time. Today connectivity is usually based on using the IP address as an identifier for the device. However, such devices do not necessarily have a static IP address and thus, they can not participate in mobile ad hoc networks directly. In this document, an autoconfiguration mechanism for mobile ad hoc network (Manet) nodes is described. Furthermore, a solution for generating a globally unique IPv6 address without Duplicate Address Detection is specified. IPv6 address is hereafter referred as "IP address". Rantonen, et. al. Expires 26 February 2004 [Page 1] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 Some autoconfiguration procedures like Zeroconf [2] and IPv6 Stateless Address Autoconfiguration [8] are developed for fixed networks, but those procedures have requirements that Manet does not satisfy. An existing solution of IP address autoconfiguration for mobile ad hoc network is described in [6], but it is isolated from Internet connectivity. The solution described in this document specifies the autoconfiguration procedure, address management and address releasing. Specifically, these mechanisms are described for mobile ad hoc networks using Ad hoc On-Demand Distance Vector (AODV) routing protocol. The autoconfiguration procedure of this document follows partly [6]. The solution as described in [9] is used for interoperability for global connectivity. 2. Applicability Statement The applicabilities and limitations of the mechanisms described below have to be explained for avoiding misunderstandings. Some assumptions have been done and they are explained in this section. A single node can join a network or leave the network at arbitrary time, but network partitions and healings are out of scope. These situations are subjects for further research. Furthermore, the internet-gateway can be failed and in that case all global addresses in appropriate Manet MUST be released as described in [9]. One important assumption is that the prefix length of Manet IP address MUST be equal or greater than the prefix length of global IP address. If the prefix length of Manet is greater than the prefix length of global IP address, the padding is needed. Otherwise the DAD MUST run again for Manet or Global address. 3. Terminology The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [1]. This section defines other terminology used with AODV that is not already defined in [3]. Duplicate Address Detection (DAD) The process by which a node, which lacks an IP address, determines whether a candidate address it has selected is available. A node already equipped with an IP address participates in DAD in order to protect its own or its neighbor's IP address from being accidentally misappropriated for use by another node [6]. In this document the DAD MUST be processed for interface ID, not the whole IP address. Rantonen, et. al. Expires 26 February 2004 [Page 2] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 Address Request (AREQ) The message used during address discovery to request the tentative address as its own IP address [6]. Address Reply (AREP) The message used during address discovery to indicate the requested address is already utilised [6]. Temporary Address Temporary address is basically a hardware-based address that is used as a source address for sending the AREQ messages. The temporary address is used only in uniqueness check to ensure that the generated IP address differs from other IP addresses in the same Manet. Temporary flag New flag is determined for routing table entry. This informs that an IP address is under autoconfiguration procedure. Tentative address The IP address, which Manet node wishes to use as an identifier in Manet. The tentative address consists of Manet prefix and randomly generated interface ID. Internet-Gateway A route, which provides Internet connectivity for nodes in Manet [9]. Internet-gateway information The Gateway's IP routing prefix, prefix length, and lifetime. Manet IP address A Manet node's identifier in Manet. The Manet IP address consists of Manet prefix and unique interface ID. The address is used for ad hoc routing and its scope is site local. Global IP address A node's IPv6 address in Internet. The Global IP address consists of gateway's IP routing prefix and unique interface ID. The address identifies the mobile node, and is used for Internet communication. Rantonen, et. al. Expires 26 February 2004 [Page 3] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 Interface ID The unique postfix of IPv6 address. The IPv6 address consists of prefix and interface ID. The length of interface ID = 128bits - prefix length. 4. Overview The solution described in this document consists of initial configuration of new Manet node i.e. assignment of an unique Manet IP address, assignment of an unique global IP address, management of previously mentioned addresses and releasing the assigned address. When the node wishes to join in Manet, it first creates a hardware based temporary address. This address is used only in uniqueness check to ensure that the generated IP address differs from other IP addresses in the same Manet. Second, the node generates a Manet IP address, called tentative address, by using the Manet prefix and randomly generated interface ID. Then the node starts an autoconfiguration procedure to assign the tentative address. The Duplicate Address Detection (DAD) is processed only for the interface ID of Manet IP address, not the whole IP address. If Manet is attached to the Internet via internet-gateway, the node can get the Internet gateway information as described in [9]. The global IP address is generated by using the previously mentioned unique tested interface ID and gateway's IP routing prefix, which is included in the internet-gateway information. The DAD does not need to be run for the global IP address, because the interface ID is unique and it will not be changed. The releasing procedure of the IP address is different for global IP addresses and Manet IP addresses. If internet-gateway fails or the node wants to release the global IP address, the node can assign the Manet IP address with the same interface ID than the global address without new DAD. This minimizes the DAD procedures. Releasing of Manet IP address is very simple, because the unused IP address is erased from the neighbor's routing table after timer expiration. Rantonen, et. al. Expires 26 February 2004 [Page 4] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 5. Packet Formats 5.1. IPv6 Address Request 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Code | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |M| Hop count | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Requested IPv6 Address | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AREQ sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AREQ identification number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The format of the IPv6 Address Request message is illustrated above. It is modified from the Address Request defined in Ad Hoc Autoconfiguration [6] and it contains the following modifications: Hop Count The number of hops from the originator node (AREQ sender) to the destination node. AREQ Sequence Number The AREQ sequence number that is associated with the sending times. It identifies the AREQ with the requested IPv6 address. AREQ Identification Number The randomly selected number that identifies the requested IPv6 address. IP fields have following exception compared with [6]: Source Address The source address is an address of node, which initially sent or forwarded an AREQ. Note: When an AREQ is initally sent, this is a link-local, temporary address generated by using the hardware address. Rantonen, et. al. Expires 26 February 2004 [Page 5] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 5.2. IPv6 Address Reply 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Code | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |R|S|O|M| Hop count | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Requested IPv6 Address | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AREP sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AREP identification number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The format of the IPv6 Address Reply message is illustrated above. It is modified from the Address Reply defined in Ad Hoc Autoconfiguration [6] and it contains the following modifications: Hop Count The number of hops from the AREP sender to the originator node (AREQ sender). AREP Sequence Number The AREP sequence number that is associated to the AREQ sequence number. It identifies the Address Reply to a certain AREQ with the requested IPv6 address. AREP Identification number The randomly selected number that identifies the requested IPv6 address. IP fields have following exception compared with [6]: Destination Address The destination address is an address, which is found from the routing table entry. Note: If appropriate node is neighbor, the nexthop is temporary address. Otherwise the nexthop is the same as normal Manet nexthop address. Rantonen, et. al. Expires 26 February 2004 [Page 6] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 6. IPv6 Address Autoconfiguration In this section, the specific steps that an IPv6 Manet node will take when autoconfiguring an address to its interface, will be described. The suggestion for DAD is given in subclauses 6.1 -6.4. The DAD suggested is based on IP Address Autoconfiguration [6] and Zeroconf [5], but with changes, which are described in the text. 6.1. Hardware Based Temporary Address A hardware based addressing is one possible approach to create an IP address. It can be argued that all the Ethernet cards have globally unique addresses by using the 48-bit IEEE assigned unique MAC (Medium Access Control) addresses. Furthermore, every GSM has unique device identifier IMEI (International Mobile Equipment Identity) code, in which the creation of hardware-based IP address could be based. However, some communication card solutions of handheld mobile do not have unique address. Thus this approach is not such reliable as is needed and hardware address based solution for a globally unique address has limitations. Nevertheless, the hardware address can be used as a temporary address with an identification number in address autoconfiguration. The hardware address can be used even though its scope is link-local because it is used only for sending the AREQ and the address shows up only for the next hop nodes. 6.2 Address Request (AREQ) When an IP node performs Manet address autoconfiguration, a temporary address is used for the sole use of AREQ-AREP protocol messages exchange for the uniqueness check of the chosen IP address. The node creates an IP address by using the MANET_PREFIX, reserved for this purpose, and randomly generated interface ID. The prefix length of MANET_PREFIX is 64 bits and the length of interface ID is 128 bits - Manet prefix length = 64 bits. Hereby generated requested IP address is also called a tentative address. After this, the node processes uniqueness check to requested IP address, as specified below. To check for address uniqueness, the node sends an Address Request (AREQ). The AREQ modification contains an identification number, a sequence number and hop count. The identification number is generated randomly. It will serve as an identifier to the requested IP address. The sequence number is associated with the sending times of AREQ. It will be increased when the AREQ is sent all over again. Message format for IPv6 AREQ is given in section 5.1. The node sends an Address Request to its neigbors and sets a timer for ADDRESS_DISCOVERY milliseconds. If the tentative address is already in use within the reachable Manet, the node expects to receive an Address Reply (AREP). Rantonen, et. al. Expires 26 February 2004 [Page 7] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 6.3. Address Request Processing The AREQ messages are processed as follows: - The node compares its own IP address and Requested_IPv6_Address. If the addresses are the same the node MUST reply to the packet with AREP immediately. - If not, the node looks up its routing table for the entry with Requested_IPv6_Address. If the entry is not found from it's routing table: 1. The node enters a new entry to its routing table. The entry's dest_addr is tentative_addr, next_hop is ip_src and the temporary flag is set. 2. The node adds a pair {Requested_IPv6_Address, AREQ_Identification_Number} with timer to its temporary buffered list for message identifiers. 3. The node forwards AREQ. - If the entry is found from the routing table, the node checks the state of entry. If the temporary flag is set, the node checks its buffered list: - If the pair {Requested_IPv6_Address, AREQ_Identification_Number} is not found from the buffered list, the node MUST reply to the packet with AREP immediately. - If the pair {Requested_IPv6_Address, AREQ_Identification_Number} is found from the buffered list, the node proceeds as follows: 1. If (areq->sequence_number > entry->sequence_number) or ((areq->sequence_number = entry->sequence_number) and (areq->hop_count < entry->hop_count)) Then update routing table and forward AREQ; 2. If ((areq->sequence_number = entry->sequence_number) and (areq->hop_count >= entry->hop_count)) Then destroy message; 3. If (areq->sequence_number < entry->sequence_number) Then destroy message; - If the state of entry with Requested_IPv6_address is active or invalid, the node MUST reply to the packet with AREP immediately. When a node receives an AREQ message, the node first compares the requested IP address and its own IP address. If the requested address differs from its own IP address, the node checks its routing table. If the entry with requested IP address is not found from the routing table, the node creates a reverse route entry for the node indicated by the requested IP address field. The node adds entry with the requested IPv6 address to its routing table and uses the node from which it received the AREQ as a next hop towards Rantonen, et. al. Expires 26 February 2004 [Page 8] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 the source node. The state of this entry is set as temporary i.e. the temporary flag is set. The node enters a lifetime for this route as REVERSE_ROUTE_LIFETIME. In this way, if the node later receives an AREP, it will be able to forward the AREP towards the source node. In addition, the pair {Requested_IPv6_Address, AREQ_Identification_Number} is added with timer to node's temporary buffered list for message identifiers. After timer expiration, the pair {Requested_IPv6_Address, AREQ_ Identification_Number} is purged from the list. These two values and AREQ sequence number serve to identify the request uniquely. Finally the node forwards the AREQ. If the entry with requested IP address is found from the routing table, the node checks the state of this entry. If the temporary flag is set, the node looks up its temporary buffered list. If the pair {Requested_IPv6_Address, AREQ_Identification_Number} is not found from the list, the requested IP address is already in use in another AREQ process and the node MUST reply to the packet with AREP immediately. If the pair is found from the list, the node has seen this AREQ before. To determine either to update the routing table or destroy the AREQ, the node proceeds as follows: the routing table is updated only if new AREQ sequence number is greater than the one in the routing table or both sequence numbers are the same but new hop count is smaller than the hop count in the routing table. If the routing table is updated, the node forwards the AREQ immediately afterwards. Otherwise, the node destroys the duplicate AREQ. On the other hand, if the node has the same IP address as that in the AREQ or the node finds the same IP address from its routing table with the state as active or invalid, the node MUST reply to the packet immediately. First, the node creates an Address Reply (AREP) packet. The packet format for the AREP is presented in section 5.2. Then the node copies the requested IPv6 address, AREQ identification number and AREQ sequence number from the AREQ message, and places them in the AREP. After that the node unicasts this packet to the source node, as indicated by the source IP address in the IP header of the received AREQ message. The reverse route that was created by the AREQ process is used to unicast the AREP back to the source node. 6.4. Address Reply Processing When a node originates an AREQ, it sets a timer for ADDRESS_DISCOVERY milliseconds. When the ADDRESS_DISCOVERY timer expires, the node increases its sequence number with one and repeats the process AREQ_RETRIES times waiting for responses. If all attempts fail with timer expiration, the node concludes that the requested address is unique in Manet and the requested address can safely be set as its own. Rantonen, et. al. Expires 26 February 2004 [Page 9] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 On the other hand, if the node receives an AREP within the discovery period, and if the requested IP address and AREP identification number match to it's recorded values, another node within the ad hoc network is currently using that requested IP address. In this case, the node randomly picks another tentative IP address, generates randomly AREQ identification number and begins the DAD procedure again. However, if both the requested IPv6 address and the AREP identification number do not match to the node's recorded values, the AREP is addressed to another node. 7. Global Connectivity The interoperability for global connectivity is described in [9]. 8. Security Considerations This document does not define any method for secure operation of the autoconfiguration protocol. The danger exists that a malicious node may pretend to have any given IP address, so that another node would receive AREP messages apparently denying it the use of whatever address it might choose. This lack of security is problematic for many approaches to IP address autoconfiguration. It is symptomatic of the basic conflict between security, and operation in any mode where preconfigured information (including security association data) is not available. 9. Configuration Parameters This section gives default values for some important values associated with address discovery protocol operations. Parameter Name Value ---------------------- ----- ALL_MANET_NODES ff05:ffff::/64 ADDRESS_DISCOVERY 3 * NODE_TRAVERSAL_TIME * NET_DIAMETER / 2 REVERSE_ROUTE_LIFETIME ADDRESS_DISCOVERY * 2 ADDRESS_RETRIES 3 MANET_PREFIX fec0:0:0:ffff::/64 NET_DIAMETER 10 NODE_TRAVERSAL_TIME 40 TEMPORARY_ADDR_LIFETIME 3000 Rantonen, et. al. Expires 26 February 2004 [Page 10] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 References [1] S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. Request for Comments (Best Current Practice) 2119, Internet Engineering Task Force, March 1997. [2] S. Cheshire, B. Aboba, and E. Guttman. Dynamic Configuration of IPv4 Link-Local Addresses. IETF Internet Draft, August 2003 (Work in progress). [3] J. Manner et al. Mobility Related Terminology. IETF Internet Draft, July 2001 (Work in progress). [4] T. Narten, E. Nordmark, and W. Simpson. Neighbor Discovery for IP Version 6 (IPv6). Request for Comments (Draft Standard) 2461, Internet Engineering Task Force, December 1998. [5] C. E Perkins, E. M. Belding- Royer, and S. R. Das. Ad Hoc on Demand Distance Vector (AODV) Routing. IETF Internet Draft, February 2003 (Work in progress). [6] C. E. Perkins, J. T. Malinen, R. Wakikawa, and E. M. Belding- Royer. IP Address Autoconfiguration for Ad Hoc Networks. IETF Internet Draft, November 2001 (Work in progress). [7] D. C. Plummer. An Ethernet Address Resolution Protocol. RFC 826. [8] S. Thomson, and T. Narten. IPv6 Stateless Address Autoconfiguration. RFC 2462. [9] R. Wakikawa, J. Malinen, C. Perkins, A. Nilsson, and A. Tuominen. Global connectivity for Mobile Ad Hoc Networks. IETF Internet Draft, November 2002 (Work in progress). Author's Addresses Questions about this memo can be directed to: Mika Rantonen VTT Technical Research Centre of Finland VTT Electronics Kaitov„yl„ 1 P.O.Box 1100 FIN-90571 Oulu Finland +358 8 551 2440 +358 8 551 2320 (fax) mika.rantonen@vtt.fi Rantonen, et. al. Expires 26 February 2004 [Page 11] Internet Draft Ad Hoc Address Autoconfiguration 26 August 2003 Johanna Keisala VTT Technical Research Centre of Finland VTT Electronics Kaitov„yl„ 1 P.O.Box 1100 FIN-90571 Oulu Finland +358 8 551 2434 +358 8 551 2320 (fax) johanna.keisala@vtt.fi Rantonen, et. al. Expires 26 February 2004 [Page 12]