1833798 Members
3148 Online
110063 Solutions
New Discussion

Name service switch

 
SOLVED
Go to solution
Alessio_6
Occasional Advisor

Name service switch

Hi!

I'm experiencing a problem with the name service switch (HPUX 11.00). When I set the system to use DNS (updating resolv.conf and nsswitch.conf) netstat command hangs and communication with this host is hugely slow. I got the same setting hosts as the first name service and letting resolv.conf alive.
Only when I use hosts and delete resolv.conf the performance are acceptable.
So, do you have any ideas?
Why do I have to delete resolv.conf while using hosts as the unique name service?

thanks,
Alessio
5 REPLIES 5
eran maor
Honored Contributor

Re: Name service switch

Hi

you dont need to delete the resolv.conf file if you are using /etc/hosts .

i will also recommend to run inetd -c to reconfig the inetd deamon .

i m also working with nsswitch.conf file that refer to a DNS .

we have this recored on the nsswitch.conf :
hosts: files [NOTFOUND=continue] dns

to to define it like this and give us an update .

it will also work if you will give us the nsswitch.conf file
love computers
U.SivaKumar_2
Honored Contributor

Re: Name service switch

Hi,

Known issue. Keep the old settings . And use
-n ( dont resolve names ) option when using netstat command. It will solve the netstat issue. There is no other performance issue due to the above problem.

#netstat -an

Instead of

#netstat -a

regards,
U.SivaKumar
Innovations are made when conventions are broken
Alessio_6
Occasional Advisor

Re: Name service switch

Yes,

I know that with -n option it works, but I can assure the performance are actually very different.

Regards,
Alessio
Thayanidhi
Honored Contributor

Re: Name service switch

Hi,

May be your DNS server is responding slow!
Any other server using similar settings?
Try inetd -c and check in syslog any error logged - Just a thought.

TT
Attitude (not aptitude) determines altitude.
eran maor
Honored Contributor
Solution

Re: Name service switch

Hi

This delay is caused by the netstat -a command attempting
to resolve every wildcard address (*) as 0.0.0.0.
The result is "all-zeros-broadcast".

You must add the following to /etc/hosts:

0.0.0.0 all-zeros-broadcast

to resolve the performance problem, since the results are
returned for /etc/hosts instead of requiring a DNS query.
love computers