[olsr-dev] Olsr quality extensions metric

Thomas Lopatic (spam-protected)
Thu Feb 9 01:16:12 CET 2006


Hi Dries.

> In process_package.c the following can be found:
> 
>                      // path link quality = link quality between us
>                      // and our one-hop neighbor x link quality between
>                      // our one-hop neighbor and the two-hop neighbor
> 
>                      // let's compare this to ETX:
> 
>                      // 1 / LQ1 + 1 / LQ2 < 1 / LQ3 + 1 / LQ4 <=>
>                      // LQ1 * LQ2 > LQ3 * LQ4
> 
>                      // so comparing path link quality values with ">" is
>                      // equivalent to comparing ETX values with "<"
> 
> Can someone explain this? Why can this be stated? Is this true in all
> cases?

Well, this is a relic from when we migrated from the initial metric
based on our links' packet loss to ETX. I was a little lazy and
therefore, internally, we still use packet loss at some places, based on
the above conjecture, and use ETX mostly for Dijkstra.

I never verified this mathematically, but my intuition was that a first
two-hop path with a better link quality than a second two-hop path has a
lower ETX than the second two-hop path.

I've just checked this numerically and my intuition seems to have been
wrong for about 2% of all cases. One such failure is, for example, LQ1 =
0.1, LQ2 = 0.5, LQ3 = 0.2, and LQ4 = 0.2. There we have:

  1 / LQ1 + 1 / LQ2 = 10 + 2 = 12
  1 / LQ3 + 1 / LQ4 = 5 + 5 = 10

  LQ1 * LQ2 = 0.05
  LQ3 * LQ4 = 0.04

Interesting. But I still don't get it. Why does the link with the higher
total packet loss have the better ETX? And, while we are at it, if the
probability that a packet goes through is 0.05 for a two-hop path, why
isn't the path ETX = 20, i.e. why is a two-hop path different from a
one-hop path, where ETX = 1 / LQ? Any Bernoulli Trial wizards in here?

Well, anyway, I'll add "use ETX everywhere" to my to-do list.

Thanks for pointing this out, Dries.

-Thomas




More information about the Olsr-dev mailing list