ping IP vs ping host

1

Everytime I get connection issues to a server (git server, etc.) our sys admin tells me to ping the host. If that doesn't work he will ask me to ping the IP address of the host. I don't remember that working either. Is there a difference between the two? What does it mean if you can ping the IP but not the host?

erickb

Posted 2014-02-07T03:26:18.320

Reputation: 113

Answers

2

Pinging the host name successfully would require a functioning name resolution mechanism (presumably DNS), so pinging the host name and getting a failure to resolve the host name to it's ip address allows the tech to focus his efforts on name resolution (DNS). It's his way of narrowing down the root problem. If you can't resolve the host name then he can troubleshoot name resolution rather than troubleshooting basic connectivity issues.

joeqwerty

Posted 2014-02-07T03:26:18.320

Reputation: 5 259

So if I can ping the IP and not the host, its a DNS issue? If I can't ping both, then its a connectivity issue? – erickb – 2014-02-07T03:47:51.723

1Either it's a connectivity issue or the host just doesn't respond to pings. – David Schwartz – 2014-02-07T03:55:00.527

1@erickb - Generally speaking, yes. There could be other reasons that a host doesn't respond to pings but one of the first steps in troubleshooting is identifying the type of issue at hand. The tech is using this method to determine whether it's a name resolution issue or some other connectivity issue. – joeqwerty – 2014-02-07T04:00:52.540

1To add a non-technical explanation to Joeqwerty's good answer:

Pinging a hostname is like asking you to phone a person.
You will fist need to get your old paper address book, look up the number for and then you can call it.

Pinging an IP is akin to directly calling the phone number. It will work regardless of the presence of a readable address book. – Hennes – 2014-02-07T06:16:23.720

0

Pinging to host checks the Internet connectivity in the network.

If that doesnt work, the next thing to check is the DNS.

Pinging hosts will fail even if internet connectivity is there when no DNS is specified.

Duty of the DNS is to translate the hostaddress to ip address. For Eg: when you enter ping google.com , the dns will convert the google.com to corresponding IP Address.

If DNS is not configured or down, this translation wont occur and ping will fail.

Unnikrishnan

Posted 2014-02-07T03:26:18.320

Reputation: 1 193