Question : can ping ONLY by HOSTNAME but not ip address

Actually, I'm not actually even having this problem, but I just wanted to know how would it be possible for a computer to ping websites by hostname, but times out for its corresponding ip address.

Usually it's the other way around where you can ping by ip but not hostname, which would indicate a dns error that can sometimes be resolved by flushing the dns. Just curious to know what the technical explanation is if someone was only able to ping by hostname and not ip.

Answer : can ping ONLY by HOSTNAME but not ip address

hostnames can sometimes resolve to multiple IP's and where dns will round-robin a request, one or more servers can be down and not answer an icmp ping so they can't be reached by IP address, but can by dns name.
It would be rare, but it is possible.
It could also be that there is a local hosts file entry for the host name where the system will resolve a hostname to IP address 1.2.3.4 which answers only if addressed by hostname, whereas an nslookup may resolve it to a different IP address that will not respond if you try to ping the IP address.

Random Solutions  
 
programming4us programming4us