IP Address as Identity and Location
The original Internet Protocol (IP) model assumed that a host's point of attachment stayed fixed. An IP address identifies an interface and indicates its place in the routing structure. Changing the access network usually changes the topological address, so existing routes no longer lead to the host. Routers forward packets by address prefixes, so keeping the old address requires separating the host identifier from its current location.
Example: A host with address 192.0.2.123/24 can provide a service on port 505. The address identifies an interface and also tells routers which segment should receive the packet.
After the host moves to the 198.51.100.0/24 network, the existing route still leads to the old prefix. Without a mobility mechanism, packets sent to the previous address do not reach the new attachment point, and active connections must be established again.
The same problem appears when a laptop or smartphone moves between networks. A laptop on home Wi-Fi receives an address from the home network; after moving to a coffee shop, it receives an address from a different network. A file download, office VPN session, or video call still uses the previous endpoint, so the connection must be established again.
is specified as a network-layer solution. After registering a new point of attachment, the node remains reachable through its home address.
The Mobile IP Mechanism
Mobile IP separates the home address from the current point of attachment and records their association at the Home Agent. The HA intercepts packets sent to the home address, encapsulates them in a new packet, and sends them to the Care-of Address.
Example: An MN can register a binding between home address 192.0.2.123 and CoA 198.51.100.10 at the HA. The HA sends packets to the CoA while the home address remains the communication identifier. The service session can continue using port 505.
Mobile IP uses three roles: the Mobile Node, Home Agent, and Foreign Agent. The Correspondent Node is the party exchanging data with the MN.
Mobile IP Components
Mobile IP defines components responsible for the home address, current attachment point, and packet forwarding:
- Mobile Node (MN): This is a device that moves between networks, such as a laptop, smartphone, or tablet. The MN retains its home address and uses a Care-of Address after changing networks. It initiates registration and receives packets delivered through the tunnel.
The MN is the user device. - Home Agent (HA): This router is on the Mobile Node's home network, to which the home address belongs. The HA maintains the home-address to Care-of Address binding and intercepts packets sent to the MN. When the registration expires, it removes or updates the binding.
The HA intercepts packets for the mobile node. - Foreign Agent (FA): This router is on the foreign network visited by the Mobile Node. The FA can provide a Foreign-Agent Care-of Address, forward registration messages to the HA, and deliver packets after tunnel decapsulation. Foreign Agents are part of Mobile IPv4, not Mobile IPv6. With a co-located address, the MN can terminate the tunnel itself.
The FA is a router on the visited network. - Care-of Address (CoA):This address identifies the MN's current point of attachment in the foreign network. The HA uses it as the tunnel endpoint. The CoA can be the FA's address or a co-located address assigned directly to the MN.
The CoA identifies the current tunnel endpoint. - Correspondent Node (CN):This is a host or server communicating with the MN. In the basic mode, the CN sends packets to the MN's home address and does not need to know its current location. In Mobile IPv6 it can receive a binding update and use route optimization.
The CN sends packets to the mobile node.
The Mobile IPv4 Procedure
The Mobile IPv4 procedure includes agent discovery, registration, and data delivery. Advertisements describe available services, while registration has a lifetime so the HA can expire stale bindings.
Phase 1: Agent Discovery
The MN determines whether it is at home or in a foreign network from Agent Advertisements. These messages extend ICMP Router Discovery and can identify the agent type and available Care-of Address.
- Home Agents and Foreign Agents periodically broadcast these advertisement messages on their local networks.
- When a Mobile Node connects to a network, it listens for these messages.
- If it hears an advertisement from its own Home Agent, it knows it's at home and functions as a normal, fixed device.
- If it hears an advertisement from a different router (a Foreign Agent), it knows it has roamed to a foreign network and needs to get a Care-of Address and register its new location.
Phase 2: Registration
After obtaining a Care-of Address, the MN informs the Home Agent about its current point of attachment. The request includes the registration lifetime, allowing the HA to expire an outdated binding. Registration messages are authenticated to limit remote redirection of traffic to a false Care-of Address. Registration proceeds as follows:
- The MN sends a Registration Request to the FA when it uses a Foreign-Agent Care-of Address. With a co-located Care-of Address, it sends the request directly to the HA. The message contains the home address and Care-of Address.
- The Foreign Agent forwards this request to the Mobile Node's Home Agent.
- The Home Agent receives the request. It creates a mobility binding, an entry in its table that links the MN's permanent home address to its current Care-of Address, and approves the request.
- The Home Agent sends a Registration Reply back to the Foreign Agent, which then forwards it to the Mobile Node, confirming that the forwarding service has been set up.
Phase 3: Data Delivery and the Problem of Triangular Routing
In the basic Mobile IPv4 mode, a packet from the CN passes through the HA, while the MN's reply may go directly to the CN. This arrangement is called triangular routing. Encapsulation preserves the inner packet, while the outer header identifies the Care-of Address.
Consider a packet from a Correspondent Node (CN) to an MN visiting Los Angeles while its home network is in New York. The HA binding determines where the tunnel ends:
- CN to HA (Leg 1):The CN wants to send a packet to the MN. It only knows the MN's permanent home address (the New York address). It sends the packet to this address. Internet routers guide this packet correctly to the home network in New York.
- HA Intercepts and Tunnels (Leg 2): The Home Agent in New York, which is on the MN's home network, intercepts the packet. It checks its mobility binding table and sees that the MN is currently in Los Angeles at a specific Care-of Address. The HA then encapsulatesthe original packet inside a new IP packet. This new packet has the HA's address as the source and the MN's Care-of Address in Los Angeles as the destination. This "tunneling" hides the original packet and allows it to be routed across the internet to the Foreign Agent.
- FA to MN: The Foreign Agent in Los Angeles receives the encapsulated packet. It decapsulates it, stripping off the outer IPv4 header, revealing the original packet. It then forwards this original packet to the Mobile Node on its local network.
- The Return Path (Leg 3):In the basic mode, the MN sends a reply directly to the CN, using its home address as the source. If the visited network applies ingress filtering, the MN can use reverse tunneling through the HA. Reverse tunneling keeps the source address consistent with the visited network's forwarding policy.
Triangular Routing
The path from the CN to the MN is indirect (CN → HA → FA → MN), while the return path may be direct (MN → CN). If the CN is also in Los Angeles, packets still travel to New York before returning to the MN, adding delay.
Mobile IPv6
Mobile IPv6 (MIPv6) extends IPv6 with home-address and Care-of Address registration. Compared with Mobile IPv4, it does not require a Foreign Agent. It supports bidirectional tunneling through the HA and optional route optimization after registration with a CN. Packets can use the HA in the basic mode or go directly to the CoA after a validated binding update.
Mobile IPv6 Mechanisms
- No Foreign Agents: MIPv6 does not use an FA. The MN discovers the router and prefix through standard IPv6 features such as and . These functions replace the FA's discovery and address-configuration role. Router Advertisements provide the prefix, while the MN selects an interface identifier according to local privacy configuration.
- Route Optimization with Binding Updates: MIPv6 supports HA tunneling and an optional route-optimization mode. The latter requires a binding update at the CN and the return-routability procedure.
- The Mobile Node still registers its Care-of Address with its Home Agent, just as in MIPv4.
- After registration at the HA and a successful return-routability procedure, the MN can send a Binding Update to a CN.
- The update conveys the current Care-of Address associated with the MN's home address.
- The CN stores this information in a local Binding Cache and can send subsequent packets directly to the Care-of Address.
Mobile IPv4 vs. Mobile IPv6: A Comparison
| Feature | Mobile IPv4 | Mobile IPv6 |
|---|---|---|
| Foreign Agent (FA) | Required for an FA Care-of Address; not needed with a co-located address. | Not required. MN uses standard IPv6 features. |
| Routing Path (CN to MN) | Inefficient (Triangular Routing) via Home Agent. | Optimized (Direct Path) using Binding Updates. |
| Care-of Address (CoA) | Often the address of the Foreign Agent. | Configured by the MN itself using SLAAC or DHCPv6. |
| Integration | An add-on to a protocol not designed for mobility. | Tightly integrated with core IPv6 features. |