IPv6 Mobility Processes

IPv6 mobility provides a method for a mobile node to determine it is on its home link as well as providing message exchanges for the following processes:

  • Moving from the home link to a foreign link
  • Moving from a foreign link to another foreign link
  • Returning home

Additionally, the sending host and receiving host processes are modified to include special processing for mobility support.

The following discussion assumes that the correspondent node supports full correspondent node functionality and is not a mobile node that is away from home.

Attaching to the Home Link

The method used by a mobile node to determine that it is attached to the home link is not defined in the IPv6 mobility draft. Once an IPv6 mobile node determines that it is connected to its home link, it can store the home subnet prefix, home address, and the global address of its home agent. The following methods for configuring home link parameters are based on implementations in development or existence at the time of the writing of this book:

  • Manual configuration

    In the simplest case, the home subnet prefix, home address, and the global address of the home agent are manually configured, typically through a keyboard-based command, and are permanent until manually changed. These implementations do not support the dynamic discovery of home agents or changes in the home subnet prefix.

  • Pseudo-automatic configuration

    For pseudo-automatic configuration, when an IPv6 node is attached to a link, the user has the option (typically through a button in the user interface of the operating system) to indicate to the IPv6 protocol that the node is now connected to the home link. Based on this indication, the IPv6 protocol stores the home subnet prefix and home address and listens for additional router advertisements containing the Home Agent (H) flag. The home agent is the router advertising itself with home agent capabilities and has the highest preference level. Once determined, the IPv6 protocol stores the address of the home agent. These implementations may or may not support the dynamic discovery of home agents or changes in the home subnet prefix.

  • Automatic configuration

    With automatic configuration, the IPv6 node is always listening for router advertisements that have the H flag set. Based on additional protocol or operating system parameters, the IPv6 node determines that it is potentially on its home link. Next, it chooses the most preferred home agent and attempts to establish a security relationship with it. If the security relationship with the home agent fails, the IPv6 node concludes it is not on its home link. If the security relationship succeeds, the IPv6 node is on its home link and stores its home subnet prefix, its home address, and the address of its home agent. These implementations may or may not support the dynamic discovery of home agents or changes in the home subnet prefix.

Moving From the Home Link to a Foreign Link

When the mobile node is at home, it autoconfigures its home address through the receipt of a router advertisement, and communication with other nodes occurs normally without the use of IPv6 mobility functionality.

Attaching to the Foreign Link

When the mobile node attaches to the foreign link, it must perform the following functions:

  • Receive a new care-of address.
  • Discover the home agent on the home link (if needed).
  • Register the primary care-of address with the home agent on the home link.

When the mobile node attaches to the foreign link, the following occurs:

  1. The mobile node sends a multicast Router Solicitation message on the foreign link. The mobile node might send a router solicitation either because the link layer indicated a media change or because the node received a router advertisement that contained a new prefix. Depending on the IPv6 mobility implementation, the mobile node sends a router solicitation either from its link-local address (assuming that the link-local address of the mobile node is most likely unique on the foreign link) or from the unspecified address (::) (assuming that the link-local address of the mobile node might not be unique on the foreign link).
  2. All routers on the foreign link reply with a Router Advertisement message. Depending on the source address of the Router Solicitation message, the reply is either unicast (because the router solicitation was sent from a link-local address) or multicast (because the router solicitation was sent from the unspecified address). Figure 12-14 shows the router advertisement being unicast to the mobile node.

    From the receipt of the Router Advertisement message(s), the mobile node determines that it has connected to a foreign link because the router advertisements contain new address prefixes. The mobile node forms care-of addresses from the advertised prefixes, verifies their uniqueness by using duplicate address detection, and joins the corresponding solicited node multicast groups (not shown in Figure 12-14).

  3. If the mobile node is already configured with the address of its home agent, go to step 5. If not, to discover the home agent on the mobile node's home link, the mobile node sends an ICMPv6 Home Agent Address Discovery Request message to the Mobile IPv6 Home-Agents anycast address formed from the home subnet prefix.

    Depending on the implementation, mobile nodes might not maintain a list of home agents while connected to the home link. To automatically discover the home agents on the home link, it is sufficient for the mobile node to learn its home subnet prefix. When the mobile node leaves its home link and moves to the first foreign link, it sends an ICMPv6 Home Agent Address Discovery Request message to the Mobile IPv6 Home-Agents anycast address formed from the home subnet prefix.

  4. A home agent on the home link that is using the Mobile IPv6 Home-Agents anycast address corresponding to the home subnet prefix and is topologically closest to the mobile node receives the Home Agent Address Discovery Request message. Next, it sends back an ICMPv6 Home Agent Address Discovery Reply message containing the entries in the home agent's home agent list in preference order.

    Upon receipt of the ICMPv6 Home Agent Address Discovery Reply message, the mobile node selects the first home agent in the list as its home agent.

  5. To register the primary care-of address with the home agent, the mobile node sends the home agent a binding update. In the binding update, the Home Registration (H) and Acknowledge (A) flags are set.
  6. The home agent receives the binding update and updates its binding cache. To intercept packets destined for the mobile node's home address while the mobile node is away from home, the home agent performs proxy Neighbor Discovery for the mobile node by answering neighbor solicitations on behalf of the mobile node. Depending on the implementation, the home agent might send an unsolicited multicast Neighbor Advertisement message as if it were the mobile node immediately or respond only to multicast neighbor solicitations for the mobile node's home address.

    In the first case, to ensure that the nodes on the home link are updated with the new link-layer address of the home agent's interface on the home link, the home agent sends an unsolicited multicast Neighbor Advertisement message to the link-local scope all-nodes multicast address (FF02::1) with the Override (O) flag set. Additionally, the home agent joins the multicast group for the solicited node multicast address corresponding to the mobile node's home address, and registers interest in receiving link-layer multicast frames to the multicast MAC address corresponding to the solicited node multicast address. This is shown in Figure 12-14.

    Figure 12-14. Mobile node attaching to the first foreign link

    In the second case, the home agent does not send an unsolicited multicast Neighbor Advertisement message. However, the home agent does join the multicast group for the solicited node multicast address corresponding to the mobile node's home address, and registers interest in receiving link-layer multicast frames to the multicast MAC address corresponding to the solicited node multicast address. If a node on the home link was communicating with the mobile node while it was at home, neighbor unreachability detection would eventually cause the home node to send three unicast neighbor solicitations (while in the PROBE state) and then send a multicast neighbor solicitation. The multicast neighbor solicitation is then answered by the home agent on behalf of the mobile node. This is not shown in Figure 12-14.

  7. Because the binding update had the A flag set, the home agent responds with a binding acknowledgement.

This process is shown in Figure 12-14.

Notice that the mobile node does not send a binding update to all the nodes with which the mobile node was communicating when connected to the home link (as there are no entries in the binding update list). Rather, the mobile node relies on the receipt of tunneled traffic from the home agent to send binding updates to correspondent nodes.

Mobile Node Initiates a New TCP Connection with a New Correspondent Node

When a mobile node that is away from home initiates a new TCP connection with a correspondent node, the following occurs:

  1. The mobile node sends a TCP SYN (synchronize) segment containing the Destination Options header and the Home Address and Binding Update options to the correspondent node.
  2. The correspondent node receives the TCP SYN segment and processes the Home Address and Binding Update options. The correspondent node updates its binding cache and sends the TCP SYN-ACK (synchronize-acknowledgement) segment that includes a Routing header with the mobile node's home address and, if requested, a binding acknowledgment.
  3. Upon receipt of the TCP SYN-ACK from the correspondent node, the mobile node sends a TCP ACK (acknowledge) segment that contains the Home Address option to the correspondent node.

This process is shown in Figure 12-15.

Figure 12-15. A mobile node initiating a new TCP connection with a new correspondent node

If the mobile node is resuming communication using an existing TCP connection, then the same process described here is done for the first three TCP segments exchanged over the resumed TCP connection.

After this process is complete, data between the correspondent node and the mobile node is sent as follows:

  • Data from the mobile node is sent from the mobile node's care-of address to the correspondent node's address and includes the Home Address option in the Destination Options header.
  • Data from the correspondent node is sent to the mobile node's care-of address and includes a Routing header containing the mobile node's home address.

If the mobile node is multihomed, it is possible for the mobile node to register different care-of addresses with different correspondent nodes. Which care-of address is chosen depends on the source address selection algorithm. The mobile node will choose the care-of address that is matched in scope and topologically closest to the correspondent node.

Mobile Node Initiates Non-TCP-based Communication with a New Correspondent Node

When a mobile node that is away from home either resumes or initiates communication with a correspondent node that does not use a TCP connection (such as ICMPv6 or an Application layer protocol that uses UDP), the following occurs:

  1. The mobile node sends the initial message to the correspondent node containing the Destination Options header with the Home Address option.
  2. The correspondent node receives the initial message and processes the Home Address option. Because a binding does not yet exist for the mobile node, the correspondent node sends the response message to the home address.
  3. Because the home agent has a binding for the mobile node and is acting as an ND proxy for the mobile node, it intercepts the response message sent to the mobile node's home address and tunnels it to the mobile node at the mobile node's care-of address.
  4. Upon receipt of the tunneled response message from the home agent, the mobile node queues a binding update to the correspondent node. Whether the binding update is sent as a separate packet or is included as part of upper layer data depends on the implementation. For this example, the binding update is included in the next message sent to the correspondent node.
  5. Upon receipt of the next message with the binding update, the correspondent node updates its binding cache and sends back, if requested, a binding acknowledgment that includes a Routing header with the mobile node's home address.

This process is shown in Figure 12-16.

Figure12-16. A mobile node initiating non-TCP-based communication with a new correspondent node

After this process is complete, data between the correspondent node and the mobile node is sent as follows:

  • Data from the mobile node is sent from the mobile node's care-of address to the correspondent node's address and includes the Home Address option in the Destination Options header.
  • Data from the correspondent node is sent to the mobile node's care-of address and includes a Routing header containing the mobile node's home address.

A New Correspondent Node Communicates with a Mobile Node

When a new correspondent node either resumes communication or initiates communication with a mobile node using the mobile node's home address and the mobile node is away from home, the following occurs (example assumes a new TCP connection):

  1. The new correspondent node sends a TCP SYN segment to the mobile node's home address. The packet is delivered by the routers of the IPv6 Internet to a router connected to the mobile node's home link.
  2. Because the home agent has a binding for the mobile node and is acting as its ND proxy, it intercepts the TCP SYN segment sent to the mobile node's home address and tunnels it to the mobile node's care-of address.
  3. Upon receipt of the tunneled TCP SYN segment from the home agent, the mobile node adds an entry for the correspondent node to its binding update list and sends a TCP SYN-ACK with a Destination Options header that contains the Home Address and Binding Update options.
  4. Upon receipt of the TCP SYN-ACK segment with the binding update, the correspondent node updates its binding cache and sends back a TCP ACK segment that includes a Routing header with the mobile node's home address and, if requested, a binding acknowledgement in the Destination Options header.

This process is shown in Figure 12-17.

Figure 12-17. A new correspondent node communicating with a mobile node

After this process is complete, data between the correspondent node and the mobile node is sent as follows:

  • Data from the mobile node is sent from the care-of address to the correspondent node's address and includes the Home Address option in the Destination Options header.
  • Data from the correspondent node is sent to the mobile node's care-of address and includes a Routing header containing the mobile node's home address.

This same process is performed if the correspondent node removes the binding for the mobile node from its binding cache.

A Node on the Home Link Communicates with the Mobile Node

When a node on the home link either resumes or initiates communication with a mobile node using the mobile node's home address and the mobile node is away from home, the following occurs (example assumes a new TCP connection):

  1. The node on the home link sends a multicast Neighbor Solicitation message to the solicited node multicast address corresponding to the mobile node's home address.
  2. The home agent is acting as an ND proxy for the mobile node. It has registered the solicited node multicast address corresponding to the mobile node's home address as a multicast address to which the home agent is listening. The home agent receives the neighbor solicitation and sends a unicast neighbor advertisement containing the home agent's link-layer address in the Target Link-Layer Address option.
  3. The node on the home link sends the TCP SYN segment to the home agent with the mobile node's home address as the destination IPv6 address and the home agent's link-layer address as the destination link-layer address.
  4. Because the IPv6 packet is addressed to the home address of the mobile node, the home agent tunnels the TCP SYN segment to the mobile node's care-of address.
  5. Upon receipt of the tunneled TCP SYN segment from the home agent, the mobile node adds an entry for the node on the home link to its binding update list and sends a TCP SYN-ACK with a Destination Options header that contains the Home Address and Binding Update options.
  6. Upon receipt of the TCP SYN-ACK segment with the binding update, the node on the home link updates its binding cache and sends a TCP ACK segment that includes a Routing header with the mobile node's home address and, if requested, a binding acknowledgement in the Destination Options header.

This process is shown in Figure 12-18.

Figure 12-18. A node on the home link communicating with the mobile node

This same process of intercepting a packet for the mobile node (steps 1 through 3) is used when a packet addressed to the mobile node's home address is delivered to the home link by a router that is not the mobile node's home agent.

Mobile Node Obtains a New Home Address

The home address of the mobile node was initially obtained through the receipt of a router advertisement while the mobile node was connected to the home link, and the stateless address might have a finite lifetime. Because the mobile node is away from home, it does not receive the pseudo-periodic multicast router advertisements sent by the routers on the home link. To refresh a home address that is approaching the end of its valid lifetime or receive a new home address, the following process is used:

  1. The mobile node sends an IPv6-tunneled Router Solicitation message to its home agent. The inner IPv6 header is addressed from the mobile node's home address to the home agent's address. The outer IPv6 header is addressed from the mobile node's care-of address to the home agent's address.
  2. Upon receipt of the tunneled router solicitation, the home agent responds with a unicast Router Advertisement message that is sent from the home agent's address to the mobile node's care-of address and includes a Routing header with the mobile node's home address.

Upon receipt of the router advertisement, the mobile node examines the Prefix Information option(s) and does the following:

  • If there is no change in the home subnet prefix and therefore no change in the home address, then the mobile node refreshes the valid and preferred lifetimes of the stateless home address.
  • If there is a change in the home subnet prefix, then the mobile node autoconfigures a new home address and sends binding updates for all the entries of its binding update list (the home agent and all correspondent nodes).

Moving from a Foreign Link to Another Foreign Link

When the mobile node attaches to a new foreign link after being attached to another foreign link, it must perform the following functions:

  • Receive a new care-of address.
  • Register the new care-of address with the home agent on the home link.
  • Send binding updates to all correspondent nodes.

The IPv6 mobility draft also describes the registration of the new care-of address with a router that has home agent capabilities on the previous foreign link to establish forwarding of packets sent to an outdated care-of address. This is not widely supported and is not described in this chapter.

When the mobile node attaches to the new foreign link, the following occurs:

  1. The mobile node sends a multicast Router Solicitation message on the new foreign link. Depending on the IPv6 mobility implementation, the mobile node sends a router solicitation either from its link-local address (assuming that the link-local address of the mobile node is most likely unique on the new foreign link) or from the unspecified address (::) (assuming that the link-local address of the mobile node might not be unique on the new foreign link).
  2. All routers on the new foreign link reply with a Router Advertisement message. Depending on the source address of the Router Solicitation message, the reply is either unicast (because the router solicitation was sent from a link-local address) or multicast (because the router solicitation was sent from the unspecified address). Figure 12-19 shows the router advertisement being unicast to the mobile node.

    From the receipt of the Router Advertisement message(s), the mobile node forms care-of address(es), verifies their uniqueness by using duplicate address detection, and joins the corresponding solicited node multicast groups (not shown in Figure 12-19).

  3. To register the new primary care-of address with the home agent, the mobile node sends the home agent a binding update. In the binding update, the Home Registration (H) and Acknowledge (A) flags are set.
  4. For each correspondent node in the mobile node's binding update list, the mobile node sends a binding update.

    The mobile node does not have to immediately send a binding update. Because the binding update is carried in the Destination Options header, the mobile node can delay the sending of the binding update to the correspondent node so that it is sent with the next packet. However, a delay in sending the binding update to correspondent nodes can result in data loss when packets sent by the correspondent node are delivered to the previous foreign link.

  5. Upon the receipt of the binding update, the home agent updates its binding cache, and responds with a binding acknowledgement.

    Upon receipt of the binding update, each correspondent node updates its binding cache and, if requested by the mobile node, sends a binding acknowledgment.

This process is shown in Figure 12-19.

Figure 12-19. A mobile node attaching to a new foreign link

If the binding update sent by the mobile node to a correspondent node is dropped from the network, the correspondent node continues to send packets to the mobile node's previous care-of address based on the contents of its now outdated binding cache entry. The packets are forwarded to the previous foreign link and the router on the previous foreign link attempts to deliver them. If the previous foreign link router still considers the mobile node reachable on the previous foreign link, packets are forwarded to the mobile node's link layer address. Because the mobile node is no longer attached to the previous foreign link, the packets are dropped.

The methods for correcting this error condition are the following:

  • The mobile node, after not receiving a binding acknowledgment from the correspondent node, retransmits a binding update. The retransmitted binding update is received by the correspondent node and its binding cache is updated with the mobile node's new care-of address.
  • The previous foreign link router uses neighbor unreachability detection to determine that the mobile node is no longer attached to the previous foreign link. For a point-to-point link such as a wireless connection, the unreachability of the mobile node is indicated immediately by the lack of a wireless signal from the mobile node. For a broadcast link such as an Ethernet segment, the entry in the previous foreign link router's neighbor cache goes through the REACHABLE, STALE, DELAY, and PROBE states as described in Chapter 6, "Neighbor Discovery." After the neighbor cache entry for the mobile node is removed, attempts to deliver to the mobile node's previous care-of address are unsuccessful and the previous foreign link router will send an ICMPv6 Destination Unreachable-Address Unreachable message to the correspondent node. Upon receiving this message, the correspondent node will remove the entry for the mobile node from its binding cache and communication resumes as described in the "A New Correspondent Node Communicates with a Mobile Node" section of this chapter.
  • All binding cache entries have a finite lifetime as determined by the Lifetime field of the last received binding update. After the lifetime expires, the binding cache entry is removed and communication resumes as described in the "A New Correspondent Node Communicates with a Mobile Node" section of this chapter.

Returning Home

When the mobile node attaches to its home link after being away from home, it must perform the following functions:

  • Send a binding update to the home agent to delete the binding for the mobile node.
  • Inform home link nodes that the correct link-layer address for the home address is now the mobile node's link-layer address.
  • Send binding updates to all correspondent nodes to delete the bindings for the mobile node.

These functions are shown in Figure 12-20.

Figure 12-20. A mobile node returning home

When the mobile node returns home (reattaches to its home link), the following occurs:

  1. The mobile node sends a multicast Router Solicitation message on the home link. The mobile node might send a router solicitation either because the link layer indicated a media change or because the node received a router advertisement that contained a new prefix. Depending on the IPv6 mobility implementation, the mobile node sends a router solicitation either from its link-local address (assuming that the link-local address of the mobile node is most likely unique on the home link) or from the unspecified address (::) (assuming that the link-local address of the mobile node might not be unique on the home link).
  2. All routers on the home link reply with a Router Advertisement message. Depending on the source address of the Router Solicitation message, the reply is either unicast (because the router solicitation was sent from a link-local address) or multicast (because the router solicitation was sent from the unspecified address). Figure 12-20 shows the router advertisement being unicast to the mobile node.

    Because the router advertisement contains an address prefix that matches its home address prefix, the mobile node determines that it is attached to its home link. Depending on the IPv6 mobility implementation, the mobile node may or may not perform duplicate address detection for its home address because the home agent is acting as an ND proxy for the mobile node and defending the use of the mobile node's home address. If the mobile node does perform duplicate address detection, it must ignore the neighbor advertisement reply sent from the home agent.

  3. To remove the binding cache entry from the home agent, the mobile node sends the home agent a binding update with the care-of address set to the mobile node's home address and with the Home Registration (H) and Acknowledge (A) flags set.

    If multiple router advertisements are received, the mobile node can determine which router is its home agent from the router advertisement with the Prefix Information option that contains the home agent's global address in the Prefix field.

    The mobile node determines the home agent's link-layer address from the Link-Layer Address field in the Source Link-Layer Address option in the router advertisement sent by the home agent. If the Source Link-Layer Address option is not included, then the mobile node can determine the link-layer address of the home agent using address resolution, because the global address of the home agent is known.

  4. For each correspondent node in the mobile node's binding update list, the mobile node sends a binding update to the correspondent node with the care-of address set to the mobile node's home address.
  5. Upon receipt of the binding update, the home agent removes the entry for the mobile node from its binding cache, stops defending the use of the mobile node's home address on the home link, and responds with a binding acknowledgement. This is shown in Figure 12-20. Additionally, the home agent removes itself from the multicast group for the solicited node multicast address corresponding to the mobile node's home address and stops listening for link-layer multicast frames addressed to the multicast MAC address corresponding to the solicited node multicast address.

    Upon receipt of the binding update, the correspondent nodes remove the entry for the mobile node in their binding cache and, if requested by the mobile node, send a binding acknowledgment.

  6. After receiving the binding acknowledgement from the home agent, the mobile node must inform nodes on the home link that the link-layer address for the home address has changed to the link-layer address of the mobile node. It sends an unsolicited multicast Neighbor Advertisement message to the link-local scope all-nodes multicast address (FF02::1) with the Override (O) flag set.

    The sending of the unsolicited multicast Neighbor Advertisement message is not required. If it is not sent, nodes on the home link that were communicating with the mobile node while it was away from home might still have an entry in their neighbor cache that contains the mobile node's home address and the link-layer address of the home agent. This is a redirect situation, in which a node is sending a packet to a router when the destination is on-link. When the home node sends a packet to the mobile node by using the link-layer address of the home agent, the home agent forwards the packet to the mobile node and sends a Redirect message containing the Target Link-Layer Address option to update the neighbor cache of the home node.

    The mobile node also joins the multicast group for the solicited node multicast address corresponding to the mobile node's home address, and registers interest in receiving link-layer multicast frames to the multicast MAC address corresponding to the solicited node multicast address.

IPv6 Mobility Host Sending Algorithm

The IPv6 host sending algorithm is described in Chapter 6, "Neighbor Discovery." However, the discussion in Chapter 6 does not include full IPv6 mobility functionality. An IPv6 mobile node can be both a mobile node and correspondent node at the same time. Therefore, the host sending algorithm for an IPv6 mobility node must take into account the following:

  • If the sending host is away from home

    If so, the sending host must set the source address of the IPv6 header to the sending host's care-of address and include the Destination Options header with the Home Address option set to the sending host's home address.

  • If the destination node is away from home

    If so, the sending host must set the destination address of the IPv6 header to the destination node's care-of address and include a Routing header with the Address 1 field set to the destination node's home address.

An IPv6 mobility host uses the following algorithm when sending a unicast or anycast packet to an arbitrary destination:

  1. Check the destination cache for an entry matching the destination address.
  2. If an entry matching the destination address is not found in the destination cache, go to step 7.
  3. If an entry matching the destination address is found in the destination cache, check for a pointer to an entry in the binding cache. This pointer will be present if the destination is a mobile node away from home.
  4. If there is a pointer to an entry in the binding cache, the sending host sets the destination address in the IPv6 header to the destination node's care-of address and inserts a Routing header that includes the destination node's home address in the Address 1 field. The binding cache entry for the home address contains a pointer to the destination cache entry for the care-of address, from which the sending host obtains the next-hop address and interface for the care-of address.
  5. If there is a no pointer to an entry in the binding cache, then the sending host obtains the next-hop address and interface from the destination cache entry.
  6. If the sending host is a mobile node away from home, it sets the source address in the IPv6 header to the sending host's care-of address and inserts a Destination Options header that includes the Home Address option containing the sending host's home address. Go to step 10.
  7. Check the local IPv6 routing table for the longest matching route that has the lowest metric to the destination address. If there are multiple longest matching routes with the lowest metric, IPv6 chooses a route to use.
  8. Based on the chosen route, determine the next-hop interface and address used for forwarding the packet.

    If no route is found, IPv6 assumes that the destination is directly reachable. The next-hop address is set to the destination address and an interface is chosen.

  9. Update the destination cache.
  10. Check the neighbor cache for an entry matching the next-hop address.
  11. If an entry matching the next-hop address is found in the neighbor cache, obtain the link-layer address.
  12. If an entry matching the next-hop address is not found in the neighbor cache, use address resolution to obtain the link-layer address for the next-hop address.

    If address resolution is not successful, indicate an error.

  13. Send the packet by using the link-layer address of the neighbor cache entry.

Figure 12-21 shows the IPv6 mobility host sending process.

Figure 12-21. The IPv6 mobility host sending process

IPv6 Mobility Host Receiving Algorithm

The IPv6 host receiving algorithm is described in Chapter 10, "IPv6 Routing." However, the discussion in Chapter 10 does not include full IPv6 mobility functionality. An IPv6 mobile node can be both a mobile node and correspondent node at the same time. Therefore, the host receiving algorithm for an IPv6 mobility node must take into account the following:

  • If the receiving node is away from home

    If so, the receiving node processes the Routing header in the IPv6 packet and logically sets the destination address of the IPv6 header to the value of the Address 1 field in the Routing header.

  • If the sending host is away from home

    If so, the receiving node processes the Destination Options header and logically sets the source address of the IPv6 packet to the home address contained in the Home Address option.

Additionally, a receiving IPv6 mobility host must recognize a packet tunneled from its home agent in order to determine when to send a binding update to a new correspondent node.

An IPv6 mobility host uses the following algorithm when receiving a unicast or anycast packet from an arbitrary source:

  1. Verify whether the destination address in the IPv6 packet corresponds to an IPv6 address assigned to a local host interface.

    If the destination address is not assigned to a local host interface, silently discard the IPv6 packet.

  2. Check to see if there is a Routing header present. If so, process the Routing header and set the destination address of the IPv6 packet to the value of the last address field in the Routing header. For packets sent from correspondent nodes, the last address field is the Address 1 field, which contains the mobile node's home address.

    Although all IPv6 hosts must support the processing of a Routing header, this was not described in Chapter 10 to keep the discussion of the host receiving algorithm as simple as possible. Because a mobility-based Routing header is placed in the packet when the destination mobile node is away from home, it is explicitly described here.

  3. Check to see if the packet was tunneled from the home agent. In the outer IPv6 header, the destination address is set to the receiving node's care-of address, the source address is set to the home agent's address, and the protocol field is set to 41. If so, strip the outer header, set the destination and source addresses of the packet to the addresses in the inner IPv6 header, and queue a binding update to the source address in the inner IPv6 header. The binding update is sent either as a separate packet or is sent with response data to the new correspondent node.

    For data sent to an IPv6 mobile node when it is away from home, an incoming IPv6 packet will either be tunneled from the home agent or sent with a Routing header containing the home address.

    Although all IPv6 hosts must support the processing of IPv6 tunneled packets, this was not described in Chapter 10 to keep the discussion of the host receiving algorithm as simple as possible. Because IPv6 packets are tunneled by a home agent when the destination mobile node is away from home, it is explicitly described here.

  4. Check to see if there is a Destination Options header with a Home Address option. If so, logically set the source address of the IPv6 packet to the home address in the Home Address option.
  5. Based on the Next Header field, process extension headers (if present) and pass the upper layer PDU to the appropriate upper-layer protocol.

    If the protocol does not exist, send an ICMPv6 Parameter Problem-Unrecognized Next Header Type Encountered message back to the sender and discard the packet.

  6. If the upper layer PDU is not a TCP segment or UDP message, pass the upper layer PDU to the appropriate protocol.
  7. If the upper layer PDU is a TCP segment or UDP message, check the destination port.

    If no application exists for the UDP port number, send an ICMPv6 Destination Unreachable-Port Unreachable message back to the sender and discard the packet. If no application exists for the TCP port number, send a TCP Connection Reset segment back to the sender and discard the packet.

  8. If an application exists for the UDP or TCP destination port, process the contents of the TCP segment or UDP message.

Figure 12-22 shows the IPv6 mobility host receiving process.

Figure 12-22. The IPv6 mobility host receiving process



Understanding IPv6
Understanding Ipv6
ISBN: 0735612455
EAN: 2147483647
Year: 2005
Pages: 124
Authors: Joseph Davies

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net