- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- hostname lookup issue
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
Forums
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
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
тАО07-09-2008 11:15 AM
тАО07-09-2008 11:15 AM
hostname lookup issue
I am attempting to install an 11.31 UX server (Integrity rx3600) and I cannot get the system to resolve its' hostname to the correct IP.
The system is behind a firewall, so it has a private IP (the one that the system has, ex: 10.1.1.10) and a public IP 20.1.1.10, which is in DNS. When I use the host command it comes up with the public IP. I cannot put the private IP in DNS.
The /etc/host file has the private IP listed, and the /etc/nsswitch.conf file has files listed 1st.
hosts returns the public IP.
nslookup private-IP-Address returns:
#############################################
Using /etc/hosts on: hostname.domain.com
looking up FILES
Trying DNS
***dnsserver.domain.com can't find private-IP-Address: Non-existent domain
#############################################
This makes me think that it is not even using the files....
How do we get the system to resolve its' name as the private IP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 11:18 AM
тАО07-09-2008 11:18 AM
Re: hostname lookup issue
This is what the alias is for in both /etc/hosts and the DNS. Something like:
host1 123.123.123.123 host2
host2 234.234.234.234 host1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 11:26 AM
тАО07-09-2008 11:26 AM
Re: hostname lookup issue
/rcw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 11:35 AM
тАО07-09-2008 11:35 AM
Re: hostname lookup issue
hosts: files [NOTFOUND=continue] dns
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 11:49 AM
тАО07-09-2008 11:49 AM
Re: hostname lookup issue
# @(#)B.11.31_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
#
#
# For example:
# 192.1.2.34 hpfcrm loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
# The format described in this file is the correct format.
# The original Berkeley manual page contains an error in
# the format description.
#
20.1.1.12 dns.domain.com dns
10.1.1.12 ux.domain.com ux2
127.0.0.1 localhost loopback
/etc/nsswitch.conf:
#
# /etc/nsswitch.hp_defaults:
#
# @(#)B.11.31_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#
passwd: compat
group: compat
hosts: files dns [NOTFOUND=return] nis [NOTFOUND=return]
ipnodes: dns [NOTFOUND=return] nis [NOTFOUND=return] files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: nis [NOTFOUND=return] files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 12:11 PM
тАО07-09-2008 12:11 PM
Re: hostname lookup issue
Try nsquery hosts 10.1.1.10
and
If you are NOT using NIS then get rid of the references in /etc/nsswitch.conf
cp /etc/nsswitch.file /etc/nsswitch.conf
test again.
Then append the files line with dns.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 12:21 PM
тАО07-09-2008 12:21 PM
Re: hostname lookup issue
# @(#)B11.23_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
#
#
# For example:
# 192.1.2.34 hpfcrm loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
# The format described in this file is the correct format.
# The original Berkeley manual page contains an error in
# the format description.
#
XXX.XXX.XXX.XXX localhost loopback
XXX.XXX.XXX.XXX machine1 MACHINE1 MACHINE1.
XXX.XXX.XXX.XXX MACHINE2 machine2
Compare your /etc/hosts file with the default under /usr/newconfig/etc/hosts to be sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 05:01 AM
тАО07-10-2008 05:01 AM
Re: hostname lookup issue
$ nsquery hosts 10.1.1.12
Using "files dns [NOTFOUND=return] nis [NOTFOUND=return] " for the hosts policy.
Searching /etc/hosts for 10.1.1.12
Hostname: ux.domain.com
Aliases: ux
Address: 10.1.1.12
Switch configuration: Terminates Search
I also ran:
$ nsquery hosts ux2
Using "files dns [NOTFOUND=return] nis [NOTFOUND=return] " for the hosts policy.
Searching /etc/hosts for ux2
Hostname: ux.domain.com
Aliases: ux
Address: 10.1.1.12
Switch configuration: Terminates Search
This appears that it is resolving the IP and host name correctly.
When I run ping ux2 it returns:
PING ux2.colgate.edu: 64 byte packets
ctrl-c
----ux2.colgate.edu PING Statistics----
# packets transmitted, 0 packets received, 100% packet loss
Maybe I am barking up the wrong tree, but does ping use the same resolver as nsquery?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 05:06 AM
тАО07-10-2008 05:06 AM
Re: hostname lookup issue
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 05:14 AM
тАО07-10-2008 05:14 AM
Re: hostname lookup issue
The only difference that I see between my /etc/hosts file and the example that you posted is that my list is upside down.
1st entry is DNS server
2nd entry is hostname
3rd entry is loopback
I would not think that the order would be that picky; we used the configuration program (I cannot remember the name right now) to do all of the network setup....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 05:20 AM
тАО07-10-2008 05:20 AM
Re: hostname lookup issue
I am not trying to ping through the firewall, but it appears (to me that is) that it is trying to ping the public IP; which would be going out the firewall then back in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 05:32 AM
тАО07-10-2008 05:32 AM
Re: hostname lookup issue
domain
nameserver
nameserver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 05:50 AM
тАО07-10-2008 05:50 AM
Re: hostname lookup issue
/etc/resolv.conf:
domain <
nameserver 20.1.1.100
I thought this was only for the DNS server(s) entries? How would I add in my host?
domain ux
namerserver 10.1.1.12
?????????????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 05:51 AM
тАО07-10-2008 05:51 AM
Re: hostname lookup issue
This is my 1st exposure to HP-UX, so if I seem a little green hopefully it will make a bit of sense...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 07:13 AM
тАО07-10-2008 07:13 AM
Re: hostname lookup issue
However for ping ux to get the correct IP, it was the ipnodes line in /etc/nsswitch.conf. It was set to use DNS -> NIS -> files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 07:25 AM
тАО07-10-2008 07:25 AM
Re: hostname lookup issue
e.g. DNS server must have entries for both forward and reverse IPs and match.
Does this effect other network utilities ? Maybe.
Either way. Fix your nsswitch.conf and remove all the NIS entries. Make sure you can lookup up both the forward and reverse addresses of any named servers configured in resolv.conf and get nslookup working properly.
At least then we have a good starting point.