Internet Engineering Task Force C. Perkins, editor INTERNET DRAFT IBM 21 December 1995 IP Mobility Support draft-ietf-mobileip-protocol-14.txt Status of This Memo This document is a submission by the Mobile-IP Working Group of the Internet Engineering Task Force (IETF). Comments should be submitted to the mobile-ip@tadpole.com mailing list. Distribution of this memo is unlimited. 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 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.'' To learn the current status of any Internet-Draft, please check the ``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast). Abstract This document specifies protocol enhancements that allow transparent routing of IP datagrams to mobile nodes in the Internet. Each mobile node is always identified by its home address, regardless of its current point of attachment to the Internet. While situated away from its home, a mobile node is also associated with a care-of address, which provides information about its current point of attachment to the Internet. The protocol provides for registering the care-of address with a home agent. The home agent sends packets destined for the mobile node through a tunnel to the care-of address. After arriving at the end of the tunnel, the packets are then delivered to the mobile node. Perkins, editor Expires 21 June 1996 [Page i] Internet Draft IP Mobility Support 21 December 1995 Contents Status of This Memo i Abstract i 1. Introduction 1 1.1. Protocol Requirements . . . . . . . . . . . . . . . . . . 1 1.2. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3. Assumptions . . . . . . . . . . . . . . . . . . . . . . . 2 1.4. Applicability . . . . . . . . . . . . . . . . . . . . . . 2 1.5. New Architectural Entities . . . . . . . . . . . . . . . 3 1.6. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.7. Protocol Overview . . . . . . . . . . . . . . . . . . . . 5 1.8. Specification Language . . . . . . . . . . . . . . . . . 9 1.9. Message Format and Protocol Extensibility . . . . . . . . 9 2. Agent Discovery 12 2.1. Agent Advertisement . . . . . . . . . . . . . . . . . . . 12 2.1.1. Mobile Service Extension . . . . . . . . . . . . 14 2.1.2. Prefix-Lengths Extension . . . . . . . . . . . . 15 2.1.3. One-byte Padding Extension . . . . . . . . . . . 16 2.2. Agent Solicitation . . . . . . . . . . . . . . . . . . . 17 2.3. Foreign/Home Agent Considerations . . . . . . . . . . . . 17 2.3.1. Advertised Router Addresses . . . . . . . . . . . 18 2.3.2. Sequence Numbers, and Rollover Handling . . . . . 18 2.4. Mobile Node Considerations . . . . . . . . . . . . . . . 18 2.4.1. Registration Required . . . . . . . . . . . . . . 19 2.4.2. Move Detection . . . . . . . . . . . . . . . . . 19 2.4.3. Returning Home . . . . . . . . . . . . . . . . . 20 2.4.4. Sequence Numbers, and Rollover Handling . . . . . 20 3. Registration 21 3.1. Registration Overview . . . . . . . . . . . . . . . . . . 21 3.2. Authentication . . . . . . . . . . . . . . . . . . . . . 22 3.3. Registration Request . . . . . . . . . . . . . . . . . . 22 3.4. Registration Reply . . . . . . . . . . . . . . . . . . . 24 3.5. Registration Extensions . . . . . . . . . . . . . . . . . 27 3.5.1. Mobile-Home Authentication Extension . . . . . . 27 3.5.2. Mobile-Foreign Authentication Extension . . . . . 28 3.5.3. Foreign-Home Authentication Extension . . . . . . 28 3.6. Mobile Node Considerations . . . . . . . . . . . . . . . 29 3.6.1. Sending Registration Requests . . . . . . . . . . 30 3.6.2. Receiving Registration Replies . . . . . . . . . 33 Perkins, editor Expires 21 June 1996 [Page ii] Internet Draft IP Mobility Support 21 December 1995 3.6.3. Registration Retransmission . . . . . . . . . . . 35 3.7. Foreign Agent Considerations . . . . . . . . . . . . . . 36 3.7.1. Configuration and Registration Tables . . . . . . 36 3.7.2. Receiving Registration Requests . . . . . . . . . 37 3.7.3. Receiving Registration Replies . . . . . . . . . 39 3.8. Home Agent Considerations . . . . . . . . . . . . . . . . 40 3.8.1. Configuration and Registration Tables . . . . . . 40 3.8.2. Receiving Registration Requests . . . . . . . . . 41 3.8.3. Sending Registration Replies . . . . . . . . . . 44 4. Routing Considerations 46 4.1. Encapsulation Types . . . . . . . . . . . . . . . . . . . 46 4.2. Unicast Packet Routing . . . . . . . . . . . . . . . . . 46 4.2.1. Mobile Node Considerations . . . . . . . . . . . 46 4.2.2. Foreign Agent Considerations . . . . . . . . . . 47 4.2.3. Home Agent Considerations . . . . . . . . . . . . 48 4.3. Broadcast packets . . . . . . . . . . . . . . . . . . . . 48 4.4. Multicast Packet Routing . . . . . . . . . . . . . . . . 49 4.5. Mobile Routers . . . . . . . . . . . . . . . . . . . . . 50 4.6. ARP, Proxy ARP, and Gratuitous ARP . . . . . . . . . . . 51 5. Security Considerations 55 5.1. Message Authentication Codes . . . . . . . . . . . . . . 55 5.2. Areas of security concern in this protocol . . . . . . . 55 5.3. Key management . . . . . . . . . . . . . . . . . . . . . 55 5.4. Picking good random numbers . . . . . . . . . . . . . . . 56 5.5. Privacy . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.6. Replay Protection for Registration Requests . . . . . . . 56 5.6.1. Replay Protection using Timestamps . . . . . . . 57 5.6.2. Replay Protection using Nonces . . . . . . . . . 58 6. Acknowledgments 58 A. Patent Issues 59 A.1. IBM Patent #5,159,592 . . . . . . . . . . . . . . . . . . 60 A.2. IBM Patent #5,148,479 . . . . . . . . . . . . . . . . . . 60 B. Link-Layer considerations 61 B.1. Point-to-Point Link-Layers . . . . . . . . . . . . . . . 61 B.2. Multi-Point Link-Layers . . . . . . . . . . . . . . . . . 61 C. TCP Considerations 61 C.1. TCP Timers . . . . . . . . . . . . . . . . . . . . . . . 61 C.2. TCP Congestion Management . . . . . . . . . . . . . . . . 62 D. Example Scenarios 63 D.1. Registering with a Foreign Agent's Care-of Address . . . 63 D.2. Registering with a Dynamic Care-of Address . . . . . . . 63 Perkins, editor Expires 21 June 1996 [Page iii] Internet Draft IP Mobility Support 21 December 1995 D.3. Deregistration . . . . . . . . . . . . . . . . . . . . . 64 E. Applicability of Prefix Lengths Extension 65 Chair's Address 68 Editor's Address 68 Perkins, editor Expires 21 June 1996 [Page iv] Internet Draft IP Mobility Support 21 December 1995 1. Introduction IP version 4, like its predecessors, assumes that a node's IP address uniquely identifies the node's point of attachment to the Internet. Therefore, a node must be located on the network indicated by its IP address in order to receive packets destined to it; otherwise, packets destined to the node would be undeliverable. For a node to change its point of attachment without losing its ability to communicate, currently one of the two following mechanisms must typically be employed: a) the node must change its IP address whenever it changes its point of attachment, or b) host-specific routes must be propagated throughout much of the Internet routing fabric. Both of these alternatives are often unacceptable. The first makes it impossible for a node to maintain transport and higher-layer connections when the node changes location. The second has obvious and severe scaling problems, especially relevant considering the explosive growth in sales of notebook computers. A new, scalable, mechanism is evidently required to accommodate node mobility within the Internet. This document defines such a mechanism and enables nodes to change their point of attachment to the Internet without changing their IP address. 1.1. Protocol Requirements Implementation of the protocol described in this document shall allow a mobile node to communicate with other nodes after changing its point of physical attachment to the Internet, yet without changing its IP address. Implementation of the protocol described in this document shall allow a mobile node to communicate with other nodes that do not implement these mobility functions. No protocol enhancements are required in hosts or routers that are not providing any of the mobility functions. Messages used by this protocol which exchange location information must be authenticated in order to protect against remote redirection attacks. Perkins, editor Expires 21 June 1996 [Page 1] Internet Draft IP Mobility Support 21 December 1995 1.2. Goals The link by which the mobile node is directly attached to the Internet is likely to be bandwidth limited, and experience a higher rate of errors than traditional wired networks. Moreover, mobile nodes are more likely to be battery powered, and minimizing power consumption is important. Therefore, only a few administrative messages should be sent between a mobile node and an agent, and the size of these messages should be kept as short as is reasonably possible. 1.3. Assumptions The protocols defined in this document place no additional constraints on assignment of IP addresses. That is, a mobile node can be assigned an IP address by the organization that owns the machine, and will be able to use that IP address regardless of the current point of attachment. It is assumed that mobile nodes will not change their point of attachment to the Internet more frequently than once per second. It is assumed that IP unicast datagrams are routed based on the destination address in the datagram header (i.e., not by source address). 1.4. Applicability Mobile IP is intended to solve node mobility across changes in IP subnet. It is just as suitable for mobility across homogeneous media as it is for mobility across heterogeneous media. That is, Mobile IP facilitates node movement from one Ethernet segment to another as well as it accommodates node movement from an Ethernet segment to a wireless LAN, as long as the mobile node's IP address remains the same after such a movement. One can think of Mobile IP as solving the "macro" mobility management problem. It is less well suited for more "micro" mobility management applications -- for example, handoff amongst wireless transceivers, each of which covers only a very small geographic area. In this later situation, link-layer mechanisms for link maintenance (i.e. link-layer handoff) may offer faster convergence and far less overhead than Mobile IP. Perkins, editor Expires 21 June 1996 [Page 2] Internet Draft IP Mobility Support 21 December 1995 1.5. New Architectural Entities Mobile IP introduces these new functional entities: Mobile Node A host or router that changes its point of attachment from one network or subnetwork to another. A mobile node may change its location without losing connectivity and without changing its IP address. Home Agent A router on a mobile node's home network which tunnels packets for delivery to the mobile node when it is away from home, and maintains current location information for the mobile node. Foreign Agent A router on a mobile node's visited network which provides routing services to the mobile node when it registers. The foreign agent detunnels and delivers packets to the mobile node that were tunneled by the mobile node's home agent. In the reverse direction, the foreign agent may serve as a default router for registered mobile node. A mobile node is given a long-term IP address on a home network. This home address is administered in much the same way as "permanent" IP addresses are provided to stationary hosts. When away from its home network, the "care-of address" associated with the mobile node reflects the mobile node's current point of attachment. The mobile node creates new network connections with existing Internet hosts using its home address. 1.6. Terminology This document frequently uses the following terms: Agent Advertisement A periodic advertisement constructed by attaching a special extension to a router advertisement [7] message. Care-of Address The care-of address is the termination point of a tunnel toward a mobile node that is away from its home network. Depending Perkins, editor Expires 21 June 1996 [Page 3] Internet Draft IP Mobility Support 21 December 1995 on the configuration, the care-of address can be either an address of a foreign agent or a temporary address acquired by the mobile node. Correspondent A peer with which a mobile node is communicating. The correspondent may be either mobile or stationary. Foreign Network Any network other than the mobile node's Home Network. Home Address An IP address that is assigned for an extended period of time to a mobile node. It remains unchanged regardless of where the node is attached to the Internet. Home Network A network, possibly virtual, having a network prefix matching that of a mobile node's home address. Note that standard IP routing mechanisms will deliver packets destined to a mobile node's Home Address to the mobile node's Home Network. Link A facility or medium over which nodes can communicate at the link layer. A link underlies the network layer. Link-Layer Address The address used to identify the endpoints of the communication over a physical link. Typically, the Link-Layer address is an interface's Media Access Control (MAC) address. Mobility Agent Either a home agent or a foreign agent. Mobility Binding The association of a home address with a care-of address, along with the remaining lifetime of that association. Perkins, editor Expires 21 June 1996 [Page 4] Internet Draft IP Mobility Support 21 December 1995 Mobility Security Association The mobility security association between a pair of nodes is a collection of security contexts which may be applied to Mobile IP protocol messages exchanged by them. Each context indicates an authentication algorithm and mode (subsection 5.1), a secret (a shared key, or appropriate public/private key pair), and a style of replay protection in use (subsection 5.6). Node A host or a router. Nonce A random value, different from previous choices, inserted in a packet to protect against replays. Security Parameter Index (SPI) The SPI indicates the security context between a pair of nodes among those available in the Mobility Security Association. A value of zero is reserved and MUST NOT be used in any Mobility Security Association. Tunnel The path followed by a packet while it is encapsulated. The model is that, while it is encapsulated, a packet is routed to a knowledgeable decapsulating agent, which decapsulates the packet and then correctly delivers it to its ultimate destination. Visited Network A network other than a mobile node's Home Network to which the mobile node is currently connected. Visitor List The list of mobile nodes visiting a foreign agent. 1.7. Protocol Overview The following support services are defined for Mobile IP: Perkins, editor Expires 21 June 1996 [Page 5] Internet Draft IP Mobility Support 21 December 1995 Agent Discovery Home agents and foreign agents may advertise their availability on each link for which they provide service. A newly arrived mobile node can send a solicitation on the link to learn if any prospective agents are present. Registration When the mobile node is away from home, it registers its care-of address with its home agent. Depending on its method of attachment, the mobile node will register either directly with its home agent, or through a foreign agent which forwards the registration to the home agent. The following is a rough outline of the mobile-IP protocol: - Foreign agents and home agents advertise their presence via Agent Advertisements (see section 2). - A mobile node receives these advertisements and determines whether it is on its home network or a foreign network. - When the mobile node detects that it is located on its home network, it operates without mobility services. - When a mobile node detects that it has moved to a foreign network, it obtains a care-of address on the foreign network. The care-of address can either be determined from a foreign agent's advertisements, or by some assignment mechanism (for example, DHCP [8]). - The mobile node then registers its new care-of address with its home agent, possibly via a foreign agent (see section 3). - Packets sent to the mobile node's Home Address are received by the home agent, tunneled by the home agent to the care-of address, received at the tunnel endpoint (either at a foreign agent or at the mobile node itself), and finally delivered to the mobile node (see subsection 4.2.3). - In the reverse direction, packets originated by the mobile node are typically delivered to their destination using standard IP routing mechanisms, not necessarily passing through the home agent. When away from home, Mobile IP uses protocol tunneling to hide a mobile node's home address from intervening routers between its home Perkins, editor Expires 21 June 1996 [Page 6] Internet Draft IP Mobility Support 21 December 1995 network and its current location. The tunnel terminates at the mobile node's care-of address -- an address to which packets can be delivered via conventional IP routing. At the care-of address, the original packet is removed from the tunnel and delivered to the mobile node. Mobile IP provides two distinct modes for the acquisition of a care-of address: a) A care-of address may be provided by a foreign agent. This mode is preferred because it allows many mobile nodes to share the same care-of address and therefore does not place unnecessary demands on the already limited IPv4 address space. In this mode, the foreign agent is the endpoint of the tunnel and, upon receiving tunneled packets from the mobile node's home agent, decapsulates them and delivers the inner packet to the mobile node. b) A care-of address may be acquired by, and/or owned by, a mobile node when visiting a foreign network. The method by which it obtains such an address is beyond the scope of this document (but see, for example, DHCP [8]). With its own care-of address, the mobile node itself performs decapsulation of the packets tunneled by its home agent. The latter mode has the advantage that it allows a mobile node to function without a foreign agent, for example, in installations that have not yet deployed Mobile IP. It does, however, place additional burden on the IPv4 address space because it requires a pool of addresses to be made available to visiting mobile nodes. It is difficult to efficiently maintain pools of addresses for each subnet which may permit mobile nodes to visit. It is important to understand the distinction between the care-of address and the foreign agent functions. The care-of address is simply the endpoint of the tunnel. It might indeed be an address of a foreign agent, but it also might be an address temporarily acquired by the mobile node. On the other hand, a foreign agent is a mobility agent that provides services to mobile nodes. See subsections 3.7 and 4.2.2 for additional details. A home agent MUST be able to attract and intercept packets that are destined to the home address of any of its registered mobile nodes. Using the proxy and gratuitous ARP mechanisms described in section 4.6, this requirement can be satisfied if the home agent has a network interface on the link indicated by the mobile node's home address. Other placements of the home agent relative to the mobile node's home location MAY also be possible using other mechanisms for Perkins, editor Expires 21 June 1996 [Page 7] Internet Draft IP Mobility Support 21 December 1995 intercepting datagrams destined to the mobile node's home address. Such placements are beyond the scope of this document. Similarly, a mobile node and a prospective or current foreign agent MUST be able to exchange packets without relying on standard IP routing mechanisms; that is, those mechanisms which make forwarding decisions based upon the network-prefix of the destination address in the IP header. This requirement can be satisfied if the foreign agent and the mobile node have an interface on the same link. In this case, the mobile node and foreign agent simply bypass their normal IP routing mechanism when sending packets to each other, addressing the underlying link-layer frames to their respective link-layer addresses. Other placements of the foreign agent relative to the mobile node MAY also be possible using other mechanisms to exchange packets between these nodes. Such placements are beyond the scope of this document. If a mobile node owns its own care-of address (as described in (b) above), the mobile node MUST be located on the link identified by the network prefix of this care-of address. Otherwise, packets destined to the care-of address will be undeliverable. ..................................................................... : : : 2) packet is received 3) packet is : : by home agent and detunneled : : is tunneled to the and delivered : : care-of address to mobile node : : : : +-----+ +-------+ +------+ : : |home | =======> |foreign| ------> |mobile| : : |agent| | agent | <------ | node | : : +-----+ +-------+ +------+ : : 1) packet to /|\ / : : mobile node | / 4) In the opposite direction, : : arrives on | / standard IP routing delivers : : home network | / the packet to its destination. : : via standard | |_ In this figure, the foreign : : IP routing. +----+ agent is the mobile node's : : |host| default router. : : +----+ : : : : Figure 1: Packet Delivery for Mobile Nodes Away from Home : :...................................................................: Figure one illustrates packet routing to/from a mobile node away from home, once the mobile node has registered with its home agent. Shown Perkins, editor Expires 21 June 1996 [Page 8] Internet Draft IP Mobility Support 21 December 1995 is the mode in which the care-of address is provided by a foreign agent. 1.8. Specification Language In this document, several words are used to signify the requirements of the specification. These words are often capitalized. MUST This word, or the adjective "required", means that the definition is an absolute requirement of the specification. MUST NOT This phrase means that the definition is an absolute prohibition of the specification. SHOULD This word, or the adjective "recommended", means that there may exist valid reasons in particular circumstances to ignore this item, but the full implications must be understood and carefully weighed before choosing a different course. Unexpected results may result otherwise. MAY This word, or the adjective "optional", means that this item is one of an allowed set of alternatives. An implementation which does not include this option MUST be prepared to interoperate with another implementation which does include the option. silently discard The implementation discards the packet without further processing, and without indicating an error to the sender. The implementation SHOULD provide the capability of logging the error, including the contents of the discarded packet, and SHOULD record the event in a statistics counter. 1.9. Message Format and Protocol Extensibility Each message in Mobile IP begins with a short fixed part, followed by one or more extensions in Type-Length-Value format, with one exception. That exception is the One-Byte Padding Extension which has only a Type but no Length and no Data fields. Perkins, editor Expires 21 June 1996 [Page 9] Internet Draft IP Mobility Support 21 December 1995 There are two separately maintained sets of numbering spaces from which extension Type values are allocated. The first set defines those extensions which may only appear in ICMP Router Advertisement messages. The second set defines those extensions which may only appear in Mobile IP messages (those sent to and from UDP port number 434). Each individual extension is described in detail within the section of this document that is applicable. Due to the separation (orthogonality) of these sets, it is conceivable that two extensions that are defined at a later date could have identical Type values, so long as one of the extensions applies to ICMP Router Advertisement and the other applies to Mobile IP registration. When an extension numbered in either of these sets within the range 0-127 is encountered but not recognized, the packet containing the extension must be dropped. When an extension numbered in the range 128-255 is encountered which is not recognized, that particular extension is ignored, but the rest of the extensions and packet data can still be processed. The Length field of the extension is used to skip the Data field in searching for the next extension. Below is the list of extensions that are currently defined within each respective set. Up-to-date values for extensions to ICMP Router Advertisement and to Mobile IP messages are specified in the most recent "Assigned Numbers" [21]. 0 1 2 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- | Type | Length | Data ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Perkins, editor Expires 21 June 1996 [Page 10] Internet Draft IP Mobility Support 21 December 1995 Type The following extension Type values are allocated from the set of extensions to ICMP Router Advertisement: 0 One-byte Padding (has no Length nor Data field) 16 Mobile Service 19 Prefix-Lengths The following extension Type values are allocated from the set of extensions to Mobile IP messages (e.g. registration): 32 Mobile-Home Authentication 33 Mobile-Foreign Authentication 34 Foreign-Home Authentication All other values in these respective sets are currently undefined (see [21] for the most up-to-date lists). Length Indicates the length (in bytes) of the data field. The length does not include the Type and Length bytes. Data This field is zero or more bytes in length and contains the value(s) for this extension. The format and length of the data field is determined by the type and length fields. Extensions allow variable amounts of information to be carried within each datagram. The end of the list of extensions is indicated by the total length of the IP datagram. Perkins, editor Expires 21 June 1996 [Page 11] Internet Draft IP Mobility Support 21 December 1995 2. Agent Discovery Agent Discovery is the method by which a mobile node determines whether it is currently connected to its home network or a foreign network. When on a foreign network, the methods specified in this section allow the mobile node to determine the care-of address being offered by foreign agents on that network. Mobile IP extends ICMP Router Discovery [7] as its primary mechanism for Agent Discovery. An Agent Advertisement is formed by appending one or more of the extensions defined in this section to an ICMP Router Advertisement. An Agent Solicitation is identical to an ICMP Router Solicitation. This section describes the message formats and procedures by which mobile nodes, foreign agents, and home agents cooperate to realize Agent Discovery. Agent Advertisement and Agent Solicitation may not be necessary for link layers which already provide this functionality. The method by which mobile nodes establish link-layer connections with prospective agents is outside the scope of this document (but see Appendix B). The procedures described below assume that such link-layer connectivity has already been established. No authentication is required for Agent Advertisement and Agent Solicitation messages. They MAY be authenticated using the IP Authentication Header [2], which is external to the messages described here. Further specification of the way that advertisement and solicitation messages are authenticated is outside of the scope of this document. 2.1. Agent Advertisement Agent Advertisements are periodic transmissions sent by a mobility agent. Mobile nodes use these advertisements to determine their current point of attachment to the Internet. Agent advertisements, as specified in this document, are ICMP Router Advertisements that have been modified to carry the Mobile Service Extension and, optionally, the Prefix-Lengths Extension or future extensions that might be defined. The following fields within the ICMP Router Advertisement portion of the Agent Advertisement are further refined as follows: - Link Layer Fields Perkins, editor Expires 21 June 1996 [Page 12] Internet Draft IP Mobility Support 21 December 1995 Destination Address The link-layer destination address of a unicast Agent Advertisement MUST be the same as the source link-layer address of the Agent Solicitation which prompted the Advertisement. - IP Fields TTL The TTL for Agent Advertisements MUST be set to 1. Destination Address As per RFC1256 [7], the IP destination address of an Agent Advertisement MUST be either the "all systems on this link" multicast address (224.0.0.1) [6] or the "Limited broadcast" address (255.255.255.255). This is because subnet-directed broadcast addresses of the form .<-1> are generally useless to mobile nodes that are visiting foreign networks. Such mobile nodes will have a different prefix than that of the advertising agents. - ICMP Fields Code The Code field of the agent advertisement is interpreted as follows: 0 The mobility agent handles common traffic -- that is, IP data packets not necessarily related to mobile nodes. 16 The mobility agent does not route common traffic. However, all foreign agents MUST (minimally) forward to a default router those packets received from a registered mobile node (see subsection 4.2.2). Lifetime The maximum length of time that the Advertisement is considered valid in the absence of further Advertisements. Perkins, editor Expires 21 June 1996 [Page 13] Internet Draft IP Mobility Support 21 December 1995 Router Addresses See subsection 2.3.1 for a discussion of the addresses that may appear in this portion of the Agent Advertisement. The nominal advertisement period as shown in the Lifetime field SHOULD be 1/3 of the advertisement Lifetime. This allows a mobile node to miss three successive advertisements before deleting the agent from its list of valid agents. The actual time of issuance of advertisements should be slightly randomized to avoid synchronization and subsequent collisions with other agent advertisements which may be present on the same medium. Note that this field has no relation whatsoever to the "Lifetime" field within the Mobile Service Extension defined below. The ICMP fields are immediately followed by the Mobile Service Extension defined in subsection 2.1.1. The Mobile Service Extension MAY optionally be followed by the Prefix-Lengths Extension (subsection 2.1.2), the One-byte Padding Extension (subsection 2.1.3), or future extensions which might be defined. 2.1.1. Mobile Service Extension The Mobile Service Extension immediately follows the ICMP Router Advertisement fields. It is used to indicate that an ICMP Router Advertisement message is actually an Agent Advertisement being sent by a mobility agent. The Mobile Service Extension is defined as follows: 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 | Length | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Lifetime |R|B|H|F|M|G|V| reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | zero or more Care-of Addresses | | ... | Type 16 Length (6 + 4*N), where N is the number of care-of addresses advertised. Sequence number The count of advertisement messages sent since the agent was initialized (see section 2.3.2). Perkins, editor Expires 21 June 1996 [Page 14] Internet Draft IP Mobility Support 21 December 1995 Lifetime The longest lifetime (measured in seconds) that the agent is willing to accept in any registration request. A value of all ones indicates infinity. This field has nothing whatsoever to do with the "Lifetime" field within the ICMP Router Advertisement portion of the Agent Advertisement described above. R Foreign agent registration required bit. B Busy bit. The foreign agent will not accept more registrations. Only valid if F=1. H Agent offers service as a home agent. F Agent offers service as a foreign agent. M Agent offers minimal encapsulation (see [16]). G Agent offers GRE encapsulation (see [10]). V Agent supports Van Jacobson header compression [11] reserved Sent as zero; ignored on reception. Care of Address A foreign agent's care-of address(es). An Agent Advertisement MUST include at least one care-of address if F=1. Any home agent MUST always be prepared to serve its mobile nodes. Thus, it is an error to have the 'B' bit set without also having the 'F' bit set, since only foreign agents are permitted to be too busy to service new requests. An agent MUST NOT send Agent Advertisements with neither the 'F' bit nor the 'H' bit set to one. When a foreign agent wishes to require registration even from those mobile nodes which have acquired local, temporary care-of addresses, it sets the 'R' bit to one. Because this applies only to foreign agents, an agent MUST NOT set the 'R' bit to one unless the 'F' bit is also set to one. 2.1.2. Prefix-Lengths Extension The Prefix-Lengths Extension MAY follow the Mobile Service Extension. It is used to indicate the number of bits of network prefix that applies to each address listed in the ICMP Router Advertisement Perkins, editor Expires 21 June 1996 [Page 15] Internet Draft IP Mobility Support 21 December 1995 portion of the Agent Advertisement. Note that the prefix lengths DO NOT apply to care-of address(es) listed in the Mobile Service Extension. The Prefix-Lengths Extension is defined as follows: 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 | Length | Prefix Length | .... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type 19 (Prefix-Lengths Extension) Length The length of this extension excluding the Type field and the Length field. This field MUST equal N, where N is the value of the "Num Addrs" field in the ICMP Router Advertisement portion of the Agent Advertisement. Prefix length(s) The number of leading bits which define the network number of the corresponding router address listed in the ICMP Router Advertisement portion of the message. See subsection 2.4.2 for information about how to use the Prefix Lengths extension when determining whether movement has occurred. See appendix E for implementation details about the use of this extension. 2.1.3. One-byte Padding Extension Some kernel implementations insist upon padding ICMP packets to an even number of bytes. If the ICMP length of an Agent Advertisement is odd, this extension MAY be included in order to make the ICMP length even. Note that this extension is NOT intended to be a general-purpose extension to be included in order to word or long-align the various fields of the Agent Advertisement. In fact, an Agent Advertisement SHOULD NOT include more than one One-byte Padding Extension and this extension SHOULD be the last extension present in an Agent Advertisement. NOTE the absence of both a "Length" field and a "Data" field in the One-byte Pad Extension. Perkins, editor Expires 21 June 1996 [Page 16] Internet Draft IP Mobility Support 21 December 1995 The One-byte Padding Extension is defined as follows: 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ | Type | +-+-+-+-+-+-+-+-+ Type 0 (One-byte Padding Extension) 2.2. Agent Solicitation An Agent Solicitation is identical to an ICMP Router Solicitation with the further restriction that the IP TTL Field MUST be set to 1. 2.3. Foreign/Home Agent Considerations Any mobility agent which is not indicated by a link-layer protocol MUST send Agent Advertisements. An agent which is indicated by a link-layer protocol SHOULD also implement Agent Advertisements. However, the advertisements need not be sent, except when the site policy requires registration with the agent (i.e. when the 'R' bit is set), or as a response to a specific solicitation. All mobility agents SHOULD respond to Agent Solicitations. The same procedures, defaults, and constants are used in agent advertisements as described in RFC 1256 [7], except that: - a mobility agent MUST limit the rate at which it sends broadcast or multicast agent advertisements; a recommended maximum rate is once per second, AND - a mobility agent that receives a Router Solicitation does not require that the IP Source Address is the address of a neighbor (i.e., an address that matches one of the router's own addresses on the arrival interface, under the subnet mask associated with that address.) The home agent for a given mobile node SHOULD be located on the link identified by the home address, if the home network is not merely a virtual network. In this case, the home agent MUST send out agent advertisements with the 'H' bit set, so that mobile nodes on their home network will be able to determine that they are indeed at home. On a particular subnet, either all mobility agents MUST include the Prefix-Lengths Extension or all of them MUST NOT include this extension. Equivalently, it is prohibited for some agents on a given Perkins, editor Expires 21 June 1996 [Page 17] Internet Draft IP Mobility Support 21 December 1995 subnet to include the extension but for others not to include it. Otherwise, one of the move detection algorithms designed for mobile nodes will not function properly (see subsection 2.4.2). 2.3.1. Advertised Router Addresses The ICMP Router Advertisement portion of the Agent Advertisement MAY contain one or more router addresses. Thus, an agent MAY include one of its own addresses in the advertisement. A foreign agent MAY discourage use of this address as a default router by setting the preference to a low value and by including the address of another router in the advertisement (with a correspondingly higher preference). A foreign agent MUST route packets it receives from registered mobile nodes (see subsection 4.2.2). 2.3.2. Sequence Numbers, and Rollover Handling The sequence number in Agent Advertisements ranges from 0 to 0xffff. After booting, an agent shall use the number 0 for its first advertisement. Each subsequent advertisement shall use the sequence number one greater, with the exception that the sequence number 0xffff shall be followed by sequence number 256. In this way, mobile nodes can distinguish reductions in sequence numbers that result from reboots, from reductions that result in rollover of the sequence number after it attains the value 0xffff. 2.4. Mobile Node Considerations Every mobile node MUST implement Agent Solicitation. Solicitations SHOULD only be sent in the absence of Agent Advertisements and when a care-of address has not been determined through a link-layer protocol or other means. The mobile node uses the same procedures, defaults, and constants for Agent Solicitation as described in RFC 1256 for router solicitation, except that the mobile node may solicit more often than once every three seconds and MAX_SOLICITATIONS does not apply for mobile nodes that are currently unconnected to any foreign agent. The rate at which a mobile node sends solicitations MUST be limited by the mobile node. The mobile node MAY send three initial solicitations at a maximum rate of one per second while searching for an agent. After this, the rate at which solicitations are sent MUST be reduced so as to limit the overhead on the local link. Subsequent solicitations MUST be sent using a binary exponential backoff mechanism, doubling the interval between consecutive solicitations, Perkins, editor Expires 21 June 1996 [Page 18] Internet Draft IP Mobility Support 21 December 1995 up to a maximum interval. The maximum interval SHOULD be chosen appropriately based upon the characteristics of the media over which the mobile node is soliciting. This maximum interval SHOULD be at least one minute between solicitations. While still searching for an agent, the mobile node MUST NOT increase the rate at which it sends solicitations unless it has received a positive indication that it has moved to a new link. After successfully registering with an agent, the mobile node MAY also increase the rate at which it will send solicitations when it next begins searching for a new agent with which to register. In both cases, the increased solicitation rate MAY revert to the maximum rate, but then MUST be limited in the manner described above. In all cases, the recommended solicitation intervals are nominal values. Mobile nodes MUST randomize their solicitation times around these nominal values as mandated by RFC 1256 [7]. Mobile nodes must process Agent Advertisements. Mobile nodes can distinguish Agent Advertisements from "standard" ICMP Router Advertisements by examining the number of advertised addresses and the IP Total Length field. When the IP total length indicates that the ICMP message is longer than needed for the number of advertised addresses, the remaining data is interpreted as one or more extensions. The presence of a Mobile Service Extension identifies the advertisement as an Agent Advertisement. When multiple methods of agent identification are in use, the mobile node SHOULD first attempt registration with agents including Mobile Service Extensions in their advertisements in preference to those sending link-layer advertisements. This order maximizes the likelihood that the registration will be recognized, thereby minimizing the number of registration attempts. 2.4.1. Registration Required When the mobile node receives an Agent Advertisement with the 'R' bit set to 1, the mobile node SHOULD register through the foreign agent, even when the mobile node might be able to acquire its own temporary care-of address. This feature allows sites to enforce visiting policies (such as accounting) which require exchanges of authorization. 2.4.2. Move Detection Two primary mechanisms are provided for mobile nodes to detect movement from one subnet to another. Other mechanisms MAY be used. Perkins, editor Expires 21 June 1996 [Page 19] Internet Draft IP Mobility Support 21 December 1995 When the mobile node detects that it has moved, it SHOULD register (see section 3) with a suitable care-of address on the new foreign network (but not too often -- see subsection 3.6.3). The first method of move detection is based upon the Lifetime field within the main body of the ICMP Router Advertisement portion of the Agent Advertisement. A mobile node SHOULD record the Lifetime received in any Agent Advertisements. If the mobile node fails to receive another advertisement from the same agent within the specified Lifetime, it SHOULD assume that it has lost contact with the agent and therefore it SHOULD attempt to discover and then register with other agents. The second method uses network prefixes. The Prefix-Lengths Extension MAY be used by mobile nodes to determine whether or not a newly received Agent Advertisement was received on the same subnet as the mobile node's current agent. If the prefixes differ, the mobile node assumes that it has moved. A mobile node SHOULD NOT use this method of move detection unless both the current agent and the new agent include the Prefix-Lengths Extension in their respective Agent Advertisements. If this extension is missing from one or both of the advertisements, this method of move detection SHOULD NOT be used. On the expiration of registration, a mobile node may choose to register with the care-of addresses received in the most recent agent advertisement. 2.4.3. Returning Home If the mobile node detects that it has moved to its home network, it MUST deregister with its home agent (see section 3). Before attempting to deregister, the mobile node SHOULD configure its routing table appropriately for its home network (see subsection 4.2.1). In addition, if the home network is using ARP [17], the mobile node MUST follow the procedures described in section 4.6 with regard to ARP, proxy ARP, and gratuitous ARP. 2.4.4. Sequence Numbers, and Rollover Handling If a mobile node detects two successive values of the sequence number in the advertisements from its foreign agent, the second of which is less than the first and inside the range 0 to 255, the mobile node MUST register again. If the second value is less than the first, but greater than or equal to 256, the mobile node may assume that the sequence number has rolled over past its maximum value (0xffff), and that there is no need to re-register (see subsection 2.3). Perkins, editor Expires 21 June 1996 [Page 20] Internet Draft IP Mobility Support 21 December 1995 3. Registration Mobile IP registration provides a flexible mechanism for mobile nodes to communicate their current reachability information to their home agent. It is the method by which mobile nodes: - request forwarding services when visiting a foreign network, - inform their home agent of their current care-of address, - renew a registration which is due to expire, and/or - deregister when they return home. Registration messages exchange information between a mobile node, (optionally) a foreign agent, and the home agent. Registration creates or modifies a mobility binding at the home agent, associating the mobile node's home address with its care-of address for the specified Lifetime. Several other (optional) capabilities are available through the registration procedure, which enable a mobile node to: - maintain multiple simultaneous registrations, wherein a copy of each datagram will be tunneled to each active care-of address - deregister specific care-of addresses while retaining other mobility bindings, and - discover the address of a home agent if the mobile node is not configured with this information. 3.1. Registration Overview If a mobile node has associated a care-of address to an interface on a link over which it has not received Agent Advertisements with the 'R' bit set, or if the mobile node is returning home, the mobile node registers or deregisters directly with a home agent by the exchange of only 2 messages: a) The mobile node sends a registration request to a home agent, asking it to provide service. b) The home agent sends a registration reply to the mobile node, granting or denying service. If a mobile node is using a care-of address offered by a foreign agent, the mobile node MUST register via that foreign agent. Even if a mobile node has associated a care-of address with one of its own interfaces on a link over which it receives Agent Advertisements Perkins, editor Expires 21 June 1996 [Page 21] Internet Draft IP Mobility Support 21 December 1995 with the 'R' bit set, the mobile node SHOULD register via one of the foreign agents on that link. In these cases, the foreign agent acts as a relay between the mobile node and the home agent. This extended registration process requires 4 messages: a) The mobile node sends a registration request to the prospective foreign agent to begin the registration process. b) The foreign agent relays the request to the home agent, asking the home agent to register the mobile node at the foreign agent's care-of address. c) The home agent sends a registration reply to the foreign agent to grant or deny service. d) The foreign agent relays the registration reply to the mobile node to inform it of the disposition of its request. The registration messages defined in subsections 3.3 and 3.4 use the User Datagram Protocol (UDP) header [18]. A nonzero UDP checksum SHOULD be included in the header, and checked by each recipient. 3.2. Authentication Each mobile node, foreign agent, and home agent MUST be able to support a mobility security association for mobile entities, indexed by their IP address. See section 5.1 for requirements for support of authentication algorithms. Registration messages between mobile node and home agent MUST be authenticated with the Mobile-Home Authentication Extension (subsection 3.5.1). This extension immediately follows all non-authentication extensions, except those foreign agent-specific extensions which may be added to the packet after the mobile node computes the authentication. 3.3. Registration Request A mobile node sends a registration request message so that its home agent can create or modify a mobility binding for that mobile node (with a new lifetime). The request may be relayed to the home agent by the foreign agent from which the mobile node is accepting service, or it may be sent directly in case the mobile node has received a care-of address by some other means (e.g, DHCP [8]). IP fields: Perkins, editor Expires 21 June 1996 [Page 22] Internet Draft IP Mobility Support 21 December 1995 Source Address Typically the interface address from which the packet is sent. Destination Address Typically that of the foreign agent or the home agent. See subsections 3.6.1.1 and 3.7.2.2 for details. UDP fields: Source Port variable Destination Port 434 The UDP header is followed by the Mobile-IP fields shown below: 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 |S|B|D|M|G|rsvd | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Agent | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Care-of Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Extensions ... +-+-+-+-+-+-+-+- Type 1 (Registration Request) S If the 'S' bit is set, the mobile node is requesting that the home agent retain its prior mobility bindings, as described in subsection 3.6.1.2. B If the 'B' bit is set, the mobile node requests that the home agent send to it broadcasts on the home network, as described in subsection 4.3. D If the 'D' bit is set, the mobile node will itself decapsulate datagrams which are sent to the care-of address. That is, the mobile node Perkins, editor Expires 21 June 1996 [Page 23] Internet Draft IP Mobility Support 21 December 1995 has assocated a care-of address with one of its own interfaces. M If the 'M' bit is set, the mobile node asks its home agent to use minimal encapsulation [16]. G If the 'G' bit is set, the mobile node asks its home agent to use GRE encapsulation [10]. rsvd Reserved bits; sent as zero Lifetime The number of seconds remaining before the registration is considered expired. A value of zero indicates a request for deregistration. A value of all ones indicates infinity. Home Address The IP address of the mobile node. Home Agent The IP address of a home agent. Care-of Address The IP address for the end of a tunnel. Identification A 64-bit number, constructed by the mobile node, useful for matching requests with replies, and for protecting against replay attacks (see subsections 5.4, 5.6). Extensions The fixed portion of the Registration Request is followed by one or more of the extensions listed in subsection 3.5. The Mobile-Home Authentication Extension MUST be included in all Registration Requests. See the sections on mobile node, and foreign agent considerations (3.6.1.3 and 3.7.2.2) for ordering rules on extensions. 3.4. Registration Reply A mobility agent returns a registration reply message to a mobile node which has sent a registration request (subsection 3.3) message. If the mobile node is accepting service from a foreign agent, that foreign agent will receive the reply from the home agent and subsequently relay it to the mobile node. The reply message contains the necessary codes to inform the mobile node about the status of its request, along with the lifetime granted by the home agent, which MAY be smaller than the original request. Perkins, editor Expires 21 June 1996 [Page 24] Internet Draft IP Mobility Support 21 December 1995 Mobility agents MUST NOT increase the lifetime selected by the mobile node in the registration request. If the lifetime of the reply is greater than the original request, the excess time MUST be ignored. When the lifetime of the reply is smaller than the original request, another registration SHOULD occur before the smaller lifetime expires. IP fields: Source Typically copied from the destination address of the Registration Request to which the agent is replying. See subsections 3.7.2.3 and 3.8.3.1 for complete details. Destination Copied from the source address of the Registration Request to which the agent is replying UDP fields: Source Port Destination Port Copied from the source port of the corresponding Registration Request (subsection 3.7.1). The UDP header is followed by the Mobile-IP fields shown below: 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 | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Agent | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Extensions ... +-+-+-+-+-+-+-+- Type 3 (Registration Reply) Code One of the following codes: 0 registration accepted Perkins, editor Expires 21 June 1996 [Page 25] Internet Draft IP Mobility Support 21 December 1995 1 registration accepted; simultaneous mobility bindings unsupported Service denied by the foreign agent: 64 reason unspecified 65 administratively prohibited 66 insufficient resources 67 mobile node failed authentication 68 home agent failed authentication 69 requested lifetime too long 70 poorly formed request 71 poorly formed reply 72 requested encapsulation unavailable 73 requested VJ compression unavailable 80 home network unreachable (ICMP error) 81 home agent host unreachable (ICMP error) 82 home agent port unreachable (ICMP error) 88 home agent unreachable (other ICMP error) Service denied by the home agent: 128 reason unspecified 129 administratively prohibited 130 insufficient resources 131 mobile node failed authentication 132 foreign agent failed authentication 133 identification mismatch 134 poorly formed request 135 too many simultaneous mobility bindings 136 unknown home agent address Up-to-date values of the Code field are specified in the most recent "Assigned Numbers" [21]. Lifetime The seconds remaining before the registration is considered expired. A value of zero confirms a request for deregistration. A value of all ones indicates infinity. Home Address The IP address of the mobile node. Home Agent The IP address of a home agent. Identification The registration identification is copied from the request message, for use by the mobile node in matching its reply with an outstanding request. Perkins, editor Expires 21 June 1996 [Page 26] Internet Draft IP Mobility Support 21 December 1995 Extensions The fixed portion of the Registration Reply is followed by one or more of the extensions listed in subsection 3.5. The Mobile-Home Authentication Extension MUST be included in all Registration Replies returned by the home agent. See the sections on foreign agent and home agent considerations (3.7.2.2 and 3.8.3.3) for the ordering rules on extensions. 3.5. Registration Extensions Each authenticator required in the authentication extensions which follow is defined to be a value computed from a stream of bytes including: - the shared secret, - the UDP payload (that is, the registration request or reply data), - all prior extensions in their entirety, and - the type and length of this extension, but not including the Authenticator field itself nor the UDP header. See subsection 5.1 for information about support requirements for message authentication codes, etc. which are to be used with the various authentication extensions. 3.5.1. Mobile-Home Authentication Extension This extension must be present in all registration requests and replies, and is intended to eliminate problems [3] which result from the uncontrolled propagation of remote redirects in the Internet. The location of the authentication extension marks the end of the authenticated data. 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 | Length | SPI .... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... SPI (cont.) | Authenticator ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type 32 Length The number of data bytes in the extension. Perkins, editor Expires 21 June 1996 [Page 27] Internet Draft IP Mobility Support 21 December 1995 SPI Security Parameter Index. (4 bytes) An opaque identifier other than zero (reserved). Authenticator (variable length) (see 3.5) 3.5.2. Mobile-Foreign Authentication Extension This extension may be found in registration requests and replies where a security association exists between the mobile node and a foreign agent. See subsection 5.1 for information about support requirements for message authentication codes, etc. 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 | Length | SPI .... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... SPI (cont.) | Authenticator ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type 33 SPI Security Parameter Index. (4 bytes) An opaque identifier other than zero (reserved). Length The number of data bytes in the extension. Authenticator (variable length) (see 3.5) 3.5.3. Foreign-Home Authentication Extension This extension may be found in registration requests and replies where a security association exists between the foreign agent and a home agent. See subsection 5.1 for information about support requirements for message authentication codes, etc. 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 | Length | SPI .... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... SPI (cont.) | Authenticator ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type 34 Perkins, editor Expires 21 June 1996 [Page 28] Internet Draft IP Mobility Support 21 December 1995 SPI Security Parameter Index. (4 bytes) An opaque identifier other than zero (reserved). Length The number of data bytes in the extension. Authenticator (variable length) (see 3.5) 3.6. Mobile Node Considerations A mobile node must be configured with its home address, a netmask, and a mobility security association for each home agent. In addition, a mobile node MAY be configured with the IP address of one or more of its home agents; otherwise, the mobile node MAY discover a home agent using the procedures described in section 3.6.1.2. For each pending registration, the mobile node maintains the following: - link-layer address of foreign agent, if applicable - Care-of Address - registration Identification - registration Lifetime A mobile node initiates registration whenever it detects a change in its network connectivity. See section 2.4.2 for methods by which mobile nodes can make such a determination. When it is away from home, the mobile node's Registration Request allows its home agent to create or modify a mobility binding. When it is at home, the mobile node's (de)Registration Request allows its home agent to erase any previous mobility binding(s). A mobile node operates without the support of mobility functions when it is at home. There are other conditions under which the mobile node SHOULD (re)register with its foreign agent, such as when the mobile node detects that the agent has rebooted (as specified in section 2.4.4) and when the current registration's Lifetime is near expiration. In the absence of link-layer indications of changes in point of attachment, Agent Advertisements from new agents do not necessarily affect a current registration. In the absence of link-layer indications, a mobile node MUST NOT attempt to register more often than once per second. A mobile node MAY register with a different agent when transport-layer protocols indicate excessive retransmissions. A mobile node MUST NOT register with a new foreign agent because it has received an ICMP Redirect from the foreign agent that is Perkins, editor Expires 21 June 1996 [Page 29] Internet Draft IP Mobility Support 21 December 1995 currently providing service to it. Within these constraints, the mobile node MAY register again at any time. Please refer to the examples in appendix D to see how the fields in registration messages would be set up in some typical registration scenarios. 3.6.1. Sending Registration Requests The following sections provide additional detail for the values the mobile node MUST supply in the fields of Registration Request messages. 3.6.1.1. IP Fields This section provides the specific rules by which mobility agents pick values for the IP header fields of a Registration Request. IP Source Address: - When registering on a foreign network with a care-of address associated to one of its own interfaces, the IP source address MUST be the care-of address. - In all other circumstances, the IP source address MUST be the mobile node's home address. IP Destination Address: - When the IP address is unknown (e.g., the agent was discovered via a link-layer protocol), the "All Mobility Agents" multicast address (224.0.0.11) MUST be used. In such a case, the mobile node SHOULD use the agent's link-layer unicast address in order to deliver the datagram to the correct agent. - When registering with a foreign agent, the address of the agent as learned from the IP source address of the corresponding Agent Advertisement MUST be used. - When registering directly with the home agent, the destination address is set to the (unicast) address that the mobile node uses for its home agent. - If the mobile node is connected to its home network or if the mobile node is registering without a foreign agent, and the mobile node is attempting to perform home agent discovery, then the IP destination address is set to the subnet-directed broadcast address of the home network. This address MUST NOT be used as the destination IP address if the mobile node is registering via a foreign agent. Perkins, editor Expires 21 June 1996 [Page 30] Internet Draft IP Mobility Support 21 December 1995 IP Time to Live: - The IP TTL field MUST be set to 1 if the IP destination address is set to the "All Mobility Agents" multicast address as described above. Otherwise a suitable value should be chosen in accordance with standard IP practice [19]. 3.6.1.2. Registration Request Fields This section provides specific rules by which mobile nodes pick values for the fields within the fixed portion of a Registration Request. A mobile node MAY set the 'S' bit in order to request that the home agent maintain prior mobility binding(s). Otherwise, the home agent deletes any previous binding(s) and replaces them with the new binding specified in the Registration Request. Multiple simultaneous mobility bindings are likely to be useful when a mobile node moves within range of multiple cellular systems. IP explicitly allows duplication of datagrams. When the home agent allows simultaneous bindings, it will encapsulate a separate copy of each arriving datagram to each care-of address, and the mobile node will receive multiple copies of its datagrams. The mobile node SHOULD set the 'D' bit if it is registering with a care-of address associated with one of its own interfaces. Otherwise, this bit MUST NOT be set. A mobile node MAY set the 'B' bit if the mobile node would like to receive a copy of IP broadcasts on its home network. Note that in order to "shield" local broadcast packets from nodes on the foreign network (particularly the foreign agent), the home agent is required to tunnel broadcasts either directly to a care-of address associated with one of the mobile node's interfaces (hence the 'D' bit) -or- it must recursively tunnel such packets first to the mobile node's home address and then to the (foreign agent-provided) care-of address. The mobile node must be capable of de-tunneling packets in order to obtain the original broadcast datagram. For this reason, the 'B' bit MUST NOT be set unless the mobile node is capable of de-tunneling packets. The mobile node MAY request alternative forms of encapsulation by setting the 'M' bit and/or the 'G' bit, but only if the mobile node is decapsulating its own packets (with a care-of address associated with one of its own interfaces) or if its foreign agent has indicated support for these forms of encapsulation by setting the corresponding Perkins, editor Expires 21 June 1996 [Page 31] Internet Draft IP Mobility Support 21 December 1995 bits in the Mobile Service Extension of an Agent Advertisement. Otherwise, the mobile node MUST NOT set these bits. The Lifetime field is chosen as follows: - If the mobile node is registering with a foreign agent, the Lifetime SHOULD NOT exceed the value learned in the Agent Advertisement. When the method by which the care-of address is learned does not include a Lifetime, the default ICMP Router Advertisement Lifetime (1800 seconds) MAY be used. - The mobile node MAY ask a home agent to terminate forwarding service to a particular care-of address, by sending a registration with a Lifetime of zero (see section 3.8.2). - Similarly, a Lifetime of zero is used when the mobile node deregisters all care-of addresses upon returning home. The Home Agent field is set to the address of one of the mobile node's home agents, if the mobile node possesses this information. Otherwise, the mobile node MAY discover a home agent by setting this field to the subnet-directed broadcast address of the home network. (Each home agent will reject the mobile node's registration, but in the reply they will provide their unicast address for use by the mobile node in a future registration attempt). The Care-of Address field is set to the value of the particular care-of address that the mobile node wishes to (de)register. In the special case when a mobile node wishes to deregister all care-of addresses, it sets this field to the value of the its home address. A mobile node on its home network need not register again with a home agent when a change of sequence number occurs, or the advertisement lifetime expires, or even when the home agent crashes, since it is not seeking service from the home agent. The mobile node chooses the Identification field in accordance with the style of replay protection it uses with its home agent. This is part of the mobility security association the mobile node shares with its home agent. See section 5.6 on replay protection for the method by which the mobile node computes the Identification field. 3.6.1.3. Extensions This section describes the ordering of any mandatory and any optional extensions that a mobile node appends to a Registration Request. This following ordering MUST be followed: a) The IP header, followed by the UDP header, followed by the fixed-length portion of the Registration Request Perkins, editor Expires 21 June 1996 [Page 32] Internet Draft IP Mobility Support 21 December 1995 b) Any non-authentication extensions relevant to the home agent (which may or may not also be relevant to the foreign agent) c) The Mobile-Home Authentication Extension d) Any non-authentication extensions relevant only to the foreign agent. e) The Mobile-Foreign Authentication Extension Note that items (a) and (c) MUST appear in every Registration Request sent by the mobile node. Items (b), (d), and (e) are optional. However, item (e) MUST be included when the mobile node and the foreign agent share a security association. 3.6.2. Receiving Registration Replies Registration Replies will be received by the mobile node in response to its Registration Requests. Registration Replies generally fall into three categories: - service request was accepted, - service request was denied by foreign agent, and - service request was denied by home agent. The remainder of this section describes handling by mobile nodes under these various categories, based upon the contents of the Registration Reply. 3.6.2.1. Validity Checks Registration Replies with an invalid, non-zero UDP checksum MUST be silently discarded. In addition, the low-order 32 bits of the Identification field in the Registration Reply MUST be compared to the low-order 32 bits of Identification field in the most recent Registration Request sent to the replying agent. If they do not match, the Reply MUST be silently discarded. Also, the Registration Reply MUST be checked for authenticity. That is, the mobile node MUST check for the presence of a valid authentication extension, based upon the Code field in the Reply. The rules are as follows: Perkins, editor Expires 21 June 1996 [Page 33] Internet Draft IP Mobility Support 21 December 1995 a) If the mobile node and foreign agent share a security association, the mobile node MUST check for a valid Mobile-Foreign Authentication Extension. If no such extension is found, the mobile node MUST silently discard the Reply and the mobile node SHOULD log the event as a security exception. b) If the Code field indicates that service is denied by the home agent, or if the Code field indicates that the service request was accepted, the mobile node MUST check for a valid Mobile-Home Authentication Extension. If no such extension is found, the mobile node MUST silently discard the Reply and the mobile node SHOULD log the event as a security exception. If the Code field indicates an authentication failure, either at the foreign agent or the home agent, then it is quite possible that any authenticators in the Registration Reply will also be in error. This could happen, for example, if the shared secret between the mobile node and home agent was erroneously configured. The mobile node SHOULD log such errors as security exceptions. 3.6.2.2. Service Request Accepted If the Code field indicates that service will be provided, the mobile node SHOULD configure its routing table appropriately for its current point of attachment (see subsection 4.2.1). If the mobile node is returning to its home network and that network is one which implements ARP, the mobile node MUST follow the procedures described in section 4.6 with regard to ARP, proxy ARP, and gratuitous ARP. If the mobile node has registered on a foreign network, it SHOULD re-register before the granted Lifetime expires. 3.6.2.3. Service Request Denied If the Code field indicates that service is being denied, the mobile node SHOULD log the error. There are several scenarios under which the mobile node may be able to "repair" the error. These include: Code 69: (Denied by foreign agent, Lifetime too long) In this case, the Lifetime field in the Registration Reply will contain the maximum amount of time for which that foreign agent is willing to accept registrations. The mobile node MAY Perkins, editor Expires 21 June 1996 [Page 34] Internet Draft IP Mobility Support 21 December 1995 attempt to register with this same agent, using a Lifetime in the Registration Request that MUST be less than or equal to the value specified in the Reply. Code 133: (Denied by home agent, Identification mismatch) In this case, the Identification field in the Registration Reply will contain a value that allows the mobile node to synchronize with the home agent, based upon the style of replay protection in effect. (See section 5.6 for details). The mobile node MUST adjust the parameters it uses to compute the Identification field based upon the information in the Registration Reply, before issuing any future Registration Requests. Code 136: (Denied by home agent, Unknown home agent address) This code is returned by a home agent when the mobile node is performing home agent discovery as described in subsections 3.6.1.1 and 3.6.1.2. In this case, the Home Agent field within the Reply will contain the unicast IP address of the home agent returning the reply. The mobile node MAY then attempt to register with this home agent in future Registration Requests. In addition, the mobile node SHOULD adjust the parameters it uses to compute the Identification field based upon the corresponding field in the Registration Reply, before issuing any future Registration Requests. 3.6.3. Registration Retransmission When no Registration Reply has been received within a reasonable time, another Registration Request is transmitted. When timestamps are used, a new registration Identification is chosen for each retransmission; thus it counts as a new registration. When nonces are used, the unanswered request is retransmitted unchanged; thus the retransmission does not count as a new registration (see subsection 5.6). In this way a retransmission will not require the home agent to resynchronize with the mobile node by issuing another nonce. The maximum time until a new Registration Request is sent SHOULD be no greater than the requested Lifetime of the Registration Request. The minimum value SHOULD be large enough to account for the size of the packets, twice the round trip time for transmission at the link speed, and at least an additional 100 milliseconds to allow for processing the packets before responding. Some circuits add another 200 milliseconds of satellite delay. The minimum time Perkins, editor Expires 21 June 1996 [Page 35] Internet Draft IP Mobility Support 21 December 1995 between Registration Requests MUST NOT be less than 1 second. Each successive wait SHOULD be at least twice the previous wait, as long as that is less than the maximum. 3.7. Foreign Agent Considerations The foreign agent plays a passive role in Mobile IP registration. It relays Registration Requests between mobile nodes and home agents, and, when it provides the care-of address, decapsulates datagrams for delivery to the mobile node. It MAY also advertise its presence as described in subsection 2.3. The foreign agent MUST NOT originate a Registration Request or Reply that has not been prompted by the mobile node. The foreign agent MUST NOT generate a Registration Request or Reply to indicate that the service Lifetime has expired. A foreign agent MUST NOT originate a message that asks for deregistration of a mobile node; however, it MUST relay valid deregistration requests originated by a mobile node. 3.7.1. Configuration and Registration Tables Each foreign agent must offer a care-of address. In addition, for each pending or current registration, the foreign agent must maintain a visitor list entry containing the following information obtained from the mobile node's Registration Request: - link-layer source address - IP Source Address (mobile node's Home Address) - UDP Source Port - Home Agent - Lifetime - Identification As with any host on the Internet, a foreign agent may also maintain a security association for each pending or current registrant, and use it to authenticate the Registration Requests and Replies of the mobile node or its home agent (subsections 3.3, 3.4). The foreign agent may use an available security association with the home agent to compute the authentication data for the Foreign-Home Authentication Extension. Even if a foreign agent implements authentication, it might not use authentication with each registration, because of the key management difficulties. Perkins, editor Expires 21 June 1996 [Page 36] Internet Draft IP Mobility Support 21 December 1995 3.7.2. Receiving Registration Requests If the foreign agent is able to satisfy an incoming Registration Request, it then relays the Request to the home agent. Otherwise, it denies the request by sending a Registration Reply to the mobile node with an appropriate rejection Code. The following sections describe this behavior in more detail. If a foreign agent receives a deregistration request from a mobile node in its visitor list, the visitor list entry SHOULD NOT be purged until the home agent sends back a Registration Reply with a Code indicating success. 3.7.2.1. Validity Checks Registration Requests with an invalid, non-zero UDP checksum MUST be silently discarded. Also, the Registration Request MUST be checked for authenticity. That is, the foreign agent MUST check for the presence of a valid Mobile-Foreign Authentication Extension if it shares a security association with the mobile node. If, under these circumstances, no such extension is found, the foreign agent MAY reject the Request by sending a Registration Reply to the mobile node with Code 67. The foreign agent SHOULD do no further processing with such a Request. 3.7.2.2. Forwarding a Valid Request to the Home Agent If the foreign agent is able to satisfy the mobile node's Registration Request, it relays the Request to the mobile node's home agent. The foreign agent MUST NOT modify any of the fields beginning within the fixed portion of the Registration Request up through and including the Mobile-Home Authentication Extension. Otherwise, an authentication failure is very likely to occur at the home agent. In addition, the foreign agent MUST perform the following additional procedures: - It MUST consume any extensions following the Mobile-Home Authentication Extension, - It SHOULD append any of its own non-authentication extensions of relevance to the home agent, if applicable, and - It MUST append the Foreign-Home Authentication Extension, if the foreign agent shares a security association with the home agent. Specific fields within the IP header and the UDP header of the relayed Registration Request MUST be set as follows: Perkins, editor Expires 21 June 1996 [Page 37] Internet Draft IP Mobility Support 21 December 1995 IP Source Address The foreign agent's address on the interface from which the packet will be sent. IP Destination Address Copied from the Home Agent field within the Registration Request. UDP Source Port UDP Destination Port 434 3.7.2.3. Denying Invalid Requests If the foreign agent is unable to satisfy the mobile node's Registration Request, it SHOULD send the mobile node a Registration Reply with a suitable rejection Code. In such a case, the Home Address, Home Agent, and Identification fields within the Registration Reply are copied from the corresponding fields of the Registration Request. If a foreign agent detects unknown bits set in the Reserved Bits field of the registration request, it MUST deny the request with status code 134. If the request is being denied because the requested Lifetime is too long, the foreign agent sets the Lifetime in the Reply to the maximum length of time for which it is willing to accept a registration, and sets the Code field to 69. Otherwise, the Lifetime SHOULD be copied from the Lifetime field in the Request. Specific fields within the IP header and the UDP header of the Registration Reply MUST be set as follows: IP Source Address Copied from the IP Destination Address of Registration Request, unless the "All Agents Multicast" address was used. In this case, the foreign agent's address (on the interface from which the packet will be sent) is used. Perkins, editor Expires 21 June 1996 [Page 38] Internet Draft IP Mobility Support 21 December 1995 IP Destination Address Copied from the IP Source Address of the Registration Request. UDP Source Port 434 UDP Destination Port Copied from the UDP Source Port of the Registration Request. 3.7.3. Receiving Registration Replies The foreign agent updates its visitor list when it receives a valid Registration Reply from a home agent. It then relays the Registration Reply to the mobile node. The following sections describe this behavior in more detail. If upon relaying a Registration Request to a home agent, the foreign agent receives an ICMP error message instead of a Registration Reply, then the foreign agent sends to the mobile node a Registration Reply with an appropriate "Home Agent Unreachable" failure Code (within the range 80-95, inclusive). See section 3.7.2.3 for details of building the Registration Reply. 3.7.3.1. Validity Checks Registration Replies with an invalid, non-zero UDP checksum MUST be silently discarded. A Registration Reply MUST be silently discarded if the low-order 32 bits of the Identification field do not match that of a pending Registration Request. Also, the Registration Reply MUST be checked for authenticity. That is, the foreign agent MUST check for the presence of a valid Foreign-Home Authentication Extension if it shares a security association with the home agent. If, under these circumstances, no such extension is found, the foreign agent MAY reject the Request by sending a Registration Reply to the mobile node with Code 68. The foreign agent MUST NOT perform further processing on the Reply, though the foreign agent SHOULD log the error as a security exception. Perkins, editor Expires 21 June 1996 [Page 39] Internet Draft IP Mobility Support 21 December 1995 3.7.3.2. Forwarding Replies to the Mobile Node A Registration Reply which satisfies the validity checks of section 3.8.2.1 is relayed to the mobile node. If the reply contains a status code indicating that service will be provided, then the foreign agent updates its visitor list accordingly. The foreign agent MUST NOT modify any of the fields beginning with the fixed portion of the Registration Reply up through and including the Mobile-Home Authentication Extension. Otherwise, an authentication failure is very likely to occur at the mobile node. In addition, the foreign agent SHOULD perform the following additional procedures: - It MUST consume any extensions following the Mobile-Home Authentication Extension, - It SHOULD append its own non-authentication extensions of relevance to the mobile node, if applicable, and - It MUST append the Mobile-Foreign Authentication Extension, if the foreign agent shares a security association with the mobile node. Specific fields within the IP header and the UDP header of the relayed Registration Reply are set according to the same rules set forth in section 3.7.2.3. 3.8. Home Agent Considerations Home agents also play a reactive role in the registration process. They receive Registration Requests from mobile nodes (perhaps relayed by a foreign agent), update their mobility bindings appropriately, and issue suitable Registration Replies in response. A home agent MUST NOT originate a Registration Reply that has not been prompted by the mobile node. The home agent MUST NOT generate a Registration Reply to indicate that the service Lifetime has expired. 3.8.1. Configuration and Registration Tables Each home agent must have an IP address, and, if the home network is not a virtual network, the prefix size for the home network. The home agent must keep track of the home address and mobility security association of each authorized mobile node. When an authorized mobile node becomes registered, the home agent will create or modify its mobility binding list entry containing: - care-of address Perkins, editor Expires 21 June 1996 [Page 40] Internet Draft IP Mobility Support 21 December 1995 - registration Identification - registration Lifetime The home agent MAY also maintain security associations with various foreign agents. The home agent may use these security associations to compute the authentication data for the Foreign-Home Authentication Extension. 3.8.2. Receiving Registration Requests If the home agent is able to satisfy an incoming Registration Request, it then updates the mobile node's mobility binding(s) and issues a Registration Reply with a suitable Code. Otherwise, it denies the request by sending a Registration Reply with an appropriate Code specifying the reason the request was rejected. The following sections describe this behavior in more detail. 3.8.2.1. Validity Checks Registration Requests with an invalid, non-zero UDP checksum MUST be silently discarded by the home agent. Also, the Registration Request MUST be checked for authenticity. This minimally involves the following operations: a) The home agent MUST check for the presence of a valid Mobile-Home Authentication Extension. If no such extension is found, the home agent MAY reject the Request by sending a Registration Reply to the mobile node with Code 131. The home agent MUST do no further processing with such a Request, though it SHOULD log the error as a security exception. b) The home agent MUST check that the registration Identification field is correct under the context selected by the security parameter index within the Mobile-Home Authentication Extension. See section 5.6 for a description of how this is performed. If incorrect, the home agent MAY reject the Request by sending a Registration Reply to the mobile node with Code 133, and including an Identification field computed in accordance with the rules set forth in 5.6. The home agent MUST do no further processing with such a Request, though it SHOULD log the error as a security exception. c) In addition, the home agent MUST check for the presence of a valid Foreign-Home Authentication Extension if it shares a Perkins, editor Expires 21 June 1996 [Page 41] Internet Draft IP Mobility Support 21 December 1995 security association with the foreign agent. If, under these circumstances, no such extension is found, the home agent MAY reject the Request by sending a Registration Reply to the mobile node with Code 132. The home agent MUST do no further processing with such a Request, but is SHOULD log the error as a security exception. In addition to validating the authenticity of a Registration Request, home agents MUST NOT grant service for Registration Requests that are sent to the subnet-directed broadcast address of the home network (as opposed to being unicast to the home agent). The home agent MAY reject such a request by returning status code 136. In this case, the Registration Reply will contain the home agent's unicast address, so that the mobile node can re-issue the Registration Request with the correct home agent address. 3.8.2.2. Accepting a Valid Request If the Registration Request satisfies the validity checks in section 3.8.2.1, and the home agent is able to accommodate the request, the home agent updates its mobility binding list for the requesting mobile node and returns a Registration Reply to the mobile node. In this case, the reply Code will be either 0 if the home agent supports simultaneous mobility bindings or 1 if it does not. See section 3.8.3 for details of building the Registration Reply message. The home agent updates its mobility bindings as follows: - If the Lifetime is zero and the Care-of Address equals the mobile node's home address, the home agent deletes all of the entries in the mobility binding list for the requesting mobile node. This is how a mobile node requests that its home agent cease providing mobility services. - If the Lifetime is zero and the Care-of Address does not equal the mobile node's home address, the home agent deletes only the entry containing the specified Care-of Address from the mobility binding list for the requesting mobile node. Any other active entries containing other care-of addresses will remain active. - If the Lifetime is nonzero, the home agent adds an entry containing the requested Care-of Address to the mobility binding list for the mobile node. If the 'S' bit is set to one, and the home agent supports simultaneous mobility bindings, the previous mobility binding entries remain active. Otherwise, the home agent removes all previous entries in the mobility binding list for the mobile node. Perkins, editor Expires 21 June 1996 [Page 42] Internet Draft IP Mobility Support 21 December 1995 In all cases, the home agent sends a Registration Reply to the source of the Registration Request, which might indeed be a different foreign agent than that whose care-of address is being (de)registered. If the home agent shares a security association with the foreign agent whose care-of address is being deregistered -- wherein said foreign agent is different from the one which relayed the Registration Request -- the home agent MAY additionally send a Registration Reply to the foreign agent whose care-of address is being deregistered. The home agent MUST NOT send such a Reply if it does not share a security association with the foreign agent. If no Reply is sent, the foreign agent's visitor list will expire naturally when the original Lifetime expires. It is not an error for the mobile node to request a Lifetime longer than the home agent is willing to accept. In such a case, the home agent simply reduces the Lifetime to a permissible amount and returns this amount in the Registration Reply. This informs the mobile node when it should reregister. The home agent MUST NOT increase the Lifetime above that specified by the mobile node in the Registration Request. If the Registration Request duplicates an accepted current Registration Request, the new Lifetime MUST NOT extend beyond the Lifetime originally granted. In addition, if the home network implements ARP [17], and the Registration Request asks the home agent to create a mobility binding for a mobile node which previously had no binding (the mobile node was previously assumed to be at home), then the home agent MUST follow the procedures described in section 4.6 with regard to ARP, proxy ARP, and gratuitous ARP. If the mobile node already had a previous mobility binding, the home agent MUST continue to follow the rules for proxy ARP described in section 4.6. 3.8.2.3. Denying an Invalid Request If the Registration Reply does not satisfy all of the validity checks in subsection 3.8.2.1, or the home agent is unable to accommodate the request, the home agent returns a Registration Reply to the mobile node with a Code that indicates the reason for the error. If a foreign agent was involved in relaying the request, this allows the foreign agent to delete its pending visitor list entry. Also, this informs the mobile node of the reason for the error such that it may attempt to fix the error and issue another request. This section lists a number of reasons the home agent might reject a request and provides the Code value it should use in each instance. Perkins, editor Expires 21 June 1996 [Page 43] Internet Draft IP Mobility Support 21 December 1995 See subsection 3.8.3 for additional details on building the Registration Reply message. Many reasons for rejecting a registration are administrative in nature. For example, a home agent can limit the number of simultaneous registrations for a mobile node, by rejecting any registrations that would cause its limit to be exceeded, and returning a Registration Reply with error code 135. Similarly, a home agent may refuse to grant service to mobile nodes which have entered unauthorized service areas by returning a Registration Reply with error code 129. If a home agent detects unknown bits set in the Reserved Bits field of the registration request, it MUST deny the request with status code 134. 3.8.3. Sending Registration Replies If the home agent is able to satisfy an incoming Registration Request, it then updates the mobile node's mobility binding(s) and issues a Registration Reply with a suitable Code. Otherwise, it denies the request by sending a Registration Reply with an appropriate Code specifying the reason the request was rejected. The following sections provide additional detail for the values the home agent MUST supply in the fields of Registration Reply messages. 3.8.3.1. IP/UDP Fields This section provides the specific rules by which mobile nodes pick values for the IP and UDP header fields of a Registration Reply. IP Source Address Copied from the IP Destination Address of Registration Request, unless a multicast or broadcast address was used. In such a case, the home agent's address by which it is known to the requesting mobile node is used. IP Destination Address Copied from the IP Source Address of the Registration Request. UDP Source Port Copied from the UDP Destination Port of the Registration Request. UDP Destination Port Copied from the UDP Source Port of the Registration Request. Perkins, editor Expires 21 June 1996 [Page 44] Internet Draft IP Mobility Support 21 December 1995 3.8.3.2. Registration Reply Fields This section provides specific rules by which home agents pick values for the fields within the fixed portion of a Registration Reply. The Type field in a Registration Reply is always set to 3. The Code field is chosen according to the rules set forth in the previous sections. When responding to accepted registrations, a home agent SHOULD respond with Code 1 if it does not support simultaneous registrations. The Lifetime field is copied from the corresponding field in the Registration Request, unless the requested value is greater than the maximum length of time the home agent is willing to provide the requested service. In such a case, the Lifetime MUST be set to the length of time that service will actually be provided by the home agent. The Home Address field is copied from the corresponding field in the Registration Request. If the Home Agent field in the Registration Request contains a unicast address of this home agent, then that field is copied into the Home Agent field of the Registration Reply. Otherwise, the home agent supplies its unicast address in the Home Agent field of the Registration Reply. In this latter case, the home agent MUST reject the registration with a suitable code (e.g. Code 136) to prevent the mobile node from being simultaneously registered with two or more home agents. 3.8.3.3. Extensions This section describes the ordering of any mandatory and any optional extensions that a home agent appends to a Registration Reply. The following ordering MUST be followed: a) The IP header, followed by the UDP header, followed by the fixed-length portion of the Registration Reply, b) Any non-authentication extensions relevant to the mobile node (which may or may not also be relevant to the foreign agent), and c) The Mobile-Home Authentication Extension d) Any non-authentication extensions relevant only to the foreign agent. Perkins, editor Expires 21 June 1996 [Page 45] Internet Draft IP Mobility Support 21 December 1995 e) The Foreign-Home Authentication Extension Note that items (a) and (c) MUST appear in every Registration Reply sent by the home agent. Items (b), (d), and (e) are optional. However, item (e) MUST be included when the home agent and the foreign agent share a security association. 4. Routing Considerations This section describes how mobile nodes, home agents, and (possibly) foreign agents cooperate to route packets to/from mobile nodes that are connected to a foreign network. The mobile node informs its home agent of its current location using the registration procedure described in section 3. See the protocol overview in section 1.7 for the relative locations of the mobile node's home address with respect to its home agent, and the mobile node itself with respect to any foreign agent with which it might attempt to register. 4.1. Encapsulation Types Support for IP in IP encapsulation [15] is required in home agents and foreign agents, and any mobile node which can associate a care-of address to one of its own interfaces. Minimal encapsulation [16] and GRE encapsulation [10] are alternate encapsulation methods which MAY optionally be supported by mobility agents and mobile nodes. Minimal encapsulation MUST NOT be used when the original datagram is a fragment. The use of these alternative forms of encapsulation, when requested by the mobile node, is otherwise at the discretion of the home agent. 4.2. Unicast Packet Routing 4.2.1. Mobile Node Considerations When connected to its home network, a mobile node operates without the support of mobility services. That is, it operates just like any other (fixed) host or router. The method by which a mobile node selects a default router when connected to its home network, or when away from home and using a care-of address associated to one of its own interfaces, is outside the scope of this document. ICMP Router Advertisement [7] is one such method. When registered on a foreign network, the mobile node chooses a default router by examining the Agent Advertisements sent by its foreign agent. The default router is selected by the procedure Perkins, editor Expires 21 June 1996 [Page 46] Internet Draft IP Mobility Support 21 December 1995 described in RFC1256; that is, the mobile node SHOULD choose as its default router the highest preference router address listed in the ICMP Router Advertisement portion of the Agent Advertisement. The mobile node MAY add the IP source address of the Agent Advertisement to this (possibly empty) list of router addresses wherein the IP source address is considered to be the worst choice (lowest preference) for a default router. In any case, the mobile node MAY choose its foreign agent as its default router. Note that Van Jacobson header compression [11] will not function properly unless all TCP packets to and from the mobile node pass, respectively, through the same first and last-hop router. The mobile node, therefore, SHOULD select its foreign agent as its default router if it performs Van Jacobson header compression with its foreign agent. In order for a mobile node to associate a care-of address to one of its own interfaces, it MUST be able to detunnel packets sent to this address. The method by which the mobile node obtained its local care-of address SHOULD also be capable of supplying the mobile node with the address of a default router. 4.2.2. Foreign Agent Considerations Upon receipt of an encapsulated packet sent to its advertised care-of address, a foreign agent MUST compare the inner destination address to those entries in its visitor list. When the destination does not match any node currently in the visitor list, the foreign agent MUST NOT forward the datagram without modifications to the original IP header, because otherwise a routing loop is likely to result. The datagram SHOULD be silently discarded. ICMP Destination Unreachable MUST NOT be sent when a foreign agent is unable to forward an incoming tunneled datagram. Otherwise, the foreign agent naturally forwards the decapsulated packet to the mobile node. The foreign agent MUST NOT advertise to other routers in its routing domain, nor to any other mobile node, the presence of a mobile router (see subsection 4.5). The foreign agent MUST route packets it receives from registered mobile nodes. At a minimum, this means that the foreign agent must verify the IP Header Checksum, decrement the IP Time To Live, recompute the IP Header Checksum, and forward such packets to a default router. In addition, the foreign agent should send appropriate ICMP error messages to the mobile node. Perkins, editor Expires 21 June 1996 [Page 47] Internet Draft IP Mobility Support 21 December 1995 4.2.3. Home Agent Considerations Packets destined for a mobile node will arrive at a home agent that advertises connectivity to the home network indicated by the address of the mobile nodes. The home agent must examine the IP header of all arriving traffic to see if it contains a destination address equal to the home address of any of its mobile nodes. If so, the home agent tunnels the datagram to the mobile node's most recently registered care-of address. If the home agent supports the optional capability of multiple simultaneous mobility bindings, it tunnels a copy to each care-of address in the mobile node's mobility binding list. If the mobile node has no current mobility bindings, the home agent assumes the mobile node is at home and simply forwards the datagram directly to it. In this case, however, it is likely that the datagram will never be received by the home agent. See section 4.1 about methods of encapsulation that may be used for tunneling. Maintenance of "soft tunnel state" (described in [15]) effectively reduces transmission errors in the tunnel. If the lifetime for a given mobility binding expires before the home agent has received another Registration Request, then that binding is erased from the mobility binding list. No special Registration Reply is sent to the foreign agent. The entry in its visitor list will expire naturally, and probably at the same time. When a mobility binding's lifetime expires, the home agent drops it regardless of whether or not simultaneous bindings are supported. Suppose an encapsulated datagram arrives at the home agent, that is to be delivered to one of its mobile nodes. If the destination of the inner header is not that same mobile node, the home agent may recursively encapsulate it for delivery to the mobile node's care-of address. Otherwise, the home agent may simply alter the outer destination to the care-of address, unless the care-of address is the same as the origination point of the encapsulated datagram. In the latter case, if the home agent receives a datagram for one of its mobile nodes, and the packet's IP source address is identical to the care-of address contained in the mobility binding list, the home agent MUST silently discard that packet. Otherwise, a routing loop is likely to result. 4.3. Broadcast packets When a home agent receives a broadcast packet, it may transmit the packet to only those mobile nodes on its mobility binding list that have requested broadcast service. Mobile nodes request encapsulated Perkins, editor Expires 21 June 1996 [Page 48] Internet Draft IP Mobility Support 21 December 1995 delivery of broadcast packets by setting the 'B' bit in their Registration Request packets (subsection 3.3). It is a matter of configuration at the home agent as to which specific categories of broadcast packets will be sent to such mobile nodes. If the mobile node is using a care-of address associated with one of its own interfaces, as indicated by the 'D' bit in its Registration Request packet, the home agent simply tunnels appropriate broadcast IP datagrams to the mobile node's care-of address. Otherwise, when the mobile node registered through a foreign agent, the home agent first encapsulates the broadcast datagram in a unicast datagram addressed to the mobile node's home address, and then tunnels this encapsulated datagram to the foreign agent. This extra level of encapsulation is required so that foreign agent can determine which mobile node should receive the packet after it is decapsulated. When received by the foreign agent, the unicast encapsulated datagram is detunneled and delivered to the mobile node in the same way as any other datagram. In either case, the mobile node must decapsulate the datagram it receives in order to recover the original broadcast datagram. 4.4. Multicast Packet Routing As mentioned previously, a mobile node that is connected to its home network functions just like any other (stationary) host or router. Thus, when it is at home, a mobile node functions identically to other multicast senders and receivers. This section therefore describes the behavior of a mobile node that is visiting a foreign network. In order receive multicasts, a mobile node must join the multicast group. Mobile nodes MAY join multicast groups in order to receive transmissions in one of two ways. First, they MAY join the group via a (local) multicast router on the visited subnet. This option assumes that there is a multicast router present on the visited subnet. The mobile node SHOULD use a care-of address associated with one of its own interfaces (if it has one) as the source IP address of its IGMP [6] packets. Otherwise, it MAY use its home address. Alternatively, a mobile node which wishes to receive multicasts can join groups via a bi-directional tunnel to its home agent, assuming that its home agent is a multicast router. The mobile node tunnels IGMP packets to its home agent and the home agent forwards multicast packets down the tunnel to the mobile node. The rules for multicast packet delivery to mobile nodes in this case are identical to those for broadcast packets (see section 4.3). Namely, the home agent must tunnel the packet directly to the care-of address associated to Perkins, editor Expires 21 June 1996 [Page 49] Internet Draft IP Mobility Support 21 December 1995 one of the mobile node's network interfaces, or, the packet must be tunneled first to the mobile node's home address and then recursively tunneled to the foreign agent-provided care-of address. A mobile node which wishes to send packets to a multicast group also has two options: (1) send directly on the visited network; or (2) send via a tunnel to its home agent. Because multicast routing in general depends upon the IP source address, a mobile node which sends multicast packets directly on the visited network MUST use a care-of address which is assigned to one of its own interfaces as the IP source address. Similarly, a mobile node which tunnels a multicast packet to its home agent MUST use its home address as the IP source address of both the (inner) multicast packet and the (outer) encapsulating packet. This second option assumes that the home agent is a multicast router. 4.5. Mobile Routers A mobile node can be a router, which is responsible for the mobility of one or more entire networks moving together, perhaps on an airplane, a ship, a train, an automobile, a bicycle, or a kayak. The nodes connected to a network served by the mobile router may themselves be fixed nodes or mobile nodes or routers. In this subsection, such networks are called "mobile networks". A mobile router may provide a care-of address to mobile nodes connected to the mobile network. In this case, when a correspondent host sends a packet to the mobile node, the actions described in the next paragraph should occur. Normal IP procedures will route the packet addressed to the mobile node from the correspondent host to the mobile node's home agent. This home agent's binding for the mobile node causes it to tunnel the packet to the mobile router. Normal IP procedures will then route the packet from this home agent to the mobile router's home agent. That home agent's binding for the mobile router causes the packet to be doubly tunneled to the mobile router's care-of address. For the sake of discussion, assume there is a foreign agent available at that care-of address. The mobile router's foreign agent will then detunnel the packet and use its visitor list entry to deliver the packet to the mobile router. The mobile router will then detunnel the packet and use its visitor list entry to deliver the packet finally to the mobile node. If a fixed node is connected to a mobile network then either of two methods may be used to cause packets from correspondent hosts to be routed to the fixed node. Perkins, editor Expires 21 June 1996 [Page 50] Internet Draft IP Mobility Support 21 December 1995 A home agent may be configured that has a permanent registration for the fixed node that indicates the mobile router's address as the fixed host's care-of address. The mobile router's home agent will usually be used for this purpose. The home agent is then responsible for advertising connectivity using normal routing protocols to the fixed node. Any packets sent to the fixed node will thus use recursive tunneling as described above. Alternatively, the mobile router may advertise connectivity to the entire mobile network using normal IP routing protocols through a bi-directional tunnel to its own home agent. This method avoids the need for recursive tunneling of packets. 4.6. ARP, Proxy ARP, and Gratuitous ARP The use of ARP [17] requires special rules for correct operation when wireless or mobile nodes are involved. The requirements specified in this section apply to all home networks in which ARP is used for address resolution. In addition to the normal use of ARP for resolving a target node's link-layer address from its IP address, this document distinguishes two special uses of ARP: - A Proxy ARP [20] is an ARP Reply sent by one node on behalf of another node which is either unable or unwilling to answer its own ARP Requests. The sender of a Proxy ARP reverses the Sender and Target Protocol Address fields as described in [17], but supplies its own link-layer address in the Sender Hardware Address field. The node receiving the Reply will then associate the link-layer address of the replying node with the IP address of the original target node, causing it to transmit future datagrams for this target node to the node that sent the Proxy ARP Reply. - A Gratuitous ARP is an ARP Reply that is sent without having been prompted by the receipt of any ARP Request. The ARP Reply is transmitted as a local broadcast packet on the local link. Any node receiving any ARP packet (Request or Reply) MUST update its local ARP cache with the sender IP and link-layer address in the ARP packet, if the receiving node has an entry for that IP address already in its ARP cache [17]. This requirement in the ARP protocol applies even if the ARP packet is an ARP Reply that does not match any ARP Request transmitted by the receiving node. While a mobile node is registered on a foreign network, its home agent uses proxy ARP [20] to reply to ARP Requests it receives that Perkins, editor Expires 21 June 1996 [Page 51] Internet Draft IP Mobility Support 21 December 1995 seek the mobile node's link-layer address. When receiving an ARP Request, the home agent MUST examine the target IP address of the Request, and if this IP address matches the home address of any mobile node for which it has a mobility binding, the home agent MUST transmit an ARP Reply on behalf of the mobile node. After exchanging the sender and target addresses in the packet [20], the home agent MUST set the sender link-layer address in the packet to the link-layer address of its own interface over which the Reply will be sent. When a mobile node leaves its home network and registers a binding on a foreign network, its home agent uses gratuitous ARP to update the ARP caches of nodes on the home network. This causes such nodes to associate the link-layer address of the home agent with the mobile node's home (IP) address. When registering a binding for a mobile node for which the home agent previously had no binding (the mobile node was assumed to be at home), the home agent MUST transmit a gratuitous ARP on behalf of the mobile node. The gratuitous ARP Reply packet is sent on the link on which the mobile node's home address is located. In this ARP Reply, both the sender and target IP addresses MUST be set to the home address of the mobile node, and both the sender and target link-layer addresses MUST be set to the home agent's link-layer address on its interface to the link on which the mobile node's home address is located. This ARP Reply packet SHOULD be retransmitted a small number of times to increase its reliability. When a mobile node returns to its home network, the mobile node and its home agent use gratuitous ARP to cause all nodes on the mobile node's home link to update their ARP caches to once again associate the mobile node's own link-layer address with the mobile node's home (IP) address. Before transmitting the (de)Registration Request message to its home agent, the mobile node MUST transmit a gratuitous ARP Reply packet on its home network. This ARP Reply packet MUST be transmitted as a local broadcast on this link. Both the sender and target IP addresses MUST be set to the home address of the mobile node, and both the sender and target link-layer addresses MUST be set to the mobile node's link-layer address on its interface to the home network. This ARP Reply packet SHOULD be retransmitted a small number of times to increase its reliability, but these retransmissions MAY proceed in parallel with the transmission and processing of its (de)Registration Request. When the mobile node's home agent receives and accepts this (de)Registration Request, the home agent MUST transmit a gratuitous ARP Reply packet on the mobile node's home network. This ARP Reply packet MUST be transmitted as a local broadcast on this link. As with the gratuitous ARP Reply sent by the mobile node above, both Perkins, editor Expires 21 June 1996 [Page 52] Internet Draft IP Mobility Support 21 December 1995 the sender and target IP addresses in the home agent's gratuitous ARP Reply MUST be set to the home address of the mobile node, and both the sender and target link-layer addresses MUST be set to the mobile node's link-layer address on its interface to this link. This ARP Reply packet SHOULD be retransmitted a small number of times to increase its reliability, but these retransmissions MAY proceed in parallel with the transmission and processing of its (de)Registration Reply. Finally, while the mobile node is away from home, it MUST NOT reply to ARP Requests that seek its own link-layer address, unless the ARP Request is sent by a foreign agent with which the mobile node is attempting to register or a foreign agent with which the mobile node has already successfully registered. The specific order in which each of the above requirements for the use of ARP, proxy ARP, and gratuitous ARP are applied, relative to the transmission and processing of the mobile node's Registration Request and Registration Reply messages when leaving home or returning home, are important to the correct operation of the protocol. To summarize the above requirements, when a mobile node leaves its home network, the following steps, in this order, MUST be performed: - The mobile node decides to register away from home, perhaps because it has received an Agent Advertisement from a foreign agent and has not recently received one from its home agent. - Before transmitting the Registration Request, the mobile node disables its own future processing of any ARP Requests it may subsequently receive requesting its link-layer address. - The mobile node transmits its Registration Request. - When the mobile node's home agent receives and accepts the Registration Request, it performs a gratuitous ARP on behalf of the mobile node, and begins using proxy ARP to reply to ARP Requests that it receives requesting the mobile node's link-layer address. If, instead, the home agent rejects the Registration Request, no ARP processing (gratuitous nor proxy) is performed by the home agent. When a mobile node later returns to its home network, the following steps, in this order, MUST be performed: - The mobile node decides to register at home, perhaps because it has received an Agent Advertisement from its home agent. Perkins, editor Expires 21 June 1996 [Page 53] Internet Draft IP Mobility Support 21 December 1995 - Before transmitting the Registration Request, the mobile node re-enables its own future processing of any ARP Requests it may subsequently receive requesting its link-layer address. - The mobile node performs a gratuitous ARP for itself. - The mobile node transmits its Registration Request. - When the mobile node's home agent receives and accepts the Registration Request, it stops using proxy ARP to reply to ARP Requests that it receives requesting the mobile node's link-layer address, and then performs a gratuitous ARP on behalf of the mobile node. If, instead, the home agent rejects the Registration Request, no ARP processing (gratuitous nor proxy) is performed by the home agent. Perkins, editor Expires 21 June 1996 [Page 54] Internet Draft IP Mobility Support 21 December 1995 5. Security Considerations The mobile computing environment is potentially very different from the ordinary computing environment. In many cases, mobile computers will be connected to the network via wireless links. Such links are particularly vulnerable to passive eavesdropping, active replay attacks, and other active attacks. 5.1. Message Authentication Codes Home agents and mobile nodes MUST be able to perform authentication. The default algorithm is keyed MD5 [22], with a key size of 128 bits. The default mode of operation is to both precede and follow the data to be hashed, by the 128-bit key; that is, MD5 is to be used in suffix+prefix mode. The foreign agent SHOULD also support authentication using keyed MD5 and key sizes of 128 bits or greater, with manual key distribution. More authentication algorithms, algorithm modes, key distribution methods, and key sizes MAY also be supported. 5.2. Areas of security concern in this protocol The registration protocol described in this document will result in a mobile node's traffic being tunneled to its care-of address. This tunneling feature could be a significant vulnerability if the registration were not authentic. Such remote redirection, for instance as performed by the mobile registration protocol, is widely understood to be a security problem in the current Internet [3]. Moreover, the Address Resolution Protocol (ARP) is not authenticated, and can potentially be used to steal another host's traffic. The use of "Gratuitous ARP" (see subsection 4.6) brings with it all of the risks associated with the use of ARP. 5.3. Key management This specification requires a strong authentication mechanism (keyed MD5) which precludes many potential attacks based on the Mobile IP registration protocol. However, because key distribution is difficult in the absence of a network key management protocol, messages with the foreign agent are not all required to be authenticated. In a commercial environment it might be important to authenticate all messages between the foreign agent and the home agent, so that billing is possible, and service providers don't provide service to users that are not legitimate customers of that service provider. Perkins, editor Expires 21 June 1996 [Page 55] Internet Draft IP Mobility Support 21 December 1995 5.4. Picking good random numbers The strength of any authentication mechanism is dependent on several factors, including the innate strength of the authentication algorithm, the secrecy of the key used, the strength of the key used, and the quality of the particular implementation. This specification requires implementation of keyed MD5 for authentication, but does not preclude the use of other authentication algorithms and modes. For keyed MD5 authentication to be useful, the 128-bit key must be both secret (that is, known only to authorized parties) and pseudo-random. If nonces are used in connection with replay protection, they must also be selected carefully. Eastlake, et.al. [9] provides more information on generating pseudo-random numbers. 5.5. Privacy Users who have sensitive data that they do not wish others to see should use mechanisms outside the scope of this document (such as encryption) to provide appropriate protection. Users concerned about traffic analysis should consider appropriate use of link encryption. If absolute location privacy is desired, the Mobile Node can create a tunnel to its Home Agent. Then, packets destined for correspondent hosts will appear to emanate from the Home Network, and it may be more difficult to pinpoint the location of the mobile node. 5.6. Replay Protection for Registration Requests The Identification field is used to let the home agent verify that a registration message has been freshly generated by the mobile node, not replayed by an attacker from some previous registration. Two methods are described here: timestamps (mandatory) and "nonces" (optional). All mobile nodes and home agents MUST implement timestamp-based replay protection. These nodes MAY implement nonce-based replay protection (but see appendix A.2 for a patent that may apply to nonce-based replay protection). The style of replay protection in effect between a mobile node and its home agent is part of the mobile security association. A mobile node and its home agent MUST agree on which method of replay protection will be used. The interpretation of the Identification field depends on the method of replay protection as described in the subsequent subsections. Whatever method is used, the low-order 32 bits of the Identification MUST be copied unchanged from the Registration Request to the reply. The foreign agent uses those bits to match Registration Requests Perkins, editor Expires 21 June 1996 [Page 56] Internet Draft IP Mobility Support 21 December 1995 with corresponding replies. The mobile node MUST verify that the low-order 32 bits of any Registration Reply are identical to the bits it sent in the Registration Request. The Identification in a new registration request MUST NOT be the same as in an immediately preceding request, and SHOULD NOT repeat during the lifetime of the selected security context between the mobile node and the home agent. Retransmission as in subsection 3.6.3 is allowed. 5.6.1. Replay Protection using Timestamps The basic principle of timestamp replay protection is that the node generating a message inserts the current time of day, and the node receiving the message checks that this timestamp is sufficiently close to its own time of day. Obviously the two nodes must have adequately synchronized time of day clocks. As usual all messages are protected against tampering by a cryptographic checksum. If timestamps are used, the mobile node sets the Identification field to a 64-bit value formatted as specified by the Network Time Protocol [14]. The low-order 32 bits of the NTP format represent fractional seconds, and those bits which are not available from a time source SHOULD be generated from a good source of randomness. Upon receipt of a Registration Request with a valid Mobile-Home Authentication Extension, the home agent MUST check the Identification field for validity. In order to be valid, the timestamp contained in the Identification field MUST be close enough to the home agent's time of day clock and the timestamp MUST be greater than all previously accepted timestamps for the requesting mobile node. Time tolerances and resynchronization details are specific to a particular mobile security association. If the timestamp is valid, the home agent copies the entire Identification field into the Registration Reply it returns to the mobile node. If the timestamp is not valid, the home agent copies only the low-order 32 bits into the Registration Reply, and supplies the high-order 32 bits from its own time of day. In this latter case, the home agent MUST reject the registration by returning Code 133 (identification mismatch) in the Registration Reply. As described in section 3.6.2.1, the mobile node MUST verify that the low-order 32 bits of the Identification in the Registration Reply are identical to those in the rejected registration attempt, before using the high-order bits for clock resynchronization. Perkins, editor Expires 21 June 1996 [Page 57] Internet Draft IP Mobility Support 21 December 1995 5.6.2. Replay Protection using Nonces Implementors of this optional mechanism should examine appendix A.2 for a patent that may be applicable to nonce-based replay protection. The basic principle of nonce replay protection is that Node A includes a new random number in every message to node B, and checks that Node B returns that same number in its next message to node A. Both messages use a cryptographic checksum to protect against alteration by an attacker. At the same time Node B can send its own nonces in all messages to Node A (to be echoed by node A), so that it too can verify that it is receiving fresh messages. The home agent may be expected to have resources for computing pseudo-random numbers useful as nonces [9]. It inserts a new nonce as the high-order 32 bits of the identification field of every registration reply. The home agent copies the low-order 32 bits of the Identification from the registration request message. When the mobile node receives an authenticated registration reply from the home agent, it saves the high-order 32 bits of the identification for use as the high-order 32 bits of its next registration request. The mobile node is responsible for generating the low-order 32 bits of the Identification in each registration request. Ideally it should generate its own random nonces. However it may use any expedient method, including duplication of the random value sent by the home agent. The method chosen is of concern only to the mobile node, because it is the node that checks for valid values in the registration reply. The high-order and low-order 32 bits of the identification chosen SHOULD both differ from their previous values. The home agent uses a new high-order value and the mobile node uses a new low-order value for replay protection. The foreign agent uses the low-order value to correctly match registration replies with pending requests (see subsection 3.7.1). If a registration message is rejected because of an invalid nonce, the reply always provides the mobile node with a new nonce to be used in the next registration. Thus the nonce protocol is self-synchronizing. 6. Acknowledgments Special thanks to Steve Deering (Xerox PARC), along with Dan Duchamp and John Ioannidis (JI) (Columbia), for forming the working group, chairing it, and putting so much effort into its early development. Perkins, editor Expires 21 June 1996 [Page 58] Internet Draft IP Mobility Support 21 December 1995 Thanks also to Kannan Alaggapan and Greg Minshall for their contributions to the group while performing the duties of chairperson. Thanks to the active members of the Mobile-IP working group, particularly those who contributed text, including (in alphabetical order) - Ran Atkinson (Naval Research Lab), - Dave Johnson (Carnegie Mellon University), - Frank Kastenholz (FTP Software) - Anders Klemets (KTH) - Chip Maguire (KTH - also, JI's advisor and early contributor) - Andrew Myles (Macquarie University), - Al Quirt (Bell Northern Research), - Yakov Rekhter (IBM), and - Fumio Teraoka (Sony). Thanks to Charlie Kunzinger and to Bill Simpson, the editors who produced the first drafts for of this document, reflecting the discussions of the Working Group. Much of the new text in the latest drafts is due to Jim Solomon. Thanks to Greg Minshall (Novell), Phil Karn (Qualcomm), and Frank Kastenholz (FTP Software) for their generous support in hosting interim Working Group meetings. Implementors may note that Anders Klemets has an implementation of the protocol specified here for mobile nodes, foreign agents, and home agents running under SunOS v4.1.3. He is willing to provide it to people wishing to perform beta testing. Contact him at if you would like a copy. There is also a version of mobile-IP which was developed by Vipul Gupta at the State University of New York Binghamton. The software (along with supporting documentation) is available from the Linux Mobile-IP home page at http://anchor.cs.binghamton.edu/~mobileip. A. Patent Issues As of the time of publication, the IETF had been made aware of two patents that may be relevant to implementors of the protocol described in this technical specification. Perkins, editor Expires 21 June 1996 [Page 59] Internet Draft IP Mobility Support 21 December 1995 A.1. IBM Patent #5,159,592 Charles Perkins, editor of this draft, is sole inventor of U.S. Patent No. 5,159,592, assigned to IBM. In a letter dated May 30, 1995, IBM brought this patent to the attention of the IETF, stating that this patent "relates to the Mobile IP." We understand that IBM did not intend to assert that any particular implementation of Mobile IP would or would not infringe the patent, but rather that IBM was meeting what it viewed as a duty to disclose information that could be relevant to the process of adopting a standard. Based on a review of the claims of the patent, IETF believes that a system of registering an address obtained from a foreign agent, as described in the draft, would not necessarily infringe any of the claims of the patent; and that a system in which an address is obtained elsewhere and then registered can be implemented without necessarily infringing any claims of the patent. Accordingly, our view is that the proposed protocol can be implemented without necessarily infringing the Perkins Patent. Parties considering adopting this protocol must be aware that some specific implementations, or features added to otherwise non-infringing implementations, may raise an issue of infringement with respect to this patent or to some other patent. This statement is for the IETF's assistance in its standard-setting procedure, and should not be relied upon by any party as an opinion or guarantee that any implementation it might make or use would not be covered, or would not be asserted by IBM to be covered, by the Perkins Patent or any other patent. As the sole inventor of the patent, Charles Perkins also feels honor-bound to submit his opinion (not informed by legal counsel on the matter, nor by IBM corporate opinion) that the aforementioned patent is relevant to a wide range of technology involving the action of home agents assisting the routing of packets for mobile nodes addressed via a home network. A.2. IBM Patent #5,148,479 This patent, also assigned to IBM, may be relevant to those who implement nonce-based replay protection as described in section 5.6.2. Note that nonce-based replay protection is an optional feature of this specification. Conversely, timestamp-based replay protection (section 5.6.1) is a requirement of this specification. Perkins, editor Expires 21 June 1996 [Page 60] Internet Draft IP Mobility Support 21 December 1995 B. Link-Layer considerations The mobile node primarily uses link-layer mechanisms to decide that its point of attachment has changed. Such indications include the Down/Testing/Up interface status [12], and changes in cell or administration. The mechanisms will be specific to the particular link-layer technology, and are outside the scope of this document. B.1. Point-to-Point Link-Layers The Point-to-Point-Protocol (PPP) [23] and its Internet Protocol Control Protocol (IPCP) [13], negotiates the use of IP addresses. The mobile node SHOULD first attempt to specify its home address. This allows an unrouted link to function correctly. When the home address is not accepted by the peer, but a transient IP address is dynamically assigned, that address MAY be used as the care-of address for registration. When the peer specifies its own IP address, that address MUST NOT be assumed to be the care-of address of a foreign agent or the IP address of a home agent. When router advertisements are received which contain the Mobile Service Extension, registration with the agent SHOULD take place as usual. If the link is bandwidth limited, this method is preferred over use of the transient care-of address. The encapsulation will be removed by the peer, allowing header compression techniques to function correctly [11]. B.2. Multi-Point Link-Layers Another link establishment protocol, IEEE 802.11 [1], might yield the link address of an agent. This link-layer address SHOULD be used to attempt registration. The receipt of an agent's address via a router advertisement supersedes that obtained via IEEE 802.11. C. TCP Considerations C.1. TCP Timers Most hosts and routers which implement TCP/IP do not permit easy configuration of the TCP timer values. When high-delay (e.g. SATCOM) or low-bandwidth (e.g. High-Frequency Radio) links are Perkins, editor Expires 21 June 1996 [Page 61] Internet Draft IP Mobility Support 21 December 1995 in use, the default TCP timer values in many systems may cause retransmissions or timeouts, even when the link and network is actually operating properly with greater than usual delays because of the medium in use. This can cause an inability to create or maintain connections over such links, and can also cause unneeded retransmissions which consume already scarce bandwidth. Vendors are encouraged to make TCP timers more configurable. Vendors of systems designed for the mobile computing markets should pick default timer values more suited to low-bandwidth, high-delay links. Users of mobile nodes should be sensitive to the possibility of timer-related difficulties. C.2. TCP Congestion Management Mobility nodes are likely to use media which have low bandwidth and are more likely to introduce errors, effectively causing more packets to be dropped. This introduces a conflict with the mechanisms for congestion management found in modern versions of TCP. Now, when a packet is dropped, the correspondent's TCP implementation is likely to react as if there were a source of network congestion, and initiate the slow-start mechanisms [5] designed for controlling that problem. However, those mechanisms are inappropriate for overcoming errors introduced by the links themselves, and have the effect of magnifying the discontinuity introduced by the dropped packet. This problem has been analyzed by Caceres, et. al. [4]; there is no easy solution available, and certainly no solution likely to be installed soon on all correspondents. While this problem has nothing to do with any of the specifications in this document, it does illustrate that providing performance transparency to mobile nodes involves understanding mechanisms outside the network layer. It also indicates the need to avoid designs which systematically drop packets; such designs might otherwise be considered favorably when making engineering tradeoffs. Perkins, editor Expires 21 June 1996 [Page 62] Internet Draft IP Mobility Support 21 December 1995 D. Example Scenarios This section shows example Registration Requests for several common scenarios. D.1. Registering with a Foreign Agent's Care-of Address The mobile node receives an Agent Advertisement from a foreign agent and wishes to register with that agent. The mobile node wishes only standard encapsulation, does not want broadcasts, and does not want simultaneous mobility bindings: IP fields: Source Address = mobile node's home address Destination Address = copied from the IP source address of the Agent Advertisement Time to Live = 1 UDP fields: Source Port = Destination Port = 434 Registration Request fields: Type = 1 S=0,B=0,D=0,M=0,G=0 Lifetime = the Lifetime copied from the Mobile Service Extension of the Agent Advertisement Home Address = the mobile node's home address Home Agent = IP address of mobile node's home agent Care-of Address = the Care-of Address copied from the Mobile Service Extension of the Agent Advertisement Identification = Network Time Protocol timestamp or Nonce Extensions: The Mobile-Home Authentication Extension D.2. Registering with a Dynamic Care-of Address The mobile node enters a foreign network that contains no foreign agents. The mobile node obtains an address from a DHCP server for use as its care-of address. The mobile node supports all forms of Perkins, editor Expires 21 June 1996 [Page 63] Internet Draft IP Mobility Support 21 December 1995 encapsulation, desires a copy of all broadcasts on the home network, and does not want simultaneous mobility bindings: IP fields: Source Address = care-of address obtained from DHCP server Destination Address = IP address of home agent Time to Live = 64 UDP fields: Source Port = Destination Port = 434 Registration Request fields: Type = 1 S=0,B=1,D=1,M=1,G=1 Lifetime = 1800 (seconds) Home Address = the mobile node's home address Home Agent = IP address of mobile node's home agent Care-of Address = care-of address obtained from DHCP server Identification = Network Time Protocol timestamp or Nonce Extensions: The Mobile-Home Authentication Extension D.3. Deregistration The mobile node returns home and wishes to deregister all care-of addresses with its home agent. IP fields: Source Address = mobile node's home address Destination Address = IP address of home agent Time to Live = 1 UDP fields: Source Port = Destination Port = 434 Registration Request fields: Type = 1 S=0,B=0,D=0,M=0,G=0 Lifetime = 0 Home Address = the mobile node's home address Home Agent = IP address of mobile node's home agent Care-of Address = the mobile node's home address Identification = Network Time Protocol timestamp or Nonce Extensions: The Mobile-Home Authentication Extension Perkins, editor Expires 21 June 1996 [Page 64] Internet Draft IP Mobility Support 21 December 1995 E. Applicability of Prefix Lengths Extension Caution is indicated with the use of the Prefix Lengths extension over wireless links, due to the irregular coverage areas provided by many wireless transmitters. As a result, it is possible that two foreign agents advertising the same prefix might indeed provide different connectivity to prospective mobile nodes. The Prefix-Lengths Extension SHOULD NOT be included in the advertisements sent by agents in such a configuration. Foreign agents using different wireless interfaces would have to cooperate using special protocols to provide identical coverage in space, and thus be able to claim to have wireless interfaces situated on the same subnetwork. In the case of wired interfaces, a mobile node disconnecting and subsequently connecting to a new point of attachment to another may well send in a new registration request no matter whether the new advertisement is on the same medium as the last recorded advertisement. And, finally, in areas with dense populations of foreign agents it would seem unwise to require the propagation via routing protocols of the subnet prefixes associated with each individual wireless foreign agent; such a strategy could lead to quick depletion of available space for routing tables, unwarranted increases in the time required for processing routing updates, and longer decision times for route selection if routes (which are almost always unnecessary) are stored for wireless "subnets". Perkins, editor Expires 21 June 1996 [Page 65] Internet Draft IP Mobility Support 21 December 1995 References [1] Draft Standard, Wireless LAN MAC and PHY Specifications, Rev. D1. IEEE Document P802.11/D1-94/12, Dec 1994. [2] R. Atkinson. IP Authentication Header. RFC 1826, August 1995. [3] S.M. Bellovin. Security Problems in the TCP/IP Protocol Suite. ACM Computer Communications Review, 19(2), March 1989. [4] Ramon Caceres and Liviu Iftode. The Effects of Mobility on Reliable Transport Protocols. In Proceedings of the 14th International Conference on Distributed Computing Systems, June 1994. [5] Douglas E. Comer. Principles, Protocols, and Architecture, volume 1 of Internetworking with TCP/IP. Prentice Hall, Englewood Cliffs, N.J., second edition, 1991. [6] S. Deering. Host Extensions for IP Multicasting. RFC 1112, August 1989. [7] S. Deering. Router Discovery. RFC 1256, September 1991. [8] R. Droms. Dynamic Host Configuration Protocol. RFC 1541, October 1993. [9] D.E. Eastlake, S.D. Crocker, and J.I. Schiller. Randomness Requirements for Security. RFC 1750, December 1994. [10] S. Hanks, T. Li, D. Farinacci, and P. Traina. Generic Routing Encapsulation (GRE). RFC 1701, October 1994. [11] V. Jacobson. Compressing TCP/IP Headers for Low-Speed Serial Links. RFC 1144, February 1990. [12] K. McCloghrie and F. Kastenholz. Evolution of the Interfaces Group MIP-II. RFC 1573, January 1994. [13] G. McGregor. The PPP Internet Procotol Control Protocol (IPCP). RFC 1332, May 1992. [14] D. Mills. Network Time Protocol (Version 3). RFC 1305, March 1992. [15] C. Perkins. IP Encapsulation within IP. Internet Draft -- work in progress, October 1995. Perkins, editor Expires 21 June 1996 [Page 66] Internet Draft IP Mobility Support 21 December 1995 [16] C. Perkins. Minimal Encapsulation within IP. Internet Draft -- work in progress, July 1995. [17] D. Plummer. An Ethernet Address Resolution Protocol. RFC 826, November 1982. [18] J. Postel. User Datagram Protocol. RFC 768, August 1980. [19] J. Postel. Internet Protocol. RFC 791, September 1981. [20] J. Postel. Multi-LAN Address Resolution. RFC 925, October 1984. [21] J. Reynolds and J. Postel. Assigned Numbers. RFC 1700, October 1994. [22] R. Rivest. The MD5 Message-Digest Algorithm. RFC 1321, April 1992. [23] W. Simpson (Editor). The Point-to-Point Protocol (PPP). RFC 1661, July 1994. Perkins, editor Expires 21 June 1996 [Page 67] Internet Draft IP Mobility Support 21 December 1995 Chair's Addresses The working group can be contacted via the current chairs: Jim Solomon Tony Li Motorola, Inc. cisco systems 1301 E. Algonquin Rd. 170 W. Tasman Dr. Schaumburg, IL 60196 San Jose, CA 95134 Work: +1-708-576-2753 Work: +1-408-526-8186 E-mail: solomon@comm.mot.com E-mail: tli@cisco.com Editor's Address Questions about this memo can also be directed to: Charles Perkins Room J1-A25 T. J. Watson Research Center IBM Corporation 30 Saw Mill River Rd. Hawthorne, NY 10532 Work: +1-914-784-7350 Fax: +1-914-784-7007 E-mail: perk@watson.ibm.com Perkins, editor Expires 21 June 1996 [Page 68]