gcloud compute instances network-interfaces add INSTANCE_NAME [--aliases=ALIASES] [--external-ipv6-address=EXTERNAL_IPV6_ADDRESS] [--external-ipv6-prefix-length=EXTERNAL_IPV6_PREFIX_LENGTH] [--internal-ipv6-address=INTERNAL_IPV6_ADDRESS] [--internal-ipv6-prefix-length=INTERNAL_IPV6_PREFIX_LENGTH] [--ipv6-network-tier=IPV6_NETWORK_TIER] [--network=NETWORK] [--network-attachment=NETWORK_ATTACHMENT] [--network-tier=NETWORK_TIER] [--parent-nic-name=PARENT_NIC_NAME] [--private-network-ip=PRIVATE_NETWORK_IP] [--service-class-id=SERVICE_CLASS_ID] [--stack-type=STACK_TYPE] [--subnetwork=SUBNETWORK] [--vlan=VLAN] [--zone=ZONE] [--address=ADDRESS | --no-address] [GCLOUD_WIDE_FLAG …]
gcloud compute instances network-interfaces add adds a Dynamic
Network Interface to a Compute Engine instance.
gcloud compute instances network-interfaces add instance-name --parent-nic-name=nic1 --vlan=2 --network=network-1 --subnetwork=subnetwork-1INSTANCE_NAME--aliases=ALIASESFor example:
--aliases="10.128.1.0/24;range1:/32"
192.168.100.0/24), a single IP address (e.g.
192.168.100.1), or a netmask in CIDR format (e.g.
/24). 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.
--external-ipv6-address=EXTERNAL_IPV6_ADDRESS--external-ipv6-prefix-length=EXTERNAL_IPV6_PREFIX_LENGTH--external-ipv6-address. Currently only
/96 is supported and the default value is 96.
--internal-ipv6-address=INTERNAL_IPV6_ADDRESS--internal-ipv6-prefix-length=INTERNAL_IPV6_PREFIX_LENGTH--internal-ipv6-address=fd20::.
Only /96 IP address range is supported and the default value is 96. If not set,
then either the prefix length from
--internal-ipv6-address=fd20::/96 will be used or the default value
of 96 will be assigned.
--ipv6-network-tier=IPV6_NETWORK_TIERIPV6_NETWORK_TIER
must be (only one value is supported):
PREMIUM--network=NETWORK--network-attachment=NETWORK_ATTACHMENT--network-tier=NETWORK_TIERNETWORK_TIER must be one of:
PREMIUM, STANDARD, FIXED_STANDARD. The
default value is PREMIUM. NETWORK_TIER must
be one of:
FIXED_STANDARDPREMIUMSTANDARD--parent-nic-name=PARENT_NIC_NAME--private-network-ip=PRIVATE_NETWORK_IP--service-class-id=SERVICE_CLASS_ID--stack-type=STACK_TYPESTACK_TYPE must be one of:
IPV4_IPV6IPV4_ONLYIPV6_ONLY--subnetwork=SUBNETWORK--vlan=VLAN--zone=ZONEgcloud 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 ZONEA list of zones can be fetched by running:
gcloud compute zones listTo unset the property, run:
gcloud config unset compute/zoneCLOUDSDK_COMPUTE_ZONE.
--address=ADDRESS--no-address--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 instances network-interfaces addgcloud beta compute instances network-interfaces addgcloud preview compute instances network-interfaces add
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.