Repository : ssh://git@diktynna/doc
On branch : main
commit 4024e8c3da2578462998b279c39616cc827d6639 Merge: d6308529 bdbc59ac Author: Sven Eckelmann sven@narfation.org Date: Sat Jun 12 15:37:06 2021 +0200
Merge branch 'backup-redmine/2021-06-12'
4024e8c3da2578462998b279c39616cc827d6639 batmand/Faq.rst | 2 +- open-mesh/Download.rst | 26 ++--- open-mesh/FAQ.rst | 4 +- open-mesh/Mixing_VM_with_gluon_hardware.rst | 2 +- open-mesh/News-draft.rst | 144 ++++++++++++++++++---------- open-mesh/OpenWrt_in_QEMU.rst | 4 +- 6 files changed, 112 insertions(+), 70 deletions(-)
diff --cc batmand/Faq.rst index 3d245d57,00000000..21b33bf9 mode 100644,000000..100644 --- a/batmand/Faq.rst +++ b/batmand/Faq.rst @@@ -1,102 -1,0 +1,102 @@@ +.. SPDX-License-Identifier: GPL-2.0 + +FAQ +=== + - See below a list of batmand (B.A.T.M.A.N. deamon) related questions and ++See below a list of batmand (B.A.T.M.A.N. daemon) related questions and +answers. + +If your question is not listed below, please contact us. You can contact +us via IRC: `#batman +channel https://webchat.freenode.net/?channels=batman`__ on +Freenode.org or by sending an e-mail to: b.a.t.m.a.n@lists.open-mesh.org +(only plain-text). + +Understanding the version and compatibility number +-------------------------------------------------- + +The version number (defined as SOURCE_VERSION in the source)is the one +displayed when launching the batmand in debug mode. It indicates the +state of your code. + +The compatibility number (defined as COMPAT_VERSION in the source) is +transmitted with every broadcasted OGM to guide other batmand instances +receiving this OGM whith the decision about incompatible protocol +versions. + +Why are multiple interfaces problematic? +---------------------------------------- + +The internet (and most network technology today) was designed with the +idea that every interface on a given system has a unique broadcast +adress. When a packet enters a system the kernel has to decide where it +should be routed to. While using the same broadcast adresses on +different interfaces you provoke an undefined situation as this should +not happen (by design) and the result is unpredictable. In that case the +Linux kernel will send all your packages to the first interface (in the +routing table) with that broadcast address. + +A solution to that problem is the usage of the Linux kernel option +"BINDTODEVICE" which allows to specify an outgoing interface for a +packet. Unfortunatly this option is a Linux-only feature (as far as we +know). Therefore you won't be able to use multiple interfaces with the +same broadcast addresses on other operation systems than Linux. + +Log larger amounts of debug messages +------------------------------------ + +First, install netcat on your device. On a OpenWRT based distro you can +try this (packet version may vary): + +:: + + ipkg install http://www.linuxops.net/ipkg/netcat_0.7.1_mipsel.ipk + +Then start batmand and pipe the output into netcat: + +:: + + batmand -d 4 | nc -l -p + +Finally start the netcat client on your logging server and save the +output: + +:: + + nc > batman.log + +If you use a firewall, NAT or any other problematic network setup you +can swap the netcat server position. Beware: Your netcat server has to +be started before you start your netcat client. + +Update many Openwrt based systems +--------------------------------- + +#. Download the update script: `update + script https://downloads.open-mesh.org/batman/useful-scripts-and-tools/update_batman.sh`__ +#. Edit the the variables in the configuration section of the script + to match your needs. +#. Run the script. ;-) + +Note: The HOSTS_TO_UPDATE variable in the script expects SSH host +names which must be configured in your ~/.ssh/config file. + +Tip: Use key based access to authenticate your login request on your +machines to avoid typing your passwords too often. If you use encrypted +keys you can enable the ssh-agent to manage your passwords. + +What is the batgat kernel module good for? +------------------------------------------ + +The batman daemon maintains a tunnel connection to every "batman +internet client". Every packet that goes to the internet or comes back +has to go through this tunnel. As it is a user space tunnel a lot of +copying between user space and kernel land is necessary. Depending on +the number of clients and the CPU power available this might be a +bottleneck. +The batgat kernel module tries to overcome this limitation. Once +loaded the batman daemon will detect its presence automatically on +startup. The daemon will activate the kernel module to let it handle +the tunneling, hence avoiding the expensive copy operations. There is +no difference between the daemon tunneling and the kernel tunneling +other than that. diff --cc open-mesh/Download.rst index 3ecd5bab,00000000..d90ebda9 mode 100644,000000..100644 --- a/open-mesh/Download.rst +++ b/open-mesh/Download.rst @@@ -1,256 -1,0 +1,258 @@@ +.. SPDX-License-Identifier: GPL-2.0 + +Download B.A.T.M.A.N. +===================== + +We are currently working on different branches. To get the details about +the differences of these branches, see our :doc:`Branches Explained page <BranchesExplained>`. + +Please use the maint branch for your public infrastructure unless you +know exactly what you are doing and are prepared for the big unknown. + +.. _open-mesh-download-download-released-source-code: + +Download Released Source Code +----------------------------- + +- The latest version of batman-adv is - `batman-adv-2021.0.tar.gz https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2021.0.tar.gz`__ - `md5 https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2021.0.tar.gz.md5`__ - `sha1 https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2021.0.tar.gz.sha1`__ - `asc https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2021.0.tar.gz.asc`__ ++ `batman-adv-2021.1.tar.gz https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2021.1.tar.gz`__ ++ `md5 https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2021.1.tar.gz.md5`__ ++ `sha1 https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2021.1.tar.gz.sha1`__ ++ `asc https://downloads.open-mesh.org/batman/stable/sources/batman-adv/batman-adv-2021.1.tar.gz.asc`__ +- The latest version of batctl (management and control tool for + batman-adv) is - `batctl-2021.0.tar.gz https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2021.0.tar.gz`__ - `md5 https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2021.0.tar.gz.md5`__ - `sha1 https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2021.0.tar.gz.sha1`__ - `asc https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2021.0.tar.gz.asc`__ ++ `batctl-2021.1.tar.gz https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2021.1.tar.gz`__ ++ `md5 https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2021.1.tar.gz.md5`__ ++ `sha1 https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2021.1.tar.gz.sha1`__ ++ `asc https://downloads.open-mesh.org/batman/stable/sources/batctl/batctl-2021.1.tar.gz.asc`__ +- The latest version of alfred (Almighty Lightweight Fact Remote + Exchange Daemon) is - `alfred-2021.0.tar.gz https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2021.0.tar.gz`__ - `md5 https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2021.0.tar.gz.md5`__ - `sha1 https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2021.0.tar.gz.sha1`__ - `asc https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2021.0.tar.gz.asc`__ ++ `alfred-2021.1.tar.gz https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2021.1.tar.gz`__ ++ `md5 https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2021.1.tar.gz.md5`__ ++ `sha1 https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2021.1.tar.gz.sha1`__ ++ `asc https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-2021.1.tar.gz.asc`__ + +- The latest stable version of batmand + (:ref:`unmaintained <open-mesh-BranchesExplained-batmand>`) is + `batman-0.3.2.tar.gz https://downloads.open-mesh.org/batman/releases/batman-0.3.2/batman-0.3.2.tar.gz`__ + `md5 https://downloads.open-mesh.org/batman/releases/batman-0.3.2/batman-0.3.2.tar.gz.md5`__ + `sha1 https://downloads.open-mesh.org/batman/releases/batman-0.3.2/batman-0.3.2.tar.gz.sha1`__ + `asc https://downloads.open-mesh.org/batman/releases/batman-0.3.2/batman-0.3.2.tar.gz.asc`__ +- The latest version of the vis server for the batmand (package not + needed for batman-adv) is + `vis-0.3.2.tar.gz https://downloads.open-mesh.org/batman/releases/batman-0.3.2/vis-0.3.2.tar.gz`__ + `md5 https://downloads.open-mesh.org/batman/releases/batman-0.3.2/vis-0.3.2.tar.gz.md5`__ + `sha1 https://downloads.open-mesh.org/batman/releases/batman-0.3.2/vis-0.3.2.tar.gz.sha1`__ + `asc https://downloads.open-mesh.org/batman/releases/batman-0.3.2/vis-0.3.2.tar.gz.asc`__ + +If you are wondering whether batman-adv or batmand might suit your setup +better, have a look at :doc:`this page </batman-adv/Wiki>`. Please note that +the development is focusing on batman-adv at the moment. + +To download previous release tarballs, simply check out our `download +section https://downloads.open-mesh.org/batman/releases/`__. + +If you find any bugs, please :doc:`let us know <Contribute>`! + +Git Repository Access +--------------------- + +Since we started integrating the batman-adv kernel module into the +mainline Linux tree, we maintain a git repository which contains the +batman-adv maintenance branches. More information can be found +:doc:`on our git page <UsingBatmanGit>`. +On overview about all the git repositories can be found on our `git +frontend https://git.open-mesh.org`__. We also host individual +repositories for development related to batman or meshing in general. +Feel free to contact us if you are interested in getting a repository +too. + +batman-adv in the Linux tree +---------------------------- + +Since linux 2.6.33 batman-adv is part of the official linux tree. You +can build batman-adv along with your linux binary by simply selecting +batman-adv in the Linux drivers section. If you want to have access to +the latest features on a non-bleeding edge kernel, you can clone our +git repository which still are backward compatible to all +stable/longterm kernels. + +It follows an overview of linux versions and the batman-adv version they +contain, so that you can easily pick the compatible batctl packages: + +- linux 2.6.33 => batman-adv 0.2.0 (get batctl 0.2.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.34 => batman-adv 0.2.1 (get batctl 0.2.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.35 => batman-adv 2010.0.x (get batctl 2010.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.36 => batman-adv 2010.1.x (get batctl 2010.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.37 => batman-adv 2010.2.x (get batctl 2010.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.38 => batman-adv 2011.0.x (get batctl 2011.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 2.6.39 => batman-adv 2011.1.x (get batctl 2011.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.0 => batman-adv 2011.2.x (get batctl 2011.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.1 => batman-adv 2011.3.x (get batctl 2011.3.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.2 => batman-adv 2011.4.x (get batctl 2011.4.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.3 => batman-adv 2012.0.x (get batctl 2012.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.4 => batman-adv 2012.1.x (get batctl 2012.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.5 => batman-adv 2012.2.x (get batctl 2012.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.6 => batman-adv 2012.3.x (get batctl 2012.3.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.7 => batman-adv 2012.4.x (get batctl 2012.4.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.8 => batman-adv 2013.0.x (get batctl 2013.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.9 => batman-adv 2013.1.x (get batctl 2013.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.10 => batman-adv 2013.2.x (get batctl 2013.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.11 => batman-adv 2013.3.x (get batctl 2013.3.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.12 => batman-adv 2013.4.x (get batctl 2013.4.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.13 => batman-adv 2014.0.x (get batctl 2014.0.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ + NOTE: in-kernel version number is 2013.5.0 +- linux 3.14 => batman-adv 2014.1.x (get batctl 2014.1.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.15 => batman-adv 2014.2.x (get batctl 2014.2.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.16 => batman-adv 2014.3.x (get batctl 2014.3.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 3.17-3.19 => batman-adv 2014.4.x (get batctl 2014.4.x from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.0-4.1 => batman-adv 2015.0 (get batctl 2015.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/`__ +- linux 4.2-4.3 => batman-adv 2015.1 (get batctl 2015.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.4 => batman-adv 2015.2 (get batctl 2015.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.5 => batman-adv 2016.0 (get batctl 2016.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.6 => batman-adv 2016.1 (get batctl 2016.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.7 => batman-adv 2016.2 (get batctl 2016.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.8 => batman-adv 2016.3 (get batctl 2016.3 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.9 => batman-adv 2016.4 (get batctl 2016.4 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.10 => batman-adv 2016.5 (get batctl 2016.5 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.11 => batman-adv 2017.0.1 (get batctl 2017.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.12 => batman-adv 2017.1 (get batctl 2017.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.13 => batman-adv 2017.2 (get batctl 2017.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.14 => batman-adv 2017.3 (get batctl 2017.3 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.15 => batman-adv 2017.4 (get batctl 2017.4 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.16 => batman-adv 2018.0 (get batctl 2018.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.17 => batman-adv 2018.1 (get batctl 2018.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.18 => batman-adv 2018.2 (get batctl 2018.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.19 => batman-adv 2018.3 (get batctl 2018.3 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 4.20 => batman-adv 2018.4 (get batctl 2018.4 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.0 => batman-adv 2019.0 (get batctl 2019.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.1 => batman-adv 2019.1 (get batctl 2019.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.2 => batman-adv 2019.2 (get batctl 2019.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.3 => batman-adv 2019.3 (get batctl 2019.3 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.4 => batman-adv 2019.4 (get batctl 2019.4 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.5 => batman-adv 2019.5 (get batctl 2019.5 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.6 => batman-adv 2020.0 (get batctl 2020.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.7 => batman-adv 2020.1 (get batctl 2020.1 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.8 => batman-adv 2020.2 (get batctl 2020.2 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.9 => batman-adv 2020.3 (get batctl 2020.3 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.10 => batman-adv 2020.4 (get batctl 2020.4 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ +- linux 5.11 => batman-adv 2021.0 (get batctl 2021.0 from + `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ ++- linux 5.13 => batman-adv 2021.0 (get batctl 2021.1 from ++ `here https://downloads.open-mesh.org/batman/stable/sources/batctl/)`__ + +Arch Linux +---------- + +Batman-adv and Batctl are avaible in the +`AUR https://wiki.archlinux.org/index.php/AUR`__ as PKGBUILD: + +- `batctl https://aur.archlinux.org/packages/batctl/`__ - Latest + Batctl +- `batman-adv https://aur.archlinux.org/packages/batman-adv/`__ - + Latest Batman-adv +- `batman-adv-v14 https://aur.archlinux.org/packages/batman-adv-v14/`__ + - Last Batman-adv with compability-version 14 (2013.4) +- `batctl-v14 https://aur.archlinux.org/packages/batctl-v14/`__ - + Last Batctl with compability-version 14 (2013.4) + +Debian +------ + +Use apt-get (or any other dpkg frontend of choice) to install +B.A.T.M.A.N. onto your debian machine. Following packages are available: + +- `alfred https://packages.debian.org/sid/alfred`__ +- `batmand https://packages.debian.org/sid/batmand`__ +- `batctl https://packages.debian.org/sid/batctl`__ +- `linux https://packages.debian.org/source/unstable/linux`__ - + batman-advanced kernel module as `part of the + official https://bugs.debian.org/622361`__ kernel packages + +Similar packages are also available through `Ubuntu +universe https://help.ubuntu.com/community/Repositories/Ubuntu`__ . + +Gentoo +------ + +Use emerge to build B.A.T.M.A.N. on your gentoo machine. Following +ebuilds are available: + +- `net-misc/batctl https://packages.gentoo.org/packages/net-misc/batctl`__ +- `net-misc/batman-adv https://packages.gentoo.org/packages/net-misc/batman-adv`__ + +openSUSE +-------- + +- `network:utilities / + batctl https://build.opensuse.org/package/show?package=batctl&project=network%3Autilities`__ +- the batman-adv module is available as module in the official kernel + packages + +Building OpenWRT packages +------------------------- + +B.A.T.M.A.N. is also included in OpenWRT as a package. Download the +extra package feed, link the batman folder into your main OpenWRT svn +directory and use "make menuconfig" to select the B.A.T.M.A.N. flavor +you intend to use. This enables you to integrate B.A.T.M.A.N. seamlessly +into your builds (see :doc:`this page </batman-adv/Building-with-openwrt>` for +a detailed explanation). + +More information about how to build the OpenWRT toolchain is available +`here https://wiki.openwrt.org/doc/howto/build`__. diff --cc open-mesh/FAQ.rst index 086804dd,00000000..dfe7e9b9 mode 100644,000000..100644 --- a/open-mesh/FAQ.rst +++ b/open-mesh/FAQ.rst @@@ -1,17 -1,0 +1,17 @@@ +.. SPDX-License-Identifier: GPL-2.0 + +FAQ +=== + +- Do you have questions about **B.A.T.M.A.N. Advanced** (batman-adv)? + :ref:`Please, see wiki page <batman-adv-Faq-BATMAN-Advanced-Questions>` + - - Do you have B.A.T.M.A.N. Advanced **Brigde Loop Avoidance** related ++- Do you have B.A.T.M.A.N. Advanced **Bridge Loop Avoidance** related + questions? + :ref:`Please, see wiki page <batman-adv-Faq-BATMAN-Advanced-Bridge-Loop-Avoidance-questions>` + - - Do you have questions about **B.A.T.M.A.N. deamon** (batmand)? ++- Do you have questions about **B.A.T.M.A.N. daemon** (batmand)? + :doc:`Please, see wiki page </batmand/Faq>` + +- Or do you have **general** questions about B.A.T.M.A.N.? + :ref:`Please, see wiki page <batman-adv-Faq-BATMAN-General-questions>` diff --cc open-mesh/Mixing_VM_with_gluon_hardware.rst index 148643df,00000000..83b5c6f2 mode 100644,000000..100644 --- a/open-mesh/Mixing_VM_with_gluon_hardware.rst +++ b/open-mesh/Mixing_VM_with_gluon_hardware.rst @@@ -1,85 -1,0 +1,85 @@@ +.. SPDX-License-Identifier: GPL-2.0 + +Mixing VM with gluon hardware +============================= + +The `freifunk gluon https://github.com/freifunk-gluon/gluon`__ +firmware is a relative common framework to create OpenWrt based firmware +images for mesh networks with central VPN servers. The +:doc:`emulation environments <Emulation_Environment>` +using Linux bridge as +virtual network can be directly connected to a device running a gluon +firmware. + +|image0| + +gluon adjustments +----------------- + +The current gluon version allows to change the LAN (or WAN) ports to +mesh ports. This can either be enabled in the setup mode webinterface or +using the `commandline +interface https://github.com/freifunk-gluon/gluon/wiki/Commandline-administration#mesh-on-lan`__. + +The packets will be encapsulated in a VXLAN packet. The VXLAN uses an id +which has to be calculated on the node via: + +.. code-block:: sh + + lua -e 'print(tonumber(require("gluon.util").domain_seed_bytes("gluon-mesh-vxlan", 3), 16))' + +Connect to gluon VXLAN +---------------------- + +The configured gluon hardware has to be connected via ethernet to the +our emulation host. Let us assume that the host is using interface +enp8s0 for this connection and that the qemu instances are all connected +to bridge br-qemu. + +We must then create a vxlan interface on top of our normal ethernet +interface, make sure that the ethernet interface is using an EUI64 based +IPv6 link local address and insert the new interface in our bridge + +.. code-block:: sh + + cat > virtual-network-add-vxlan.sh << "EOF" - #! /bin/sh ++ #! /bin/bash + + BRIDGE=br-qemu + ETH=enp8s0 + VXLAN=vx_mesh_lan + # calculated on gluon node + VXLAN_ID=12094920 + + xor2() { + echo -n "${1:0:1}" + echo -n "${1:1:1}" | tr '0123456789abcdef' '23016745ab89efcd' + } + + interface_linklocal() { + local macaddr="$(cat /sys/class/net/"${ETH}"/address)" + local oldIFS="$IFS"; IFS=':'; set -- $macaddr; IFS="$oldIFS" + + echo "fe80::$(xor2 "$1")$2:$3ff:fe$4:$5$6" + } + + ip addr add "$(interface_linklocal)"/64 dev "$ETH" + ip link del "${VXLAN}" + ip -6 link add "${VXLAN}" type vxlan \ + id "${VXLAN_ID}" \ + dstport 4789 \ + local "$(interface_linklocal)" \ + group ff02::15c \ + dev "${ETH}" \ + udp6zerocsumtx udp6zerocsumrx \ + ttl 1 + + ip link set "${VXLAN}" up master "${BRIDGE}" + EOF + + chmod +x virtual-network-add-vxlan.sh + + sudo ./virtual-network-add-vxlan.sh + +.. |image0| image:: gluon-vxlan.svg + diff --cc open-mesh/News-draft.rst index 46417022,00000000..1b31d8f7 mode 100644,000000..100644 --- a/open-mesh/News-draft.rst +++ b/open-mesh/News-draft.rst @@@ -1,147 -1,0 +1,187 @@@ +.. SPDX-License-Identifier: GPL-2.0 + - DRAFT: Batman-adv 2021.0 released ++DRAFT: Batman-adv 2021.1 released +================================= + - Jan 5th, 2021. Today the B.A.T.M.A.N. team publishes the January 2021 - update to batman-adv, batctl and alfred! The deprecated support for - batman-adv���s sysfs and debugfs files was removed from all components. - batctl and batman-adv now also allow the selection of the routing - algorithm during the interface creation. This can be used to avoid the - undefined behavior when multiple processes trying to create interfaces - with different routing algorithms. Also several bugfixes and code ++May 18th, 2021. Today the B.A.T.M.A.N. team publishes the May 2021 ++update to batman-adv, batctl and alfred! batctl gained the support for ++���*_json��� commands which make it possible to query the batman-adv kernel ++module over generic netlink and receive the answer as JSON. The alfred ++server was modified to start the server even when batman-adv or ++interface(s) are not yet available. A special parameter ������force��� must be ++provided to enable this behavior. Also several bugfixes and code +cleanups are included in this version. + +As the kernel module always depends on the Linux kernel it is compiled +against, it does not make sense to provide binaries on our website. As +usual, you will find the signed tarballs in our download section: + - https://downloads.open-mesh.org/batman/releases/batman-adv-2021.0/ ++https://downloads.open-mesh.org/batman/releases/batman-adv-2021.1/ + +Thanks +------ + +Thanks to all people sending in patches: + ++* Alexander Sarmanow asarmanow@gmail.com ++* Leon Romanovsky leonro@nvidia.com ++* Linus L��ssing linus.luessing@c0d3.blue ++* Masahiro Yamada masahiroy@kernel.org ++* Sebastian Andrzej Siewior bigeasy@linutronix.de ++* Taehee Yoo ap420073@gmail.com +* Sven Eckelmann sven@narfation.org +* Simon Wunderlich sw@simonwunderlich.de - * Taehee Yoo ap420073@gmail.com ++* Tetsuo Handa penguin-kernel@I-love.SAKURA.ne.jp + +and to all those that supported us with good advice or rigorous testing: + - * Linus L��ssing linus.luessing@c0d3.blue ++* Marek Lindner mareklindner@neomailbox.ch + +batman-adv +---------- + +:: + + $ git describe origin/master - v2020.4-15-g47df68d0 - $ range=v2020.4..v2020.4-15-g47df68d0 ++ v2021.0-14-g007b4c4b ++ $ range=v2021.0..v2021.0-14-g007b4c4b + $ git shortlog --email --no-merges "${range}" + $ git log --no-merges "${range}"|grep -e '(Reported|Tested|Acked|Reviewed-by|Co-authored-by)-by'|sed 's/.*:/*/'|sort|uniq + + ++ ++ new kernel version ++ ================== ++ ++ batman-adv: convert ifmcaddr6 to RCU ++ batman-adv: Use netif_rx_any_context(). ++ batman-adv: remove never implemented MODULE_SUPPORTED_DEVICE ++ + coding style cleanup/refactoring + ================================ + - batman-adv: Drop deprecated sysfs support - batman-adv: Drop deprecated debugfs support - batman-adv: Drop legacy code for auto deleting mesh interfaces - batman-adv: Drop unused soft-interface.h include in fragmentation.c - batman-adv: Add new include for min/max helpers ++ batman-adv: Update copyright years for 2021 ++ batman-adv: Avoid sizeof on flexible structure ++ batman-adv: Fix names for kernel-doc blocks ++ batman-adv: Drop publication years from copyright info ++ batman-adv: Fix misspelled "wont" ++ batman-adv: remove redundant 'depends on NET' ++ batman-adv: Fix order of kernel doc in batadv_priv + + various + ======= + - batman-adv: Prepare infrastructure for newlink settings - batman-adv: Allow selection of routing algorithm over rtnetlink + + bugfixes + ======== + - (batman-adv: set .owner to THIS_MODULE) - batman-adv: Consider fragmentation for needed_headroom - batman-adv: Reserve needed_*room for fragments - batman-adv: Don't always reallocate the fragmentation skb head ++ batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field + + - 2021.0 (2021-01-05) ++ 2021.1 (2021-05-18) + =================== + - * support latest kernels (4.4 - 5.11) ++ * support latest kernels (4.4 - 5.13) + * coding style cleanups and refactoring - * drop support for sysfs+debugfs - * allow to select routing algorithm during creation of interface + * bugs squashed: + - - allocate enough reserved room on fragments for lower devices ++ - correctly initialize padding when sending out translation table TVLVs + +batctl +------ + +:: + + $ git describe origin/master - v2020.4-10-ga0da92b - $ range=v2020.4..v2020.4-10-ga0da92b ++ v2021.0-38-g35d8327 ++ $ range=v2021.0..v2021.0-38-g35d8327 + $ git shortlog --email --no-merges "${range}" + $ git log --no-merges "${range}"|grep -e '(Reported|Tested|Acked|Reviewed-by|Co-authored-by)-by'|sed 's/.*:/*/'|sort|uniq + + + features + ======== + - batctl: Allow to configure routing_algo during interface creation ++ batctl: netlink: Make netlink_query_common non-static ++ batctl: genl_json: Add generic JSON interface ++ batctl: Introduce JSON_* command types ++ batctl: Introduce handler for JSON_* command types ++ batctl: Add neighbors_json command ++ batctl: Add originators_json command ++ batctl: Add transtable_global_json command ++ batctl: Add transtable_local_json command ++ batctl: Consume genl ACKs after setting reads ++ batctl: throughputmeter: Use global genl socket ++ batctl: interface: List using shared genl socket ++ batctl: Get meshif info using shared genl socket ++ batctl: Use common genl socket for netlink_query_common ++ batctl: routing_algo: List using shared genl socket ++ batctl: originators: Get outgoing ifname from netlink ++ batctl: neighbors: Get outgoing ifname from netlink ++ batctl: ping: Get outgoing ifname from netlink ++ batctl: event: Get ifname from netlink message ++ batctl: Realign netlink_policy array ++ batctl: translocal: Simplify evaluation of last_seen ++ batctl: netlink: Allow to use netlink_query_common hardif/vlan ++ batctl: Add bla_backbone_json command ++ batctl: Add bla_claim_json command ++ batctl: Add dat_cache_json command ++ batctl: Add gateways_json command ++ batctl: Add hardif_json command ++ batctl: Add hardifs_json command ++ batctl: Add mcast_flags_json command ++ batctl: Add mesh_json command ++ batctl: Add vlan_json command ++ + + coding style cleanup/refactoring + ================================ + - batctl: Switch active routing algo list to netlink - batctl: Drop deprecated debugfs support - batctl: Drop deprecated sysfs support ++ batctl: Fix build of routing_algo against musl ++ batctl: Update copyright years for 2021 ++ batctl: Drop publication years from copyright info ++ batctl: Avoid boolean in structures ++ batctl: Reorder and clean up README ++ batctl: Don't mention log command in manpage + + bugfixes + ======== + - batctl: Fix retrieval of meshif ap_isolation - batctl: Don't stop when create_interface detected existing interface + + - 2021.0 (2021-01-05) ++ 2021.1 (2021-05-18) + =================== + - * Drop support for batman-adv's sysfs+debugfs - * allow to select routing algorithm during creation of interface - * bugs squashed: - - - fix query of meshif's ap_isolation status - - ignore "interface already exists" error during "interface add" ++ * add various commands to print generic netlink replies as JSON ++ * coding style cleanups and refactoring + +alfred +------ + +:: + + $ git describe origin/master - v2020.4-5-gbdd9fc8 - $ range=v2020.4..v2020.4-5-gbdd9fc8 ++ v2021.0-7-ge9a3bfc ++ $ range=v2021.0..v2021.0-7-ge9a3bfc + $ git shortlog --email --no-merges "${range}" + $ git log --no-merges "${range}"|grep -e '(Reported|Tested|Acked|Reviewed-by|Co-authored-by)-by'|sed 's/.*:/*/'|sort|uniq + + - - alfred: Drop deprecated debugfs support - alfred: Drop deprecated sysfs support - alfred: Sync batman-adv netlink uapi header ++ Sven Eckelmann sven@narfation.org (6): ++ alfred: Update copyright years for 2021 ++ alfred: Drop publication years from copyright info ++ alfred: Show error message for invalid batadv interface ++ alfred: Allow exactly one interface for secondary mode ++ alfred: Save global mode flags in bitfield ++ alfred: Allow start of server without valid interface + + - 2021.0 (2021-01-05) ++ 2021.1 (2021-05-18) + =================== + - * Drop support for batman-adv's sysfs+debugfs ++ * Allow to force of alfred startup when the interfaces don't work/exist (yet) ++ * coding style cleanups and refactoring + +Happy routing, + +The B.A.T.M.A.N. team diff --cc open-mesh/OpenWrt_in_QEMU.rst index 7fd1ebb0,00000000..9d297257 mode 100644,000000..100644 --- a/open-mesh/OpenWrt_in_QEMU.rst +++ b/open-mesh/OpenWrt_in_QEMU.rst @@@ -1,224 -1,0 +1,224 @@@ +.. SPDX-License-Identifier: GPL-2.0 + +OpenWrt in QEMU +=============== + +The :ref:`simple emulation architecture <open-mesh-emulation-environment-architecture>` +can be implemented rather easily using qemu and an x86_64 +image from OpenWrt. + +|image0| + +OpenWrt preparation +------------------- + +It is possible to just use an x86_64 which was `downloaded from +OpenWrt���s +servers https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-x86-64-combined-ext4.img.gz`__. +But it is highly recommended to build an own image which: + +* enables the routing protocols (like batman-adv) from the + `openwrt-routing feed https://git.openwrt.org/?p=feed/routing.git;a=summary`__. +* enables the 9p filesystem (and virtio) +* integrates its own startup scripts (for automatic test initialization + and shared path support) via ``files/etc/rc.local`` + +.. code-block:: sh + + mkdir -p files/etc/ + cat > files/etc/rc.local << "EOF" + #!/bin/sh + + mkdir -p /host + mount -t 9p host /host + [ ! -x /host/test-init.sh ] || /host/test-init.sh + EOF + +The shared path is a folder from the host system which is mapped via 9p +into all virtual instances. It can be used to exchange files between the +instances and the host. + +The openwrt build result openwrt-x86-64-combined-ext4.img.gz has to be +extracted and copied to the path with the other scripts. + +Start scripts for the simple environment +---------------------------------------- + +The virtual instances and the virtual network will be started using a +set of simple scripts. This simplifies everything and makes the setup +more reproducible. + +.. _open-mesh-openwrt-in-qemu-virtual-network-initialization: + +virtual network initialization +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The virtual network (bridge br-qemu with 3 tap devices) has to be +started first to have a simple network. All devices in this virtual +network can talk to each other - which is not optimal for tests but +enough for a start. More complex network setups can be on the pages +:doc:`Vde_switch_virtual_network` and :doc:`Advanced_Bridge_virtual_network`. + +The tap interfaces will be created with access rights for the current +user. This allows the qemu instance to start up without being root. + +.. code-block:: sh + + cat > virtual-network.sh << "EOF" + #! /bin/sh + + USER="$(whoami)" + BRIDGE=br-qemu + NUM_SESSIONS=3 + + sudo ip link add "${BRIDGE}" type bridge + for i in $(seq 1 "${NUM_SESSIONS}"); do + sudo ip tuntap add dev tap$i mode tap user "$USER" + sudo ip link set tap$i up + sudo ip link set tap$i master "${BRIDGE}" + done + + sudo ip link set "${BRIDGE}" up + sudo ip addr replace 192.168.251.1/24 dev "${BRIDGE}" + EOF + + chmod +x virtual-network.sh + +.. _open-mesh-openwrt-in-qemu-vm-instances-bringup: + +VM instances bringup +~~~~~~~~~~~~~~~~~~~~ + +Each instance will need to write to the provided image. If the same +image is specified as drive for each instance then writes to this file +would conflict and data corruption be the result. To avoid this, each +instance gets its own (copy on write) snapshot of the base image. + +The three node environment must be started inside a screen session. Each +instance will end up in an own screen window. This allows access to the +serial console of each instance while having each instance���s output +separated from each other. + +The qemu instance is started in a rather specific way to enable all +features which might be needed during the test: + +* KVM is enabled to speed up the virtual instances (by avoiding slow + emulation as much as possible) +* no graphic display is activated +* serial output is enabled for kernel output and login shell +* 2 core SMP is activated to better see effects of multicore systems +* 512 MB RAM is provided to the virtual instance + (`KSM https://en.wikipedia.org/wiki/Kernel_same-page_merging`__ + should be activated in setups with larger number of virtual + instances) +* a NIC is connected to the tap interface (from the virtual network) to + transport mesh (and other) traffic +* a user NIC is created to transport (NAT���ed) traffic to/from the + internet +* a shared path from host is provided for the client +* the qemu gdb server is enabled to allow + :doc:`kernel debugging <Kernel_debugging_with_qemu's_GDB_server>` + +The ``SHARED_PATH`` in run.sh has to be changed to a valid path which is +used to share things like a precompiled batman-adv.ko and other tools + +.. code-block:: sh + + cat > run.sh << "EOF" + #! /bin/bash + + BOOTARGS=() + + if [ -z "${STY}" ]; then + echo "must be started inside a screen session" >&2 + exit 1 + fi + + SHARED_PATH="$(pwd)" + NUM_SESSIONS=3 + + ## OpenWrt in QEMU + BASE_IMG=openwrt-x86-64-combined-ext4.img + BOOTARGS+=("-serial" "chardev:charconsole0") + + ## Kernel hacking Debian image + #BASE_IMG=debian.img - #BOOTARGS+=("-bios" "qboot/bios.bin") ++ #BOOTARGS+=("-bios" "qboot/build/bios.bin") + #BOOTARGS+=("-kernel" "linux-next/arch/x86/boot/bzImage") - #BOOTARGS+=("-append" "root=/dev/vda rw console=hvc0 nokaslr tsc=reliable no_timer_check noreplace-smp rootfstype=ext4 rcupdate.rcu_expedited=1 reboot=t pci=lastbus=0 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1") ++ #BOOTARGS+=("-append" "root=/dev/vda rw console=hvc0 nokaslr tsc=reliable no_timer_check noreplace-smp rootfstype=ext4 rcupdate.rcu_expedited=1 reboot=t pci=lastbus=0 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1 no_hash_pointers") + #BOOTARGS+=("-device" "virtconsole,chardev=charconsole0,id=console0") + + for i in $(seq 1 "${NUM_SESSIONS}"); do + if [ ! -e "/sys/class/net/tap${i}" ]; then + echo "hub script must be started first to create tap$i interface" >&2 + exit 1 + fi + done + + for i in $(seq 1 "${NUM_SESSIONS}"); do + normalized_id="$(echo "$i"|awk '{ printf "%02d\n",$1 }')" + twodigit_id="$(echo $i|awk '{ printf "%02X", $1 }')" + + qemu-img create -b "${BASE_IMG}" -f qcow2 root.cow$i + screen qemu-system-x86_64 -enable-kvm -name "instance${i}" \ + -display none -no-user-config -nodefaults \ + -m 512M,maxmem=2G,slots=2 -device virtio-balloon \ + -cpu host -smp 2 -machine q35,accel=kvm,usb=off,dump-guest-core=off \ + -drive file=root.cow$i,if=virtio,cache=unsafe \ + -nic tap,ifname=tap$i,script=no,downscript=no,model=virtio,mac=02:ba:de:af:fe:"${twodigit_id}" \ + -nic user,model=virtio,mac=06:ba:de:af:fe:"${twodigit_id}" \ + -virtfs local,path="${SHARED_PATH}",security_model=none,mount_tag=host \ + -gdb tcp:127.0.0.1:$((23000+$i)) \ + -device virtio-rng \ + -device virtio-serial,id=virtio-serial \ + -chardev stdio,id=charconsole0,mux=on,signal=off -mon chardev=charconsole0,mode=readline \ + "${BOOTARGS[@]}" + sleep 1 + done + EOF + + chmod +x run.sh + +.. _open-mesh-openwrt-in-qemu-automatic-test-initialization: + +Automatic test initialization +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The test-init.sh script in the SHARED_PATH can be used to automatically +initialize the test setup during boot. A simple example is: + +.. code-block:: sh + + cat > test-init.sh << "EOF" + #! /bin/sh + + set -e + + ## Simple batman-adv setup + + rmmod batman-adv || true + modprobe batman-adv + batctl routing_algo BATMAN_IV + batctl if add eth0 + batctl it 5000 + ip link set up dev eth0 + ip link set up dev bat0 + EOF + + chmod +x test-init.sh + +.. _open-mesh-openwrt-in-qemu-start: + +Start +----- + +Everything can then be started up inside a screen session + +.. code-block:: sh + + screen + ./virtual-network.sh + ./run.sh + +.. |image0| image:: openwrt_in_qemu.svg +