Q15Mobile Computing
Question
Explain the working mechanism of Mobile IP with a suitable example.
Answer
Mobile IP uses a Home Agent, Foreign Agent, and Care-of Address to route packets to a mobile node currently in a foreign network.
Mobile IP allows a Mobile Node (MN) to keep its permanent home IP address regardless of its physical point of attachment, so that ongoing higher-layer connections are not disrupted as the node moves between networks. It relies on three main entities: the Home Agent (HA), a router on the MN's home network; the Foreign Agent (FA), a router on the network the MN is currently visiting; and the Care-of Address (COA), a temporary address identifying the MN's current location.
Consider an MN whose home network is managed by a Home Agent (HA). When the MN moves to a foreign network, it first performs agent discovery by listening for agent advertisement messages broadcast periodically by Foreign Agents, or by broadcasting an agent solicitation itself. On hearing an advertisement, the MN acquires a temporary Care-of Address (COA), either the address of the FA itself, or a co-located COA obtained locally, for example via DHCP, if no FA is present.
- Registration: The MN sends a registration request, typically relayed through the FA, to its HA, binding its home address to the newly acquired COA. The HA updates its mobility binding table and sends a registration reply back.
- Data delivery to the MN: When a Correspondent Node (CN) sends a packet to the MN's permanent home address, standard IP routing carries it to the home network, where the HA intercepts it, typically using proxy ARP. The HA encapsulates the original packet inside a new IP packet addressed to the COA and tunnels it, commonly using IP-in-IP encapsulation, across the internetwork to the foreign network.
- Delivery at the foreign network: The FA (or the MN itself, for a co-located COA) receives the tunneled packet, strips the outer header (decapsulation), and delivers the original packet to the MN over the local link.
- Return traffic: Packets sent by the MN to the CN are usually forwarded directly through the FA to the CN using standard routing, without needing to pass through the HA.
This encapsulation and tunneling mechanism lets the MN remain reachable at its home address transparently to correspondent nodes and higher-layer protocols, even as its physical attachment point changes.