Solved

Trobule resolving domain names

Posted on 1997-06-22
12
602 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
12 Comments
 
LVL 51

Expert Comment

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

Author Comment

by:lcoffin
Comment Utility
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
Comment Utility
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
 

Expert Comment

by:jepolch
Comment Utility
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
Comment Utility
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
Comment Utility
Adjusted points to 150
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Adjusted points to 250
0
 

Author Comment

by:lcoffin
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now