[Dnsmasq-discuss] gatway

Simon Kelley simon at thekelleys.org.uk
Thu Oct 10 12:05:54 BST 2013


On 08/10/13 12:09, Vladislav Grishenko wrote:
>> From: Simon Kelley
>> Sent: Tuesday, October 08, 2013 4:20 PM
>> On 06/10/13 11:32, Vladislav Grishenko wrote:
>>> Hi, RFC4861 says:
>>>
>>>      A router might want to send Router Advertisements without
> advertising
>>>      itself as a default router.  For instance, a router might advertise
>>>      prefixes for stateless address autoconfiguration while not wishing
> to
>>>      forward packets.  Such a router sets the Router Lifetime field in
>>>      outgoing advertisements to zero.
>>>
>>>>> is it possible to tell dnsmasq not to announce itself as router?
>>> So , yes, it's theoretically possible.
>>
>> That's good information, thanks. In answer to the next question, no, it's
> not
>> possible to configure dnsmasq to send Router Lifetime == 0.
>>
>> The lifetime, in dhcp-range is used to calculate the lifetimes for
> prefixes, no
>> the router lifetime. In fact the router lifetime is always advertised as
> 1800
>> seconds, I think.
>>
>> Since this is a per-broadcast domain thing, and not per prefix thing, it
> needs
>> to be associated with an interface.
>>
>> Simplest would be
>>
>> no-router-interface=<interface>[,<interface>,....]
>>
>> to set the interfaces that get router lifetime of zero.
>>
>> More complex would be to allow explict setting of the router lifetime per
>> interface, that would have to be linked to the RA frequency: you wouldn't
>> want a router expiring before it could be re-advertised.
>>
>
> No-router-interface is simplest, and adds more option to control RA.
> Currently we have already:
> --dhcp-range=...ra-only|slaac|ra-names...
> --enable-ra
> --force-fast-ra
>
> What if to logically split options to dhcp*-related and to slaac-related?
> --dhcp-range=
> Sets only DHCP range/RA prefix parameters (including
> lease/prefix/rdnss/domain lifetimes), but not RA timeouts
>
> --enable-ra=<interface>[,<interface>,...][,AdvDefaultLifetime][,MinRtrAdvInt
> erval,MaxRtrAdvInterval]
> Sets only RA timouts, if params absent - use defaults, 600 as max, 1/3*600
> as min.
> With this, both min&  max can be configured,
> As per RFC,
> 	max should be in range 4-1800 secodns, default 600
> 	min should be in range 3-3/4*max, default 1/3*max, if max>=9,
> otherwise equal to max
>
> With this approach, --no-router-interface will be alias of
> --enable-ra=interface,0
> And --force-fast-ra will be an alias of --enable-ra=interface,1800,5,20
>
> Also, current code uses 600 as max, and 3/4*max as min ra intervals, what
> fits RFC, bit, guessб isn't optimal, too big min delay.
> As for startup advertisements and force-fast-ra, interval is 5-20, but can
> be limited to range MIN_DELAY_BETWEEN_RAS-MAX_INITIAL_RTR_ADVERT_INTERVAL, 3
> and 16 respectively as RFC suggests
> Since RA can be very frequent, is it ever worth to log with LOG_INFO level
> every unsolicited RTR-ADVERT? It just floods syslog and has no other meaning
> in my opinion.
>
> Best Regards, Vladislav Grishenko
>
>
>

There are some good ideas here. I don't want to extend enable-ra, since 
it has specific meaning (send RA with SLAAC bits off on every subnet 
where we do DHCP) It's quite possible to have RA without using enable-ra 
is you configure it on a particular  dhcp-range.

Having a per-interface RA parameter is good, and should be done before 
releasing 2.67, since force-fast-ra has never been in a stable release 
and could be forgotten....

I also rather like Kevin's quite-* options.


Cheers,

Simon.




More information about the Dnsmasq-discuss mailing list