[Dnsmasq-discuss] Dual stack host file format

Simon Kelley simon at thekelleys.org.uk
Mon Aug 5 15:17:52 BST 2013


On 29/07/13 16:35, Shixiong Shang wrote:
> Hi,
>
> I am trying to use dnsmasq to assign both IPv4 and IPv6 address in
> dual-stack environment. The dnsmasq was launched with several additional
> options:
>
> root     19991 19990  0 11:09 ?        00:00:00 dnsmasq --no-hosts
> --no-resolv --strict-order --bind-interfaces --interface=ns-7f72b3ad-1a
> --except-interface=lo
> --pid-file=/var/lib/quantum/dhcp/81c3767a-d471-4433-8860-9a5ea20d4bd6/pid
> --dhcp-hostsfile=/var/lib/quantum/dhcp/81c3767a-d471-4433-8860-9a5ea20d4bd6/host
> --dhcp-optsfile=/var/lib/quantum/dhcp/81c3767a-d471-4433-8860-9a5ea20d4bd6/opts
> --dhcp-script=/usr/bin/quantum-dhcp-agent-dnsmasq-lease-update
> --leasefile-ro --enable-ra --port=547
> --dhcp-range=set:tag0,2001:192:168:2::,slaac,120s
> --dhcp-range=set:tag1,192.168.2.0,static,120s --conf-file=
> --domain=openstacklocal
>
> Based on my reading of the threads on this forum, I believe the host file
> should be constructed like this.....Do I really need bracket? Would you
> please confirm?
>
> dmd at net-network1:~$ more
> /var/lib/quantum/dhcp/81c3767a-d471-4433-8860-9a5ea20d4bd6/host
> fa:16:3e:95:23:89,192-168-2-3.openstacklocal,192.168.2.3,[2001:192:168:2::2]
> fa:16:3e:84:66:aa,192-168-2-1.openstacklocal,192.168.2.1,[2001:192:168:2::2]
> fa:16:3e:1b:18:93,192-168-2-2.openstacklocal,192.168.2.2,[2001:192:168:2::3]
>
> Thanks!
>
> Shixiong
>


Yes, you do need the brackets.

Beware that you can't assign IPv6 addresses using the MAC address to 
identify the machine, you have to use the DHCPv6 DUID. This is because a 
DHCPv6 client doesn't provide its MAc address to the server.

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list