Ideally, our protocol stack architecture says that the upper layers aren't affected by the lower layers.
But with a wireless medium the loss of a packet due to interference or noise is much more common. The assumption no longer holds true. When a packet is destroyed by noise and times out in TCP, the TCP layer reacts by slowing down the rate at which it offers segments to the network. There is no reason to do this and performance suffers.
Another problem is that TCP connections span many hops and these hops may use different media. This makes it impossible for the sending TCP layer to determine the cause of the lost segment, so it can't react in the right way (slow down for congestion, or immediately resend for real loss).
One solution to this problem is to split a connection into multiple TCP connections, depending on the media traversed. Now each TCP connection is on homogeneous media and the TCP parameters and algorithms can be tuned to that media type. The disadvantage is that you've broken TCP semantics, since you no longer get end-to-end acknowledgments. The sender just knows when an ACK comes that the segment has reached the end of the first connection, not the receiver itself.
The problem with mobility and IP is that IP addresses are both network and host addresses mixed together. Routing is done by the network portion. If you move a host and don't change it's IP address, then packets for it will be routed to the "old" home network, and thereafter lost.
Giving a mobile host a new IP address each time it changes networks isn't attractive as the change would have to be propogated to everybody who might need it.
If the routing algorithms were changed to route based on the entire IP address, rather than just the network portion, that would solve the problem. But the routing tables of top level routers would be absolutely huge. This is expensive and slow to consult when routing.
The IETF Working Group on Mobile IP determined the following goals for any solution
Hosts should de-register when they leave, but to prevent problems for hosts that just leave, the registration can be given a validity time and expired if not refreshed.
The home agent will intercept packets sent to the home location for the mobile host. This can happen by creating an ARP entry with the mobile hosts home address and the home agents Ethernet address.
Received packets are encapsulated in another packet and sent to the foreign agent. This is tunnelling.
The home agent then sends a message to the sender telling it to use the care-of address for future packets.
The foreign agent unbundles the original packet from the tunnel packet and delivers it to the mobile host via the temporary address is is using.
For performance sake a correspondent node caches the binding of a mobile node's home address to its care-of address. Subsequent traffic to the mobile node will be sent directly to the mobile node's care-of address, rather than via the home agent. The cache time is somewhere between 0 and 2^16 seconds (or infinity). Caching prevents the home agent from being a bottleneck and reduces overall network traffic. The cached binding is sent to the correspondent node by the mobile node when it receives the first encapsulated packet.
The mobile node would typically get its foreign address via DHCP. It is then responsible for sending this care-of address back to its home agent (router). The router acting as home agent uses proxy Neighbor Discovery to intercept packets for the mobile node.
It's possible for a mobile node to have more than one care-of addresses. In this case it may receive packets to both of them. This could be helpful for things like overlapping cell phone ranges.