can't telnet to machines by name

(solaris2.7)
I try to telnet a computer somewhere in the world. when I use it's name it says unknown host but when I use it's IP it connect OK.
when I use nslookup it finds both name and IP.
What's missing.
sharone_Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kawinCommented:
Check file /etc/nsswitch.conf maybe you forgot to add "dns" at the end of line

hosts:      files

it should be

hosts:      files dns

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
samriCommented:
Sharone,
     I'm not sure about kawin answer above because I've never tried only the /etc/nsswitch.conf.  Maybe it might work.  If it does not, you can try my option.  Too bad, the question is locked, and I have to post it as a comment only.  Anyway, back to the main point.

    The file that you will be interested to look at will be:

        /etc/resolv.conf
 
    This file might not  be around when you first installed the Solaris 7.  You need to create it. Perhaps, do a vi /etc/resolv.conf will do.  The file should contains:

domain and-your-domain-name      
nameserver your-isp-dns-server
nameserver your-second-dns-server


/etc/nsswitch.conf

    Look for the line hosts: files

    Modify it to
   hosts: files dns

   The order, does matter, files followed by dns will cause namelookup to look for any matching entry in /etc/hosts and if it's not there, then query the first nameserver in the /etc/resolv.conf.  If the 1st nameserver fails, then query the 2nd.  On the other hand, putting dns followed by files will do the opposite.  remember though, some software, I believe sendmail, will only query the DNS for resolution of MX entries (oopps... that's another story :(

  REMEMBER, if you plan to use you Solaris as stand alone, or in private environment, you can either setup a DNS server (or use in available in your private network), or hardcoded each and every IP address -> hostname in your /etc/hosts file.  :(  It's kinda of tedious, but in some cases, does speed up things a lot.  The only drawback is that, everytime, new machine is installed, or modification to the IP->host mapping, you need to revisit this file to make changes.

I hope this should help (and clears you confusion).

Regards,

Samri
0
wallstreetxCommented:
I guess /etc/resolv.conf has been replaced by /etc/defaultrouter in 2.6 & higher.
If you try to add resolv.conf, it might not even allow you to ping by IP
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.