IP Mobility

Mobile IP protocols enabling devices to maintain connectivity while moving.

The Internet's Static Nature: The Fundamental Problem of Mobility

The original design of the Internet Protocol (IP) was built on a fundamental assumption: devices are stationary. An IP address served a dual purpose: it identified a specific device (who you are) and it specified its location in the network (where you are).

Analogy: Your home's postal address (e.g., 123 Main Street, Anytown, USA) does the same thing. It uniquely identifies your home, and it tells the postal service exactly where to find it. This system works perfectly as long as you are at home.

But what happens when you travel? If you go on a month-long trip to a hotel in a different city, any mail sent to your home address will just pile up on your doorstep. The postal service doesn't magically know that you've moved. Any active conversations you were having via mail (like a subscription service or bill payments) will be interrupted.

This is the exact problem that IP faces with mobile devices like laptops and smartphones. When your laptop connects to your home Wi-Fi, it gets an IP address from your home network. If you then take your laptop to a coffee shop, it connects to a completely different network and gets a new IP address. Your original "home" IP address is no longer valid. Any ongoing connections (a large file download, a VPN session to your office, a video call) would instantly break. The device would be unreachable at its old address.

was created to solve this very problem. It's a networking layer solution that allows a device to remain reachable through a single, permanent IP address, regardless of where in the world it connects to the internet.

The Mobile IP Solution: A Digital Mail Forwarding Service

Mobile IP solves the location problem with a clever system that works just like a mail forwarding service.

Analogy Continued: Before you leave for your trip, you go to your local post office and fill out a change-of-address form. You tell them, "For the next month, any mail that arrives for me at 123 Main Street should not be delivered there. Instead, please forward it to me at the Grand Hotel, Room 505, in New York City." Now, when someone sends a letter to your permanent home address, your trusted local post office intercepts it, puts it in a new envelope addressed to your hotel, and sends it on. Your correspondence continues uninterrupted.

Mobile IP establishes a similar system with three key roles.

The Key Players in Mobile IP

To make this "mail forwarding" work, Mobile IP defines several key components:

  • Mobile Node (MN): This is your device on the move: your laptop, smartphone, or tablet. The Mobile Node has a permanent IP address that never changes, regardless of where it connects.
    (In our analogy, this is you, the traveler.)
  • Home Agent (HA): This is a special router located on the Mobile Node's home network (the network to which its permanent IP address belongs). The Home Agent's job is to keep track of the Mobile Node's current location and to intercept and forward any packets addressed to its permanent IP.
    (This is your trusted local post office.)
  • Foreign Agent (FA): This is a router located on the foreign network, the network that the Mobile Node is currently visiting (like the coffee shop's Wi-Fi). The Foreign Agent helps the Mobile Node communicate with its Home Agent and delivers the forwarded packets to it. (Note: Foreign Agents are used in Mobile IPv4 but have been eliminated in Mobile IPv6).
    (This is the hotel's front desk or local mailroom.)
  • Care-of Address (CoA): This is a temporary IP address that the Mobile Node gets on the foreign network. This address tells the Home Agent where to forward the packets. The CoA can be the IP address of the Foreign Agent itself or a new, temporary IP address assigned directly to the Mobile Node.
    (This is your temporary address at the Grand Hotel, Room 505.)
  • Correspondent Node (CN): This is any other device on the internet (another host or a server) that wants to communicate with the Mobile Node. The Correspondent Node doesn't need to know that the MN is mobile; it always sends packets to the MN's permanent home address.
    (This is the friend or company sending you a letter.)

A Deep Dive: The Mobile IPv4 Process

The entire process in Mobile IPv4 can be broken down into three phases: discovery, registration, and data delivery.

Phase 1: Agent Discovery

How does a mobile device know if it's at home or on a foreign network? It listens for Agent Advertisements.

  • 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

Once the Mobile Node has discovered it is on a foreign network and has a Care-of Address, it must inform its Home Agent of its current location. This is the registration process:

  1. The MN sends a Registration Request message to the Foreign Agent. This message contains its permanent home IP address and its new Care-of Address.
  2. The Foreign Agent forwards this request to the Mobile Node's Home Agent.
  3. 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.
  4. 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

With registration complete, communication can begin. The path the data takes in Mobile IPv4 is famously inefficient and is known as triangular routing.

Let's follow a packet from a Correspondent Node (CN) to our Mobile Node (MN) which is visiting a network in Los Angeles, but its home network is in New York:

  1. 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.
  2. 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 encapsulates the 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.
  3. 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.
  4. The Return Path (Leg 3): When the Mobile Node sends a reply back to the CN, it does not need to go through the Home Agent. It can send the packet directly from its current location, using its permanent home address as the source IP and the CN's address as the destination. This creates a direct path from the MN to the CN.

The Inefficiency Triangle

The path from the CN to the MN is indirect (CN → HA → FA → MN), while the return path is direct (MN → CN). This creates a triangular path. This is highly inefficient. For instance, if the Correspondent Node was also in Los Angeles, just across the street from the Mobile Node's hotel, its packets would still have to travel all the way to New York and back to Los Angeles, adding unnecessary delay (latency).

The Leap Forward: Mobile IPv6

IPv6 was designed from the ground up with mobility as a core consideration. Mobile IPv6 (MIPv6) introduces several significant improvements over its IPv4 predecessor, primarily by eliminating triangular routing.

Key Improvements in MIPv6

  • No More Foreign Agents: In IPv6, the concept of a Foreign Agent is eliminated. An IPv6-enabled Mobile Node is more capable. It can discover the network it's on and configure its own temporary Care-of Address using standard IPv6 features like and . This simplifies the foreign network infrastructure.
  • Route Optimization with Binding Updates: This is the most critical enhancement. MIPv6 directly solves the triangular routing problem.
    1. The Mobile Node still registers its Care-of Address with its Home Agent, just as in MIPv4.
    2. However, after this initial registration, the MN can send a special message called a Binding Update directly to any Correspondent Node it is communicating with.
    3. This Binding Update tells the CN: "Hello, while my permanent address is my home address, for the time being, you can reach me directly at my current Care-of Address."
    4. The CN stores this information in a local table called a Binding Cache. For all subsequent packets to the MN, the CN will send them directly to the Care-of Address, completely bypassing the Home Agent.
    The result is a direct, optimized, two-way path between the MN and the CN, which drastically reduces latency and improves efficiency.

Mobile IPv4 vs. Mobile IPv6: A Comparison

FeatureMobile IPv4Mobile IPv6
Foreign Agent (FA)Required on the visited network.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.
IntegrationAn add-on to a protocol not designed for mobility.Tightly integrated with core IPv6 features.
    IP Mobility | Teleinf Edu