Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2017-07-13,master
commit 86683c2a98df74102d12247ad6fea03dc6812ad4 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Sep 27 17:47:09 2010 +0000
doc: batman-adv/Bridge-loop-avoidance
86683c2a98df74102d12247ad6fea03dc6812ad4 batman-adv/Bridge-loop-avoidance.textile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/batman-adv/Bridge-loop-avoidance.textile b/batman-adv/Bridge-loop-avoidance.textile index 5198e89c..4dd8e25f 100644 --- a/batman-adv/Bridge-loop-avoidance.textile +++ b/batman-adv/Bridge-loop-avoidance.textile @@ -1,22 +1,23 @@ -= Batman-adv LAN loop avoidance = += Batman-adv bridge loop avoidance =
{{{ #!div style="width: 46em; text-align: justify"
-This document explains how batman-adv is able to detect & avoid loops that are created by bridging multiple batX interfaces on different hosts into the same ethernet LAN. If you don't intend to connect multiple batman-adv hosts to the same LAN or don't use bridging you can safely skip this page. +This document explains how batman-adv is able to detect & avoid loops that are created by bridging multiple batX interfaces on different hosts into the same ethernet segment (e.g. LAN) that are outside of batman's realm. If you don't intend to connect multiple batman-adv hosts to the same ethernet segment or don't use bridging you can safely skip this page.
+__Note__: It is the normal traffic which loops around, not the protocol traffic generated by batman-adv. Unsurprisingly, bridge loops are not unique to batman-adv mesh networks but have been around for quite a while. While this document discusses bridge loops in conjunction with batman-adv in great detail it might be helpful to have some background knowledge regarding bridge loops.
=== Where does the loop come from ? ===
-To better understand what creates the loop it is helpful to focus on a sample topology. The simplest case involves only 2 nodes that are connected via with wifi and ethernet at the same time. +To better understand what creates the loop it is helpful to focus on a sample topology. The simplest case involves only 2 nodes that are connected via with wifi and an ethernet LAN at the same time.
-[[Image(wiki:lan-loop-avoidance:lanloop1.png)]] +[[Image(wiki:bridge-loop-avoidance:lanloop1.png)]]
Here, the wifi interfaces (W1 & W2) have a decent link quality and the LAN interfaces (L1 & L2) are bridged with the batX interface. Let's assume a simple ARP broadcast from the LAN arrives at node1 which then floods the mesh with that new packet. Node2 receives the packet via the mesh and forwards it to the LAN where node1 receives it ...
-[[Image(wiki:lan-loop-avoidance:lanloop2.png)]] +[[Image(wiki:bridge-loop-avoidance:lanloop2.png)]]
-If there wasn't the LAN connection this would not happen because batman-adv provides a flood/loop protection inside the batman header but as soon as the packet gets bridged this information is stripped from the packet. Every batman node connected to the LAN will think: Hey, it is a new packet! +If there wasn't the LAN connection this would not happen because batman-adv provides a flood/loop protection inside the batman header for every payload packet traveling through the mesh but as soon as the packet gets bridged this information is stripped from the packet. Every batman-adv node connected to the LAN will think: Hey, it is a new packet!
=== How to avoid the loop ? === @@ -31,12 +32,12 @@ In practice this means the following:
To keep things simple the node with the smallest mac address becomes the gateway to the LAN.
-[[Image(wiki:lan-loop-avoidance:lanloop3.png)]] +[[Image(wiki:bridge-loop-avoidance:lanloop3.png)]]
-=== How to activate the lan loop avoidance ? === +=== How to activate the bridge loop avoidance ? ===
-The LAN loop avoidance feature is built-in and does not need to be activated in a special way. Batman-adv will automatically detect and deal with the loop provided that each node sends OGMs on the LAN interface. +The bridge loop avoidance feature is built-in and does not need to be activated in a special way. Batman-adv will automatically detect and deal with the loop provided that each node sends OGMs on the bridge interface.
Simple steps to see it in action: * add your wifi interface @@ -56,6 +57,6 @@ brctl addif br-lan bat0 batctl if add br-lan }}}
-Batman-adv can also deal with vlans on top of batX and offers a list of LAN neighbors via debugfs (batctl support is available). +Batman-adv can also deal with vlans on top of batX and offers a list of batX neighbors via debugfs (batctl support is available).
}}}