Create a VPC network for RDMA NICs (original) (raw)
This page describes how to create a VPC network with an RDMA network profile provided by Google Cloud.
You only need to configure a network profile if you want to run workloads that require RDMA NICs as described in RDMA network profiles. Otherwise, create a regular VPC networkwithout a network profile.
Before you begin
Make sure that you review thesupported and unsupported features in VPC networks with an RDMA network profile. If you attempt to configure unsupported features, Google Cloud returns an error.
Create a network with an RDMA network profile
To create a VPC network with an RDMA network profile, do the following.
Console
- In the Google Cloud console, go to the VPC networks page.
Go to VPC networks - Click Create VPC network.
- In the Name field, enter a name for the network.
- Keep the Set MTU automatically checkbox selected. When this checkbox is selected, Google Cloud automatically sets the MTU to the default value for the type of VPC network that you are creating. For VPC networks with an RDMA network profile, the default MTU value is
8896. - Select Configure network profile and do the following:
- In the Zone field, select the zone of the network profile that you want to use. The VPC network that you create is constrained to this zone, which means that you can only create resources in the network in this zone.
- Select the RDMA network profile for the zone that you selected previously, such as
us-central1-b-vpc-falcon,us-central1-b-vpc-roce, orus-central1-b-vpc-roce-metal. - To view the set of supported features for the network profile that you selected, click Preview network profile features.
- In the New subnet section, specify the following configuration parameters for a subnet:
- In the Name field, enter a name for the subnet.
- In the Region field, select the region in which to create the subnet. This region must correspond to the zone of the network profile that you configured. For example, if you configured a network profile in the
us-central1-bzone (such asus-central1-b-vpc-roce), then you must create the subnet in theus-central1region. - Enter an IPv4 range. This range is the primary IPv4 range for the subnet.
If you select a range that is not an RFC 1918 address, confirm that the range doesn't conflict with an existing configuration. For more information, see IPv4 subnet ranges. - Click Done.
- To add more subnets, click Add subnet and repeat the previous steps. You can also add more subnets to the network after you have created the network.
- Click Create.
gcloud
- To create the network, use the gcloud compute networks create commandand specify the
--network-profileflag.
gcloud compute networks create NETWORK \
--subnet-mode=custom \
--network-profile=NETWORK_PROFILE
Replace the following:NETWORK: a name for the VPC networkNETWORK_PROFILE: the zone-specific name of the network profile, such asus-central1-b-vpc-falcon,us-central1-b-vpc-roce, orus-central1-b-vpc-roce-metal.
RDMA network profiles aren't available in all zones. To view the zone-specific instances of a network profile that are available, follow the instructions tolist network profiles.
- To add subnets, use the gcloud compute networks subnets create command.
gcloud compute networks subnets create SUBNET \
--network=NETWORK \
--range=PRIMARY_RANGE \
--region=REGION
Replace the following:SUBNET: a name for the new subnetNETWORK: the name of the VPC network that contains the new subnetPRIMARY_RANGE: the primary IPv4 range for the new subnet, in CIDR notation. For more information, seeIPv4 subnet ranges.REGION: the Google Cloud region in which the new subnet is created. This must correspond to the zone of the network profile that you configured. For example, if you configured a network profile in theus-central1-bzone (such asus-central1-b-vpc-roce), then you must create the subnet in theus-central1region.
API
- To create the network, make a
POSTrequest to thenetworks.insert methodand specify thenetworkProfileproperty.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/networks
{
"autoCreateSubnetworks": false,
"name": "NETWORK",
"networkProfile": "NETWORK_PROFILE"
}
Replace the following:PROJECT_ID: the ID of the project where the VPC network is createdNETWORK: a name for the VPC networkNETWORK_PROFILE: the zone-specific name of the network profile, such asus-central1-b-vpc-falcon,us-central1-b-vpc-roce, orus-central1-b-vpc-roce-metal.
RDMA network profiles aren't available in all zones. To view the zone-specific instances of a network profile that are available, follow the instructions tolist network profiles.
- To add subnets, make a
POSTrequest to thesubnetworks.insert method.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/subnetworks
{
"ipCidrRange": "IP_RANGE",
"network": "NETWORK_URL",
"name": "SUBNET"
}
Replace the following:PROJECT_ID: the ID of the project that contains the VPC network to modifyREGION: the name of the Google Cloud region where the subnet is added. This region must correspond to the zone of the network profile that you configured. For example, if you configured a network profile in theus-central1-bzone (such asus-central1-b-vpc-roce), then you must create the subnet in theus-central1region.IP_RANGE: the primary IPv4 address range for the subnet. For more information, seeIPv4 subnet ranges.NETWORK_URL: the URL of the VPC network where you're adding the subnetSUBNET: a name for the subnet
What's next
- To create instances in your network, see the procedure that corresponds to your instance type and deployment method:
- For GPU instances, see Deployment options overview.
- For H4D instances, see Create a VM with IRDMA driver support.
- To get a general overview of network profiles, seeNetwork profiles for specific use cases.
- To learn about RDMA network profiles, seeRDMA network profiles.