This topic describes how to associate an elastic IP address (EIP) with a secondary elastic network interface (ENI) in NAT mode. After you associate an EIP with a secondary ENI in NAT mode, the private IP address and public IP address of the secondary ENI are available for use. The EIP is not displayed on the secondary ENI.
- A secondary ENI is created in a virtual private cloud (VPC). The secondary ENI and the EIP that you want to associate with the secondary ENI are created in the same region. For more information, see Create an ENI.
- The secondary ENI is not associated with an Elastic Compute Service (ECS) instance. If the secondary ENI is associated with an ECS instance, disassociate the secondary ENI from the ECS instance, associate the EIP with the secondary ENI in NAT mode, and then associate the secondary ENI with the ECS instance. For more information, see Unbind an ENI.
- Log on to the Elastic IP Address console .
- In the top navigation bar, select the region where the EIP is created.
- On the Elastic IP Addresses page, find the EIP that you want to manage and click Bind Resource in the Actions column.
- In the Associate EIP with Resource dialog box, set the following parameters and click OK.
Parameter Description Instance Type Select Secondary ENI. Mode Select NAT Mode.In NAT mode:
- The number of EIPs that can be associated with a secondary ENI depends on the number of private IP addresses that are assigned to the secondary ENI.
- The private IP address and public IP address of the secondary ENI are available for use.
- The EIP is not displayed in the operating system. To query the EIP, call the DescribeEipAddresses operation. For more information, see DescribeEipAddresses.
- The EIP does not support protocols that are managed by NAT application layer gateways (ALGs), such as H.323, Session Initiation Protocol (SIP), Domain Network System (DNS), and Real Time Streaming Protocol (RTSP).
Select an instance to associate. Select the secondary ENI with which you want to associate the EIP.Make sure that the secondary ENI meets the following requirements:
- The secondary ENI is deployed in a VPC.
- The secondary ENI and the EIP belong to the same region.
AssociateEipAddress: associates an EIP with an instance in the same region.