[Dnsmasq-discuss] Can't figure out how to assign static IPv6 addresses to clients
Carlos Laviola
carlos.laviola at gmail.com
Mon Oct 1 00:38:11 BST 2012
Hello everyone,
I've recently switched to using only dnsmasq on openwrt since finding
out that it could also hand out IPv6 addresses. This works, but the
clients only get SLAAC addresses.
Also, the manpage states:
"A single dhcp-host may contain an IPv4 address or an IPv6 address, or
both. IPv6 addresses must be bracketed by square brackets thus:
--dhcp-host=laptop,[1234::56] Note that in IPv6 DHCP, the hardware
address is not normally available, so a client must be identified by
client-id (called client DUID in IPv6-land) or hostname."
How do I find this client-id/DUID? Even with the "log-dhcp" directive,
I don't see anything that looks like it.
Here are my conffiles. openwrt auto-generates a /var/etc/dnsmasq.conf
based on a file written in their own DSL (/etc/config/dhcp), which is
it's split in two files.
/var/etc/dnsmasq.conf:
--
conf-file=/etc/dnsmasq.conf
dhcp-authoritative
domain-needed
no-resolv
localise-queries
read-ethers
bogus-priv
expand-hosts
domain=home.laviola.org
server=/home.laviola.org/
server=8.8.8.8
server=8.8.4.4
server=2001:4860:4860::8888
server=2001:4860:4860::8844
server=2620:0:ccc::2
server=2620:0:ccd::2
dhcp-leasefile=/tmp/dhcp.leases
stop-dns-rebind
rebind-localhost-ok
dhcp-range=lan,192.168.1.100,192.168.1.249,255.255.255.0,12h
no-dhcp-interface=pppoe-wan
address=/ellis.home.laviola.org/192.168.1.1
ptr-record=1.1.168.192.in-addr.arpa,ellis.home.laviola.org
--
/etc/dnsmasq.conf:
--
dhcp-range=2001:ffff:666::,slaac
enable-ra
dhcp-host=192.168.1.2,[2001:ffff:666::1],client1
dhcp-host=192.168.1.3,[2001:ffff:666::2],client2
dhcp-host=192.168.1.4,[2001:ffff:666::3],client3
dhcp-host=192.168.1.5,[2001:ffff:666::4],client4
log-dhcp
--
Thanks for your help!
Best regards,
Carlos
More information about the Dnsmasq-discuss
mailing list