What would be the preliminary checks that should be carried out if a server cannot 'ping'?
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.
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 18.104.22.168): S set, 40 headers + 0 data bytes len=44 ip=22.214.171.124 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.
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.
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.
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