gluon-hoodselector docs: add package documentation

Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
This commit is contained in:
Jan-Tarek Butt 2018-07-15 11:26:00 +02:00
parent 843691e04c
commit 9922f6c8d7
6 changed files with 1520 additions and 0 deletions

View File

@ -62,6 +62,7 @@ Several Freifunk communities in Germany use Gluon as the foundation of their Fre
package/gluon-ebtables-filter-ra-dhcp
package/gluon-ebtables-limit-arp
package/gluon-ebtables-source-filter
package/gluon-hoodselector
package/gluon-radv-filterd
package/gluon-scheduled-domain-switch
package/gluon-web-admin

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,123 @@
gluon-hoodselector
==================
This package provides an automatism of selecting the right hood network in an
intelligent way. This hood bases on geostationary fixed quadrants for
batman-adv mesh networks. The Hoodselector makes it possible to build scaled
decentralised mesh-networks.
Background informations
-----------------------
The main problem of the Nordwest Freifunk community was the fast increasing of
amount of nodes in the network. This affected indirectly the stability of the
network because also the noise inside the network e.g. management traffic from
the batman-adv protocoll was increasing. Inside the community there were some
ideas like to build seperated firmwares for each region. Kind of idea
will have problems in resplitting regions again or even problems of scattered
nodes, which belongs to an another region. Therefore we decide to develop an
dynamic and decentralized management of kind of region called hoods.
The Hoodselectors task is to choose belonged hoods in an inteligent way and
ensure to hold the network together and accessible.
A hood is defined by geostationary fixed shapes by using longitude & latitude
in combination with the domain configuration system. Below you can see a visual
example of regional hoods:
.. image:: hoodmap.jpeg
Hoodselector logic
------------------
In following there is an abstract state diagramm which should give an overview
of the process:
.. image:: gluon-hoodselector.svg
The sequence of this diagramm is given the priorty of running modes.
Each mode will be explained seperatedly below.
VPN-MODE
^^^^^^^^
This mode will be only entered if a router can see batman-adv Gateways over VPN.
Means only routers which have a vpn connection to supernodes will enter and set
the hood base on their position if they have one. If a node has a position
which is outside of all definded shapes, it will set the default hood. If no
position exists, the node will continue with the next mode. This mode will be
entered at first. The reason is because the Hoodselector takes
care of holding nodes arround supernodes e.g. to ensure that nodes can always
reach at least the autoupdate server.
Hood
----
A hood bases on the related domain configuration with some additional
configurations. There are two types of hoods: one without any defined shapes
which has to be unique and other which contains shapes.
* **default hood**
defaulthood: The default hood doesnt have shapes and is the inverted form of
all other hoods with geo coordinates. It will be entered if no node match to a
real hood. In the Nordwest Freifunk situation we defined the old network as
default hood and continuously migrated parts from there to shape defined hoods
named "real hood"
* **real hood**
A real hood contains shapes, which are described by three dimensional array and
represents the geographical size of the real hood. There are 2 possible
definitions of those shapes. The first one are rectangulars definded which
means just two points per box are needed to reconstruct it.
(see below for an example). The second one are normal polygons which can have
multible edges. Each real hood can have multible defined shapes.
.. image:: rectangle-example.svg
site.conf
---------
The designer of the shapes should always ensure that no overleaping poligons
will be created!
Here is an example of a rectangular definition of a shape:
Example::
hoodselector = {
shapes = {
{
{
lat = 53.128,
lon = 8.187
},
{
lat = 53.163,
lon = 8.216
},
},
},
},
Here in an example of a Trigon polygon defined shape:
Example::
hoodselector = {
shapes = {
{
{
lat = 53.128,
lon = 8.187
},
{
lat = 53.163,
lon = 8.216
},
{
lat = 53.196,
lon = 8.194
},
},
},
},
This package is not compatible with the :doc:`gluon-config-mode-domain-select`.

View File

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
<svg width="32cm" height="30cm" viewBox="36 47 640 581" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="102.36" y1="128.823" x2="185.552" y2="129.326"/>
<polygon style="fill: #000000" points="185.521,134.325 195.551,129.386 185.582,124.326 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="185.521,134.325 195.551,129.386 185.582,124.326 "/>
</g>
<g>
<ellipse style="fill: #ffffff" cx="257.52" cy="129.76" rx="60.966" ry="46.2698"/>
<ellipse style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" cx="257.52" cy="129.76" rx="60.966" ry="46.2698"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="257.52" y="133.66">
<tspan x="257.52" y="133.66">Load domains</tspan>
</text>
</g>
<g>
<ellipse style="fill: #ffffff" cx="421" cy="130" rx="55.2701" ry="27.635"/>
<ellipse style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" cx="421" cy="130" rx="55.2701" ry="27.635"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="421" y="133.9">
<tspan x="421" y="133.9">directVPN</tspan>
</text>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="318.995" y1="129.85" x2="354.733" y2="129.903"/>
<polygon style="fill: #000000" points="354.726,134.903 364.733,129.917 354.74,124.903 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="354.726,134.903 364.733,129.917 354.74,124.903 "/>
</g>
<g>
<rect style="fill: #00ff00" x="106" y="105.1" width="77.75" height="14.95"/>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="106" y="117">
<tspan x="106" y="117">initialization</tspan>
</text>
</g>
<g>
<rect style="fill: #00ff00" x="341.225" y="47.1" width="171.55" height="46.95"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="427" y="59">
<tspan x="427" y="59">(VPN MODE)</tspan>
<tspan x="427" y="75">Router have a batman-adv</tspan>
<tspan x="427" y="91">connection via VPN.</tspan>
</text>
</g>
<g>
<ellipse style="fill: #ffffff" cx="420.521" cy="250.76" rx="63.5828" ry="36.4784"/>
<ellipse style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" cx="420.521" cy="250.76" rx="63.5828" ry="36.4784"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="420.521" y="254.66">
<tspan x="420.521" y="254.66">geo pos. exist</tspan>
</text>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="420.888" y1="158.134" x2="420.709" y2="203.282"/>
<polygon style="fill: #000000" points="415.709,203.262 420.67,213.282 425.709,203.302 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="415.709,203.262 420.67,213.282 425.709,203.302 "/>
</g>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="432" y="186">
<tspan x="432" y="186">true</tspan>
</text>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="475.141" y1="130" x2="575.768" y2="130"/>
<polygon style="fill: #000000" points="575.768,135 585.768,130 575.768,125 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="575.768,135 585.768,130 575.768,125 "/>
</g>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="495" y="118">
<tspan x="495" y="118">false</tspan>
</text>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="465.908" y1="224.72" x2="592.391" y2="152.152"/>
<polygon style="fill: #000000" points="594.879,156.489 601.065,147.175 589.903,147.815 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="594.879,156.489 601.065,147.175 589.903,147.815 "/>
</g>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="507" y="213">
<tspan x="507" y="213">false</tspan>
</text>
<g>
<ellipse style="fill: #ffffff" cx="419.999" cy="365.001" rx="62.9893" ry="31.4946"/>
<ellipse style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" cx="419.999" cy="365.001" rx="62.9893" ry="31.4946"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="419.999" y="368.901">
<tspan x="419.999" y="368.901">get geoHood</tspan>
</text>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="420.352" y1="287.716" x2="420.193" y2="322.503"/>
<polygon style="fill: #000000" points="415.193,322.48 420.148,332.503 425.193,322.526 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="415.193,322.48 420.148,332.503 425.193,322.526 "/>
</g>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="428" y="313">
<tspan x="428" y="313">true</tspan>
</text>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="395.06" y1="394.377" x2="347.488" y2="450.411"/>
<polygon style="fill: #000000" points="343.677,447.175 341.017,458.034 351.3,453.647 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="343.677,447.175 341.017,458.034 351.3,453.647 "/>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="443.467" y1="394.687" x2="486.999" y2="449.754"/>
<polygon style="fill: #000000" points="483.076,452.855 493.2,457.599 490.921,446.653 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="483.076,452.855 493.2,457.599 490.921,446.653 "/>
</g>
<g>
<ellipse style="fill: #ffffff" cx="316.001" cy="487.499" rx="62.3789" ry="31.1895"/>
<ellipse style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" cx="316.001" cy="487.499" rx="62.3789" ry="31.1895"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="316.001" y="491.399">
<tspan x="316.001" y="491.399">set geoHood</tspan>
</text>
</g>
<g>
<ellipse style="fill: #ffffff" cx="519.999" cy="491.5" rx="71.2795" ry="35.6397"/>
<ellipse style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" cx="519.999" cy="491.5" rx="71.2795" ry="35.6397"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="519.999" y="495.4">
<tspan x="519.999" y="495.4">set defaultHood</tspan>
</text>
</g>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="470" y="414.25">
<tspan x="470" y="414.25">false</tspan>
</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="349" y="412.25">
<tspan x="349" y="412.25">true</tspan>
</text>
<g>
<ellipse style="fill: #ffffff" cx="420.001" cy="604.499" rx="44.2427" ry="22.1213"/>
<ellipse style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" cx="420.001" cy="604.499" rx="44.2427" ry="22.1213"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="420.001" y="608.399">
<tspan x="420.001" y="608.399">Exit</tspan>
</text>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="490.837" y1="524.453" x2="445.184" y2="576.042"/>
<polygon style="fill: #000000" points="441.44,572.728 438.557,583.531 448.928,579.355 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="441.44,572.728 438.557,583.531 448.928,579.355 "/>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x1="341.658" y1="516.364" x2="394.731" y2="576.071"/>
<polygon style="fill: #000000" points="390.994,579.393 401.375,583.545 398.468,572.749 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="390.994,579.393 401.375,583.545 398.468,572.749 "/>
</g>
<g>
<ellipse style="fill: #ffffff" cx="631.001" cy="130" rx="44.2427" ry="22.1213"/>
<ellipse style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" cx="631.001" cy="130" rx="44.2427" ry="22.1213"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="631.001" y="133.9">
<tspan x="631.001" y="133.9">Exit</tspan>
</text>
</g>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="912.352" y="129.946">
<tspan x="912.352" y="129.946"></tspan>
</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="912.352" y="129.946">
<tspan x="912.352" y="129.946"></tspan>
</text>
<text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="96.5" y="236.5">
<tspan x="96.5" y="236.5"></tspan>
</text>
<text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="95.5" y="251.5">
<tspan x="95.5" y="251.5"></tspan>
</text>
<g>
<ellipse style="fill: #ffffff" cx="69.241" cy="128.624" rx="32.641" ry="23.7236"/>
<ellipse style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" cx="69.241" cy="128.624" rx="32.641" ry="23.7236"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="69.241" y="132.524">
<tspan x="69.241" y="132.524">Start</tspan>
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

BIN
docs/package/hoodmap.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
<svg width="13cm" height="9cm" viewBox="348 138 253 169" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<rect style="fill: #ffffff" x="389" y="164" width="158" height="115"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" x="389" y="164" width="158" height="115"/>
</g>
<text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="348" y="150">
<tspan x="348" y="150">53.22,</tspan>
<tspan x="348" y="166">8.09 #</tspan>
</text>
<text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="545" y="288">
<tspan x="545" y="288"># 53.36,</tspan>
<tspan x="545" y="304"> 8.32</tspan>
</text>
</svg>

After

Width:  |  Height:  |  Size: 996 B