1 Answers
Hi Paras,
Let’s start with the VPC network, for simplicity let’s use an auto mode network.
Auto Mode is when a VPC is created, and automatically assigns a CIDR range for every regional available on the Google Cloud Platform.
Internal IP Addresses are assigned from the regional subnet that is created for each region. Internal IP addresses can be assigned to any VM instance in any zone, in the region where the IP Address Range (subnet) exist. By default, theseIP addresses can only be accessed by other IP Addresses within the same VPC Network. Therefore they are internal to the network.
External IP address are public assessable IP assigned from a Google Managed pool of IP Addresses that are accessible from any IP address. External IP Addresses can be regional or global depending on the business need. They are external to the VPC network, but the network understands how to route traffic destined for the external addresses to the internal IP so traffic reaches the correct VM instances,
Every VM instances must have an internal IP address but the external IP address is optional, only for VMs that require a dedicated network connection.
Including a link to the VPC network page that IMO explains how subnets (internal address ranges) are created. https://cloud.google.com/vpc/docs/vpc#vpc_networks_and_subnets
Cheers,
Karlos