Managing Virtual IP Addresses
Scenarios
A virtual IP address provides the second IP address for one or more ECS NICs, improving high availability between the ECSs.
Procedure
- Log in to the management console.
- Under Computing, click Elastic Cloud Server.
- On the Elastic Cloud Server page, click the name of the target ECS.
The page providing details about the ECS is displayed.
- Click the Network Interfaces tab. Then, click Manage Virtual IP Address.
- On the IP Addresses tab of the page that is displayed, locate the row containing the target virtual IP address and select Bind to EIP or Bind to Instance in the Operation column.
Multiple ECSs deployed to work in active/standby mode can be bound with a virtual IP address to improve DR performance.
- Click OK.
- Manually configure a virtual IP address for an ECS that has been bound with the virtual IP address.
After a virtual IP address is bound to an ECS NIC, you need to manually configure the virtual IP address on the ECS.
Linux ECS (CentOS 7.2 64-bit is used as an example here.)- Run the following command to check the NIC to which the virtual IP address is to be bound and the NIC connection: Figure 1 Checking the NIC and its connection
In the preceding command output, eth0 in the DEVICE column indicates the NIC to which the virtual IP address is bound, and System eth0 in the NAME column indicates the corresponding connection.
- Run the following command to modify the corresponding connection and add the virtual IP address:
nmcli connection modify "CONNECTION" ipv4.addresses VIP
Figure 2 Configuring virtual IP address
- Restart the ECS and run the ip address command to check whether the virtual IP address has been configured. Figure 3 Checking whether the virtual IP address has been configured
In the preceding command output, 192.168.1.137 is the virtual IP address.
Windows ECS (Windows 7 is used as an example here.)
- Choose Control Panel > Network and Internet > Network Connections. Right-click the corresponding local connection and then click Properties.
- On the Network tab page, select Internet Protocol Version 4 (TCP/IPv4).
- Click Properties.
- Select Use the following IP address and set IP address to the private IP address of the ECS, for example, 192.168.10.41. Figure 4 Configuring private IP address
- Click Advanced.
- On the IP Settings tab, click Add in the IP addresses area.
Add the virtual IP address. For example, 192.168.10.137.
Figure 5 Configuring virtual IP address
- Click OK.
- In the Start menu, open the Windows command line window and run the following command to check whether the virtual IP address has been configured:
ipconfig /all
Figure 6 Checking whether the virtual IP address has been configured
In the preceding command output, IPv4 Address is the virtual IP address 192.168.10.137, indicating that the virtual IP address of the ECS NIC has been correctly configured.
- Run the following command to check the NIC to which the virtual IP address is to be bound and the NIC connection:
Last Article: Modifying a Private IP Address
Next Article: Enabling NIC Multi-Queue
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.