Ping displays unknown host for any domain name.
It worked before this time true!!
Ping works for ip address but fails for domain names.
Can any one help me?
An unknown host message is generated when a user attempts to ping a host name without a configured DNS resolution. If the ping is unsuccessful, the user should verify that the ping was sent to the correct remote host address.
To test your setup, use the hostname command: Use hostname -s to get the short name (should reflect what you have in /etc/sysconfig/network. Use the hostname -d command to test your domain (should reflect what you have in /etc/resolv. conf )
This is not a CentOS issue. It is a DNS issue. You need to configure your DNS server to provide the proper IP address. Re: Ping by IP works but not via hostname! I don't have a specific DNS server. I am running this CentOS as a virtual machine within my Mac OS. Re: Ping by IP works but not via hostname! Then add the machine to the Mac's host file.
It is a DNS issue. You need to configure your DNS server to provide the proper IP address. Re: Ping by IP works but not via hostname! I don't have a specific DNS server. I am running this CentOS as a virtual machine within my Mac OS.
You need to configure your DNS server to provide the proper IP address. Re: Ping by IP works but not via hostname! I don't have a specific DNS server. I am running this CentOS as a virtual machine within my Mac OS. Re: Ping by IP works but not via hostname! Then add the machine to the Mac's host file. It is still a DNS issue.
Please don't try to ping any external domain like google.com. As far as I know it's illegel & not allowed and it's against IT ethics. For illustration purpose you could have changed original names with some dummy ones.
Check what's in /etc/resolv.conf
.
If there is no "nameserver" specified, you have to do that in order to resolve domains.
Example:
nameserver dns1.domainname.com
nameserver dns2.domainname.com
or you can use Google's public DNS servers:
nameserver 8.8.8.8
nameserver 8.8.4.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With