Almost everybody owns a laptop, smart-phone or a tablet; they are mobile & connected devices that mean they have an access to the Internet and need an IP address to be able to communicate with other devices no matter which network they are connected to. Those devices also have to stay connected while they are moving.

Definition

Firstly the IP mobility problem is about 3 main axes: being able to communicate, being reachable, and maintaining outgoing communications while traveling.

If the mobile computer or mobile node is moving and changing of network, we have to consider that; but there is a dilemma: if the mobile node moves without changing its IP address, we lose routing but if we attribute it a new address we lose connections.

The obvious solution is to allow the device to use two IP addresses. One fixed is the home address and the second one is the care-of address which will change each time the mobile node will connect to a different network. So the network is updated with this new information about the mobile node.

Mobile IP topology

We have to keep in mind four entities.

Mobile Node: is the host or router which changes access point while maintaining all outgoing communications through its home address.
Correspondent Node: any node in a network, fixed or mobile.
Home Agent: is the mobile node’s home network router that receives datagrams sent to the mobile node. Then it delivers datagrams to the mobile node through its foreign address (care-of address). It can also maintain mobile node location information updated.
Foreign Agent: is the mobile node’s visited network router. It provides a routing service to the mobile node and a care-of address when the mobile node is registered.

Triangle Routing

Cisco's illustration for Triangle Routing

Mobile IP allows routing of IP datagrams to mobile nodes. The mobile node's home address always identifies the mobile node even if this one is connected to another point. When it is, a care-of address associates the mobile node with its home address by informing about the mobile node's current access point to the Internet. Mobile IP uses a registration mechanism to register the care-of address with a home agent.

The home agent redirects datagrams from the home network to the care-of address by constructing a new IP header that contains the mobile node's care-of address as the destination IP address. This new header then encapsulates the original IP datagram, so the mobile node's home address has no effect on the encapsulated datagram's routing until it arrives at the care-of address. This type of encapsulation is often called tunneling. After arriving at the care-of address, each datagram is decapsulated and then delivered to the mobile node.

The care-of address might belong to a foreign agent, or might be acquired by the mobile node through Dynamic Host Configuration Protocol (DHCP) or Point-to-Point Protocol (PPP).