[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/vpc/docs/multiple-interfaces-concepts [Back]  [Original]

Multiple network interfaces  |  Virtual Private Cloud  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback Stay organized with collections Save and categorize content based on your preferences.

Multiple network interfaces

This page provides an overview of multiple network interfaces for Compute Engine instances. Instances with multiple network interfaces are referred to as multi-NIC instances.

An instance network interface connects to a Virtual Private Cloud (VPC) network and can be either a virtual network interface (vNIC) or a Dynamic NIC, where a Dynamic NIC is a child sub-interface of a parent vNIC. An instance's vNICs are backed by one or more physical NICs on the host server that runs the instance. For more information, see Network interface types.

Use cases

Multi-NIC instances are useful in the following scenarios:

You can also use multi-NIC instances with Private Service Connect interfaces to connect service producer and consumer networks in different projects.

Network interface types

See the following sections for details about network interface types in Google Cloud.

Instance network interfaces

Compute Engine instances connect to VPC networks by using network interfaces that you configure, which can be either vNICs or Dynamic NICs. These instance network interfaces correspond to the instances.networkInterfaces[] resource and property in the Compute Engine API.

For more information about each type of instance network interface, see the following:

Physical NICs

A physical NIC is the hardware component directly installed on the host server where an instance runs. Depending on the machine type of your instance, the instance's vNICs map to one or more physical NICs on a host server as follows:

Additionally, for most machine types, instances share a host server with other instances. Instances that share a host server also share its physical NIC or set of physical NICs. However, for some machine types, such as bare metal machine types or H3 and H4D machine types, a single instance occupies an entire host server.

Specifications

The following specifications apply to instances with multiple network interfaces:

Multiple network interfaces in the same VPC network

Preview

This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see the launch stage descriptions.

You can attach additional vNICs of an instance to the same VPC network as the nic0 vNIC of the instance.

You might want to attach multiple vNICs to the same VPC network to increase the bandwidth of an instance in the VPC network:

Limitations for multiple network interfaces in the same VPC network

See the following limitations for attaching multiple network interfaces of an instance to the same VPC network:

Dynamic NICs

If your use case requires any of the following, use Dynamic NICs. Ensure that you also review the properties and limitations of Dynamic NICs.

Properties of Dynamic NICs

See the following information about the properties of Dynamic NICs:

Limitations of Dynamic NICs

See the following limitations of Dynamic NICs:

Stack types and IP addresses

When you create a network interface, you specify one of the following interface stack types:

A VM instance can have network interfaces that have different stack types.

The following table describes supported subnet stack types and IP address details for each interface stack type:

Interface IPv4-only subnet Dual-stack subnet IPv6-only subnet IP address details
IPv4-only (single-stack) IPv4 addresses only. See IPv4 address details.
IPv4 and IPv6 (dual-stack) Both IPv4 and IPv6 addresses. See IPv4 address details and IPv6 address details
IPv6-only (single-stack) IPv6 addresses only. See IPv6 address details.

Changing network interface stack type

You can change the stack type of a network interface as follows:

You can't change the stack type of an IPv6-only interface. IPv6-only interfaces are only supported when creating instances.

IPv4 address details

Each IPv4-only or dual-stack network interface receives a primary internal IPv4 address. Each interface optionally supports alias IP ranges and an external IPv4 address. The following are the IPv4 specifications and requirements:

IPv6 address details

Compute Engine assigns each dual-stack or IPv6-only network interface a /96 IPv6 address range from the /64 IPv6 address range of the interface's subnet:

If you are connecting an instance to multiple networks by using IPv6 addresses, install google-guest-agent version 20220603.00 or later. For more information, see I can't connect to a secondary interface's IPv6 address.

Maximum number of network interfaces

For most machine types, the maximum number of network interfaces that you can attach to an instance scales with the number of vCPUs as described in the following tables.

The following are machine-specific exceptions:

Max interface numbers

Use the following table to determine how many network interfaces can be attached to an instance.

Number of vCPU Maximum number of vNICs Maximum number of Dynamic NICs Maximum number of network interfaces
(vNICs + Dynamic NICs)
2 or fewer 2 1 2
4 4 3 4
6 6 5 6
8 8 7 8
10 10 9 10
12 10 10 11
14 10 11 12
16 10 12 13
18 10 13 14
20 10 14 15
22 or more 10 15 16

Reference formulas

The following table provides the formulas used to calculate the maximum number of network interfaces for an instance. The formula depends on the number of vCPU.

Number of vCPU (X) Maximum number of vNICs Maximum number of Dynamic NICs Maximum number of network interfaces
(vNICs + Dynamic NICs)
X=1 2 1 2
2 ≤ X ≤ 10 X (X-1) X
X ≥ 12 10 min(15, (X-10)/2 + 9) min(16, (X-10)/2 + 10)

Example distributions of Dynamic NICs

You don't have to distribute Dynamic NICs evenly across vNICs. However, you might want an even distribution because Dynamic NICs share the bandwidth of their parent vNIC.

An instance must have at least one vNIC. For example, an instance that has 2 vCPUs can have one of the following configurations:

The following tables provide example configurations that evenly distribute Dynamic NICs across vNICs while using the maximum number of network interfaces for a given number of vCPU.

2 vCPUs, 2 NICs

The following table provides examples for an instance with 2 vCPUs that show how many Dynamic NICs you can have for a given number of vNICs.

Number of vCPU Number of vNICs Number of Dynamic NICs per vNIC Total number of network interfaces (vNICs + Dynamic NICs)
2 1 1 2
2 0

4 vCPUs, 4 NICs

The following table provides examples for an instance with 4 vCPUs that show how many Dynamic NICs you can have for a given number of vNICs.

Number of vCPU Number of vNICs Number Dynamic NICs per vNIC Total number of network interfaces (vNICs + Dynamic NICs)
4 1 3 4
2 1
4 0

8 vCPUs, 8 NICs

The following table provides examples for an instance with 8 vCPUs that show how many Dynamic NICs you can have for a given number of vNICs.

Number of vCPU Number of vNICs Number of Dynamic NICs per vNIC Total number of network interfaces (vNICs + Dynamic NICs)
8 1 7 8
2 3
4 1
8 0

14 vCPUs, 12 NICs

The following table provides examples for an instance with 12 vCPUs that show how many Dynamic NICs you can have for a given number of vNICs.

Number of vCPU Number of vNICs Number of Dynamic NICs per vNIC Total number of network interfaces (vNICs + Dynamic NICs)
14 1 11 12
2 5
4 2
6 1

22 vCPUs, 16 NICs

The following table provides examples for an instance with 22 vCPUs that show how many Dynamic NICs you can have for a given number of vNICs.

Number of vCPU Number of vNICs Number of Dynamic NICs per vNIC Total number of network interfaces (vNICs + Dynamic NICs)
22 1 15 16
2 7
4 3
8 1

Product interactions

This section describes interactions between multi-NIC instances and other products and features in Google Cloud.

Shared VPC

Except for Private Service Connect interfaces, the subnet and project relationship of a multi-NIC instance in a Shared VPC host or service project is as follows:

For more information about Shared VPC, see:

Compute Engine internal DNS

Compute Engine creates internal DNS name A and PTR records only for the primary internal IPv4 address of the nic0 network interface of an instance. Compute Engine doesn't create internal DNS records for any IPv4 or IPv6 address associated with a network interface different from nic0.

For more information, see Compute Engine internal DNS.

Static routes

Static routes can be scoped to specific instances by using network tags. When a network tag is associated with an instance, the tag applies to all network interfaces of the instance. Consequently, adding a network tag to or removing a network tag from an instance might change which static routes apply to any of the instance's network interfaces.

Load balancers

Instance group backends and zonal NEG backends each have an associated VPC network as follows:

The following table shows which backends support distributing connections or requests to any network interface.

Load balancer Instance groups GCE_VM_IP NEGs GCE_VM_IP_PORT NEGs
Backend service-based Regional external passthrough Network Load Balancer
The backend service isn't associated with a VPC network. For more information, see Backend services and VPC networks.
nic0 only Any NIC1 N/A
Internal passthrough Network Load Balancer
The backend service is associated with a VPC network. For more information, see Backend service network specification and Backend service network rules.
Any NIC Any NIC N/A
External proxy Network Load Balancer
For more information about backend service and network requirements, see Backends and VPC networks.
nic0 only N/A Any NIC
Internal proxy Network Load Balancer
For more information about backend service and network requirements, see Backends and VPC networks.
nic0 only N/A Any NIC
External Application Load Balancer
For more information about backend service and network requirements, see Backends and VPC networks.
nic0 only N/A Any NIC
Internal Application Load Balancer
For more information about backend service and network requirements, see Backends and VPC networks.
nic0 only N/A Any NIC

1Throughout the table, Any NIC doesn't apply when multiple network interfaces of an instance are in the same VPC network (Preview). For more information, see Limitations for multiple network interfaces in the same VPC network.

Target pool-based Regional external passthrough Network Load Balancers don't use instance groups or NEGs and only support load balancing to nic0 network interfaces.

Firewall rules

The set of firewall rules—from hierarchical firewall policies, global network firewall policies, regional network firewall policies, and VPC firewall rules—are unique to each network interface. Ensure that each network has appropriate firewall rules to allow the traffic that you want to allow to and from a multi-NIC instance. To determine which firewall rules apply to a network interface, and the source for each rule, see Get effective firewall rules for a VM interface.

Firewall rules can be scoped to specific VM instances by using network tags or secure tags, both of which apply to all network interfaces of an instance. For more information, see Comparison of secure tags and network tags.

Known issues

This section describes known issues related to using multiple network interfaces in Google Cloud.

Creation errors and decreased performance when using Dynamic NICs with GPU instances

Dynamic NICs aren't supported for use with GPU instances. If you create a GPU instance with Dynamic NICs, or add Dynamic NICs to an existing GPU instance, the following issues might occur:

These issues occur because the Dynamic NIC configuration leads to errors when Compute Engine attempts to distribute the instance's vNICs across physical NICs on the host server.

Dropped packets when using Dynamic NICs with alias IP ranges, protocol forwarding, or Passthrough Network Load Balancers

The guest agent automatically add local routes in the following scenarios for vNICs, but not for Dynamic NICs:

Because the local routes aren't added for Dynamic NICs, the Dynamic NIC might experience dropped packets.

To resolve this issue, add the IP addresses manually as follows:

  1. Connect to the instance by using SSH.

  2. If you are configuring an alias IP range, do the following. Otherwise, you can skip this step.

    1. In /etc/default/instance_configs.cfg, ensure that the ip_aliases setting is set to true.
    2. If the ip_aliases setting is set to false, modify the file to change it to true and then restart the guest agent:

      systemctl restart google-guest-agent
      
  3. Configure a local route for the alias IP range or the forwarding rule IP address by using the following command:

    ip route add to local IP_ADDRESS dev DYNAMIC_NIC_DEVICE_NAME proto 66
    

    Replace the following:

    • IP_ADDRESS: the alias IP range or forwarding rule IP address that you want to add a local route for.
    • DYNAMIC_NIC_DEVICE_NAME: the device name of the Dynamic NIC that you want to add a local route for. For example, a-gcp.ens4.3.

Issues with installation and management of Dynamic NICs in guest agent versions 20250901.00 to 20251120.01

If you configure automatic management of Dynamic NICs and your instance is running the guest agent at a version from 20250901.00 to 20251120.01, you might encounter the following issues:

Root cause

Starting with version 20250901.00, the guest agent migrated to a new plugin-based architecture to improve modularity. The new architecture didn't initially support the automatic installation and management of Dynamic NICs.

Resolution

To resolve these issues, update your instance to use guest agent version 20251205.00 or later:

  1. To update the guest agent to the latest version, see Update the guest environment.
  2. To confirm the guest agent version that your instance is running, see View installed packages by operating system version.

If necessary, you can temporarily work around these issues for instances that are running guest agent versions 20250901.00 to 20251120.01 by following the instructions in Backward compatibility to revert to the previous guest agent architecture.

Dynamic NIC operations fail when a compute instance is in multiple instance groups

If you add or delete a Dynamic NIC, and the operation gets stuck in a RUNNING state at 0% progress and eventually fails with an INTERNAL_ERROR, this might be because the compute instance is in multiple instance groups (managed or unmanaged).

To let the operation complete, remove the instance from all but one instance group. You can remove an instance from a managed instance group or remove an instance from an unmanaged instance group.

What's next

Send feedback

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-08-11 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page