Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2017-07-13,master
>---------------------------------------------------------------
commit 4a0a8ad7c958749f17aaca02d18141dd8354be15
Author: Marek Lindner <mareklindner(a)neomailbox.ch>
Date: Fri Jun 4 21:49:31 2010 +0000
doc: batman-adv/Multi-link-optimizations-technical
>---------------------------------------------------------------
4a0a8ad7c958749f17aaca02d18141dd8354be15
.../Multi-link-optimizations-technical.textile | 23 +++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/batman-adv/Multi-link-optimizations-technical.textile b/batman-adv/Multi-link-optimizations-technical.textile
index 0913cb75..953a4fb4 100644
--- a/batman-adv/Multi-link-optimizations-technical.textile
+++ b/batman-adv/Multi-link-optimizations-technical.textile
@@ -1,8 +1,11 @@
= Bonding and interface alternating =
+{{{
+#!div style="width: 46em; text-align: justify"
+
On mesh nodes with multiple wifi radios (or even other interfaces) participating in the mesh network, we can use these multiple interfaces to gain more bandwidth or more stability in the links. The standard BATMAN algorithm considers all neighbors equally, and does not distinguish whether neighbors belong to the same physical nodes or not. The bonding and interface alternating mechanisms detect that some neighbors belong to the same physical node and use this information.
-== multiple interface detection ==
+== Multiple interface detection ==
The first step is to detect that a peer has multiple interfaces, and we have multiple connections to it.
@@ -10,26 +13,28 @@ The first step is to detect that a peer has multiple interfaces, and we have mul
As seen in the illustration, we have a node A with 2 interfaces A1,A2. Both of its interfaces can reach different neighbors. By evaluating OGM packets from B with a new "PRIMARIES FIRST HOP" flag (which is only set in the first hop, obviously), we recognize that B2 is belonging to the same node B1. OGMs from the primary interface (B1) are sent on all available interfaces (B1 and B2), and we can therefore detect that the B2 is a secondary interface and B1 is the primary interface of the node it belongs to.
-With this information, we know that we can send packets via each links (A1->B1 or A2->B2) without disturbing or changing the routing algorithm - we send from and to the same nodes after all. We call these possible links "candidates" internally. Links are only considered as candidates if the TQ (transmit quality) are nearly equally good as the best link.
+With this information, we know that we can send packets via each links (A1->B1 or A2->B2) without disturbing or changing the routing algorithm - we send from and to the same nodes after all. Since we are going to use both links at the same time and not only the best, we need to make sure that both have a similar quality. Otherwise the performance might be worse instead of improving the situation.
-== interface alternating ==
+== Interface alternating ==
-One application for our multiple detection is interface alternating. The idea is to avoid forwarding packets on the same interface as they were received.
+One application for our multiple detection is "interface alternating": The algorithm tries to avoid forwarding packets on the interface which just received the packet. That way the typical store & forward mechanism of wifi which halfs the bandwidth with each hop can be worked around.
[[Image(wiki:bonding-alternating:alternation_chain.dia.jpg)]]
-In the illustration, we can see 4 nodes with 2 interfaces each. A stream is sent from node A to node D. There are 2 candidates for each node to reach the next hop, but only one is used - if possible, not the one where we received the packets.
+In the illustration, we can see 4 nodes with 2 interfaces each. A stream is sent from node A to node D. There are 2 candidates for each node to reach the next hop, but only one is used - if possible, not the one which received the packets in the first place.
-If one packet comes in, we have two links available for the next hop. We can now search through the list of candidates and can choose a candidate which is not using the receiving interface.
+If a packet comes in, we have two links available for the next hop. We can now search through the list of candidates and can choose a candidate which is not going over the receiving interface.
-This mechanism should avoid interferences and too much packet in one wifi channel, and thus should avoid problems with the half-duplex nature of WiFi hardware. As we currently don't see any scenarios where the interface alternating could cause disadvantages, we set it to default in the upcoming batman-adv 0.3.0 release.
+This mechanism should avoid interferences and congestion of a wifi channel, and thus should avoid problems with the half-duplex nature of WiFi hardware. As we currently don't see any scenarios where the interface alternating could cause disadvantages, we set it to default in the upcoming batman-adv 0.3.0 release.
-== bonding ==
+== Bonding ==
-In bonding, we split a single stream and distribute the packets over multiple links. Packets are sent in a round-robin fashion over the available candidates. This can be used to increase the throughput for data streams from node A to node B. In best case the throughput is n times higher, where n is the number of candidates.
+In bonding, we split a single stream and distribute the packets over multiple links. Packets are sent in a round-robin fashion over the available candidates. This can be used to increase the throughput for data streams from node A to node B. In a perfect environemt the throughput is n times higher, where n is the number of candidates.
[[Image(wiki:bonding-alternating:bonding_roundrobin.dia.jpg)]]
However, with the round-robin way of sending packets, the actual throughput is limited by the link with the worst bandwidth. Also the errors and instabilities of all links are aggregated, which makes the link more fragile. For this reason, the bonding feature can be enabled optionally, and should be enabled in setups with high quality links.
There are already ideas how to improve the situation with links of differend bandwidth, e.g. sending packets packets on interfaces where the queue has the least packets. Comments and patches [MailingList are appreciated].
+
+}}}
\ No newline at end of file