HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_compute_routes_create.1
.TH "GCLOUD_ALPHA_COMPUTE_ROUTES_CREATE" 1



.SH "NAME"
.HP
gcloud alpha compute routes create \- create a new route



.SH "SYNOPSIS"
.HP
\f5gcloud alpha compute routes create\fR \fINAME\fR \fB\-\-destination\-range\fR=\fIDESTINATION_RANGE\fR (\fB\-\-next\-hop\-address\fR=\fINEXT_HOP_ADDRESS\fR\ |\ \fB\-\-next\-hop\-gateway\fR=\fINEXT_HOP_GATEWAY\fR\ |\ \fB\-\-next\-hop\-ilb\fR=\fINEXT_HOP_ILB\fR\ |\ \fB\-\-next\-hop\-instance\fR=\fINEXT_HOP_INSTANCE\fR\ |\ \fB\-\-next\-hop\-vpn\-tunnel\fR=\fINEXT_HOP_VPN_TUNNEL\fR) [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-network\fR=\fINETWORK\fR;\ default="default"] [\fB\-\-next\-hop\-ilb\-region\fR=\fINEXT_HOP_ILB_REGION\fR] [\fB\-\-next\-hop\-instance\-zone\fR=\fINEXT_HOP_INSTANCE_ZONE\fR] [\fB\-\-next\-hop\-vpn\-tunnel\-region\fR=\fINEXT_HOP_VPN_TUNNEL_REGION\fR] [\fB\-\-priority\fR=\fIPRIORITY\fR;\ default=1000] [\fB\-\-resource\-manager\-tags\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-tags\fR=\fITAG\fR,[\fITAG\fR,...]] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(ALPHA)\fR \fBgcloud alpha compute routes create\fR 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 \f5\fI\-\-destination\-range\fR\fR). 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 \f5\fI\-\-next\-hop\-address\fR\fR, \f5\fI\-\-next\-hop\-instance\fR\fR,
\f5\fI\-\-next\-hop\-vpn\-tunnel\fR\fR, \f5\fI\-\-next\-hop\-gateway\fR\fR, or
\f5\fI\-\-next\-hop\-ilb\fR\fR of the winning route. Packets that do not match
any route in the sending virtual machine routing table will be dropped.

Exactly one of \f5\fI\-\-next\-hop\-address\fR\fR,
\f5\fI\-\-next\-hop\-gateway\fR\fR, \f5\fI\-\-next\-hop\-vpn\-tunnel\fR\fR,
\f5\fI\-\-next\-hop\-instance\fR\fR, or \f5\fI\-\-next\-hop\-ilb\fR\fR must be
provided with this command.



.SH "EXAMPLES"

To create a route with the name 'route\-name' with destination range '0.0.0.0/0'
and with next hop gateway 'default\-internet\-gateway', run:

.RS 2m
$ gcloud alpha compute routes create route\-name \e
    \-\-destination\-range=0.0.0.0/0 \e
    \-\-next\-hop\-gateway=default\-internet\-gateway
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
\fINAME\fR

Name of the route to create.


.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-destination\-range\fR=\fIDESTINATION_RANGE\fR

The destination range of outgoing packets that the route will apply to. To match
all traffic, use ``0.0.0.0/0''.

.TP 2m

Exactly one of these must be specified:


.RS 2m
.TP 2m
\fB\-\-next\-hop\-address\fR=\fINEXT_HOP_ADDRESS\fR

Specifies the IP address of an instance that should handle matching packets. The
instance must have IP forwarding enabled (i.e., include
\f5\fI\-\-can\-ip\-forward\fR\fR when creating the instance using \f5gcloud
compute instances create\fR)

.TP 2m
\fB\-\-next\-hop\-gateway\fR=\fINEXT_HOP_GATEWAY\fR

Specifies the gateway that should handle matching packets. Currently, the only
acceptable value is \f5default\-internet\-gateway\fR which is a gateway operated
by Google Compute Engine.

.TP 2m
\fB\-\-next\-hop\-ilb\fR=\fINEXT_HOP_ILB\fR

Specifies the name or IP address of a forwarding rule for an internal TCP/UDP
load balancer. The forwarding rule's \f5\-\-load\-balancing\-scheme\fR must be
\f5INTERNAL\fR. You can use any \f5\-\-destination\-range\fR 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.

.TP 2m
\fB\-\-next\-hop\-instance\fR=\fINEXT_HOP_INSTANCE\fR

Specifies the name of an instance that should handle traffic matching this
route. When this flag is specified, the zone of the instance must be specified
using \f5\fI\-\-next\-hop\-instance\-zone\fR\fR.

.TP 2m
\fB\-\-next\-hop\-vpn\-tunnel\fR=\fINEXT_HOP_VPN_TUNNEL\fR

The target VPN tunnel that will receive forwarded traffic.


.RE
.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR

An optional, textual description for the route.

.TP 2m
\fB\-\-network\fR=\fINETWORK\fR; default="default"

Specifies the network to which the route will be applied.

.TP 2m
\fB\-\-next\-hop\-ilb\-region\fR=\fINEXT_HOP_ILB_REGION\fR

The region of the next hop forwarding rule. If not specified, you might be
prompted to select a region (interactive mode only).

To avoid prompting when this flag is omitted, you can set the
\f5\fIcompute/region\fR\fR property:

.RS 2m
$ gcloud config set compute/region REGION
.RE

A list of regions can be fetched by running:

.RS 2m
$ gcloud compute regions list
.RE

To unset the property, run:

.RS 2m
$ gcloud config unset compute/region
.RE

Alternatively, the region can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_REGION\fR\fR.

.TP 2m
\fB\-\-next\-hop\-instance\-zone\fR=\fINEXT_HOP_INSTANCE_ZONE\fR

The zone of the next hop instance. If not specified, you might be prompted to
select a zone (interactive mode only). \f5gcloud\fR attempts to identify the
appropriate zone by searching for resources in your currently active project. If
the zone cannot be determined, \f5gcloud\fR 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
\f5\fIcompute/zone\fR\fR property:

.RS 2m
$ gcloud config set compute/zone ZONE
.RE

A list of zones can be fetched by running:

.RS 2m
$ gcloud compute zones list
.RE

To unset the property, run:

.RS 2m
$ gcloud config unset compute/zone
.RE

Alternatively, the zone can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_ZONE\fR\fR.

.TP 2m
\fB\-\-next\-hop\-vpn\-tunnel\-region\fR=\fINEXT_HOP_VPN_TUNNEL_REGION\fR

The region of the next hop vpn tunnel. If not specified, you might be prompted
to select a region (interactive mode only).

To avoid prompting when this flag is omitted, you can set the
\f5\fIcompute/region\fR\fR property:

.RS 2m
$ gcloud config set compute/region REGION
.RE

A list of regions can be fetched by running:

.RS 2m
$ gcloud compute regions list
.RE

To unset the property, run:

.RS 2m
$ gcloud config unset compute/region
.RE

Alternatively, the region can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_REGION\fR\fR.

.TP 2m
\fB\-\-priority\fR=\fIPRIORITY\fR; default=1000

Specifies the priority of this route relative to other routes with the same
specificity. The lower the value, the higher the priority.

.TP 2m
\fB\-\-resource\-manager\-tags\fR=[\fIKEY\fR=\fIVALUE\fR,...]

A comma\-separated list of Resource Manager tags to apply to the route.

.TP 2m
\fB\-\-tags\fR=\fITAG\fR,[\fITAG\fR,...]

Identifies the set of instances that this route will apply to. If no tags are
provided, the route will apply to all instances in the network.


.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-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 \fB$ gcloud help\fR for details.



.SH "NOTES"

This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:

.RS 2m
$ gcloud compute routes create
.RE

.RS 2m
$ gcloud beta compute routes create
.RE