[Dnsmasq-discuss] Can't figure out how to assign static IPv6 addresses to clients

Sean Boran sean at boran.com
Mon Oct 1 20:49:10 BST 2012


Perhaps you clients are getting their addresses from router advertisement,
and not DHCP.  So disable RA first in dnsmasq (and make sure no router or
other host is publishing one)

Syntax like this works, I used it:
dhcp-host=ubuntu12,[2001:ffff:666::1]

perhaps a v6 range needs to be specified:
dhcp-range=2001:ffff:666::1, 2001:ffff:666::4, 24h

make sure you're using  a very recent version of dnsmasq.

"tcpdump ip6" can show what packets are on the wire too.

Sean


On 1 October 2012 01:38, Carlos Laviola <carlos.laviola at gmail.com> wrote:

> 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
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20121001/15214bc8/attachment-0001.html>


More information about the Dnsmasq-discuss mailing list