Help Center/ Virtual Private Cloud/ User Guide (Paris Regions) / FAQ/ EIPs/ What Are the Differences Between EIP, Private IP Address, and Virtual IP Address?
Updated on 2024-03-05 GMT+08:00

What Are the Differences Between EIP, Private IP Address, and Virtual IP Address?

Different types of IP addresses have different functions.

Figure 1 IP address architecture
Table 1 Functions of different IP address types

IP Address Type

Description

Example Value

Private IP address

Private IP addresses come with your ECSs and belong to the VPC subnets of the ECSs. They are used for private communication on the cloud.

  • Private IP address of ECS-A-01: 172.16.0.84
  • Private IP address of ECS-B-01: 172.16.1.12

Virtual IP address

A virtual IP address can be shared among multiple ECSs. Two ECSs can work as an active and standby pair to achieve high availability by using a virtual IP address and Keepalived. If the active ECS is faulty, the virtual IP address can be dynamically switched to the standby ECS to continue providing services.

Bind virtual IP address (172.16.0.2) both ECS-A-01 and ECS-A-02. The active/standby switchover of ECS-A-01 and ECS-A-02 can be implemented by using Keepalived.

EIP

EIPs can be used by cloud resources for Internet access.

  • You can bind an EIP to a virtual IP address to enable the ECSs with the virtual IP address bound to access the Internet.
  • You can bind an EIP to an ECS to enable the ECS to access the Internet. Each EIP can be bound to only one ECS at a time.
  • Bind EIP (122.9.9.85) to virtual IP address (172.16.0.2) to enable ECS-A-01 and ECS-A-02 to access the Internet.
  • Bind EIP (122.9.9.87) to ECS-B-01 to enable ECS-B-01 to access the Internet.