Why Cannot an EIP Be Pinged?
Symptom
After I purchased an EIP and bound it to an ECS, pinging the EIP failed, or the ECS failed to access the Internet.
Fault Locating
The following fault causes are sequenced based on their occurrence probability.
If the fault persists after you have ruled out a cause, check other causes.
|
Possible Cause |
Solution |
|---|---|
|
ICMP access rules are not added to the security group. |
Add ICMP access rules to the security group. For details, see Checking Security Group Rules. |
|
Ping operations are prohibited on the firewall. |
Allow ping operations on the firewall. For details, see Checking Firewall Settings. |
|
Ping operations are prohibited on the ECS. |
Allow ping operations on the ECS. For details, see Checking Whether Ping Operations Have Been Disabled on the ECS. |
|
Network ACL is associated. |
If the VPC is associated with a network ACL, check the network ACL rules. For details, see Checking ACL Rules. |
|
A network exception occurred. |
Use another ECS in the same region to check whether the local network is functional. For details, see Checking Whether the Network Is Functional. |
|
Routes are incorrectly configured if multiple NICs are used. |
If the network is inaccessible due to an extension NIC, the fault is generally caused by incorrect route configurations. To resolve this issue, see Checking the ECS Route Configuration If Multiple NICs Are Used. |
|
The domain name is not ICP licensed or cannot be resolved. |
If the domain name cannot be pinged, the domain name is not ICP licensed or cannot be resolved. To resolve this issue, see Checking Domain Name Resolution If the Domain Name Cannot Be Pinged. |
Checking Security Group Rules
The ping operations use the ICMP protocol. Check whether the security group accommodating the ECS allows ICMP traffic in the inbound direction.
- Log in to the management console.
- Click
in the upper left corner and select the desired region and project. - 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 Security Groups tab, expand the information of the security group, and view security group rules.
- Click the security group ID.
The system automatically switches to the Security Group page.
- On the Inbound Rules tab, click Add Rule. In the displayed dialog box, set required parameters to add an inbound rule.
Figure 2 Setting an inbound rule
Table 2 Security group rules Transfer Direction
Type
Protocol/Port Range
Source End
Inbound
IPv4
ICMP/Any
0.0.0.0/0
0.0.0.0/0 indicates all IP addresses.
- Click OK to complete the security rule configuration.
Checking Firewall Settings
If a firewall is enabled on the ECS, check whether the firewall blocks the ping operations.
- Run the following command to check the firewall status, taking CentOS 7 as an example:
If running is displayed in the command output, the firewall has been enabled.
- Check whether there is any ICMP rule blocking the ping operations.
If the command output shown in Figure 3 is displayed, there is no ICMP rule blocking the ping operations.
If the ping operations are blocked by an ICMP rule, run the following commands to modify the rule for unblocking:
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT
- Log in to the Windows ECS, click the Windows icon in the lower left corner of the desktop, and choose Control Panel > Windows Firewall.
- Click Turn Windows Firewall on or off.
View and set the firewall status.
- If the firewall is On, go to 4.
- Check the ICMP rule statuses in the firewall.
- In the navigation pane on the Windows Firewall page, click Advanced settings.
- Enable the following rules:
Inbound Rules: File and Printer Sharing (Echo Request - ICMPv4-In)
Outbound Rules: File and Printer Sharing (Echo Request - ICMPv4-Out)
If IPv6 is enabled, enable the following rules:
Inbound Rules: File and Printer Sharing (Echo Request - ICMPv6-In)
Outbound Rules: File and Printer Sharing (Echo Request - ICMPv6-Out)
Figure 4 Inbound Rules
Figure 5 Outbound Rules
Checking Whether Ping Operations Have Been Disabled on the ECS
Windows
Enable ping operations using the CLI.
- Start the Run dialog box. Enter cmd and press Enter.
- Run the following command to enable ping operations:
Linux
- Check the net.ipv4.icmp_echo_ignore_all value in the /etc/sysctl.conf file. Value 0 indicates that ping operations are allowed, and value 1 indicates that ping operations are prohibited.
- Allow ping operations.
Checking ACL Rules
By default, no ACL is configured for a VPC. If a network ACL is associated with a VPC, check the ACL rules.
- Check whether the subnet of the ECS has been associated with a network ACL.
If an ACL name is displayed, the network ACL has been associated with the ECS.
Figure 6 Network ACL
- Click the ACL name to view its status.
Figure 7 Enabled network ACL
- If the network ACL is enabled, add an ICMP rule to allow traffic.
Figure 8 Adding an ICMP rule
The default network ACL rule denies all incoming and outgoing packets. After the network ACL is disabled, the default rule still takes effect.
Checking Whether the Network Is Functional
- Use another ECS in the same region to check whether the local network is functional.
Use another ECS in the same region to ping the affected EIP. If the EIP can be pinged, the VPC is functional. In such a case, rectify the local network fault and ping the affected EIP again.
- Check whether the link is accessible.
A ping failure is caused by packet loss or long delay, which may be caused by link congestion, link node faults, or heavy load on the ECS.
For details, see Troubleshooting a Ping Failure or Packet Loss Using a Link Test.
Checking the ECS Route Configuration If Multiple NICs Are Used
The default route of an OS preferentially selects the primary NIC generally. If an extension NIC is selected in a route and the network malfunctions, this issue is generally caused by the incorrect route configuration.
- If the ECS has multiple NICs, check whether the default route is available.
- If the ECS has multiple NICs and the EIP is bound to an extension NIC, configure policy routing on the ECS for network communication with the extension NIC.
For details, see How Do I Configure Policy-Based Routing for ECSs with Multiple NICs?
Checking Domain Name Resolution If the Domain Name Cannot Be Pinged
If the EIP can be pinged but the domain name cannot be pinged, the possible cause is that the domain name has not obtained an ICP filing number or an error occurred in domain name.
- Check the ICP filing of the domain name.
According to the Regulation on Internet Information Service of the People's Republic of China released by the Ministry of Industry and Information Technology (MIIT), publicly accessed websites cannot be hosted on servers in the Chinese Mainland until an ICP filing number from the MIIT is obtained.
- If you want to use a server in the Chinese mainland to provide Internet services, you need to submit an ICP filing request to the server provider to obtain an ICP filing number for the domain name.
- If you use a server outside the Chinese mainland to provide Internet services, no ICP filing is required.
- Check the domain name resolution.
If your domain name has obtained an ICP filing number but the domain name resolution is not correctly configured, the domain name may fail to be pinged.
Switch to the DNS management console to view details about the domain name resolution.
- Check the DNS server configuration.
If the system shows no server found after you ping a domain name, this issue may be caused by slow response from the DNS server. In such a case, see Troubleshooting Slow Access of a Website Outside the Chinese Mainland over an ECS.


Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.