简体   繁体   English

无法在 Google Cloud 中创建双堆栈 VM - 此网络接口不支持 IPv6 访问配置

[英]Unable to create a dual stack VM in Google Cloud - IPv6 access config is not supported for this network interface

My objective is to set up internal protocol forwarding using IPv6.我的目标是使用 IPv6 设置内部协议转发

I am running the following command and getting stuck at step 4 - Create a dual stack VM.我正在运行以下命令并卡在第 4 步 - 创建双堆栈 VM。

The process that I have followed is as follows:我遵循的过程如下:

  1. Create a custom mode VPC:创建自定义模式 VPC:
gcloud compute networks create lb-network \
  --subnet-mode=custom
  --enable-ula-internal-ipv6
  1. Create a dual stack su.net:创建双栈su.net:
gcloud compute networks subnets create lb-subnet \
  --stack-type=IPV4_IPv6 \
  --ipv6-access-type=INTERNAL \
  --network=lb-network \
  --range=10.1.2.0/24 \
  --region=asia-east1

  1. Create a firewall rule to allow SSH connectivity to VMs:创建防火墙规则以允许 SSH 连接到 VM:
gcloud compute firewall-rules create firewall-allow-ssh \
--network=lb-network \
--target-tags=allow-ssh \
--allow=tcp:80 \
--source-ranges=0::0/0
  1. Create a dual stack VM:创建双栈虚拟机:
gcloud compute instances create vm-1 \
--zone=asia-east1-a \
--ipv6-network-tier=PREMIUM \
--subnet=lb-subnet \
--stack-type=IPV4_IPV6 \
--image-family=debian-10 \
--image-project=debian-cloud \
--tags=allow-ssh \
--subnet=lb-subnet \
--metadata=startup-script='#! /bin/bash
sudo apt-get update
sudo apt-get install apache2 -y
sudo a2ensite default-ssl
sudo a2enmod ssl
vm_hostname="$(curl -H "Metadata-Flavor:Google" \
http://169.254.169.254/computeMetadata/v1/instance/name)"
echo "Page served from: $vm_hostname" | \
tee /var/www/html/index.html
sudo systemctl restart apache2'

At this step, i get the following error:在这一步,我收到以下错误:

ERROR: (gcloud.compute.instances.create) Could not fetch resource:
 - Invalid value for field 'resource.networkInterfaces[0].ipv6AccessConfigs': ''. IPv6 access config is not supported for this network interface.

It seemed to have worked fine when I created external protocol forwarding using IPv6.当我使用 IPv6 创建外部协议转发时,它似乎工作正常。

Can you please guide me what I could be missing here.你能指导我在这里可能遗漏的东西吗?

You are getting this error because you are not enable a vpc.network ULA internal IPv6 range您收到此错误是因为您没有启用 vpc.network ULA 内部 IPv6 范围

You can create a su.net with external or internal IPv6 addresses enabled.您可以创建启用了外部或内部 IPv6 地址的 su.net。 Configuring an IPv6 range on a su.net does not configure IPv6 on VMs that you connect to that su.net.在 su.net 上配置 IPv6 范围不会在您连接到该 su.net 的 VM 上配置 IPv6。 For more information about configuring IPv6 on VMs, see configure IPv6 addresses on VMs.有关在 VM 上配置 IPv6 的详细信息,请参阅在 VM 上配置 IPv6 地址。

Refer this Create a custom mode VPC.network with a dual-stack su.net for more information有关详细信息,请参阅使用双栈 su.net 创建自定义模式 VPC.network

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM