0

Suppose I am sending data to a laptop with IP address say x but before data could reach its destination the laptop is moved to another network and now its IP address becomes Y.

Will the receiver still somehow receive data or would the packet get lost?

1
5

The data will get lost. At the very latest, the last router in the chain will send a "Who has X" ARP request and get no answer, so it will not be able to deliver the packet. Or, if it still has the MAC address in its ARP cache, it will send the frame to a MAC address that no longer exists on the network, and the frame will just end up being ignored by every device.

Or, some other device has been assigned IP address X in the meantime, so that device will answer, the router will send the packet to the device, and the device will throw it away because it doesn't know what to do with it. (E.g. in the case of TCP, there is no socket matching the source IP and port, and even if by some miracle, there is a matching socket, the Sequence Number will be off.)

There are some protocols out there that allow a device to communicate a changing IP address, and there are some other protocols out there, that allow a device to keep an IP address across multiple networks, but neither of those are widely deployed, and regardless, that would change the premise of the question.

1
  • Thanks!! That is exactly what I was looking for – Atharwa Adawdakar Sep 9 '20 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.