Re: [Dnsmasq-discuss] Sending RA without dhcp-range

2014-01-17 Thread Shixiong Shang
Hi, Simon:

Truly appreciate your further clarification!

The use case I am dealing with now is, there is another DHCPv6 server (stateful 
or stateless) on the same link. Dnsmasq only needs to send RA to trigger DHCPv6 
Solicit in the same way router does. 

Being said, is it possible that we can shutdown the DHCPv6 port, so dnsmasq 
won’t listen to DHCPv6 message? Or change it from different port?

Thanks again!

Shixiong




On Jan 17, 2014, at 9:32 AM, Simon Kelley si...@thekelleys.org.uk wrote:

 On 17/01/14 14:21, Shixiong Shang wrote:
 Hi, Simon and Albert:
 
 Thank both of you for quick response!
 
 According to the man page online, the mode like “ra-only”, and
 “ra-stateless” are only used as part of “dhcp-range” option. However,
 this will also turn dnsmasq to DHCPv6 server, which I try to avoid.
 
 It confusing, I agree but
 
 dhcp-range=1234:5678::,ra-only
 
 _doesn't turn on the DHCPv6 server, and least for that prefix, and
 
 dhcp-range=1234:5678::,ra-stateless
 
 turns on the DHCPv6 server only to replt to information-requests, not address 
 allocation.
 
 
 Cheers,
 
 Simon.
 
 
 
 Would you please help me clarify how I can send RA on specific
 interfaces with the right flags? The only thing I can think of is
 leveraging “—ra-param”, but it doesn’t have place to put in mode
 keywords…..
 
 Thanks again!
 
 Shixiong
 
 
 
 
 
 
 
 On Jan 17, 2014, at 5:49 AM, Simon Kelley si...@thekelleys.org.uk
 wrote:
 
 On 17/01/14 06:10, Albert ARIBAUD wrote:
 Le 17/01/2014 05:30, Shixiong Shang a écrit :
 Hi, experts:
 
 Is it possible that dnsmasq can send out RA with either A=0,
 MO=1 (i.e. for DHCPv6 Stateful), or AO=1, M=0 (i.e. for DHCPv6
 Stateless) WITHOUT dhcp-range? What I am trying to achieve here
 is using dnsmasq to send out RA to trigger DHCPv6 Stateful or
 DHCPv6 Stateless mode without acting as DHCPv6 server. Based on
 my reading, I am under the impression that “—enable-ra” must be
 used with “—dhcp-range”. Otherwise, dnsmasq will not send
 RA…..
 
 You are right about having to add enable-ra.
 
 However there is a syntax of dhcp-range which will not cause
 DHCPv6.
 
 As per 'man dnsmasq' (search for 'dhcp-range'), the possible
 modes for IPv6 ranges include 'ra-only', which will previsely
 enable RAs without enabling any DHCP.
 
 
 Neither of you are completely right.
 
 enable-ra causes RA with A=0 and M = 1  O = 1 on every interface
 that's doing DHCP, just to instruct the clients to do stateful
 DHCP. It's intended as a simple option for systems which don't use
 RA at all.
 
 You don't need to set enable-ra at all to do RA on specific
 interfaces with other flag combinations, ie
 
 ra-only A=1 M=0 O=0 slaac   A=1 M=1 O=1 ra-stateless A=1 M=0 O=1
 
 Cheers,
 
 Simon.
 
 
 


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


[Dnsmasq-discuss] tags in opts file

2013-12-20 Thread Shixiong Shang
Hi, experts:

I have an opts_file which contains the entries for two tags, tag0 and tag1. Two 
dnsmasq instances are sharing the same opts_file. In this case, is it possible 
to let the first dnsmasq only read the opts entires beginning with tag0, and 
let the 2nd dnsmasq instance only read the opts entries beginning with tag1?


/var/lib/app/b3051625-e7de-4500-99d9-e9e80f5a8349/opts 

tag:tag0,option6:dns-server,[2001:4860:4860::]
tag:tag0,option6:domain-search,sandbox.com
tag:tag1,option:dns-server,8.8.8.8
tag:tag1,option:router,192.168.3.1



dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces 
--except-interface=lo --leasefile-ro 
--dhcp-range=set:tag0,192.168.2.0,static,86400s 
--dhcp-optsfile=/var/lib/app/b3051625-e7de-4500-99d9-e9e80f5a8349/opts 
--dhcp-hostsfile=/var/lib/app/b3051625-e7de-4500-99d9-e9e80f5a8349/host 
--dhcp-lease-max=256 --interface=ns-43a4981b-48 
--pid-file=/var/lib/app/b3051625-e7de-4500-99d9-e9e80f5a8349/pid

dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces 
--except-interface=lo --leasefile-ro --enable-ra 
--dhcp-range=set:tag1,2001:db8:2::,ra-stateless,86400s 
--dhcp-optsfile=/var/lib/app/b3051625-e7de-4500-99d9-e9e80f5a8349/opts 
--interface=qr-d104fbe1-04 
--pid-file=/var/lib/app/b3051625-e7de-4500-99d9-e9e80f5a8349/ipv6pid


Thanks!

Shixiong


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


Re: [Dnsmasq-discuss] Difference between SLAAC and RA-ONLY mode

2013-12-19 Thread Shixiong Shang
I am using version 2.66.



 On Dec 19, 2013, at 5:31 AM, Simon Kelley si...@thekelleys.org.uk wrote:
 
 On 19/12/13 04:02, Shixiong Shang wrote:
 I just found a workaround….If I replaced “slaac” mode with “static” mode, 
 then it just worked fine…But I don’t understand why it worked. :(
 
 What version of dnsmasq are you using? That command line doesn't generate an 
 error with the latest code.
 
 
 Cheers,
 
 Simon.
 
 
 On Dec 18, 2013, at 1:15 PM, Shixiong Shangsparkofwisdom.cl...@gmail.com  
 wrote:
 
 Hi, Simon:
 
 I put the range inside —dhcp-range filed as shown below to enable DHCPv6 
 mode. When I issued the command, the dnsmasq didn’t return any error. 
 However, it failed to launch and the syslog threw errors. I am wondering 
 which the “bad dhcp-range” refer to?
 
 sudo dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces 
 --except-interface=lo --leasefile-ro --enable-ra --port=547 
 --dhcp-range=set:tag1,2001:db8:2::2,2001:db8:2:0::::fffe,slaac 
 --dhcp-hostsfile=/var/lib/app/dhcp/b3051625-e7de-4500-99d9-e9e80f5a8349/ipv6host
  --dhcp-option=tag:tag1,option6:dns-server,[2001:4860:4860::] 
 --pid-file=/var/lib/app/dhcp/b3051625-e7de-4500-99d9-e9e80f5a8349/ipv6pid
 
 Dec 18 10:10:14 net-network2 dnsmasq[19722]: bad command line options: bad 
 dhcp-range
 Dec 18 10:10:14 net-network2 dnsmasq[19722]: FAILED to start up
 
 Thanks!
 
 Shixiong
 
 
 
 
 
 
 On Dec 17, 2013, at 1:08 PM, Simon Kelleysi...@thekelleys.org.uk  wrote:
 
 On 17/12/13 17:34, Shixiong Shang wrote:
 Hi, Simon:
 
 Thanks a lot for your quick clarification! Just want to make sure I
 clearly understand what you mean….if the dhcp-range contains a range
 of IPv6 address, then slaac should enable dhcpv6 + ra; if the
 dhcp-range contains the single IPv6 address, then slack will only do
 ra, but not dhcpv6…..Same as ra-only. In other words, how
 slaac/ra-only set MOAL bits depends on dhcp-range…..Is my
 understanding correct?
 
 That's correct.
 
 
 Simon.
 
 
 Shixiong
 
 
 
 On Dec 17, 2013, at 11:55 AM, Simon Kelleysi...@thekelleys.org.uk
 wrote:
 
 On 17/12/13 12:29, Shixiong Shang wrote:
 Hi, guys:
 
 I tried both “slaac” mode and “ra-only” modes with dnsmasq
 version 2.66. One thing I noticed was, both modes set the same
 bit value in the RA:
 
 M-bit = 0, O-bit = 0, A-bit = 1, L-bit = 1.
 
 I am wondering what’s the difference between these two modes
 then? Would you please shed some light on it?
 
 There's no difference: slaac and ra-only have exactly the same
 effect. Reading back the manpage, the description is very confusing
 and should be re-written.
 
 The reason for having two different keywords is that they can be
 used with and without DHCP
 
 dhcp-range = 1234::1, 1234::100, slaac
 
 will do RA with MOAL bits all set, and provide DHCPv6
 
 dhcp-range = 1234::1, slaac
 
 will do RA with only AL bits set, and not DHCP. It's maybe clearer
 to be able to be able to write.
 
 dhcp-range = 1234::1, ra-only
 
 in this case.
 
 Cheers,
 
 Simon.
 
 
 
 
 
 Thanks!
 
 Shixiong ___
 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
 

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


[Dnsmasq-discuss] RA-Stateless mode question

2013-12-19 Thread Shixiong Shang
Hi, expert:

I am using the dnsmasq in DHCPv6 Stateless mode. Based on the sniffer trace, I 
saw my DHCPv6 client solicit optional information, but dnsmasq replied with 
nothing. The log showed “no address available”….Anything I did wrong?

In addition, I saw in the man page that there is another way to configure 
stateless mode by using “—dhcp-range=::,static”. Is it the same?

nobody9987 1  0 09:11 ?00:00:00 dnsmasq --no-hosts --no-resolv 
--strict-order --bind-interfaces --except-interface=lo --leasefile-ro 
--enable-ra --dhcp-range=set:tag1,2001:db8:2::,ra-stateless,86400s 
--dhcp-optsfile=/var/lib/app/dhcp/b3051625-e7de-4500-99d9-e9e80f5a8349/opts 
--interface=qr-d104fbe1-04 
--pid-file=/var/lib/app/dhcp/b3051625-e7de-4500-99d9-e9e80f5a8349/ipv6pid


Dec 19 09:17:32 net-network2 dnsmasq-dhcp[9987]: DHCPSOLICIT(qr-d104fbe1-04) 
00:03:00:06:fa:16:3e:2a:9c:70
Dec 19 09:17:32 net-network2 dnsmasq-dhcp[9987]: DHCPADVERTISE(qr-d104fbe1-04) 
00:03:00:06:fa:16:3e:2a:9c:70 no addresses available

Thanks!

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


Re: [Dnsmasq-discuss] Difference between SLAAC and RA-ONLY mode

2013-12-19 Thread Shixiong Shang
Tried and verified it! Working pretty well now! Thanks, Simon!

Shixiong



On Dec 19, 2013, at 10:48 AM, Simon Kelley si...@thekelleys.org.uk wrote:

 On 18/12/13 15:21, Shixiong Shang wrote:
 Hi, Simon:
 
 This is very helpful! Thanks a lot for your confirmation!
 
 A quick question, is there any way we can set M-bit to 1 and set
 A-bit to 0? In other words, I am trying to force VM to use DHCPv6
 only, but not SLAAC?
 
 Yes, configure the dhcp-range _only_ for DHCPv6 ie
 
 
 dhcp-range=prefix::1,prefix::200
 
 and set the --enable-ra flag
 
 That will do RA just to support the DHCPv6, ie MO bits set, A bit clear.
 
 
 Cheers,
 
 Simon.
 
 
 Thanks again!
 
 Shixiong
 
 
 
 
 
 
 On Dec 17, 2013, at 1:08 PM, Simon Kelleysi...@thekelleys.org.uk
 wrote:
 
 On 17/12/13 17:34, Shixiong Shang wrote: Hi, Simon:
 
 Thanks a lot for your quick clarification! Just want to make sure
 I clearly understand what you mean….if the dhcp-range contains a
 range of IPv6 address, then slaac should enable dhcpv6 + ra; if
 the dhcp-range contains the single IPv6 address, then slack will
 only do ra, but not dhcpv6…..Same as ra-only. In other words,
 how slaac/ra-only set MOAL bits depends on dhcp-range…..Is my 
 understanding correct?
 
 That's correct.
 
 
 Simon.
 
 
 Shixiong
 
 
 
 On Dec 17, 2013, at 11:55 AM, Simon
 Kelleysi...@thekelleys.org.uk wrote:
 
 On 17/12/13 12:29, Shixiong Shang wrote: Hi, guys:
 
 I tried both “slaac” mode and “ra-only” modes with dnsmasq 
 version 2.66. One thing I noticed was, both modes set the
 same bit value in the RA:
 
 M-bit = 0, O-bit = 0, A-bit = 1, L-bit = 1.
 
 I am wondering what’s the difference between these two modes 
 then? Would you please shed some light on it?
 
 There's no difference: slaac and ra-only have exactly the
 same effect. Reading back the manpage, the description is very
 confusing and should be re-written.
 
 The reason for having two different keywords is that they can
 be used with and without DHCP
 
 dhcp-range = 1234::1, 1234::100, slaac
 
 will do RA with MOAL bits all set, and provide DHCPv6
 
 dhcp-range = 1234::1, slaac
 
 will do RA with only AL bits set, and not DHCP. It's maybe
 clearer to be able to be able to write.
 
 dhcp-range = 1234::1, ra-only
 
 in this case.
 
 Cheers,
 
 Simon.
 
 
 
 
 
 Thanks!
 
 Shixiong ___ 
 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
 
 


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


Re: [Dnsmasq-discuss] Difference between SLAAC and RA-ONLY mode

2013-12-18 Thread Shixiong Shang
Hi, Simon:

This is very helpful! Thanks a lot for your confirmation! 

A quick question, is there any way we can set M-bit to 1 and set A-bit to 0? In 
other words, I am trying to force VM to use DHCPv6 only, but not SLAAC?

Thanks again!

Shixiong






 On Dec 17, 2013, at 1:08 PM, Simon Kelley si...@thekelleys.org.uk wrote:
 
 On 17/12/13 17:34, Shixiong Shang wrote:
 Hi, Simon:
 
 Thanks a lot for your quick clarification! Just want to make sure I
 clearly understand what you mean….if the dhcp-range contains a range
 of IPv6 address, then slaac should enable dhcpv6 + ra; if the
 dhcp-range contains the single IPv6 address, then slack will only do
 ra, but not dhcpv6…..Same as ra-only. In other words, how
 slaac/ra-only set MOAL bits depends on dhcp-range…..Is my
 understanding correct?
 
 That's correct.
 
 
 Simon.
 
 
 Shixiong
 
 
 
 On Dec 17, 2013, at 11:55 AM, Simon Kelleysi...@thekelleys.org.uk
 wrote:
 
 On 17/12/13 12:29, Shixiong Shang wrote:
 Hi, guys:
 
 I tried both “slaac” mode and “ra-only” modes with dnsmasq
 version 2.66. One thing I noticed was, both modes set the same
 bit value in the RA:
 
 M-bit = 0, O-bit = 0, A-bit = 1, L-bit = 1.
 
 I am wondering what’s the difference between these two modes
 then? Would you please shed some light on it?
 
 There's no difference: slaac and ra-only have exactly the same
 effect. Reading back the manpage, the description is very confusing
 and should be re-written.
 
 The reason for having two different keywords is that they can be
 used with and without DHCP
 
 dhcp-range = 1234::1, 1234::100, slaac
 
 will do RA with MOAL bits all set, and provide DHCPv6
 
 dhcp-range = 1234::1, slaac
 
 will do RA with only AL bits set, and not DHCP. It's maybe clearer
 to be able to be able to write.
 
 dhcp-range = 1234::1, ra-only
 
 in this case.
 
 Cheers,
 
 Simon.
 
 
 
 
 
 Thanks!
 
 Shixiong ___
 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
 

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


Re: [Dnsmasq-discuss] Difference between SLAAC and RA-ONLY mode

2013-12-18 Thread Shixiong Shang
Hi, Simon:

I put the range inside —dhcp-range filed as shown below to enable DHCPv6 mode. 
When I issued the command, the dnsmasq didn’t return any error. However, it 
failed to launch and the syslog threw errors. I am wondering which the “bad 
dhcp-range” refer to?

sudo dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces 
--except-interface=lo --leasefile-ro --enable-ra --port=547 
--dhcp-range=set:tag1,2001:db8:2::2,2001:db8:2:0::::fffe,slaac 
--dhcp-hostsfile=/var/lib/app/dhcp/b3051625-e7de-4500-99d9-e9e80f5a8349/ipv6host
 --dhcp-option=tag:tag1,option6:dns-server,[2001:4860:4860::] 
--pid-file=/var/lib/app/dhcp/b3051625-e7de-4500-99d9-e9e80f5a8349/ipv6pid

Dec 18 10:10:14 net-network2 dnsmasq[19722]: bad command line options: bad 
dhcp-range
Dec 18 10:10:14 net-network2 dnsmasq[19722]: FAILED to start up

Thanks!

Shixiong






On Dec 17, 2013, at 1:08 PM, Simon Kelley si...@thekelleys.org.uk wrote:

 On 17/12/13 17:34, Shixiong Shang wrote:
 Hi, Simon:
 
 Thanks a lot for your quick clarification! Just want to make sure I
 clearly understand what you mean….if the dhcp-range contains a range
 of IPv6 address, then slaac should enable dhcpv6 + ra; if the
 dhcp-range contains the single IPv6 address, then slack will only do
 ra, but not dhcpv6…..Same as ra-only. In other words, how
 slaac/ra-only set MOAL bits depends on dhcp-range…..Is my
 understanding correct?
 
 That's correct.
 
 
 Simon.
 
 
 Shixiong
 
 
 
 On Dec 17, 2013, at 11:55 AM, Simon Kelleysi...@thekelleys.org.uk
 wrote:
 
 On 17/12/13 12:29, Shixiong Shang wrote:
 Hi, guys:
 
 I tried both “slaac” mode and “ra-only” modes with dnsmasq
 version 2.66. One thing I noticed was, both modes set the same
 bit value in the RA:
 
 M-bit = 0, O-bit = 0, A-bit = 1, L-bit = 1.
 
 I am wondering what’s the difference between these two modes
 then? Would you please shed some light on it?
 
 There's no difference: slaac and ra-only have exactly the same
 effect. Reading back the manpage, the description is very confusing
 and should be re-written.
 
 The reason for having two different keywords is that they can be
 used with and without DHCP
 
 dhcp-range = 1234::1, 1234::100, slaac
 
 will do RA with MOAL bits all set, and provide DHCPv6
 
 dhcp-range = 1234::1, slaac
 
 will do RA with only AL bits set, and not DHCP. It's maybe clearer
 to be able to be able to write.
 
 dhcp-range = 1234::1, ra-only
 
 in this case.
 
 Cheers,
 
 Simon.
 
 
 
 
 
 Thanks!
 
 Shixiong ___
 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
 
 
 


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


Re: [Dnsmasq-discuss] IPv6 host file syntax

2013-12-18 Thread Shixiong Shang
Got it! Now it works like a charm!

Thanks, Simon! Thanks, Bertrand!!


On Dec 17, 2013, at 4:18 PM, Simon Kelley si...@thekelleys.org.uk wrote:

 On 17/12/13 18:00, Shixiong Shang wrote:
 Hi, expert:
 
 I am using dnsmasq as DHCPv6 server and I created host file for my IPv6 DHCP 
 range. The first field is DUID calculated by MAC, followed by hostname, and 
 then IPv6 address.
 
 00:03:00:06:fa:16:3e:03:63:36,host-2001-db8-3--1.openstacklocal,2001:db8:3::1
 00:03:00:06:fa:16:3e:95:5f:6a,host-2001-db8-3--2.openstacklocal,2001:db8:3::2
 00:03:00:06:fa:16:3e:0c:29:d6,host-2001-db8-3--f816-3eff-fe0c-29d6.openstacklocal,2001:db8:3::f816:3eff:fe0c:29d6
 
 
 If you really want to use DUID, then the hex should have id: in front
 
 id:00:03:00:06:fa:16:3e:03:63:36,..
 
 but calculating DUIDs is dangerous and fragile. The latest dnsmasq releases 
 allow you to use MAC addresses directly.
 
 The IPv6 addresses should have [...] round them
 
 .,[2001:db8:3::1]
 
 Cheers,
 
 Simon.
 
 
 
 However, I cannot find any document to verify whether the above syntax is 
 correct. Would you please clarify?
 
 Thanks!
 
 Shixiong
 
 
 
 
 
 ___
 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


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


Re: [Dnsmasq-discuss] Difference between SLAAC and RA-ONLY mode

2013-12-18 Thread Shixiong Shang
I just found a workaround….If I replaced “slaac” mode with “static” mode, then 
it just worked fine…But I don’t understand why it worked. :(



On Dec 18, 2013, at 1:15 PM, Shixiong Shang sparkofwisdom.cl...@gmail.com 
wrote:

 Hi, Simon:
 
 I put the range inside —dhcp-range filed as shown below to enable DHCPv6 
 mode. When I issued the command, the dnsmasq didn’t return any error. 
 However, it failed to launch and the syslog threw errors. I am wondering 
 which the “bad dhcp-range” refer to?
 
 sudo dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces 
 --except-interface=lo --leasefile-ro --enable-ra --port=547 
 --dhcp-range=set:tag1,2001:db8:2::2,2001:db8:2:0::::fffe,slaac 
 --dhcp-hostsfile=/var/lib/app/dhcp/b3051625-e7de-4500-99d9-e9e80f5a8349/ipv6host
  --dhcp-option=tag:tag1,option6:dns-server,[2001:4860:4860::] 
 --pid-file=/var/lib/app/dhcp/b3051625-e7de-4500-99d9-e9e80f5a8349/ipv6pid
 
 Dec 18 10:10:14 net-network2 dnsmasq[19722]: bad command line options: bad 
 dhcp-range
 Dec 18 10:10:14 net-network2 dnsmasq[19722]: FAILED to start up
 
 Thanks!
 
 Shixiong
 
 
 
 
 
 
 On Dec 17, 2013, at 1:08 PM, Simon Kelley si...@thekelleys.org.uk wrote:
 
 On 17/12/13 17:34, Shixiong Shang wrote:
 Hi, Simon:
 
 Thanks a lot for your quick clarification! Just want to make sure I
 clearly understand what you mean….if the dhcp-range contains a range
 of IPv6 address, then slaac should enable dhcpv6 + ra; if the
 dhcp-range contains the single IPv6 address, then slack will only do
 ra, but not dhcpv6…..Same as ra-only. In other words, how
 slaac/ra-only set MOAL bits depends on dhcp-range…..Is my
 understanding correct?
 
 That's correct.
 
 
 Simon.
 
 
 Shixiong
 
 
 
 On Dec 17, 2013, at 11:55 AM, Simon Kelleysi...@thekelleys.org.uk
 wrote:
 
 On 17/12/13 12:29, Shixiong Shang wrote:
 Hi, guys:
 
 I tried both “slaac” mode and “ra-only” modes with dnsmasq
 version 2.66. One thing I noticed was, both modes set the same
 bit value in the RA:
 
 M-bit = 0, O-bit = 0, A-bit = 1, L-bit = 1.
 
 I am wondering what’s the difference between these two modes
 then? Would you please shed some light on it?
 
 There's no difference: slaac and ra-only have exactly the same
 effect. Reading back the manpage, the description is very confusing
 and should be re-written.
 
 The reason for having two different keywords is that they can be
 used with and without DHCP
 
 dhcp-range = 1234::1, 1234::100, slaac
 
 will do RA with MOAL bits all set, and provide DHCPv6
 
 dhcp-range = 1234::1, slaac
 
 will do RA with only AL bits set, and not DHCP. It's maybe clearer
 to be able to be able to write.
 
 dhcp-range = 1234::1, ra-only
 
 in this case.
 
 Cheers,
 
 Simon.
 
 
 
 
 
 Thanks!
 
 Shixiong ___
 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
 
 
 
 


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


[Dnsmasq-discuss] dns-server in opts file doesn't work

2013-12-17 Thread Shixiong Shang
Hi, experts:

I tried to leverage opts file to modify the recursive dns server IP conveyed in 
RA. The entry in the opts file is shown below:

tag:tag1,option6:dns-server,[2001:4860:4860::]

I tcpdumped the outgoing RA message, but the dns server IP is still set to the 
IPv6 address dnsmasq bound to. However, if I use 
--dhcp-option=tag:tag1,option6:dns-server,[2001:4860:4860::]” as an option 
in the CLI, then it worked in the way as expected.

Is there anything I did wrong in the opts file? It is still my preferred 
approach to use opts file.

Thanks!

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


[Dnsmasq-discuss] Difference between SLAAC and RA-ONLY mode

2013-12-17 Thread Shixiong Shang
Hi, guys:

I tried both “slaac” mode and “ra-only” modes with dnsmasq version 2.66. One 
thing I noticed was, both modes set the same bit value in the RA:

M-bit = 0, O-bit = 0, A-bit = 1, L-bit = 1.

I am wondering what’s the difference between these two modes then? Would you 
please shed some light on it?

Thanks!

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


Re: [Dnsmasq-discuss] Difference between SLAAC and RA-ONLY mode

2013-12-17 Thread Shixiong Shang
Hi, Simon:

Thanks a lot for your quick clarification! Just want to make sure I clearly 
understand what you mean….if the dhcp-range contains a range of IPv6 address, 
then slaac should enable dhcpv6 + ra; if the dhcp-range contains the single 
IPv6 address, then slack will only do ra, but not dhcpv6…..Same as ra-only. In 
other words, how slaac/ra-only set MOAL bits depends on dhcp-range…..Is my 
understanding correct?

Shixiong



On Dec 17, 2013, at 11:55 AM, Simon Kelley si...@thekelleys.org.uk wrote:

 On 17/12/13 12:29, Shixiong Shang wrote:
 Hi, guys:
 
 I tried both “slaac” mode and “ra-only” modes with dnsmasq version 2.66. One 
 thing I noticed was, both modes set the same bit value in the RA:
 
 M-bit = 0, O-bit = 0, A-bit = 1, L-bit = 1.
 
 I am wondering what’s the difference between these two modes then? Would you 
 please shed some light on it?
 
 There's no difference: slaac and ra-only have exactly the same effect. 
 Reading back the manpage, the description is very confusing and should be 
 re-written.
 
 The reason for having two different keywords is that they can be used with 
 and without DHCP
 
 dhcp-range = 1234::1, 1234::100, slaac
 
 will do RA with MOAL bits all set, and provide DHCPv6
 
 dhcp-range = 1234::1, slaac
 
 will do RA with only AL bits set, and not DHCP. It's maybe clearer to be able 
 to be able to write.
 
 dhcp-range = 1234::1, ra-only
 
 in this case.
 
 Cheers,
 
 Simon.
 
 
 
 
 
 Thanks!
 
 Shixiong
 ___
 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


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


[Dnsmasq-discuss] IPv6 host file syntax

2013-12-17 Thread Shixiong Shang
Hi, expert:

I am using dnsmasq as DHCPv6 server and I created host file for my IPv6 DHCP 
range. The first field is DUID calculated by MAC, followed by hostname, and 
then IPv6 address.

00:03:00:06:fa:16:3e:03:63:36,host-2001-db8-3--1.openstacklocal,2001:db8:3::1
00:03:00:06:fa:16:3e:95:5f:6a,host-2001-db8-3--2.openstacklocal,2001:db8:3::2
00:03:00:06:fa:16:3e:0c:29:d6,host-2001-db8-3--f816-3eff-fe0c-29d6.openstacklocal,2001:db8:3::f816:3eff:fe0c:29d6

However, I cannot find any document to verify whether the above syntax is 
correct. Would you please clarify?

Thanks!

Shixiong





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


[Dnsmasq-discuss] DHCPv6 default port

2013-12-17 Thread Shixiong Shang
Hi, expert:

I am using dnsmasq as DHCPv6 server. By default, dnsmasq is bound to port 53. I 
used --port option to bind it to UDP/547, since this is what my DHCPv6 client 
sends the query to. However, the dnsmasq never saw the DHCPv6 packets coming in 
afterwards. Based on tcpdump, I could see DHCPv6 packets hit dnsmasq binding 
interface, but dnsmasq log didn't report anything.

So I am wondering whether the port other than 53 is supported?

Thanks!

Shixiong



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


Re: [Dnsmasq-discuss] DHCPv6 default port

2013-12-17 Thread Shixiong Shang
I think dnsmasq process is bound to the right port, but it is not listening on 
udp6 part. 



Proto Recv-Q Send-Q Local Address   Foreign Address State   
PID/Program name
tcp0  0 0.0.0.0:96970.0.0.0:*   LISTEN  
2103/python
tcp6   0  0 2001:db8:3::1:547   :::*LISTEN  
2536/dnsmasq
tcp6   0  0 fe80::f816:3eff:fe0:547 :::*LISTEN  
2536/dnsmasq
tcp6   0  0 2001:db8:192:168::1:547 :::*LISTEN  
2533/dnsmasq
tcp6   0  0 fe80::f816:3eff:fe5:547 :::*LISTEN  
2533/dnsmasq
udp6   0  0 2001:db8:3::1:547   :::*
2536/dnsmasq
udp6   0  0 fe80::f816:3eff:fe0:547 :::*
2536/dnsmasq
udp6   0  0 2001:db8:192:168::1:547 :::*
2533/dnsmasq
udp6   0  0 fe80::f816:3eff:fe5:547 :::*
2533/dnsmasq


Shixiong




On Dec 17, 2013, at 1:15 PM, Shixiong Shang sparkofwisdom.cl...@gmail.com 
wrote:

 Hi, expert:
 
 I am using dnsmasq as DHCPv6 server. By default, dnsmasq is bound to port 53. 
 I used --port option to bind it to UDP/547, since this is what my DHCPv6 
 client sends the query to. However, the dnsmasq never saw the DHCPv6 packets 
 coming in afterwards. Based on tcpdump, I could see DHCPv6 packets hit 
 dnsmasq binding interface, but dnsmasq log didn't report anything.
 
 So I am wondering whether the port other than 53 is supported?
 
 Thanks!
 
 Shixiong
 
 


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


[Dnsmasq-discuss] Dual stack host file format

2013-07-29 Thread Shixiong Shang
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@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
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] DNSMasq doesn't see DHCPv6 Solicit msg

2013-07-29 Thread Shixiong Shang
Hi,

I am using DNSMasq to assign IPv6 address to client machine (Centos 6.4).
Based on sniffer trace, I can see DHCP Solicit msg from client addressed to
ff02::1:2 at UDP port 547:

11:18:25.140542 IP6 (hlim 1, next-header UDP (17) payload length: 60)
fe80::f816:3eff:fe95:2389.546  ff02::1:2.547: [udp sum ok] dhcp6 solicit
(xid=e14b62 (client-ID hwaddr/time type 1 time 428180465 fa163e952389)
(option-request DNS-server DNS-search-list) (elapsed-time 1652) (IA_NA
IAID:1049961353 T1:3600 T2:5400))


I changed the default configuration of dnsmasq and it is listening to port
547:

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


However, dnsmasq only saw IPv6 DHCP request from the VM, but not DHCPv6
Solicit msg. Is there anything I did wrong?

Jul 29 11:25:34 net-network1 dnsmasq-dhcp[19990]:
DHCPREQUEST(ns-7f72b3ad-1a) 192.168.2.3 fa:16:3e:95:23:89
Jul 29 11:25:34 net-network1 dnsmasq-dhcp[19990]: DHCPACK(ns-7f72b3ad-1a)
192.168.2.3 fa:16:3e:95:23:89 192-168-2-3
Jul 29 11:25:47 net-network1 dnsmasq-dhcp[19990]:
RTR-ADVERT(ns-7f72b3ad-1a) 2001:192:168:2::
Jul 29 11:25:47 net-network1 dnsmasq-dhcp[19990]:
RTR-ADVERT(ns-7f72b3ad-1a) 2001:192:168:2::
Jul 29 11:25:49 net-network1 dnsmasq-dhcp[19990]:
RTR-SOLICIT(ns-7f72b3ad-1a) fa:16:3e:95:23:89
Jul 29 11:25:49 net-network1 dnsmasq-dhcp[19990]:
RTR-ADVERT(ns-7f72b3ad-1a) 2001:192:168:2::
Jul 29 11:25:50 net-network1 dnsmasq-dhcp[19990]:
DHCPREQUEST(ns-7f72b3ad-1a) 192.168.2.3 fa:16:3e:95:23:89
Jul 29 11:25:50 net-network1 dnsmasq-dhcp[19990]: DHCPACK(ns-7f72b3ad-1a)
192.168.2.3 fa:16:3e:95:23:89 192-168-2-3
Jul 29 11:25:53 net-network1 dnsmasq-dhcp[19990]:
RTR-SOLICIT(ns-7f72b3ad-1a) fa:16:3e:95:23:89
Jul 29 11:25:53 net-network1 dnsmasq-dhcp[19990]:
RTR-ADVERT(ns-7f72b3ad-1a) 2001:192:168:2::
Jul 29 11:25:57 net-network1 dnsmasq-dhcp[19990]:
RTR-SOLICIT(ns-7f72b3ad-1a) fa:16:3e:95:23:89
Jul 29 11:25:57 net-network1 dnsmasq-dhcp[19990]:
RTR-ADVERT(ns-7f72b3ad-1a) 2001:192:168:2::


Thanks!

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