Skip to content

Why does a subnet that load balancers use in my VPC in Amazon VPC have insufficient IP addresses?

2 minute read
1

A subnet in my Amazon Virtual Private Cloud (Amazon VPC) ran out of IP addresses, and I use this subnet with Elastic Load Balancing (ELB) load balancers.

Short description

A subnet might have insufficient IP addresses if fewer than eight IP addresses are available in each subnet. This applies to Application Load Balancers, Network Load Balancers, and Classic Load Balancers.

Note: Load balancers can have only one subnet per Availability Zone. For more information, see Requirements.

Resolution

There are two ways to free up or add IP addresses for your load balancers.

Delete unused elastic network interfaces

To delete an unused elastic network interface, see Delete a network interface.

Add a new subnet with available IP addresses

To create and associate a new subnet with your load balancer to increase the number of available IP addresses, complete the following steps:

  1. Create and add a new subnet to your Amazon VPC. You can base it on the original CIDR block or add a new CIDR block to your Amazon VPC.
    For Application Load Balancers, see Update the Availability Zones for your Application Load Balancer.
    For Network Load Balancers, see Update the Availability Zones for your Network Load Balancer.
  2. Check the route tables and network access control list (ACL) rules that are associated with your subnet.
    Make sure that your new subnet routes traffic the same way that your previous subnet did.
    For example, if you configured a default route to an internet gateway in your previous subnet, then confirm that your new subnet has a similar route.
  3. (Optional) To increase availability and improve traffic distribution, turn on cross-zone load balancing. This ensures traffic is balanced across all registered targets in all activated zones.

Related information

Create an internet-facing Classic Load Balancer

Getting started with Application Load Balancers using the AWS CLI

Getting started with Network Load Balancers