Help Center> Virtual Private Cloud> User Guide> Elastic IP> Assigning an EIP and Binding It to an ECS
Updated on 2024-05-06 GMT+08:00

Assigning an EIP and Binding It to an ECS

Scenarios

You can assign an EIP and bind it to an ECS so that the ECS can access the Internet.

Notes and Constraints

  • Each EIP can only be bound to one cloud resource and they must be in the same region.
  • If an EIP is frozen due to account arrears or security reasons, it cannot be bound or unbound.

Assigning an EIP

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Click in the upper left corner and choose Networking > Elastic IP.
  4. On the displayed page, click Buy EIP.
  5. Set the parameters as prompted.
    Table 1 Parameter descriptions

    Parameter

    Description

    Example Value

    Billing Mode

    The following billing modes are available:

    • Yearly/Monthly
    • Pay-per-use

    Pay-per-use

    Region

    Regions are geographic areas that are physically isolated from each other. The networks inside different regions are not connected to each other, so resources cannot be shared across different regions. For lower network latency and faster access to your resources, select the region nearest you. The region selected for the EIP is its geographical location.

    -

    EIP Type

    • Dynamic BGP: Dynamic BGP provides automatic failover and chooses the optimal path when a network connection fails.

    Dynamic BGP

    Billed By

    This parameter is available only when you set Billing Mode to Pay-per-use.

    • Bandwidth: You specify a maximum bandwidth and pay for the amount of time you use the bandwidth. This is suitable for scenarios with heavy or stable traffic.
    • Traffic: You specify a maximum bandwidth and pay for the total traffic you use. This is suitable for scenarios with light or sharply fluctuating traffic.
    • Shared Bandwidth: The bandwidth can be shared by multiple EIPs. This is suitable for scenarios with staggered traffic.

    Bandwidth

    Bandwidth

    The bandwidth size in Mbit/s.

    100

    DDoS Protection

    Cloud Native Anti-DDoS Basic

    Cloud Native Anti-DDoS Basic provides up to 5 Gbit/s of DDoS mitigation capacity. If the attack to an EIP exceeds 5 Gbit/s, the EIP will be blocked.

    -

    EIP Name

    The EIP name.

    eip-test

    Enterprise Project

    The enterprise project that the EIP belongs to.

    An enterprise project facilitates project-level management and grouping of cloud resources and users. The name of the default project is default.

    For details about creating and managing enterprise projects, see the Enterprise Management User Guide.

    default

    Advanced Settings

    Click the drop-down arrow to configure parameters, including the bandwidth name and tag.

    -

    Bandwidth Name

    The name of the bandwidth.

    bandwidth

    Tag

    The EIP tags. Each tag contains a key and value pair.

    The tag key and value must meet the requirements listed in Table 2.

    • Key: Ipv4_key1
    • Value: 3005eip

    Monitoring

    Used to monitor the EIP and enabled by default.

    You can use the management console or APIs provided by Cloud Eye to query the metrics and alarms generated for the EIP and bandwidth.

    -

    Required Duration

    The duration for which the purchased EIP will use. The duration must be specified if the Billing Mode is set to Yearly/Monthly.

    1 month

    Quantity

    The number of EIPs you want to purchase.

    The quantity must be specified if the Billing Mode is set to Pay-per-use.

    1

    Quantity

    The number of EIPs you want to assign.

    1

    Table 2 EIP tag requirements

    Parameter

    Requirement

    Example Value

    Key

    • Cannot be left blank.
    • Must be unique for each EIP.
    • Can contain a maximum of 36 characters.
    • Can contain only the following character types:
      • Uppercase letters
      • Lowercase letters
      • Digits
      • Special characters, including hyphens (-) and underscores (_)

    Ipv4_key1

    Value

    • Can contain a maximum of 43 characters.
    • Can contain only the following character types:
      • Uppercase letters
      • Lowercase letters
      • Digits
      • Special characters, including hyphens (-) and underscores (_)

    3005eip

    • If you are buying an EIP billed on a pay-per-use basis and you want to use a shared bandwidth, you can only select an existing shared bandwidth from the Bandwidth Name drop-down list. If there are no shared bandwidths to select, purchase a shared bandwidth first.
    • A dedicated bandwidth cannot be changed to a shared bandwidth and vice versa. However, you can purchase a shared bandwidth for pay-per-use EIPs.
      • After an EIP is added to a shared bandwidth, the EIP will use the shared bandwidth.
      • After an EIP is removed from the shared bandwidth, the EIP will use the dedicated bandwidth.
  6. Click Next.
  7. Click Submit.

Binding an EIP

  1. On the EIPs page, locate the row that contains the target EIP, and click Bind.
  2. Select the instance that you want to bind the EIP to.

  3. Click OK.