gcloud compute networks create NAME [--bgp-routing-mode=MODE; default="regional"] [--description=DESCRIPTION] [--[no-]enable-ula-internal-ipv6] [--internal-ipv6-range=INTERNAL_IPV6_RANGE] [--mtu=MTU] [--network-firewall-policy-enforcement-order=NETWORK_FIREWALL_POLICY_ENFORCEMENT_ORDER] [--network-profile=NETWORK_PROFILE] [--range=RANGE] [--resource-manager-tags=[KEY=VALUE,…]] [--subnet-mode=MODE] [--bgp-best-path-selection-mode=BGP_BEST_PATH_SELECTION_MODE --[no-]bgp-bps-always-compare-med --bgp-bps-inter-region-cost=BGP_BPS_INTER_REGION_COST] [GCLOUD_WIDE_FLAG …]
gcloud compute networks create is used to create virtual networks.
A network performs the same function that a router does in a home network: it
describes the network range and gateway IP address, handles communication
between instances, and serves as a gateway between instances and callers outside
the network.
gcloud compute networks create network-nameTo create a global custom subnet mode network with the name 'network-name', run:
gcloud compute networks create network-name --bgp-routing-mode=global --subnet-mode=customNAME--bgp-routing-mode=MODE; default="regional"MODE must be one of:
globalregional--description=DESCRIPTION--[no-]enable-ula-internal-ipv6--enable-ula-internal-ipv6 to enable and
--no-enable-ula-internal-ipv6 to disable.
--internal-ipv6-range=INTERNAL_IPV6_RANGE--mtu=MTU--network-firewall-policy-enforcement-order=NETWORK_FIREWALL_POLICY_ENFORCEMENT_ORDERNETWORK_FIREWALL_POLICY_ENFORCEMENT_ORDER must be one
of:
AFTER_CLASSIC_FIREWALLBEFORE_CLASSIC_FIREWALL--network-profile=NETWORK_PROFILE--range=RANGEThis flag only works if mode is legacy.
Using legacy networks is **DEPRECATED**, given that many newer Google Cloud Platform features are not supported on legacy networks. Please be advised that legacy networks may not be supported in the future.--resource-manager-tags=[KEY=VALUE,…]--subnet-mode=MODEMODE must be one of:
autocustomlegacy--bgp-best-path-selection-mode=BGP_BEST_PATH_SELECTION_MODEBGP_BEST_PATH_SELECTION_MODE must be one of:
LEGACYSTANDARD--[no-]bgp-bps-always-compare-med--bgp-bps-always-compare-med to enable and
--no-bgp-bps-always-compare-med to disable.
--bgp-bps-inter-region-cost=BGP_BPS_INTER_REGION_COSTBGP_BPS_INTER_REGION_COST must be one of:
ADD_COST_TO_MEDDEFAULT--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud alpha compute networks creategcloud beta compute networks creategcloud preview compute networks create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.