Unix True 64 - Tru64 V5.1 Name Resolving (DNS) problem

This is Interesting: Free IT Magazines  
Home > Archive > Unix True 64 > August 2005 > Tru64 V5.1 Name Resolving (DNS) problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Tru64 V5.1 Name Resolving (DNS) problem
Asterisk

2005-07-29, 2:49 am

Hi Experts,


I've encountered a problem related to Name Resolving on my Tru64 Box.


I've defined the name servers' IP on the "resolv.conf" as below:
nameserver xxx.xxx.xxx.xxx
nameserver yyy.yyy.yyy.yyy


And the "nsswitch.conf" contains the following entries:
aliases: files
auth_prpasswd: files
group: compat
group_compat: nis
hosts: files dns
netgroup: nis
networks: files
passwd: compat
passwd_compat: nis
protocols: files
rpc: files
services: files


By using "nslookup" on the Tru64 box, I can resolve the name into IP:


#nslookup
Default Server: dns01-aa.bbbbbb.abc
Address: xxx.xxx.xxx.xxx



> www.cisco.com



Server: dns01-aa.bbbbbb.abc
Address: xxx.xxx.xxx.xxx

Non-authoritative answer:
Name: www.cisco.com
Address: 198.133.219.25





But I can't ping the www.cisco.com:

# ping www.cisco.com
ping: unknown host www.cisco.com


The ping can get the IP of the host if it exist in "/etc/hosts"
And my "/etc/hosts" file has the 2 entries for my primary and secondary

name server IP and name.


I would like to know if anything I need to change in order to make the
"nsswitch.conf" file valid ? Or there's any problem on my
"nsswitch.conf" file ? Or I need to restart some process after changing

the above files ?


Please kindly help ! Million thanks !

Mario Stargard

2005-07-29, 6:01 pm

Asterisk wrote:
> Hi Experts,
>
>
> I've encountered a problem related to Name Resolving on my Tru64 Box.
>
>
> I've defined the name servers' IP on the "resolv.conf" as below:
> nameserver xxx.xxx.xxx.xxx
> nameserver yyy.yyy.yyy.yyy
>
>
> And the "nsswitch.conf" contains the following entries:
> aliases: files
> auth_prpasswd: files
> group: compat
> group_compat: nis
> hosts: files dns
> netgroup: nis
> networks: files
> passwd: compat
> passwd_compat: nis
> protocols: files
> rpc: files
> services: files
>
>
> By using "nslookup" on the Tru64 box, I can resolve the name into IP:
>
>
> #nslookup
> Default Server: dns01-aa.bbbbbb.abc
> Address: xxx.xxx.xxx.xxx
>
>
>
>
>
>
>
> Server: dns01-aa.bbbbbb.abc
> Address: xxx.xxx.xxx.xxx
>
> Non-authoritative answer:
> Name: www.cisco.com
> Address: 198.133.219.25
>
>
>
>
>
> But I can't ping the www.cisco.com:
>
> # ping www.cisco.com
> ping: unknown host www.cisco.com
>
>
> The ping can get the IP of the host if it exist in "/etc/hosts"
> And my "/etc/hosts" file has the 2 entries for my primary and secondary
>
> name server IP and name.
>
>
> I would like to know if anything I need to change in order to make the
> "nsswitch.conf" file valid ? Or there's any problem on my
> "nsswitch.conf" file ? Or I need to restart some process after changing
>
> the above files ?
>
>
> Please kindly help ! Million thanks !
>

Have you tried svc.conf? The keywords are local and bind with a comma
separator. There should be a manpage.

Example:
hosts=local,bind


Asterisk

2005-07-30, 7:48 am

Dear Mario,

Firstly thanks for your kind suggestion !

I think version 5.1 should use the file nsswitch.conf .... but anyway
I've tried the svc.conf before with the entry you've suggested above. I
still can't resolve the host with "ping".

Should I restart some daemon after change this file ? Any what time
will use nsswitch.conf, what time will use svc.conf ?

Look forward your kind reply !

Peter da Silva

2005-07-30, 7:48 am

In article <1122620560.656459.8770@f14g2000cwb.googlegroups.com>,
Asterisk <asteriskhelp@gmail.com> wrote:
> I've encountered a problem related to Name Resolving on my Tru64 Box.


Which version of 5.1? How was it installed? You may find the file you
need to be looking at is /etc/svc.conf rather than /etc/nsswitch.conf...
it seems to be kind of random which one gets installed on a 5.1B system
even:

% uname -a
OSF1 xxx.xxxx.xxx.xxx V5.1 2650 alpha
% cat /etc/nsswitch.conf
cat: cannot open /etc/nsswitch.conf
% cat /etc/svc.conf
[...]
hosts=local,bind
[...]

# uname -a
OSF1 yyy.xxxx.xxx.xxx V5.1 2650 alpha
# cat /etc/nsswitch.conf
[...]
hosts: files dns
[...]
#
--
I've seen things you people can't imagine. Chimneysweeps on fire over the roofs
of London. I've watched kite-strings glitter in the sun at Hyde Park Gate. All
these things will be lost in time, like chalk-paintings in the rain. `-_-'
Time for your nap. | Peter da Silva | Har du kramat din varg, idag? 'U`
Mario Stargard

2005-07-30, 5:50 pm

Asterisk wrote:
> Dear Mario,
>
> Firstly thanks for your kind suggestion !
>
> I think version 5.1 should use the file nsswitch.conf .... but anyway
> I've tried the svc.conf before with the entry you've suggested above. I
> still can't resolve the host with "ping".
>
> Should I restart some daemon after change this file ? Any what time
> will use nsswitch.conf, what time will use svc.conf ?
>
> Look forward your kind reply !
>

It's my understanding that the nsswitch.conf file was introduced in 5.1b
in patch kit 3.

Try running the ping using truss to trace the system calls. You'll see
which files are referenced and in which order in the truss output.
truss is in the system V add on. It's in the associated products discs
that come with the OS.

The command should be something like:

truss -aef -o truss.out ping www.cisco.com

Let it run for one ping, then kill it with ctrl-c. Look at the
truss.out file with "more" or vi and look for which files it references.
You can search through the text file with more with the "/" key.

If you still can't figure out what's going on, then try posting your
question to the tru64 forums at itrc.hp.com. The gurus there will
probably be able to help you out.

Cheers,
Mario

Asterisk

2005-07-30, 5:50 pm

Thanks very much Mario and Peter !

I've tried on the svc.conf with "hosts=local,bind", but still can't
resolve the host with "ping www.cisco.com" command.

And since I'm not the owner of the box ... and the "truss" utility is
not found in it, so I can't get the truss output at this moment. Maybe
I'll try later after the owner has installed the "truss". And I think
I'll post this problem to HP's forum too .....

Thanks again for all you guys' help ! ^_^

Asterisk

2005-08-01, 8:29 am

Hi Mario, Peter and all experts,

Problem is solved. The cause is no Local Domain is defined in the
"resolv.conf" file.
I can resolve the host with "ping" command after I've insert the entry
"domain aaa.com" in the resolv.conf file.

Thanks again for you guys' kind advices !

Cheers,
David

Peter da Silva

2005-08-03, 5:59 pm

In article <1122725921.868772.142660@g43g2000cwa.googlegroups.com>,
Asterisk <asteriskhelp@gmail.com> wrote:
> Should I restart some daemon after change this file ? Any what time
> will use nsswitch.conf, what time will use svc.conf ?


These files are read when calls like gethostbyname() are made.

ping calls gethostbyname(), which reads nsswitch/svc.conf and then
/etc/hosts (if files are specified) and /etc/resolv.conf (if dns/bind
is specified). This happens on every program invocation that calls
the name server routines.

--
I've seen things you people can't imagine. Chimneysweeps on fire over the roofs
of London. I've watched kite-strings glitter in the sun at Hyde Park Gate. All
these things will be lost in time, like chalk-paintings in the rain. `-_-'
Time for your nap. | Peter da Silva | Har du kramat din varg, idag? 'U`
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com