[Olsr-dev] invalidate node links

Giovanni Di Stasi (spam-protected)
Wed Jan 25 16:23:47 CET 2012


Il 30/09/2011 11:01, Henning Rogge ha scritto:
> On Fri, 30 Sep 2011 10:49:53 Giovanni Di Stasi wrote:
>>   Hi everyone,
>>
>> I would like to receive some advices regarding an experiment we are
>> currently performing aboud channel assignment algorithms. The scenario is
>> multi-radio.
>>
>> The channel assignment algorithm (centralized) triggers at a certain point
>> the change of channels of most of the interfaces of nodes. It may happen
>> that a neighbor which was reachable through one interface, after the
>> change,  becomes reachable through another interface [1]. The experiment
>> we are doing shows an interruption of approximately one minute before the
>> TCP connections we had established are able to return to their full speed.
>> This is due (I noticed that by taking a look at the Olsrd logs) to the
>> time Olsrd needs to drop the old route (on the old interface) and use the
>> new one (on the new interface). We would like to speed up things a little
>> bit. The first attempt we think  to do is to reduce the Hello and TC
>> Intervals. This would speed up the change but will imply greater overhead.
>> First results however show no improvements. A different solution would be
>> to discard all the links departing from the interface of which we have
>> changed channel. If we change the channel of an interface, it means that
>> all the links departing from that interface are (probably) no longer good,
>> so it is good to drop them and start using new links (possibly just after
>> the first hello packet is seen, so to regain rapidly connectivity). Do you
>> agree on this solution?   If that's the case, how can I tell to Olsrd to
>> drop all the links from a certain interface?
> We have some "quick shotdown" feature for OLSR that uses something that might
> work for you. You can invalidate a link by sending a Hello with the
> corresponding connections marked as state "dropped".
>
> Look into main.c, line 725 to 735.
>
> olsr_reset_all_links() sets ALL links to state dropped (you need a version
> that only does this for a single link).
>
> olsr_shutdown_messages() sends out a hello and TC for all links (again you
> need a limited one).
>
Hi Henning,

I have followed your advice and come up with this initial solution ( 
please find the patch attached). I have two functions, one that sets the 
links as LOST (invalidate_links_interface) and the other that sends the 
HELLO and TC messages and remove the kernel routes.  I have in 
particular the following concerns:

1) is the internal state of olsrd going to be consistent after I modify 
the state of the links with the function olsr_reset_all_links_interface?
2) do I also need to call olsr_delete_all_kernel_routes  after the 
invalidation or olsr takes care automatically to replace the old routes 
with  it taken care automatically to replace the old kernel routes
3) do you think the sleeping time (usleep(1000000)) if sufficient to be 
sure that the HELLO and TC messages are sent ( after the usleep I call 
iwconfig to change channels) ?


Thanks a lot,
Giovanni
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: olsr-patch
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120125/d0eddcf0/attachment.ksh>


More information about the Olsr-dev mailing list