Loadbalancer needs 8 ip for each subnet, but cannot works with ipv6-only?

0

I am using load balancer. My tasks are available in 3 ipv4 only subnets today i created an. ipv6-only subnet I would like to attach my loadbalancer also to the ipv6 subnet I'm doing this, in cloud formation template

  LoadBalancer:
    Type: AWS::ElasticLoadBalancingV2::LoadBalancer
    Properties:
      LoadBalancerAttributes:
        - Key: idle_timeout.timeout_seconds
          Value: 60
      Name: TestElb
      Scheme: internet-facing
      SecurityGroups:
        - Ref: LoadBalancerSecurityGroup
      Subnets:
        - Fn::ImportValue: SubnetAArn-staging
        - Fn::ImportValue: SubnetBArn-staging
        - Fn::ImportValue: SubnetCArn-staging
        - Fn::ImportValue: Ipv6SubnetAArn-staging

I got this error: the subnet it refers is the ipv6-only

Resource handler returned message: "Not enough IP space available in subnet-0c7125.....1f5. ELB requires at least 8 free IP addresses in each subnet. (Service: ElasticLoadBalancingV2, Status Code: 400,----)

How can I use ELB with ipv6 only subnets?

1 Answer
1

Hello realtebo,

please look at the solution it will be helpful for you

When attempting to attach an AWS Elastic Load Balancer (ELB) to an IPv6-only subnet, a limitation arises due to ELB's requirement of at least 8 free IP addresses in each subnet, which is designed for IPv4 subnets. Unfortunately, ELB doesn't currently support IPv6-only subnets. To work around this constraint, one option is to create dual-stack subnets supporting both IPv4 and IPv6, allowing ELB attachment to the IPv4 portion. Alternatively, consider using AWS Application Load Balancer (ALB), which supports dual-stack endpoints and thus accommodates IPv6 traffic. Another approach involves directly routing IPv6 traffic to instances if they support IPv6.

Could you please find the below link if you get more information and if you follow step by step:

https://docs.aws.amazon.com/vpc/latest/userguide/aws-ipv6-support.html

https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-ipv6-only-subnets-and-ec2-instances/

answered 21 days ago
  • "ELB doesn't currently support IPv6-only subnets" . Does it mean it need a public ipv4 or a private ipv4 ? if it requires a ipv4, it's not a problem, we will convert ipv6-only subnet to dual-stack subnet. We are doing all the needed to completely throw away elastic ip and any other paid ipv4

  • "Allocate IPv4 addresses to your IPv6-only subnets, effectively converting them to dual-stack subnets. You can do this by associating Elastic IPs (EIPs) with instances in those subnets or by using NAT Gateways for outbound traffic. Modify your ELB configuration to use these dual-stack subnets. Go to the AWS Management Console, navigate to the Load Balancers section, select your ELB, and update the subnets associated with it to include the newly converted dual-stack subnets. Verify that your application can still be accessed through the ELB using both IPv4 and IPv6 addresses". Test connectivity from both IPv4 and IPv6 clients to ensure that traffic is properly routed through the ELB to your backend instances.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions