Resolve the "General fault" error when pinging a public IP address from a Windows ECS instance
This topic describes how to troubleshoot the "General failure" error that occurs when you ping a public IP address from a Windows ECS instance.
Symptoms
When you ping a public IP address from a Windows ECS instance, a "General failure" error is returned.
Causes
This issue can occur for the following reasons:
|
Possible cause |
Troubleshooting |
|
Third-party antivirus or security software is installed on the ECS instance. |
|
|
The instance has an incorrect default gateway or default route configuration. |
|
|
Other less common causes. |
Solutions
Check third-party antivirus or security software
Third-party antivirus or security software often includes network protection features that can control and restrict traffic.
If you have third-party antivirus or security software installed, try uninstalling or temporarily disabling it. Then, try to ping the public IP address again.
Check the instance gateway and route
An ECS instance needs a correctly configured default gateway and default route to communicate with external networks. If these settings are missing or incorrect, network connectivity will fail.
Step 1: Check the default gateway
Run the ipconfig command to view the default gateway configuration.
PS C:\Users\Administrator> ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::xxx::7e%3
IPv4 Address. . . . . . . . . . . : 172.16.0.72
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.0.253
Ethernet adapter Ethernet 2:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::xxx::d%25
IPv4 Address. . . . . . . . . . . : 172.16.0.74
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.0.253
Verify that the default gateway address is correct by checking the IPv4 CIDR block of the vSwitch to which the ECS instance belongs. For example, with a vSwitch CIDR block of 172.16.0.0/24, the correct gateway is 172.16.0.253, the third-to-last available address. The default gateway in the command output is therefore correct.
If no default gateway is displayed, or if the address is incorrect, follow these steps to reconfigure it:
Step 2: Check the default route
Run the route print command to check for a default route.
As shown in the following output, the route entry with a Network Destination and Netmask of 0.0.0.0 is the default route, which is used for communication with external networks.
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.253 192.168.1.14 271
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.1.0 255.255.255.0 On-link 192.168.1.14 271
If there is no default route, run the following command to add one. You need to replace the placeholder with the actual default gateway address.
route -p add 0.0.0.0 mask 0.0.0.0 <default gateway address>
Example:
route -p add 0.0.0.0 mask 0.0.0.0 172.16.0.253
Troubleshoot other possible causes
Other factors can also cause this issue, including problems with the network adapter, the TCP/IP stack, or misconfigured Windows security tools. Follow the steps below to investigate these possibilities.