Internet Engineering Task Force David B. Johnson Internet Draft Carnegie Mellon University 11 July 1993 Transparent Internet Routing for IP Mobile Hosts Abstract This document specifies a protocol for allowing transparent routing of IP packets to mobile hosts in the Internet, while using only the mobile host's ``home'' IP address. No changes are required in stationary hosts that communicate with mobile hosts, and no changes are required in mobile hosts above the IP level. The protocol allows any host to become mobile at any time, yet there is no penalty for a host being ``mobile capable,'' since the protocol automatically uses only the standard IP routing mechanisms and adds no overhead to IP when a mobile host is currently connected to its home network. Status of this Memo This document is an Internet Draft. 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. Internet Drafts may be updated, replaced, or obsoleted by other documents at any time. It is not appropriate to use Internet Drafts as reference material or to cite them other than as a ``working draft'' or ``work in progress.'' Please check the 1id-abstracts.txt listing contained in the internet-drafts Shadow Directories on nic.ddn.mil, nnsc.nsf.net, nic.nordu.net, ftp.nisc.sri.com, or munnari.oz.au to learn the current status of any Internet Draft. Johnson [Page 1] Internet Draft Routing for IP Mobile Hosts 11 July 1993 1. Introduction Mobile hosts, such as notebook and palmtop computers or portable workstations, cannot currently interoperate easily or conveniently in the Internet using IP [3] due to the operation of IP's addresses and routing algorithms. IP host addresses are composed of a network number, identifying the network to which the host is attached, and a host number, identifying the particular host within that network. IP expects to be able to route a packet to a host based on the network number contained in the host's IP address. If a host changes its point of connection to the Internet and moves to a new network, IP packets destined for it will no longer reach it correctly. Changing the IP address of the host is difficult or impossible (particularly while keeping existing transport level connections open), and thus a solution is needed for correctly routing packets to the host in its current location given the host's (constant) IP address. This document specifies the Mobile Host Routing Protocol (MHRP), a protocol for transparently supporting the routing of IP packets to a mobile host operating in the Internet, in spite of the mobile host's current location. The term ``mobile host'' is used here to refer to any Internet host that can move from one network to another, while keeping its IP address unchanged. The connection of a mobile host to a new network may be either wired or wireless. For example, a mobile host might be disconnected from its home network, carried to a new site, and temporarily used while reconnected to that foreign network. A mobile host might also be in use continuously as it is carried from one wireless network to another. This document does not discuss the physical aspects, lower-level protocols, or configuration of any particular type of network (wired or wireless). These issues may be different for each type of network and are largely independent of the problem of routing IP packets to mobile hosts connected to those networks. The protocol specified here allows any host to become a ``mobile host'' simply by moving away from its home network. A mobile host is assigned permanent IP address in the same way as any other host in the Internet, and always uses only its home IP address. There is no penalty for a host being ``mobile capable,'' since the protocol automatically uses only the standard IP routing mechanisms and adds no overhead to IP when a mobile host (a mobile-capable host) is currently connected to its home network. The protocol requires few changes to existing protocol software, and in particular, requires no changes to non-mobile hosts or to backbone routers, and requires no changes to mobile hosts above the IP level. The protocol is designed to scale well to very large numbers of mobile hosts and to add little overhead to the network. Johnson [Page 2] Internet Draft Routing for IP Mobile Hosts 11 July 1993 2. Overview Each mobile hosts owned by some organization is assigned a permanent IP address by that organization within any of the IP networks belonging to that organization. The mobile host will use this IP address whether attached to this ``home'' network or currently attached to some ``foreign'' network. This method of address assignment preserves the delegation of addressing authority for each organization from the Internet Assigned Numbers Authority [6], and makes the current physical location of a mobile host transparent to other hosts. The Mobile Host Routing Protocol (MHRP) provides a ``tunneling'' mechanism to route packets for a mobile host to that host's current location. Without this ability to tunnel packets to a mobile host, packets for it would be routed always to that mobile host's home network. MHRP tunneling is transparent to the sending host and to the mobile host, although support for MHRP in a sending host may optionally be used to optimize its own communication with mobile hosts. The following three support functions are used by the Mobile Host Routing Protocol: Base Station A host or router on a network that forwards arriving IP packets to a locally connected mobile host currently visiting that network and registered with that Base Station. The IP address of the current Base Station for a mobile host represents the ``location'' of that mobile host. Location Server A host or router on a network that maintains a database recording the IP address of the current Base Station for each mobile host for which this is the home network. The Location Server also tunnels to the Base Station any packets that it receives that are addressed to the mobile host. Location Cache A host or router that caches the IP address of the Base Station for a mobile host. A Location Cache also tunnels to that Base Station any packets that it originates or forwards that are addressed to that mobile host. Johnson [Page 3] Internet Draft Routing for IP Mobile Hosts 11 July 1993 In order for hosts on some network to become mobile hosts (to leave their home network and connect to some foreign network), a Location Server must be present on their home network. The Location Server may be the router that connects that network to the rest of the Internet, or may be a separate support host on that network. The functionality of the Location Server may also be replicated on multiple support hosts, but these hosts must cooperate to provide a consistent view of the database recording the current location of each of that home network's mobile hosts. When a mobile host moves to a new location in the Internet (connects to a new foreign network), it must notify its home Location Server, which updates its location database. Each organization manages its own Location Server (or Servers) to support the routing of IP packets to the mobile hosts owned by that organization. For example, if that organization requires increased reliability of service for its own mobile hosts, it can replicate the Location Server function on several support hosts on its own network or may install additional links connecting its network to the Internet at more than one point to provide continuous connectivity to its Location Server in case one of its links to the Internet is temporarily down. Such decisions can be made by each organization independently and benefit that organization's mobile hosts. This document does not discuss the particular methods to be used by the Location Server in implementing or accessing its location database. In order for a mobile host to be able to visit some foreign network, a Base Station must be present on that foreign network that is willing to allow that mobile host to connect to that network. The Base Station is normally the router that connects this network to the rest of the Internet, but may also be a separate support host on that network. There may be more than one Base Station on a network, but each mobile host has only one Base Station at a time, and for each mobile host, only one Base Station address is recorded in the database maintained by the Location Server on the mobile host's home network. The connection of a mobile host to its current Base Station may be either wired or wireless. The Base Station must maintain a list recording the IP address of each visiting mobile host currently connected to that network (for which it has agreed to serve as the Base Station), and must also either record the local physical network address of the mobile host (for example, learned when the mobile host connected to the network) or be able to determine the mobile host's local physical address when needed (for example, through ARP [2]). This document does not discuss the particular methods to be used by a mobile host to find a suitable Base Station on a foreign network to which to connect, or to be used by a Base Station to advertise its services to mobile hosts wishing connection. Johnson [Page 4] Internet Draft Routing for IP Mobile Hosts 11 July 1993 Any host or router that learns the location of a mobile host may become a Location Cache for that mobile host by caching that address and agreeing to tunnel packets for that mobile host. A Location Cache is only an optimization to improve routing of subsequent packets to the mobile host, and the contents of the (finite) cache space provided by any host or router may be maintained by any local cache replacement policy. The consistency of each Location Cache with respect to the true location of that mobile host as recorded by its Location Server is maintained as needed by the MHRP protocol. If an out-of-date Location Cache is used to tunnel a packet, the packet will in turn be forwarded to the correct new Base Station for the mobile host, and that Location Cache will be automatically updated for use in tunneling subsequent packets to the mobile host. The functionality of a Base Station, Location Server, and Location Cache may be provided by separate hosts or routers on a network, or may be combined in different ways on one or more hosts or routers. For example, a single router on some network providing the functionality of both a Base Station and a Location Server would allow hosts with that network as their home network to become mobile and to connect to the Internet at various foreign networks, as well as allowing hosts from other networks to connect to that network as visiting mobile hosts. Although not required, all Internet hosts should support becoming a Location Cache for any mobile hosts with which they are communicating, in order to optimize their own communication. In case no Base Station is available on some foreign network, a mobile host may also be able to serve as its own Base Station, if it is able to obtain a temporary IP address within that network. The temporary IP address would be used only as the address of that mobile host's Base Station, and all packets intended for the mobile host would be tunneled to that address in the same way as for other mobile hosts' Base Stations; the mobile host itself would continue to use only its home IP address. Providing this support for a mobile host serving as its own Base Station is optional, and any methods for obtaining such a temporary IP address are beyond the scope of this document. The mobile host protocol normally adds only 8 bytes to each IP packet destined for a mobile host when connected to a foreign network, and adds no overhead to normal IP routing and delivery when a mobile host is ``at home,'' connected to its home network. If the sending host (or the sender's first-hop router) supports the protocol, optimal routing is used for packets sent to a mobile host (after the first packet sent through the Location Server, which initializes the Location Cache); if some router near the sender supports mobile IP, near-optimal routing is used. No support is required at or near the sender, though, and packets are still delivered correctly to the mobile host through its Location Server. Johnson [Page 5] Internet Draft Routing for IP Mobile Hosts 11 July 1993 3. Protocol Description 3.1. Moving a Mobile Host A mobile host may move from one network to another within the Internet at any time. Normally, a host will move by first explicitly disconnecting from the network at its old location and later reconnecting at some new location. However, it may not be possible in some cases to explicitly disconnect before moving, such as for continuously moving hosts connected through a wireless interface, which may be moved out of range of its old Base Station at any time simply by being carried physically too far from its transmitter. In this case, the mobile host may reconnect to its new location (once it is within range of a new transmitter) and implicitly disconnect from the old location at the same time. When a mobile host disconnects from its current network, it must first notify its home Location Server, and then notify its old Base Station on the foreign network from which it is disconnecting. The mobile host is then free to physically disconnect from the network, and must not send any IP packets over the network until explicitly reconnecting to some network. As a special case, if the host is disconnecting from its home network, only its Location Server is notified. When a mobile host reconnects to a new network, it must first notify its new Base Station, and then notify it's home Location Server (and its old Base Station if the host did not explicitly disconnect from its old network earlier). As a special case, if the mobile host is reconnecting to its home network, only its Location Server is notified. The mobile host registers a Base Station address of zero with its Location Server when reconnecting to its home network. At the Location Server, the notifications of a mobile host disconnecting from or reconnecting to the network are used to maintain a record of the current location of the mobile host. The record is maintained in a database giving, for each mobile host for which this is the home network, the IP address of the current Base Station for that mobile host. The database may be maintained in the memory of the Location Server host, but for reliability, should also be recorded on disk to survive any crashes and subsequent reboots of the Location Server. When the old Base Station receives notification that a mobile host is disconnecting from the network, the Base Station removes the mobile host from its list of locally visiting mobile hosts, and thus will no longer transmit arriving packets for that host over its local Johnson [Page 6] Internet Draft Routing for IP Mobile Hosts 11 July 1993 network. The old Base Station optionally also caches the IP address of the new Base Station for this mobile host, becoming a Location Cache for it. This ``forwarding pointer'' Location Cache is not required, though, and is treated the same as any other Location Cache. Such a ``forwarding pointer'' may be useful, though, in maintaining connectivity to a frequently moving mobile host during periods in which that host's Location Server may be temporarily inaccessible. When the new Base Station receives notification that a mobile host has connected to the local network, it creates an entry for that host in its list of locally visiting mobile hosts. Each Base Station that allows mobile hosts to connect to its network maintains a list recording the IP address of each mobile host for which it is serving as the Base Station. When the Base Station receives an IP packet for routing, if the destination IP address of the packet is in this list, it sends the packet over its local network rather than routing the packet based on the destination IP address. The method used by the Base Station to learn the local physical network address corresponding to the mobile host is specific to the particular type of local network involved. For example, the physical network address may be saved from the connection notification message when the mobile host connected to this network, or a dynamic address resolution protocol such as ARP [2] may be used to learn the physical network address when needed. When the Location Server receives notification that a mobile host is disconnecting from its home network, the Location Server must arrange to intercept all subsequent packets transmitted on this network to the mobile host. One method to achieve this involves the use of ``proxy'' ARP [5]. The Location Server broadcasts an ARP message [2] on the local network to update the address resolution cache of any other hosts on that network, so that they now believe that the physical network address corresponding to the disconnecting mobile host is the physical network address of the Location Server itself. This can be done, for example, by broadcasting an ARP ``reply'' message in which both sender and target protocol addresses correspond to the mobile host, and both sender and target hardware addresses correspond to the Location Server. Any host on the local network receiving this message will then update its ARP cache if it previously had an entry for the disconnecting mobile host, and all other hosts on the local network will ignore the message. For increased reliability, the ARP message could be broadcast over the local network several times, although the message may still not reach some hosts. All Internet hosts, though, are required to provide some mechanism to flush out-of-date ARP cache entries, such as by timeout, unicast polling, or invalidating a cache entry upon detecting a delivery problem at the link level or in a higher-level protocol [1], Johnson [Page 7] Internet Draft Routing for IP Mobile Hosts 11 July 1993 and this mechanism should also suffice to allow the host to discover this new physical network address when needed. When the mobile host subsequently reconnects to its home network, the mobile host broadcasts a similar ARP message to the local network to cause other hosts on the same network to update their ARP cache with the real physical network address for the mobile host, rather than the physical address of the Location Server which they may still have in their cache. While a mobile host is disconnected from its home network, the Location Server also answers ARP requests for the mobile host with ``proxy'' ARP [5]. As described above, a Location Server must be present on each IP network (or subnet) having hosts that may become mobile, and a Base Station must likewise be present on each IP network (or subnet) to which mobile hosts may connect. The Location Server can then intercept IP packets for a mobile host being transmitted over that network, and the Base Station can transmit packets directly over that network to locally visiting mobile hosts. It may also be possible to support an entire routing domain with one (or more) Location Servers or Base Stations by selectively using host-specific IP routes. When a mobile host disconnects from its home network, its Location Server could begin advertising a host-specific route for that mobile host's IP address, routing packets for that address to itself. Such host-specific routes would be advertised only while the mobile host was disconnected from its home network, and would not be propagated outside that routing domain. Likewise, when a mobile host connects to some Base Station, the mobile host could begin advertising a host-specific route for itself, allowing the Base Station to deliver arriving packets to it. This routing would be advertised only while the mobile host was connected to this foreign network, and would not be propagated outside that routing domain. 3.2. Locating a Mobile Host When sending an IP packet to a mobile host, the sender initially does not know (or need not know) that the host is mobile. The packet is sent and routed in exactly the same way as any other IP packet, and thus reaches the home network of the mobile host. If the mobile host is currently connected to its home network, the packet is delivered there directly to the host with no extra overhead. If, instead, the mobile host is currently connected to some foreign network, the packet is intercepted by the Location Server on its home network. The Location Server then forwards the packet to the mobile host by tunneling it to the Base Station for that mobile host, as recorded in the Location Server's database. (This tunneling is described further in Section 3.3.) The Location Server also returns Johnson [Page 8] Internet Draft Routing for IP Mobile Hosts 11 July 1993 an ICMP ``mobile host redirect'' message to the original sender of the packet. This redirect message is similar to the standard ICMP host redirect message [4], but reports the Base Station address rather than the first-hop router address for the host to which the original packet was addressed. The redirect message includes the IP address of the mobile host to which the original packet was sent, and the IP address of the Base Station on the network to which the mobile host is currently connected. Any host or router is free to cache the location of a mobile host at any time, but is never required to do so. In particular, the original sending host or any router that sees this mobile host redirect message may become a Location Cache for this mobile host by caching the IP address of the Base Station reported in the redirect message. For example, a network of hosts that do not implement the mobile IP protocol could be supported by a common first-hop router that is willing to become a Location Cache for any mobile hosts with which these hosts correspond. However, in order to function as a Location Cache, a router must examine each packet that it forwards, checking for mobile host redirect messages and updating or adding to its cache. Routers should thus support a configuration option to enable or disable the capability to become a Location Cache, avoiding the overhead of examining each packet forwarded except when needed. Routers that do not support the mobile IP protocol, of course, also would experience no overhead from forwarding mobile host redirect messages. The mobile host redirect is sent as an ICMP message due to its similarity with the existing ICMP redirect message type. Using an ICMP message for the mobile host redirect also aids backwards compatibility with hosts that do not implement the mobile IP protocol; such hosts will simply ignore any mobile host redirect received, since any ICMP messages of unknown type received must be silently discarded [1]. In an implementation, any host or router acting as a Location Cache for a mobile host may record the IP address of that mobile host's Base Station in the same table that it uses already to handle the existing host-specific ICMP redirect message type. Before transmitting an IP packet, a host or router must currently search this table to find the correct first-hop router address to use for this destination IP address. By saving the IP address of a mobile host's Base Station in this same table (with a different type field on the table entry), the correct Base Station address for sending to a mobile host can be found in the cache with little or no additional cost. This table can also be used by a Base Station to store a table entry for each locally visiting mobile host currently connected to that Base Station, and to recognize that a packet which it is routing must be transmitted locally to a visiting mobile host. Johnson [Page 9] Internet Draft Routing for IP Mobile Hosts 11 July 1993 3.3. Routing to a Mobile Host In order to cause IP packets destined for a mobile host to be routed through the Base Station currently serving that host, the Mobile Host Routing Protocol (MHRP) is used to tunnel the packets to this Base Station. The initial Location Cache or Location Server handling the packet transforms it into a new IP packet, addressed from the Location Cache or Location Server to the Base Station. The packet then uses only normal IP routing for delivery to the Base Station, and once received by the Base Station, is transmitted by the Base Station to the locally visiting mobile host. The initial Location Cache or Location Server builds an MHRP header in the packet, adding the new header between the IP header and any existing transport-level header such as TCP or UDP, as illustrated below: +----------------------+ +----------------------+ | Modified IP Header | | IP Header | +----------------------+ +----------------------+ | MHRP Header | | Transport Header | +----------------------+ +----------------------+ ===> | Transport Header | | | +----------------------+ | Transport Data | | | | | | Transport Data | +----------------------+ | | +----------------------+ Building the MHRP header involves the following steps: - The original IP protocol number is copied from the IP header into the MHRP header, and is replaced in the IP header by the IP protocol number indicating MHRP. - The original IP destination address (the mobile host) is copied from the IP header into the MHRP header, and is replaced in the IP header by the address of the Base Station. - Finally, unless the MHRP header is being built by the original sender of the packet, the original IP source address is copied from the IP header into the MHRP header, and is replaced in the IP header by the address of the Location Cache or Location Server building the MHRP header. Johnson [Page 10] Internet Draft Routing for IP Mobile Hosts 11 July 1993 The MHRP header may be built by the sending host itself, if it supports the MHRP protocol and if it currently has a cache entry for the location of the mobile host (it is currently a Location Cache for that mobile host). In this case, the length of the constructed MHRP header is only 8 octets. The MHRP header may also be built by the sender's first-hop router or by any other router that forwards the packet and is currently a Location Cache for the destination IP address. If no Location Caches are encountered, the packet will be routed at each hop according to the normal IP routing algorithms and will eventually reach the mobile host's home network, where the packet will be intercepted by the mobile host's Location Server. The Location Server will then build the MHRP header and tunnel the packet to the Base Station, and will return an ICMP mobile host redirect message to the original sender, as described in Section 3.2. If the MHRP header is built by any host or router other than the original sender, the length of the constructed MHRP header is 12 octets. Once received by the Base Station, the packet is handled by the MHRP protocol module on the Base Station. If the destination mobile host IP address is found in the Base Station's list of locally visiting mobile hosts, the MHRP header is removed from the packet and the original IP header is reconstructed. The Base Station then transmits the packet over the last hop to the directly connected mobile host. If the mobile host has moved to a new Base Station (or returned to its home network) since last connected to this Base Station, the mobile host will not be found in the Base Station's list of locally visiting mobile hosts. If this Base Station has a ``forwarding pointer'' to the new Base Station (it is a Location Cache for the mobile host), the packet is tunneled by this (old) Base Station to the new Base Station by modifying the IP header and MHRP header to transform the packet into a new IP packet, addressed from the old Base Station (the Location Cache) to the new Base Station. The IP header and MHRP header in the packet are modified by the following steps: - The current IP source address from the IP header is appended to a list of previous IP source addresses for this packet, maintained in the MHRP header. - The IP source address in the IP header is replaced by the address of the old Base Station's interface through which it will transmit the packet. - The IP destination address in the IP header is set to the address of the new Base Station. Johnson [Page 11] Internet Draft Routing for IP Mobile Hosts 11 July 1993 The packet is then forwarded to the new Base Station, and again uses only normal IP routing for delivery to the new Base Station. If, instead, the old Base Station has no ``forwarding pointer'' to the new Base Station (it is not a Location Cache for the mobile host, either because the new address was not cached when the mobile host moved, or because that cache entry in the Base Station has subsequently been reused for some other mobile host), the packet is tunneled instead by the old Base Station to mobile host's home IP address, where it will be intercepted by the mobile host's Location Server. The old Base Station modifies the IP header and MHRP header by the following steps: - The current IP source address from the IP header is appended to a list of previous IP source addresses for this packet, maintained in the MHRP header. - The IP source address in the IP header is replaced by the address of the old Base Station's interface through which it will transmit the packet. - The IP destination address in the IP header is set to the IP address of the mobile host, obtained from the MHRP header. The packet uses normal IP routing to reach the mobile host's home network, and is then intercepted by the mobile host's Location Server in the same way as other packets transmitted on the home network to the mobile host, as described in Section 3.1. 3.4. Location Cache Consistency Maintenance The list of previous IP source addresses for a packet maintained in the packet's MHRP header is used primarily to update any out-of-date Location Caches that were used in routing the packet. When the packet reaches the correct Base Station (a Base Station for which the mobile host's IP address is found in the Base Station's list of locally visiting mobile hosts), the IP header and MHRP header contain the following addresses: - The IP destination address in the IP header is the address of this Base Station. - The IP source address in the IP header is the address of the last Location Cache (or the Location Server) used in routing the packet to that Base Station. This Location Johnson [Page 12] Internet Draft Routing for IP Mobile Hosts 11 July 1993 Cache points directly to the correct Base Station and is not out-of-date. - If the list of previous IP source addresses for this packet in the MHRP header is empty, then the IP source address in the IP header is the address of the original host that sent the packet. Otherwise, the source address in the IP header is the address of the most recent Location Cache (or the Location Server) that tunneled the packet to this Base Station; the IP address of the original sender of the packet is the first address in the list in the MHRP header. - Each address in the list of previous IP source addresses for this packet in the packet's MHRP header is the address of an out-of-date Location Cache for this mobile host. Each of these Location Caches tunneled the packet to a Base Station that turned out instead to be a ``forwarding pointer'' Location Cache to a new Base Station to which the mobile host had moved after being connected to this Base Station. This Base Station sends an ICMP mobile host redirect message to each address in the list of previous IP source addresses in the MHRP header, causing each of them to update their Location Cache to point to this Base Station. Likewise, if the packet is tunneled to the Location Server, because the old Base Station did not have a ``forwarding pointer'' cached for the new Base Station, the IP header and MHRP header will contain the following addresses: - The IP destination address in the IP header is the mobile host's IP address. - The IP source address in the IP header is the address of the old Base Station that tunneled this packet to the Location Server. - The first address in the list of previous IP source addresses for this packet in the packet's MHRP header is the the address of the original host that sent the packet. (The list cannot be empty in this case.) - Any other addresses in the list in the MHRP header are each the address of an out-of-date Location Cache for this mobile host. Johnson [Page 13] Internet Draft Routing for IP Mobile Hosts 11 July 1993 Once the packet is intercepted by the Location Server on the mobile host's home network, the Location Server sends an ICMP mobile host redirect message to each address in the list of previous IP source addresses in the MHRP header, causing each to update its Location Cache to point to the correct (new) Base Station, as recorded in the Location Server's database. The Location Server also sends an ICMP mobile host redirect message to the old Base Station that tunneled the packet to the Location Server (identified in the IP source address field in the IP header), allowing it to become a Location Cache for this mobile host so that any subsequent packets arriving for this mobile host can be tunneled directly to its correct new Base Station. 3.5. Base Station State Recovery If a Base Station ``forgets'' about a locally visiting mobile host, such as may happen when the Base Station reboots, the mobile host will not be found in its list of locally visiting mobile hosts when a packet arrives for the host. In this case, the Base Station will tunnel the packet to the Location Server, as described in Section 3.4. The Location Server then sends an ICMP mobile host redirect message to each address in the list of previous IP source addresses present in the packet's MHRP header, as well as to the current IP source address in the packet's IP header. Each of these addresses identifies a host or router that has already handled this packet in routing it to the mobile host. The Location Server compares these addresses to the current Base Station address for the mobile host, as recorded in the Location Server's database. If a match is found in this comparison, the Location Server discards the original packet, and the Base Station will receive an ICMP mobile host redirect for this mobile host, identifying itself as the current Base Station for the mobile host. The Base Station could then simply add the mobile host back to its list of locally visiting mobile hosts, believing the Location Server. Alternatively, the Base Station could send a ``query'' message onto its local network to verify that the mobile host is actually connected to its network. For example, an ARP query message [2] could be used to elicit a reply from the mobile host indicating its presence. Any protocol by which a Base Station initially advertises itself to mobile hosts within range of its transmitter might also be useful in reestablishing connection to a ``forgotten'' mobile host, but such a Base Station advertisement protocol is beyond the scope of this document. To speed the state recovery of a Base Station after it reboots, the Base Station could also broadcast over its local network a query for all mobile hosts to initiate reconnection to it. Since such a Johnson [Page 14] Internet Draft Routing for IP Mobile Hosts 11 July 1993 broadcast cannot in general be guaranteed to reliably reach all locally visiting mobile hosts, the procedure described above based on the ICMP mobile host redirect message and the list of previous IP source addresses in a packet's MHRP header is also necessary. 3.6. Robustness Against Routing Loops No routing loops can be created by a correct implementation of this protocol. However, in a system as large as the Internet, with many independent interoperating implementations of each protocol, some incorrect implementation could accidentally create a loop of Location Caches. Such a loop would cause an arriving packet to be forwarded continuously around this loop until its IP ``time-to-live'' expired, creating considerable congestion in the portion of the Internet involved in the loop. The list of previous IP source addresses for a packet maintained in the packet's MHRP header may be used to easily detect any such loop that may be formed. When initiating the tunneling of a packet, the previous address in the IP source address field of the IP header is copied into the list in the packet's MHRP header, before being replaced in the IP header with the IP address of the host or router forwarding the packet. If the IP address of this system is also present in the list in the packet's MHRP header, then a forwarding loop exists involving the systems identified in the list in the MHRP header; one pass around the loop has just been completed with the return of the packet to this system. Any such loop detected can also easily be corrected using the list in the MHRP header. When a loop is detected by some system, that system sends an ICMP mobile host redirect message to each address in the list, causing each of these Location Caches to delete its cache entry for this mobile host. This, in effect, dissolves the loop. The original packet may then be discarded, or may be tunneled to the mobile host's IP address, where it will be intercepted by the mobile host's Location Server, as described in Section 3.3. 4. Message Formats The mobile IP protocol specified in this document defines a new IP protocol called the Mobile Host Routing Protocol (MHRP). MHRP messages are used to tunnel a packet to the Base Station or Location Server of a mobile host, and for various control functions supporting mobile IP routing. One new ICMP message type (the mobile host redirect) is also used by the protocol. This section describes the format of these messages and the meaning of the fields contained in them. Johnson [Page 15] Internet Draft Routing for IP Mobile Hosts 11 July 1993 4.1. MHRP Data Message 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Count | Orig Protocol | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IP Address of Mobile Host | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | List of Previous IP Source Addresses for This Packet | | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IP Fields: Source Address An IP address belonging to Location Cache, Location Server, or Base Station most recently initiating the tunneling of the packet with MHRP. Destination Address The IP address to which the packet is being tunneled. This is normally the Base Station address for the mobile host. The Destination Address field may also be set to the IP address of the mobile host itself, in which case the packet is tunneled to that mobile host's Location Server, since the packet will be intercepted by this Location Server once the packet reaches the mobile host's home network. Protocol MHRP = ??? MHRP Fields: Johnson [Page 16] Internet Draft Routing for IP Mobile Hosts 11 July 1993 Count Number of previous IP source addresses present in the list at the end of the MHRP header. If the Count is zero, the original sending host was a Location Cache for the destination mobile host and built the MHRP header itself; the IP address of the sending host is still in the source address in the IP header. If the Count is greater than zero, the first IP address in the list is the address of the original sending host. The value 0xFFFF is reserved and indicates instead an MHRP control message. Orig Protocol The original protocol number from the IP header. When the MHRP header is built, the original protocol number is copied into this field in the new MHRP header, and is replaced in the IP header with the protocol number indicating MHRP. Checksum The 16-bit one's complement of the one's complement sum of the MHRP header. For computing the checksum, the Checksum field is set to 0. IP Address of Mobile Host The IP address of the destination mobile host. When the MHRP header is built, the original destination address from the IP header (the mobile host) is copied into this field in the new MHRP header, and is replaced in the IP header with IP address of the Base Station to which the packet is being tunneled. List of Previous IP Source Addresses for This Packet A list containing each IP address that previously was used as the source address of this packet in the IP header. Johnson [Page 17] Internet Draft Routing for IP Mobile Hosts 11 July 1993 4.2. MHRP Mobile Host Movement Message 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0xFFFF | Type | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IP Address of Mobile Host | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IP Address of Base Station | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IP Fields: Destination Address The IP address of either the Location Server for this mobile host, the old Base Station for this mobile host, or the new Base Station for this mobile host. A separate message is sent for each notification. Protocol MHRP = ??? MHRP Fields: Type 1 = Notification 2 = Acknowledgement Checksum The 16-bit one's complement of the one's complement sum of the MHRP header. For computing the checksum, the Checksum field is set to 0. IP Address of mobile host The IP address of the new mobile host for which this movement message applies. Johnson [Page 18] Internet Draft Routing for IP Mobile Hosts 11 July 1993 IP Address of Base Station The IP address of the new Base Station for this mobile host. Sequence Number Used to detect delayed duplicates of MHRP mobile host movement Notification messages, so as to avoid Notification messages being applied out of order. Also used to match Acknowledgement messages with Notification messages. Johnson [Page 19] Internet Draft Routing for IP Mobile Hosts 11 July 1993 4.3. ICMP Mobile Host Redirect Message 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Base Station IP Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Internet Header + 64 Bits of Original Datagram Data | | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ IP Fields: Source Address An IP address belonging to the interface from which this message is sent. Destination Address The Source Address of the original packet. Protocol ICMP = 1 ICMP Fields: Type ??? Code 0 Checksum The 16-bit one's complement of the one's complement sum of the ICMP message, starting with the ICMP Type field. For computing the checksum, the Checksum field is set to 0. Johnson [Page 20] Internet Draft Routing for IP Mobile Hosts 11 July 1993 Base Station IP Address Address of the Base Station to which traffic for the mobile host specified in the IP Destination Address field of the original packet should be sent. Internet Header + 64 bits of Original Datagram Data The IP header and at least the first 64 bits of the original datagram data. Johnson [Page 21] Internet Draft Routing for IP Mobile Hosts 11 July 1993 5. Conclusion This document has specified a protocol for transparently routing IP packets to mobile hosts operating in the Internet. A mobile host may move from one network to another at any time, while always using only its ``home'' IP address. By always using the home IP address for a mobile host, the current location of a mobile host -- and even the fact that the host is mobile -- remains transparent above the IP level. Any host may be configured to be a ``mobile host'' by simply running the appropriate software on it. There is no penalty for this configuration, since the protocol automatically uses only the standard IP routing mechanisms, adding no overhead to IP, when a mobile host is currently connected to its home network. References [1] R. T. Braden, editor. Requirements for Internet Hosts--- Communication Layers. RFC 1122, USC Information Sciences Institute, October, 1989. [2] David C. Plummer. An Ethernet Address Resolution Protocol: Or Converting Network Protocol Addresses to 48.bit Ethernet Addresses for Transmission on Ethernet Hardware. RFC 826, Massachusetts Institute of Technology, November, 1982. [3] J. B. Postel, editor. Internet Protocol. RFC 791, USC Information Sciences Institute, September, 1981. [4] J. B. Postel, editor. Internet Control Message Protocol. RFC 792, USC Information Sciences Institute, September, 1981. [5] J. B. Postel. Multi-LAN Address Resolution. RFC 925, USC Information Sciences Institute, October, 1984. [6] J. K. Reynolds and J. B. Postel. Assigned Numbers. RFC 1340, USC Information Sciences Institute, July, 1992. Security Considerations Security issues are not discussed in this memo. Johnson [Page 22] Internet Draft Routing for IP Mobile Hosts 11 July 1993 Author's Address David B. Johnson School of Computer Science Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213-3891 Phone: (412) 268-7399 EMail: dbj@cs.cmu.edu Johnson [Page 23] Internet Draft Routing for IP Mobile Hosts 11 July 1993 Table of Contents Abstract 1 Status of this Memo 1 1. Introduction 2 2. Overview 3 3. Protocol Description 6 3.1. Moving a Mobile Host 6 3.2. Locating a Mobile Host 8 3.3. Routing to a Mobile Host 10 3.4. Location Cache Consistency Maintenance 12 3.5. Base Station State Recovery 14 3.6. Robustness Against Routing Loops 15 4. Message Formats 15 4.1. MHRP Data Message 16 4.2. MHRP Mobile Host Movement Message 18 4.3. ICMP Mobile Host Redirect Message 20 5. Conclusion 22 References 22 Security Considerations 22 Author's Address 23 Johnson [Page i]