Hi,

> > But I found a problem, especially happening with mobile phones
> > (Android, Galaxy S3 in my case). When those go into sleep mode, they
> > no longer listen to router advertisements, so after waking up, their
> > address was already deprecated by the network stack and they have to
> > wait for a new RA coming in. Unfortunately this happens too seldom
> > (RA_INTERVAL is 600, means 10 minutes). They don't send any DHCP
> > requests anymore, because the IPv4 DHCP lease is still fine (I have a
> > lease time of 24 hrs for IPv4 leases, but 20 minutes for IPv6 lifetime
> > - because those are not really static - see below).
> >
> > Would it be possible to make the RA_INTERVAL configureable so I can
> > send RAs in a periodic manner like with radvd? I would like to send
> > RAs every 3 or 10 seconds like I had with radvd configured. This is
> > not possible without patching dnsmasq.
> 
> Regardless of the interest of making the RA period configurable, why doesn't
> the mobile phone send out a Router Solicitation when it wakes up from sleep
> mode?

That is a good question but for actually 2 android phones this is not done:
A Galaxy S3 (Android 4.1) and an older HTC Desire (Android 2.3) don't send 
Router Solicitations - those do not appear in logs.

I think the reason why this happens has to do with the power management. I am 
not sure if this is 100% correct: When you switch off the screen of an Android 
phone, the WIFI goes to some kind of power saving mode so it only wakes up 
sometimes to listen for something going in. Most of the time it is sleeping. 
Maybe it does not get the Router Adverts in this state, because its just not 
awake when the router send adverts. When you wake it up, the timeout of the 
lease (which needs to be short on my networks, for the reasons of updated 
prefix delegations by the provider) is already reached, so the IPv6 address ist 
lost. The phone have to wait until a new advert comes in - I have no idea why 
it does not send router solicitations in this case, but I don't expect this to 
be fixed, so reconfiguring dnsmasq to send adverts every 6 seconds works 
perfectly fine here - it only floods the logs, but maybe this can be prevented 
by syslog to filter duplicate message.

I patched the header file to have have RA_INTERVAL = 6 (was previously 600) and 
rebuilt the debian package. Now it works as expected. So my request here is 
just to make this configureable (maybe as param to "enable-ra"). Maybe also 
don't log *every* RA sent :-)

If the following would be fixed, too, I could raise the DHCPv6 lease times to 
much larger values, because the automatic deprecation of prefix change would 
help here):

> > A second thing related to RAs: I am living in Germany, where the
> > assigned prefix to local networks is not really static (for privacy
> > reasons), so it changes quite often (every 24hrs, enforced by DHCP
> > prefix delegation on the PPPoE interface). When the prefix changes,
> > dnsmasq should send (like radvd is doing) a zero lease time RA for the
> > old prefix. I found out that dnsmasq.conf can set "deprecated" as
> > life-time in the dhcp-range, but that would make all RAs going out
> > have a time of 0s. It would be good if dnsmasq would send "active"
> > prefixes with the given non-zero lifetime, but once a prefix
> > disappears from the network adaptor, send extra RAs do deprecate the
> > old prefix (using the old prefix with time=0) for a number of times.
> >
> > Uwe
> 
> Amicalement,
> --
> Albert.

Thanks,
Uwe


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

Reply via email to