Re: [Dnsmasq-discuss] dnsmasq lease file not updating properly

2016-06-16 Thread Sachin Garg
Hi,

My dnsmasq.conf contains the following. Even though SLAAC is enabled,
the hosts that are supposed to get static DHCPv6 leases get them as
configured. I also do not have the IPv6 line that you have. I am using
the "constructor:" for it to pick up the prefix.

> # IPv6
> dhcp-range=lan,::F000:,:::, constructor:br-lan, slaac, 64, 12h
> enable-ra
> 
> # Static DHCPv6 IP addresses
> dhcp-host=,,,[::dead:beef]

>From the manual
(http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html):

> slaac tells dnsmasq to offer Router Advertisement on this subnet and 
> to set the A bit in the router advertisement, so that the client
> will use SLAAC addresses. When used with a DHCP range or static DHCP 
> address this results in the client having both a DHCP-assigned and a 
> SLAAC address.

Further down:

> ra-names enables a mode which gives DNS names to dual-stack hosts
> which do SLAAC for IPv6. Dnsmasq uses the host's IPv4 lease to derive
> the name, network segment and MAC address and assumes that the host
> will also have an IPv6 address calculated using the SLAAC algorithm,
> on the same network segment. The address is pinged, and if a reply is
> received, an  record is added to the DNS for this IPv6 address.
> Note that this is only happens for directly-connected networks, (not
> one doing DHCP via a relay) and it will not work if a host is using
> privacy extensions. ra-names can be combined with ra-stateless and
> slaac.

(I will be testing this now and will report back)

However, it works only when MAC id is provided, not with DUID. (I think
this is because I was unable to get a cross-platform way to get the DUIDs).

Another thing to note is that *not* all devices are capable of
requesting and accepting an IPv6 address via DHCPv6. Most notably
Android. See the following:

https://code.google.com/p/android/issues/detail?id=32621

A workaround that is this:
https://play.google.com/store/apps/details?id=org.daduke.realmar.dhcpv6client


However, sadly that seems to work (for me) only when manually initialised.

So, is it a possibility that you are only testing your config with
Android machines?

Hope this helps. Off-topic: I am assuming that you are in India.
Wondering how you are getting IPv6 connectivity?

Best,
Sachin

On Wednesday 25 May 2016 09:47 AM, Gopi Krishna M wrote:
> Hi All,
> 
> I have been using dnsmasq 2.70 vesrion as dhcp server for ipv4 and 
> ipv6. My lease file is not getting updated properly when running 
> dnsmasq. It is updating properly for ipv4  but not correct for ipv6.
> 
> #cat /etc/dnsmasq_new.leases 2082886681 00:80:48:4b:83:12 
> 192.168.10.161 host-mysy * duid 
> 00:01:00:01:43:b8:34:78:00:80:a3:a0:bb:38 2082843195 1212908306 
> *18:2001:2002:2003:: ** 00:01:00:01:00:80:10:7e:ea:09
> 
> It is marked as above and its actual lease ip is 
> *2001:2002:2003::10a* but its not showing. Meanwhile even if we 
> connect multiple clients then the same *18:2001:2002:2003:: *is 
> getting repeated. Meanwhile it is not showing the proper mac also.
> 
> for your kind ref:
> 
> config file # cat /etc/dnsmasq_gateway.conf interface=lan0 
> except-interface=lo bind-interfaces dhcp-range=192.168.10.20, 
> 192.168.10.254, 14h dhcp-range=2001:2002:2003::105, 
> 2001:2002:2003::110, 64, 14h enable-ra
> 
> Interface IP: 192.168.10.1 IPv6: 2001:2002:2003::100
> 
> running as *dnsmasq -C /etc/dnsmasq_gateway.conf -l 
> /etc/dnsmasq_new.leases
> 
> 
> * Please tell your suggestions.
> 
> Note: Clients are getting IPv4 and IPv6 properly. Everything is fine
>  apart from updating the lease file. Compiled for ARM(linux 3.10)
> 
> Thanks in advance.
> 
> Regards, Gopi krishna M 
> ___ 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] dnsmasq lease file not updating properly

2016-05-26 Thread Albert ARIBAUD
Hello,

Le Thu, 26 May 2016 19:27:33 +0530
Gopi Krishna M  a écrit:

> Hi Albert,
> 
> Thanks for your suggestion.
> 
> I believe it is not in the slaac mode and in dhcpv6 only.
> 
> I confirmed with below things.
> 
> 1) Router advertise, solicit, request things are happening while every
> client getting connected.
> 2) The bit Managed address configuration is set. Checked through
> wireshark. It will be set
> in DHCPv6 only and not for slaac.
> 
> If you believe still it is in slaac mode, Please tell the config
> changes to make
> dnsmasq run as a dhcpv6 server.

OK, so this confirms you're indeed not using SLAAC and are indeed using
DHCPv6. Sorr then, I have no other idea why the leases file does not
mention the DHCPv6 lease -- and no idea if it should, actually.

> Thanks,
> Gopi krishna M

Amicalement,
-- 
Albert.

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


Re: [Dnsmasq-discuss] dnsmasq lease file not updating properly

2016-05-26 Thread Gopi Krishna M
Hi,

Thanks for your time albert. I will try to look into that.

Thanks,
Gopi krishna M

On Thu, May 26, 2016 at 10:19 PM, Albert ARIBAUD 
wrote:

> Hello,
>
> Le Thu, 26 May 2016 19:27:33 +0530
> Gopi Krishna M  a écrit:
>
> > Hi Albert,
> >
> > Thanks for your suggestion.
> >
> > I believe it is not in the slaac mode and in dhcpv6 only.
> >
> > I confirmed with below things.
> >
> > 1) Router advertise, solicit, request things are happening while every
> > client getting connected.
> > 2) The bit Managed address configuration is set. Checked through
> > wireshark. It will be set
> > in DHCPv6 only and not for slaac.
> >
> > If you believe still it is in slaac mode, Please tell the config
> > changes to make
> > dnsmasq run as a dhcpv6 server.
>
> OK, so this confirms you're indeed not using SLAAC and are indeed using
> DHCPv6. Sorr then, I have no other idea why the leases file does not
> mention the DHCPv6 lease -- and no idea if it should, actually.
>
> > Thanks,
> > Gopi krishna M
>
> Amicalement,
> --
> Albert.
>

-- 


DISCLAIMER

The information in this e-mail is confidential and may be subject to legal 
privilege. It is intended solely for the addressee. Access to this e-mail 
by anyone else is unauthorized. If you have received this communication in 
error, please address with the subject heading "Received in error," send to 
i...@msystechnologies.com,  then delete the e-mail and destroy any copies of 
it. If you are not the intended recipient, any disclosure, copying, 
distribution or any action taken or omitted to be taken in reliance on it, 
is prohibited and may be unlawful. The views, opinions, conclusions and 
other information expressed in this electronic mail and any attachments are 
not given or endorsed by the company unless otherwise indicated by an 
authorized representative independent of this message.
MSys cannot guarantee that e-mail communications are secure or error-free, 
as information could be intercepted, corrupted, amended, lost, destroyed, 
arrive late or incomplete, or contain viruses, though all reasonable 
precautions have been taken to ensure no viruses are present in this e-mail. 
As our company cannot accept responsibility for any loss or damage arising 
from the use of this e-mail or attachments we recommend that you subject 
these to your virus checking procedures prior to use
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq lease file not updating properly

2016-05-26 Thread Gopi Krishna M
Hi Albert,

Thanks for your suggestion.

I believe it is not in the slaac mode and in dhcpv6 only.

I confirmed with below things.

1) Router advertise, solicit, request things are happening while every
client getting connected.
2) The bit Managed address configuration is set. Checked through wireshark.
It will be set
in DHCPv6 only and not for slaac.

If you believe still it is in slaac mode, Please tell the config changes to
make
dnsmasq run as a dhcpv6 server.

Thanks,
Gopi krishna M


On Wed, May 25, 2016 at 8:20 PM, Albert ARIBAUD 
wrote:

> Hi,
>
> Le Wed, 25 May 2016 19:17:31 +0530
> Gopi Krishna M  a écrit:
>
> > Hi All,
> >
> > I have been using dnsmasq 2.70 vesrion as dhcp server for ipv4 and
> > ipv6. My lease file is not getting updated properly when
> > running dnsmasq. It is updating properly for ipv4  but not correct
> > for ipv6.
> >
> >  #cat /etc/dnsmasq_new.leases
> > 2082886681 00:80:48:4b:83:12 192.168.10.161 host-mysy *
> > duid 00:01:00:01:43:b8:34:78:00:80:a3:a0:bb:38
> > 2082843195 1212908306 *18:2001:2002:2003:: **
> > 00:01:00:01:00:80:10:7e:ea:09
> >
> > It is marked as above and its actual lease ip is
> > *2001:2002:2003::10a* but its not showing. Meanwhile even if we
> > connect multiple clients then the same *18:2001:2002:2003:: *is
> > getting repeated. Meanwhile it is not showing the
> > proper mac also.
> >
> > for your kind ref:
> >
> > config file
> > # cat /etc/dnsmasq_gateway.conf
> > interface=lan0
> > except-interface=lo
> > bind-interfaces
> > dhcp-range=192.168.10.20, 192.168.10.254, 14h
> > dhcp-range=2001:2002:2003::105, 2001:2002:2003::110, 64, 14h
> > enable-ra
> >
> > Interface IP: 192.168.10.1
> > IPv6: 2001:2002:2003::100
> >
> > running as
> >
> >
> > *dnsmasq -C /etc/dnsmasq_gateway.conf -l /etc/dnsmasq_new.leases*
> > Please tell your suggestions.
> >
> > Note: Clients are getting IPv4 and IPv6 properly. Everything is fine
> > apart from updating the lease file. Compiled for ARM(linux 3.10)
> >
> > Thanks in advance.
> >
> > Regards,
> > Gopi krishna M
>
> (anyone feel free to correct me if I got the following wrong)
>
> You are using SLAAC for IPv6 configuration. In this mode, it is the
> client, not the DHCP server, which selects its own IPv6.
>
> Therefore there are no actual IPv6 leases: dnsmasq just informs the
> client about the /64 subnet under which the client, not dnsmasq, shall
> select its address; the client does not inform dnsmasq back.
>
> This is /probably/ why the actual address does not show up in the lease
> file.
>
> If you want dnsmasq to control which address the client receives (and
> possibly log this in the lease file) then you should use DHCPv6 rather
> than SLAAC.
>
> Amicalement,
> --
> Albert.
>

-- 


DISCLAIMER

The information in this e-mail is confidential and may be subject to legal 
privilege. It is intended solely for the addressee. Access to this e-mail 
by anyone else is unauthorized. If you have received this communication in 
error, please address with the subject heading "Received in error," send to 
i...@msystechnologies.com,  then delete the e-mail and destroy any copies of 
it. If you are not the intended recipient, any disclosure, copying, 
distribution or any action taken or omitted to be taken in reliance on it, 
is prohibited and may be unlawful. The views, opinions, conclusions and 
other information expressed in this electronic mail and any attachments are 
not given or endorsed by the company unless otherwise indicated by an 
authorized representative independent of this message.
MSys cannot guarantee that e-mail communications are secure or error-free, 
as information could be intercepted, corrupted, amended, lost, destroyed, 
arrive late or incomplete, or contain viruses, though all reasonable 
precautions have been taken to ensure no viruses are present in this e-mail. 
As our company cannot accept responsibility for any loss or damage arising 
from the use of this e-mail or attachments we recommend that you subject 
these to your virus checking procedures prior to use
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq lease file not updating properly

2016-05-25 Thread Albert ARIBAUD
Hi,

Le Wed, 25 May 2016 19:17:31 +0530
Gopi Krishna M  a écrit:

> Hi All,
> 
> I have been using dnsmasq 2.70 vesrion as dhcp server for ipv4 and
> ipv6. My lease file is not getting updated properly when
> running dnsmasq. It is updating properly for ipv4  but not correct
> for ipv6.
> 
>  #cat /etc/dnsmasq_new.leases
> 2082886681 00:80:48:4b:83:12 192.168.10.161 host-mysy *
> duid 00:01:00:01:43:b8:34:78:00:80:a3:a0:bb:38
> 2082843195 1212908306 *18:2001:2002:2003:: **
> 00:01:00:01:00:80:10:7e:ea:09
> 
> It is marked as above and its actual lease ip is
> *2001:2002:2003::10a* but its not showing. Meanwhile even if we
> connect multiple clients then the same *18:2001:2002:2003:: *is
> getting repeated. Meanwhile it is not showing the
> proper mac also.
> 
> for your kind ref:
> 
> config file
> # cat /etc/dnsmasq_gateway.conf
> interface=lan0
> except-interface=lo
> bind-interfaces
> dhcp-range=192.168.10.20, 192.168.10.254, 14h
> dhcp-range=2001:2002:2003::105, 2001:2002:2003::110, 64, 14h
> enable-ra
> 
> Interface IP: 192.168.10.1
> IPv6: 2001:2002:2003::100
> 
> running as
> 
> 
> *dnsmasq -C /etc/dnsmasq_gateway.conf -l /etc/dnsmasq_new.leases*
> Please tell your suggestions.
> 
> Note: Clients are getting IPv4 and IPv6 properly. Everything is fine
> apart from updating the lease file. Compiled for ARM(linux 3.10)
> 
> Thanks in advance.
> 
> Regards,
> Gopi krishna M

(anyone feel free to correct me if I got the following wrong)

You are using SLAAC for IPv6 configuration. In this mode, it is the
client, not the DHCP server, which selects its own IPv6.

Therefore there are no actual IPv6 leases: dnsmasq just informs the
client about the /64 subnet under which the client, not dnsmasq, shall
select its address; the client does not inform dnsmasq back.

This is /probably/ why the actual address does not show up in the lease
file.

If you want dnsmasq to control which address the client receives (and
possibly log this in the lease file) then you should use DHCPv6 rather
than SLAAC.

Amicalement,
-- 
Albert.

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


[Dnsmasq-discuss] dnsmasq lease file not updating properly

2016-05-25 Thread Gopi Krishna M
Hi All,

I have been using dnsmasq 2.70 vesrion as dhcp server for ipv4 and ipv6. My
lease file is not getting updated properly when
running dnsmasq. It is updating properly for ipv4  but not correct for ipv6.

 #cat /etc/dnsmasq_new.leases
2082886681 00:80:48:4b:83:12 192.168.10.161 host-mysy *
duid 00:01:00:01:43:b8:34:78:00:80:a3:a0:bb:38
2082843195 1212908306 *18:2001:2002:2003:: ** 00:01:00:01:00:80:10:7e:ea:09

It is marked as above and its actual lease ip is *2001:2002:2003::10a* but
its not showing. Meanwhile even if we
connect multiple clients then the same *18:2001:2002:2003:: *is getting
repeated. Meanwhile it is not showing the
proper mac also.

for your kind ref:

config file
# cat /etc/dnsmasq_gateway.conf
interface=lan0
except-interface=lo
bind-interfaces
dhcp-range=192.168.10.20, 192.168.10.254, 14h
dhcp-range=2001:2002:2003::105, 2001:2002:2003::110, 64, 14h
enable-ra

Interface IP: 192.168.10.1
IPv6: 2001:2002:2003::100

running as


*dnsmasq -C /etc/dnsmasq_gateway.conf -l /etc/dnsmasq_new.leases*
Please tell your suggestions.

Note: Clients are getting IPv4 and IPv6 properly. Everything is fine apart
from updating the lease file. Compiled for ARM(linux 3.10)

Thanks in advance.

Regards,
Gopi krishna M

-- 


DISCLAIMER

The information in this e-mail is confidential and may be subject to legal 
privilege. It is intended solely for the addressee. Access to this e-mail 
by anyone else is unauthorized. If you have received this communication in 
error, please address with the subject heading "Received in error," send to 
i...@msystechnologies.com,  then delete the e-mail and destroy any copies of 
it. If you are not the intended recipient, any disclosure, copying, 
distribution or any action taken or omitted to be taken in reliance on it, 
is prohibited and may be unlawful. The views, opinions, conclusions and 
other information expressed in this electronic mail and any attachments are 
not given or endorsed by the company unless otherwise indicated by an 
authorized representative independent of this message.
MSys cannot guarantee that e-mail communications are secure or error-free, 
as information could be intercepted, corrupted, amended, lost, destroyed, 
arrive late or incomplete, or contain viruses, though all reasonable 
precautions have been taken to ensure no viruses are present in this e-mail. 
As our company cannot accept responsibility for any loss or damage arising 
from the use of this e-mail or attachments we recommend that you subject 
these to your virus checking procedures prior to use
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss