- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Odd resolution behavior on 11.31 vs. 11.23 HP-...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2010 01:05 PM
тАО03-18-2010 01:05 PM
Why would loopback and localhost behave differently during a ping when /etc/nsswitch is in control? One hangs momentarily and the other does not hang at all when pinged? Maybe nsswitch does not control resolution as I thought?
DNS resolves everything external to /etc/hosts quickly. It appears like when pinging loopback it is looking to DNS first, even though FILES is primary search as per nsswitch. How can DNS be primary search when FILES is set as primary in nsswitch?
# cat /etc/resolv.conf
domain foo.com
nameserver x.x.x.x
nameserver x.x.x.y
# cat /etc/nsswitch.conf
passwd: files ldap
group: files ldap
hosts: files [NOTFOUND=continue] dns ldap
networks: files ldap
protocols: files ldap
rpc: files ldap
publickey: files
netgroup: files ldap
automount: files
aliases: files
services: files ldap
# cat /etc/hosts
127.0.0.1 localhost loopback
x.x.x.t s1 s1.foo.com
x.x.x.u s2 s2.foo.com
x.x.x.x name1 name1.foo.com
x.x.x.y name2 name1.foo.com
# nslookup loopback
Using /etc/hosts on: s1
looking up FILES
Name: localhost
Address: 127.0.0.1
Aliases: loopback
# nslookup localhost
Using /etc/hosts on: s1
looking up FILES
Name: localhost
Address: 127.0.0.1
Aliases: loopback
# time ping localhost
PING localhost: 64 byte packets
64 bytes from 127.0.0.1: icmp_seq=0. time=0. ms
----localhost PING Statistics----
1 packets transmitted, 1 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
real 0.4
user 0.0
sys 0.0
#
# time ping loopback
PING localhost: 64 byte packets
64 bytes from 127.0.0.1: icmp_seq=0. time=0. ms
----localhost PING Statistics----
1 packets transmitted, 1 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
real 2.9
user 0.0
sys 0.0
#
If I use nslookup, there is no hang when resolving loopback or localhost.
When using the host command (force DNS use I think) I resolve localhost quickly and hang on loopback. This make sense as I found localhost listed on the DNS server as 127.0.0.1 and found no entry for loopback.
# time host localhost
localhost.idxedi.com has address 127.0.0.1
real 0.0
user 0.0
sys 0.0
# time host loopback
Host loopback not found: 2(SERVFAIL)
real 2.2
user 0.0
sys 0.0
This seems like an obvious DNS issue, but DNS seems to be resolving external addresses (not in /etc/hosts and is in DNS) without issue. When I try to resolve a hostname that is not is DNS I get the same behavior.
When telneting to the boxes we hang momentarily after the username/password entry
The same exact setup on HP-UX 11.23 v2 in the same network segment/DNS server does not exhibit this behavior.
Thank you for any ideas.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2010 04:34 PM
тАО03-18-2010 04:34 PM
SolutionOther pseudo-random thoughts:
*) any chance the /etc/hosts file has some garbage (non-printing) bytes in it?
*) I wonder what the default for ipnodes is
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2010 05:02 PM
тАО03-18-2010 05:02 PM
Re: Odd resolution behavior on 11.31 vs. 11.23 HP-UX
Thank you for your suggestions.
I had checked /etc/hosts earlier via vi set list. That came up clear.
I had not thought to compare the v2 nsswitch against the v3 nsswitch. I found that our v3 boxes have no ipnodes entry. To be frank I've never used ipnodes and am unfamiliar with it's function.
After adding the ipnodes line into nsswitch.conf the v3 box now behaves like the v2 box, ...loopback pings quickly as expected.
I think I know why we are missing ipnodes on al lour v3 boxes. These boxes are all using LDAP. A quick search on few systems here shows the default ldap /etc/nsswitch.ldap files does not contain a ipnodes line on v2 or v3.
Is there an issue with using an ipnodes line within /etc/nsswitch.conf in an LDAP config'd HP-UX?
Thanks again for your help!
Bryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2010 05:14 PM
тАО03-18-2010 05:14 PM
Re: Odd resolution behavior on 11.31 vs. 11.23 HP-UX
FWIW, everyone's home-brew applications should be migrating to getaddrinfo/getnameinfo - the main impetus is to enable IPv6 support, but there are other benefits - which is why netperf uses them now, even for IPv4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2010 06:01 PM
тАО03-18-2010 06:01 PM
Re: Odd resolution behavior on 11.31 vs. 11.23 HP-UX
time nsquery hosts localhost
time nsquery hosts loopback
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 06:11 AM
тАО03-19-2010 06:11 AM
Re: Odd resolution behavior on 11.31 vs. 11.23 HP-UX
Thanks for everyones input,
Bryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 01:26 PM
тАО03-19-2010 01:26 PM
Re: Odd resolution behavior on 11.31 vs. 11.23 HP-UX
Here's a note about ipnodes...
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=882565
But just to thoroughly confuse everything, from the nsswitch.conf man page (11.23 and 11.31):
"Obsolescence
The ipnodes directive may not be supported in future HP-UX releases. In order to minimize the impact to applications, it is recommended that you have the same configuration for the hosts and the ipnodes directives."
Go figure...
Bill Hassell, sysadmin