[Dnsmasq-discuss] DHCPv6 hostname resolving

Quintus quintus at quintilianus.eu
Wed Apr 2 15:26:34 UTC 2014


Hi there,

with DHPv4, dnsmasq properly converts the hostnames send to it to A
records we can query for. It seems however that this is not the case
with DHCPv6 and AAAA records; while I can perfectly query for the A
record of "atlantis.cable.internal.xxx.eu" (and even the one of
"atlantis" without any further qualification is found), querying for its
AAAA record just returns NXDOMAIN, i.e. it’s not found.

Is this a bug, or do I have to enable that feature somehow so it works
the same for DHCPv6 as it does for DHCPv4?

My Configuration:

--------------------------------------
########## General options ##########

domain-needed
bogus-priv
expand-hosts

########## DHCP DNS domains ##########

# Main
domain=internal.xxx.eu

# IPv4
domain=cable.internal.xxx.eu,10.37.59.0/26
domain=wifi.internal.xxx.eu,10.37.59.64/26

# IPv6
domain=cable.internal6.xxx.eu,2001:4dd0:ff00:8918:1::/80
domain=wifi.internal6.xxx.eu,2001:4dd0:ff00:8918:2::/80

########## DHCP ranges ##########

# Main DHCP ranges.
dhcp-range=set:wired,10.37.59.3,10.37.59.62,6h
dhcp-range=set:wifi,10.37.59.66,10.37.59.126,6h

# Main IPv6 address range
dhcp-range=set:wired6,2001:4dd0:ff00:8918:1::2,2001:4dd0:ff00:8918:1:ffff:ffff:fffe,80,6h
dhcp-range=set:wifi6,2001:4dd0:ff00:8918:2::2,2001:4dd0:ff00:8918:2:ffff:ffff:fffe,80,6h

# Don’t forget to advertise router information to
# IPv6-capable clients
enable-ra

# We are not the IPv4 router (but the IPv6 one).
dhcp-option=tag:wired,3,10.37.59.1
dhcp-option=tag:wifi,3,10.37.59.65

########## Misc ##########

log-dhcp
log-queries
--------------------------------------

Queries:

--------------------------------------
% dig atlantis.cable.internal.xxx.eu A

; <<>> DiG 9.9.2-P2 <<>> atlantis.cable.internal.xxx.eu A
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63422
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;atlantis.cable.internal.xxx.eu.	IN A

;; ANSWER SECTION:
atlantis.cable.internal.xxx.eu.	0 IN A 10.37.59.42

;; Query time: 1 msec
;; SERVER: 10.37.59.2#53(10.37.59.2)
;; WHEN: Wed Apr  2 16:46:33 2014
;; MSG SIZE  rcvd: 80
--------------------------------------

and

--------------------------------------
% dig atlantis.cable.internal.xxx.eu AAAA

; <<>> DiG 9.9.2-P2 <<>> atlantis.cable.internal.xxx.eu AAAA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22012
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;atlantis.cable.internal.xxx.eu.	IN AAAA

;; Query time: 79 msec
;; SERVER: 10.37.59.2#53(10.37.59.2)
;; WHEN: Wed Apr  2 16:46:36 2014
;; MSG SIZE  rcvd: 64
--------------------------------------

Log shows this:

--------------------------------------
dnsmasq-dhcp[1513]: 2999666139 available DHCP range: 10.37.59.3 --
10.37.59.62
dnsmasq-dhcp[1513]: 2999666139 vendor class:
dhcpcd-6.3.2:Linux-3.13.7-1-ARCH:x86_64:GenuineIntel
dnsmasq-dhcp[1513]: 2999666139 client provides name: atlantis
dnsmasq-dhcp[1513]: 2999666139 DHCPREQUEST(eth0) 10.37.59.42
3c:97:0e:b6:c6:c3
dnsmasq-dhcp[1513]: 2999666139 tags: wired, eth0
dnsmasq-dhcp[1513]: 2999666139 DHCPACK(eth0) 10.37.59.42
3c:97:0e:b6:c6:c3 atlantis
dnsmasq-dhcp[1513]: 2999666139 requested options: 1:netmask,
121:classless-static-route, 33:static-route,
dnsmasq-dhcp[1513]: 2999666139 requested options: 3:router,
6:dns-server, 12:hostname, 15:domain-name,
dnsmasq-dhcp[1513]: 2999666139 requested options: 28:broadcast,
42:ntp-server, 51:lease-time,
dnsmasq-dhcp[1513]: 2999666139 requested options: 54:server-identifier,
58:T1, 59:T2, 119:domain-search
dnsmasq-dhcp[1513]: 2999666139 next server: 10.37.59.2
dnsmasq-dhcp[1513]: 2999666139 sent size:  1 option: 53 message-type  5
dnsmasq-dhcp[1513]: 2999666139 sent size:  4 option: 54
server-identifier  10.37.59.2
dnsmasq-dhcp[1513]: 2999666139 sent size:  4 option: 51 lease-time  6h
dnsmasq-dhcp[1513]: 2999666139 sent size:  4 option: 58 T1  3h
dnsmasq-dhcp[1513]: 2999666139 sent size:  4 option: 59 T2  5h15m
dnsmasq-dhcp[1513]: 2999666139 sent size:  4 option:  1 netmask
255.255.255.192
dnsmasq-dhcp[1513]: 2999666139 sent size:  4 option: 28 broadcast
10.37.59.63
dnsmasq-dhcp[1513]: 2999666139 sent size:  4 option:  6 dns-server
10.37.59.2
dnsmasq-dhcp[1513]: 2999666139 sent size: 37 option: 15 domain-name
cable.internal.xxx.eu
dnsmasq-dhcp[1513]: 2999666139 sent size:  8 option: 12 hostname  atlantis
dnsmasq-dhcp[1513]: 2999666139 sent size:  4 option:  3 router  10.37.59.1
dnsmasq-dhcp[1513]: 12187573 available DHCP range:
2001:4dd0:ff00:8918:1::2 -- 2001:4dd0:ff00:8918:1:ffff:ffff:fff
dnsmasq-dhcp[1513]: 12187573 vendor class: 40712
dnsmasq-dhcp[1513]: 12187573 client MAC address: 3c:97:0e:b6:c6:c3
dnsmasq-dhcp[1513]: 12187573 client provides name: atlantis
dnsmasq-dhcp[1513]: 12187573 DHCPSOLICIT(eth0)
00:01:00:01:1a:93:42:fa:3c:97:0e:b6:c6:c3
dnsmasq-dhcp[1513]: 12187573 DHCPREPLY(eth0)
2001:4dd0:ff00:8918:1:39f1:8a99:8e9c 00:01:00:01:1a:93:42:fa:3c:97:0e
dnsmasq-dhcp[1513]: 12187573 requested options: 23:dns-server,
24:domain-search, 31:sntp-server,
dnsmasq-dhcp[1513]: 12187573 requested options: 39:FQDN, 82, 83
dnsmasq-dhcp[1513]: 12187573 tags: wired6, dhcpv6, eth0
dnsmasq-dhcp[1513]: 12187573 sent size: 14 option:  1 client-id
00:01:00:01:1a:93:42:fa:3c:97:0e:b6:c6:c3
dnsmasq-dhcp[1513]: 12187573 sent size: 14 option:  2 server-id
00:01:00:01:c7:92:bc:90:12:57:de:ce:e2:65
dnsmasq-dhcp[1513]: 12187573 sent size:  0 option: 14 rapid-commit
dnsmasq-dhcp[1513]: 12187573 sent size: 32 option:  4 ia-ta  IAID=246859459
dnsmasq-dhcp[1513]: 12187573 nest size: 24 option:  5 iaaddr
2001:4dd0:ff00:8918:1:39f1:8a99:8e9c PL=21600 VL=216
dnsmasq-dhcp[1513]: 12187573 sent size:  9 option: 13 status  0 success
dnsmasq-dhcp[1513]: 12187573 sent size:  1 option:  7 preference  0
dnsmasq-dhcp[1513]: 12187573 sent size: 16 option: 23 dns-server
2001:4dd0:ff00:8918:1::1
dnsmasq-dhcp[1513]: 12187573 sent size: 10 option: 39 FQDN  atlantis

[...]

dnsmasq[1513]: query[A] atlantis.cable.internal.xxx.eu from 10.37.59.42
dnsmasq[1513]: DHCP atlantis.cable.internal.xxx.eu is 10.37.59.42
dnsmasq[1513]: query[AAAA] atlantis.cable.internal.xxx.eu from 10.37.59.42
dnsmasq[1513]: forwarded atlantis.cable.internal.xxx.eu to
2001:4ba0:cafe:383::1
dnsmasq[1513]: forwarded atlantis.cable.internal.xxx.eu to 62.141.38.230
dnsmasq[1513]: forwarded atlantis.cable.internal.xxx.eu to 10.37.59.1
dnsmasq[1513]: reply atlantis.cable.internal.xxx.eu is NODATA-IPv6
--------------------------------------

Valete,
Quintus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20140402/a07184a8/attachment.sig>


More information about the Dnsmasq-discuss mailing list