[Dnsmasq-discuss] domain search and dnsmasq
Gerrit Kühn
gerrit at pmp.uni-hannover.de
Mon Jun 2 15:40:35 BST 2008
Hi folks,
I have a question regarding domain searching and dnsmasq. I have dnsmasq
doing dhcp and dns services for my NATed local subnet 192.168.64./24 which
has the domain name psl-rt.aei.uni-hannover.de. I would like to be able to
resolve hosts in our "real world" subnet 130.75.117/24 with the domain
names aei.uni-hannover and in the local subnet with by their hostname
(without aei.uni-hannover.de viz. psl-rt.aei.uni-hannover.de).
Between these two nets there is another private subnet 10.117.15/24 with
the domain name rt.aei.uni-hannover.de. It would be nice to access this
hosts by hostname alone, too.
Hostname-lookup works easily inside the 192. subnet. However, I did not
find a possibility for resolving just the hostnames from the real world
net, although I tried a lot of combinations in resolv.conf, dnsmasq.conf
and so on.
What I have right now is the following:
192.168.64.254 (firefly1) is working as NAT-router and dnsmasq-server
(NAT interface is 10.117.15.254).
firefly1# cat /etc/resolv.conf
domain aei.uni-hannover.de
search aei.uni-hannover.de rt-psl.aei.uni-hannover.de
rt.aei.uni-hannover.de
nameserver 127.0.0.1
firefly1# cat /etc/myresolv.conf
domain rt.aei.uni-hannover.de
nameserver 10.117.1.254
dnsmasq.conf:
myresolv.conf is used by dnsmasq via resolv-file, expand-hosts is active
and domain is set to rt-psl.aei.uni-hannover.de. This way 192.168.64.254
is able to resolve everything just by hostname:
to rt-psl.uaei.uni-hannover.de
firefly1# ping psl-ws1
PING psl-ws1.rt-psl.aei.uni-hannover.de (192.168.64.1): 56 data bytes
to rt.aei.uni-hannover.de
firefly1# ping mclane
PING mclane.aei.uni-hannover.de (10.117.15.2): 56 data bytes
to aei.uni-hannover.de
firefly1# ping arc
PING arc.aei.uni-hannover.de (130.75.117.1): 56 data bytes
However, a host in the 192. subnet can only resolve in this subnet, but
not in the others:
[root at psl-ws1 ~]# ping psl-ws2
PING psl-ws2.rt-psl.aei.uni-hannover.de (192.168.64.5) 56(84) bytes of
data.
[root at psl-ws1 ~]# ping firefly1
ping: unknown host firefly1
[root at psl-ws1 ~]# ping mclane
ping: unknown host mclane
[root at psl-ws1 ~]# ping arc
ping: unknown host arc
In all these cases, fully qualified domain names do work. Even nslookup
works with the hostnames alone:
[root at psl-ws1 ~]# nslookup firefly1
Server: 192.168.64.254
Address: 192.168.64.254#53
Name: firefly1
Address: 10.117.15.254
[root at psl-ws1 ~]# nslookup mclane
Server: 192.168.64.254
Address: 192.168.64.254#53
Name: mclane
Address: 10.117.15.2
[root at psl-ws1 ~]# nslookup arc
Server: 192.168.64.254
Address: 192.168.64.254#53
Name: arc
Address: 130.75.117.1
Why does ping resolve differently from nslookup?
Can anyone here explain to me how to setup dnsmasq in a way that the
machines in the 192. subnet are able to resolve the hostnames of all other
machines?
cu
Gerrit
More information about the Dnsmasq-discuss
mailing list