Using legacy networks

Legacy networks are not recommended and can no longer be created. Many newer Google Cloud features are not supported in legacy networks. Instead, use Virtual Private Cloud (VPC) networks. For more information, see the VPC Network Overview.

This page describes modifying Google Cloud legacy networks. Use this page only if you have an existing setup that has a legacy network.


Legacy networks do not support the following Google Cloud features. To use these features, you must use VPC networks instead.

You cannot convert a legacy network into a VPC network. If you need the features of a VPC network, you have to rebuild your configuration in a VPC network, migrate or recreate your VMs, then point DNS or your services at the new setup.

Migrating VMs out of a legacy network

You can migrate your virtual machine (VM) instances out of your legacy network to a VPC network. For instructions, see Migrating a VM between networks.

Creating a legacy network

You can no longer create a legacy network.

If you try to create a legacy network, this error is displayed:

Creation of legacy mode networks is deprecated. Please create a subnet mode
network instead by removing the IPv4Range field and adding the
autoCreateSubnetworks field to your network insert request.

Deleting a legacy network

For a legacy network, you can explicitly delete the network only if the network is not in use by any resources.

To delete the network:

gcloud compute networks delete my-legacy-network

What's next