FF DAT Metric Plugin

From OLSR.org Wiki
Jump to navigationJump to search

The FF DAT Metric Plugin is the default routing metric provided by the OLSR.org Network Framework. It combined the loss rate and the link bitrate into a cost value for links between routers.

Many 802.11 wifi implementations (including most Linux Mac80211 drivers) need unicast traffic to calculate a reliable linkspeed. When using the NL80211 Listener Plugin to query the Linux Kernel for the unicast datarate, you should also use the Neighbor Probing Plugin to make sure that there is enough unicast traffic for reliable data.

Metric calculation

The Freifunk/Funkfeuer Directional Airtime Metric uses the RFC5444 multicast UDP packets generated by NHDP and OLSRv2 to measure the incoming frame loss between routers.

The frame loss is collected in a ring buffer for a measurement period. The results are first discretized and filtered with a hysteresis in regular intervals to get a stable frame loss representation of the link. The plugin also collects the incoming unicast bitrate from the layer2 database and applies a median to stabilize this value.

The two values are then combined and scaled into a cost value proportional to the seconds/bit consumed by the incoming frames.

The scaling formula is cost = 2^31 / throughput with throughput measured in bits/s.

The details of the metric were published at the IETF Manet WG in RFC7779.


The plugin defines the ff_dat_metric configuration section with four settings.

Key Default Type Limits
interval 1.0 clock >=0.1
window 64 integer 2-65535
airtime true boolean
squared_loss false boolean

interval defines the time in seconds between two metric recalculations. This will add a new metric value to the sliding window.

window defines the size of the sliding window. The metric calculates an average over all entries of the sliding window.

airtime activates the linkspeed handling.

squared_loss activates a higher weight of the loss rate to the link metric.