Each TPU node runs on a peer VPC network that Google manages. When you create a TPU node, the system automatically creates a peer connection to a VPC network from your project. The peer connection provides access to the TPU node from your instances, GKE clusters, and other Cloud Platform services that run on the same VPC network.
If you create a Cloud TPU using the
ctpu utility, the Google Cloud Platform (GCP)
gcloud command-line tool,
or the Cloud Console, you do not need to
specify an internal IP address or address range since the IP network address
is automatically configured.
You can also manually specify an internal IP address range for your TPU node. You can use any valid address in your VPC internal network as long as it does not conflict with other addresses that are already used on your network.
IP address range
IP address ranges for TPU nodes must meet the following requirements:
The IP address range must be from within the internal IP address ranges:
10.0.0.0 - 10.255.255.255 (10/8 prefix) 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
Your range must be one of the following formats:
W,X,Y,Zare integers in the range 0-255 with no leading zeros.
/Nis an optional address range size. If you do not specify a range size Cloud TPU selects the correct range size for your TPU type.
Your range must have enough addresses to accommodate the size of your TPU type. If you omit the range size, Cloud TPU selects the correct range size for your TPU type. If you must specify a range size, select a range size that provides enough addresses for 1/4th the number of TPU cores in your node with at least 8 addresses at a minimum. For example, if you select a
v3-512TPU type with 512 cores, your range must have a size of
/25to provide 128 addresses for the TPU peer network. For both
v3-32TPU types, you must specify the minimum range size of
/29to provide at least 8 addresses.
If you must select an address range, select one that does not conflict with another network resource on the network that you are using. For example, if you deploy your Cloud TPU on the "default" network that is created on standard Compute Engine projects, then this network will already have a subnetwork for
10.128.0.0/20range and you cannot place any of your subnetworks inside this range. This is true for all other regions.
Automatically identifying open address ranges
When you are writing applications to automatically create and manage TPU nodes, you can reserve allocated IP address ranges to automatically identify open IP address ranges on your network and reserve them to be used for your TPU nodes.