Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the dualstack prefix mean in AWS ELB?

When I add an ELB as Alias Target in AWS Route 53, it automatically adds the dualstack prefix to my ELB DNS. What does this represent?

When I try dig, both returns the same endpoints.

Note: This is an internal load balancer.

like image 505
Nithin Satheesan Avatar asked Jan 12 '17 21:01

Nithin Satheesan


People also ask

What does Dualstack mean?

Dual stack means that devices are able to run IPv4 and IPv6 in parallel. It allows hosts to simultaneously reach IPv4 and IPv6 content, so it offers a very flexible coexistence strategy.

What is ELB DNS name?

This DNS name includes the name of the AWS Region in which the load balancer is created. For example, if you create a load balancer named my-loadbalancer in the US West (Oregon) Region, your load balancer receives a DNS name such as my-loadbalancer-1234567890.us-west-2.elb.amazonaws.com .


1 Answers

The dualstack DNS name returns both IPv6 and IPv4 records for an EC2-Classic (Internet-facing, non-VPC) Elastic Load Balancer.

See the ELB documentation on Internet-Facing Load Balancers:

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.

Although the Route53 console always prepends dualstack. to the DNS name when choosing an Alias Target for an A (IPv4) or AAAA (IPv6) Resource Record Set (as noted in the documentation), and additionally the dualstack.* endpoint always correctly returns an IPv4 A record, only the DNS names for an EC2-Classic ELB (either the dualstack.* or ipv6.* endpoint) currently return IPv6 AAAA records, or serve as a valid alias target for an AAAA record.

You can confirm using dig:

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

Only an EC2-Classic ELB will return both IPv4 and IPv6 addresses for this command, the others will only return an IPv4 address.

like image 66
wjordan Avatar answered Oct 08 '22 22:10

wjordan