每个网络接口的最大 IP 地址数 - Amazon Elastic Compute Cloud

每个网络接口的最大 IP 地址数

每个实例类型支持的每个网络接口的最大数量、每个网络接口支持的私有 IPv4 地址的最大数量,以及每个网络接口支持的 IPv6 地址的最大数量。每个网络接口的 IPv6 地址与私有 IPv4 地址有不同的限制并且分别列出。并非所有实例类型都支持 IPv6 寻址。

可用的网络接口

《Amazon EC2 实例类型指南》提供有关每种实例类型可以使用的网络接口的信息。有关更多信息,请参阅下列内容:

使用 AWS CLI 检索网络接口信息

您可以使用 describe-instance-types AWS CLI 命令来显示有关实例类型的信息,例如其支持的网络接口和每个接口的 IP 地址。以下示例显示了所有 C5 实例的此类信息。

aws ec2 describe-instance-types \ --filters "Name=instance-type,Values=c5.*" \ --query "InstanceTypes[].{ \ Type: InstanceType, \ MaxENI: NetworkInfo.MaximumNetworkInterfaces, \ IPv4addr: NetworkInfo.Ipv4AddressesPerInterface}" \ --output table

下面是示例输出。

--------------------------------------- | DescribeInstanceTypes | +----------+----------+---------------+ | IPv4addr | MaxENI | Type | +----------+----------+---------------+ | 30 | 8 | c5.4xlarge | | 50 | 15 | c5.24xlarge | | 15 | 4 | c5.xlarge | | 30 | 8 | c5.12xlarge | | 10 | 3 | c5.large | | 15 | 4 | c5.2xlarge | | 50 | 15 | c5.metal | | 30 | 8 | c5.9xlarge | | 50 | 15 | c5.18xlarge | +----------+----------+---------------+
使用 AWS Tools for PowerShell 检索网络接口信息

您可以使用 Get-EC2InstanceType PowerShell 命令来显示有关实例类型的信息,例如其支持的网络接口和每个接口的 IP 地址。以下示例显示了所有 C5 实例的此类信息。

Get-EC2InstanceType -Filter @{Name = "instance-type"; Values = "c5.*" } | ` Select-Object ` @{Name = 'Ipv4AddressesPerInterface'; Expression = {($_.Networkinfo.Ipv4AddressesPerInterface)}}, @{Name = 'MaximumNetworkInterfaces'; Expression = {($_.Networkinfo.MaximumNetworkInterfaces)}}, InstanceType | ` Format-Table -AutoSize

下面是示例输出。

Ipv4AddressesPerInterface MaximumNetworkInterfaces InstanceType ------------------------- ------------------------ ------------ 30 8 c5.4xlarge 15 4 c5.xlarge 30 8 c5.12xlarge 50 15 c5.24xlarge 30 8 c5.9xlarge 50 15 c5.metal 15 4 c5.2xlarge 10 3 c5.large 50 15 c5.18xlarge