I have a couple of Centos 6 VMs that I am trying to setup. I assigned static IPs to them but when running ifconfig, I do not see the external IPs, just the internal IPs. Does Google not allow this capability?
相关问题
- What means in Dart static type and why it differs
- confusion over System.Web.HttpContext.Current
- How to use polymorphism or inheritance in static c
- What are the advantages ManageIQ has over OpenStac
- Error > Could not connect to Cloud Shell on port 8
相关文章
- How do I create a persistent volume claim with Rea
- Private static variables in php class
- PostgreSQL field data type for IPv4 addresses
- Passing static array in attribute
- Java “static import” vs. “import static” in Java 8
- Why does Java's List have “List.toArray()”, bu
- How to apply Static Weaving Ant Task with Eclipse-
- Virtual Box limit Bandwith on network [closed]
DHCP only supports requesting a single address. Google Compute Engine returns the internal IP address via DHCP, and maps the external assigned IP addresses to the VM using NAT.
If you want to fetch the assigned IP address from inside the VM, you could query the metadata server for that information.
In addition to what Anderson said, this is the command to query for the external IP from the instance itself:
curl "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip" -H "Metadata-Flavor: Google"