/etc/resolv.conf
contains a nameserver that is alive (as reported by theping
command)host
ornslookup
is able to resolvegoogle.com
$ host google.com google.com has address 74.125.228.3 google.com has address 74.125.228.4 ... $ nslookup google.com ... Non-authorative answer: Name: google.com Address: 74.125.228.0 Name: google.com Address: 74.125.228.1 ..
ping
ortelnet
is not able to resolvegoogle.com
$ ping google.com ping: unknown host google.com $ telnet google.com google.com: node name or service name not known
Fix Solution:
This tells the Solaris Naming Service that hosts should be looked up first in the local file (i.e.Your
/etc/nsswitch.conf
should have an entry like this:hosts: files dns
/etc/hosts
) and then in DNS. You can of course also only have "dns" here but people will normally want it so that/etc/hosts
can override what is in DNS.
You may now have to restart the naming service daemon:
$svcadm restart /system/name-service-cache
Thursday, August 13, 2015
Solaris 10 - `host` and `nslookup` resolves hostnames while `ping` and `telnet` does not?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment