A high-availability virtual IP address (HAVIP) is a private IP address that can be created and released as an independent resource. 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 or an ENI of 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 create and manage HAVIPs.

References

Create an HAVIP

Before you create an HAVIP, make sure that the following conditions 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 the regions that support HAVIPs, see Feature and supported regions.
  4. On the HaVip page, click Create HaVip.
  5. In the Create HaVip dialog box, 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.
    Whether to automatically assign private IP addresses Select whether to automatically allocate a private IP address. Valid values:
    • Yes: The system automatically allocates an idle private IP address from the vSwitch CIDR block.
    • No: You must manually enter an idle private IP address from the vSwitch CIDR block.

Associate an EIP 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 to which the HAVIP belongs.
  4. On the HaVip page, find the HAVIP and click its ID.
  5. In the Resources section, find ECS Instances(Standby) and click Bind.
    Associate an HAVIP with an ECS instance
  6. In the dialog box that appears, set the following parameters to associate the HAVIP with an ECS instance, and then click OK.
    Parameter Description
    Resource Type Select the type of resource with which you want to associate the HAVIP. Supported resource types are:
    • ECS Instance
    • 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 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. Before you associate an HAVIP with an ENI, take note of the following information:

  • An ECS instance is created. For more information, see Create an instance by using the provided wizard.
  • A secondary ENI is created and associated with an ECS instance. For more information, see Create an ENI and Bind 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 to which the HAVIP belongs.
  4. On the HaVip 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 resource types are:
    • ECS Instance
    • ENI

    In this example, ENI is selected.

    Bind Resource Select the ECS instance to which the ENI belongs, and then select the ENI.

    The ENI and HAVIP must belong to the same vSwitch.

    ENI

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. Before you get started, you must apply for an EIP. 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.
For more information, see Associate an EIP with an HAVIP.
  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 to which the HAVIP belongs.
  4. On the HaVip 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.

Disassociate an HAVIP from an ECS instance

You can disassociate an HAVIP from an ECS instance. Then, the ECS instance can no longer 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 to which the HAVIP belongs.
  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.
    Disassociate HAVIPs from ECS instances
  6. In the message that appears, click OK.

Disassociate an HAVIP from an ENI

You can disassociate an HAVIP from an ENI. Then, the ECS instance with which the ENI is associated can no longer 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 to which the HAVIP belongs.
  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 message that appears, click OK.

Disassociate an HAVIP from an EIP

If an HAVIP no longer needs to use an EIP to provide Internet-facing services, 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 to which the HAVIP belongs.
  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 ENI. If the HAVIP is associated with the ENI, you must disassociate the HAVIP from the ENI first. For more information, see Disassociate an HAVIP from an ENI.
  • The HAVIP is not associated with an EIP. If the HAVIP is associated with an EIP, you must disassociate the HAVIP from the EIP first. For more information, see Disassociate an HAVIP from an 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 that you want to delete, and click Delete in the Actions column.
  5. In the message that appears, click OK.

References