dualstack 前缀在 AWS ELB 中是什么意思?

What does the dualstack prefix mean in AWS ELB?

当我在 AWS Route 53 中添加 ELB 作为别名目标时,它会自动将 dualstack 前缀添加到我的 ELB DNS。这代表什么?

当我尝试 dig 时,两个 returns 相同的端点。

注意:这是一个内部负载平衡器。

dualstack DNS 名称 returns EC2-Classic 的 IPv6 和 IPv4 记录(Internet-facing,non-VPC) 弹性负载均衡器。

参见 Internet-Facing Load Balancers 上的 ELB 文档:

EC2-VPC

Load balancers in a VPC support IPv4 addresses only. [...]

EC2-Classic

Load balancers in EC2-Classic support both IPv4 and IPv6 addresses. [...]

The base public DNS name returns only IPv4 records. The public DNS name with the ipv6 prefix returns only IPv6 records. The public DNS name with the dualstack prefix returns both IPv4 and IPv6 records. We recommend that you enable IPv6 support by using the DNS name with the dualstack prefix to ensure that clients can access the load balancer using either IPv4 or IPv6.

尽管 Route53 控制台 总是 在为 A (IPv4) 或 [=17= 选择别名目标时将 dualstack. 添加到 DNS 名称] (IPv6) 资源记录集(如 documentation 中所述),此外 dualstack.* 端点始终正确 returns IPv4 A 记录,目前仅 EC2-Classic ELB(dualstack.*ipv6.* 端点)的 DNS 名称 return IPv6 AAAA 记录,或作为 AAAA 记录的有效别名目标。

您可以使用dig进行确认:

dig dualstack.[endpoint] A dualstack.[endpoint] AAAA +short

只有 EC2-Classic ELB 会 return 此命令的 IPv4 和 IPv6 地址,其他的只会 return 一个 IPv4 地址。