High-availability virtual IP addresses (HAVIPs) are private IP addresses that can be created and released as independent resources. You can associate an HAVIP with a cloud resource in a virtual private cloud (VPC), such as an Elastic Compute Service (ECS) instance, elastic network interface (ENI), or elastic IP address (EIP). After an HAVIP is associated with an ECS instance. The ECS instance can advertise the HAVIP by sending Address Resolution Protocol (ARP) messages to obtain multiple private IP addresses. After an HAVIP is associated with an EIP, the HAVIP can use the EIP to provide services over the Internet. This topic describes how to work with HAVIPs.

References

Create an HAVIP

Before you create an HAVIP, make sure that the following requirements are met:
  1. Log on to the VPC console.
  2. In the left-side navigation pane, click HaVip.
  3. In the top navigation bar, select the region where you want to create the HAVIP.
    For more information about regions that support HAVIPs, see Feature release and supported regions.
  4. On the HaVip page, click Create HaVip.
  5. In the Create HaVip panel, set the following parameters and click OK.
    Parameter Description
    Region Displays the region where you want to create the HAVIP.
    VPC Select the VPC to which the HAVIP belongs.
    vSwitch Select the vSwitch to which the HAVIP belongs.
    vSwitch CIDR Block Displays the CIDR block of the vSwitch.
    Private IP Address Specify a private IP address for the HAVIP.
    Note You must specify an idle private IP address that falls within the CIDR block of the vSwitch.

Associate an HAVIP with an ECS instance

  • An ECS instance is created. For more information, see Create an instance by using the provided wizard.
  • An HAVIP can be associated with at most two ECS instances.
  • An HAVIP can be associated with two ECS instances or two ENIs (primary ENIs or secondary ENIs). However, you cannot associate an HAVIP with an ECS instance and an ENI at the same time.
  • If you delete an ECS instance that is associated with an HAVIP, the system automatically disassociates the HAVIP from the ECS instance.
  1. Log on to the VPC console.
  2. In the left-side navigation pane, click HaVip.
  3. In the top navigation bar, select the region where the HAVIP is deployed.
  4. On the HaVip Addresses page, find the HAVIP and click its ID.
  5. In the Resources section, find ECS Instances and click Bind.
  6. On the page that appears, select the ECS instance to be associated and click OK.
    Parameter Description
    Resource Type Select the type of resource with which you want to associate the HAVIP. Supported types are:
    • ECS Instances
    • ENI

    In this example, ECS Instances is selected.

    Bind Resource Select the ECS instance with which you want to associate the HAVIP.
    The ECS instance must meet the following requirements:
    • The ECS instance is deployed in a VPC.
    • The ECS instance and the HAVIP belong to the same vSwitch.

Associate an HAVIP with an ENI

You can associate an HAVIP with the primary ENI or secondary ENI of an ECS instance. Then, the ECS instance can advertise the HAVIP by sending ARP messages to obtain multiple private IP addresses.

  • An ECS instance is created. For more information, see Create an instance by using the provided wizard.
  • A secondary ENI is created. For more information, see Create an ENI.
  • An HAVIP can be associated with at most two ENIs.
  • An HAVIP can be associated with two ECS instances or two ENIs. However, you cannot associate an HAVIP with an ECS instance and an ENI at the same time.
  • If you disassociate a secondary ENI that is associated with an HAVIP from an ECS instance, the secondary ENI is still associated with the HAVIP. If you delete an ENI that is associated with an HAVIP, the system automatically disassociates the HAVIP from the ENI.
  1. Log on to the VPC console.
  2. In the left-side navigation pane, click HaVip.
  3. In the top navigation bar, select the region where the HAVIP is deployed.
  4. On the HaVip Addresses page, find the HAVIP and click its ID.
  5. In the Resources section, find ECS Instances(Standby) and click Bind.
  6. In the dialog box that appears, set the following parameters and click OK.
    Parameter Description
    Resource Type Select the type of resource with which you want to associate the HAVIP. Supported types are:
    • ECS Instances
    • ENI

    In this example, ENI is selected.

    Bind Resource Select the ENI with which you want to associate the HAVIP.

    The ENI and HAVIP must belong to the same vSwitch.

Associate an HAVIP with an EIP

You can associate an HAVIP with an EIP. After the HAVIP is associated with the EIP, the HAVIP can use the EIP to provide services over the Internet.

An EIP is created. For more information, see Apply for new EIPs.

  1. Log on to the VPC console.
  2. In the left-side navigation pane, click HaVip.
  3. In the top navigation bar, select the region where the HAVIP is deployed.
  4. On the HaVip Addresses page, find the HAVIP and choose More > Bind EIP Address in the Actions column.
  5. In the dialog box that appears, select the EIP with which you want to associate the HAVIP and click OK.
    The EIP must meet the following requirements:
    • The EIP and the HAVIP must be deployed in the same region.
    • The EIP must be in the Available state.

Disassociate an HAVIP from an ECS instance

You can disassociate an HAVIP from an ECS instance. After the HAVIP is disassociated from the ECS instance, the ECS instance cannot advertise the HAVIP by sending ARP messages.

  1. Log on to the VPC console.
  2. In the left-side navigation pane, click HaVip.
  3. In the top navigation bar, select the region where the HAVIP is deployed.
  4. On the HaVip page, find the HAVIP and click its ID.
  5. In the Resources section, find the ECS instance and click Delete Association.
  6. In the message that appears, click OK.

Disassociate an HAVIP from an ENI

You can disassociate an HAVIP from an ENI. After the HAVIP is disassociated from the ENI, the ECS instance associated with the ENI cannot advertise the HAVIP by sending ARP messages.

  1. Log on to the VPC console.
  2. In the left-side navigation pane, click HaVip.
  3. In the top navigation bar, select the region where the HAVIP is deployed.
  4. On the HaVip page, find the HAVIP and click its ID.
  5. In the Resources section, find the ENI and click Delete Association.
  6. In the dialog box that appears, click OK.

Disassociate an HAVIP from an EIP

If an HAVIP no longer needs to use an EIP to provide services over the Internet, you can disassociate the HAVIP from the EIP.

  1. Log on to the VPC console.
  2. In the left-side navigation pane, click HaVip.
  3. In the top navigation bar, select the region where the HAVIP is deployed.
  4. On the HaVip page, find the HAVIP and click Actions in the Unbind with EIP column.
  5. In the message that appears, click OK.

Delete an HAVIP

Before you delete an HAVIP, make sure that the following requirements are met:

  • The HAVIP is not associated with an ECS instance. If the HAVIP is associated with an ECS instance, disassociate the HAVIP from the ECS instance first. For more information, see Disassociate an HAVIP from an ECS instance.
  • The HAVIP is not associated with an EIP. If the HAVIP is associated with an EIP, disassociate the HAVIP from the EIP first. For more information, see Disassociate an HAVIP from an EIP.
  • The HAVIP is not associated with an ENI. If the HAVIP is associated with an ENI, disassociate the HAVIP from the ENI first. For more information, see Disassociate an HAVIP from an ENI.
  1. Log on to the VPC console.
  2. In the left-side navigation pane, click HaVip.
  3. In the top navigation bar, select the region where the HAVIP is deployed.
  4. On the HaVip page, find the HAVIP and click Actions in the Delete column.
  5. In the message that appears, click OK.