Implementing Mobile IPv6

First Published: March 28, 2005

Last Updated: July 30, 2010

Mobile IP is part of both IPv4 and IPv6 standards. Mobile IP allows a host device to be identified by a single IP address even though the device may move its physical point of attachment from one network to another. Regardless of movement between different networks, connectivity at the different points is achieved seamlessly without user intervention. Roaming from a wired network to a wireless or wide-area network is also done with ease. Mobile IP provides ubiquitous connectivity for users, whether they are within their enterprise networks or away from home.

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the "Feature Information for Implementing Mobile IPv6" section.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn.An account on Cisco.com is not required.

Mobile IPv6 Overview

Mobile IPv4 provides an IPv4 node with the ability to retain the same IPv4 address and maintain uninterrupted network and application connectivity while traveling across networks. In Mobile IPv6, the IPv6 address space enables Mobile IP deployment in any kind of large environment. No foreign agent is needed to use Mobile IPv6.

Mobile IPv6 benefits from the IPv6 protocol itself; for example, Mobile IPv6 uses IPv6 option headers (routing, destination, and mobility) and benefits from the use of neighbor discovery.

Mobile IPv6 provides optimized routing, which helps avoid triangular routing. Mobile IPv6 nodes work transparently even with nodes that do not support mobility (although these nodes do not have route optimization).

Mobile IPv6 is fully backward-compatible with existing IPv6 specifications. Therefore, any existing host that does not understand the new mobile messages will send an error message, and communications with the mobile node will be able to continue, albeit without the direct routing optimization.

How Mobile IPv6 Works

To implement Mobile IPv6, you need a home agent on the home subnet on which the mobile node's home address resides. The IPv6 home address (HA) is assigned to the mobile node. The mobile node obtains a new IPv6 address (the CoA) on networks to which it connects. The home agent accepts BUs from the mobile node informing the agent of the mobile node's location. The home agent then acts as proxy for the mobile node, intercepting traffic to the mobile node's home address and tunneling it to the mobile node.

The mobile node informs a home agent on its original home network about its new address, and the correspondent node communicates with the mobile node about the CoA. Because of the use of ingress filtering, the mobile node reverses tunnel return traffic to the home agent, so that the mobile node source address (that is, its home address) will always be topographically correct.

Mobile IPv6 is the ability of a mobile node to bypass the home agent when sending IP packets to a correspondent node. Optional extensions make direct routing possible in Mobile IPv6, though the extensions might not be implemented in all deployments of Mobile IPv6.

Direct routing is built into Mobile IPv6, and the direct routing function uses the IPv6 routing header and the IPv6 destination options header. The routing header is used for sending packets to the mobile node using its current CoA, and the new home address destination option is used to include the mobile node's home address, because the current CoA is the source address of the packet.

IPv6 NEMO

The NEMO basic support protocol enables mobile IPv6 networks to attach to different points in the Internet. This protocol is an extension of Mobile IPv6 and allows session continuity for every node in the mobile network as the network moves. NEMO also allows every node in the mobile network to be reachable while the user is moving. The mobile router, which connects the network to the Internet, runs the NEMO basic support protocol with its home agent (HA). NEMO allows network mobility to be transparent to the nodes inside the mobile network.

The NEMO router maintains a mobile route, which is the default route for IPv6 over the roaming interface.

Mobile IPv6 Home Agent

The home agent is one of three key components in Mobile IPv6. The home agent works with the correspondent node and mobile node to enable Mobile IPv6 functionality:

•Home agent—The home agent maintains an association between the mobile mode's home IPv4 or IPv6 address and its CoA (loaned address) on the foreign network.

•Correspondent node—The correspondent node is the destination IPv4 or IPv6 host in session with a mobile node.

•Mobile node—An IPv4 or IPv6 host that maintains network connectivity using its home IPv4 or IPv6 address, regardless of the link (or network) to which it is connected.

Binding Cache in Mobile IPv6 Home Agent

A separate binding cache is maintained by each IPv6 node for each of its IPv6 addresses. When the router sends a packet, it searches the binding cache for an IPv6 address before it searches the neighbor discovery conceptual destination cache.

The binding cache for any one of a node's IPv6 addresses may contain one entry for each mobile node home address. The contents of all of a node's binding cache entries are cleared when it reboots.

Binding cache entries are marked either as home registration or correspondent registration entries. A home registration entry is deleted when its binding lifetime expires; other entries may be replaced at any time through a local cache replacement policy.

Binding Update List in Mobile IPv6 Home Agent

A binding update (BU) list is maintained by each mobile node. The BU list records information for each BU sent by this mobile node whose lifetime has not yet expired. The BU list includes all BUs sent by the mobile node—those bindings sent to correspondent nodes, and those bindings sent to the mobile node's home agent.

The mobility extension header has a new routing header type and a new destination option, and it is used during the BU process. This header is used by mobile nodes, correspondent nodes, and home agents in all messaging related to the creation and management of bindings.

Home Agents List

A home agents list is maintained by each home agent and each mobile node. The home agents list records information about each home agent from which this node has recently received a router advertisement in which the home agent (H) bit is set.

Each home agent maintains a separate home agents list for each link on which it is serving as a home agent. This list is used by a home agent in the dynamic home agent address discovery mechanism. Each roaming mobile node also maintains a home agents list that enables it to notify a home agent on its previous link when it moves to a new link.

NEMO-Compliant Home Agent

Protocol extensions to Mobile IPv6 are used to enable support for network mobility. The extensions are backward-compatible with existing Mobile IPv6 functionality. A NEMO-compliant home agent can operate as a Mobile IPv6 home agent.

The dynamic home agent address discovery (DHAAD) mechanism allows a mobile node to discover the address of the home agent on its home link. The following list describes DHAAD functionality and features:

•A new flag (R) is introduced in the DHAAD request message, indicating the desire to discover home agents that support mobile routers. This flag is added to the DHAAD reply message as well.

•On receiving the home agent address discovery reply message, the mobile router discovers the home agents operating on the home link.

•The mobile router attempts home registration to each of the home agents until its registration is accepted. The mobile router waits for the recommended length of time between its home registration attempts with each of its home registration attempts.

Implicit Prefix Registration

When using implicit prefix registration, the mobile router does not register any prefixes as part of the binding update with its home agent. This function requires a static configuration at the home agent, and the home agent must have the information of the associated prefixes with the given mobile router for it to set up route forwarding.

Explicit Prefix Registration

When using explicit prefix registration, the mobile router presents a list of prefixes to the home agent as part of the binding update procedure. If the home agent determines that the mobile router is authorized to use these prefixes, it sends a bind acknowledgment message.

Packet Headers in Mobile IPv6

The basic IPv6 packet header has 8 fields with a total size of 40 octets (320 bits). Fields were removed from the IPv6 header compared with the IPv4 header because, in IPv6, fragmentation is not handled by routers and checksums at the network layer are not used. Instead, fragmentation in IPv6 is handled by the source of a packet and checksums at the data link layer and transport layer are used. Additionally, the basic IPv6 packet header and options field are aligned to 64 bits, which can facilitate the processing of IPv6 packets.

Mobile IPv6 uses the routing and destination option headers for communications between the mobile node and the correspondent node. The new mobility option header is used only for the BU process.

Several ICMP message types have been defined to support Mobile IPv6. IPv6 access lists can be configured to allow IPv6 access list entries matching Mobile-IPv6-specific ICMP messages to be configured and to allow the definition of entries to match packets containing Mobile IPv6 extension headers.

IPv6 Neighbor Discovery Duplicate Address Detection in NEMO

IPv6 routers are required to run duplicate address detection (DAD) on all IPv6 addresses obtained in stateless and stateful autoconfiguration modes before assigning them to any of its interfaces. Whenever an mobile router roams and obtains an IPv6 address, the mobile router must perform DAD on the newly obtained care-of address and on its link-local address in order to avoid address collisions.

However, the DAD feature adds significant handoff delays in certain Layer 2 environments. These delays may be avoided by using optimistic DAD techniques. NEMO supports optimization options for omitting DAD on care-of address or on both the care-of address and link-local address.

For further information on IPv6 neighbor discovery, refer to the Implementing IPv6 Addressing and Basic Connectivity module.

After the home agent receives a valid BU request from a mobile node, it sets up its endpoint of the bidirectional tunnel. This process involves creating a logical interface with the encapsulation mode set to IPv6/IPv6, the tunnel source to the home agent's address on the mobile node's home link, and the tunnel destination set to the mobile node's registered care-of address. A route will be inserted into the routing table for the mobile node's home address via the tunnel.

IPv6 Host Group Configuration

Users can create mobile user or group policies using the IPv6 host group configuration. The host group profile lookup interface will allow the lookup of the profile associated with the sender of the BU using any of the search keys:

•Profile name

•IPv6 address

•Network address identifier (NAI)

The host profile lookup interface also specifies the authentication properties for the IPv6 mobile node by creating either a unidirectional or bidirectional security parameter index (SPI).

A group profile is activated after the SPI option is configured and either an NAI or an IPv6 address is configured. In addition, a profile is deactivated if the minimum required options are not configured. If any active profile that has active bindings gets deactivated or removed, all bindings associated to that profile are revoked.

Mobile IPv6 Node Identification Based on NAI

A mobile node can identify itself using its home address as an identifier. The Mobile IPv6 protocol messages use this identifier in their registration messages. However, for certain deployments it is essential that the mobile node has the capability to identify itself using a logical identifier, such as NAI, rather than a network address. The mobile node identifier option for Mobile IPv6 allows a mobile node to be identified by NAI rather than IPv6 address. This feature enables the network to give a dynamic IPv6 address to a mobile node and authenticate the mobile node using authentication, authorization, and accounting (AAA). This option should be used when either Internet Key Exchange (IKE) or IPsec is not used for protecting BUs or binding acknowledgments (BAs).

In order to provide roaming services, a standardized method, such as NAI or a mobile node home address, is needed for identifying users. Roaming may be loosely defined as the ability to use any one of multiple Internet service providers (ISPs) while maintaining a formal, customer-vendor relationship with only one. Examples of where roaming capabilities might be required include ISP confederations and ISP-provided corporate network access support. Other entities interested in roaming capability may include the following:

•Regional ISPs, operating within a particular state or province, that want to combine efforts with those of other regional providers to offer dialup service over a wider area.

•National ISPs that want to combine their operations with those of one or more ISPs in another country to offer more comprehensive dialup service in a group of countries or on a continent.

•Wireless LAN hot spots that provide service to one or more ISPs.

•Businesses that want to offer their employees a comprehensive package of dialup services on a global basis. Those services may include Internet access and secure access to corporate intranets using a VPN.

Authentication Protocol for Mobile IPv6

The authentication protocol for Mobile IPv6 support secures mobile node and home agent signaling using the MN-HA mobility message authentication option, which authenticates the BU and BA messages based on the shared-key-based security association between the mobile node (MN) and the HA. This feature allows Mobile IPv6 to be deployed in a production environment where a non-IPsec authentication method is required. MN-HA consists of a mobility SPI, a shared key, an authentication algorithm, and the mobility message replay protection option.

The mobility SPI is a number from 256 through 4,294,967,296. The key consists of an arbitrary value and is 16 octets in length. The authentication algorithm used is HMAC_SHA1. The replay protection mechanism may use either the sequence number option or the time-stamp option. The MN-HA mobility message authentication option must be the last option in a message with a mobility header if it is the only mobility message authentication option in the message.

When a BU or BA message is received without the MN-HA option and the entity receiving it is configured to use the MN-HA option or has the shared-key-based mobility security association for the mobility message authentication option, the entity discards the received message.

The mobility message replay protection option allows the home agent to verify that a BU has been freshly generated by the mobile node and not replayed by an attacker from some previous BU. This functionality is especially useful for cases where the home agent does not maintain stateful information about the mobile node after the binding entry has been removed. The home agent performs the replay protection check after the BU has been authenticated. The mobility message replay protection option is used by the mobile node for matching the BA with the BU. When the home agent receives the mobility message replay protection option in BU, it must include the mobility message replay protection option in the BA.

Uses the Media Access Control (MAC) address from a specified interface for deriving the IPv6 mobile home address.

Step 5

home-networkipv6-prefix

Example:

Router(IPv6-mobile-router)# home-network 2001:0DB1:1/64

Specifies the home network's IPv6 prefix on the mobile router.

•Users can configure up to 10 home-network entries, and they are used in order of priority. The prefix identifies the home network of the mobile router and is used to discover when the mobile router is at home.

Step 6

home-address {home-network|
ipv6-address-identifier| interface}

Example:

Router(IPv6-mobile-router)# home-address home-network eui-64

Specifies the mobile router home address using an IPv6 address or interface identifier.

•When multiple home networks have been configured, we recommend that you use the home-address home-network command syntax, so that the mobile router builds a home address that matches the home network to which it registers.

Filtering Mobile IPv6 Protocol Headers and Options

IPv6 extension headers have been developed to support the use of option headers specific to Mobile IPv6. The IPv6 mobility header, the type 2 routing header, and the destination option header allow the configuration of IPv6 access list entries that match Mobile-IPv6-specific ICMPv6 messages and allow the definition of entries to match packets that contain the new and modified IPv6 extension headers. For more information on how to create, configure, and apply IPv6 access lists, refer to the Implementing Traffic Filters and Firewalls for IPv6 Security module.

•The icmp-type argument can be (but is not limited to) one of the following Mobile-IPv6-specific options:

–dhaad-request—numeric value is 144

–dhaad-reply—numeric value is 145

–mpd-solicitation—numeric value is 146

–mpd-advertisement—numeric value is 147

•When the dest-option-type keyword with the doh-number or doh-type argument is used, IPv6 packets are matched against the destination option extension header within each IPv6 packet header.

•When the mobility keyword is used, IPv6 packets are matched against the mobility extension header within each IPv6 packet header.

•When the mobility-type keyword with the mh-number or mh-type argument is used, IPv6 packets are matched against the mobility-type option extension header within each IPv6 packet header.

•When the routing-type keyword and routing-number argument are used, IPv6 packets are matched against the routing-type option extension header within each IPv6 packet header.

Controlling ICMP Unreachable Messages

When IPv6 is unable to route a packet, it generates an appropriate ICMP unreachable message directed toward the source of the packet. Perform this task to control ICMP unreachable messages for any packets arriving on a specified interface.

Enables the generation of ICMPv6 unreachable messages for any packets arriving on the specified interface.

Verifying Native IPv6 Tunneling for Mobile IPv6

Using the native IPv6 tunneling (or generic routing encapsulation [GRE]) infrastructure improves the scalability and switching performance of the home agent. After the home agent sends a BU from a mobile node, a tunnel interface is created with the encapsulation mode set to IPv6/IPv6, the source address set to that of the home agent address on the home interface of the mobile node, and the tunnel destination set to that of the CoA of the mobile node.

These features are transparent and need not be configured in order to work with Mobile IPv6. For further information on IPv6 tunneling and how to implement GRE tunneling in IPv6, see the Implementing Tunneling for IPv6 module.

SUMMARY STEPS

1. enable

2. show ipv6 mobile tunnels [summary | tunnelif-number]

DETAILED STEPS

Command or Action

Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

•Enter your password if prompted.

Step 2

show ipv6 mobile tunnels[summary| tunnelif-number]

Example:

Router# show ipv6 mobile tunnels

Lists the Mobile IPv6 tunnels on the home agent.

Configuring and Verifying Host Groups for Mobile IPv6

Users can create mobile user or group policies using the host group configuration. The host group profile lookup interface will allow the lookup of the profile associated with the sender of the BU using the sender's profile name, IPv6 address, or NAI. The host profile lookup interface also specifies the authentication properties for the IPv6 mobile node by creating either a unidirectional or bidirectional SPI.

A mobile node can identify itself using its profile name or home address as an identifier, which the Mobile IPv6 protocol messages use as an identifier in their registration messages. However, for certain deployments it is essential that the mobile node has the capability to identify itself using a logical identifier such as NAI rather than a network address.

Restrictions

•You cannot configure two host group profiles with the same IPv6 address when using the IPv6 address option.

•You cannot configure a profile with the NAI option set to a realm name and the address option set to a specific IPv6 address. You can either remove the NAI option or specify a fully qualified user name for the NAI option.

Customizing Mobile IPv6 on the Interface

Perform this task to customize interface configuration parameters for your router configuration. You can set these interface configuration parameters before you start Mobile IPv6 or while Mobile IPv6 is in operation. You can customize any of these parameters, as desired.

Example: Enabling Mobile IPv6 on the Router

The following example shows how to configure and enable Mobile IPv6 on a specified interface:

Router> enable

Router# config terminal

Router(config)# interface Ethernet 1

Router(config-if)# ipv6 mobile home-agent

Example: Enabling and Configuring NEMO on the IPv6 Mobile Router

The following example shows how to enable and configure NEMO on the IPv6 mobile router. The /128 subnet must be used; otherwise, the IPv6 mobile router will fail to register because it will believe the home network is locally connected:

ipv6 unicast-routing

!

interface ethernet0/0

no ip address

ipv6 address 2001:DB8:2000::1111/128

ipv6 nd ra mtu suppress

!

interface ethernet0/1

no ip address

ipv6 address 2001:DB8:1000::1111/128

ipv6 nd ra mtu suppress

!

interface Ethernet0/0

description Roaming Interface to AR2

no ip address

ipv6 address autoconfig

ipv6 enable

ipv6 nd ns-interval 5000

ipv6 mobile router-service roam

ipv6 rip home enable

!

interface Ethernet0/1

description Mobile Network Interface

no ip address

ipv6 address 2001:DB8:8000::8001/64

ipv6 enable

ipv6 nd advertisement-interval

ipv6 nd ra interval msec 1000

ipv6 rip home enable

!

interface Ethernet1/1

description Roaming Interface to AR1

no ip address

ipv6 address autoconfig

ipv6 enable

ipv6 nd ns-interval 5000

ipv6 mobile router-service roam priority 99

ipv6 rip home enable

!

ipv6 router rip home

!

ipv6 mobile router

host group mr-host-group

nai mr1@cisco.com

address 2001:DB8:2000::1112/128

authentication spi hex 100 key ascii hi

exit

home-network 2001:DB8:2000::/64 discover priority 127

home-network 2001:DB8:1000::/64 discover

home-address home-network eui-64

explicit-prefix

register lifetime 60

register retransmit initial 1000 maximum 1000 retry 1

register extend expire 20 retry 1 interval 1

Example: Enabling NEMO on the IPv6 Mobile Router Home Agent

The following example shows how to enable and configure NEMO on the IPv6 mobile router home agent. The anycast address is needed for DHAAD to work. The redistribute nemo command redistributes NEMO routes into the routing protocol:

Technical Assistance

Description

Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

http://www.cisco.com/cisco/web/support/index.html

Feature Information for Implementing Mobile IPv6

Table 1 lists the features in this module and provides links to specific configuration information.

Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.

Note Table 1 lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Table 1 Feature Information for Implementing Mobile IPv6

Feature Name

Releases

Feature Information

Mobile IPv6 Home Agent

12.3(14)T12.4

The Mobile IPv6 feature uses the IPv6 address space to enable Mobile IP deployment in any kind of large environment. No foreign agent is needed to use Mobile IPv6.

Cisco and the Cisco Logo are trademarks of Cisco Systems, Inc. and/or its affiliates in the U.S. and other countries. A listing of Cisco's trademarks can be found at www.cisco.com/go/trademarks. Third party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1005R)

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.