Question

I can nslookup but not ping...

Asked by: jbrahy

I have an IRIX 6.5 O2 and i'm having problems with dns resolution. I am able to use nslookup from the commandline and it works fine, but when I try to ping the same host that I just did a lookup on it says that it can't resolve that host.

I have two dns servers in /etc/resolve.conf and he's my nsswitch.conf file.

bash# cat /etc/nsswitch.conf
#
# This is the SGI default nsswitch.conf file.  This file determines
# the maps that will be maintained by nsd, which methods will be
# used to lookup information for a map, and what order the methods
# are called in.
#
# For details on this file see the nsswitch.conf(4) manual page.
#
# After editing this file the nsd daemon must be sent a SIGHUP signal for
# it to notice.  Do a "killall -HUP nsd".
#
automount(dynamic):     files nis(nis_enumerate_key)
#bootparams:            files nis
capability:             files dns
clearance:              files dns
ethers:                 files dns
group:                  files dns
hosts:                  dns
mac:                    files dns
mail(null_extend_key): ndbm(file=/etc/aliases) nis
netgroup:               dns
#netid.byname:          nis
networks:               files dns
passwd:                 files(compat) [notfound=return] nis
protocols:              nis [success=return] files
rpc:                    files dns
services:               files dns
shadow(mode=0700):      files
#ypservers:             nis
bash#

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-02-14 at 16:27:06ID23164840
Tags

networking, host resolution

Topics

SGI / Irix

,

Sun Solaris

,

Unix Operating Systems

Participating Experts
6
Points
500
Comments
19

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. nslookup problem
    when I run command "nslookup" ,the following errors display: *** Can't find server name for address 133.5.0.33: No response from server *** Can't find server name for address 133.6.0.33: No response from server *** Default servers are not available But I can resolve...
  2. nslookup
    When I use nslookup I get DNS timed out messages before it displays the following information: Can't find server name for 192.168.1.2 : Timed out Default Serve unknown Address: 192.168.1.2 However when I type in my computer name I get Server: unknown Address: 192.168.1.2...
  3. NSLOOKUP
    when I nslookup anything out on the internet my computer dosent kick back anything...it says the following: *** Can't find server name for address 192.168.1.2: Non-existent domain DNS request timed out. timeout was 2 seconds. *** Can't find server name for address 192.16...
  4. No Nslookup
    Ok I think this is an easy fix. If I want to do an nslookup on an IP address in my domain I get a Non-existent domain. >nslookup 10.1.10.3 Server: domain.DNS.com Address: 10.1.10.98 *** domain.dns.com can't find 10.1.10.3: Non-existent domain however if i ping 10.1.10....

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: sjm_eePosted on 2008-02-14 at 16:50:35ID: 20898578

Please post a transcript of the session.

 

by: yuzhPosted on 2008-02-14 at 21:12:35ID: 20899542

in nsswitch.conf , normally use:
hosts:             files     dns

can you ping to a machine inside your network?

It could be firewall blocking ping or remote machine "disable" reponse to ping.

 

by: omarfaridPosted on 2008-02-15 at 05:29:15ID: 20901410

Hi,

"I have two dns servers in /etc/resolve.conf"

The name of the file should be /etc/resolv.conf

Is it a typo?

can you show its contents?

 

by: bluPosted on 2008-02-15 at 05:45:07ID: 20901511

You have dns as a name service on an awful lot of maps in your nsswitch.conf file, most of them are not
appropriate.  The dns entry should probably only be on the hosts entry.

Also, since you appear to be using NIS, you should try just setting the hosts line to "files nis". Most NIS
servers will automatically do a DNS query for the hosts naming service, serving as a proxy.

 

by: jbrahyPosted on 2008-02-15 at 08:57:23ID: 20903569

Here is an example session.


IRIX (marduk)
 
login: root
Password:
IRIX Release 6.5 IP32 marduk
Copyright 1987-1998 Silicon Graphics, Inc. All Rights Reserved.
Last login: Thu Feb 14 16:13:18 PST 2008 by UNKNOWN@10.1.3.241
bash#
bash#
bash# nslookup ad2.com
Server:  resolv-va1.ns.eni.net
Address:  205.214.45.10
 
Non-authoritative answer:
Name:    ad2.com
Address:  64.93.69.43
 
bash# ping ad2.com
ping: Cannot resolve "ad2.com" (Unknown host)
bash#
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:

Select allOpen in new window

 

by: jbrahyPosted on 2008-02-15 at 08:58:37ID: 20903578

here is my resolv.conf

bash# cat /etc/resolv.conf
nameserver 205.214.45.10
nameserver 205.214.51.16
#nameserver 10.1.3.112
#nameserver 65.113.20.253
#nameserver 65.113.20.254
bash#
                                              
1:
2:
3:
4:
5:
6:
7:

Select allOpen in new window

 

by: jbrahyPosted on 2008-02-15 at 09:00:37ID: 20903605

I enabled NIS because I couldn't figure anything else out. I only want to use normal dns but I can't get it to work. I know the machine I am pinging is able to return pings because I can ping it from another computer on the same network as my IRIX box.

 

by: bluPosted on 2008-02-15 at 09:05:21ID: 20903646

I don't think there is a problem with your resolv.conf file, otherwise nslookup would not work. Does your system
have the getent command? If so, try "getent hosts ad2.com"

 

by: jbrahyPosted on 2008-02-15 at 09:31:27ID: 20903934

bash# find / -name getent
bash#


doesn't look like I have that utility.

 

by: bluPosted on 2008-02-16 at 04:49:47ID: 20909398

Sorry, my specialty is Solaris, not Irix. Okay, if I understand you, then you do not have any NIS servers, right?
Then you should put the nsswitch.conf file back to its original form, with all of the entries saying files,
except the hosts entry which you should make "file dns". Then do the killall as it says in the file.

Once you do that, give it a try. IF it still doesn't work, try putting the host and ip in the hosts file, do the killall
and try again. If it works that time, then the name service is working, but the DNS part is not. If it still
soesn't work, there is a bigger problem.

 

by: dfkePosted on 2008-02-18 at 01:42:55ID: 20918687

Check forward and reverse DNS on 205.214.45.10

 

by: pj99Posted on 2008-02-18 at 22:20:18ID: 20926153

1) Do you have a file $HOME/.nslookuprc ?  If so, what's in it?  Perhaps that file is configured
    so as to get nslookup to work in ways that ping isn't working.
2) Try doing the attached code snippet and reporting the results.  The  grep for double
     quote just picks off those par lines that happen to have quoted strings, which is probably
     all we need here.
3) On IRIX, ping, but not nslookup, uses the ns cache.  I'll wager that cache is missing ad2.com.
    Are the *.mdbm files beneath /var/ns/cache current?  See the file /var/ns/cache/README
    for some hints on how to get force a rebuild of these files.

par -sSS nslookup ad2.com
                                              
1:

Select allOpen in new window

 

by: pj99Posted on 2008-02-19 at 03:33:56ID: 20927300

4) One more thing -- the 'hosts' entry in the /etc/nsswitch.conf file on my IRIX box is:
        hosts   dns nis files

    I don't know, but perhaps adding the 'nis files' values (and sending the HUP
    signal to nsd) would help.

And correction to the code snippet for (2) in my previous reply ... I left off the grep;
here it is corrected (that grep is looking for a double quote, entered as three chars,
single-quote, double-quote, single-quote.)

par -sSS nslookup ad2.com | grep '"'

                                              
1:

Select allOpen in new window

 

by: jbrahyPosted on 2008-02-19 at 09:24:53ID: 20930461

thank you very much for you assistance. Here's the output of the commands. Does this giveyou any hints?

bash# ls -l $HOME/.nslookup
Cannot access //.nslookup: No such file or directory
bash# par -sSS nslookup ad2.com | grep '"'
    0mS                 : execve("/usr/sbin/nslookup", 0x7fff2f5c, 0x7fff2f68)
    3mS                 : open("/lib32/rld", O_RDONLY, 04) = 3
    4mS                 : open("/dev/zero", O_RDONLY, 0) = 3
    9mS                 : open("/etc/resolv.conf", O_RDONLY, 0666) = 3
    9mS                 : read(3, "nameserver 205.214.45.10\nnames", 4096) = 125
   10mS                 : gethostname("marduk", 255) OK
   11mS                 : open("//.nslookuprc", O_RDONLY, 0666) errno = 2 (No such file or directory)
  136mS                 : write(1, "Server:  resolv-va1.ns.eni.net", 122) = 122
bash# par -sSS ping ad2.com | grep '"'
ping: Cannot resolve "ad2.com" (Unknown host)
    0mS                 : execve("/usr/sbin/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    0mS                 : execve("/usr/bsd/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    0mS                 : execve("/sbin/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    0mS                 : execve("/usr/bin/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    1mS                 : execve("/etc/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    1mS                 : execve("/usr/etc/ping", 0x7fff2f5c, 0x7fff2f68)
    4mS                 : open("/lib32/rld", O_RDONLY, 04) = 3
    5mS                 : open("/dev/zero", O_RDONLY, 0) = 3
    8mS                 : stat("/etc/hosts", 0x7fff2d40) OK
    9mS                 : open("/var/ns/cache/hosts.byname", O_RDONLY, 0400) = 3
   10mS                 : write(2, "ping: ", 6) = 6
   10mS                 : write(2, "Cannot resolve "", 16) = 16
   10mS                 : write(2, "ad2.com"", 8) = 8
   10mS                 : write(2, " (", 2) = 2
   10mS                 : write(2, "Unknown host", 12) = 12
   10mS                 : write(2, ")", 1) = 1
   10mS                 : write(2, "\n", 1) = 1
bash# more /var/ns/cache/README
                DO NOT DELETE FILES IN THIS DIRECTORY
 
The files in this directory are mdbm files which holds a systemwide cache
of name-service results, and may be held open by long running processes.
Deleting these files will NOT free the disk space that is used, and will
NOT cause nsd or any other application that is running to flush their name
service cache that is contained in the file.
 
The command /sbin/mdbm_remove will safely and correctly mark the mdbm file
as invalid and unlink the file.   All running applications will notice this
on their next access of these caches, and do the right thing.   mdbm_remove
will only delete mdbm_files.
 
bash# /sbin/mdbm_remove /var/ns/cache/hosts.byname
bash# par -sSS ping ad2.com | grep '"'
ping: Cannot resolve "ad2.com" (Unknown host)
    0mS                 : execve("/usr/sbin/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    0mS                 : execve("/usr/bsd/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    0mS                 : execve("/sbin/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    0mS                 : execve("/usr/bin/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    1mS                 : execve("/etc/ping", 0x7fff2f5c, 0x7fff2f68) errno = 2 (No such file or directory)
    1mS                 : execve("/usr/etc/ping", 0x7fff2f5c, 0x7fff2f68)
    4mS                 : open("/lib32/rld", O_RDONLY, 04) = 3
    5mS                 : open("/dev/zero", O_RDONLY, 0) = 3
    9mS                 : stat("/etc/hosts", 0x7fff2d40) OK
    9mS                 : open("/var/ns/cache/hosts.byname", O_RDONLY, 0400) errno = 2 (No such file or directory)
    9mS                 : access("/ns/.local/hosts.byname", X_OK|EFF_ONLY_OK) OK
   11mS                 : open("/ns/.local/hosts.byname/ad2.com", O_RDONLY, 02001336400) errno = 2 (No such file or directory)
   12mS                 : write(2, "ping: ", 6) = 6
   12mS                 : write(2, "Cannot resolve "", 16) = 16
   12mS                 : write(2, "ad2.com"", 8) = 8
   12mS                 : write(2, " (", 2) = 2
   13mS                 : write(2, "Unknown host", 12) = 12
   13mS                 : write(2, ")", 1) = 1
   13mS                 : write(2, "\n", 1) = 1
bash#
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:

Select allOpen in new window

 

by: pj99Posted on 2008-02-19 at 10:16:02ID: 20930959

Did your /var/ns/cache/hosts.byname file regenerate after you did that "/sbin/mdbm_remove" ?

Is your nsd daemon running?

Do you have reasonable stuff below /ns:

  find /ns -type d | grep host

On my Irix box (edited to pretend I'm in the example.com domain), this find
command produces the output:

    /ns/.local/hosts
    /ns/.local/hosts/.dns
    /ns/.local/hosts/.nis
    /ns/.local/hosts/.files
    /ns/.local/hosts.byaddr
    /ns/.local/hosts.byaddr/.dns
    /ns/.local/hosts.byaddr/.nis
    /ns/.local/hosts.byaddr/.files
    /ns/.local/hosts.byname
    /ns/.local/hosts.byname/.dns
    /ns/.local/hosts.byname/.nis
    /ns/.local/hosts.byname/.files
    /ns/.local/netgroup.byhost
    /ns/.local/netgroup.byhost/.nis
    /ns/example.com/hosts
    /ns/example.com/hosts/.nisserv
    /ns/example.com/hosts/.dns
    /ns/example.com/hosts.byaddr
    /ns/example.com/hosts.byaddr/.nisserv
    /ns/example.com/hosts.byaddr/.dns
    /ns/example.com/hosts.byname
    /ns/example.com/hosts.byname/.nisserv
    /ns/example.com/hosts.byname/.dns
    /ns/example.com/netgroup.byhost
    /ns/example.com/netgroup.byhost/.nisserv

 

by: jbrahyPosted on 2008-03-04 at 16:35:40ID: 21046698

sorry for the delay in responding, I'll get back to you shortly. thank you for your patience.

 

by: pj99Posted on 2008-03-05 at 01:13:38ID: 21048776

> sorry for the delay in responding

Actually, that's no problem.  I probably should have stated this in my last reply ... I have
roughly reached the limit of my knowledge or available time to assist on this question.
Since it involved a system, Irix, that I had access  to, I thought it worth my trying to be
of assistance, but I don't work on Irix now and have never been a networking expert,
so there are unfortunate limits to my usefulness.  Sorry.

Perhaps my questions in my previous message will lead you in useful directions.

 

by: bluPosted on 2008-03-05 at 05:14:56ID: 21049936

It concerns me that the path /var/ns/cache/host.byname was not found. it sure sounds like the nsd daemon is not
running. Please verify that it is running.

 

by: jbrahyPosted on 2008-03-05 at 10:45:58ID: 21053126

bash# ps -ef | grep nsd
    root        156          1  0   Feb 23 ?       0:27 /usr/etc/nsd -a nis_security=local
bash#

nsd is running, but I'm not sure that it has the correct switches.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...