Operating System - HP-UX
1821625 Members
3262 Online
109633 Solutions
New Discussion юеВ

Re: dns name resolving issue

 
john ho_3
Occasional Contributor

dns name resolving issue

Hi all,

I have a question about name resolving:
If I try to resolve the next name "external.net.mnc123.mcc123.gprs" would it be only forwarded to external DNS servers (1.2.3.4 or 5.6.7.8)??
and
If I try to resolve the next name "internal.mnc123.mcc123.gprs" would it be only resolved by zone "mnc123.mcc123.gprs" and not by zone "net.mnc123.mcc123.gprs"? (P.S. internal.mnc123.mcc123.gprs is ofcourse configured in the file "own.zone")

dns-query is eg. ---> net.mnc123.mcc123.gprs
Summary: work dns-query from top to down in the /etc/named.conf file. I mean the dns-query will check the first zone (net.mnc123.mcc123.gprs) in the named.conf, if it doesn't match it will go to the next zone (mnc123.mcc123.gprs)?


#more /etc/named.conf

zone "net.mnc123.mcc123.gprs" in {
type forward;
forwarders {
1.2.3.4;
5.6.7.8;
};
forward only;
};


zone "mnc123.mcc123.gprs" in {
type master;
file "own.zone";
};


I hope you can anwser my question.

many thanks.

john
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: dns name resolving issue

Shalom,

How this machine resolves DNS depends on a few things:

/etc/nsswitch.conf
# does it use dns at all for host name resolution

/etc/resolv.conf
# what servers it looks to if dns lookups are tried. Note that it could try and look this up on a different machine that does not use this one as a DNS server.

Isn't this a question that should be resolved by actual testing?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ho_5
Advisor

Re: dns name resolving issue

Hi Shalom,

thanks of your quick reply.

more /etc/nsswitch.conf
hosts: files
so it looks like it doesn't use dns to resolv.

there is no /etc/resolv.conf
Do yu think it will works??

//john

Geoff Wild
Honored Contributor

Re: dns name resolving issue

Your machine is only looking at /etc/hosts

So unless external.net.mnc123.mcc123.gprs is in there - then no - it won't resolve it.

If you want to use DNS, then in nsswitch.conf:

hosts: files [NOTFOUND=CONTINUE] dns



Then something like this for /etc/resolv.conf :

domain yourinterneldomain.com
nameserver X.X.X.X
nameserver Y.Y.Y.Y
nameserver Z.Z.Z.Z
retrans 2500
retry 2


As far as bind goes, the only reason to setup a zone that is type forward is if you want to point to a certain nameserver for resolution of that domain name instead of following proper delegation.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.