[olsr-dev] Why are 1-hop routes with destination==gateway added
Andreas Tønnesen
(spam-protected)
Fri Jul 21 10:52:40 CEST 2006
Hmm.. it's been a long time since I messed with that code :-)
I think this was done for multi-homed nodes so that you would
add the address of the interface you could reach as the GW and
the IP of the other interface as dst.(I can't look at the code
right now)
Not a 100% sure though - and you are probably right that it is
not needed for "direct" links. But would it pose a problem in
any cases?
- Andreas
> Hi Andreas,
>
> Thanks for the quick response!
>
> I agree absolutely that, in general, the 1-hop neighbors should be added.
> But why add the routes with gateway being the same as the
> destination? Those destinations would have been reached anyway. Note: if
> gateway equals destination, that negihbor is already on the
> same subnet as we are.
>
> I removed the code adding specifically the 1-hop neighbors with gateway
> being the same as destination, and (as expected) all worked
> well. At least, in my humble test setup. Maybe you know of a test setup in
> which it would go wrong?
>
> Erik
>
>
> ----- Original Message -----
> From: "Andreas Tønnesen" <(spam-protected)>
> To: "OLSR development" <(spam-protected)>
> Sent: Friday, July 21, 2006 9:50 AM
> Subject: Re: [olsr-dev] Why are 1-hop routes with destination==gateway
> added
>
>
>>
>> Hi Erik,
>>
>> All routers need not be on the same subnet in a MANET.
>> Therefore it is absolutley nessecarry to add 1-hop neighbors to the
>> routing table - or all other route going via this neighbor will also
>> fail(if the negihbor is not on the same subnet as we are).
>>
>> - Andreas
>>
>> > Hi all,
>> >
>> > I have a small (maybe stupid) question.
>> >
>> > In the function olsr_add_routes_in_kernel, there is special code that
>> adds
>> > 1-hop routes to destinations, the gateway being the
>> > destination itself. These routes are consequently added first (and
>> deleted
>> > last in the function olsr_delete_routes_from_kernel).
>> >
>> > My question is: why are these routes added at all? Since these are
>> 1-hop
>> > neighbors, these destinations would have been reached
>> > anyway, because the network routes to all connected networks are
>> already
>> > in the routing table by default.
>> >
>> > Erik
>> >
>> >
>> > _______________________________________________
>> > olsr-dev mailing list
>> > (spam-protected)
>> > https://www.olsr.org/mailman/listinfo/olsr-dev
>> >
>>
>>
>>
>> _______________________________________________
>> olsr-dev mailing list
>> (spam-protected)
>> https://www.olsr.org/mailman/listinfo/olsr-dev
>>
>
> _______________________________________________
> olsr-dev mailing list
> (spam-protected)
> https://www.olsr.org/mailman/listinfo/olsr-dev
>
More information about the Olsr-dev
mailing list