Re: [Dnsmasq-discuss] "no available addresses" with DHCPv6 stateful config

2018-11-20 Thread Joshua M. Boniface
Thanks a lot Simon, it does seem to be a WIDE issue - the DHCPv6 transaction 
works perfectly fine with the ISC client. I wasn't using WIDE for any 
particular reason over ISC, just an old habit/name recognition from years past, 
so I'm happy to move to what works best!

Thanks,
Joshua M. Boniface

On 2018-11-20 04:00 PM, Simon Kelley wrote:
> This does seem odd. Would it be possible to capture the DHCP packets,
> using wireshark or tcpdump? Send the dump directly to me if you don't
> want to post it in public.
> 
> I'm not sure what the status of the WIDE client is - it's not common.
> Maybe worth trying the ISC client instead, for quick fix. I can't see an
> obvious problem with your config.
> 
> 
> 
> Cheers,
> 
> Simon.
> 
>>
>> sudo /usr/sbin/dnsmasq \
>>   --bogus-priv \
>>   --no-hosts \
>>   --dhcp-authoritative \
>>   --filterwin2k \
>>   --expand-hosts \
>>   --domain=test \
>>   --local=/test/ \
>>   --log-facility=- \
>>   --log-dhcp \
>>   --keep-in-foreground \
>>   --bind-interfaces \
>>   --interface=br1002 \
>>   --except-interface=lo \
>>   --listen-address=2001::::1 \
>>   --dhcp-range=::2,::,constructor:br1002,24h
>>
>> That `listen-address` is definitely bound to the server side:
>>
>> 6: br1002:  mtu 8800 qdisc noqueue
>> state UP group default qlen 1000
>>     link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
>>     inet6 2001::::1/64 scope global
>>    valid_lft forever preferred_lft forever
>>
>> What's happening is my DHCPv6 requests come in fine, but the server
>> reports "no available addresses" even though I have what appears to be a
>> valid range of available addresses:
>>
>> dnsmasq-dhcp[746253]: 12629722 available DHCP range: 2001::::2
>> -- 2001::::
>> dnsmasq-dhcp[746253]: 12629722 client MAC address: 52:54:00:5c:f1:32
>> dnsmasq-dhcp[746253]: 12629722 DHCPSOLICIT(br1002)
>> 00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31
>> dnsmasq-dhcp[746253]: 12629722 DHCPADVERTISE(br1002)
>> 00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31 no addresses available
>> dnsmasq-dhcp[746253]: 12629722 tags: dhcpv6, br1002
>> dnsmasq-dhcp[746253]: 12629722 sent size: 14 option:  1 client-id 
>> 00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31
>> dnsmasq-dhcp[746253]: 12629722 sent size: 14 option:  2 server-id 
>> 00:01:00:01:23:83:8e:6b:52:54:00:14:c5:11
>> dnsmasq-dhcp[746253]: 12629722 sent size: 24 option: 13 status  2 no
>> addresses available
>> dnsmasq-dhcp[746253]: 626033 available DHCP range: 2001::::2 --
>> 2001::::
>> dnsmasq-dhcp[746253]: 626033 client MAC address: 52:54:00:5c:f1:32
>> dnsmasq-dhcp[746253]: 626033 DHCPREQUEST(br1002)
>> 00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31
>> dnsmasq-dhcp[746253]: 626033 DHCPREPLY(br1002)
>> 00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31 no addresses available
>> dnsmasq-dhcp[746253]: 626033 tags: dhcpv6, br1002
>> dnsmasq-dhcp[746253]: 626033 sent size: 14 option:  1 client-id 
>> 00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31
>> dnsmasq-dhcp[746253]: 626033 sent size: 14 option:  2 server-id 
>> 00:01:00:01:23:83:8e:6b:52:54:00:14:c5:11
>> dnsmasq-dhcp[746253]: 626033 sent size: 24 option: 13 status  2 no
>> addresses available
>> dnsmasq-dhcp[746253]: 626033 sent size: 16 option: 23 dns-server 
>> 2001::::1
>>
>> From my understanding of the man page and the older thread "Using IPv6
>> DHCP"
>> (http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2012q3/006306.html),
>> this should be all I need to get a stateful DHCPv6 configuration. I've
>> also tried every combination of options I can come up with in the
>> `dhcp-range` config without success. Even if I set `static` mode and use
>> a `dhcp-host` option for my test host, I get the exact same "no
>> addresses available" message.
>>
>> SLAAC works fine when I add `enable-ra`, and `ra-stateless` to
>> `dhcp-range`, but this configuration to hand out only IPv6 addresses
>> statefully never seems to work as described in that thread. The goal is
>> to have a fully stateful DHCPv6 server that IPv6-only clients can get
>> addresses from and, most importantly, update dnsmasq with their hostname
>> (hence why I'm not using SLAAC or `ra-stateless`). The very specific
>> binding config is due to me running a separate dnsmasq instance for each
>> of an arbitrary number of interfaces.
>>
>> Can anyone offer any advice on what I might be doing wrong here?
>>
>> Thanks,
>> Joshua M. Boni

[Dnsmasq-discuss] "no available addresses" with DHCPv6 stateful config

2018-11-17 Thread joshua

Hello list!

I'm running into an issue with a DHCPv6-only dnsmasq setup, on versions 
2.76 and 2.79 from Debian. I'm trying to set a DHCPv6 range and use the 
wide-dhcpv6-client to get my clients IPv6 addresses. Note that all IPv6 
addresses use a fake prefix for anonymity.


I run dnsmasq with the following command (embedded in another daemon 
normally, but run manually here for testing):


sudo /usr/sbin/dnsmasq \
  --bogus-priv \
  --no-hosts \
  --dhcp-authoritative \
  --filterwin2k \
  --expand-hosts \
  --domain=test \
  --local=/test/ \
  --log-facility=- \
  --log-dhcp \
  --keep-in-foreground \
  --bind-interfaces \
  --interface=br1002 \
  --except-interface=lo \
  --listen-address=2001::::1 \
  --dhcp-range=::2,::,constructor:br1002,24h

That `listen-address` is definitely bound to the server side:

6: br1002:  mtu 8800 qdisc noqueue 
state UP group default qlen 1000

link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet6 2001::::1/64 scope global
   valid_lft forever preferred_lft forever

What's happening is my DHCPv6 requests come in fine, but the server 
reports "no available addresses" even though I have what appears to be a 
valid range of available addresses:


dnsmasq-dhcp[746253]: 12629722 available DHCP range: 2001::::2 
-- 2001::::

dnsmasq-dhcp[746253]: 12629722 client MAC address: 52:54:00:5c:f1:32
dnsmasq-dhcp[746253]: 12629722 DHCPSOLICIT(br1002) 
00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31
dnsmasq-dhcp[746253]: 12629722 DHCPADVERTISE(br1002) 
00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31 no addresses available

dnsmasq-dhcp[746253]: 12629722 tags: dhcpv6, br1002
dnsmasq-dhcp[746253]: 12629722 sent size: 14 option:  1 client-id  
00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31
dnsmasq-dhcp[746253]: 12629722 sent size: 14 option:  2 server-id  
00:01:00:01:23:83:8e:6b:52:54:00:14:c5:11
dnsmasq-dhcp[746253]: 12629722 sent size: 24 option: 13 status  2 no 
addresses available
dnsmasq-dhcp[746253]: 626033 available DHCP range: 2001::::2 -- 
2001::::

dnsmasq-dhcp[746253]: 626033 client MAC address: 52:54:00:5c:f1:32
dnsmasq-dhcp[746253]: 626033 DHCPREQUEST(br1002) 
00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31
dnsmasq-dhcp[746253]: 626033 DHCPREPLY(br1002) 
00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31 no addresses available

dnsmasq-dhcp[746253]: 626033 tags: dhcpv6, br1002
dnsmasq-dhcp[746253]: 626033 sent size: 14 option:  1 client-id  
00:01:00:01:23:7e:62:3a:52:54:00:5c:f1:31
dnsmasq-dhcp[746253]: 626033 sent size: 14 option:  2 server-id  
00:01:00:01:23:83:8e:6b:52:54:00:14:c5:11
dnsmasq-dhcp[746253]: 626033 sent size: 24 option: 13 status  2 no 
addresses available
dnsmasq-dhcp[746253]: 626033 sent size: 16 option: 23 dns-server  
2001::::1


From my understanding of the man page and the older thread "Using IPv6 
DHCP" 
(http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2012q3/006306.html), 
this should be all I need to get a stateful DHCPv6 configuration. I've 
also tried every combination of options I can come up with in the 
`dhcp-range` config without success. Even if I set `static` mode and use 
a `dhcp-host` option for my test host, I get the exact same "no 
addresses available" message.


SLAAC works fine when I add `enable-ra`, and `ra-stateless` to 
`dhcp-range`, but this configuration to hand out only IPv6 addresses 
statefully never seems to work as described in that thread. The goal is 
to have a fully stateful DHCPv6 server that IPv6-only clients can get 
addresses from and, most importantly, update dnsmasq with their hostname 
(hence why I'm not using SLAAC or `ra-stateless`). The very specific 
binding config is due to me running a separate dnsmasq instance for each 
of an arbitrary number of interfaces.


Can anyone offer any advice on what I might be doing wrong here?

Thanks,
Joshua M. Boniface

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


[Dnsmasq-discuss] Largest DNSMasq deployment?

2013-09-17 Thread Joshua J. Kugler
I was having a discussion with a coworker about the (st)ability of DNSMasq, 
and I got to wondering how large a network DNSMasq could/does serve. I realize 
DNSMasq doesn't phone home with any stats, but are there any users on here 
that would be willing to share the size of large networks on which they use 
DNSMasq?  By large, I'm thinking at least 100, and going way up from there.

Tried googling with the usual keywords, but didn't find anything. Maybe my 
google fu is week.

j

-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com - Fairbanks, AK
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A

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


Re: [Dnsmasq-discuss] Lease Time Detail

2011-09-21 Thread Joshua J. Kugler
On Wednesday, September 21, 2011, richardvo...@gmail.com elucidated 
thus:
 Read the man page description for dhcp-script.  All the information
 you asked about is available there.  So dnsmasq does have it. 
 Anyway, the simple way is to write a dhcp-script that puts
 information in a database, that way you'll have records of expired
 leases, since dnsmasq removes them from its internal database.
 
 On Wed, Sep 21, 2011 at 6:53 AM, Pratik Kumawat kumawa...@yahoo.com 
wrote:
  DNSMASQ doesn't store the lease expiry interval, neither does it
  store the time at which the lease was offered to the client. So
  can anyone pls tell me how to get to know the details about the
  expired leases as well as the current leases and the time
  remaining to expire??

I'm pretty sure it stores the time the lease was offered in 
/var/lib/misc/dnsmasq.leases.

j

-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com - Fairbanks, AK
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A



Re: [Dnsmasq-discuss] Hosts list

2011-07-19 Thread Joshua Lamorie
I use lighttpd on the box running dnsmasq, and added the following to a
file in /etc/lighttpd/conf.d.

server.modules  += ( mod_alias )
alias.url += (/dnsmasq.leases = /var/lib/dnsmasq/dnsmasq.leases)


Then I access it with http://192.168.30.1/dnsmasq.leases.  You might
want to play around with mime-types to prevent it from being returned as
application/octet-stream.

Joshua

On Tue, 2011-07-19 at 10:15 -0300, Tomas Sironi wrote:
 This might be a silly question, but I'm wondering if there is any way
 to show all the leases dnsmasq provides with each hostname from a
 client. The host utility shows the hostname of a given ip, but I don't
 know if it can list every host in the network. This would be like
 showing the dnsmasq leases file, but from a host, not the server. Any
 suggestions?
 
 Thanks,
 
 -- 
 Tomas  Sironi
 
 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

-- 
Joshua Lamorie
Xiphos Technologies Inc.
 
Email: j...@xiphos.ca
Phone: +1 (514) 847-9474 ext. 227
Fax: +1 (514) 847-9474

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. If you have received this in error, please contact the sender
and delete this communication and any copy immediately. Thank you.




Re: [Dnsmasq-discuss] goto's to the middle of if's in tftp.c...

2007-02-01 Thread Joshua J. Kugler
On Thursday 01 February 2007 07:51, Simon Kelley wrote:
 Carlos Carvalho wrote:
  There are some goto's to the middle of if's and else's in tftp.c. Such
  jumps could perhaps be changed to a place less susceptible to
  confusion... Since it's a new piece of code it might still be open to
  small revisions. It may cost some extra if's but it won't make a
  difference in performance.

 If anyone can come up with a nicer solution, I'd be happy to take it,
 but I think that's a good use for gotos. The code identifies a couple of
 error conditions and the way to handle them, so it's obvious what's
 going on. When the same error conditions are encountered later, they are
 handled by gotos to the previously defined error handling code - it's a
 standard programming practise.

joking
I got a solution!! Rewrite the whole thing in C++ and use exceptions!  That's 
it!
/joking

Actually, now that I think about it, how ugly would it be to compile the C 
code with a C++ compiler and just use C++ features where they make sense 
(i.e. exceptions instead of goto's)?

j

-- 
Joshua Kugler   
Lead System Admin -- Senior Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0xDB26D7CE
PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111