Re: [B.A.T.M.A.N.] Suggestion for routing improvement on poor links

Antonio Quartulli
2014-02-20T09:44:37Z

[-- Attachment #1: Type: text/plain, Size: 2584 bytes --]

On 20/02/14 10:09, Andrew Lunn wrote:
> On Thu, Feb 20, 2014 at 10:03:01AM +0100, Antonio Quartulli wrote:
>> On 20/02/14 09:54, Andrew Lunn wrote:
>>> The routing protocol is known to have problems when a node suddenly
>>> disappears. A received OGM is what triggers updates to the metric. If
>>> you stop receiving OGMs the metric is no longer updated until the node
>>> is purged as dead. This for example causes problems with
>>> nomadic/mobile nodes. They can go around a corner, loss line of sight,
>>> but still be considered the best route until purged as dead.
>>
>> But if you keep receiving OGMs via another neighbour you will have a
>> route switch *before* the old nexthop is considered as dead.
>
> Hi Antonio

Hi Andrew,

>
> That is not what i have seen in practice. Because the metric is good,
> and does not degrade,

The missing degradation is the part where I don't agree.

Just to be sure we are understanding each other, I am talking about the
scenario depicted in this picture:

http://www.open-mesh.org/attachments/download/52/triangle.png

'A' is the source node and 'B' is our destination. B moves and breaks
the line-of-sight with A, thus making the A<->B link unusable at all (we
assume that now packet loss on A<->B is 100%).

At this point A still receives B's OGMs via N1.

According to batadv_iv_ogm_orig_update() (in bat_iv_ogm.c) each time a
packet with a _new_seqno_ is received the global window of _each_
neighbour for the given originator is shifted by one slot and the
averages are computed again.

This operation makes the average degrade because we are now averaging
N-1 old values and one 0 (with N being the size of the global window).
On the next OGM it will be worse: average on N-2 values and two 0s. And
so on..

Doesn't this mean that the metric is degrading (consider that the metric
is the average)?

Later in the same function, after having shifted all the windows and
recomputed all the averages, batman-adv checks if the route switch can
now happen:

1076 if (router_ifinfo->bat_iv.tq_avg > neigh_ifinfo->bat_iv.tq_avg)

(tq_avg of the current router is compared to tq_avg of the neighbour
from which we have received the OGM)

At some point this condition will evaluate to false.

> it stays as the best route. That is one of the
> reasons Linus developed NDP while at Ascom.
>

Of course the current mechanism is far from being "fast", therefore we
all wait for NDP/ELP to make the whole thing much more responsive :-)

Cheers,

--
Antonio Quartulli

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]