EIP quick start

更新时间:
复制 MD 格式

After you create an Elastic IP Address (EIP) and associate it with an ECS instance, the instance can access the internet.

You cannot associate an EIP with an ECS instance that already has a public IP address. However, you can convert a static public IP address to an EIP.

Step 1: Create an EIP

An EIP is a public IP address resource that you can purchase and hold independently. Before you use an EIP, you need to first apply for an EIP.

  1. Log on to the .

  2. On the Elastic IP Addresses page, click Create EIP.

  3. On the creation page, configure the EIP as described in the following table, click Create Now, and complete the payment.

    Parameter

    Description

    Billing Method

    Select the billing method for the EIP. This quick start uses Pay-as-you-go.

    Region and zone

    Select the region for the EIP. Ensure the EIP is in the same region as the ECS instance you plan to associate it with.

    Line type

    Select the line type for the EIP. This quick start uses BGP (Multi-ISP).

    Network type

    Select the network type for the EIP. Currently, only the Public network type is supported.

    Security protection

    Select a security protection level. This quick start uses Default.

    Address pool

    If you do not select a specific address pool, the system allocates an EIP from the Alibaba Cloud public IP address pool by default.

    Metering method for data transfer

    Select the metering method for data transfer of the EIP. This quick start uses Pay-By-Bandwidth.

    Maximum bandwidth

    Select the maximum bandwidth of the EIP. In this topic, it is set to 1 Mbps.

    Name

    Enter a name for the EIP.

    Resource Group

    Select the resource group to which the EIP belongs.

    Billing cycle

    Select a billing cycle for the EIP. Currently, pay-by-bandwidth EIP support billing only by Day.

    Quantity

    Select the number of EIPs to purchase.

Step 2: Associate the EIP with an ECS instance

Associate the EIP with an ECS instance in a VPC. After the ECS instance is associated with the EIP, the ECS instance can access the internet.

  1. Log on to the .

  2. In the top navigation bar, select the region of the EIP.

  3. On the Elastic IP Addresses page, find the target EIP and click Associate with Resource in the Actions column.

  4. In the Associate EIP with Resource dialog box, configure the following parameters and click OK.

    Parameter

    Description

    Instance Type

    Select ECS Instance.

    Resource Group

    Select the resource group to which the ECS instance belongs.

    Select an instance to associate

    Select the ECS instance to associate with the EIP. Ensure the ECS instance is in the Running or Stopped state, does not have a static public IP address, and is not already associated with another EIP.

Step 3: Test the internet connection

After you associate the ECS with the ECS instance, test the ECS instance's internet connection.

  1. Log on to the ECS instance associated with the EIP.

  2. Run the ping <public_domain_name> command to verify the internet connection.

    [root@xxx /test-xxx ~]# ping axxx.com
    PING axxx.com (106.xxx.xxx.56) 56(84) bytes of data.
    64 bytes from 106.xxx.xxx.56 (106.xxx.xxx.56): icmp_seq=1 ttl=48 time=5.44 ms
    64 bytes from 106.xxx.xxx.56 (106.xxx.xxx.56): icmp_seq=2 ttl=48 time=5.49 ms
    64 bytes from 106.xxx.xxx.56 (106.xxx.xxx.56): icmp_seq=3 ttl=48 time=5.48 ms
    64 bytes from 106.xxx.xxx.56 (106.xxx.xxx.56): icmp_seq=4 ttl=48 time=5.47 ms
    ^C
    --- axxx.com ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3004ms
    rtt min/avg/max/mdev = 5.447/5.476/5.492/0.092 ms
    [root@xxx test-xxx ~]#

References