Re: Pump, dhchp, dns and dnsmasq
On Sat, 05 Feb 2011 20:19:43 +0000, Tixy wrote:
> . . . adding a dhcp-host line in dnsmasq.conf for each NIC. E.g. the
> entry for the machine I'm typing on is
>
> dhcp-host=00:28:58:3A:EB:A1,192.168.2.20,computer2,infinite
> ^ ^ ^ ^ MAC
> IP Address hostname lease time
>
> That is the only per client config needed. The nice thing about using
> dnsmasq as DHCP+DNS is that DNS can resolve these hostnames, e.g. "ssh
> tixy@computer2" will work :-)
Hmm, why it doesn't work for me. Here is my setting:
dhcp-host=00:16:3e:00:00:01,kvm1,192.168.0.1,8h
dhcp-host=00:16:3e:00:00:02,kvm2,192.168.0.2,8h
On DNSmasq server (maroon):
% /etc/init.d/dnsmasq restart
Restarting DNS forwarder and DHCP server: dnsmasq.
>From other boxes,
$ dig kvm1 @maroon
; <<>> DiG 9.7.1-P2 <<>> kvm1 @maroon
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 41058
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;kvm1. IN A
;; Query time: 0 msec
;; SERVER: 192.168.0.100#53(192.168.0.100)
;; WHEN: Sun Feb 6 23:14:46 2011
;; MSG SIZE rcvd: 22
$ dig -x 192.168.0.1 @maroon
; <<>> DiG 9.7.1-P2 <<>> -x 192.168.0.1 @maroon
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 32714
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;1.0.168.192.in-addr.arpa. IN PTR
;; Query time: 1 msec
;; SERVER: 192.168.0.100#53(192.168.0.100)
;; WHEN: Sun Feb 6 23:14:41 2011
;; MSG SIZE rcvd: 42
Nothing found. Why?
Moreover,
$ dig maroon @maroon
; <<>> DiG 9.7.1-P2 <<>> maroon @maroon
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53975
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;maroon. IN A
;; ANSWER SECTION:
maroon. 0 IN A 127.0.0.1
;; Query time: 0 msec
;; SERVER: 192.168.0.100#53(192.168.0.100)
;; WHEN: Sun Feb 6 23:20:41 2011
;; MSG SIZE rcvd: 40
-- I was hoping it will return 192.168.0.100 instead of 127.0.0.1.
How can I fix above problems?
PS, dnsmasq DNS forwarding seems to be working fine (I haven't disable my
DSL router dns service yet):
$ dig coral @maroon
; <<>> DiG 9.7.1-P2 <<>> coral @maroon
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9875
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;coral. IN A
;; ANSWER SECTION:
coral. 0 IN A 192.168.0.106
;; Query time: 0 msec
;; SERVER: 192.168.0.100#53(192.168.0.100)
;; WHEN: Sun Feb 6 23:21:17 2011
;; MSG SIZE rcvd: 39
Thanks
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Reply to: