[Wylug-help] DNS hostname query

James Holden wylug at jamesholden.net
Tue Feb 8 14:30:37 GMT 2005


Imran Javeed wrote:

>Good morning all
>
>Just a quickie which I should know but don't.
>
>I'm in the process of setting up a dns server,when I stumbled across this issue in regard to the hostname of the machine.
>
>If the hostname is server1 and the domain which it is an autoritive primary dns server is abc.com
>
>
>
And server1 is in the abc.com domain, ie: server1.abc.com?

>What hostname do you assign the machine,
>
>
>
server1

>Is it just server1 with reference in hosts to server1.abc.com
>
>
>
Your hosts file should have a line like this:

a.b.c.d server1.abc.com server1

where a.b.c.d is the ip address

>Is it server1.abc.com in hosts file
>
>Do you need to place the domain directive in /etc/resolv.conf and just leave the hostname as it is "server1" in hosts
>
>
>
You only need to put the domain directive in resolv.conf if you intend
to have local processes on the machine able to resolve non
fully-qualified hostnames, like server2 or whatever. This won't affect
it's function as a DNS server.

If you run a dns server on this machine, it won't pay any attention to
/etc/hosts or /etc/resolv.conf. For instance, if you have some upstream
DNS server provided by your ISP and you put them in /etc/hosts, bind on
the server won't use them.

DNS is relatively simple. It has a database (usually comprised of mostly
hostname to IP address mappings) and it answers questions from it. If it
doesn't know, it may ask other dns servers on behalf of the client if
you configured it that way, or it might not.

Local name resolution via /etc/hosts and /etc/resolv.conf doesn't affect
bind.

James

>Please could someone advise?
>
>Regards
>
>Imran
>
>_______________________________________________
>Wylug-help mailing list
>Wylug-help at wylug.org.uk
>http://list.wylug.org.uk/mailman/listinfo/wylug-help
>
>




More information about the Wylug-help mailing list