Stay organized with collections Save and categorize content based on your preferences.
gcloud beta compute routes create
NAME
--destination-range
=DESTINATION_RANGE
(--next-hop-address
=NEXT_HOP_ADDRESS
| --next-hop-gateway
=NEXT_HOP_GATEWAY
| --next-hop-ilb
=NEXT_HOP_ILB
| --next-hop-instance
=NEXT_HOP_INSTANCE
| --next-hop-vpn-tunnel
=NEXT_HOP_VPN_TUNNEL
) [--description
=DESCRIPTION
] [--network
=NETWORK
; default="default"] [--next-hop-ilb-region
=NEXT_HOP_ILB_REGION
] [--next-hop-instance-zone
=NEXT_HOP_INSTANCE_ZONE
] [--next-hop-vpn-tunnel-region
=NEXT_HOP_VPN_TUNNEL_REGION
] [--priority
=PRIORITY
; default=1000] [--resource-manager-tags
=[KEY
=VALUE
,…]] [--tags
=TAG
,[TAG
,…]] [GCLOUD_WIDE_FLAG …
]
(BETA)
gcloud beta compute routes create
is used to create routes. A route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with virtual machine instances by tag, and the set of routes for a particular VM is called its routing table. For each packet leaving a virtual machine, the system searches that machine's routing table for a single best matching route.
Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones (see
). If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer 3 and 4 packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by --destination-range
, --next-hop-address
, --next-hop-instance
, --next-hop-vpn-tunnel
, or --next-hop-gateway
of the winning route. Packets that do not match any route in the sending virtual machine routing table will be dropped.--next-hop-ilb
Exactly one of
, --next-hop-address
, --next-hop-gateway
, --next-hop-vpn-tunnel
, or --next-hop-instance
must be provided with this command.--next-hop-ilb
gcloud beta compute routes create route-name --destination-range=0.0.0.0/0 --next-hop-gateway=default-internet-gateway
NAME
--destination-range
=DESTINATION_RANGE
--next-hop-address
=NEXT_HOP_ADDRESS
--can-ip-forward
when creating the instance using gcloud compute instances create
)
--next-hop-gateway
=NEXT_HOP_GATEWAY
default-internet-gateway
which is a gateway operated by Google Compute Engine.
--next-hop-ilb
=NEXT_HOP_ILB
--load-balancing-scheme
must be INTERNAL
. You can use any --destination-range
that doesn't exactly match the destination of a subnet route and isn't more specific (has a longer subnet mask) than the destination of a subnet route. For more information, see https://cloud.google.com/load-balancing/docs/internal/ilb-next-hop-overview#destination_range.
--next-hop-instance
=NEXT_HOP_INSTANCE
--next-hop-instance-zone
.
--next-hop-vpn-tunnel
=NEXT_HOP_VPN_TUNNEL
--description
=DESCRIPTION
--network
=NETWORK
; default="default"
--next-hop-ilb-region
=NEXT_HOP_ILB_REGION
To avoid prompting when this flag is omitted, you can set the
property:compute/region
gcloud config set compute/region REGION
A list of regions can be fetched by running:
gcloud compute regions list
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
--next-hop-instance-zone
=NEXT_HOP_INSTANCE_ZONE
gcloud
attempts to identify the appropriate zone by searching for resources in your currently active project. If the zone cannot be determined, gcloud
prompts you for a selection with all available Google Cloud Platform zones.
To avoid prompting when this flag is omitted, the user can set the
property:compute/zone
gcloud config set compute/zone ZONE
A list of zones can be fetched by running:
gcloud compute zones list
To unset the property, run:
gcloud config unset compute/zone
Alternatively, the zone can be stored in the environment variable
.CLOUDSDK_COMPUTE_ZONE
--next-hop-vpn-tunnel-region
=NEXT_HOP_VPN_TUNNEL_REGION
To avoid prompting when this flag is omitted, you can set the
property:compute/region
gcloud config set compute/region REGION
A list of regions can be fetched by running:
gcloud compute regions list
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
--priority
=PRIORITY
; default=1000
--resource-manager-tags
=[KEY
=VALUE
,…]
--tags
=TAG
,[TAG
,…]
--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 compute routes create
gcloud alpha compute routes 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 2025-05-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-13 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4