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

Dan Williams dcbw at redhat.com
Tue Oct 2 14:56:59 BST 2012


On Mon, 2012-10-01 at 21:49 +0200, Sean Boran wrote:
> 
> 
> 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)

You don't want to disable RA, you want to tell clients to use "managed"
configuration in the RA.  If you disable RA, then nothing on that link
will have a default router and thus no way to get packets to anything
that's not in the broadcast domain.  DHCPv6 does not have any facility
to provide a "default gateway" like IPv4, since that's precisely the
functionality of RAs.

So you really want to reconfigure either dnsmasq or radvd to set the
"M" (Managed) flag, which will tell the clients to get their address
from DHCPv6, not generate one from the RA prefix option.

Dan

> 
> 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
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss





More information about the Dnsmasq-discuss mailing list