- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Host file or DNS resolution of a server
Operating System - HP-UX
1821641
Members
3281
Online
109633
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-14-2011 05:21 PM
тАО01-14-2011 05:21 PM
Hi all,
I need to find out whether a fully qualified domain name is being resolved by /etc/hosts file or a DNS server ?
Our servers are configured to look in local host first and then dns.
Also can i specify in nslookup to resolve only through DNS Server ?
Thanks,
Manoj
I need to find out whether a fully qualified domain name is being resolved by /etc/hosts file or a DNS server ?
Our servers are configured to look in local host first and then dns.
Also can i specify in nslookup to resolve only through DNS Server ?
Thanks,
Manoj
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2011 06:33 PM
тАО01-14-2011 06:33 PM
Solution
Just ask nsquery to tell you:
nsquery hosts fully.qualified.com
nsquery is preferred over nslookup as it describes all the resolver steps. hostname resolution is controlled by two files:
/etc/resolv.conf
/etc/nsswitch.conf
nslookup and nsquery follow the rules in nsswitch.conf, but if nsswitch.conf and resolv.conf do not exist, all resolution is theough /etc/hosts. If resolve.conf exists but nsswitch.conf does not, then all resolution is through the DNS servers listed in resolv.conf.
nslookup will look only at the DNS server you supply on the command line, regardless of nsswitch.conf or resolv.conf -- just put the DNS server on the command line like this:
nslookup hp.com 8.8.8.8
This is a good way to test selected DNS servers but that changes nothing for programs and applications use system calls. They will follow the resolver rules (man resolv.conf and man nsswitch.conf)
Bill Hassell, sysadmin
nsquery hosts fully.qualified.com
nsquery is preferred over nslookup as it describes all the resolver steps. hostname resolution is controlled by two files:
/etc/resolv.conf
/etc/nsswitch.conf
nslookup and nsquery follow the rules in nsswitch.conf, but if nsswitch.conf and resolv.conf do not exist, all resolution is theough /etc/hosts. If resolve.conf exists but nsswitch.conf does not, then all resolution is through the DNS servers listed in resolv.conf.
nslookup will look only at the DNS server you supply on the command line, regardless of nsswitch.conf or resolv.conf -- just put the DNS server on the command line like this:
nslookup hp.com 8.8.8.8
This is a good way to test selected DNS servers but that changes nothing for programs and applications use system calls. They will follow the resolver rules (man resolv.conf and man nsswitch.conf)
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2011 01:48 AM
тАО01-15-2011 01:48 AM
Re: Host file or DNS resolution of a server
In /etc/hosys you may specify either "hostnmae"
of "FQDN" with the IP address or both it`s just a local lookup and not aware of any thing
unless you specify.
Where as DNS is configured to resolve domain specific queries & "domain name "is always
mentioned while configuring DNS.
Hope this helps.
Thanks
Manix
of "FQDN" with the IP address or both it`s just a local lookup and not aware of any thing
unless you specify.
Where as DNS is configured to resolve domain specific queries & "domain name "is always
mentioned while configuring DNS.
Hope this helps.
Thanks
Manix
HP-UX been always lovable - Mani Kalra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2011 11:06 PM
тАО01-15-2011 11:06 PM
Re: Host file or DNS resolution of a server
Hi,
Nsquery should do a "hostname fallback" analysis of your /etc/nsswitch.conf file. In case you have in /etc/nssiwtch.conf
hosts: dns nis files
Then, if dns resolution fails, it will fallback to nis and if nis fails it will fallback to /etc/hosts and the whole flow should be shown with the command nsquery. Remember you can also manipulate the behaviour of the fallback by mentioning the states NOTFOUND, UNAVAIL etc.
>Manix
"In /etc/hosys you may specify either "hostnmae"
of "FQDN" with the IP address or both it`s just a local lookup and not aware of any thing
unless you specify".
This is right but not in case the server is a DNS server. If it the server is serving as a DNS name server you will require an FQDN in the /etc/hosts file.
Regards
Ismial Azad
Nsquery should do a "hostname fallback" analysis of your /etc/nsswitch.conf file. In case you have in /etc/nssiwtch.conf
hosts: dns nis files
Then, if dns resolution fails, it will fallback to nis and if nis fails it will fallback to /etc/hosts and the whole flow should be shown with the command nsquery. Remember you can also manipulate the behaviour of the fallback by mentioning the states NOTFOUND, UNAVAIL etc.
>Manix
"In /etc/hosys you may specify either "hostnmae"
of "FQDN" with the IP address or both it`s just a local lookup and not aware of any thing
unless you specify".
This is right but not in case the server is a DNS server. If it the server is serving as a DNS name server you will require an FQDN in the /etc/hosts file.
Regards
Ismial Azad
Read, read and read... Then read again until you read "between the lines".....
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP