Why Can't the Virtual IP Address Be Pinged After It Is Bound to an ECS NIC?
Symptom
After you bind a virtual IP address to an ECS NIC, you cannot ping the virtual IP address.
Troubleshooting
The issues here are described in order of how likely they are to occur.
Troubleshoot the issue by ruling out the causes described here, one by one.
Possible Cause |
Solution |
---|---|
Virtual IP address of the ECS NIC |
|
Virtual IP address of the internal NIC of the ECS |
|
Security group or network ACL configuration |
Virtual IP Address of the ECS NIC
- Log in to the management console.
- Click Service List and click Elastic Cloud Server under Computing.
- In the ECS list, click the name of the ECS.
- On the displayed ECS details page, click the Network Interfaces tab.
- Ensure that Source/Destination Check is disabled.
- Ensure that an IP address is displayed for Virtual IP Address on the NIC details page.
If there is no virtual IP address, click Manage Virtual IP Address. On the displayed IP Addresses tab, click Assign Virtual IP Address.
To check whether a virtual IP address has been configured, ifconfig will not work. Use ip address instead. For more information, see Binding a Virtual IP Address to an EIP or ECS.
Virtual IP Address of the Internal NIC of the ECS
The following uses Linux and Windows ECSs as examples to describe how to check whether an ECS NIC has a virtual IP address.
- Check if there is a NIC ethX:X:
ifconfig
Figure 2 Checking for NIC ethX:X
The command output in the preceding figure contains a NIC ethX:X. 192.168.1.137 is its virtual IP address.
- If the NIC ethX:X is there, the ECS NIC is correctly configured.
- If the NIC ethX:X cannot be found, perform the following operations:
- If the command output does not contain a NIC ethX:X, switch to the /etc/sysconfig/network-scripts directory:
cd /etc/sysconfig/network-scripts
- Run the following command to create and then modify the ifcfg-eth0:1 file:
vi ifcfg-eth0:1
Add the following NIC information to the file:
BOOTPROTO=static DEVICE=eth0:1 HWADDR=fa:16:3e:4d:5b:98 IPADDR=192.168.1.137 GATEWAY=192.168.1.1 NETMASK=255.255.255.0 ONBOOT=yes ONPARENT=yes
- Press Esc, enter :wq!, and save the file and exit.
- Restart the ECS and run the ifconfig command to check whether the virtual IP address has been configured for the ECS.
For a Windows ECS:
- 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
In the preceding command output, check whether the value of IPv4 Address (192.168.10.137) is the IP address of the ECS NIC.
- If yes, the virtual IP address has been configured for the ECS NIC.
- If no, perform the following operations:
- 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 displayed in Figure 3. For example, 192.168.10.41.
Figure 4 Configuring a private IP address
- Click Advanced.
- On the IP Settings tab, click Add in the IP addresses area.
Add the virtual IP address configured in Figure 3. For example, 192.168.10.137.
Figure 5 Configuring virtual IP address
Security Group or Network ACL Configuration
- On the ECS details page, click the Security Groups tab and confirm that required security group rules have been configured for the virtual IP address. If the required security group rules have not been configured, click Change Security Group or Modify Security Group Rule to change the security group or modify the security group rules.
- Click Service List. Under Networking, click Virtual Private Cloud. In the navigation pane on the left of the network console, click Network ACLs and check whether the network ACL rules associated with the subnet used by the ECS NIC are blocking access to the virtual IP address.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.