16

What would be the preliminary checks that should be carried out if a server cannot 'ping'?

1
  • 3
    You haven't specified much detail. Are you trying to ping FROM the server to another machine? Or are you trying to ping TO the server from another machine? Is it across the LAN or WAN? Are you using IP addresses or hostnames?
    – Dan Carley
    Jun 3, 2009 at 8:44

8 Answers 8

14

Tracert (or traceroute) would seem to be the next reasonable step; find out where the traffic is being stopped. You could spend an awful lot of time troubleshooting something that isn't even part of the problem if you don't know that.

1
6

There's quite a few things that can cause the system not to ping. I assume you mean that the server is not RESPONDING to ping?

In which case, where are you pinging it from? A local network (LAN), or from the internet?

If it won't respond to PING on a local network (ethernet, usually), then it could be a Firewall setting. I assume you are running Windows?

In Windows XP, you can disable/enable ICMP packets. When you PING it sends an ICMP packet, which some some firewalls will filter. If you are using the Windows firewall, it depends on the version of Windows you are running. If you are running a 3rd party firewall, you will need to check its settings.

The other obvious thing is to check to see if the server is plugged in, and that it has an IP address, you are pinging the correct IP address and that there are no communication breakdowns between the server you are pinging, and yourself.

To check the IP address of the server, go to Start > Run > CMD > ipconfig, and scroll through the IP addresses presented there and try each one, one by one.

If you are trying to ping it over the internet, then that's a much more complicated issue. It could be a firewall at the edge of your network (a consumer grade router maybe?), it could be the firewall again, or it could be a hundred other things.

4

If it's a local ping (you can't ping your GW), take a look at the arp tables. After trying to ping, run "arp -na" to see if you got a MAC address for the IP you tried to ping.

You can also try arping to to see if that works. But you'll get the same information by pinging your gateway and then checking the arp tables.

Sometimes ping (ICMP) is blocked (by incompetent network admins), try surfing or using hping2 to gateway and beyond.

4

nmap with the no ping option?

nmap -p0 <target> # or was it -P0
3

Try to use hping tool. You can ping any port using UDP or TCP. For example:

0:~ # hping -n -S -p 22 -c 1 rootnode.net 
HPING rootnode.net (wlan0 89.248.166.201): S set, 40 headers + 0 data bytes
len=44 ip=89.248.166.201 ttl=53 DF id=0 sport=22 flags=SA seq=0 win=5840 rtt=46.0 ms

--- rootnode.net hping statistic ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 46.0/46.0/46.0 ms

-n option to not resolve hosts.
-S to ping with SYN flag.
-p port we want to ping.
-c packet count.

You can even use --traceroute option to see how and where firewall works.

1

When diagnosing network connectivity issues, I start local and then move global.

First, I try to ping the local ip address on the interface of the host I am using. This almost always works.

Then I ping the default gateway. Then I ping the DNS server.

"Pings" are not limited to ICMP Echo/Request traffic. I will try to establish a TCP connection to ports I expect to be able to access. Telnet clients are good for this.

At some point, I examine the network traffic with wireshark or tcpdump. Also, if I can, I will try to use an alternate host to see if it works.

0

if all the normal steps like checking the icmp ports on source and destination,checking the firewall and checking the iptables etc is Done then next is checking the icmp_echo_ignore_all file.if it is 1 ping won't work.so make it to 0 by either going to the file directly (/proc/sys/net/ipv4/icmp_echo_ignore_all) or by the command sysctl -w net.ipv4.icmp_echo_ignore_all=0

1
  • 1
    There are no ICMP ports.
    – RalfFriedl
    May 31, 2019 at 11:20
0

you can try these. I was also facing the same issue where ping command was disabled by the org. these were helpful for me.

host <endpoint>
dig  <endpoint>

You must log in to answer this question.