I have a VPC with several Droplets. They communicate with each other via private IPs. One of them needs to be replaced. I’d like to bring up a new Droplet using the same private IP of the one that will be replaced and then remove the old one.

Is this possible to do or will I need to go into all the other Droplets and re-wire them to communicate to the new one using a different private IP from the old one?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi,

First things first, it is very likely your new droplet will get the same IP address in VPC as the old one had. The important thing: you need to destroy your old droplet before creating a new one.

It is possible to assign any IP address of VPC range to the droplet’s network interface but it needs some extra effort to get VPC worked seamlessly. The problem is related to ARP (Address Resolution Protocol). Its packets are delivered just to the IP addresses that meet both of the following requirements:

  1. IP was associated automatically during droplet creation process.
  2. The droplet, holding particular IP, is turned on at the moment.

So, when you assign some IP address to the network interface (eth1) by hand, this network interface will not get any ARP request, and vice versa, none of the other droplets will get any ARP request from this network interface. That means the communication with this network interface will not work. To fix it, you would need to update ARP cache by hand on every single droplet in your VPC. I could imagine some script or even whole ARP cache update environment based on scripts that could do all the things automatically. Unfortunately, I cannot recommend this solution, unless it is for experiments/learning/etc. Bear in mind that this solution would not be supported by DO. In case of any problem related to VPC, you probably would have to fix it by yourself.
However, if you are still interested in this solution, I can share more information on it.