1832787 Members
3225 Online
110045 Solutions
New Discussion

DNS and Hosts

 
Alejandro_30
Frequent Advisor

DNS and Hosts


How can I do for resolving with DNS ?
because a try with nslookup send this
Using /etc/hosts on: Ka.


5 REPLIES 5
harry d brown jr
Honored Contributor

Re: DNS and Hosts


look at /etc/nsswitch.conf and /etc/resolv.conf

purchase: http://www.oreilly.com/catalog/dns4/

live free or die
harry
Live Free or Die
Abdul Rahiman
Esteemed Contributor

Re: DNS and Hosts

1. Setup the /etc/resolv.conf file with your DNS server name entries
2. Configure your /etc/nsswitch.conf file for the hosts entry to look up the dns server first,
eg:
hosts: dns nis [NOTFOUND=return] files

regds,
Abdul.
No unix, no fun
Muthukumar_5
Honored Contributor

Re: DNS and Hosts

Hai,

hostname resolvation(s) are based on hosts: entry in the /etc/nsswitch.conf file.

IF you set hosts as,

hosts: dns files ldap nis

dns will be used in the begin to resolve the hostname. IF it is not succeeded files, then ldap and nis will be used.

To make ur hostname resolved using dns,
use the dns before files option.

dns will resolve hostname with /etc/resolv.conf and hosts will be using /etc/hosts file.

/etc/resolv.conf
domain domainname1.dom2.domn.com
nameserver
nameserver

It will resolve the hostnames using nameserver1 ... nameservern one by one,if it is not resolved.





Easy to suggest when don't know about the problem!
john kingsley
Honored Contributor

Re: DNS and Hosts

Edit your /etc/nsswitch.conf file and add/change:

hosts: dns [NOTFOUND=continue] files

You also need to setup /etc/resolv.conf:

domain
nameserver
nameserver
Muthukumar_5
Honored Contributor

Re: DNS and Hosts

A good discussion on the nslookup resolvation is available at,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=636264

It will give more details and view on this.
Easy to suggest when don't know about the problem!