docs: update for role-based interface configuration

This commit is contained in:
Matthias Schiffer 2022-01-24 00:18:02 +01:00
parent a671b5081c
commit 210cacdf55
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
6 changed files with 53 additions and 22 deletions

View File

@ -1,5 +1,5 @@
WAN support Uplink support
=========== ==============
As the WAN port of a node will be connected to a user's private network, it As the WAN port of a node will be connected to a user's private network, it
is essential that the node only uses the WAN when it is absolutely necessary. is essential that the node only uses the WAN when it is absolutely necessary.
@ -11,11 +11,12 @@ There are two cases in which the WAN port is used:
After the VPN connection has been established, the node should be able to reach After the VPN connection has been established, the node should be able to reach
the mesh's DNS servers and use these for all other name resolution. the mesh's DNS servers and use these for all other name resolution.
If the device does not feature a WAN port, the LAN port is configured as WAN port. If a device has only a single Ethernet port (or group of ports), it will be
In case such a device has multiple LAN ports, all these can be used as WAN. used as an uplink port even when it is not labelled as "WAN" by default. This
Devices, which feature a "hybrid" port (labelled as WAN/LAN), this port is used as WAN. behavior can be controlled using the ``interfaces.single.default_roles``
site.conf option. It is also possible to alter the interface assignment after
This behavior can be reversed using the ``single_as_lan`` site.conf option. installation by modifying ``/etc/config/gluon`` and running
``gluon-reconfigure``.
Routing tables Routing tables
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

View File

@ -130,9 +130,7 @@ site.conf only variables
- authorized_keys - authorized_keys
- default_domain - default_domain
- poe_passthrough - poe_passthrough
- mesh_on_wan - interfaces.*.default_roles
- mesh_on_lan
- single_as_lan
- setup_mode.skip - setup_mode.skip
- autoupdater.branch - autoupdater.branch
- mesh_vpn.enabled - mesh_vpn.enabled

View File

@ -1,8 +1,8 @@
Private WLAN Private WLAN
============ ============
It is possible to set up a private WLAN that bridges the WAN port and is separated 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, 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`` WPA3 or WPA2/WPA3 mixed-mode can be used instead of WPA2. For this to work, the ``wireless-encryption-wpa3``

View File

@ -50,8 +50,8 @@ Configuration
Both Mesh-on-WAN and Mesh-on-LAN can be configured on the "Network" page Both Mesh-on-WAN and Mesh-on-LAN can be configured on the "Network" page
of the *Advanced settings* (if the package ``gluon-web-network`` is installed). of the *Advanced settings* (if the package ``gluon-web-network`` is installed).
It is also possible to enable Mesh-on-WAN and Mesh-on-LAN by default by It is also possible to enable Mesh-on-WAN and Mesh-on-LAN by default by adding
adding ``mesh_on_wan = true`` and ``mesh_on_lan = true`` to ``site.conf``. the ``mesh`` role to the ``interfaces.*.default_roles`` options in site.conf.
Commandline Commandline
=========== ===========

View File

@ -39,7 +39,7 @@ Several Freifunk communities in Germany use Gluon as the foundation of their Fre
dev/hardware dev/hardware
dev/packages dev/packages
dev/upgrade dev/upgrade
dev/wan dev/uplink
dev/mac_addresses dev/mac_addresses
dev/site_library dev/site_library
dev/build dev/build

View File

@ -399,17 +399,49 @@ mesh_vpn
}, },
} }
mesh_on_wan \: optional interfaces \: optional
Enables the mesh on the WAN port (``true`` or ``false``). Default setup for Ethernet ports.
:: ::
mesh_on_wan = true, interfaces = {
lan = {
default_roles = { 'client', 'mesh' },
},
wan = {
default_roles = { 'uplink', 'mesh' },
},
single = {
default_roles = { 'uplink', 'mesh' },
},
},
mesh_on_lan \: optional For devices that have two distinct Ethernet ports or port groups (often
Enables the mesh on the LAN port (``true`` or ``false``). labelled WAN and LAN), the ``lan`` and ``wan`` sections are used. When there
:: is only one port (group), ``single`` is used instead.
mesh_on_lan = true, Available interface roles:
- ``client``: Port allows regular clients to connect to the mesh
- ``uplink``: Port is used to establish Mesh VPN connections
- ``mesh``: Wired meshing to another Gluon or Gluon-compatible node
The ``client`` role requires exclusive control over an interface. When
the ``client`` role is assigned to an interface at the same time as other
roles (like ``'client', 'mesh'`` in the above example), the other roles take
precedence (enabling ``mesh``, but not ``client`` in the example).
Such a default configuration still fulfills a purpose (and is in fact the
recommended way to enable "Mesh-on-LAN" by default): The "LAN interface
meshing" checkbox in the advanced network settings will only add or remove
the ``mesh`` role, so the ``client`` role must already be in the configuration
to make the LAN port a regular client interface when the checkbox is disabled.
All interface settings are optional. If unset, the following defaults are
used:
- ``lan``: ``{ 'client' }``
- ``wan``: ``{ 'uplink' }``
- ``single``: Same as ``wan``
poe_passthrough \: optional poe_passthrough \: optional
Enable PoE passthrough by default on hardware with such a feature. Enable PoE passthrough by default on hardware with such a feature.