How do I set up my load balancer to work with IPv6 addresses?

2 minuto de leitura

I want to configure my load balancer so that my clients can connect to it using IPv6 addresses. How can I do this?

Short description

To use IPv6 addresses, the virtual private cloud (VPC) where you launch your Application Load Balancer must have subnets with associated IPv6 CIDR blocks. For more information, see IPv6 addresses. To associate IPv6 addresses with your VPC and subnets, see Associate IPv6 CIDR blocks with your VPC and Associate an IPv6 CIDR block with your subnet.


Note: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent AWS CLI version.

Update the IP address type using the AWS Management Console

1.    Open the Amazon Elastic Compute Cloud (Amazon EC2) console.

2.    On the navigation pane, under LOAD BALANCING, choose Load Balancers.

3.    Select the load balancer.

4.    Choose Actions, and then choose Edit IP address type.

5.    For IP address type, choose either:
ipv4 to support only IPv4 addresses
dualstack to support both IPv4 and IPv6 addresses

6.    Choose Save.

Update the IP address type to "dualstack" using the AWS CLI

Run this command:

aws elbv2 set-ip-address-type --load-balancer-arn <value> --ip-address-type <value>

Note: Be sure to replace the placeholders in this command with your corresponding values. The possible values for --ip-address-type include ipv4 and dualstack.

Update the DNS record pointing to your Application Load Balancer

Update the CNAME or Alias (A and AAAA) record of your domain to point to the Application Load Balancer’s DNS name (with a "dualstack." prefix). This example uses a load balancer DNS name with the "dualstack" prefix:

Clients that communicate with the load balancer using IPv4 addresses resolve the A record. Clients that communicate with the load balancer using IPv6 addresses resolve the AAAA record.

Related information

Routing traffic to an Elastic Load Balancing load balancer

IP address types for your Application Load Balancer

Editing records

AWS OFICIALAtualizada há 2 anos