[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

can't telnet to machines by name

Posted on 2000-01-19
3
Medium Priority
?
205 Views
Last Modified: 2013-12-23
(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.
0
Comment
Question by:sharone_
3 Comments
 
LVL 1

Accepted Solution

by:
kawin earned 100 total points
ID: 2369296
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
 
LVL 15

Expert Comment

by:samri
ID: 2396422
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
 

Expert Comment

by:wallstreetx
ID: 2484523
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question