Solved

Trobule resolving domain names

Posted on 1997-06-22
12
607 Views
Last Modified: 2013-12-16
I have a machine running SunOS 4.1.4 that is having trouble resolving domain names for telnet and ping.

nslookup resolves the domain name correctly and e-mail works fine.

Names defined in the hosts file work fine.

Domain name service is handled through DNS (not NIS) using a remote named server.

What do I need to do to get ping and telnet to work?

0
Comment
Question by:lcoffin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1812442
sounds like an reverse DNS lookup failture, means that the
pinged hosts can't resolve your domain name.
0
 

Author Comment

by:lcoffin
ID: 1812443
When I try to ping a host by domain name, I get an "unknown host ..." error. If I try to ping the IP address, the ping goes through.

The host with the problem is listed in the named.reverse on the name server. I believe that the reverse lookup is working because lpd allows print jobs from the host where it did not before I added the named.reverse entry.

Is there anything I can do to make sure that the reverse lookup is working correctly? nslookup does not seem to work on reverse lookups (I tried hosts that can ping to a domain name and nslookup did not return their domain name doing a "nslookup IP").


0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1812444
Check if ypbind is running with the right resolv.conf,
check your resolv.conf if there is a entry "hostresorder" (or
resorder or order, see man 5 relover, or man resolf.conf)
nslookup should print the name server it is using, is this
correct? means the name server specified in resolv.conf?

Do you use NIS also? If so make shure that NIS dos not propagte
the hosts map (ypcat -k hosts). Using both, NIS and DNS, is
known to be difficult to setup, read corresponding manuals.

Of cause, you make al these checks on the source and destination
host (if possible).
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:jepolch
ID: 1812445
Make sure your /etc/resolv.conf contains the following info (use your actual domain name and name server IP numbers):

domain yourdomain.com    
nameserver 192.0.0.1
nameserver 192.0.0.2

Your /etc/defaultrouter should contain the correct gateway address (just the IP number), such as:

192.0.0.250

Your /etc/defaultdomain should contain the same domain name as in /etc/resolv.conf, like this:

yourdomain.com

Reboot the workstation.



0
 

Author Comment

by:lcoffin
ID: 1812446
Everything was already set that way except for defaultdomain. After changing defaultdomain and setting domainname to it's contents, the problem still exists.

Some more symptoms that may help:

host "sweet" is local on the pear.com network.
host "www.outside.com" is not local.

"ping sweet" fails with "ping: unknown host sweet"
"ping www.outside.com" fails with same message

"nslookup sweet" fails
"nslookup sweet.pear.com" succeeds!
"nslookup www.outside.com" succeeds


0
 

Author Comment

by:lcoffin
ID: 1812447
Adjusted points to 150
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1812448
I think 2 things go wrong:

1) the search order for domainnames is wrong or not setup,
   check your  /etc/resolv.conf, should contain:
      hostresorder    bind local
   (sorry, I don't remember the exact syntax for SunOS)
2) you have setup a domain with DNS (NIS-domains are different)
   and not written the full qualified domainname in your hosts
   file (must be sweet.pear.com  *not just* sweet)
0
 

Author Comment

by:lcoffin
ID: 1812449
hostresorder does not seem to work. The man page does not even mention it.

Neither "sweet" or "sweet.pear.com" are in the hosts file. If I put them there then no name lookup will occur. I want sweet (and other machines) to be resolved through the name server so I don't have to maintain the hosts files on every single machine.

0
 

Author Comment

by:lcoffin
ID: 1812450
It appears that I miss-stated some of the symptoms:

"nslookup sweet" does work as does nslookup on everything else.

"ping sweet" and "telnet sweet" do not

0
 
LVL 4

Accepted Solution

by:
jlms earned 250 total points
ID: 1812451
Just one very important comment:

Not all  SunOS commands support DNS, mail does it, telnet and ping don't; you should try to get versions of these commands that take advantage of DNS (maybe you have to compile them). Sorry, I don't know where to find them but I am sure is not difficult...

Your DNS is working properly (as you demonstrate with the "nslookup www.outside.com"), but your ping was not compiled to use this service (as demonstrated when you use "ping  www.outside.com").

Now about sweet (local machine) if you put it in the /etc/hosts file ping and telnet will work because they use NIS and /etc/hosts file in SunOS, if you rely on DNS ping and telnet (and I think ftp) will fail.

Another way is to make a script  that invokes nslookup, extracts the IP address from the query and runs the desired command using the obtained IP address.

Why don't you upgrade to Solairs? All this is solved.
Linux could be another option.


0
 

Author Comment

by:lcoffin
ID: 1812452
Adjusted points to 250
0
 

Author Comment

by:lcoffin
ID: 1812453
Thanks jlms! Seems like you are right. I found reference to a patch/fix for libc to include the resolver code needed for ping and telnet.


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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

710 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