Repository : ssh://git@diktynna/doc
On branches: backup-redmine/2021-04-10,backup-redmine/2021-06-12,backup-redmine/2021-07-10,backup-redmine/2021-08-07,backup-redmine/2021-09-11,backup-redmine/2021-10-09,backup-redmine/2021-11-13,backup-redmine/2021-12-11,backup-redmine/2022-01-08,backup-redmine/2022-02-12,backup-redmine/2022-03-12,backup-redmine/2022-04-09,backup-redmine/2022-05-07,backup-redmine/2022-06-11,backup-redmine/2022-08-06,backup-redmine/2022-10-07,backup-redmine/2022-11-14,backup-redmine/2023-01-14,main
commit 554b819be29030fb43b4f82658bc4033e5bf94f1 Author: Sven Eckelmann sven@narfation.org Date: Tue Mar 23 09:44:14 2021 +0000
doc: batman-adv/Batman-adv-openwrt-config
554b819be29030fb43b4f82658bc4033e5bf94f1 batman-adv/Batman-adv-openwrt-config.textile | 121 ++++++++------------------- 1 file changed, 36 insertions(+), 85 deletions(-)
diff --git a/batman-adv/Batman-adv-openwrt-config.textile b/batman-adv/Batman-adv-openwrt-config.textile index 13d48f9a..63992707 100644 --- a/batman-adv/Batman-adv-openwrt-config.textile +++ b/batman-adv/Batman-adv-openwrt-config.textile @@ -4,11 +4,11 @@ h1. B.A.T.M.A.N. OpenWrt configuration
This page showcases some basic batman-adv configurations on OpenWrt including wireless & network setups. However, the goal is to provide not more than a starting point. For a full reference of the OpenWrt uci system please visit the official "OpenWrt uci documentation":https://wiki.openwrt.org/doc/uci.
-The configuration for the following common example is provided: One AP with a wireless adhoc interface is supposed to run batman-adv (essentially, the setup explained in our [[Quick-start-guide|Quick-start-guide]]). +The configuration for the following common example is provided: One AP with a wireless "adhoc" interface is supposed to run batman-adv (essentially, the setup explained in our [[Quick-start-guide|Quick-start-guide]]).
-h2. Batman-adv 2019.0-3 and newer +h2. Network Configuration
-With batman-adv 2019.0-3, the OpenWrt package was modified to better integrate in the netifd infrastructure. It now provides three different protos: +The batman-adv OpenWrt support provides three different protos:
* batadv_hardif ** network interface used by batadv meshif to transport the batman-adv packets @@ -20,33 +20,6 @@ With batman-adv 2019.0-3, the OpenWrt package was modified to better integrate i ** potential VLAN ID on top of batadv meshif ** allows filtering of traffic from specific VIDs
-The wireless configuration in '/etc/config/wireless': -<pre> -config wifi-device 'radio0' - option [..] - -config wifi-iface 'wmesh' - option device 'radio0' - option ifname 'mesh0' - option network 'bat0_hardif_mesh0' - option mode 'mesh' - option mesh_id 'mesh' - option mesh_fwding '0' - option mesh_ttl '1' - option 'mcast_rate' '24000' -</pre> - -It is assumed you configured the 'wifi-device' depending on your requirements and your hardware. The interesting part is the 'wifi-iface' stanza with its options: - -* 'device' points back to your radio (wifi-device) interface -* 'ifname' allows you to specify an arbitrary name for your adhoc/meshpoint interface -* 'network' points to the corresponding stanza in '/etc/config/network' -* 'mode' defines the wifi mode - 802.11s mesh(point) in our case -* 'mcast_rate' helps to avoid low bandwidth routes (routes with a lower throughput rate than the mcast rate will not be visible to batman-adv) -* 'mesh_id' is a basic wireless settings (like an SSID) you might want to set to your liking - -More information can be found in the "OpenWrt wireless configuration":https://wiki.openwrt.org/doc/uci/wireless - The first step is to create the "batadv" mesh interface (in our case "bat0") in /etc/config/network with the optional list of options:
<pre> @@ -92,14 +65,23 @@ config interface 'bat0_hardif_eth0' option master 'bat0' option mtu '1536' option ifname 'eth0' - option 'elp_interval' 500 option hop_penalty 15 # change throughput_override to 0 to use automatic detection; also allows kbit suffix option 'throughput_override' '1mbit' </pre>
The "bat0" batadv meshif can then be used like any other network device. It -can be added to bridges by adding "bat0" to the list of "ifnames" of the bridge. +can be added to bridges by adding "bat0" to the list of "ifnames" of the bridge like this: + +<pre> +# add bat0 to the lan bridge +config interface 'client' + option type 'bridge' + list ifname 'bat0' + ... +</pre> + + Or an IP can be configured using:
<pre> @@ -125,76 +107,45 @@ config interface 'my_bat_vlan1'
Any VLAN specific option can still be listed in the batadv meshif configuration for 'bat0' and in that case they will affect the behaviour only for the plain mesh interface (i.e. bat0 - the untagged LAN).
-h2. Batman-adv 2019.0-2 and older +h2. Wireless configuration + +batman-adv is not requiring a specific wireless interface. But it is nowadays often used with so called meshpoint interfaces with disabled forwarding. Such an interface can be configured in '/etc/config/wireless':
-The wireless configuration in '/etc/config/wireless': <pre> config wifi-device 'radio0' option [..]
config wifi-iface 'wmesh' option device 'radio0' - option ifname 'adhoc0' - option network 'bat0_hardif_wlan' - option mode 'adhoc' - option ssid 'mesh' - option 'mcast_rate' '18000' - option bssid '02:CA:FE:CA:CA:40' + option ifname 'mesh0' + option network 'bat0_hardif_mesh0' + option mode 'mesh' + option mesh_id 'mesh' + option mesh_fwding '0' + option mesh_ttl '1' + option 'mcast_rate' '24000' </pre>
It is assumed you configured the 'wifi-device' depending on your requirements and your hardware. The interesting part is the 'wifi-iface' stanza with its options:
* 'device' points back to your radio (wifi-device) interface -* 'ifname' allows you to specify an arbitrary name for your adhoc interface (which we are going to re-use later) +* 'ifname' allows you to specify an arbitrary name for your adhoc/meshpoint interface * 'network' points to the corresponding stanza in '/etc/config/network' -* 'mode' defines the wifi mode (adhoc in our case) +* 'mode' defines the wifi mode - 802.11s mesh(point) in our case * 'mcast_rate' helps to avoid low bandwidth routes (routes with a lower throughput rate than the mcast rate will not be visible to batman-adv) -* 'ssid' and 'bssid' are basic wireless settings you might want to set to your liking - -More information can be found in the "OpenWrt wireless configuration":https://wiki.openwrt.org/doc/uci/wireless - -The network configuration in '/etc/config/network' allows to specify batman-adv as protocol and the batman-adv interface name. It is also possible to add other interfaces (like eth0) to the same mesh interface: -<pre> -config interface 'bat0_hardif_wlan' - option mtu '1532' - option proto 'batadv' - option mesh 'bat0' - - -config interface 'bat0_hardif_eth0' - option mtu '1532' - option proto 'batadv' - option mesh 'bat0' - option ifname 'eth0' -</pre> +* 'mesh_id' is a basic wireless settings (like an SSID) you might want to set to your liking
-The batman-adv configuration in '/etc/config/batman-adv' only contains the batman-adv specific options: -<pre> -config mesh 'bat0' - option 'aggregated_ogms' - option 'ap_isolation' - option [..] -</pre>
-*Since batman-adv 2014.2.0* VLAN specific options have to be configured in a separated stanza having protocol 'batadv_vlan'. +If bat0 was added to the 'lan' bridge in the network configuration, then it is possible to just add another AP to the same bridge and let batman-adv transfer data from the AP interface over the mesh:
-In this particular section the user has to specify the name of the VLAN interface (that will be automatically created by netifd) and then list all the wanted options. At the moment the only available option for this section is 'ap_isolation': <pre> -config interface 'my_bat_vlan1' - option proto 'batadv_vlan' - option ifname 'bat0.1' - option ap_isolation '1' +config wifi-iface 'client_radio0' + option device 'radio0' + option ifname 'client0' + option network 'lan' + option mode 'ap' + option ssid 'my_test_network' + ... </pre>
-Any VLAN specific option can still be listed in the batman-adv configuration for 'bat0' and in that case they will affect the behaviour only for the plain mesh interface (i.e. bat0 - the untagged LAN). - - -*Since batman-adv 2016.1* The routing algorithm can be configured via the network configuration in '/etc/config/network' to override the kernel module's default: - -<pre> -config interface 'bat0_hardif_wlan' - option mtu '1532' - option proto 'batadv' - option mesh 'bat0' - option routing_algo 'BATMAN_V' -</pre> \ No newline at end of file +More information can be found in the "OpenWrt wireless configuration":https://wiki.openwrt.org/doc/uci/wireless \ No newline at end of file