LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   nslookup, domain issue (https://www.linuxquestions.org/questions/linux-newbie-8/nslookup-domain-issue-4175611920/)

Ankit yadav 08-14-2017 04:57 AM

nslookup, domain issue
 
1 Attachment(s)
I found that while I nslookup my dns server from one of client, It doesn't nslookup with hostname while it does with FQDN.

But it works all good when I try to nslookup other client.

I have entered "search domainname" in resolv.conf.

Can any one tell reason. Is it like that itself or somewhere I am missing something.

Attaching screenshot.

smallpond 08-14-2017 06:34 AM

You have two domains example.com and centbox1.example.com. If ns1 is authoritative for both then they both need to have zone files.

bathory 08-14-2017 07:22 AM

Quote:

Originally Posted by Ankit yadav (Post 5748051)
I found that while I nslookup my dns server from one of client, It doesn't nslookup with hostname while it does with FQDN.

But it works all good when I try to nslookup other client.

I have entered "search domainname" in resolv.conf.

Can any one tell reason. Is it like that itself or somewhere I am missing something.

Attaching screenshot.

Since you have a hostname with a dot, you need to increase ndots in /etc/resolv.conf (the default=1), so the resolver will use the search domain before doing an absolute name lookup even when queried for a hostname containing a dot:
Code:

search example.com
options ndots:2

For more details read the resolv.conf manpage


Regards

Ankit yadav 08-14-2017 08:24 AM

@bathory Thanks for reply. It worked. I have read man pages now.

@smallpod Thanks.Even I have thought to do the same. I will try it also.


All times are GMT -5. The time now is 11:31 PM.