简体   繁体   中英

GCP multiple external static IP addresses to Instance VM alias IP NIC0

In Google Cloud PLatform can we use multiple external public IP addresses and map them to the instance Alias IP addresses both being part of NIC0 VM instance behind GCP external network load balancer? (this way we could publish multiple services each with different public to private IP mapping, but the Google documentation states that this is not the case)

https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address

Yes, it's possible to use multiple external IPs pointing a single NIC0 interface as per :

To assign multiple external IP addresses to a single instance, you can set up multiple forwarding rules to point to a single target instance using protocol forwarding .

Meaning that you would only need to create a pool and a regional forwarding rule .

Keep in mind that external traffic is going to be natted at some point, so it would look like all request are hitting your internal IP address directly, for example external IP 2.2.2.2, 3.3.3.3 and 4.4.4.4 will be translated into something like 10.128.0.2.

This will only work for the main NIC0 IP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM