Compute engin Internal ip adress can change after a google operation maintenance ?

989 views
Skip to first unread message

tout le Borrdel

unread,
May 26, 2016, 10:10:43 AM5/26/16
to gce-discussion
 Hi,

I have 2 compute instance A  and B .Instance A is the web server with an external ip and  Instance B is just a mysql machine who comunnicate with A like that  : 
instanceA ===>mysql request===> instance B  . i don't need external ip for instance B . 
From the manual  : 
An instance's internal IP addresses can change when an instance is deleted and recreated. If you restart an instance without deleting and recreating the instance, the instance retains the same internal IP address.

But what about google operation maintenance ? 
In thoses manual terms my instance B  internal ip will never change because i'll never delete it , even after some potentiel google operation maintenance

thanks for help,
regards

Faizan (Google Cloud Support)

unread,
May 26, 2016, 4:53:24 PM5/26/16
to gce-discussion
Hello,

The internal IP assigned to an instance is ephemeral and it can change during the maintenance event. 

I would recommend using the instance name instead of internal IP to communicate between instances in the same network. The network automatically resolves name to the internal IP address of the instance. Using the instance name rather than the internal IP address is useful because instance name most likely will remain the same.

I hope that helps.

Faizan

Faizan (Google Cloud Support)

unread,
May 26, 2016, 5:13:12 PM5/26/16
to gce-discussion
Hello,

I got some feedback from my team responsible for instance maintenance. Based on the feedback, maintenance events that we perform, i.e., live migrations, do not change the internal IP address or any other aspect of the VM's configuration. Even host errors/failures that cause the VM to crash and be restarted on a different host do not change the configuration of the VM (IPs, machine type, etc.).

Even a user-initiated action like Instances.stop() does not change the internal IP address of the stopped VM.

I apologize for the confusion.

Faizan

tout le Borrdel

unread,
May 26, 2016, 5:25:52 PM5/26/16
to gce-discussion
good news , many thanks for your detailled explanations  .

Sam Darwin

unread,
Aug 27, 2018, 10:06:28 AM8/27/18
to gce-discussion
Hello Faizan,

You wrote:
"Even a user-initiated action like Instances.stop() does not change the internal IP address of the stopped VM."
I am also observing the console https://console.cloud.google.com/compute/instances that after an instance is stopped, the internal IP remains attached. (an ephemeral IP). The IP is not available for use because it's assigned.
Consider the following command output. It shows an internal IP is assigned on a "terminated" instance. 
$ gcloud compute instances list
NAME        ZONE           MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP    STATUS
instance-3  us-central1-c  n1-standard-1               10.128.0.4                  TERMINATED

This all seems to be correct, and a good strategy. Keeping an IP associated with an instance is very convenient.

A question though is why the documentation is different: https://cloud.google.com/compute/docs/ip-addresses/  "If an instance is stopped, any ephemeral internal IP addresses assigned to the instance are released back into the network pool."  
When creating an instance in the console, the network configuration shows "ephemeral" for the internal IP address.   However, is it ephemeral? It seems to not be?    

Again, keeping an IP associated with an instance is very convenient.  Just a question about the docs.

Navi Aujla (Google Cloud Support)

unread,
Aug 27, 2018, 2:39:57 PM8/27/18
to gce-discussion
Hello Sam, 

Thank you for pointing this out. There is documentation update request in place to make the required changes. The internal IP of the VM never changes over the lifetime of a VM i.e the instance internal IP do not change with the instance stop/restart. 
Reply all
Reply to author
Forward
0 new messages