gcloud alpha compute routers add-interface Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha compute routers add-interface - add an interface to a Compute Engine router
- SYNOPSIS
gcloud alpha compute routers add-interfaceNAME--interface-name=INTERFACE_NAME(--interconnect-attachment=INTERCONNECT_ATTACHMENT--interconnect-attachment-region=INTERCONNECT_ATTACHMENT_REGION|--subnetwork=SUBNETWORK--subnetwork-region=SUBNETWORK_REGION|--vpn-tunnel=VPN_TUNNEL--vpn-tunnel-region=VPN_TUNNEL_REGION)[--ip-address=IP_ADDRESS][--ip-version=IP_VERSION][--mask-length=MASK_LENGTH][--redundant-interface=REDUNDANT_INTERFACE][--region=REGION][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)gcloud alpha compute routers add-interfaceisused to add an interface to a Compute Engine router.- POSITIONAL ARGUMENTS
NAME- Name of the router to update.
- REQUIRED FLAGS
--interface-name=INTERFACE_NAME- The name of the interface being added.
- Exactly one of these must be specified:
- Interconnect Attachment
--interconnect-attachment=INTERCONNECT_ATTACHMENT- The interconnect attachment of the interface being added.
--interconnect-attachment-region=INTERCONNECT_ATTACHMENT_REGION- Region of the interconnectAttachment to operate on. If not specified it will beset to the region of the router. Overrides the default
compute/regionproperty value for this command invocation.
- Subnetwork
--subnetwork=SUBNETWORK- The subnetwork of the interface being added.
--subnetwork-region=SUBNETWORK_REGION- Region of the subnetwork to operate on. If not specified it will be set to theregion of the router. Overrides the default
compute/regionpropertyvalue for this command invocation.
- VPN Tunnel
--vpn-tunnel=VPN_TUNNEL- The tunnel of the interface being added.
--vpn-tunnel-region=VPN_TUNNEL_REGION- Region of the vpn tunnel to operate on. If not specified it will be set to theregion of the router. Overrides the default
compute/regionpropertyvalue for this command invocation.
- Interconnect Attachment
- OPTIONAL FLAGS
--ip-address=IP_ADDRESS- The link local (IPv4) or ULA (IPv6) address of the router for this interface.
--ip-version=IP_VERSION- IP version of the interface. Possible values are IPV4 and IPV6. Defaults toIPV4.
IP_VERSIONmust be one of:IPV4- Interface with IPv4-based BGP.
IPV6- Interface with IPv6-based BGP.
--mask-length=MASK_LENGTH- The subnet mask for the IP range of the interface. The interface IP address andBGP peer IP address must be selected from the subnet defined by this range.
--redundant-interface=REDUNDANT_INTERFACE- The interface that is redundant to the current interface.
--region=REGION- Region of the router to update. If not specified, you might be prompted toselect a region (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
property:compute/regiongcloudconfigsetcompute/regionREGIONA list of regions can be fetched by running:
gcloudcomputeregionslistTo unset the property, run:
gcloudconfigunsetcompute/regionAlternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
- 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
$gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudcomputeroutersadd-interfacegcloudbetacomputeroutersadd-interface
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.