Mobile IP is a communication protocol which is introduced as an improved version of the IP protocol. With mobile IP the host can move to a different network and still be connected to its home network and can communicate with the remote hosts.
In this section, we will discuss mobile IP, it working, several entities of mobile IP, advantages and disadvantages of mobile IP.
Content: Mobile IP
- Why is Mobile IP needed?
- Entities of Mobile IP
- Working of Mobile IP
- Advantages & Disadvantages of Mobile IP
- Key Takeaways
Why is Mobile IP needed?
While implementing the IP addressing system it was considered that the host would be a stationary host and would stick to the ‘specific network’ only. This is because the prefix of the IP address is used to identify the network and suffix of the IP address identifies the host in the corresponding network.
What if the host moved to another network? Its IP address would no longer be valid. So, how it can communicate with the remote hosts? IP Addressing system needs to be improved. Below we will discuss two solutions that have been proposed to modify the IP addressing system.
- Changing the IP address each time the host enters a new network. This attempt was not as successful as it has several drawbacks. Every time the computer enters a new network it as to be rebooted. The DNS table needs to be revised to let every host on the internet have knowledge about changes. Configuration files need to change each time. If the host moves to another network in-between the transmission of data, the data exchange would be interrupted.
- This solution is more feasible. Here, a host will have two addresses, an original address which would identify the host in the home network and a temporary address (care-of address) which would identify the host in the foreign network. The care-of address will keep on changing whenever the host will move to a new network.
So, the Mobile IP protocol allows a host to move to another network by maintaining its original IP address and still communicate with the other hosts over the internet.
Entities of Mobile IP
The functional entities in the Mobile IP protocol are discussed below:
- Home Network – It is a network to which the mobile host actually belongs. It is a permanent network of the mobile host.
- Foreign Network – It is a new network into which mobile host has moved.
- Remote Network – It is the network which is neither the home network nor the foreign network.
- Mobile Host – It is a host of the home network which has moved to the foreign network.
- Remote Host – It is a host in a remote network.
- Home Agent – It is a router attached to the home network which allows the mobile host to send and receive data from the remote host over the internet.
- Foreign Agent – It is a router attached to the foreign network which allows a mobile host to send and receive data from a remote host over the internet.
- Care-of address – It is a temporary IP address provided by the foreign agent to mobile host till it is in the foreign network.
- Home Address – It is the address of the mobile host in its home network.
Mobile IP communication protocol allows the mobile host to communicate with the remote host even if the mobile host is in the network other than its home network.
If a mobile host wants to communicate with the remote host being itself in the foreign network, then it has to go through three phases described below:
1. Agent Discovery
Agent discovery is the first phase and requires the involvement of mobile host, home agent and a foreign agent. This phase also has two sub-phases as described below:
- The mobile host has to discover the home agent’s address before it moves away from the home network.
- As the mobile host moves to a new network (foreign network), it has to discover the foreign agent’s address and also the care-of address.
The agent discovery is done with the help of two types of messages: agent advertisement and agent solicitation.
A simple router advertises its existence on the network with ‘ICMP router advertisement’ packet. If the router is playing the role of an agent, it ‘appends’ the agent advertisement message to the ICMP advertisement packet.
If the advertisement is done by the foreign agent, then it sends a ‘list of addresses’ available as care-of addresses, among which mobile host can choose the one. The announcement of the care-of address that has been chosen by the mobile host is done in the registration request.
In case, if a host in the network doesn’t receive ‘router ICMP advertisement’ packet. The host can initiate itself by sending router ICMP solicitation packet. If a mobile host has not received the ‘agent advertisement’, it can use router ICMP solicitation packet to send the ‘agent solicitation’ message.
This is the second phase and it also requires the involvement of mobile host, home agent and a foreign agent. After discovering the home agent and foreign agent address the mobile host has to register itself to the foreign agent and the home agent.
The mobile host has to renew its registration if has been expired. While returning back to the home network the mobile host has to cancel or deregister its registration. This registration process involves two of messages: registration request and registration reply. This registration messages are first encapsulated in a UDP user datagram.
The mobile host sends the registration request to foreign agent declaring its chosen ‘care-of address’ and along with this it also declares its ‘home address’ and ‘home agent’s address’. The foreign agent when receives the registration request message, it registers that mobile host and further forwards the message to the ‘home agent’.
The message has been passed to the home agent in the IP packet. So, now the home agent knows the address of the foreign agent where its mobile host is present now because the IP address would have the foreign agents address in its source address field of IP packet.
The reply packet is sent from the ‘home agent’ to the ‘mobile host’ via a ‘foreign agent’. This registration reply has the confirmation of whether the request is accepted or denied.
3. Data Transfer
Now finally, after agent discovery and registration process, the mobile host being in the foreign network, can communicate with the remote host. Let us see how?
Consider that the ‘remote host’ wants to send a data packet to the ‘mobile host’ unaware that the mobile host is not in its home network.
The remote host would definitely send the packet with its own address in the source address field and mobile host’s home address in the destination address field of the packet.
As the mobile host is not it’s the home network, the packet sent by the remote host is received by the home agent on behalf of the mobile host.
The ‘home agent’ encapsulates the received IP datagram into another IP datagram (with home agent’s address in the source address field and foreign agent address in the destination address field) and relay it to the foreign agent.
Foreign agent receives the packet, remove the encapsulation and see the home address of the mobile host in the destination address field of the original packet sent by the remote host. The foreign agent reviews its registry table and sees that which care-of address has been registered to the corresponding home address and then forwards the packet corresponding mobile host.
Next, if a mobile host being in the foreign network wants to reply or communicate with the remote host, it simply prepares a packet put its home address in the source address field of packet and remote hosts address in the destination address field of the packet. The mobile host then directly send the packet from the foreign network to the remote host.
Advantages and Disadvantages of Mobile IP
- A user with its network devices can move to any other network without losing its connection with home address.
- Mobile IP provides transparency while the data transfer process. It hides the fact that the mobile host is not in its home network and is communicating from the foreign network.
- When the ‘remote host’ and ‘mobile host’ both are in a foreign network and still the data transfer is occurring through the ‘home agent’ then the data packet has to travel more distance though both the host are in the same network.
- As we have seen above, if the mobile host in the foreign network wants to send the data packet to remote host it sends it directly from the foreign network with its home address as the source and remote host address in the destination.
But, if a remote host wants to send a packet to a mobile host in the foreign network, the data packet has to travel to the mobile host via its home agent. So, here it has to travel the extra distance.
- Mobile IP is a communication protocol which allows a mobile host to communicate with a remote host even if it is in a foreign network.
- If a remote host wants to communicate with the mobile host in the foreign network it has to go through three phases agent discovery, registration and data transfer.
- In agent discovery, mobile host discovers the ‘address’ of the home agent, foreign agent and care-of address with the help of two messages, agent advertisement and agent solicitation.
- In the registration process, the mobile host registers itself to the foreign agent and home agent with the help of two messages registration request and registration reply.
- In the data transfer phase, the mobile host and remote host can exchange data packets with each other.
- The most important advantage of mobile IP is that it allows the communication of a mobile host with remote host even if the mobile host is in the foreign network.
- The disadvantage of mobile IP is, it seems to be inefficient due to the extra distance that a message has to travel. Like, in case of double-crossing and triangle routing.
So, this is all about mobile IP which is designed to achieve mobile communication which means a mobile host can communicate with a remote host without losing the connection with the home network.