Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • autinerd/experimental-openwrt-24.10
  • experimental
  • feature/addMikrotikwAP
  • master
  • nrb/airmax-test
  • nrb/ar9344-reset-sequence
  • nrb/ex400-remove-wps
  • nrb/gluon-master-cpe510
  • nrb/test-radv-filter
  • nrbffs/fastd-remove-delay
  • nrbffs/netgear-ex6120
  • v2018.2.2-ffs
  • v2018.2.3-ffs
  • v2019.1-ffs
  • v2019.1.1-ffs
  • v2019.1.2-ffs
  • v2020.1-ffs
  • v2020.1.1-ffs
  • v2020.1.3-ffs
  • v2020.2-ffs
  • v2020.2.1-ffs
  • v2020.2.2-ffs
  • v2020.2.3-ffs
  • v2021.1-ffs
  • v2021.1.1-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • v2022.1.3-ffs
  • v2022.1.4-ffs
  • v2023.1-ffs
  • v2023.2-ffs
  • v2023.2.2-ffs
  • v2023.2.3-ffs
  • v2023.2.4-ffs
  • v2023.2.5-ffs
  • experimental-2022-09-24
  • experimental-2022-09-24-base
  • experimental-2023-03-11
  • experimental-2023-03-11-base
  • experimental-2023-03-12
  • experimental-2023-03-12-base
  • experimental-2023-03-16
  • experimental-2023-03-16-base
  • experimental-2023-03-20
  • experimental-2023-03-20-base
  • experimental-2023-03-23
  • experimental-2023-03-23-base
  • experimental-2023-03-25
  • experimental-2023-03-25-base
  • experimental-2023-03-26
  • experimental-2023-03-26-base
  • experimental-2023-03-30
  • experimental-2023-03-30-base
  • experimental-2023-03-31
  • experimental-2023-03-31-base
  • experimental-2023-04-01
  • experimental-2023-04-01-base
  • experimental-2023-04-08
  • experimental-2023-04-08-base
  • experimental-2023-04-10
  • experimental-2023-04-10-base
  • experimental-2023-04-13
  • experimental-2023-04-13-base
  • experimental-2023-04-15
  • experimental-2023-04-15-base
  • experimental-2023-04-16
  • experimental-2023-04-16-base
  • experimental-2023-04-18
  • experimental-2023-04-18-base
  • experimental-2023-04-20
  • experimental-2023-04-20-base
  • experimental-2023-04-26
  • experimental-2023-04-26-base
  • experimental-2023-04-28
  • experimental-2023-04-28-base
  • experimental-2023-04-30
  • experimental-2023-04-30-base
  • experimental-2023-05-02
  • experimental-2023-05-02-base
  • experimental-2023-05-03
  • experimental-2023-05-03-base
  • experimental-2023-05-12
  • experimental-2023-05-12-base
  • experimental-2023-05-21
  • experimental-2023-05-21-base
  • experimental-2023-05-25
  • experimental-2023-05-25-base
  • experimental-2023-07-02
  • experimental-2023-07-02-base
  • experimental-2023-07-04
  • experimental-2023-07-04-base
  • experimental-2023-07-12
  • experimental-2023-07-12-base
  • experimental-2023-07-16
  • experimental-2023-07-16-base
  • experimental-2023-08-04
  • experimental-2023-08-04-base
  • experimental-2023-08-10
  • experimental-2023-08-10-base
  • experimental-2023-09-08
  • experimental-2023-09-08-base
  • experimental-2023-09-09
  • experimental-2023-09-09-base
  • experimental-2023-09-10
  • experimental-2023-09-10-base
  • experimental-2023-09-11
  • experimental-2023-09-11-base
  • experimental-2023-09-12
  • experimental-2023-09-12-base
  • experimental-2023-09-13
  • experimental-2023-09-13-base
  • experimental-2023-09-15
  • experimental-2023-09-15-base
  • experimental-2023-09-16
  • experimental-2023-09-16-base
  • experimental-2023-09-18
  • experimental-2023-09-18-base
  • experimental-2023-09-20
  • experimental-2023-09-20-base
  • experimental-2023-09-27
  • experimental-2023-09-27-base
  • experimental-2023-09-28
  • experimental-2023-09-28-base
  • experimental-2023-09-29
  • experimental-2023-09-29-base
  • experimental-2023-10-02
  • experimental-2023-10-02-base
  • experimental-2023-10-13
  • experimental-2023-10-13-base
  • experimental-2023-10-14
  • experimental-2023-10-14-base
  • experimental-2023-10-16
  • experimental-2023-10-16-base
  • experimental-2023-10-23
  • experimental-2023-10-23-base
137 results

Target

Select target project
  • firmware/gluon
  • 0x4A6F/gluon
  • patrick/gluon
3 results
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • 2014.3.x
  • 2014.4.x
  • babel
  • experimental
  • hoodselector
  • master
  • nrb/gluon-master-cpe510
  • nrb/test-radv-filter
  • nrbffs/fastd-remove-delay
  • nrbffs/netgear-ex6120
  • radv-filterd
  • v2015.1.x
  • v2016.1.x
  • v2016.2.4-batmanbug
  • v2016.2.x
  • v2018.2.2-ffs
  • v2018.2.3-ffs
  • v2018.2.x
  • v2019.1-ffs
  • v2019.1.1-ffs
  • v2019.1.2-ffs
  • v2020.1-ffs
  • v2020.1.1-ffs
  • v2020.1.3-ffs
  • v2020.2-ffs
  • v2020.2.1-ffs
  • v2020.2.2-ffs
  • v2020.2.3-ffs
  • v2020.2.x
  • v2021.1-ffs
  • v2021.1.1-ffs
  • v2021.1.2-ffs
  • v2014.1
  • v2014.2
  • v2014.3
  • v2014.3.1
  • v2014.4
  • v2015.1
  • v2015.1.1
  • v2015.1.2
  • v2016.1
  • v2016.1.1
  • v2016.1.2
  • v2016.1.3
  • v2016.1.4
  • v2016.1.5
  • v2016.1.6
  • v2016.2
  • v2016.2.1
  • v2016.2.2
  • v2016.2.3
  • v2016.2.4
  • v2016.2.5
  • v2016.2.6
  • v2016.2.7
  • v2017.1
  • v2017.1.1
  • v2017.1.2
  • v2017.1.3
  • v2017.1.4
  • v2017.1.5
  • v2017.1.6
  • v2017.1.7
  • v2017.1.8
  • v2018.1
  • v2018.1.1
  • v2018.1.2
  • v2018.1.3
  • v2018.1.4
  • v2018.2
  • v2018.2-ffs0.1
  • v2018.2.1
  • v2018.2.1-ffs0.1
  • v2018.2.2-ffs0.1
  • v2018.2.3-ffs0.1
  • v2019.1-ffs0.1
  • v2019.1.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2020.1-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.2
  • v2020.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.3-ffs0.1
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.3
  • v2020.2.x-ffs0.1
  • v2021.1-ffs0.1
  • v2021.1.1-ffs0.1
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.4
  • v2021.1.2-ffs0.1
  • v2021.1.2-ffs0.2
98 results
Show changes
Showing
with 917 additions and 461 deletions
...@@ -58,7 +58,7 @@ script in the ``contrib`` directory: ...@@ -58,7 +58,7 @@ script in the ``contrib`` directory:
The same command can be run again to update the template. The same command can be run again to update the template.
In addition, the Makefile must be adjusted. Instead of LEDE's default *package.mk*, In addition, the Makefile must be adjusted. Instead of OpenWrt's default *package.mk*,
the Gluon version (``../gluon.mk`` for core packages) must be used. The i18n files must be installed the Gluon version (``../gluon.mk`` for core packages) must be used. The i18n files must be installed
and PKG_CONFIG_DEPENDS must be added:: and PKG_CONFIG_DEPENDS must be added::
......
Models Models
====== ======
Models are defined in ``/lib/gluon/web/model``. Each model defines one or more Models are defined in the ``model`` subdirectory of a gluon-web application
forms to display on a page, and how the submitted form data is handled. (``/lib/gluon/config-mode/model`` for the config mode; the status
page does not use any models). Model support is not part of the gluon-web core
anymore, but is provided by the *gluon-web-model* package.
Each model defines one or more forms to display on a page, and how the submitted
form data is handled.
Let's start with an example: Let's start with an example:
...@@ -21,7 +26,7 @@ Let's start with an example: ...@@ -21,7 +26,7 @@ Let's start with an example:
return f return f
The toplevel element of a model is always a *Form*, but it is also possible for The top-level element of a model is always a *Form*, but it is also possible for
a model to return multiple forms, which are displayed one below the other. a model to return multiple forms, which are displayed one below the other.
A *Form* has one or more *Sections*, and each *Section* has different types A *Form* has one or more *Sections*, and each *Section* has different types
...@@ -46,14 +51,14 @@ Classes and methods ...@@ -46,14 +51,14 @@ Classes and methods
- *Form:write* () - *Form:write* ()
Is called after the form has beed submitted (but only if the data is valid). It Is called after the form has been submitted (but only if the data is valid). It
is called last (after all options' *write* methods) and is usually used is called last (after all options' *write* methods) and is usually used
to commit changed UCI packages. to commit changed UCI packages.
The default implementation of *write* doesn't do anything, but it can be The default implementation of *write* doesn't do anything, but it can be
overridden. overridden.
- *Section* (usually instanciated through *Form:section*) - *Section* (usually instantiated through *Form:section*)
- *Section:option* (*type*, *id*, *title*, *description*) - *Section:option* (*type*, *id*, *title*, *description*)
......
Views Views
===== =====
The template parser reads views from ``/lib/gluon/web/view``. Writing own view The template parser reads views from the ``view`` subdirectory of a
should be avoided in favour of using :doc:`model` with their predefined views. gluon-web application (``/lib/gluon/config-mode/view`` for the config mode,
``lib/gluon/status-page/view`` for the status page).
Writing own views should usually be avoided in favour of using :doc:`model`
with their predefined views.
Views are partial HTML pages, with additional template tags that allow Views are partial HTML pages, with additional template tags that allow
to embed Lua code and translation strings. The following tags are defined: to embed Lua code and translation strings. The following tags are defined:
- ``<%`` ... ``%>`` evaluates the enclosed Lua expression. - ``<%`` ... ``%>`` evaluates the enclosed Lua expression.
- ``<%=`` ... ``%>`` evaluates the enclosed Lua expression and prints its value. - ``<%|`` ... ``%>`` evaluates the enclosed Lua expression and prints its value.
- ``<%=`` ... ``%>`` evaluates the enclosed Lua expression and prints its value
*without escaping HTML entities*. This is useful when the value contains HTML code.
- ``<%+`` ... ``%>`` includes another template. - ``<%+`` ... ``%>`` includes another template.
- ``<%:`` ... ``%>`` translates the enclosed string using the loaded i18n catalog. - ``<%:`` ... ``%>`` translates the enclosed string using the loaded i18n catalog.
- ``<%_`` ... ``%>`` translates the enclosed string *without escaping HTML entities* - ``<%_`` ... ``%>`` translates the enclosed string *without escaping HTML entities*
......
...@@ -7,11 +7,14 @@ Building Images ...@@ -7,11 +7,14 @@ Building Images
--------------- ---------------
By default, the autoupdater is disabled (as it is usually not helpful to have unexpected updates By default, the autoupdater is disabled (as it is usually not helpful to have unexpected updates
during development), but it can be enabled by setting the variable GLUON_BRANCH when building during development), but it can be enabled by setting the variable ``GLUON_AUTOUPDATER_ENABLED`` to ``1`` when building.
to override the default branch set in the set in the site configuration. It is also possible to override the default branch during build using the variable ``GLUON_AUTOUPDATER_BRANCH``.
If a default branch is set neither in *site.conf* nor via ``GLUON_AUTOUPDATER_BRANCH``, the default branch is
implementation-defined. Currently, the branch with the first name in alphabetical order is chosen.
A manifest file for the updater can be generated with `make manifest`. A signing script (using A manifest file for the updater can be generated with `make manifest`. A signing script (using
``ecdsautils``) can by found in the `contrib` directory. When creating the manifest, the ``ecdsautils``) can be found in the `contrib` directory. When creating the manifest, the
``PRIORITY`` value may be defined by setting ``GLUON_PRIORITY`` on the command line or in ``site.mk``. ``PRIORITY`` value may be defined by setting ``GLUON_PRIORITY`` on the command line or in ``site.mk``.
``GLUON_PRIORITY`` defines the maximum number of days that may pass between releasing an update and installation ``GLUON_PRIORITY`` defines the maximum number of days that may pass between releasing an update and installation
...@@ -27,20 +30,68 @@ in ``site.mk``, care must be taken to pass the same ``GLUON_RELEASE`` to ``make ...@@ -27,20 +30,68 @@ in ``site.mk``, care must be taken to pass the same ``GLUON_RELEASE`` to ``make
as otherwise the generated manifest will be incomplete. as otherwise the generated manifest will be incomplete.
Manifest format
---------------
The manifest starts with a short header, followed by the list of firmwares and signatures.
The header contains the following information:
.. code-block:: sh
BRANCH=stable
DATE=2020-10-07 00:00:00+02:00
PRIORITY=7
- ``BRANCH`` is the autoupdater branch name that needs to match the nodes configuration.
- ``DATE`` specifies when the time period for the update begins. Nodes will do their regular update during a random minute
between 4:00 and 4:59 am. Nodes might not always have a reliable NTP synchronization, which is why a fallback mechanism
exists, that checks for an update, and will execute if ``DATE`` is at least 24h in the past.
- ``PRIORITY`` can be configured as ``GLUON_PRIORITY`` when generating the manifest or in ``site.mk``, and defines
the number of days over which the update should be stretched out after ``DATE``. Nodes will calculate a probability
based on the time left to determine when to update.
Signing images
--------------
As noted above, manifest files can be signed by an arbitrary amount of ECDSA keys.
The amount of valid signatures required to have the autoupdater accept an image is configured using the :ref:`site.conf <user-site-autoupdater>`.
A secret key (that like an SSH private key must never be shared) can be generated like this:
.. code-block:: sh
mkdir ~/.ecdsa/
( umask 077 && ecdsautil generate-key > ~/.ecdsa/id_y25519 )
This is then used to derive a public key, meant to be placed in the ``site.conf``.
.. code-block:: sh
( umask 033 && ecdsautil show-key < ~/.ecdsa/id_y25519 > ~/.ecdsa/id_y25519.pub )
A manifest can then be signed using the helper in gluons `contrib` directory.
.. code-block:: sh
./contrib/sign.sh ~/.ecdsa/id_y25519 output/images/sysupgrade/stable.manifest
In the manifest file only the content above the three dashes is signed, not other signatures that might exist.
Automated nightly builds Automated nightly builds
------------------------ ------------------------
A fully automated nightly build could use the following commands: A fully automated nightly build could use the following commands:
:: .. code-block:: sh
git pull git pull
(cd site && git pull) # git -C site pull
make update make update
make clean make clean GLUON_TARGET=ath79-generic
NUM_CORES_PLUS_ONE=$(expr $(nproc) + 1) NUM_CORES_PLUS_ONE=$(expr $(nproc) + 1)
make -j$NUM_CORES_PLUS_ONE GLUON_TARGET=ar71xx-generic GLUON_BRANCH=experimental make -j$NUM_CORES_PLUS_ONE GLUON_TARGET=ath79-generic GLUON_RELEASE=$GLUON_RELEASE \
make manifest GLUON_BRANCH=$GLUON_BRANCH GLUON_RELEASE=$GLUON_RELEASE GLUON_AUTOUPDATER_BRANCH=experimental GLUON_AUTOUPDATER_ENABLED=1
make manifest GLUON_RELEASE=$GLUON_RELEASE GLUON_AUTOUPDATER_BRANCH=experimental
contrib/sign.sh $SECRETKEY output/images/sysupgrade/experimental.manifest contrib/sign.sh $SECRETKEY output/images/sysupgrade/experimental.manifest
rm -rf /where/to/put/this/experimental rm -rf /where/to/put/this/experimental
......
docs/features/configmode.png

112 KiB

...@@ -14,10 +14,13 @@ Activating Config Mode ...@@ -14,10 +14,13 @@ Activating Config Mode
---------------------- ----------------------
Config Mode is automatically entered at the first boot. You can re-enter Config Mode is automatically entered at the first boot. You can re-enter
Config Mode by pressing and holding the RESET/WPS button for about three Config Mode by pressing and holding the RESET/WPS/DECT button for about three
seconds. The device should reboot (all LEDs will turn of briefly) and seconds. The device should reboot (all LEDs will turn off briefly) and
Config Mode will be available. Config Mode will be available.
If you have access to the console of the node, there is the
``gluon-enter-setup-mode`` command, which reboots a node into Config Mode.
Port Configuration Port Configuration
------------------ ------------------
...@@ -35,3 +38,17 @@ Accessing Config Mode ...@@ -35,3 +38,17 @@ Accessing Config Mode
Config Mode can be accessed at http://192.168.1.1. The node will offer DHCP Config Mode can be accessed at http://192.168.1.1. The node will offer DHCP
to clients. Should this fail, you may assign an IP from 192.168.1.0/24 to to clients. Should this fail, you may assign an IP from 192.168.1.0/24 to
your computer manually. your computer manually.
.. image:: configmode.png
Advanced Config Options
-----------------------
Depending on the installed packages, the advanced config mode allows to configure packages further.
* :doc:`gluon-web-wifi-config enable <wlan-configuration>` radios used for wifi and mesh as well as outdoor mode
* :doc:`../package/gluon-web-network` allows to configure the used roles (uplink, mesh, client) on each interface
* :doc:`../package/gluon-web-admin` allows to enter SSH keys or set a password in the `Remote access` section
* :doc:`../package/gluon-web-cellular` allows to configure SIM card / WWAN settings on supported cellular devices
The advanced config does also allow to upload a sysupgrade file to update the firmware to a different version.
.. _dns-caching:
DNS caching
===========
User experience may be greatly improved when dns is accelerated. Also, it
seems like a good idea to keep the number of packages being exchanged
between node and gateway as small as possible. In order to do this, a
DNS cache may be used on a node. The dnsmasq instance listening on port
53 on the node will be reconfigured to answer requests, use a list of
upstream servers and a specific cache size if the options listed below are
added to site.conf. Upstream servers are the DNS servers which are normally
used by the nodes to resolve hostnames (e.g. gateways/supernodes).
There are the following settings:
servers
cacheentries
To use the node's DNS server, both options should be set. The node will cache at
most 'cacheentries' many DNS records in RAM. The 'servers' list will be used to
resolve the received DNS queries if the request cannot be answered from
cache. Gateways should announce the "next node" address via DHCP and RDNSS (if
any). Note that not setting 'servers' here will lead to DNS not working: Once
the gateways all announce the "next node" address for DNS, there is no way for
nodes to automatically determine DNS servers. They have to be baked into the
firmware.
If these settings do not exist, the cache is not initialized and RAM usage will
not increase.
When next_node.name is set, an A record and an AAAA record for the
next-node IP address are placed in the dnsmasq configuration. This means that
the content of next_node.name may be resolved even without upstream connectivity.
It is suggested to use the same name as the DNS server provides:
e.g. nextnode.location.community.example.org (This way the name also works if a
client uses static DNS Servers). Hint: If next_node.name does not contain a dot
some browsers would open the searchpage instead.
::
dns = {
cacheentries = 5000,
servers = { '2001:4860:4860::8888', '2001:4860:4860::8844' },
},
next_node = {
name = { 'nextnode.location.community.example.org', 'nextnode', 'nn' },
ip6 = '2001:db8:8::1',
ip4 = '198.51.100.1',
}
Each cache entry will occupy about 90 bytes of RAM.
DNS forwarder
=============
A Gluon node can be configured to act as a DNS forwarder. Requests for the
next-node hostname(s) can be answered locally, without querying the upstream
resolver.
**Note:** While this reduces answer time and allows to use the next-node
hostname without upstream connectivity, this feature should not be used for
next-node hostnames that are FQDN when the zone uses DNSSEC.
One or more upstream resolvers can be configured in the *dns.servers* setting.
When *next_node.name* is set, A and/or AAAA records for the next-node IP
addresses are placed in the dnsmasq configuration.
::
dns = {
servers = { '2001:db8::1', },
},
next_node = {
name = { 'nextnode.location.community.example.org', 'nextnode', 'nn' },
ip6 = '2001:db8:8::1',
ip4 = '198.51.100.1',
}
...@@ -24,7 +24,7 @@ Information to be announced is currently split into three categories: ...@@ -24,7 +24,7 @@ Information to be announced is currently split into three categories:
interfaces. This data can be used to determine the network topology. interfaces. This data can be used to determine the network topology.
All categories will have a ``node_id`` key. It should be used to All categories will have a ``node_id`` key. It should be used to
relate data of different catagories. relate data of different categories.
Accessing Node Information Accessing Node Information
-------------------------- --------------------------
...@@ -33,7 +33,7 @@ There are two packages responsible for distribution of the information. For ...@@ -33,7 +33,7 @@ There are two packages responsible for distribution of the information. For
one, information is distributed across the mesh using alfred_. Information one, information is distributed across the mesh using alfred_. Information
between neighbouring nodes is exchanged using `gluon-respondd`. between neighbouring nodes is exchanged using `gluon-respondd`.
.. _alfred: http://www.open-mesh.org/projects/alfred .. _alfred: https://www.open-mesh.org/projects/alfred
alfred (mesh bound) alfred (mesh bound)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
...@@ -97,14 +97,15 @@ In order to retrieve statistics data you could run: ...@@ -97,14 +97,15 @@ In order to retrieve statistics data you could run:
You can find more information about alfred in its README_. You can find more information about alfred in its README_.
.. _README: https://git.open-mesh.org/alfred.git/blob_plain/refs/heads/master:/README .. _README: https://git.open-mesh.org/alfred.git/blob_plain/refs/heads/master:/README.rst
gluon-respondd gluon-respondd
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
`gluon-respondd` allows querying neighbouring nodes for their information. `gluon-respondd` allows querying neighbouring nodes for their information.
It is a daemon listening on the multicast address ``ff02::2:1001`` on It is a daemon listening on the multicast address ``ff02::2:1001`` on
UDP port 1001 on both the bare mesh interfaces and `br-client`. Unicast UDP port 1001 on the mesh interface and on the multicast address
``ff05::2:1001`` on the `br-client` interface. Unicast
requests are supported as well. requests are supported as well.
The supported requests are: The supported requests are:
...@@ -117,13 +118,13 @@ The supported requests are: ...@@ -117,13 +118,13 @@ The supported requests are:
gluon-neighbour-info gluon-neighbour-info
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
The programm `gluon-neighbour-info` can be used to retrieve The program `gluon-neighbour-info` can be used to retrieve
information from other nodes. information from other nodes.
:: ::
gluon-neighbour-info -i wlan0 \ gluon-neighbour-info -i bat0 \
-p 1001 -d ff02:0:0:0:0:0:2:1001 \ -p 1001 -d ff05:0:0:0:0:0:2:1001 \
-r nodeinfo -r nodeinfo
An optional timeout may be specified, e.g. `-t 5` (default: 3 seconds). See An optional timeout may be specified, e.g. `-t 5` (default: 3 seconds). See
...@@ -134,5 +135,5 @@ Adding a data provider ...@@ -134,5 +135,5 @@ Adding a data provider
---------------------- ----------------------
To add a provider, you need to install a shared object into ``/lib/gluon/respondd``. To add a provider, you need to install a shared object into ``/lib/gluon/respondd``.
For more information, refer to the `respondd README <https://github.com/freifunk-gluon/packages/blob/master/net/respondd/README.md>`_ For more information, refer to the `respondd README <https://github.com/freifunk-gluon/packages/blob/main/net/respondd/README.md>`_
and have a look the existing providers. and have a look the existing providers.
Multidomain Support
===================
Preamble
--------
There comes a time when a mesh network grows past sensible boundaries.
As broadcast traffic grows, mesh networks experience scaling issues and
using them becomes very unpleasant. An approach to solve this follows
the well-known “divide and conquer” paradigm and splits a large network
into multiple smaller networks. These smaller networks start with a
dedicated layer 2 network each, which are interconnected via their
gateways by layer 3 routing. Gluon is already field-tested handling a
single domain and the multidomain feature allows for the reconfiguration
of key parameters that decide which domain a node participates in,
without the need of a distinct set of firmware images for each mesh domain.
Overview
--------
Multidomain support allows to build a single firmware with multiple,
switchable domain configurations. The nomenclature is as follows:
- ``site``: an aggregate over multiple domains
- ``domain``: mesh network with connectivity parameters that prevent
accidental bridging with other domains
- ``domain code``: unique domain identifier
- ``domain name``: pretty name for a domain code
By default Gluon builds firmware with a single domain embedded into
``site.conf``. To use multiple domains, enable it in ``site.mk``:
::
GLUON_MULTIDOMAIN=1
In the site repository, create the ``domains/`` directory, which will
hold your domain configurations. Each domain configuration file is named
after its primary ``domain_code``, additional domain codes and names are
supported.
::
site/
|-- site.conf
|-- site.mk
|-- i18n/
|-- domains/
|-- alpha_centauri.conf
|-- beta_centauri.conf
|-- gamma_centauri.conf
The domain configuration ``alpha_centauri.conf`` could look like this.
::
{
domain_names = {
alpha_centauri = 'Alpha Centauri'
},
-- more domain specific config follows below
}
In this example “Alpha Centauri” is the user-visible ``domain_name`` for the
domain_code ``alpha_centauri``. Also note that the domain code
``alpha_centauri`` matches the filename ``alpha_centauri.conf``.
Additional domain codes/names can be added to ``domain_names``, which
are treated as aliases for the their domain configuration. Aliases can
be used to offer more fine-grained and well-recognizable domain choices
to users. Having multiple aliases on a single domain is a helpful
precursor to splitting the domain into even smaller blocks.
Furthermore you have to specify the ``default_domain`` in the ``site.conf``.
This domain is applied in following cases:
- When the config mode is skipped.
- When a domain is removed in a new firmware release, the default_domain
will be chosen then.
- When a user selects a wrong domain code via uci.
Please note, that this value is saved to uci, so changing the `default_domain`
value in the `site.conf` in a new firmware release only affects the actual
domain of a router, if and only if one of the above conditions matches.
Switching the domain
--------------------
Via commandline
^^^^^^^^^^^^^^^
::
gluon-switch-domain 'newdomaincode'
When the node is not in config mode, ``gluon-switch-domain`` will automatically
reboot the node by default. This can be suppressed by passing ``--no-reboot``::
gluon-switch-domain --no-reboot 'newdomaincode'
Switching the domain without reboot is currently **experimental**.
Via config mode
^^^^^^^^^^^^^^^
To allow switching the domain via config mode, add ``config-mode-domain-select``
to the enabled features in the image-customization.lua file.
|image0|
Allowed site variables
----------------------
Internally the site variables are merged from the ``site.conf`` and the
selected ``domain.conf``, so the most variables are also allowed in
``site.conf`` and in ``domain.conf``. But there are some exceptions,
which do not make sense in a domain or site specific way. The following
sections give an overview over variables that are only usable in either
site or domain context.
site.conf only variables
^^^^^^^^^^^^^^^^^^^^^^^^
- Used in as initial default values, when the firmware was just flashed
and/or the config mode is skipped, so they do not make sense in a
domain specific way:
- authorized_keys
- default_domain
- poe_passthrough
- interfaces.*.default_roles
- setup_mode.skip
- autoupdater.branch
- mesh_vpn.enabled
- mesh_vpn.pubkey_privacy
- mesh_vpn.bandwidth_limit
- mesh_vpn.bandwidth_limit.enabled
- mesh_vpn.bandwidth_limit.ingress
- mesh_vpn.bandwidth_limit.egress
- Variables that influence the appearance of the config mode,
domain-independent because they are relevant before a domain was selected.
- config_mode.geo_location.show_altitude
- config_mode.hostname.optional
- config_mode.remote_login
- config_mode.remote_login.show_password_form
- config_mode.remote_login.min_password_length
- hostname_prefix
- mesh_vpn.fastd.configurable
- roles.default
- roles.list
- Specific to a firmware build itself:
- site_code
- site_name
- autoupdater.branches.*.name
- autoupdater.branches.*.good_signatures
- autoupdater.branches.*.pubkeys
- We simply do not see any reason, why these variables could be helpful
in a domain specific way:
- mesh_vpn.fastd.syslog_level
- timezone
- regdom
domain.conf only variables
^^^^^^^^^^^^^^^^^^^^^^^^^^
- Obviously:
- domain_names
- a table of domain codes to domain names
``domain_names = { foo = 'Foo Domain', bar = 'Bar Domain', baz = 'Baz Domain' }``
- hide_domain
- prevents a domain name(s) from appearing in config mode, either
boolean or array of domain codes
- ``true``, ``false``
- ``{ 'foo', 'bar' }``
- Because each domain is considered a separate layer 2 network, these
values should be different in each domain:
- next_node.ip4
- next_node.ip6
- next_node.name
- prefix6
- prefix4
- extra_prefixes6
- To prevent accidental bridging of different domains, all meshing
technologies should be separated:
- domain_seed (wired mesh)
- must be a random value used to derive the vxlan id for wired meshing
- wifi*.mesh.id
- mesh_vpn.fastd.groups.*.peers.remotes
- mesh_vpn.fastd.groups.*.peers.key
- Clients consider WiFi networks sharing the same ESSID as if they were
the same L2 network and try to reconfirm and reuse previous
addressing. If multiple neighbouring domains shared the same ESSID,
the roaming experience of clients would degrade.
- wifi*.ap.ssid
- Some values should be only set in legacy domains and not in new domains.
- mesh.vxlan
- By default, this value is `true`. It should be only set to `false`
for one legacy domain, since vxlan prevents accidental wired
merges of domains. For old domains this value is still available
to keep compatibility between all nodes in one domain.
- next_node.mac
- For new domains, the default value should be used, since there is
no need for a special mac (or domain specific mac). For old domains
this value is still available to keep compatibility between all
nodes in one domain.
Example config
--------------
site.mk
^^^^^^^
.. literalinclude:: ../multidomain-site-example/site.mk
:language: makefile
site.conf
^^^^^^^^^
.. literalinclude:: ../multidomain-site-example/site.conf
:language: lua
domains/alpha_centauri.conf
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. literalinclude:: ../multidomain-site-example/domains/alpha_centauri.conf
:language: lua
i18n/en.po
^^^^^^^^^^
.. literalinclude:: ../multidomain-site-example/i18n/en.po
:language: po
i18n/de.po
^^^^^^^^^^
.. literalinclude:: ../multidomain-site-example/i18n/de.po
:language: po
modules
^^^^^^^
.. literalinclude:: ../multidomain-site-example/modules
:language: makefile
.. |image0| image:: multidomain_configmode.gif
docs/features/multidomain_configmode.gif

57.1 KiB

Private WLAN Private WLAN
============ ============
It is possible to set up a private WLAN that bridges the WAN port and is seperated from the mesh network. It is possible to set up a private WLAN that bridges the uplink port and is separated from the mesh network.
Please note that you should not enable ``mesh_on_wan`` simultaneously. Please note that you should not enable Wired Mesh on the uplink port at the same time.
The private WLAN is encrypted using WPA2 by default. On devices with enough flash and a supported radio,
WPA3 or WPA2/WPA3 mixed-mode can be used instead of WPA2. For this to work, the ``wireless-encryption-wpa3``
feature has to be enabled as a feature.
It is recommended to enable IEEE 802.11w management frame protection for WPA2/WPA3 networks, however this
can lead to connectivity problems for older clients. In this case, management frame protection can be
made optional or completely disabled in the advanced settings tab.
The private WLAN can be enabled through the config mode if the package ``gluon-web-private-wifi`` is installed. The private WLAN can be enabled through the config mode if the package ``gluon-web-private-wifi`` is installed.
You may also enable a private WLAN using the command line:: You may also enable a private WLAN using the command line::
uci set wireless.wan_radio0=wifi-iface RID=0
uci set wireless.wan_radio0.device=radio0 SSID="privateWLANname"
uci set wireless.wan_radio0.network=wan KEY="yoursecret1337password"
uci set wireless.wan_radio0.mode=ap
uci set wireless.wan_radio0.encryption=psk2 uci set wireless.wan_radio$RID=wifi-iface
uci set wireless.wan_radio0.ssid="$SSID" uci set wireless.wan_radio$RID.device=radio$RID
uci set wireless.wan_radio0.key="$KEY" uci set wireless.wan_radio$RID.network=wan
uci set wireless.wan_radio0.disabled=0 uci set wireless.wan_radio$RID.mode=ap
uci set wireless.wan_radio$RID.encryption=psk2
uci set wireless.wan_radio$RID.ssid="$SSID"
uci set wireless.wan_radio$RID.key="$KEY"
uci set wireless.wan_radio$RID.disabled=0
uci set wireless.wan_radio$RID.macaddr=$(lua -e "print(require('gluon.util').generate_mac(3+4*$RID))")
uci commit uci commit
wifi wifi
......
...@@ -2,8 +2,8 @@ Roles ...@@ -2,8 +2,8 @@ Roles
===== =====
It is possible to define a set of roles you want to distinguish at backend side. One node can own one It is possible to define a set of roles you want to distinguish at backend side. One node can own one
role which it will announce via alfred inside the mesh. This will make it easier to differentiate role which it will announce via respondd/announced inside the mesh. This will make it easier to differentiate
nodes when parsing alfred data. E.g to count only **normal** nodes and not the gateways nodes when parsing respondd data. E.g to count only **normal** nodes and not the gateways
or servers (nodemap). A lot of things are possible. or servers (nodemap). A lot of things are possible.
For this the section ``roles`` in ``site.conf`` is needed:: For this the section ``roles`` in ``site.conf`` is needed::
...@@ -28,7 +28,7 @@ If you want node owners to change the defined roles via config-mode you can add ...@@ -28,7 +28,7 @@ If you want node owners to change the defined roles via config-mode you can add
The role is saved in ``gluon-node-info.system.role``. To change the role using command line do:: The role is saved in ``gluon-node-info.system.role``. To change the role using command line do::
uci set gluon-node-info.system.role="$ROLE" uci set gluon-node-info.@system[0].role="$ROLE"
uci commit uci commit
Please replace ``$ROLE`` by the role you want the node to own. Please replace ``$ROLE`` by the role you want the node to own.
docs/features/status-page.png

150 KiB

Status-Page
===========
When the feature ``gluon-status-page`` is enabled, Gluon nodes run a HTTP server with status information on all IP addresses of ``br-client``.
This makes it possible to check information of the node in realtime.
If the mesh protocol ``gluon-mesh-batman-adv`` is installed too, the package ``gluon-status-page-mesh-batman-adv`` is added too according to the :ref:`user-site-feature-flags`
.. _status-page-example-picture:
Example Picture
---------------
The left side of the status page contains Overview information.
In the middle, current monitoring information abut the system, number of clients, radios, amount of traffic and connected mesh-vpn if any are shown.
The right side of the Status-Page contains information about Neighbours to this node through :doc:`wired-mesh` as well as wireless mesh.
.. image:: status-page.png
Mesh Graphs
-----------
When wireless mesh is enabled, the mesh interfaces show realtime Graphs about the received signal strength (RSSI) in dBm.
Neighbours
----------
The list of neighbours at first shows the mac-address of the neighbour it sees.
The status-page sends a second request to ``http://[ipv6]/cgi-bin/dyn/neighbours-nodeinfo?mesh-vpn`` which triggers the lookup of neighbour information on the node itself.
Through this, the actual nodenames of the neighbours are shown on the status-page as can be seen in the :ref:`status-page-example-picture`.
TLS support
===========
The generic TLS implementation which is currently used by OpenWRT can be installed or added as dependency through the package ``gluon-tls``.
This removes the need for community packages to depend on a specific TLS implementation (like mbedtls, OpenSSL or WolfSSL).
This package is an alias for the current TLS implementation used.
To allow for easy usage of communicating through HTTPS from the node, typical Certificate Authorities (CAs) are included through the package ``ca-bundle`` .
* Starting with OpenWRT 23.05, mbedtls is the default TLS layer - this is reflected in Gluon :ref:`v2023.2 <releases-v2023.2-minor-changes>`. HTTPS is used by default to communicate with OpenWRT opkg servers.
This diff is collapsed.
This diff is collapsed.
...@@ -2,10 +2,16 @@ WLAN configuration ...@@ -2,10 +2,16 @@ WLAN configuration
================== ==================
Gluon allows to configure 2.4GHz and 5GHz radios independently. The configuration Gluon allows to configure 2.4GHz and 5GHz radios independently. The configuration
may include any or all of the three networks "client" (AP mode), "mesh" (802.11s may include one or both of the two networks "client" (AP mode) and "mesh" (802.11s
mode) and "ibss" (adhoc mode), which can be used simultaneously (using "mesh" and mode), which can be used simultaneously. See :doc:`../user/site` for details on the
"ibss" at same time should be avoided though as weaker hardware usually can't handle the additional configuration.
load). See :doc:`../user/site` for details on the configuration.
Outdoor mode
------------
Configuring the node for outdoor use tunes the 5 GHz radio to a frequency and transmission power that conforms with the local regulatory requirements.
It also enables dynamic frequency selection (DFS; radar detection).
At the same time, mesh functionality is disabled as it requires neighbouring nodes to stay on the same channel permanently.
Upgrade behaviour Upgrade behaviour
----------------- -----------------
...@@ -16,19 +22,12 @@ on upgrades the existing setting is always retained (as this setting may have be ...@@ -16,19 +22,12 @@ on upgrades the existing setting is always retained (as this setting may have be
by the user). This means that it is not possible to enable or disable an existing network by the user). This means that it is not possible to enable or disable an existing network
configurations during upgrades. configurations during upgrades.
For the "mesh" and "ibss" networks, the default setting only has an effect if none
of the two has existed before. If a new configuration has been added for "mesh" or "ibss",
while the other of the two has already existed before, the enabled/disabled state of the
existing configuration will also be set for the new configuration.
This allows upgrades to change from IBSS to 11s and vice-versa while retaining the
"wireless meshing is enabled/disabled" property configured by the user regardless
of the used mode.
During upgrades the wifi channel of the 2.4GHz and 5GHz radio will be restored to the channel During upgrades the wifi channel of the 2.4GHz and 5GHz radio will be restored to the channel
configured in the site.conf. If you need to preserve a user defined wifi channel during upgrades configured in the site.conf. The channel width will be reset to Gluon's default. If you need to preserve
you can configure this via the uci section ``gluon-core.wireless``:: these settings during upgrades you can configure this via the uci section ``gluon-core.wireless``::
uci set gluon-core.@wireless[0].preserve_channels='1' uci set gluon.wireless.preserve_channels='1'
When channels should be preserved, toggling the outdoor mode will have no effect on the channel settings.
Therefore, the Outdoor mode settings won't be displayed in config mode.
Keep in mind that nodes running wifi interfaces on custom channels can't mesh with default nodes anymore! Keep in mind that nodes running wifi interfaces on custom channels can't mesh with default nodes anymore!
This diff is collapsed.