- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Nslookup and hosts file
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
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
тАО01-25-2007 09:06 PM
тАО01-25-2007 09:06 PM
Nslookup and hosts file
When I do an nslookup on local host, server states cannot resolve name although there is a fully qualified name in the hosts file. It appears to be going to the DNS server.
I have an switch and resolve files with entries
Why does the server not look in the host file first
Many Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2007 09:09 PM
тАО01-25-2007 09:09 PM
Re: Nslookup and hosts file
add or modify
hosts: files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2007 09:19 PM
тАО01-25-2007 09:19 PM
Re: Nslookup and hosts file
as Luk said you can do that in /etc/nsswitch.conf. This file doesn't exist for default, so if you don't see it then you have to create a new one (or copy from /usr/newconfig/etc, you will see there some nsswitch.* templates).
Anyway in your instance you should solve the problem when modyfing the line 'hosts' as follows:
hosts: files [NOTFOUND=continue] dns
This will look in /etc/hosts before and then in DNS.
Best regards,
Fabio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2007 09:47 PM
тАО01-25-2007 09:47 PM
Re: Nslookup and hosts file
As Luk & Fabio said you can change the entries in the /etc/nsswitch.conf file
or you can use SAM to change the name service switch order.
In Sam
networking and Communications ->
name service switch ->
where you can specify the name service lookup order.
Beware SAM will reboot the system after you configure, but it will givge you an idea of understanding how & what are all available in name service lookups.
TQ
Perumal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2007 10:39 PM
тАО01-25-2007 10:39 PM
Re: Nslookup and hosts file
For DNS to work the servers must have the answers or access to the answers being requested.
To get hosts resolution to work /etc/nsswitch.conf must be modified as noted above.
In a quirk that never made sense to me, HP-UX installs with no nsswitch.conf file. There are several candidates with different names in the /etc directory, but the systemadmin is required to pick one, or write his/her own and put it in production.
Why there is no default mystifies me.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2007 10:42 PM
тАО01-25-2007 10:42 PM
Re: Nslookup and hosts file
To always know the search order currently in effect for look ups...
run command "nslookup" with out any options..
Then in the nslookup command prompt.. type "policy...
ex:
root@XXXXX# nslookup
Using /etc/hosts on: XXXXX
> policy
#Lookups = 2
files [RCCC] dns [RRRR]
R means retry, C means continue, There are other settings aswell refer "man nsswitch.conf"... The above output is a reflection of configuration set in nsswitch.conf...
...For the solution of your problem please refer to previous responses.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2007 11:29 PM
тАО01-25-2007 11:29 PM
Re: Nslookup and hosts file
nsquery hosts www.hp.com
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2007 12:44 AM
тАО01-27-2007 12:44 AM
Re: Nslookup and hosts file
If you don't have the patch, you might give it a try, no guarantees though.