Packet Sequence Number based ETX Metric for Mobile Ad Hoc Networks
Fraunhofer FKIE
ietf@hrogge.de
INRIA
Emmanuel.Baccelli@inria.fr
http://www.emmanuelbaccelli.org/
Cert.at/NIC.at, Internet Verwaltungs- und Betriebsgesellschaft m.b.H.
aaron@lo-res.org
http://cert.at/
Routing Area
MANET
metric
ad hoc network
MANET
routing
IP networks
OLSR
ETX
Funkfeuer
This document specifies the ETX metric and its usage in OLSRv2.
The Funkfeuer and Freifunk networks are OLSR-based wireless community networks with hundreds of routers in permanent operation. The Vienna Funkfeuer network in Austria consists of 400 routers, around 600 routes, covering the whole city of Vienna and beyond spanning roughly 40km in diameter. It has been in operation since 2003 and supplies it's users with Internet access. The Funkfeuer network is special in a respect that it manages to provide Internet access through a city wide, large scale Wi-Fi mesh cloud, having just one single uplink
Operational experience with these network has revealed that the use of hop-count as routing metric leads to unsatisfactory network performance (especially if going through a single uplink). Experiments with the ETX metric were therefore undertaken in parallel in the Berlin Freifunk network as well as the Funkfeuer network and found satisfactory. This metric is in operational use in these networks for a couple of years. Even though a couple of other metrics have been proposed and asked for by the community in the Funkfeuer network, ETX proved a very easy to implement metric which provides sufficiently good results.
The ETX metric of a link is the estimated number of transmissions required to successfully send a packet (each packet smaller than MTU) over that link, until an acknowledgement is received. The ETX metric is additive, i.e. the ETX metric of a path is the sum of the ETX metrics for each link on this path.
This document describes the ETX metric as used by the Funkfeuer network, and specifies its usage in OLSRv2 . More precisely, this document specifies additional signaling and processing to NHDP in order to establish the ETX metric value for a link.
In order to use the ETX metric for routers, this document assumes that the suggestions in are incorporated into .
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT','SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document are to be interpreted as described in.
The terminology introduced in , , , and , including the terms "packet", "message", "Address Block", "TLV Block","TLV", "address", "address prefix", and "address object" are to be interpreted as described therein.
Additionally, this document uses the following terminology and notational conventions:
- a last in, first out queue of numbers.
- the most recent entry added to the queue.
- an operation which removes the oldest entry in the queue and place a new entry at the head of the queue.
- an operation which returns the sum of all elements in a LIFO.
- an operation which returns the positive distance between two elements of the circular sequence number space defined in . Its value is either (new - old) if this result is positive, or else its value is (new - old + 65536).
- a constant for -1.
The mechanism specified in this document is used daily by hundreds of routers in the Funkfeuer network , as well as in similar OLSR-based wireless community networks which use the OLSR.org code base, such as , , , , . Operational experience suggests that this mechanism is viable in (at least) these kinds of networks.
The ETX metric value of a link is established by measuring the rate of successful exchange of OLSRv2 control packets over that link, which use the format defined in . ETX metric computation is thus based only on layer 3 signaling, and is therefore independent from underlying link layer technologies. Moreover, ETX metric computation does not require inspection of data traffic.
If a neighbor does not add use this ETX metric, this protocol falls back to DEFAULT_METRIC as defined in .
Router A computes the value of the ETX metric of its link to router B by continuously estimating the loss rates over this link, in both directions: from B to A (this rate is called R_etx), and from A to B (this rate is called D_etx). Router A computes R_etx as the measured proportion of packets successfully arriving from B, and signals this value in NHDP HELLO messages by inclusion of a R_etx TLV. Symmetrically, router B computes the proportion of packets successfully arriving from A, and signals its value in NDHP HELLO messages by inclusion of a R_etx TLV, which router A can then take as D_etx value for this link.
The value of the ETX metric of the link is then ETX = R_etx * D_etx, which corresponds to the expected number of attempts to successfully receive and acknowledge a packet over this link. Note that this metric is symmetric, i.e. on a link connecting router A and router B, the ETX metric value for this link computed by router B will be the same as the ETX metric value computed by router A.
This specification extends the Link Set per Interface Information Base, as defined in , with the following additional elements for each link tuple:
- a LIFO queue with ETX_MEMORY_LENGTH integer elements. Each entry contains the number of successfully received packets within an interval of ETX_METRIC_INTERVAL.
- a LIFO queue with ETX_MEMORY_LENGTH integer elements. Each entry contains the estimated number of packets transmitted by the neighbor, based on the received packet sequence numbers within an interval of ETX_METRIC_INTERVAL.
- the last received packet sequence number received from this link.
- the current r_etx value for this link to the neighbor.
- the last d_etx value received from the neighbor for this link.
- time when the next hello will be expected. This is used to detect missing hellos by timeout.
- the interval between two hello messages of the links neighbor.
- the estimated number of lost hello messages from this neighbor, based on the value of the hello interval.
When generating a new tuple in the Link Set, the values of the elements specified above are set as follows:
L_METRIC_received_lifo := 0, ..., 0.
L_METRIC_total_lifo := 0, ..., 0.
L_METRIC_last_pkt_seqno := UNDEFINED.
L_METRIC_r_etx := UNDEFINED.
L_METRIC_d_etx := UNDEFINED.
L_METRIC_hello_time := EXPIRED.
L_METRIC_hello_interval := UNDEFINED.
L_METRIC_lost_hellos := 0
This specification uses the parameters defined in . This specification defines the following additional parameters:
- ETX algorithm memory length in seconds. All received and lost packets within this time period are used to calculate the delivery ratio R_etx.
- interval in seconds between two metric recalculations as described in .
- threshold in number of missing packets (based on received packet sequence numbers) at which point the router considers the neighbor has restarted.
- timeout factor for HELLO interval at which point a HELLO is definitely considered lost. The value should be between 1.0 and (2.0 * (1 - HT_MAXJITTER/HELLO_INTERVAL)).
- metric value for ETX 1.0.
Generated packets and messages use the format defined in . The present specification adds the following constraints:
A packet MUST contain a packet sequence number as defined in . This sequence number MUST be interface specific.
HELLO messages are generated as specified in . In addition, the HELLO messages must comply with the following:
For each address included in a HELLO message with a TLV with type LINK_STATUS and value SYMMETRIC or HEARD, a TLV of type R_etx MUST also be included.
R_etx TLV formatting is specified in , whereby the value of the directional link cost is encoded as TimeTLV encoded values with C = 1024.
Type
Value Length
Value
R_etx
1 octet
linkcost
The value of the linkcost field of an R_etx TLV in a HELLO message is set to the L_METRIC_r_etx value of the corresponding link listed in this HELLO message.
HELLO messages are first processed as specified in . This processing includes identifying (or creating) a Neighbor Tuple corresponding to the originator of the HELLO message (the "current Neighbor Tuple"). After this, the following MUST be performed:
If the IP address of this link local interface is included in the HELLO address block and the address block contains an R_etx address TLV, then:
L_METRIC_d_etx := R_etx.
Otherwise:
L_METRIC_d_etx := UNDEFINED.
If the HELLO message contains an INTERVAL_TIME TLV, then:
L_METRIC_hello_interval := INTERVAL_TIME.
If L_METRIC_hello_interval != UNDEFINED, then:
L_METRIC_hello_time := current_time + ETX_HELLO_TIMEOUT_FACTOR * INTERVAL_TIME.
L_METRIC_lost_hellos := 0.
Each incoming packet is processed as defined in OLSRv2 . Furthermore, the following additional processing MUST be carried out after the package has been processed on the link set tuple corresponding to the source of the packet:
If L_METRIC_last_pkt_seqno = UNDEFINED, then:
L_METRIC_received_lifo[current] := 1.
L_METRIC_total_lifo[current] := 1.
Otherwise:
L_METRIC_received_lifo[current] := L_METRIC_received_lifo[current] + 1.
diff := seq_diff(seqno, L_METRIC_last_pkt_seqno).
If diff > ETX_SEQNO_RESTART_DETECTION, then:
diff := 1.
L_METRIC_total_lifo[current] := L_METRIC_total_lifo[current] + diff.
L_METRIC_last_pkt_seqno := seqno.
When L_METRIC_hello_time has timed out, the following step MUST be done:
L_METRIC_lost_hellos := L_METRIC_lost_hellos + 1.
L_METRIC_hello_time := L_METRIC_hello_time + L_METRIC_hello_interval.
This metric stores the number of received packets per link to a neighbor and use the package sequence number to calculate the total number of sent packages of the neighbor. The total number of packages divided by the number of received packages is used as a cost metric for the link.
If a link to a node is lost, no packets are received anymore and neither the received not total value of packages will change. To prevent a constant result in this case, the metric stores the number of HELLO message interval timeouts since the last received packet from a neighbor and use this value to reduce the received packet count proportionally to the length of the metric memory ETX_MEMORY_LENGTH.
Once every ETX_METRIC_INTERVAL, this protocol MUST recalculate of all L_METRIC_r_etx in all Link Set entries:
sum_received := sum(L_METRIC_total_lifo).
sum_total := sum(L_METRIC_received_lifo).
If L_METRIC_hello_interval != UNDEFINED and L_METRIC_lost_hellos > 0, then:
penalty := L_METRIC_hello_interval * L_METRIC_lost_hellos / ETX_MEMORY_LENGTH.
sum_received := sum_received - sum_received * penalty;
If sum_received < 1, then:
L_METRIC_r_etx := UNDEFINED.
L_in_metric := MAXIMUM_METRIC.
Otherwise:
L_METRIC_r_etx := sum_total / sum_received.
If L_METRIC_d_etc = UNDEFINED, then:
L_in_metric := DEFAULT_METRIC,
Otherwise:
L_in_metric := ETX_PERFECT_METRIC * L_METRIC_r_etx * L_METRIC_d_etx.
push(L_METRIC_total_lifo, 0)
push(L_METRIC_received_lifo, 0)
This section proposes values for various parameters used in this specification.
ETX_MEMORY_LENGTH := 32 seconds
ETX_METRIC_INTERVAL := 1 second
ETX_SEQNO_RESTART_DETECTION := 256
ETX_HELLO_TIMEOUT_FACTOR := 1.5
ETX_PERFECT_METRIC := DEFAULT_METRIC * 0.1
Artificial manipulation of metrics values can drastically alter network performance. In particular, advertising a higher R_etx value may decrease the amount of incoming traffic, while advertising lower R_etx may decrease the amount of incoming traffic. By artificially increasing or decreasing the R_etx values it advertises, a rogue router may thus attract or repulse data traffic. A rogue router may then potentially degrade data throughput by not forwarding data as it should or redirecting traffic into routing loops or bad links.
This specification defines one Address Block TLV Type, which have been allocated from the "Assigned Address Block TLV Types" repository of as specified in .
For the registries for TLV Type Extensions where an Expert Review is required, the designated expert SHOULD take the same general recommendations into consideration as are specified by .
Name
Type
Type extension
Description
R_etx
tbd
tbd
Loss rate of incoming packets.
The authors would like to acknowledge the network administrators from Freifunk Berlin and Funkfeuer Vienna for endless hours of testing and suggestions to improve the quality of this ETX metric.
The authors would like to gratefully acknowledge the following people for intense technical discussions, early reviews and comments on the specification and its components (listed alphabetically):
Teco Boot (Infinity Networks),
Thomas Clausen (LIX),
Christopher Dearlove (BAE Systems)
Michael Gerharz (Fraunhofer FKIE),
Ulrich Herberg (LIX),
Markus Kittenberger (Funkfeuer Vienna)
and Jens Toelle (Fraunhofer FKIE).
Key words for use in RFCs to Indicate Requirement Levels
Harvard University
Optimized Link State Routing Protocol
Project Hipercom, INRIA Rocquencourt, France
Project Hipercom, INRIA Rocquencourt, France
Generalized Mobile Ad Hoc Network (MANET) Packet/Message Format
Ecole Polytechnique, France
BAE Systems
Naval Research Laboratory
INRIA Rocquencourt
Representing Multi-Value Time in Mobile Ad Hoc Networks
Ecole Polytechnique, France
BAE Systems
The Optimized Link State Routing Protocol version 2
Ecole Polytechnique, France
Project Hipercom, INRIA Rocquencourt, France
BAE Systems
Mobile Ad Hoc Network (MANET) Neighborhood Discovery Protocol (NHDP)
Ecole Polytechnique, France
BAE Systems
Naval Research Laboratory
A High-Throughput Path Metric for Multi-Hop Wireless Routing
Link Metrics for OLSRv2
BAE Systems
Ecole Polytechnique, France
Project Hipercom, INRIA Rocquencourt, France
The olsr.org OLSR daemon, http://www.olsr.org
http://www.olsr.org
Freifunk Wireless Community Networks, http://www.freifunk.net
http://www.freifunk.net
Austria Wireless Community Network, http://www.funkfeuer.at
http://www.funkfeuer.at
https://map.funkfeuer.at/wien/
Athens Wireless Community Network, http://awmn.net
http://awmn.net
Barcelona Wireless Community Network, http://www.guifi.net
http://www.guifi.net
Roma Wireless Community Network, http://www.ninux.org
http://www.ninux.org
Boston Wireless Community Network, http://openairboston.net/
http://openairboston.net/