A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/compute/docs/ip-addresses/configure-ipv6-address below:

Configure IPv6 addresses for instances and instance templates | Compute Engine Documentation

Configure IPv6 addresses for instances and instance templates

Stay organized with collections Save and categorize content based on your preferences.

You can configure IPv6 addresses on a Compute Engine instance if the subnet that the instance is connected to has an IPv6 range configured.

For more information about IPv6, see IPv6 subnet ranges.

Specifications Accessing instances using IPv6 addresses

The implied IPv6 deny ingress firewall rule protects instances by blocking incoming connections to their IPv6 addresses. To access instances using their IPv6 addresses, you must have a higher priority rule that allows incoming access.

For more information about firewall rules, see VPC firewall rules and Hierarchical firewall policies.

For examples of VPC firewall rules, see Configure firewall rules for common use cases.

IPv6 address assignment

The following list describes how IPv6 addresses are assigned to compute instances.

Create an instance that uses IPv6 addresses

You can create an instance that uses either a combination of IPv4 and IPv6 addresses (dual-stack), or you can create an instance that uses only IPv6 addresses.

For information about how to create a Compute Engine instance that uses IPv6 addresses, see the following tasks:

Change the stack type of an instance

You can change the stack type of an existing Compute Engine instance. The stack type can be set to either of the following:

If you are changing the stack type to dual-stack, the instance must be connected to a dual-stack subnet. If you need to change which subnet the instance is connected to, stop the instance and change the subnet. After the subnet is updated, you can change the instance's IP stack type.

You can't change the stack type of an IPv6-only instance (Preview).

Console
  1. Go to the VM instances page.

    Go to VM instances

  2. Click the name of the instance that you want to assign an IPv6 address to.

  3. From the instance details page, complete the following steps:

    1. Click Edit.
    2. In Network interfaces, expand the interface that you want to edit.
    3. Select the IP stack type: IPv4 only (single-stack) or IPv4 and IPv6 (dual-stack).
    4. Click Done.
  4. Click Save.

gcloud

Update the stack type of an instance by using the gcloud compute instances network-interfaces update command

gcloud compute instances network-interfaces update INSTANCE_NAME \
    --stack-type=STACK_TYPE \
    --zone=ZONE

Replace the following:

REST

Update the stack type of an instance by making a PATCH request to the instances.updateNetworkInterface method.

PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME/updateNetworkInterface

Replace the following:

Example request body:

{
    "stackType": "STACK_TYPE",
}

Replace STACK_TYPE with the stack type for the instance: IPV4_ONLY or IPV4_IPV6.

Create an instance template with IPv6 addresses

You can create a regional or global instance template that can be used to create dual-stack or IPv6-only (Preview) instances. For more information, see Create instance templates.

You must use the Google Cloud CLI or REST to create an instance template that creates instances that use IPv6 addresses.

gcloud

To create a regional or global instance template, use the gcloud compute instance-templates create command. If you want to create a regional instance template, you must use the --instance-template-region flag to specify the region for the instance template.

The following example creates a global instance template:

gcloud compute instance-templates create TEMPLATE_NAME \
    --subnet=SUBNET \
    --stack-type=STACK_TYPE

Replace the following:

REST

To create a regional instance template, use the regionInstanceTemplates.insert method, or, to create a global instance template, use the instanceTemplates.insert method.

The following example creates a global instance template:

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/instanceTemplates

Replace PROJECT_ID with the project ID.

Example request body:

{
  "name": "INSTANCE_TEMPLATE_NAME"
  "properties": {
    "machineType": "MACHINE_TYPE",
    "networkInterfaces": [
      {
        "subnetwork": "regions/REGION/subnetworks/SUBNET",
        "stackType": "STACK_TYPE",
      },
    ],
    "disks":
    [
      {
        "type": "PERSISTENT",
        "boot": true,
        "mode": "READ_WRITE",
        "initializeParams":
        {
          "sourceImage": "IMAGE_URI"
        }
      }
    ]
  }
}

Replace the following:

To learn more about request parameters, see the instanceTemplates.insert method.

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 2025-08-07 UTC.

[[["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 2025-08-07 UTC."],[[["Compute Engine instances can be configured with IPv6 addresses if the connected subnet has an IPv6 range, enabling dual-stack (IPv4 and IPv6) or IPv6-only configurations."],["Instances with dual-stack or IPv6-only configurations are allocated a single /96 range of IPv6 addresses, with the first /128 address configured on the interface, and can only be connected to dual-stack or IPv6-only subnets."],["IPv6-only instances, currently in preview, are only supported with Ubuntu and Debian operating systems, and their stack type cannot be changed after creation."],["Accessing instances via IPv6 addresses requires a firewall rule that allows incoming connections, overriding the default implied deny rule for IPv6 ingress traffic."],["You can create dual-stack or IPv6-only instances using instance templates that are defined via Google Cloud CLI or REST, enabling you to define which OS, subnet, and stack type they will have."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4