All Products
Search
Document Center

Elastic Container Instance:Assign an IPv6 address to an elastic container instance

Last Updated:Oct 25, 2022

Elastic Container Instance supports IPv4 and IPv6 addresses. Compared with IPv4, IPv6 provides more IP addresses. This topic describes how to assign an IPv6 address to an elastic container instance.

Background information

IPv4 addresses are widely used. However, the limited number of IPv4 addresses restricts the development of the Internet. Compared with IPv4 addresses, IPv6 addresses are more sufficient and allow more types of devices to access the Internet. For more information, see What is an IPv6 gateway?

The following limits apply when you assign IPv6 addresses to elastic container instances:

  • You can assign only one IPv6 address to an elastic container instance.

  • All elastic container instances that are created by specifying the number of vCPUs and the memory size support IPv6 addresses. For elastic container instances that are created by specifying Elastic Compute Service (ECS) instance types, only the instances that are created based on the instance types of the following instance families support IPv6 addresses:

    • General-purpose instance families: g6e, g6, g5, and sn2ne

    • Compute-optimized instance families: c6e, c6a, c6, c5, and sn1ne

    • Memory-optimized instance families: r6e, r6, r5, and se1ne

    • Instance families with high clock speeds: hfc6 and hfg6

    • Compute-optimized GPU-accelerated instance families: gn6i, gn6v, and gn5i

    • Big data instance family with enhanced network performance: d1ne

    • Instance family with local SSDs: i2

    • Burstable instance families: t6 and t5

    • Shared instance family: s6

    For more information, see Instance families.

Preparations

  1. Enable IPv6 CIDR blocks for the virtual private cloud (VPC) in which the elastic container instance resides and for the vSwitch to which the elastic container instance is connected. For more information, see Enable IPv6 for a VPC and Enable IPv6 for a vSwitch.

  2. (Optional) Create an IPv6 gateway. For more information, see Create and manage an IPv6 gateway.

    IPv6 gateways are available in the following editions: Free Edition, Enterprise Edition, and Enhanced Enterprise Edition. Different editions of IPv6 gateways have different capabilities. After you enable an IPv6 CIDR block for a VPC, the system automatically creates a Free Edition IPv6 gateway for the VPC. You can create IPv6 gateways of different editions based on your business requirements.

  3. If you want to use an IPv6 address to communicate over the Internet, you must enable Internet bandwidth for the IPv6 gateway. For more information, see Enable and manage IPv6 Internet bandwidth.

Description

When you call the CreateContainerGroup operation to create an elastic container instance, you can use parameters such as Ipv6AddressCount to assign an IPv6 address to the elastic container instance. The following table describes these parameters. For more information, see CreateContainerGroup.

Parameter

Type

Example

Description

Ipv6AddressCount

Integer

1

The number of IPv6 addresses. Set the value to 1. You can assign only one IPv6 address to an elastic container instance.

Ipv6GatewayBandwidthEnable

Boolean

true

Specifies whether to enable IPv6 Internet communication for the elastic container instance.

Ipv6GatewayBandwidth

Integer

100

The peak Internet bandwidth of the IPv6 address when the Ipv6GatewayBandwidthEnable parameter is set to true. Valid values:

  • If the billing method for the Internet bandwidth of the IPv6 gateway is pay-by-bandwidth, the Internet bandwidth of the IPv6 address ranges from 1 to 2,000 Mbit/s.

  • If the billing method for the Internet bandwidth of the IPv6 gateway is pay-by-traffic, the Internet bandwidth range of the IPv6 address is based on the edition of the IPv6 gateway.

    • If the IPv6 gateway is of Free Edition, the Internet bandwidth of the IPv6 address ranges from 1 to 200 Mbit/s.

    • If the IPv6 gateway is of Enterprise Edition, the Internet bandwidth of the IPv6 address ranges from 1 to 500 Mbit/s.

    • If the IPv6 gateway is of Enhanced Enterprise Edition, the Internet bandwidth of the IPv6 address ranges from 1 to 1,000 Mbit/s.

The default value is the maximum value in the Internet bandwidth range of the IPv6 gateway.