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/current/help/man/man1/gcloud_compute_instances_network-interfaces_add.1
.TH "GCLOUD_COMPUTE_INSTANCES_NETWORK\-INTERFACES_ADD" 1



.SH "NAME"
.HP
gcloud compute instances network\-interfaces add \- add a Dynamic Network Interface to a Compute Engine instance



.SH "SYNOPSIS"
.HP
\f5gcloud compute instances network\-interfaces add\fR \fIINSTANCE_NAME\fR [\fB\-\-aliases\fR=\fIALIASES\fR] [\fB\-\-external\-ipv6\-address\fR=\fIEXTERNAL_IPV6_ADDRESS\fR] [\fB\-\-external\-ipv6\-prefix\-length\fR=\fIEXTERNAL_IPV6_PREFIX_LENGTH\fR] [\fB\-\-internal\-ipv6\-address\fR=\fIINTERNAL_IPV6_ADDRESS\fR] [\fB\-\-internal\-ipv6\-prefix\-length\fR=\fIINTERNAL_IPV6_PREFIX_LENGTH\fR] [\fB\-\-ipv6\-network\-tier\fR=\fIIPV6_NETWORK_TIER\fR] [\fB\-\-network\fR=\fINETWORK\fR] [\fB\-\-network\-attachment\fR=\fINETWORK_ATTACHMENT\fR] [\fB\-\-network\-tier\fR=\fINETWORK_TIER\fR] [\fB\-\-parent\-nic\-name\fR=\fIPARENT_NIC_NAME\fR] [\fB\-\-private\-network\-ip\fR=\fIPRIVATE_NETWORK_IP\fR] [\fB\-\-stack\-type\fR=\fISTACK_TYPE\fR] [\fB\-\-subnetwork\fR=\fISUBNETWORK\fR] [\fB\-\-vlan\fR=\fIVLAN\fR] [\fB\-\-zone\fR=\fIZONE\fR] [\fB\-\-address\fR=\fIADDRESS\fR\ |\ \fB\-\-no\-address\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fBgcloud compute instances network\-interfaces add\fR adds a Dynamic Network
Interface to a Compute Engine instance.



.SH "EXAMPLES"

To add a Dynamic Network Interface to a Compute Engine instance, run:.RS 2m
$ gcloud compute instances network\-interfaces add instance\-name \e
    \-\-parent\-nic\-name=nic1 \-\-vlan=2 \-\-network=network\-1 \e
    \-\-subnetwork=subnetwork\-1

.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
\fIINSTANCE_NAME\fR

Name of the instance to operate on. For details on valid instance names, refer
to the criteria documented under the field 'name' at:
https://cloud.google.com/compute/docs/reference/rest/v1/instances


.RE
.sp

.SH "FLAGS"

.RS 2m
.TP 2m
\fB\-\-aliases\fR=\fIALIASES\fR

The IP alias ranges to allocate for this interface. If there are multiple IP
alias ranges, they are separated by semicolons.

For example:

.RS 2m
\-\-aliases="10.128.1.0/24;range1:/32"
.RE

Each IP alias range consists of a range name and an IP range separated by a
colon, or just the IP range. The range name is the name of the range within the
network interface's subnet from which to allocate an IP alias range. If
unspecified, it defaults to the primary IP range of the subnet. The IP range can
be a CIDR range (e.g. \f5192.168.100.0/24\fR), a single IP address (e.g.
\f5192.168.100.1\fR), or a netmask in CIDR format (e.g. \f5/24\fR). If the IP
range is specified by CIDR range or single IP address, it must belong to the
CIDR range specified by the range name on the subnet. If the IP range is
specified by netmask, the IP allocator will pick an available range with the
specified netmask and allocate it to this network interface.

.TP 2m
\fB\-\-external\-ipv6\-address\fR=\fIEXTERNAL_IPV6_ADDRESS\fR

Assigns the given external IPv6 address to an instance. The address must be the
first IP in the range. This option is not applicable to instances with
stack\-type=IPV4_ONLY.

.TP 2m
\fB\-\-external\-ipv6\-prefix\-length\fR=\fIEXTERNAL_IPV6_PREFIX_LENGTH\fR

The prefix length of the external IPv6 address range. This flag should be used
together with \f5\-\-external\-ipv6\-address\fR. Currently only \f5/96\fR is
supported and the default value is \f596\fR.

.TP 2m
\fB\-\-internal\-ipv6\-address\fR=\fIINTERNAL_IPV6_ADDRESS\fR

Assigns the given internal IPv6 address or range to an instance. The address
must be the first IP address in the range or a /96 IP address range. This option
can only be used on a dual stack instance network interface.

.TP 2m
\fB\-\-internal\-ipv6\-prefix\-length\fR=\fIINTERNAL_IPV6_PREFIX_LENGTH\fR

Optional field that indicates the prefix length of the internal IPv6 address
range, should be used together with \f5\-\-internal\-ipv6\-address=fd20::\fR.
Only /96 IP address range is supported and the default value is 96. If not set,
then either the prefix length from \f5\-\-internal\-ipv6\-address=fd20::/96\fR
will be used or the default value of 96 will be assigned.

.TP 2m
\fB\-\-ipv6\-network\-tier\fR=\fIIPV6_NETWORK_TIER\fR

Specifies the IPv6 network tier that will be used to configure the instance
network interface IPv6 access config. \fIIPV6_NETWORK_TIER\fR must be (only one
value is supported):

.RS 2m
.TP 2m
\fBPREMIUM\fR
High quality, Google\-grade network tier.
.RE
.sp


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

Specifies the network this network interface belongs to.

.TP 2m
\fB\-\-network\-attachment\fR=\fINETWORK_ATTACHMENT\fR

The network attachment URL this network interface should connect to.

.TP 2m
\fB\-\-network\-tier\fR=\fINETWORK_TIER\fR

Specifies the network tier that will be used to configure the instance network
interface. \f5\fINETWORK_TIER\fR\fR must be one of: \f5PREMIUM\fR,
\f5STANDARD\fR, \f5FIXED_STANDARD\fR. The default value is \f5PREMIUM\fR.
\fINETWORK_TIER\fR must be one of:

.RS 2m
.TP 2m
\fBFIXED_STANDARD\fR
Public internet quality with fixed bandwidth.
.TP 2m
\fBPREMIUM\fR
High quality, Google\-grade network tier.
.TP 2m
\fBSTANDARD\fR
Public internet quality.
.RE
.sp


.TP 2m
\fB\-\-parent\-nic\-name\fR=\fIPARENT_NIC_NAME\fR

Name of the parent network interface of a dynamic network interface.

.TP 2m
\fB\-\-private\-network\-ip\fR=\fIPRIVATE_NETWORK_IP\fR

Specifies the RFC1918 IP to assign to the network interface. The IP should be in
the subnet IP range.

.TP 2m
\fB\-\-stack\-type\fR=\fISTACK_TYPE\fR

The stack type for the network interface. Determines if IPv6 is enabled on the
network interface. \fISTACK_TYPE\fR must be one of:

.RS 2m
.TP 2m
\fBIPV4_IPV6\fR
The network interface can have both IPv4 and IPv6 addresses.
.TP 2m
\fBIPV4_ONLY\fR
The network interface will be assigned IPv4 addresses.
.TP 2m
\fBIPV6_ONLY\fR
The network interface will be assigned IPv6 addresses.
.RE
.sp


.TP 2m
\fB\-\-subnetwork\fR=\fISUBNETWORK\fR

Specifies the subnetwork this network interface belongs to.

.TP 2m
\fB\-\-vlan\fR=\fIVLAN\fR

VLAN tag of a dynamic network interface, must be an integer in the range from 2
to 255 inclusively.

.TP 2m
\fB\-\-zone\fR=\fIZONE\fR

Zone of the instance to operate on. 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

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-address\fR=\fIADDRESS\fR

Assigns the given external address to the network interface. The address might
be an IP address or the name or URI of an address resource. Specifying an empty
string will assign an ephemeral IP. Mutually exclusive with no\-address. If
neither key is present the network interface will get an ephemeral IP.

.TP 2m
\fB\-\-no\-address\fR

If specified the network interface will have no external IP. Mutually exclusive
with address. If neither key is present the network interfaces will get an
ephemeral IP.


.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 "NOTES"

These variants are also available:

.RS 2m
$ gcloud alpha compute instances network\-interfaces add
.RE

.RS 2m
$ gcloud beta compute instances network\-interfaces add
.RE