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_network-connectivity_internal-ranges_create.1
.TH "GCLOUD_NETWORK\-CONNECTIVITY_INTERNAL\-RANGES_CREATE" 1



.SH "NAME"
.HP
gcloud network\-connectivity internal\-ranges create \- create a new internal range



.SH "SYNOPSIS"
.HP
\f5gcloud network\-connectivity internal\-ranges create\fR (\fIINTERNAL_RANGE\fR\ :\ \fB\-\-region\fR=\fIREGION\fR) \fB\-\-network\fR=\fINETWORK\fR (\fB\-\-ip\-cidr\-range\fR=\fIIP_CIDR_RANGE\fR\ |\ [\fB\-\-prefix\-length\fR=\fIPREFIX_LENGTH\fR\ :\ \fB\-\-allocation\-strategy\fR=\fIALLOCATION_STRATEGY\fR\ \fB\-\-exclude\-cidr\-ranges\fR=[\fIEXCLUDE_CIDR_RANGES\fR,...]\ \fB\-\-first\-available\-ranges\-lookup\-size\fR=\fIFIRST_AVAILABLE_RANGES_LOOKUP_SIZE\fR\ \fB\-\-target\-cidr\-range\fR=[\fITARGET_CIDR_RANGE\fR,...]]) [\fB\-\-async\fR] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-immutable\fR] [\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-overlaps\fR=[\fIOVERLAPS\fR,...]] [\fB\-\-peering\fR=\fIPEERING\fR;\ default="for\-self"] [\fB\-\-usage\fR=\fIUSAGE\fR;\ default="for\-vpc"] [\fB\-\-migration\-source\fR=\fIMIGRATION_SOURCE\fR\ \fB\-\-migration\-target\fR=\fIMIGRATION_TARGET\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

Create a new internal range with the given name.



.SH "EXAMPLES"

Create an internal range with name \f5\fImy\-range\fR\fR and ip\-cidr\-range
\f5\fI192.168.0.0/25\fR\fR in network
\f5\fIhttps://www.googleapis.com/compute/v1/projects/my\-project/locations/global/networks/my\-network\fR\fR:

.RS 2m
$ gcloud network\-connectivity internal\-ranges create my\-range \e
    \-\-ip\-cidr\-range="192.168.0.0/25" \e
    \-\-network="https://www.googleapis.com/compute/v1/projects/my\-pro\e
ject/locations/global/networks/my\-network" \-\-project=my\-project
.RE

Create an internal range with name \f5\fImy\-range\fR\fR and auto\-allocated /25
block (prefix\-length \f5\fI25\fR\fR) in network \f5\fImy\-network\fR\fR:

.RS 2m
$ gcloud network\-connectivity internal\-ranges create my\-range \e
    \-\-prefix\-length=25 \-\-network="my\-network" \-\-project=my\-project
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m

Internal range resource \- Name of the internal range to be created. The
arguments in this group can be used to specify the attributes of this resource.
(NOTE) Some attributes are not given arguments in this group but can be set in
other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5internal_range\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp

This must be specified.


.RS 2m
.TP 2m
\fIINTERNAL_RANGE\fR

ID of the internal range or fully qualified identifier for the internal range.

To set the \f5internal_range\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5internal_range\fR on the command line.
.RE
.sp

This positional argument must be specified if any of the other arguments in this
group are specified.

.TP 2m
\fB\-\-region\fR=\fIREGION\fR

The location ID.


To set the \f5region\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5internal_range\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-region\fR on the command line;
.IP "\(bu" 2m
use default global location .
.RE
.sp


.RE
.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-network\fR=\fINETWORK\fR

The URL or resource ID of the network in which to reserve the internal range.
Legacy network is not supported. This can only be specified for a global
internal address.

For example:
.RS 2m
.IP "\(em" 2m

https://www.googleapis.com/compute/v1/projects/my\-project/locations/global/networks/my\-network
.IP "\(em" 2m
/projects/my\-project/locations/global/networks/my\-network
.IP "\(em" 2m
my\-network
.RE
.sp

.TP 2m

Exactly one of these must be specified:


.RS 2m
.TP 2m
\fB\-\-ip\-cidr\-range\fR=\fIIP_CIDR_RANGE\fR

IP range that this internal range defines.

.TP 2m
\fB\-\-prefix\-length\fR=\fIPREFIX_LENGTH\fR

An alternative to ip\-cidr\-range. Can be set when trying to create a
reservation that automatically finds a free range of the given size.

This flag argument must be specified if any of the other arguments in this group
are specified.

.TP 2m

Additional options for the internal range's address auto\-allocation (allowed
only when prefix\-length is set):



.RS 2m
.TP 2m
\fB\-\-allocation\-strategy\fR=\fIALLOCATION_STRATEGY\fR

Allocation strategy to be used when searching for a free range.
\fIALLOCATION_STRATEGY\fR must be one of:

.RS 2m
.TP 2m
\fBfirst\-available\fR
Pick the first available address range. This strategy is deterministic and the
result is easy to predict.

.TP 2m
\fBfirst\-smallest\-fitting\fR
Pick the smallest but fitting available range. This deterministic strategy
minimizes fragmentation of the address space.

.TP 2m
\fBrandom\fR
Random strategy, the legacy algorithm, used for backwards compatibility. This
allocation strategy remains efficient in the case of concurrent allocation
requests in the same peered network space and doesn't require providing the
level of concurrency in an explicit parameter, but it is prone to fragmenting
available address space.

.TP 2m
\fBrandom\-first\-n\-available\fR
Pick an arbitrary range out of the first N available ones. The N will be set in
the first_available_ranges_lookup_size flag. This strategy should be used when
concurrent allocation requests are made in the same space of peered networks
while the fragmentation of the addrress space is reduced.

.RE
.sp


.TP 2m
\fB\-\-exclude\-cidr\-ranges\fR=[\fIEXCLUDE_CIDR_RANGES\fR,...]

A list of CIDR ranges to exclude from the search for a free range. This can be
used to exclude specific ranges that are already intended to have some other
use.

.TP 2m
\fB\-\-first\-available\-ranges\-lookup\-size\fR=\fIFIRST_AVAILABLE_RANGES_LOOKUP_SIZE\fR

The number of ranges to be considered when using the RANDOM_FIRST_N_AVAILABLE
allocation strategy. This is only allowed when allocation\-strategy is set to
RANDOM_FIRST_N_AVAILABLE.

.TP 2m
\fB\-\-target\-cidr\-range\fR=[\fITARGET_CIDR_RANGE\fR,...]

Can be set to narrow down or pick a different address space while searching for
a free range. If not set, defaults to the "10.0.0.0/8" address space. This can
be used to search in other rfc\-1918 address spaces like "172.16.0.0/12" and
"192.168.0.0/16" or non\-rfc\-1918 address spaces used in the VPC.


.RE
.RE
.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-async\fR

Return immediately, without waiting for the operation in progress to complete.

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

Description of the internal range to be created.

.TP 2m
\fB\-\-immutable\fR

Mark the internal range as immutable. Then only non\-semantic fields like
description and labels could be modified after creation.

.TP 2m
\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]

List of label KEY=VALUE pairs to add.

.TP 2m
\fB\-\-overlaps\fR=[\fIOVERLAPS\fR,...]

Overlap specifications for the range being created. \fIOVERLAPS\fR must be one
of:

.RS 2m
.TP 2m
\fBoverlap\-existing\-subnet\-range\fR
Allows for creation of internal ranges that overlap with existing subnets.

.TP 2m
\fBoverlap\-route\-range\fR
Allows for creation or existence of routes that have a more specific destination
than the created range.

.RE
.sp


.TP 2m
\fB\-\-peering\fR=\fIPEERING\fR; default="for\-self"

The type of peering set for the internal range. \fIPEERING\fR must be one of:

.RS 2m
.TP 2m
\fBfor\-peer\fR
This behavior can be set when the internal range is being reserved for usage by
the peers. This means that no resource within the VPC in which it is being
created can use this to associate with a cloud resource, but one of the peers
can. This represents "donating" a range for peers to use.

.TP 2m
\fBfor\-self\fR
This beharior represents the case that the internal range is intended to be used
in the VPC on which it is created and is accessible from its peers. This implies
that peers or peer\-of\-peers cannot use this range.

.TP 2m
\fBnot\-shared\fR
This behavior can be set when the internal range is being reserved for usage by
the VPC on which it is created but not shared with the peers. In a sense it is
local to the VPC. This can be used to create internal ranges for various
purposes like HTTP_INTERNAL_LOAD_BALANCER or for interconnect routes that are
not shared with peers. This also implies that peers cannot use this range in a
way that is visible to this VPC, but can re\-use this range as long as it is
NOT_SHARED from the peer VPC too.

.RE
.sp


.TP 2m
\fB\-\-usage\fR=\fIUSAGE\fR; default="for\-vpc"

The type of usage set for the internal range. \fIUSAGE\fR must be one of:

.RS 2m
.TP 2m
\fBexternal\-to\-vpc\fR
Ranges created with EXTERNAL_TO_VPC cannot be associated with cloud resources
and are meant to block out address ranges for various use cases, like for
example, usage on\-prem, with dynamic route announcements via interconnect.

.TP 2m
\fBfor\-migration\fR
Ranges created with FOR_MIGRATION are used as locks for migrating subnetworks
between peered VPC networks.

.TP 2m
\fBfor\-vpc\fR
A cloud resource can use the reserved CIDR block by associating it with the
internal range resource if usage is set to FOR_VPC.

.RE
.sp


.TP 2m

Endpoints of a for\-migration internal range. This is only applicable when
\-\-usage is set to for\-migration. Both MIGRATION_SOURCE and MIGRATION_TARGET
must either belong to the same VPC or their VPCs must be peered (they may then
even belong to different projects). MIGRATION_SOURCE must belong to the VPC
network specifed by the \-\-network flag. MIGRATION_TARGET may name a subnetwork
which does not exist yet; it must be a valid resource path, and parent resources
(network and project) and their locations must exist.



.RS 2m
.TP 2m
\fB\-\-migration\-source\fR=\fIMIGRATION_SOURCE\fR

The migration source subnetwork (of a for\-migration internal range) resource
URI or resource ID.

This flag argument must be specified if any of the other arguments in this group
are specified.

.TP 2m
\fB\-\-migration\-target\fR=\fIMIGRATION_TARGET\fR

The migration target subnetwork (of a for\-migration internal range) resource
URI or resource ID.

This flag argument must be specified if any of the other arguments in this group
are specified.


.RE
.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 "API REFERENCE"

This command uses the \fBnetworkconnectivity/v1\fR API. The full documentation
for this API can be found at:
https://cloud.google.com/network\-connectivity/docs/reference/networkconnectivity/rest



.SH "NOTES"

This variant is also available:

.RS 2m
$ gcloud alpha network\-connectivity internal\-ranges create
.RE