home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_j_p / draft-ietf-mobileip-optim-06.txt < prev    next >
Text File  |  1997-08-04  |  113KB  |  2,688 lines

  1. Mobile IP Working Group                                  Charles Perkins
  2. INTERNET DRAFT                                          Sun Microsystems
  3. 29 July 1997                                            David B. Johnson
  4.                                               Carnegie Mellon University
  5.  
  6.  
  7.  
  8.                     Route Optimization in Mobile IP
  9.  
  10.                     draft-ietf-mobileip-optim-06.txt
  11.  
  12.  
  13. Status of This Memo
  14.  
  15.    This document is a submission by the Mobile IP Working Group of the
  16.    Internet Engineering Task Force (IETF).  Comments should be submitted
  17.    to the mobile-ip@SmallWorks.COM mailing list.
  18.  
  19.    Distribution of this memo is unlimited.
  20.  
  21.    This document is an Internet-Draft.  Internet-Drafts are working
  22.    documents of the Internet Engineering Task Force (IETF), its areas,
  23.    and its working groups.  Note that other groups may also distribute
  24.    working documents as Internet-Drafts.
  25.  
  26.    Internet-Drafts are draft documents valid for a maximum of six months
  27.    and may be updated, replaced, or obsoleted by other documents at
  28.    any time.  It is inappropriate to use Internet- Drafts as reference
  29.    material or to cite them other than as ``work in progress.''
  30.  
  31.    To learn the current status of any Internet-Draft, please check
  32.    the ``1id-abstracts.txt'' listing contained in the Internet-Drafts
  33.    Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (North
  34.    Europe), ftp.nis.garr.it (South Europe), munnari.oz.au (Pacific Rim),
  35.    ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast).
  36.  
  37.    The Route Optimization protocol extensions for Mobile IP for IPv4
  38.    are actively being worked on within the Mobile IP Working Group,
  39.    although recent emphasis has been on the design and specification of
  40.    Mobile IP for IPv6.  This document represents the current state of
  41.    the Mobile IPv4 Route Optimization extensions.  The design of Route
  42.    Optimization may evolve to more closely follow the design of Mobile
  43.    IPv6, depending upon the suitability of the IPv6 design revisions
  44.    for IPv4, especially the trust model that may be assumed between the
  45.    home agent and correspondent node.  This document may be revised and
  46.    resubmitted once those revisions are evaluated and further developed.
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. Perkins and Johnson           Expires 29 January 1998           [Page i]
  56.  
  57. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  58.  
  59.  
  60. Abstract
  61.  
  62.    This document defines extensions to the operation of the base
  63.    Mobile IP protocol to allow for optimization of datagram routing from
  64.    a correspondent node to a mobile node.  Without Route Optimization,
  65.    all datagrams destined to a mobile node are routed through that
  66.    mobile node's home agent, which then tunnels each datagram to the
  67.    mobile node's current location.  The protocol extensions described
  68.    here provide a means for correspondent nodes that implement them
  69.    to cache the binding of a mobile node and to then tunnel their own
  70.    datagrams for the mobile node directly to that location, bypassing
  71.    the possibly lengthy route for each datagram to and from the mobile
  72.    node's home agent.  Extensions are also provided to allow datagrams
  73.    in flight when a mobile node moves, and datagrams sent based on an
  74.    out-of-date cached binding, to be forwarded directly to the mobile
  75.    node's new binding.
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111. Perkins and Johnson          Expires 29 January 1998           [Page ii]
  112.  
  113. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  114.  
  115.  
  116.  
  117.  
  118.                                 Contents
  119.  
  120.  
  121.  
  122. Status of This Memo                                                    i
  123.  
  124. Abstract                                                              ii
  125.  
  126.  1. Introduction                                                       1
  127.  
  128.  2. Terminology                                                        2
  129.  
  130.  3. Route Optimization Overview                                        3
  131.      3.1. Binding Caches  . . . . . . . . . . . . . . . . . . . . .    3
  132.      3.2. Foreign Agent Smooth Handoff  . . . . . . . . . . . . . .    5
  133.      3.3. Establishing Registration Keys  . . . . . . . . . . . . .    6
  134.            3.3.1. The Home Agent as a KDC . . . . . . . . . . . . .    8
  135.            3.3.2. Using the Foreign Agent as a KDC  . . . . . . . .    9
  136.      3.4. Using Diffie-Hellman with the Foreign Agent . . . . . . .    9
  137.      3.5. Special Tunnels . . . . . . . . . . . . . . . . . . . . .   12
  138.  
  139.  4. Route Optimization Message Formats                                12
  140.      4.1. Binding Warning Message . . . . . . . . . . . . . . . . .   13
  141.      4.2. Binding Request Message . . . . . . . . . . . . . . . . .   14
  142.      4.3. Binding Update Message  . . . . . . . . . . . . . . . . .   15
  143.      4.4. Binding Acknowledge Message . . . . . . . . . . . . . . .   17
  144.      4.5. Route Optimization Authentication Extension . . . . . . .   18
  145.      4.6. Modified Registration Request Message . . . . . . . . . .   19
  146.  
  147.  5. Format of Smooth Handoff Extensions                               19
  148.      5.1. Previous Foreign Agent Notification Extension . . . . . .   20
  149.      5.2. Modified Mobility Agent Advertisement Extension . . . . .   21
  150.  
  151.  6. Messages Requesting A Registration Key                            22
  152.      6.1. Foreign Agent Key Request extension . . . . . . . . . . .   22
  153.      6.2. Mobile Node Public Key extension  . . . . . . . . . . . .   23
  154.      6.3. Foreign Agent Public Key extension  . . . . . . . . . . .   24
  155.      6.4. Registration Key Request Extension  . . . . . . . . . . .   24
  156.  
  157.  7. Extensions to Supply A Registration Key                           25
  158.      7.1. Home-Mobile Key Reply Extension . . . . . . . . . . . . .   26
  159.      7.2. Foreign Agent Key Reply Extension . . . . . . . . . . . .   27
  160.      7.3. Mobile Node Public Key Reply Extension  . . . . . . . . .   28
  161.      7.4. Foreign Agent Public Key Reply Extension  . . . . . . . .   28
  162.      7.5. Diffie-Hellman Key Reply Extension  . . . . . . . . . . .   29
  163.  
  164.  
  165.  
  166.  
  167. Perkins and Johnson          Expires 29 January 1998          [Page iii]
  168.  
  169. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  170.  
  171.  
  172.  8. Using Special Tunnels                                             30
  173.      8.1. Home Agent Handling of Special Tunnels  . . . . . . . . .   31
  174.      8.2. Foreign Agents and Special Tunnels  . . . . . . . . . . .   31
  175.  
  176.  9. Mobile Node Key Requests                                          32
  177.  
  178. 10. Miscellaneous Home Agent Operations                               33
  179.     10.1. Home Agent Rate Limiting  . . . . . . . . . . . . . . . .   33
  180.     10.2. Receiving Registration Key Requests . . . . . . . . . . .   33
  181.     10.3. Mobility Security Association Management  . . . . . . . .   34
  182.     10.4. Home Agent Supplying Registration Keys  . . . . . . . . .   35
  183.  
  184. 11. Miscellaneous Foreign Agent Operations                            36
  185.     11.1. Previous Foreign Agent Notification . . . . . . . . . . .   36
  186.     11.2. Maintaining Binding Caches  . . . . . . . . . . . . . . .   37
  187.     11.3. Rate Limiting . . . . . . . . . . . . . . . . . . . . . .   38
  188.     11.4. Foreign Agent Handling Key Requests . . . . . . . . . . .   38
  189.  
  190. 12. Security Considerations                                           39
  191.  
  192. 13. Summary                                                           39
  193.  
  194.  A. Using a Master Key at the Home Agent                              40
  195.  
  196. References                                                            42
  197.  
  198. Chairs' Addresses                                                     43
  199.  
  200. Authors' Addresses                                                    44
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223. Perkins and Johnson          Expires 29 January 1998           [Page iv]
  224.  
  225. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  226.  
  227.  
  228. 1. Introduction
  229.  
  230.    The base Mobile IP protocol [10], allows any mobile node to move
  231.    about, changing its point of attachment to the Internet, while
  232.    continuing to be identified by its home IP address.  Correspondent
  233.    nodes sending IP datagrams to a mobile node send them to the mobile
  234.    node's home address in the same way as with any other destination.
  235.    This scheme allows transparent interoperation between mobile nodes
  236.    and their correspondent nodes, but forces all datagrams for a mobile
  237.    node to be routed through its home agent.  Thus, datagrams to the
  238.    mobile node are often routed along paths that are significantly
  239.    longer than optimal.  For example, if a mobile node is visiting some
  240.    subnet, even datagrams from a correspondent node on the same subnet
  241.    must be routed through the Internet to the mobile node's home agent
  242.    (on its home network), only then to be tunneled back to the original
  243.    subnet for final delivery.  This indirect routing can significantly
  244.    delay the delivery of the datagrams to mobile nodes, and places an
  245.    unnecessary burden on the networks and routers along their paths
  246.    through the Internet.
  247.  
  248.    In this document, we will define extensions to the operation of
  249.    the base Mobile IP protocol to allow for better routing, so that
  250.    datagrams can be routed from a correspondent node to a mobile node
  251.    without going to the home agent first.  In this document, we refer
  252.    collectively to these extensions as Route Optimization.
  253.  
  254.    Route Optimization extensions provide a means for nodes that
  255.    implement them to cache the binding of a mobile node and to then
  256.    tunnel their own datagrams directly to the care-of address indicated
  257.    in that binding, bypassing the possibly lengthy route to and from
  258.    that mobile node's home agent.  Extensions are also provided to allow
  259.    datagrams in flight when a mobile node moves, and datagrams sent
  260.    based on an out-of-date cached binding, to be forwarded directly to
  261.    the mobile node's new care-of address.
  262.  
  263.    All operation of Route Optimization that changes the routing of IP
  264.    datagrams to the mobile node is authenticated using the same type of
  265.    mechanisms used in the base Mobile IP protocol.  This authentication
  266.    generally relies on a mobility security association established in
  267.    advance between the sender and receiver of such messages.
  268.  
  269.    After Section 2 gives some extra terminology, Section 3 provides
  270.    an overview of the basic protocol operations associated with Route
  271.    Optimization.  Section 4 defines the message types used to update
  272.    binding caches.  Subsequent sections show the formats for each
  273.    message and registration extension in detail, explaining the function
  274.    of each field within the messages.  The formats are presented in
  275.    the same basic order corresponding to the topic outline of the
  276.  
  277.  
  278.  
  279. Perkins and Johnson           Expires 29 January 1998           [Page 1]
  280.  
  281. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  282.  
  283.  
  284.    document.  Home agent considerations in Section 10, and foreign
  285.    agent considerations in Section 11.  Details about the management of
  286.    special tunnels are given in Section 8.
  287.  
  288.  
  289. 2. Terminology
  290.  
  291.    This document introduces the following terminology, in addition to
  292.    that used to describe the base Mobile IP protocol:
  293.  
  294.       Binding cache
  295.  
  296.          A cache of mobility bindings of mobile nodes, maintained by a
  297.          node for use in tunneling datagrams to those mobile nodes.
  298.  
  299.       Binding update
  300.  
  301.          A message indicating a mobile node's current mobility binding,
  302.          and in particular its care-of address.
  303.  
  304.       Registration Key
  305.  
  306.          A secret key shared between a mobile node and a foreign
  307.          agent, that may optionally be established during registration
  308.          with that foreign agent.  When later moving and registering
  309.          a new care-of address elsewhere, the mobile node uses the
  310.          registration key shared with its previous foreign agent to send
  311.          it an authenticated Binding Update to this foreign agent.
  312.  
  313.       Registration Lifetime
  314.  
  315.          The registration lifetime is the time duration for which a
  316.          binding is valid.  The term remaining registration lifetime
  317.          means the amount of time remaining for which a registration
  318.          lifetime is still valid, at some time after the registration
  319.          was approved by the home agent.
  320.  
  321.       Security Parameter Index (SPI)
  322.  
  323.          An index identifying a security context between a pair of
  324.          nodes among the contexts available in the Mobility Security
  325.          Association.  SPI values 0 through 255 are reserved and MUST
  326.          NOT be used in any Mobility Security Association.
  327.  
  328.       Special tunnel
  329.  
  330.          A method of tunneling a datagram in which the outer destination
  331.          address when encapsulating the datagram is set equal to the
  332.  
  333.  
  334.  
  335. Perkins and Johnson           Expires 29 January 1998           [Page 2]
  336.  
  337. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  338.  
  339.  
  340.          inner destination address (the original destination address of
  341.          the datagram).  A special tunnel is used in Route Optimization
  342.          for returning a datagram, addressed to a mobile node, to the
  343.          mobile node's home agent without knowing the home agent's
  344.          address.
  345.  
  346.       Triangle Routing
  347.  
  348.          A situation in which a Correspondent Host's packets to a Mobile
  349.          Host follow a path which is longer than the optimal path
  350.          because the packets must be forwarded to the Mobile Host via a
  351.          Home Agent.
  352.  
  353.  
  354. 3. Route Optimization Overview
  355.  
  356.    This section provides an overview of the protocols and operations of
  357.    Route Optimization.  These can be divided into four main parts:
  358.  
  359.     1. Updating binding caches
  360.  
  361.     2. Managing smooth handoffs between foreign agents
  362.  
  363.     3. Acquiring registration keys for smooth handoffs
  364.  
  365.     4. Special tunnels
  366.  
  367.    The rest of the document goes into detail about each general part of
  368.    the protocol, in the order suggested above.
  369.  
  370.  
  371. 3.1. Binding Caches
  372.  
  373.    Route Optimization provides a means for any node to maintain a
  374.    binding cache containing the care-of address of one or more mobile
  375.    nodes.  When sending an IP datagram to a mobile node, if the sender
  376.    has a binding cache entry for the destination mobile node, it may
  377.    tunnel the datagram directly to the care-of address indicated in the
  378.    cached mobility binding.
  379.  
  380.    In the absence of any binding cache entry, datagrams destined for a
  381.    mobile node will be routed to the mobile node's home network in the
  382.    same way as any other IP datagram, and then tunneled to the mobile
  383.    node's current care-of address by the mobile node's home agent.
  384.    This is the only routing mechanism supported by the base Mobile IP
  385.    protocol.  With Route Optimization, as a side effect of this indirect
  386.    routing of a datagram to a mobile node, the original sender of the
  387.  
  388.  
  389.  
  390.  
  391. Perkins and Johnson           Expires 29 January 1998           [Page 3]
  392.  
  393. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  394.  
  395.  
  396.    datagram may be informed of the mobile node's current mobility
  397.    binding, giving the sender an opportunity to cache the binding.
  398.  
  399.    Any node may maintain a binding cache to optimize its own
  400.    communication with mobile nodes.  A node may create or update a
  401.    binding cache entry for a mobile node only when it has received
  402.    and authenticated the mobile node's mobility binding.  As before,
  403.    each binding in the binding cache also has an associated lifetime,
  404.    specified in the Binding Update message in which the node obtained
  405.    the binding.  After the expiration of this time period, the binding
  406.    is deleted from the cache.  In addition, a node cache may use any
  407.    reasonable strategy for managing the space within the binding cache.
  408.    When a new entry needs to be added to the binding cache, the node may
  409.    choose to drop any entry already in the cache, if needed, to make
  410.    space for the new entry.  For example, a least-recently used (LRU)
  411.    strategy for cache entry replacement is likely to work well.
  412.  
  413.    When a mobile node's home agent intercepts a datagram from the home
  414.    network and tunnels it to the mobile node, the home agent may deduce
  415.    that the original source of the datagram has no binding cache entry
  416.    for the destination mobile node.  The home agent should then send
  417.    a Binding Update message to the original source node, informing it
  418.    of the mobile node's current mobility binding.  No acknowledgment
  419.    for such a Binding Update message is needed, since additional future
  420.    datagrams from this source node intercepted by the home agent for the
  421.    mobile node will cause transmission of another Binding Update.  For
  422.    a Binding Update to be authenticated by the original source node,
  423.    the source node and the home agent must have established a mobility
  424.    security association.
  425.  
  426.    Similarly, when any node (e.g., a foreign agent) receives a tunneled
  427.    datagram, if it has a binding cache entry for the destination mobile
  428.    node (and thus has no visitor list entry for this mobile node), the
  429.    node receiving this tunneled datagram may deduce that the tunneling
  430.    node has an out-of-date binding cache entry for this mobile node.
  431.    In this case, the receiving node should send a Binding Warning
  432.    message to the mobile node's home agent, advising it to send a
  433.    Binding Update message to the node that tunneled this datagram.  The
  434.    mobile node's home agent can be determined from the binding cache
  435.    entry, because the home agent address is learned from the Binding
  436.    Update that established this cache entry.  The address of the node
  437.    that tunneled this datagram can be determined from the datagram's
  438.    header, since the address of the node tunneling this datagram is
  439.    the outer source address of the encapsulated datagram.  As in the
  440.    case of a Binding Update sent by the mobile node's home agent, no
  441.    acknowledgment of this Binding Warning is needed, since additional
  442.    future datagrams for the mobile node tunneled by the same node will
  443.    cause the transmission of another Binding Warning.  However, unlike
  444.  
  445.  
  446.  
  447. Perkins and Johnson           Expires 29 January 1998           [Page 4]
  448.  
  449. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  450.  
  451.  
  452.    the Binding Update message, no authentication of the Binding Warning
  453.    message is necessary, since it does not directly affect the routing
  454.    of IP datagrams to the mobile node.
  455.  
  456.    When sending an IP datagram, if the sending node has a binding cache
  457.    entry for the destination node, it should tunnel the datagram to the
  458.    mobile node's care-of address using the encapsulation techniques used
  459.    by home agents, and described in [8, 9, 4].
  460.  
  461.  
  462. 3.2. Foreign Agent Smooth Handoff
  463.  
  464.    When a mobile node moves and registers with a new foreign agent, the
  465.    base Mobile IP protocol does not notify the mobile node's previous
  466.    foreign agent.  IP datagrams intercepted by the home agent after
  467.    the new registration are tunneled to the mobile node's new care-of
  468.    address, but datagrams in flight that had already been intercepted
  469.    by the home agent and tunneled to the old care-of address when the
  470.    mobile node moved are lost and are assumed to be retransmitted by
  471.    higher-level protocols if needed.  The old foreign agent eventually
  472.    deletes its registration for the mobile node after the expiration of
  473.    the registration lifetime.
  474.  
  475.    Route Optimization provides a means for the mobile node's previous
  476.    foreign agent to be reliably notified of the mobile node's new
  477.    mobility binding, allowing datagrams in flight to the mobile
  478.    node's previous foreign agent to be forwarded to its new care-of
  479.    address.  This notification also allows any datagrams tunneled to
  480.    the mobile node's previous foreign agent, from correspondent nodes
  481.    with out-of-date binding cache entries for the mobile node, to be
  482.    forwarded to its new care-of address.  Finally, this notification
  483.    allows any resources consumed by the mobile node at the previous
  484.    foreign agent (such as radio channel reservations) to be released
  485.    immediately, rather than waiting for its registration lifetime to
  486.    expire.
  487.  
  488.    As part of the registration procedure, the mobile node may
  489.    request that its new foreign agent attempt to notify its previous
  490.    foreign agent on its behalf, by including a Previous Foreign Agent
  491.    Notification extension in its Registration Request message sent to
  492.    the new foreign agent.  The new foreign agent then builds a Binding
  493.    Update message and transmits it to the mobile node's previous foreign
  494.    agent as part of registration, requesting an acknowledgment from the
  495.    previous foreign agent.  The extension includes only those values
  496.    needed to construct the Binding Update message that are not already
  497.    contained in the Registration Request message.  The authenticator
  498.    for the Binding Update message is computed by the mobile node using
  499.    the registration key shared with its previous foreign agent.  This
  500.  
  501.  
  502.  
  503. Perkins and Johnson           Expires 29 January 1998           [Page 5]
  504.  
  505. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  506.  
  507.  
  508.    notification will typically include the mobile node's new care-of
  509.    address, allowing the previous foreign agent to create a binding
  510.    cache entry for the mobile node to serve as a forwarding pointer [5]
  511.    to its new location.  Any tunneled datagrams for the mobile node that
  512.    arrive at its previous foreign agent after the forwarding pointer has
  513.    been created will then be re-tunneled by this foreign agent to the
  514.    mobile node's new care-of address.
  515.  
  516.    For this smooth handoff to be secure, during registration with a
  517.    new foreign agent, the mobile node and the foreign agent usually
  518.    need to establish a new shared secret key called a registration key.
  519.    The registration key is used to authenticate the notification sent
  520.    to the previous foreign agent.  Other uses of the registration key
  521.    are possible, such as for use as an encryption key for providing
  522.    privacy over a wireless link between the mobile node and its foreign
  523.    agent, but such uses are beyond the scope of this specification.
  524.    Once established, the registration key for a mobile node can be
  525.    stored by the foreign agent with the mobile node's visitor list
  526.    entry.  Section 3.3 gives an overview of methods for establishing
  527.    a registration key.  The Mobility Agent Advertisement extension of
  528.    the agent advertisement message is revised under Route Optimization
  529.    to include a bit indicating that the foreign agent sending the
  530.    advertisement supports smooth handoffs.  If this bit is not set in
  531.    the agent advertisement from the foreign agent, the mobile node
  532.    SHOULD not request a registration key in its Registration Request
  533.    message.
  534.  
  535.    The mobile node is responsible for occasionally retransmitting a
  536.    Binding Update message to its previous foreign agent until the
  537.    matching Binding Acknowledge message is received, or until the
  538.    mobile node can be sure that foreign agent has expired its binding.
  539.    The mobile node is likely to select a small timeout value for the
  540.    remaining registration lifetime available to such bindings sent to
  541.    previous foreign agents.
  542.  
  543.  
  544. 3.3. Establishing Registration Keys
  545.  
  546.    Foreign agents are expected to be cheap and widely available, as
  547.    Mobile IP becomes fully deployed.  Mobile nodes will likely find it
  548.    difficult to manage long-term security relationships with so many
  549.    foreign agents.  To securely perform the operations needed for smooth
  550.    handoffs from one foreign agent to the next, however, any careful
  551.    foreign agent should require assurance that it is getting authentic
  552.    handoff information, and not arranging to forward in-flight datagrams
  553.    to a bogus destination.  The biggest complication in the Route
  554.    Optimization protocol involves the creation of (sufficient) trust
  555.    between mobile node and foreign agent when none exists beforehand,
  556.  
  557.  
  558.  
  559. Perkins and Johnson           Expires 29 January 1998           [Page 6]
  560.  
  561. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  562.  
  563.  
  564.    while allowing the use of fully trustworthy security associations
  565.    between foreign agents and mobile nodes whenever they do exist.
  566.  
  567.    Note that the mobile node can only rarely verify the identity of
  568.    the foreign agent in any absolute terms.  It can only act on the
  569.    presumption that the foreign agent is performing its duties by
  570.    correct adherence to protocol.  Again, foreign agents are mostly
  571.    passive devices.  Any entity that is willing to perform the services
  572.    would be accepted by the mobile node, even if the foreign agent were
  573.    somehow malicious "on-the-side".  For instance, neither the mobile
  574.    node nor any home agent would be likely to be able to determine if a
  575.    foreign agent duplicated the mobile node's traffic stream, shared the
  576.    mobile node's data with some adversary, or replayed mobile node data
  577.    after the expiration of the mobile node's binding at that care-of
  578.    address.  If the foreign agent were to perform more active attacks,
  579.    such as dropping datagrams intentionally, or modifying the datagrams
  580.    according to some dark purpose, the mobile node would not necessarily
  581.    know where the problem was originating.  However, all of these same
  582.    points are true as well for existing infrastructure routers, so the
  583.    situation is no worse than already exists.
  584.  
  585.    In short, the exact identity of the foreign agent is not crucial to
  586.    the process of establishing a registration key.  Only an agreement
  587.    to follow protocol can be expected or enforced.  If the mobile node
  588.    has a way to obtain a certified public key for the foreign agent,
  589.    then the identity may be established in a firmer fashion, but the
  590.    needed public key infrastructure seems to be at least five years
  591.    distant.  Therefore, methods are proposed in this document by which
  592.    an anonymous foreign agent (i.e., one whose identity we cannot
  593.    establish) can create a registration key with a mobile node during
  594.    the registration process.  In this document, we propose the following
  595.    methods for establishing a registration key, in order of declining
  596.    preference.  Other methods of establishing keys may become available
  597.    in the future.
  598.  
  599.     1. If the foreign agent and mobile node share a security
  600.        association, it can be used to secure the Previous Foreign Agent
  601.        Notification.
  602.  
  603.     2. If the home agent and foreign agent share a security association,
  604.        the home agent can choose the new registration key.
  605.  
  606.     3. If the foreign agent has a public key, it can again use the home
  607.        agent to supply a registration key.
  608.  
  609.     4. If the mobile node includes its public key in its Registration
  610.        Request, the foreign agent can choose the new registration key.
  611.  
  612.  
  613.  
  614.  
  615. Perkins and Johnson           Expires 29 January 1998           [Page 7]
  616.  
  617. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  618.  
  619.  
  620.     5. The mobile node and its foreign agent can execute a
  621.        Diffie-Hellman key exchange protocol [2] as part of the
  622.        registration protocol.
  623.  
  624.    Once the registration key is established, the method for performing
  625.    smooth handoff seems natural.  The following sections give a
  626.    brief overview of the above listed methods for establishing the
  627.    registration key.  Once the key is established, and able to be used
  628.    by way of a (possibly newly created) SPI, the smooth handoff just
  629.    involves sending a Binding Update to the previous foreign agent at
  630.    the right time.
  631.  
  632.    If a request for key establishment cannot be accommodated by
  633.    the foreign agent and/or the home agent, then the mobile node's
  634.    key request must go unfulfilled.  This does not mean that the
  635.    Registration Request itself fails, so it has no effect on the status
  636.    code returned by the home agent to the mobile node.  The mobile node
  637.    has to be able to handle the case in which it has requested a key but
  638.    the Registration Reply arrives without any key reply extension.
  639.  
  640.  
  641. 3.3.1. The Home Agent as a KDC
  642.  
  643.    Crucial to methods (2) and (3) listed above is that the home agent
  644.    and mobile node already are known to share a mobility security
  645.    association, which can be used to encode the registration key for
  646.    delivery to the mobile node.  Thus, if the home agent can securely
  647.    deliver the key to the foreign agent, it can be used as a Key
  648.    Distribution Center (KDC) for the mobile node and its new foreign
  649.    agent.  The mobile node requests this by including a Registration
  650.    Key Request extension in its Registration Request message.  When the
  651.    home agent chooses the registration key, it sends it back in two
  652.    different extensions to the Registration Reply.  One extension has
  653.    the encrypted key for the foreign agent, and the other extension has
  654.    the same key encrypted differently for the mobile node.
  655.  
  656.    For the registration key to be established using this method, the
  657.    home agent must be able to securely transmit an encrypted copy of the
  658.    registration key to the foreign agent.  This is straightforward if
  659.    the foreign agent already has a mobility security association with
  660.    the home agent.  If mobile nodes from some home network often visit a
  661.    foreign agent, then the effort of creating such a mobility security
  662.    association between that foreign agent and the home agent serving
  663.    their home network may be worthwhile.
  664.  
  665.    Note that MD5 can be used here for the purpose of transmitting
  666.    registration keys, secure against eavesdroppers.  The expression
  667.                expr1 = MD5(secret | regrep | secret) XOR (key)
  668.  
  669.  
  670.  
  671. Perkins and Johnson           Expires 29 January 1998           [Page 8]
  672.  
  673. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  674.  
  675.  
  676.    (where regrep is the Registration Reply message payload, and XOR is
  677.    exclusive-or) can be included within the appropriate Registration
  678.    Reply extension and encodes the key in a way which allows recovery
  679.    only by the recipient.  It is secure against replay because of the
  680.    identification field within the Registration Reply message.  The
  681.    recipient recovers the key by computing
  682.                     expr2== MD5(secret | regrep | secret)
  683.    which then yields key = expr1XOR expr2.  Use of MD5 avoids
  684.    entanglements with the legal issues surrounding the export of
  685.    encryption technology, and reducing the computational power needed to
  686.    secure the password against eavesdroppers.
  687.  
  688.    If no such mobility security association exists, but the foreign
  689.    agent has a public key available, it can still ask the home agent to
  690.    use it to pick a registration key.  This is preferable than asking
  691.    the mobile node to pick a good registration key, because doing so
  692.    may depend upon using resources not available to all mobile nodes.
  693.    Just selecting pseudo-random numbers is by itself a significant
  694.    computational burden.  Moreover, allowing the home agent to pick the
  695.    key fits well into the existing registration procedures.  On the
  696.    other hand, it is possible that a mobile node could do with less than
  697.    perfect pseudo-random numbers as long as the registration key were to
  698.    be used in the restricted fashion envisioned for smooth handoffs.
  699.  
  700.  
  701. 3.3.2. Using the Foreign Agent as a KDC
  702.  
  703.    When the foreign agent and mobile node share a mobility security
  704.    association, there is no need to pick a registration key.  The mobile
  705.    node can secure its Binding Update to the foreign agent whenever it
  706.    needs to, by using the existing security association.  This is the
  707.    most desirable case.
  708.  
  709.    Otherwise, if available, the mobile node can include its public key
  710.    (such as RSA [11]) in its Registration Request to the foreign agent,
  711.    using a mobile node public key extension.  The foreign agent chooses
  712.    the new registration key and returns a copy of it encrypted with the
  713.    mobile node's public key, using a foreign-mobile registration key
  714.    reply extension.
  715.  
  716.  
  717. 3.4. Using Diffie-Hellman with the Foreign Agent
  718.  
  719.    The Diffie-Hellman key-exchange algorithm [2] can be used.
  720.    Diffie-Hellman is a public key cryptosystem that allows two parties
  721.    to establish a shared secret key, such that the shared secret key
  722.    cannot be determined by other parties overhearing the messages
  723.    exchanged during the algorithm.  It is already used, for example, in
  724.  
  725.  
  726.  
  727. Perkins and Johnson           Expires 29 January 1998           [Page 9]
  728.  
  729. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  730.  
  731.  
  732.    other protocols that require a key exchange, such as in the Cellular
  733.    Digital Packet Data (CDPD) system [1].
  734.  
  735.    This technique is known to suffer from a man-in-the-middle attack.
  736.    In other words, a malicious agent could pretend to the foreign
  737.    agent to be the mobile node, and pretend to the mobile node to be
  738.    the foreign agent, and participate as an unwanted third member in
  739.    the key exchange Armed with knowledge of the registration key, the
  740.    malicious agent could at a later time disrupt the smooth handoff, or
  741.    initiate the handoff prematurely.  The man-in-the-middle attack is no
  742.    worse than a malicious agent pretending to be a foreign agent in any
  743.    other circumstance; that is, it is no worse than already exists with
  744.    the base Mobile IP specification [10].  In route optimization, the
  745.    man-in-the-middle attack is prevented in most circumstances because
  746.    each registration key produced by the techniques in this chapter is
  747.    effectively authenticated by the home agent.
  748.  
  749.    Even so, if Diffie-Hellman were not computationally so expensive,
  750.    it could likely serve the needs of many mobile nodes.  Moreover,
  751.    the mobile node and/or the foreign agent are presumably in direct
  752.    contact, so that the malicious man-in-the-middle would be detectable
  753.    with high probability if either of the former nodes notices the
  754.    reception of duplicate packets, and corrective action taken.
  755.    Diffie-Hellman results are returned by the protocol in a way intended
  756.    to avoid such attacks.
  757.  
  758.    But, the algorithm itself uses exponentiations involving numbers
  759.    with hundreds of digits.  That may take a long time for some mobile
  760.    nodes to do, time which would come at the expense of interactivity
  761.    or convenient operation of user application programs.  For this
  762.    reason, Diffie-Hellman is considered the least desirable alternative
  763.    for establishing registration keys.  Even so, since it requires no
  764.    other configuration, it should be required in all implementations of
  765.    foreign agents that advertise support for smooth handoffs.
  766.  
  767.    Briefly, the Diffie-Hellman algorithm involves the use of two large
  768.    public numbers, a prime number (p) and a generator (g).  The prime
  769.    number and the generator must be known by both parties involved in
  770.    the algorithm, but need not be kept secret; these values may be the
  771.    same or different for each execution of the algorithm and are not
  772.    used once the algorithm completes.  Each party chooses a private
  773.    random number, produces a computed value based on this random number,
  774.    the prime and the generator, and sends the computed value in a
  775.    message to the other party.  The computed value is the number g**x
  776.    mod p, where x is the private random number, p is the prime which is
  777.    sent as part of the transaction, and g is the generator.  Each party
  778.    then computes the (same) shared secret key using its own private
  779.    random number, the computed value received from the other party, and
  780.  
  781.  
  782.  
  783. Perkins and Johnson          Expires 29 January 1998           [Page 10]
  784.  
  785. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  786.  
  787.  
  788.    the prime and generator values.  The shared secret is the number c**y
  789.    mod p, where c is the computed value which uses the other party's
  790.    private number, p is the same as before, and y is the receiver's
  791.    private number.  Since (g**x)**y == (g**y)**x, and since knowing the
  792.    computed values mod p does not enable passive listeners to determine
  793.    the private values, the algorithm does successfully allow the two
  794.    parties to agree on an otherwise undetectable secret.
  795.  
  796.    To use this algorithm during registration with a foreign agent, the
  797.    mobile node includes a Registration Key Request extension in its
  798.    Registration Request message, containing its nonzero values for
  799.    the prime and generator, along with the computed value from its
  800.    own private random number.  If no other strategy is available, the
  801.    foreign agent then chooses its own private random number and includes
  802.    a Diffie-Hellman Registration Key Reply extension in its Registration
  803.    Reply message to the mobile node; the extension includes the foreign
  804.    agent's own computed value based on its chosen random number and the
  805.    supplied prime and generator values from the mobile node.  The mobile
  806.    node and foreign agent each independently form the (same) shared
  807.    secret key from their own chosen random number, the computed value
  808.    supplied by the other party, and the prime and generator values.
  809.  
  810.    Establishing a registration key using Diffie-Hellman is
  811.    computationally more expensive than most methods described in
  812.    Section 3.3.  The use of Diffie-Hellman described here, though, is
  813.    designed to allow the Diffie-Hellman computations to be overlapped
  814.    with other activities.  The mobile node may choose (or be manually
  815.    configured with) the prime and generator values at any time, or
  816.    may use the same two values for a number of registrations.  The
  817.    mobile node may also choose its private random number and calculate
  818.    its computed value at any time.  For example, after completing
  819.    one registration, the mobile node may choose the private random
  820.    number for its next registration and begin the computation of
  821.    its new computed value based on this random number, such that it
  822.    has completed this computation before it is needed in its next
  823.    registration.  Even more simply, the mobile node may use the
  824.    same private random number and computed value for any number of
  825.    registrations.  The foreign agent may choose its private random
  826.    number and begin computation of its computed value based on this
  827.    number as soon as it receives the mobile node's Registration Request
  828.    message, and need only complete this computation before it sends
  829.    the matching Registration Reply message for the mobile node's
  830.    registration.
  831.  
  832.    This could be extended to support other similar key exchange
  833.    algorithms, either by adding a new request and reply extension for
  834.    each, or by adding a field in the extensions to indicate which
  835.    algorithm is to be used.  Diffie-Hellman currently seems the only
  836.  
  837.  
  838.  
  839. Perkins and Johnson          Expires 29 January 1998           [Page 11]
  840.  
  841. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  842.  
  843.  
  844.    obvious choice, though; an implementation is available in the free
  845.    RSAREF toolkit from RSA Laboratories [7].
  846.  
  847.  
  848. 3.5. Special Tunnels
  849.  
  850.    Suppose a foreign agent receives a tunneled datagram, but it doesn't
  851.    have a visitor list entry for the mobile node.  Moreover, suppose
  852.    the foreign agent has no binding cache entry for the destination
  853.    mobile node.  To attempt delivery of the datagram in this case, the
  854.    node must encapsulate the datagram as a special tunnel datagram (see
  855.    Section 8), destined to the mobile node.  Using a special tunnel
  856.    allows the home agent to avoid a possible routing loop when a foreign
  857.    agent has forgotten that it is serving the mobile node, perhaps
  858.    because the foreign agent has crashed and lost its visitor list
  859.    state.  The special tunnel allows the home agent to see the address
  860.    of the node that tunneled the datagram, and to avoid tunneling the
  861.    datagram back to the same node.
  862.  
  863.  
  864. 4. Route Optimization Message Formats
  865.  
  866.    Route Optimization defines four message types used for management
  867.    of binding cache entries.  These message types fit in the numbering
  868.    space defined in the base Mobile IP specification for messages sent
  869.    to UDP port 454.  Each of these messages begins with a one-octet
  870.    field indicating the type of the message.  The binding cache
  871.    management messages in this section are carried by way of UDP, sent
  872.    to port 434.
  873.  
  874.    The following type codes are defined in this document:
  875.  
  876.       16     Binding Warning message
  877.       17     Binding Request message
  878.       18     Binding Update message
  879.       19     Binding Acknowledge message
  880.  
  881.    Route Optimization also requires one minor change to existing
  882.    Mobile IP messages:  a new flag bit must be added to the Registration
  883.    Request message, replacing a previously unused, reserved bit in the
  884.    message.
  885.  
  886.    This section describes each of the new Route Optimization messages
  887.    and the change to Registration Request message.
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895. Perkins and Johnson          Expires 29 January 1998           [Page 12]
  896.  
  897. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  898.  
  899.  
  900. 4.1. Binding Warning Message
  901.  
  902.    A Binding Warning message is used to advise a mobile node's home
  903.    agent that another node appears to have either no binding cache entry
  904.    or an out-of-date binding cache entry for some mobile node.  When any
  905.    node detunnels a datagram, if it is not the current foreign agent for
  906.    the destination mobile node, it should send a Binding Warning message
  907.    to the mobile node's home agent.
  908.  
  909.     0                   1                   2                   3
  910.     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
  911.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  912.    |     Type      |                   Reserved                    |
  913.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  914.    |                    Mobile Node Home Address                   |
  915.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  916.    |                       Target Node Address                     |
  917.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  918.  
  919.    The format of the Binding Warning message is illustrated above, and
  920.    contains the following fields:
  921.  
  922.       Type     16
  923.  
  924.       Reserved Sent as 0; ignored on reception.
  925.  
  926.       Mobile Node Home Address
  927.                The home address of the mobile node to which the Binding
  928.                Warning message refers.
  929.  
  930.       Target Node Address
  931.                The address of the node tunneling the datagram that
  932.                caused the Binding Warning message.  This node should be
  933.                the target of the Binding Update message sent by the home
  934.                agent.
  935.  
  936.    A home agent will receive a Binding Warning message if a node
  937.    maintaining a binding cache entry for one of the home agent's mobile
  938.    nodes uses an out-of-date entry.  When a home agent receives a
  939.    Binding Warning message, it should send a Binding Update message to
  940.    the target node address identified in the Binding Warning, giving it
  941.    the current binding for the mobile node identified in the mobile node
  942.    home address field of the Binding Warning.
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951. Perkins and Johnson          Expires 29 January 1998           [Page 13]
  952.  
  953. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  954.  
  955.  
  956. 4.2. Binding Request Message
  957.  
  958.    A Binding Request message is used by a node to request a mobile
  959.    node's current mobility binding from the mobile node's home agent.
  960.  
  961.     0                   1                   2                   3
  962.     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
  963.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  964.    |     Type      |                  Reserved                     |
  965.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  966.    |                    Mobile Node Home Address                   |
  967.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  968.    |                                                               |
  969.    +                         Identification                        +
  970.    |                                                               |
  971.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  972.  
  973.    The format of the Binding Request message is illustrated above, and
  974.    contains the following fields:
  975.  
  976.       Type     17
  977.  
  978.       Reserved Sent as 0; ignored on reception.
  979.  
  980.       Mobile Node Home Address
  981.                The home address of the mobile node to which the Binding
  982.                Request refers.
  983.  
  984.       Identification
  985.                A 64-bit sequence number, assigned by the node sending
  986.                the Binding Request message, used to assist in matching
  987.                requests with replies, and in protecting against replay
  988.                attacks.
  989.  
  990.    When the home agent receives a Binding Request message, it consults
  991.    its home list and determines the correct binding information to be
  992.    sent to the requesting node.  Before satisfying the request, the home
  993.    agent is required to check whether or not the mobile node has allowed
  994.    the information to be disseminated.  If the mobile node specified
  995.    the private (P) bit in its Registration Request message, then the
  996.    home agent must make no further attempt to satisfy Binding Requests
  997.    on behalf of that mobile node.  In this case, the home agent should
  998.    return a Binding Update in which both the care-of address is set
  999.    equal to the mobile node's home address and the lifetime is set to
  1000.    zero.  Such a Binding Update message indicates that the binding cache
  1001.    entry for the specified mobile node should be deleted.
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007. Perkins and Johnson          Expires 29 January 1998           [Page 14]
  1008.  
  1009. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1010.  
  1011.  
  1012. 4.3. Binding Update Message
  1013.  
  1014.    The Binding Update message is used for notification of a mobile
  1015.    node's current mobility binding.  It should be sent by the mobile
  1016.    node's home agent in response to a Binding Request message or a
  1017.    Binding Warning message.  It should also be sent by a mobile node, or
  1018.    by the foreign agent with which the mobile node is registering, when
  1019.    notifying the mobile node's previous foreign agent that the mobile
  1020.    node has moved.
  1021.  
  1022.     0                   1                   2                   3
  1023.     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
  1024.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1025.    |     Type      |A|I|M|G|  Rsvd |            Lifetime           |
  1026.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1027.    |                    Mobile Node Home Address                   |
  1028.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1029.    |                        Care-of Address                        |
  1030.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1031.    |                                                               |
  1032.    +                         Identification                        +
  1033.    |                                                               |
  1034.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1035.    | Extensions ...
  1036.    +-+-+-+-+-+-+-+-
  1037.  
  1038.    The format of the Binding Update message is illustrated above, and
  1039.    contains the following fields:
  1040.  
  1041.       Type     18
  1042.  
  1043.       A        The 'A' (acknowledge) bit is set by the node sending the
  1044.                Binding Update message to request a Binding Acknowledge
  1045.                message be returned.
  1046.  
  1047.       I        The 'I' (identification present) bit is set by the node
  1048.                sending the Binding Update message if the identification
  1049.                field is present in the message.
  1050.  
  1051.       M        If the 'M' (minimal encapsulation) bit is set, datagrams
  1052.                may be tunneled to the mobile node using the minimal
  1053.                encapsulation protocol [9].
  1054.  
  1055.       G        If the 'G' (Generic Record Encapsulation, or GRE) bit is
  1056.                set, datagrams may be tunneled to the mobile node using
  1057.                GRE [4].
  1058.  
  1059.       Rsvd     Reserved.  Sent as 0; ignored on reception.
  1060.  
  1061.  
  1062.  
  1063. Perkins and Johnson          Expires 29 January 1998           [Page 15]
  1064.  
  1065. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1066.  
  1067.  
  1068.       Lifetime The number of seconds remaining before the binding cache
  1069.                entry must be considered expired.  A value of all ones
  1070.                indicates infinity.  A value of zero indicates that no
  1071.                binding cache entry for the mobile node should be created
  1072.                and that any existing binding cache entry (and visitor
  1073.                list entry, in the case of a mobile node's previous
  1074.                foreign agent) for the mobile node should be deleted.
  1075.                The lifetime is typically equal to the remaining lifetime
  1076.                of the mobile node's registration.
  1077.  
  1078.       Mobile Node Home Address
  1079.                The home address of the mobile node to which the Binding
  1080.                Update message refers.
  1081.  
  1082.       Care-of Address
  1083.                The current care-of address of the mobile node.  When set
  1084.                equal to the home address of the mobile node, the Binding
  1085.                Update message instead indicates that no binding cache
  1086.                entry for the mobile node should be created, and any
  1087.                existing binding cache entry (and visitor list entry, in
  1088.                the case of a mobile node's previous foreign agent) for
  1089.                the mobile node should be deleted.
  1090.  
  1091.       Identification
  1092.                If present, a 64-bit number, assigned by the node sending
  1093.                the Binding Request message, used to assist in matching
  1094.                requests with replies, and in protecting against replay
  1095.                attacks.
  1096.  
  1097.    Each Binding Update message indicates the binding's maximum lifetime.
  1098.    When sending the Binding Update message, the home agent should set
  1099.    this lifetime to the remaining registration lifetime.  A node wanting
  1100.    to provide continued service with a particular binding cache entry
  1101.    may attempt to reconfirm that mobility binding before the expiration
  1102.    of the registration lifetime.  Such reconfirmation of a binding cache
  1103.    entry may be appropriate when the node has indications (such as an
  1104.    open transport-level connection to the mobile node) that the binding
  1105.    cache entry is still needed.  This reconfirmation is performed by
  1106.    the node sending a Binding Request message to the mobile node's
  1107.    home agent, requesting it to reply with the mobile node's current
  1108.    mobility binding in a new Binding Update message.  Note that the node
  1109.    maintaining the binding should also keep track of the home agent's
  1110.    address, to be able to fill in the destination IP address of future
  1111.    Binding Requests.
  1112.  
  1113.    When a node receives a Binding Update message, it is required to
  1114.    verify the authentication in the message, using the mobility security
  1115.    association it shares with the mobile node's home agent.  The
  1116.  
  1117.  
  1118.  
  1119. Perkins and Johnson          Expires 29 January 1998           [Page 16]
  1120.  
  1121. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1122.  
  1123.  
  1124.    authentication data is found in the Route Optimization Authentication
  1125.    extension (Section 4.5), which is required.  If the authentication
  1126.    succeeds, then a binding cache entry should be updated for use in
  1127.    future transmissions of data to the mobile node.  Otherwise, an
  1128.    authentication exception should be raised.
  1129.  
  1130.    Under all circumstances, the sending of Binding Update messages is
  1131.    subject to the rate limiting restriction described in Section 10.1.
  1132.  
  1133.    When using nonces for replay protection, the identification field in
  1134.    the Binding Update message is used differently in this case, to still
  1135.    allow replay protection even though the Binding Update is not being
  1136.    sent in reply to a request directly from the target node.  In this
  1137.    case, the home agent is required to set the high-order 32 bits of the
  1138.    identification field to the value of the nonce that will be used by
  1139.    the home agent in the next Binding Update message sent to this node.
  1140.    The low-order 32 bits of the identification field are required to be
  1141.    set to the value of the nonce being used for this message.
  1142.  
  1143.    Thus, on each Binding Update message, the home agent communicates to
  1144.    the target node, the value of the nonce that will be used next time,
  1145.    and if no Binding Updates are lost in the network, the home agent and
  1146.    the target node can remain synchronized with respect to the nonces
  1147.    being used.  If, however, the target node receives a Binding Update
  1148.    with what it believes to be an incorrect nonce, it may resynchronize
  1149.    with the home agent by using a Binding Request message.
  1150.  
  1151.  
  1152. 4.4. Binding Acknowledge Message
  1153.  
  1154.    A Binding Acknowledge message is used to acknowledge receipt of a
  1155.    Binding Update message.  It should be sent by a node receiving the
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175. Perkins and Johnson          Expires 29 January 1998           [Page 17]
  1176.  
  1177. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1178.  
  1179.  
  1180.    Binding Update message if the acknowledge (A) bit is set in the
  1181.    Binding Update message.
  1182.  
  1183.     0                   1                   2                   3
  1184.     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
  1185.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1186.    |     Type      |N|               Reserved                      |
  1187.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1188.    |                    Mobile Node Home Address                   |
  1189.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1190.    |                                                               |
  1191.    +                         Identification                        +
  1192.    |                                                               |
  1193.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1194.  
  1195.    The format of the Binding Acknowledge message is illustrated above,
  1196.    and contains the following fields:
  1197.  
  1198.       Type     19
  1199.  
  1200.       N        If the 'N' (negative acknowledge) bit is set, this
  1201.                acknowledgment is negative.  For instance, if the Binding
  1202.                Update was not accepted, but the incoming datagram has
  1203.                the Acknowledge flag set, then the 'N' bit should be set
  1204.                in this Binding Acknowledge message.
  1205.  
  1206.       Reserved Sent as 0; ignored on reception.
  1207.  
  1208.       Mobile Node Home Address
  1209.                Copied from the Binding Update message being
  1210.                acknowledged.
  1211.  
  1212.       Identification
  1213.                Copied from the Binding Update message being
  1214.                acknowledged, if present there.
  1215.  
  1216.    DISCUSSION:
  1217.  
  1218.       Should there be a code field defined, as with the
  1219.       Registration Reply message, instead of the 'N' bit?
  1220.  
  1221.  
  1222. 4.5. Route Optimization Authentication Extension
  1223.  
  1224.    The Route Optimization Authentication extension is used to
  1225.    authenticate certain Route Optimization management messages.  It
  1226.    has the same format as the three authentication extensions defined
  1227.    for base Mobile IP [10], but is distinguished by its type, which is
  1228.  
  1229.  
  1230.  
  1231. Perkins and Johnson          Expires 29 January 1998           [Page 18]
  1232.  
  1233. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1234.  
  1235.  
  1236.    35.  The authenticator value is computed, as before, from the stream
  1237.    of bytes including the shared secret, the UDP payload (that is, the
  1238.    Route Optimization management message), all prior extensions in
  1239.    their entirety, and the type and length of this extension, but not
  1240.    including the authenticator field itself nor the UDP header.  This
  1241.    extension is required to be used in any Binding Update message.
  1242.  
  1243.  
  1244. 4.6. Modified Registration Request Message
  1245.  
  1246.    One bit is added to the flag bits in the Registration Request message
  1247.    to indicate that the mobile node would like its home agent to keep
  1248.    its mobility binding private.  Normally, the home agent sends Binding
  1249.    Update messages to correspondent nodes as needed to allow them to
  1250.    cache the mobile node's binding.  If the mobile node sets the private
  1251.    ('P') bit in the Registration Request message, the home agent MUST
  1252.    NOT send the mobile node's binding in any Binding Update message.
  1253.    Instead, each Binding Update message should give the mobile node's
  1254.    care-of address equal to its home address, and should give a lifetime
  1255.    value of 0.
  1256.  
  1257.    Thus, the Registration Request message under Route Optimization
  1258.    begins as shown below:
  1259.  
  1260.     0                   1                   2                   3
  1261.     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
  1262.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1263.    |     Type      |S|B|D|M|G|V|P|r|           Lifetime            |
  1264.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1265.    |     (Unchanged ...)
  1266.    +-+-+-+-+-+-+-+-+-+-+-+-+
  1267.  
  1268.       P        The private ('P') bit is set by the node sending the
  1269.                Binding Update message to indicate that the home agent
  1270.                should keep its mobility binding private.  In any Binding
  1271.                Update message sent by the mobile node's home agent, the
  1272.                care-of address should be set equal to the mobile node's
  1273.                home address, and the lifetime should be set equal to 0.
  1274.  
  1275.  
  1276. 5. Format of Smooth Handoff Extensions
  1277.  
  1278.    This section describes the format details for messages which are used
  1279.    to enable a smooth handoff from the previous foreign agent to the new
  1280.    foreign agent when a mobile node initiates a new registration.
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287. Perkins and Johnson          Expires 29 January 1998           [Page 19]
  1288.  
  1289. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1290.  
  1291.  
  1292. 5.1. Previous Foreign Agent Notification Extension
  1293.  
  1294.    The Previous Foreign Agent Notification extension may be included in
  1295.    a Registration Request message sent to a foreign agent.  It requests
  1296.    the new foreign agent to send a Binding Update message to the mobile
  1297.    node's previous foreign agent on behalf of the mobile node, to notify
  1298.    it that the mobile node has moved.  The previous foreign agent may
  1299.    then delete the mobile node's visitor list entry and, if a new
  1300.    care-of address is included in the Binding Update message, create a
  1301.    binding cache entry for the mobile node with its new care-of address.
  1302.    The Previous Foreign Agent Notification extension contains only those
  1303.    values not otherwise already contained in the Registration Request
  1304.    message that are needed for the new foreign agent to construct the
  1305.    Binding Update message.
  1306.  
  1307.     0                   1                   2                   3
  1308.     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
  1309.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1310.    |     Type      |     Length    |         Cache Lifetime        |
  1311.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1312.    |                 Previous Foreign Agent Address                |
  1313.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1314.    |                   New Care-of Address Address                 |
  1315.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1316.    |                              SPI                              |
  1317.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1318.    |                         Authenticator ...
  1319.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1320.  
  1321.       Type     96
  1322.  
  1323.       Length   14 plus the length of the authenticator
  1324.  
  1325.       Cache Lifetime
  1326.                The number of seconds remaining before the binding
  1327.                cache entry created by the previous foreign agent must
  1328.                be considered expired.  A value of all ones indicates
  1329.                infinity.  A value of zero indicates that the previous
  1330.                foreign agent should not create a binding cache entry for
  1331.                the mobile node once it has deleted the mobile node's
  1332.                visitor list entry.  The cache lifetime value is copied
  1333.                into the lifetime field of the Binding Update message.
  1334.  
  1335.       Previous Foreign Agent Address
  1336.                The IP address of the mobile node's previous foreign
  1337.                agent to which the new foreign agent should send a
  1338.                Binding Update message on behalf of the mobile node.
  1339.  
  1340.  
  1341.  
  1342.  
  1343. Perkins and Johnson          Expires 29 January 1998           [Page 20]
  1344.  
  1345. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1346.  
  1347.  
  1348.       New Care-of Address
  1349.                The new care-of address for the new foreign agent to send
  1350.                in the Binding Update message to the previous foreign
  1351.                agent.  This should be either the care-of address being
  1352.                registered in this new registration (i.e., to cause IP
  1353.                datagrams from the previous foreign agent to be tunneled
  1354.                to the new foreign agent) or the mobile node's home
  1355.                address (i.e., to cause the previous foreign agent to
  1356.                delete its visitor list entry only for the mobile node,
  1357.                but not forward datagrams for it).
  1358.  
  1359.       SPI      Security Parameters Index (4 bytes).  An opaque
  1360.                identifier.  The SPI is copied over into the Route
  1361.                Optimization Authentication extension by the new foreign
  1362.                agent.
  1363.  
  1364.       Authenticator
  1365.                The authenticator value to be used in the Route
  1366.                Optimization Authentication extension in the Binding
  1367.                Update message sent by the new foreign agent to the
  1368.                mobile node's previous foreign agent.  This authenticator
  1369.                is calculated only over the Binding Update message body.
  1370.  
  1371.    The binding cache entry created at the mobile node's previous
  1372.    foreign agent is treated in the same way as any other binding cache
  1373.    entry [10].
  1374.  
  1375.  
  1376. 5.2. Modified Mobility Agent Advertisement Extension
  1377.  
  1378.    Performing smooth handoffs requires one minor change to the existing
  1379.    Mobile IP Mobility Agent Advertisement extension [10].  A new
  1380.    flag bit, the 'S' bit, replaces a previously unused reserved bit
  1381.    in the extension, to indicate that the foreign agent supports
  1382.    smooth handoffs, and thus registration key establishment.  By
  1383.    default, every foreign agent that supports smooth handoffs SHOULD at
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399. Perkins and Johnson          Expires 29 January 1998           [Page 21]
  1400.  
  1401. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1402.  
  1403.  
  1404.    least to support the establishment of a registration key by using
  1405.    Diffie-Hellman key exchange.
  1406.  
  1407.     0                   1                   2                   3
  1408.     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
  1409.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1410.    |     Type      |    Length     |        Sequence Number        |
  1411.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1412.    |           Lifetime            |R|B|H|F|M|G|V|T|S|  reserved   |
  1413.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1414.    | (unchanged...)
  1415.    +-+-+-
  1416.  
  1417.    Thus, the proposed modification to the Mobility Agent Advertisement
  1418.    extension, illustrated above, keeps the advertisement almost the same
  1419.    as in the base Mobile IP specification, except for adding following
  1420.    bit:
  1421.  
  1422.       S        The 'S' smooth handoff bit is set by the foreign agent
  1423.                sending the agent advertisement message to indicate that
  1424.                it supports the smooth handoffs and registration key
  1425.                establishment, and thus the Registration Key Request and
  1426.                Diffie-Hellman Registration Key Reply extensions.
  1427.  
  1428.    More detailed information about the handling of this extension by
  1429.    foreign agents is deferred until Section 11.1.
  1430.  
  1431.  
  1432. 6. Messages Requesting A Registration Key
  1433.  
  1434.    The following extensions may be used by mobile nodes or foreign
  1435.    agents to request the establishment of a registration key.  See
  1436.    sections 9,10.4, and 11 for appropriate algorithms which allow each
  1437.    node to tailor the use of these extensions to most closely fit its
  1438.    configured requirements.
  1439.  
  1440.       113     Foreign Agent Key Request Extension
  1441.       114     Mobile Node Public Key Extension
  1442.       115     Foreign Agent Public Key Extension
  1443.       116     Diffie-Hellman Key Request Extension
  1444.  
  1445.  
  1446. 6.1. Foreign Agent Key Request extension
  1447.  
  1448.    If the foreign agent receives a Registration Key Request from
  1449.    a mobile node, and it has a security association with the home
  1450.    agent, it may append the Foreign Agent Key Request extension to
  1451.    the Registration Request after the mobile-home authentication
  1452.  
  1453.  
  1454.  
  1455. Perkins and Johnson          Expires 29 January 1998           [Page 22]
  1456.  
  1457. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1458.  
  1459.  
  1460.    extension.  The home agent will use the SPI specified in the key
  1461.    request extension to encode the registration key in the subsequent
  1462.    Registration Reply message.  The format of the Foreign Agent Key
  1463.    Request extension is illustrated below.
  1464.  
  1465.     0                   1                   2                   3
  1466.     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
  1467.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1468.    |     Type      |    Length     |           SPI .....           |
  1469.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1470.    |      ... SPI (continued)      |
  1471.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1472.  
  1473.       Type     113
  1474.  
  1475.       Length   4
  1476.  
  1477.       SPI      Security Parameters Index (4 bytes).  An opaque
  1478.                identifier.
  1479.  
  1480.  
  1481. 6.2. Mobile Node Public Key extension
  1482.  
  1483.    If the mobile node has a public key, it can ask its prospective
  1484.    foreign agent to choose a registration key, and to use the mobile
  1485.    node's public key to encode the chosen registration key.  No
  1486.    eavesdropper will be able to decode the registration key, even if
  1487.    it is broadcast to all entities with access to the network medium
  1488.    used by the mobile node.  If using the public key, the foreign
  1489.    agent should still include the selected key in the Registration
  1490.    Request before it goes to the home agent.  Then, the home agent can
  1491.    authenticate the selected encoded registration key as part of the
  1492.    Registration Reply message.  The format of the mobile node public key
  1493.    extension is as illustrated below.
  1494.  
  1495.     0                   1                   2                   3
  1496.     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
  1497.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1498.    |     Type      |            Length             |MN Public Key ..
  1499.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1500.    |            ... Mobile Node Public Key, continued ...
  1501.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1502.  
  1503.       Type     114
  1504.  
  1505.       Length   The length (typically larger than 255) of the mobile
  1506.                node's public key
  1507.  
  1508.  
  1509.  
  1510.  
  1511. Perkins and Johnson          Expires 29 January 1998           [Page 23]
  1512.  
  1513. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1514.  
  1515.  
  1516. 6.3. Foreign Agent Public Key extension
  1517.  
  1518.    If the foreign agent has a public key, it can ask the home agent to
  1519.    choose a registration key, and to use the foreign agent's public key
  1520.    to encode the chosen registration key.  Then, the home agent can
  1521.    authenticate the selected encoded registration key as part of the
  1522.    Registration Reply message.  The format of the foreign agent public
  1523.    key extension is as illustrated below.
  1524.  
  1525.     0                   1                   2                   3
  1526.     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
  1527.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1528.    |     Type      |            Length             |     SPI ...   |
  1529.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1530.    |             ... SPI (continued)               |FA Public Key ..
  1531.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1532.    |            Foreign Agent Public Key (continued) ...
  1533.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1534.  
  1535.       Type     115
  1536.  
  1537.       Length   4 plus the length (typically larger than 255) of the
  1538.                foreign agent's public key
  1539.  
  1540.       SPI      Security Parameters Index (4 bytes).  An opaque
  1541.                identifier.
  1542.  
  1543.       Foreign Agent's Public Key
  1544.  
  1545.    The SPI is provided for the home agent to transcribe into the
  1546.    eventual Foreign Agent Public Key Reply extension to the Registration
  1547.    Reply message.
  1548.  
  1549.  
  1550. 6.4. Registration Key Request Extension
  1551.  
  1552.    The Registration Key Request extension, illustrated below, may be
  1553.    included in a Registration Request message sent to a foreign agent.
  1554.    If the length of the parameters in the key request extension are all
  1555.    zero, then the mobile node is asking the foreign agent to supply a
  1556.    key by any means it has available except for Diffie-Hellman.
  1557.  
  1558.    If the lengths are nonzero, then the mobile node is enabling the
  1559.    foreign agent to also perform the Diffie-Hellman key exchange
  1560.    algorithm (as described in Section 3.4) if the other possible key
  1561.    establishment methods are not available.  The foreign agent should
  1562.    then select a good pseudo-random registration key, and include a
  1563.    Diffie-Hellman Registration Key Reply extension, in the Registration
  1564.  
  1565.  
  1566.  
  1567. Perkins and Johnson          Expires 29 January 1998           [Page 24]
  1568.  
  1569. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1570.  
  1571.  
  1572.    Request message sent to the home agent to complete the key exchange.
  1573.    The home agent will also include same extension in the Registration
  1574.    Reply sent to the mobile node, and then it will be authenticated as
  1575.    part of the reply message.
  1576.  
  1577.     0                   1                   2                   3
  1578.     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
  1579.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1580.    |     Type      |             Length            |   Prime ...
  1581.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1582.    |                    ... Prime (continued) ...
  1583.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1584.    |                          Generator ...
  1585.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1586.    |                       Computed Value ...
  1587.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1588.  
  1589.       Type     116
  1590.  
  1591.       Length   3 times the length (in bytes) of each of prime,
  1592.                generator, and computed value.  The values prime,
  1593.                generator, and computed value must all be the same
  1594.                length, which must be a multiple of 8 bits.
  1595.  
  1596.       Prime    One of the two public numbers involved in the
  1597.                Diffie-Hellman key exchange algorithm.  The prime should
  1598.                be a large prime number.
  1599.  
  1600.       Generator
  1601.                One of the two public numbers involved in the
  1602.                Diffie-Hellman key exchange algorithm.  If p is the value
  1603.                of the prime used for this Diffie-Hellman exchange,
  1604.                the generator should be less than p, and should be a
  1605.                primitive root of p.
  1606.  
  1607.       Computed Value
  1608.                The public computed value from the mobile node for this
  1609.                Diffie-Hellman exchange.  The mobile node chooses a large
  1610.                random number, x.  If g is the value of the generator and
  1611.                p is the value of the prime, the computed value in the
  1612.                extension is g**x mod p.
  1613.  
  1614.  
  1615. 7. Extensions to Supply A Registration Key
  1616.  
  1617.    The following extensions are used to supply a registration key to
  1618.    a requesting entity, either a foreign agent or a mobile node, and
  1619.  
  1620.  
  1621.  
  1622.  
  1623. Perkins and Johnson          Expires 29 January 1998           [Page 25]
  1624.  
  1625. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1626.  
  1627.  
  1628.    are the counterparts to corresponding extensions used to request
  1629.    registration keys that are described in the last section.
  1630.  
  1631.       120     Home-Mobile Key Reply Extension
  1632.       121     Foreign Agent Key Reply Extension
  1633.       122     Mobile Node Public Key Reply Extension
  1634.       123     Foreign Agent Public Key Reply Extension
  1635.       124     Diffie-Hellman Key Reply Extension
  1636.  
  1637.  
  1638. 7.1. Home-Mobile Key Reply Extension
  1639.  
  1640.    The home-mobile key reply extension may be used in Registration Reply
  1641.    messages to send a registration key from the mobile node's home agent
  1642.    to the mobile node.  When used, the home agent is required to also
  1643.    include a key reply extension in the Registration Reply message,
  1644.    which gives a copy of the same key to the mobile node's new foreign
  1645.    agent.  The home-mobile key reply extension, illustrated below, is
  1646.    authenticated along with the rest of the Registration Reply message,
  1647.    and thus no additional authenticator is included in the extension.
  1648.    The SPI used to encode the registration key may be different than the
  1649.    SPI used to authenticate the Registration Reply message.
  1650.  
  1651.     0                   1                   2                   3
  1652.     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
  1653.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1654.    |     Type      |            Length             |     SPI ...   |
  1655.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1656.    |             ... SPI (continued)               | MN Enc. Key ...
  1657.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1658.    |                 Mobile Node Encrypted Key ...
  1659.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1660.  
  1661.       Type     120
  1662.  
  1663.       Length   4 plus the length of the encrypted key for the mobile
  1664.                node
  1665.  
  1666.       SPI      Security Parameters Index (4 bytes).  An opaque
  1667.                identifier.
  1668.  
  1669.       Mobile Node Encrypted Key
  1670.                (variable length) The registration key, chosen by
  1671.                the home agent, encrypted under the mobility security
  1672.                association between the home agent and the mobile node.
  1673.                The same key must be sent, encrypted for the foreign
  1674.                agent in a foreign agent registration key extension in
  1675.                this Registration Reply message.
  1676.  
  1677.  
  1678.  
  1679. Perkins and Johnson          Expires 29 January 1998           [Page 26]
  1680.  
  1681. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1682.  
  1683.  
  1684. 7.2. Foreign Agent Key Reply Extension
  1685.  
  1686.    The home-foreign registration key reply extension may be used in
  1687.    Registration Reply messages to send a registration key from the
  1688.    mobile node's home agent to the mobile node's new foreign agent.
  1689.    When used, the home agent is required to also include a home-mobile
  1690.    registration key reply extension in the Registration Reply message,
  1691.    giving a copy of the same key to the mobile node.
  1692.  
  1693.     0                   1                   2                   3
  1694.     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
  1695.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1696.    |     Type      |            Length             |     SPI ...   |
  1697.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1698.    |             ... SPI (continued)               | FA Enc. Key ...
  1699.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1700.    |                Foreign Agent Encrypted Key ...
  1701.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1702.  
  1703.       Type     121
  1704.  
  1705.       Length   4 plus the length of the encrypted foreign agent's key
  1706.                plus the length of the authenticator
  1707.  
  1708.       SPI      Security Parameters Index (4 bytes).  An opaque
  1709.                identifier.
  1710.  
  1711.       Foreign Agent Encrypted Key
  1712.                (variable length) The registration key, chosen by
  1713.                the home agent, encrypted under the mobility security
  1714.                association between the home agent and the foreign agent.
  1715.  
  1716.    The key which is sent in this extension must also be sent by the
  1717.    home agent to the mobile node, encoded for the mobile node in a
  1718.    mobile node registration key extension in the same Registration Reply
  1719.    message.
  1720.  
  1721.    Authentication of the key is performed by use of data within a HA-FA
  1722.    Authentication extension to the Registration Reply message which is
  1723.    required when the Foreign Agent Key Reply extension is used.  Replay
  1724.    protection is accomplished using the identification field in the
  1725.    Registration Request message, which is also used by the foreign agent
  1726.    to identify the pending registration data.
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735. Perkins and Johnson          Expires 29 January 1998           [Page 27]
  1736.  
  1737. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1738.  
  1739.  
  1740. 7.3. Mobile Node Public Key Reply Extension
  1741.  
  1742.    When the mobile node sends a Mobile Node Public Key Request to its
  1743.    prospective foreign agent, the foreign agent can immediately select
  1744.    a registration key.  The foreign agent encodes this registration key
  1745.    into the Mobile Node Public Key Reply extension to the Registration
  1746.    Request, along with an SPI for future reference.  The home agent
  1747.    subsequently transcribes the extension without change into the
  1748.    Registration Reply message.  This procedure allows the mobile node to
  1749.    be protected against common man-in-the-middle attacks.
  1750.  
  1751.    The Mobile Node Public Key Reply message is illustrated below.
  1752.  
  1753.     0                   1                   2                   3
  1754.     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
  1755.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1756.    |     Type      |            Length             |     SPI ...   |
  1757.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1758.    |             ... SPI (continued)               | MN Enc. Key ...
  1759.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1760.    |   ... Mobile Node's Encoded Key (continued) ...
  1761.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1762.  
  1763.       Type     122
  1764.  
  1765.       Length   The length (in bytes) of the computed value.
  1766.  
  1767.       SPI      Security Parameters Index (4 bytes).  An opaque
  1768.                identifier.
  1769.  
  1770.       Mobile Node's Encoded Key
  1771.                The foreign agent chooses a suitable key, possibly a
  1772.                pseudo-random number, and encodes it using the mobile
  1773.                node's public key.
  1774.  
  1775.  
  1776. 7.4. Foreign Agent Public Key Reply Extension
  1777.  
  1778.    In response to a foreign agent public key request extension, the home
  1779.    agent will select a registration key and encode it twice into two
  1780.    separate key reply extensions of the Registration Reply message.  The
  1781.    Foreign Agent Public Key Reply extension contains the registration
  1782.    key encoded with the public key of the foreign agent.
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791. Perkins and Johnson          Expires 29 January 1998           [Page 28]
  1792.  
  1793. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1794.  
  1795.  
  1796.    The Foreign Agent Public Key Reply message is illustrated below.
  1797.  
  1798.     0                   1                   2                   3
  1799.     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
  1800.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1801.    |     Type      |            Length             |     SPI ...   |
  1802.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1803.    |             ... SPI (continued)               | FA Enc. Key ...
  1804.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1805.    |  ...Foreign Agent's Encoded Key (continued) ...
  1806.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1807.  
  1808.       Type     123
  1809.  
  1810.       Length   4 plus the length (in bytes) of the Foreign Agent's
  1811.                Encoded Key.
  1812.  
  1813.       SPI      Security Parameters Index (4 bytes).  An opaque
  1814.                identifier.
  1815.  
  1816.       Foreign Agent's Encoded Key
  1817.                The foreign agent chooses a suitable pseudo-random
  1818.                number, and encodes it using the mobile node's public
  1819.                key.
  1820.  
  1821.    The SPI, provided by the foreign agent for transcribing into this
  1822.    extension, is ultimately targeted for use by the mobile node.
  1823.  
  1824.  
  1825. 7.5. Diffie-Hellman Key Reply Extension
  1826.  
  1827.    The Diffie-Hellman Registration Key Reply extension, illustrated
  1828.    below, should be included in a Registration Request message sent by
  1829.    a foreign agent to the home agent, when the following conditions are
  1830.    met:
  1831.  
  1832.     -  mobile node has included a Registration Key Request extension
  1833.        with nonzero prime and generator in its Registration Request
  1834.        message to the foreign agent, and
  1835.  
  1836.     -  the foreign agent has no public key or security association with
  1837.        the home agent or mobile node.
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847. Perkins and Johnson          Expires 29 January 1998           [Page 29]
  1848.  
  1849. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1850.  
  1851.  
  1852.     0                   1                   2                   3
  1853.     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
  1854.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1855.    |     Type      |            Length             |     SPI ...   |
  1856.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1857.    |             ... SPI (continued)               |Computed Val....
  1858.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1859.    |         ... Computed Value (continued) ...
  1860.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1861.  
  1862.       Type     125
  1863.  
  1864.       Length   4 plus the length (in bytes) of the computed value.
  1865.  
  1866.       SPI      Security Parameters Index (4 bytes).  An opaque
  1867.                identifier.
  1868.  
  1869.       Computed Value
  1870.                The foreign agent chooses a large random number, y.  If g
  1871.                is the value of the generator and p is the value of the
  1872.                prime, the computed value in the extension is gymod p.
  1873.                The values of the generator and prime, if nonzero, are
  1874.                taken from the Registration Key Request extension from
  1875.                the mobile node's Registration Request message.
  1876.  
  1877.    The foreign agent supplies a new SPI along with the new registration
  1878.    key, so that the new key will be useful in the same way as
  1879.    registration keys created by any other method.
  1880.  
  1881.  
  1882. 8. Using Special Tunnels
  1883.  
  1884.    Whenever any node receives a tunneled datagram for which it has no
  1885.    visitor list entry for the datagram's destination, the node is not
  1886.    serving the mobile node as a foreign agent, and thus the care-of
  1887.    address used by the tunnel originator is surely incorrect.  Thus,
  1888.    the tunneling node has an out-of-date binding cache entry for the
  1889.    destination mobile node.  If the node receiving the tunneled datagram
  1890.    has a binding cache entry for the destination, it should re-tunnel
  1891.    the datagram to the care-of address indicated in its binding cache
  1892.    entry.
  1893.  
  1894.    If a foreign agent receiving the tunneled datagram has no binding
  1895.    cache entry for the destination, it cannot re-tunnel the node to
  1896.    its destination.  Instead, the foreign agent should forward the
  1897.    datagram to the destination mobile node's home agent, using a special
  1898.    form of tunneling called a special tunnel.  To tunnel the datagram
  1899.    using a special tunnel, the tunneled datagram's destination address
  1900.  
  1901.  
  1902.  
  1903. Perkins and Johnson          Expires 29 January 1998           [Page 30]
  1904.  
  1905. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1906.  
  1907.  
  1908.    is set equal to the destination address in the tunneled datagram.
  1909.    Thus, both the inner and outer destination addresses are set to
  1910.    the home address of the mobile node.  The tunneled datagram will
  1911.    thus be routed to the mobile node's home network, where it will be
  1912.    intercepted by the mobile node's home agent in the same way as other
  1913.    datagrams addressed to the mobile node.
  1914.  
  1915.  
  1916. 8.1. Home Agent Handling of Special Tunnels
  1917.  
  1918.    The home agent should then tunnel the datagram to the current care-of
  1919.    address for the mobile node.  However, the home agent may not tunnel
  1920.    the datagram to the current care-of address if the special tunnel
  1921.    of the datagram originated at that care-of address, as indicated
  1922.    by the outer source address of the special tunnel.  The use of the
  1923.    special tunnel format allows the home agent to identify the node
  1924.    that tunneled the datagram to it (as well as the original sender of
  1925.    the datagram).  If the home agent believes that the current care-of
  1926.    address for the mobile node is the same as the source of the special
  1927.    tunnel, then the home agent SHOULD discard the datagram.  When that
  1928.    happens, the foreign agent serving the mobile node appears to have
  1929.    lost its entry for the mobile node in its visitor list.  For example,
  1930.    the foreign agent may have crashed and rebooted.
  1931.  
  1932.    Otherwise, after tunneling the datagram to the current care-of
  1933.    address for the mobile node, the home agent should notify the source
  1934.    of the special tunnel of the mobile node's current binding, by
  1935.    sending it a Binding Update message.  The home agent should also
  1936.    send a Binding Update message to the sender of the original datagram
  1937.    (the inner source address of the tunneled datagram), if it shares a
  1938.    mobility security association with this node.
  1939.  
  1940.  
  1941. 8.2. Foreign Agents and Special Tunnels
  1942.  
  1943.    When a foreign agent is the endpoint of a tunneled datagram, it
  1944.    examines its visitor list for an entry for the destination mobile
  1945.    node, as in the base Mobile IP protocol.  If no visitor list entry
  1946.    is found, the foreign agent examines its binding cache for a cache
  1947.    entry for the destination mobile node.  If one is found, the foreign
  1948.    agent re-tunnels the new care-of address indicated in the binding
  1949.    cache entry.  In this case, the foreign agent also may infer that the
  1950.    sender of the datagram has an out-of-date binding cache entry for
  1951.    this mobile node, since it otherwise would have tunneled the datagram
  1952.    directly to the correct new care-of address itself.  The foreign
  1953.    agent should then send a Binding Warning message to the mobile node's
  1954.    home agent.  The foreign agent probably learned the address of the
  1955.    home agent in the Registration Reply message for the mobile node, or
  1956.  
  1957.  
  1958.  
  1959. Perkins and Johnson          Expires 29 January 1998           [Page 31]
  1960.  
  1961. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  1962.  
  1963.  
  1964.    a later Binding Update message from which the binding cache entry was
  1965.    created.
  1966.  
  1967.    If a foreign agent receives a tunneled datagram for a mobile node
  1968.    for which it has no visitor list entry or binding cache entry, the
  1969.    foreign agent should forward the datagram to the mobile node's home
  1970.    agent by sending it as a special tunnel (Section 3.2).  The home
  1971.    agent will intercept the special tunnel datagram addressed to the
  1972.    mobile node in the same way as any datagram for the mobile node while
  1973.    it is away from home.
  1974.  
  1975.  
  1976. 9. Mobile Node Key Requests
  1977.  
  1978.    If the mobile node detects that its new foreign agent supports
  1979.    smooth handoffs, it may initiate that process with its previous
  1980.    foreign agent, as well as asking its new foreign agent to aid in
  1981.    supplying a registration key for the new registration.  The following
  1982.    code fragment illustrates a good algorithm for the mobile node
  1983.    to use during registration, to allow the maximum flexibility in
  1984.    the selection of the new registration key.  Any particular mobile
  1985.    node may be configured to use one, none, or any subset of the
  1986.    key establishment procedures made available as part of the Route
  1987.    Optimization protocol.
  1988.  
  1989.     if (got 'S' bit from advertisement) {
  1990.          if (have registration key with previous FA) {
  1991.                 ;      /* append Previous Foreign Agent Notification */
  1992.          }
  1993.          /* Set up registration key */
  1994.          if (have security association with current FA) {
  1995.                 ;      /* Don't need to create a registration key */
  1996.          }
  1997.          else if (have a public key) {
  1998.                 ;      /* append MN Public Key request */
  1999.          }
  2000.          else if (want D-H exchange) {
  2001.                 /* compute a value for prime p and generator g */
  2002.                 /* use it and append MN Key request */
  2003.          }
  2004.          else   /* append MN key request with null computed value, etc */
  2005.     }
  2006.  
  2007.  
  2008.    In this way, the mobile node can get a registration key whenever one
  2009.    is available by any mechanism specified in this document.
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015. Perkins and Johnson          Expires 29 January 1998           [Page 32]
  2016.  
  2017. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2018.  
  2019.  
  2020. 10. Miscellaneous Home Agent Operations
  2021.  
  2022. 10.1. Home Agent Rate Limiting
  2023.  
  2024.    A home agent is required to provide some mechanism to limit the
  2025.    rate at which it sends Binding Update messages to to the same node
  2026.    about any given mobility binding.  This rate limiting is especially
  2027.    important because it is expected that, within the short term, most
  2028.    Internet nodes will not support maintenance of a binding cache.  In
  2029.    this case, continual transmissions of Binding Update messages to
  2030.    such a correspondent node will only add unnecessary overhead to at
  2031.    the home agent and correspondent node, and along the Internet path
  2032.    between these nodes.
  2033.  
  2034.  
  2035. 10.2. Receiving Registration Key Requests
  2036.  
  2037.    When the home agent receives a Registration Request message, an
  2038.    extension requesting a registration key (Section 6) may be present
  2039.    in the message, requesting the home agent to provide a registration
  2040.    key to the mobile node and its foreign agent, as described in
  2041.    Section 3.2.  In that event, the home agent employs a good algorithm
  2042.    for producing random keys [3] and encrypts the result separately for
  2043.    use by the foreign agent and by the mobile node.  The chosen key is
  2044.    encrypted under the mobility security association shared between the
  2045.    home agent and the mobile node, and the encrypted key is placed in
  2046.    a home-mobile registration key reply extension (Section 7.1) in the
  2047.    Registration Reply message.  The same key also is encrypted under
  2048.    the mobility security association shared between the home agent and
  2049.    the foreign agent, and the encrypted key is placed in a home-foreign
  2050.    registration key reply extension (Section 7.2) in the Registration
  2051.    Reply message.  When the home agent transmits the Registration Reply
  2052.    message containing reply extensions to the foreign agent, the message
  2053.    has the overall structure as follows:
  2054.  
  2055.    -------------------------------------------------------------
  2056.    |IP|UDP| Reg-Reply| MN Key| FA Key| HA-MH Auth.| HA-FA Auth.|
  2057.    -------------------------------------------------------------
  2058.  
  2059.    The mobile node gets the registration key, typically encoded using
  2060.    an algorithm such as that described in Section 3.3.1.  The encoding
  2061.    of the foreign agent's copy of the key depends on the particular
  2062.    key request made by the foreign agent, and may depend upon the SPI
  2063.    specified along with the encoded key.  The HA-FA authentication
  2064.    extension is only included if the home agent and foreign agent share
  2065.    a mobility security association.
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071. Perkins and Johnson          Expires 29 January 1998           [Page 33]
  2072.  
  2073. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2074.  
  2075.  
  2076.    If the home agent cannot satisfy a request to select a registration
  2077.    key, it MAY still satisfy the registration attempt.  In this case,
  2078.    the home agent returns a Registration Reply message indicating
  2079.    success, but does not include any key reply extension.
  2080.  
  2081.  
  2082. 10.3. Mobility Security Association Management
  2083.  
  2084.    One of the most difficult aspects of Route Optimization for Mobile IP
  2085.    in the Internet today is that of providing authentication for all
  2086.    messages that affect the routing of datagrams to a mobile node.
  2087.    In the base Mobile IP protocol, only the home agent is aware of
  2088.    the mobile node's mobility binding and only the home agent tunnels
  2089.    datagrams to the mobile node.  Thus, all routing of datagrams to the
  2090.    mobile node while away from its home network is controlled by the
  2091.    home agent.  Authentication is currently achieved based on a manually
  2092.    established mobility security association between the home agent and
  2093.    the mobile node.  Since the home agent and the mobile node are both
  2094.    owned by the same organization (both are assigned IP addresses within
  2095.    the same IP subnet), this manual configuration is manageable, and
  2096.    (for example) can be performed while the mobile node is at home.
  2097.  
  2098.    However, with Route Optimization, authentication is more difficult
  2099.    to manage, since a Binding Update may in general need to be sent to
  2100.    almost any node in the Internet.  Since no authentication or key
  2101.    distribution protocol is generally available in the Internet today,
  2102.    the Route Optimization procedures defined in this document make
  2103.    use of the same type of manually key distributing used in the base
  2104.    Mobile IP protocol.  For use with Route Optimization, a mobility
  2105.    security association held by a correspondent node or a foreign agent
  2106.    must include the same parameters as required by base Mobile IP [10].
  2107.  
  2108.    For a correspondent node to be able to create a binding cache entry
  2109.    for a mobile node, the correspondent node and the mobile node's
  2110.    home agent are required to have established a mobility security
  2111.    association.  This mobility security association, though, could
  2112.    conceivably be used in creating and updating binding cache entries
  2113.    at this correspondent node for all mobile nodes served by this home
  2114.    agent.  Doing so places the correspondent node in a fairly natural
  2115.    relationship with respect to the mobile nodes served by this home
  2116.    agent.  For example, the mobile nodes may represent different people
  2117.    affiliated with the same organization owning the home agent, with
  2118.    which the user of the correspondent node often collaborates.  The
  2119.    effort of establishing such a mobility security association with
  2120.    the relevant home agent may be more easily justified (appendix A)
  2121.    than the effort of doing so with each mobile node.  It is similarly
  2122.    possible for a home agent to have a manually established mobility
  2123.    security association with the foreign agents often used by its mobile
  2124.  
  2125.  
  2126.  
  2127. Perkins and Johnson          Expires 29 January 1998           [Page 34]
  2128.  
  2129. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2130.  
  2131.  
  2132.    nodes, or for a particular mobile node to have a manually established
  2133.    mobility security association with the foreign agents serving the
  2134.    foreign networks that it often visits.
  2135.  
  2136.    In general, if the movement and communication patterns of a mobile
  2137.    node or the group of mobile nodes served by the same home agent are
  2138.    sufficient to justify establishing a mobility security association
  2139.    with the mobile node's home agent, users or network administrators
  2140.    are likely to do so.  Without establishing a mobility security
  2141.    association, nodes will not currently be able to use the Route
  2142.    Optimization extensions but can use the base Mobile IP protocol.
  2143.  
  2144.  
  2145. 10.4. Home Agent Supplying Registration Keys
  2146.  
  2147.    When the home agent receives a Registration Request message
  2148.    with registration key extensions, it usually performs one of two
  2149.    operations:
  2150.  
  2151.     -  select and encode a registration key for both the mobile node and
  2152.        the foreign agent, or
  2153.  
  2154.     -  transcribe the registration key already selected by the foreign
  2155.        agent into the appropriate extension to the Registration Reply
  2156.        message.
  2157.  
  2158.    Both operations ensure that the mobile node and home agent are
  2159.    dealing with the same foreign agent.
  2160.  
  2161.    When building the Registration Reply, the home agent should follow
  2162.    an algorithm such as the one illustrated below, to be as useful as
  2163.    possible for the range of registration key establishment scenarios
  2164.    that are possible given the current route optimization protocol.
  2165.  
  2166.         /* Set up registration key */
  2167.         if (Foreign Agent Key Request) { /* then have security assn.  */
  2168.                /* append MN Key Reply to Registration Reply */
  2169.                /* append FA key reply to Registration Reply */
  2170.         }
  2171.         else if ((have foreign agent public key) ||
  2172.                   (have FA Public Key Reply)) {
  2173.                /* append MN Key Reply to Registration Reply */
  2174.                /* append FA Public Key Reply to Registration Reply */
  2175.         }
  2176.         else {
  2177.                /* do nothing */
  2178.         }
  2179.         /* append mobile-home authentication extension at end */
  2180.  
  2181.  
  2182.  
  2183. Perkins and Johnson          Expires 29 January 1998           [Page 35]
  2184.  
  2185. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2186.  
  2187.  
  2188. 11. Miscellaneous Foreign Agent Operations
  2189.  
  2190.    This section details various operational considerations important
  2191.    for foreign agents wishing to support smooth handoff.  This includes
  2192.    processing Previous Foreign Agent Notification messages, algorithms
  2193.    for establishment of registration keys, use of special tunnels, and
  2194.    the maintenance of up-to-date binding cache entries.
  2195.  
  2196.  
  2197. 11.1. Previous Foreign Agent Notification
  2198.  
  2199.    When a foreign agent receives a Previous Foreign Agent Notification
  2200.    message, it creates a Binding Update for the previous foreign agent,
  2201.    using the specified SPI and precomputed authenticator sent to it by
  2202.    the mobile node.  The Binding Update message is also required to set
  2203.    the 'A' bit, so that the previous foreign agent will know to send a
  2204.    Binding Acknowledge message back to the mobile node.
  2205.  
  2206.    When the previous foreign agent receives the Binding Update, it will
  2207.    authenticate the message using the mobility security association and
  2208.    SPI set up with the registration key established with the mobile
  2209.    node during its registration with this mobile node.  If the message
  2210.    authentication is correct, the visitor list entry for this mobile
  2211.    node at the previous foreign agent will be deleted and a Binding
  2212.    Acknowledge message returned to the sender.  In addition, if a new
  2213.    care-of address was included in the Binding Update message, the
  2214.    previous foreign agent will create a binding cache entry for the
  2215.    mobile node; the previous foreign agent can then tunnel datagrams
  2216.    to the mobile node's new care-of address using that binding cache,
  2217.    just as any node maintaining a binding cache.  The previous foreign
  2218.    agent is also expected to return a Binding Acknowledge message to the
  2219.    mobile node.
  2220.  
  2221.    Note that this Binding Acknowledge is addressed to the mobile node,
  2222.    and thus needs to be tunneled using the new binding cache entry.  The
  2223.    tunneled acknowledgment then should be delivered directly to the
  2224.    new foreign agent, without having to go to the home network.  This
  2225.    creates an interesting problem for the new foreign agent when it
  2226.    receives the acknowledgment before the Registration Reply from the
  2227.    home agent.  It is suggested that the new foreign agent deliver the
  2228.    acknowledgment to the mobile node anyway, even though the mobile
  2229.    node is technically unregistered.  If there is concern that this
  2230.    provides a loophole for unauthorized traffic to the mobile node, the
  2231.    new foreign agent could limit the number of datagrams delivered to
  2232.    the unregistered mobile node to this single instance.  Alternatively,
  2233.    a new extension to the Registration Reply message can be defined to
  2234.    carry along the acknowledgment from the previous foreign agent.  This
  2235.    latter approach would have the benefit that fewer datagrams would
  2236.  
  2237.  
  2238.  
  2239. Perkins and Johnson          Expires 29 January 1998           [Page 36]
  2240.  
  2241. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2242.  
  2243.  
  2244.    be transmitted over bandwidth-constrained wireless media during
  2245.    registration.
  2246.  
  2247.    When the Binding Acknowledge message from the previous foreign agent
  2248.    is received by the new foreign agent, it detunnels it and sends
  2249.    it to the mobile node.  In this way, the mobile node can discover
  2250.    that its previous foreign agent has received the Binding Update
  2251.    message.  The mobile node has to be certain that its previous foreign
  2252.    agent has been notified about its new care-of address, because
  2253.    otherwise the previous foreign agent could become a "black hole"
  2254.    for datagrams destined for the mobile node based on out-of-date
  2255.    binding cache entries at other nodes.  The new foreign agent has no
  2256.    further responsibility for helping to update the binding cache at the
  2257.    previous foreign agent, and does not retransmit the message even if
  2258.    no acknowledgment is received.
  2259.  
  2260.    If the acknowledgment has not been received after sufficient time,
  2261.    the mobile node is responsible for retransmitting another Binding
  2262.    Update message to its previous foreign agent.  Although the previous
  2263.    foreign agent may have already received and processed the Binding
  2264.    Update message (the Binding Acknowledge message may have been lost in
  2265.    transit to the new foreign agent), the mobile node should continue
  2266.    to retransmit its Binding Update message until the previous foreign
  2267.    agent responds with a Binding Acknowledge.
  2268.  
  2269.    The registration key established with this previous foreign agent
  2270.    is typically destroyed as a part of the processing of this Binding
  2271.    Update message, or soon afterwards.  Since the previous foreign
  2272.    agent deletes the visitor list entry for the mobile node, it also
  2273.    deletes its record of the registration key.  A registration key is
  2274.    thus useful only for the notification to the previous foreign agent
  2275.    after moving to a new care-of address.  When no subsequent use of
  2276.    this registration key is expected, no reply protection is necessary
  2277.    for the Binding Update message used for the notification.  Some
  2278.    foreign agents may choose to retain the key for a short time in case
  2279.    the mobile node does not receive the acknowledgment and resends the
  2280.    Binding Update later.
  2281.  
  2282.  
  2283. 11.2. Maintaining Binding Caches
  2284.  
  2285.    It is possible that the binding cache entry taken by the previous
  2286.    foreign agent from the information in the abovementioned extension
  2287.    will be deleted from its cache at any time.  In this case, the
  2288.    previous foreign agent will be unable to re-tunnel subsequently
  2289.    arriving tunneled datagrams for the mobile node, and would resort to
  2290.    using a special tunnel.  Mobile nodes SHOULD assign small lifetimes
  2291.  
  2292.  
  2293.  
  2294.  
  2295. Perkins and Johnson          Expires 29 January 1998           [Page 37]
  2296.  
  2297. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2298.  
  2299.  
  2300.    to such bindings so that they will not take up space in the foreign
  2301.    agent's binding cache for very long.
  2302.  
  2303.  
  2304. 11.3. Rate Limiting
  2305.  
  2306.    A foreign agent is required to provide some mechanism to limit the
  2307.    rate at which it sends Binding Warning messages to the same node
  2308.    about any given mobility binding.  This rate limiting is especially
  2309.    important because it is expected that, within the short term, many
  2310.    Internet nodes will not support maintenance of a binding cache.  In
  2311.    this case, continual transmissions of Binding Warning messages to
  2312.    such a correspondent node will only add unnecessary overhead to at
  2313.    the foreign agent and correspondent node, and along the Internet path
  2314.    between these nodes.
  2315.  
  2316.  
  2317. 11.4. Foreign Agent Handling Key Requests
  2318.  
  2319.    The foreign agent, when it receives a request from a mobile node for
  2320.    a registration key, is faced with a variety of possible actions.  The
  2321.    action selected by the foreign agent depends on the resources it has
  2322.    available.  The foreign agent typically attempts to reduce as much
  2323.    as possible the computational burden placed on the mobile node, but
  2324.    relies on the security association with the greatest cryptographic
  2325.    strength to encode the registration key.  Furthermore, if the foreign
  2326.    agent performs the key selection, it still supplies the encoded key
  2327.    in an extension to the Registration Request message, so that the
  2328.    process of registration will also have the effect of authenticating
  2329.    its choice of registration key to the mobile node.  This strategy
  2330.    reduces the opportunity for interlopers to mount man-in-the-middle
  2331.    attacks.
  2332.  
  2333.    The following code fragment, executed when the foreign agent receives
  2334.    a key request of some variety, exhibits an algorithm which may be
  2335.    useful for implementors of foreign agents.  The algorithm is supposed
  2336.    to be used when a foreign agent gets a Registration Request with one
  2337.    of the key request extensions included.
  2338.  
  2339.         if (Previous Foreign Agent Notification) {
  2340.                /* build the Binding Update and authentication extension */
  2341.         }
  2342.  
  2343.         /* Set up registration key */
  2344.         if (have security association with HA) {
  2345.                /* Append FA key request to Registration Request */
  2346.         }
  2347.         else if (have a public key) {
  2348.  
  2349.  
  2350.  
  2351. Perkins and Johnson          Expires 29 January 1998           [Page 38]
  2352.  
  2353. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2354.  
  2355.  
  2356.                /* append FA Public Key request to Registration Request */
  2357.         }
  2358.         else if (have mobile node's public key) {
  2359.                /* pick a good key */
  2360.                /* append FA Public Key Reply to Registration Request */
  2361.         }
  2362.         else if (want D-H exchange) {
  2363.                /* start the computation */
  2364.                /* append the result to the Registration Key Request */
  2365.         else {
  2366.                /* do nothing */
  2367.         }
  2368.  
  2369.  
  2370.  
  2371. 12. Security Considerations
  2372.  
  2373.    Whenever the foreign agent is involved with the production of a
  2374.    registration key by use of the Diffie-Hellman algorithm, the process
  2375.    is susceptible to the "man-in-the-middle" attack, as detailed in
  2376.    Section 3.4.  This attack is not known to produce further difficulty,
  2377.    and susceptibility is already inherent in the operation of the base
  2378.    Mobile IP specification [10].  Attention to this detail is warranted
  2379.    during any future changes to the Route Optimization protocol, and
  2380.    ways to reduce the risk of direct interest for inclusion into future
  2381.    revisions of this document.
  2382.  
  2383.    The calculation of the authentication data described in Section 3.3.1
  2384.    is specified to be the same as in the base Mobile IP document for
  2385.    ease of implementation.  There is a better method available (HMAC),
  2386.    specified in RFC 2104 [6].  If the base Mobile IP specification is
  2387.    updated to use HMAC, then this route optimization specification
  2388.    should also be updated similarly.
  2389.  
  2390.    Registration keys should typically NOT be used as master keys for
  2391.    producing other derived keys, because of the man-in-the-middle attack
  2392.    associated with unidentifiable foreign agents.
  2393.  
  2394.  
  2395. 13. Summary
  2396.  
  2397.    In this document, we have presented the current protocol definition
  2398.    for Route Optimization, by which is meant the elimination of triangle
  2399.    routing whenever the correspondent node is able to perform the
  2400.    necessary protocol operations.  The Route Optimization protocol
  2401.    definition is largely concerned with three areas:
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407. Perkins and Johnson          Expires 29 January 1998           [Page 39]
  2408.  
  2409. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2410.  
  2411.  
  2412.     -  Supplying a Binding Update to any correspondent node that needs
  2413.        one (and has some realistic chance to process it correctly)
  2414.  
  2415.     -  Providing means to create the needed authentication and replay
  2416.        protection so that the recipient of a binding update message can
  2417.        believe it, and
  2418.  
  2419.     -  Allowing for the mobile node and foreign agent to create a
  2420.        registration key for later use in making a smooth transitions to
  2421.        a new point of attachment.
  2422.  
  2423.    The ways provided for the mobile node and foreign agent to obtain a
  2424.    registration key are as follows:
  2425.  
  2426.     -  Use the mobility security association they share if it exists
  2427.  
  2428.     -  Use the mobile node's public key if it exists
  2429.  
  2430.     -  Use the foreign agent's public key, if it exists, to enable the
  2431.        home agent to create public keys for both entities, or
  2432.  
  2433.     -  Use the security association between the foreign agent and home
  2434.        agent, if it exists, to enable the home agent to create the
  2435.        registration keys for both entities, or
  2436.  
  2437.     -  Use the Diffie-Hellman key exchange algorithm.
  2438.  
  2439.    Lastly, we detail the use of special tunnels, so that foreign agents
  2440.    that lose track of one of their visiting mobile nodes can still
  2441.    forward datagrams to the home agent for another try at delivery.
  2442.  
  2443.  
  2444. A. Using a Master Key at the Home Agent
  2445.  
  2446.    Rather than storing each mobility security association that it has
  2447.    established with many different correspondent nodes and foreign
  2448.    agents, a home agent may manage its mobility security associations so
  2449.    that each of them can be generated from a single master key.  With
  2450.    the master key, the home agent could build a key for any given other
  2451.    node by computing the node-specific key as
  2452.                 MD5(node-address | master-key | node-address)
  2453.    where node-address is the IP address of the particular node for which
  2454.    the home agent is building a key, and master-key is the single master
  2455.    key held by the home agent for all mobility security associations it
  2456.    has established with correspondent nodes.  The node-specific key is
  2457.    built by computing an MD5 hash over a string consisting of the master
  2458.    key with the node-address concatenated as a prefix and as a suffix.
  2459.  
  2460.  
  2461.  
  2462.  
  2463. Perkins and Johnson          Expires 29 January 1998           [Page 40]
  2464.  
  2465. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2466.  
  2467.  
  2468.    Using this scheme, when establishing each mobility security
  2469.    association, the network administrator managing the home agent
  2470.    computes the node-specific key and communicates this key to the
  2471.    network administrator of the other node through some secure channel,
  2472.    such as over the telephone.  The mobility security association
  2473.    is configured at this other node in the same way as any mobility
  2474.    security association.  At the home agent, though, no record need be
  2475.    kept that this key has been given out.  The home agent need only be
  2476.    configured to know that this scheme is in use for all of its mobility
  2477.    security associations (perhaps only for specific set of its mobile
  2478.    nodes).
  2479.  
  2480.    When the home agent needs a mobility security association as part
  2481.    of Route Optimization, it builds the node-specific key based on the
  2482.    master key and the IP address of the other node with which it is
  2483.    attempting to authenticate.  If the other node knows the correct
  2484.    node-specific key, the authentication will succeed; otherwise, it
  2485.    will fail as it should.
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519. Perkins and Johnson          Expires 29 January 1998           [Page 41]
  2520.  
  2521. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2522.  
  2523.  
  2524. References
  2525.  
  2526.     [1] CDPD consortium.  Cellular Digital Packet Data Specification,
  2527.         July 1993.
  2528.  
  2529.     [2] W. Diffie and M. Hellman.  New Directions in Cryptography.  IEEE
  2530.         Transactions on Information Theory, 22:644--654, November 1976.
  2531.  
  2532.     [3] Donald E. Eastlake, Stephen D. Crocker, and Jeffrey I. Schiller.
  2533.         Randomness Recommendations for Security.  RFC 1750, December
  2534.         1994.
  2535.  
  2536.     [4] Stan Hanks, Tony Li, Dino Farinacci, and Paul Traina.  Generic
  2537.         Routing Encapsulation (GRE).  RFC 1701, October 1994.
  2538.  
  2539.     [5] David B. Johnson.  Scalable and Robust Internetwork Routing
  2540.         for Mobile Hosts.  In Proceedings of the 14th International
  2541.         Conference on Distributed Computing Systems, pages 2--11, June
  2542.         1994.
  2543.  
  2544.     [6] H. Krawczyk, M. Bellare, and R. Cannetti.  HMAC: Keyed-Hashing
  2545.         for Message Authentication.  RFC 2104, February 1997.
  2546.  
  2547.     [7] RSA Laboratories.  Rsaref:  A cryptographic toolkit, version
  2548.         2.0, 1994.  http://www.consensus.com/rsaref/index.html.
  2549.  
  2550.     [8] Charles Perkins.  IP Encapsulation within IP.  RFC 2003, May
  2551.         1996.
  2552.  
  2553.     [9] Charles Perkins.  Minimal Encapsulation within IP.  RFC 2004,
  2554.         May 1996.
  2555.  
  2556.    [10] C. Perkins, Editor.  IPv4 Mobility Support.  RFC 2002, October
  2557.         1996.
  2558.  
  2559.    [11] Bruce Schneier.  Applied Cryptography:  Protocols, Algorithms,
  2560.         and Source Code in C.  John Wiley, New York, NY, USA, 1994.
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575. Perkins and Johnson          Expires 29 January 1998           [Page 42]
  2576.  
  2577. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2578.  
  2579.  
  2580. Chairs' Addresses
  2581.  
  2582.    The working group can be contacted via the current chairs:
  2583.  
  2584.       Jim Solomon
  2585.       Motorola, Inc.
  2586.       1301 E. Algonquin Road
  2587.       Schaumburg, IL 60196
  2588.       USA
  2589.  
  2590.       Phone:  +1-847-576-2753
  2591.       E-mail:  solomon@comm.mot.com
  2592.  
  2593.  
  2594.       Erik Nordmark
  2595.       Sun Microsystems, Inc.
  2596.       901 San Antonio Road
  2597.       Palo Alto, California 94303
  2598.       USA
  2599.  
  2600.       Phone:  +1 415 786-5166
  2601.       Fax:  +1 415 786-5896
  2602.       E-mail:  nordmark@sun.com
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631. Perkins and Johnson          Expires 29 January 1998           [Page 43]
  2632.  
  2633. Internet Draft       Route Optimization in Mobile IP        29 July 1997
  2634.  
  2635.  
  2636. Authors' Addresses
  2637.  
  2638.    Questions about this document can also be directed to the authors:
  2639.  
  2640.       Charles E. Perkins
  2641.       Technology Development Group
  2642.       Mail Stop MPK15-214
  2643.       Room 2682
  2644.       Sun Microsystems, Inc.
  2645.       901 San Antonio Road
  2646.       Palo Alto, California 94303
  2647.       USA
  2648.  
  2649.       Phone:  +1-415-786-6464
  2650.       Fax:  +1-415-786-6445
  2651.       email:  charles.perkins@Sun.COM
  2652.  
  2653.  
  2654.       David B. Johnson
  2655.       Computer Science Department
  2656.       Carnegie Mellon University
  2657.       5000 Forbes Avenue
  2658.       Pittsburgh, PA 15213-3891
  2659.  
  2660.       Phone:  +1-412-268-7399
  2661.       Fax:  +1-412-268-5576
  2662.       E-mail:  dbj@cs.cmu.edu
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687. Perkins and Johnson          Expires 29 January 1998           [Page 44]
  2688.