search directive in /etc/resolv.conf not working

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
dml0099
DD-WRT Novice


Joined: 03 Jul 2013
Posts: 17

PostPosted: Tue Apr 25, 2017 20:33    Post subject: search directive in /etc/resolv.conf not working Reply with quote
Problem: I have a search directive in /etc/resolv.conf that does not seem to be picked up when name resolution happens.

Setup:
* I have turned off dnsmasq on the router and installed BIND.
* My subdomain being served by BIND is lon.mydomain.com
* I continue to use dnsmasq for DHCP. I have configured dnsmasq to send the domain search list to any clients that connect. The domain search list that is sent is "lon.mydomain.com mydomain.com"
* I have tested name resolution on a client. The client gets an IP from dnsmasq and can resolve BOTH machine and machine.lon from bind.


On my router, my resolver is configured like this:

Code:

root@ddwrt:~# cat /etc/resolv.conf
search earthlink.net
search lon.mydomain.com
nameserver 192.168.3.1
root@ddwrt:~#


This shows that name resolution is not working from the router:

Code:

root@ddwrt:~# ping ss2
root@ddwrt:~# ssh ss2

ssh: Exited: Error resolving 'ss2' port '22'. Name does not resolve
root@ddwrt:~#


The following shows that there is clearly a machine named ss2 and that BIND returns the correct address for it:

Code:

root@ddwrt:~# dig @localhost ss2.lon.mydomain.com

; <<>> DiG 9.10.4-P5 <<>> @localhost ss2.lon.mydomain.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38454
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ss2.lon.mydomain.com.    IN      A

;; ANSWER SECTION:
ss2.lon.mydomain.com. 600 IN      A       192.168.3.133

;; AUTHORITY SECTION:
lon.mydomain.com. 600     IN      NS      ddwrt.lon.mydomain.com.

;; ADDITIONAL SECTION:
ddwrt.lon.mydomain.com. 600 IN      A       192.168.3.1

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Apr 25 20:27:15 GMT 2017
;; MSG SIZE  rcvd: 105

root@ddwrt:~#


I expect that since I have the "search lon.mydomain.com" line in /etc/resolv.conf that I should be able to resolve short names like "ss2". This is working from the clients that connect, but not from the router itself. What am I doing wrong?
Sponsor
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum