Mobile IPv6 Data Structures
The following data structures are needed to facilitate the processes of Mobile IPv6:
- Binding cache
- Binding update list
- Home agents list
Binding Cache
The binding cache is a table maintained by each correspondent node and home agent that contains the current bindings for mobile nodes. Each binding cache entry contains the following information:
- The home address for the mobile node
- The care-of address for the mobile node
- The lifetime of the binding cache entry
The lifetime is obtained from a Lifetime field of the last Binding Update message that was received for this cache entry. - A flag indicating whether the binding is a home registration
This flag is set to 1 only for the binding cache entries on home agents. - The time that the last binding request was sent
The actual implementation details for the binding cache are not specified, as long as the external behavior is consistent with RFC 3775. For example, you can either maintain a separate binding cache or combine the binding cache with the destination cache. If you have a separate binding cache, you can either check it before you check the destination cache or have a pointer from the destination cache entry to the corresponding binding cache entry.
In any case, the information in the binding cache takes precedence over the information in the destination cache. For mobile destinations that are away from home, packets should be sent to the mobile node's home address by way of its care-of address. If packets are sent directly to the home address while the mobile node is away from home, the home agent must intercept the packets and tunnel them to the mobile node, lowering the efficiency and performance of the communication between the correspondent node and the mobile node.
For a separate binding cache, each binding cache entry stores the home address, its current care-of address, and a pointer to the entry in the destination cache for the care-of address. A destination cache entry for a home address of a mobile node that is away from home has a pointer to an entry in the binding cache. The entry in the binding cache maps the home address to its care-of address and indicates the entry in the destination cache for the care-of address. The care-of address destination cache entry stores the next-hop address and interface for the care-of address.
For more information about how a node sends a packet in a Mobile IPv6 environment, see the "Mobile IPv6 Host Sending Algorithm" section in this article.
Binding Update List
The binding update list is maintained by a mobile node to record the most recent binding updates sent for the home agent and correspondent nodes. A binding update list entry contains the following information:
- The address of the node to which the binding update was sent
- The home address for the binding update
- The care-of address sent in the last binding update
- The value of the Lifetime field in the binding update
- The remaining lifetime of the binding
The initial value is the value of the Lifetime field in the binding update. When the lifetime expires, the entry is deleted from the binding update list. - The maximum value of the Sequence Number field sent in previous binding updates
- The time that the last binding update was sent
- An indication of whether a retransmission is needed for binding updates sent with the Acknowledge flag set to 1 and when the retransmission is to be sent
- A flag indicating that no future binding updates need to be sent This flag is set to 1 when the mobile node receives an ICMPv6 Parameter Problem-Unrecognized Next Header Type Encountered message in response to a Return Routability message or a binding update.
Home Agents List
Home agents maintain the home agents list and record information about each router from which a Router Advertisement message was received on the home link with the Home Agent (H) flag set to 1. Home agents maintain the home agents list so that they can send the list of home agents to a requesting mobile node away from home during home agent address discovery.
A home agents list entry contains the following information:
- The link-local address of the router on the link, obtained from the source address of the received Router Advertisement message
- The global address or addresses of the home agent, obtained from the Prefix field in the Prefix Information options in the Router Advertisement message with the Router Address (R) flag set to 1
- The remaining lifetime of this entry
The initial lifetime is obtained from either the Home Agent Lifetime field in the Home Agent Information option or the Router Lifetime field in the Router Advertisement message. When the lifetime expires, the entry is deleted from the home agents list. - The preference for the home agent, obtained from the Home Agent Preference field in the Home Agent Information option
If the router advertisement does not contain a Home Agent Information option, the preference is set to 0. Based on the definition of the Home Agent Preference field, 0 is a medium priority level. A mobile node uses the preference value to select the home agent. A home agent uses the preference value to order by preference value the list of home agents returned to a mobile node during home agent address discovery. When the mobile node receives the list of home agents, it chooses the first home agent in the list.