On 16/07/14 08:46, Jian IL Li wrote:
> 
> Hi, Simon;
>   Thanks for your patience to reply in detail!
>   As your request, I start up a dnsmasq process like below:
> 
>   dnsmasq --no-host --no-resolv --strict-order --bind-interfaces
> --interface=tap27fec81e-52 --except-interface=lo
> 
> --pid-file=/opt/stack/data/neutron/dhcp/a00f2b57-f569-41be-849a-1f581b1a08a3/pid
> 
> 
> --dhcp-hostsfile=/opt/stack/data/neutron/dhcp/a00f2b57-f569-41be-849a-1f581b1a08a3/host
>  # this file is null, and all the entries in it were deleted.
> 
> --addn-hosts=/opt/stack/data/neutron/dhcp/a00f2b57-f569-41be-849a-1f581b1a08a3/addn_hosts
> 
> 
> --dhcp-optsfile=/opt/stack/data/neutron/dhcp/a00f2b57-f569-41be-849a-1f581b1a08a3/opts
>  # tag:tag0,option6:dns-server,[2001:da8:25c::1]
>           --leasefile-ro --dhcp-range=set:tag0,10::,static,86400s
> --dhcp-lease-max=16777216 --conf-file= --domain=openstacklocal
> 
>   And then, I use dhclient to send a request (dhclient -S eth0) to get the
> stateless dhcpv6 options from an VM. In the syslog file, I find these
> records, which means the dnsmasq has reveived the request, but it do not
> send a reply messages.
> 
> Jul 16 15:13:44 leejian-ubuntu14 dnsmasq-dhcp[8924]: DHCPv6, static leases
> only on 10::, lease time 1h
> Jul 16 15:13:44 leejian-ubuntu14 dnsmasq-dhcp[8924]: DHCP, sockets bound
> exclusively to interface tap27fec81e-52
> Jul 16 15:13:44 leejian-ubuntu14 dnsmasq-dhcp[8924]:
> read /opt/stack/data/neutron/dhcp/a00f2b57-f569-41be-849a-1f581b1a08a3/opts
> Jul 16 15:14:01 leejian-ubuntu14 dnsmasq-dhcp[8924]:
> DHCPINFORMATION-REQUEST(tap27fec81e-52)
> 00:01:00:01:1b:58:d6:11:fa:16:3e:74:3f:52 host1
> 
> So In my comprehension, when working in static mode, the dnsmasq won't
> provide dhcpv6 service including stateful and stateless for the hosts,
> which are not recorded in the dhcp-hostfile or dhcp-host option. Am I
> right?

The reply is not logged seperately, so I'd expect to see exactly that
log, when dnsmasq is replying to the information request.

What do you see if you add --log-dhcp to the dnsmasq configuration?

Cheers,

Simon.

> 
> Best regards!
> Jian LI
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> From: Simon Kelley <si...@thekelleys.org.uk>
> To:   Jian IL Li/China/Contr/IBM@IBMCN,
> Date: 2014/07/16 04:30
> Subject:      Re: How to use dnsmasq as a stateless dhcpv6 server without
>             brodcast its RA messages?
> 
> 
> 
> On 08/07/14 07:40, Jian IL Li wrote:
>>
>>
>> Hi, expert:
>>   I know dnsmasq integrate dhcpv6 server and RA funciton together. It's a
>> greate job and convenient for the users to autoconfig ipv6 addresses, but
>> in my situation, I need the dnsmasq process just worked as a stateless
>> dhcpv6 server, and the RA packet is provided by a ipv6 router, so how can
> I
>> set the dhcp-range in dnsmasq's options? And which mode should I choose?
> If
>> I use the ra-stateless mode, how can I stop dnsmasq broadcasting RA
>> message? Can you give me some advices, examples may be better.
>> Best regards!
>> Jian Li
>>
> 
> Use the "static" mode. That only does stateful DHCP for hosts which are
> defined. If you don't define any hosts, then you will not get stateful
> DHCP, only stateless.
> 
> 
> Something like
> 
> dhcp-range=1234:5678::,static
> 
> will work.
> 
> Cheers,
> 
> 
> Simon.
> 
> 


_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to