On Fri, 2015-03-27 at 15:51 -0400, Laine Stump wrote: > (the following is on RHEL, Fedora, and CentOS clients; I'm not sure what > behavior is on other platforms.) > > First, a question about client behavior (i.e. not specific to dnsmasq): > > I noticed a long time ago that IPv4 clients configured for both static > IP addresses and dhcp would discard the static IP addresses in favor of
NetworkManager (which is default on Fedora, RHEL, and CentOS for many/most installs) will quite happily allow both IPv4 static and DHCP addresses to co-exist and will manage each appropriately. You're right that there's no reason for that not to work. It's not typically exposed from some GUI clients because it's an unusual configuration; but it's explicitly supported by NM itself when then configuration specifies it. > the one from dhcp. Likewise, I found the same behavior for IPv6 when > checking it for this bug report: > > https://bugzilla.redhat.com/show_bug.cgi?id=1113983 > > This is different from IPv6 autoconf behavior - you can configure a > static IP and set autoconf, and you will end up with both IP addresses. Right. > I don't see any reason why a client shouldn't behave the same with dhcp > - just keep the static address and add the address from dhcp, and am > thinking this is just a deficiency in the dhcp client implementation (in > this case ISC dhclient). Is there anything in the DHCP standard that I'm If you're using plain dhclient (and not NM), then I'd think it would be a deficiency in the RHEL/Fedora dhclient-script then, not dhclient itself. dhclient itself doesn't care about the interface configuration, it's up to /usr/sbin/dhclient-script to take the DHCP server's reply and apply it to the interface. > overlooking that would preclude static + dhcp ( + autoconf) on the same > interface from working? I don't think the DHCP standards care at all, but I'm not an expert. > And now to a question about dnsmasq - libvirt uses dnsmasq for DNS, DHCP > (v4 and v6), and RA. I've just noticed that when I enable dhcpv6, > clients are no longer able to get an IPv6 via autoconf (i.e. when > they're configured to only use autoconf). Is this expected, or a > bug/configuration problem? This could be a misconfiguration or a bug in dnsmasq, I'll let Simon answer that. If you set the A bit in the RA's Prefix Information option, that says clients can use the given prefix to autoconfigure an address. If you set either of the M or O bits in the RA header, then DHCPv6 will be invoked. These are independent of each other. It sounds like when dnsmasq is configured for DHCPv6, it turns off the A bit which prevents clients from using the prefix for an autoconf address. While that would typically be done when using the M flag (since M implies you are using full DHCP leases and thus probably don't want autoconf) it's not prohibited in anyway that I know of, so perhaps dnsmasq just doesn't have a knob to keep A=1 when M=1? Just a guess. Dan > This is my dnsmasq version: dnsmasq-2.72-3.fc21.x86_64 > > The dnsmasq commandline: > > /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/ipv6.conf > --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper > > and ipv6.conf: > > strict-order > domain=test.lainetest.org > expand-hosts > pid-file=/var/run/libvirt/network/ipv6.pid > except-interface=lo > bind-dynamic > interface=virbr1 > dhcp-range=192.168.123.2,192.168.123.254 > dhcp-no-override > dhcp-range=x:x:x:x::2,x:x:x:x::200 > dhcp-lease-max=764 > dhcp-hostsfile=/var/lib/libvirt/dnsmasq/ipv6.hostsfile > addn-hosts=/var/lib/libvirt/dnsmasq/ipv6.addnhosts > enable-ra > > This is the config file when there is no dhcp-range defined for the network: > > strict-order > domain=test.lainetest.org > expand-hosts > pid-file=/var/run/libvirt/network/ipv6.pid > except-interface=lo > bind-dynamic > interface=virbr1 > dhcp-range=192.168.123.2,192.168.123.254 > dhcp-no-override > dhcp-lease-max=253 > dhcp-hostsfile=/var/lib/libvirt/dnsmasq/ipv6.hostsfile > addn-hosts=/var/lib/libvirt/dnsmasq/ipv6.addnhosts > dhcp-range=x:x:x:x::1,ra-only > > (in this case, autoconf works correctly). > > _______________________________________________ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss