Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:network:wifi:mesh:80211s [2024/08/22 22:52] – [iw dev <devname> station dump] Is this tedious! thomascrisandocs:guide-user:network:wifi:mesh:80211s [2024/09/03 12:40] – [IEEE 802.11s Wireless Mesh Networking] Add warning bluewavenet
Line 1: Line 1:
 ====== IEEE 802.11s Wireless Mesh Networking ====== ====== IEEE 802.11s Wireless Mesh Networking ======
  
-===== Introduction ===== 
  
-IEEE 802.11s is an open standard that defines how wireless devices can interconnect to form a wireless LAN mesh network within the existing IEEE 802.11 wireless framework. It was created to address the need for a standardised, flexible and scalable solution for wireless mesh networking, which extends the capabilities of wireless LANs by supporting dynamic, self-healing and multi-hop network typologies. A key advantage of mesh networking is that it can be implemented without wiring between wireless stations. Only one station in a wireless mesh network needs to be physically connected to the Internet, although larger networks often have more. More general and historical information can be found on Wikipedia; [[wp>IEEE 802.11s|802.11s]]. +<WRAP center round alert 60%
- +**WARNING! This document contains many errors and misconceptions.\\ 
-A IEEE 802.11s mesh operates on Layer 2 of the Open Systems Interconnection (OSI) model know as the [[wp>Data_link_layer|Data Link Layer]]. This layer uses the Media Access Control (MAC) sub-layer and the Logical Link Control (LLC) sub-layer. The MAC sub-layer manages how data packets are placed onto the network media and ensure that data is delivered to the correct device on a local network. Operating on the OSI Layer 2 is why the word “path” is used to describe communication between stations as opposed to “routes”. Other [[wp>Network_layer| Network Layer 3]] services such as routing, IP Addressing, Packet Forwarding, VPN, work on top of the OSI Layer 2+Many paragraphs are produced using an online LLM and added without any verification**
- +
-The range of IEEE 802.11s mesh applications is quite broad, covering various scenarios such as home and office networks, community networks, smart sites and event connectivity. There are also packages that add OSI Layer 3 support to an IEEE 802.11s mesh. Some examples are B.A.T.M.A.N. (Better Approach To Mobile Adhoc Networking), BIRD (BIRD Internet Routing Daemon, a recursive acronym), and OLSR (Optimised Link State Routing). The newer B.A.T.M.A.N.-Advanced (batman-adv) is implemented as a Linux kernel module ported to OpenWrt that operates at the data link layer, OSI layer 2. B.A.T.M.A.N.-Advanced handles routing and traffic using raw Ethernet frames. While these packages are typically aimed at large infrastructure scenarios, they can be implemented in OpenWrt along with a basic IEEE 802.11s mesh if you think you might need them, or just want to learn about them.+
  
 +</WRAP>
 + 
 +===== Preface =====
 +An IEEE 802.11s mesh has many applications, from small home and offices to enterprise level applications.  A small mesh network can be an excellent solution for placing remote Access Points (APs) throughout an area where running cables is impractical. In a mesh network:
 +  * APs communicate with each other using their own wireless channel instead of cabling.
 +  * When properly configured, APs automatically find each other and determine the best way to transmit information between stations.
 +===== Introduction =====
 +The purpose of this topic is to provide the necessary information for setting up an IEEE 802.11s mesh and to provide the necessary concepts, setup information and troubleshooting methods so that a set of OpenWrt routers can be used in a mesh configuration.
 +==== IEEE 802.11s: An Open Standard for Wireless Mesh Networks ====
 +IEEE 802.11 is an open standard that defines how wireless devices can interconnect to form a wireless LAN mesh network within the existing IEEE 802.11 wireless framework.  The current version is IEEE 802.11-2020, and this version has also been published as ISO/IEC/IEEE 8802-11:2022.  The version implemented in the Linux kernel, and therefore used in OpenWrt, is based on IEEE 802.11-2016. The first release of mesh networking in IEEE standards was IEEE 802.11s-2011, which was soon superseded by IEEE 802.11-2012.  The "s" was the amendment letter to the previous version of IEEE 802.11, hence the name IEEE 802.11s.
 +Key features include:
 +  * Standardized, flexible, and scalable solution for wireless mesh networking
 +  * Supports dynamic, self-healing, and multi-hop network typologies
 +  * Requires only one station to be physically connected to the Internet (though larger networks often have more)
 +  * Operates at OSI Level-2 using unique MAC addresses to communicate between stations
 +Historical information can be found on Wikipedia; [[wp>IEEE 802.11s|802.11s]].
 +==== Applications and Extensions ====
 +Some examples of applications of an IEEE 802.11s mesh are:
 +  * Home and office networks
 +  * Community networks
 +  * Smart sites
 +  * Event connectivity
 +These are some extensions to OpenWrt's implementation of IEEE 802.11s:
 +  * [[docs:guide-user:network:wifi:mesh:mesh11sd|Mesh11sd:]] a shell script daemon to assist in the setup and maintenance of a group of mesh stations
 +  * [[https://openwisp.org/|OpenWISP:]] is an open-source network management system designed to manage and automate various aspects of IT network deployment, monitoring, and management. It is built on top of OpenWrt
 +  * Layer 2 Support Packages:
 +    * [[docs:guide-user:network:wifi:mesh:batman|B.A.T.M.A.N.-Advanced]] (batman-adv)
 +  * Layer 3 Support Packages:
 +    * B.A.T.M.A.N. (Better Approach To Mobile Adhoc Networking)
 +    * BIRD (BIRD Internet Routing Daemon)
 +    * OLSR (Optimised Link State Routing)
 +==== Concepts & Terminology ====
 +For consistency, the terms and definitions used on this page are those used in the IEEE 802.11 standards.  This will hopefully eliminate ambiguities and allow ease of additional research to other sources of information.  To start, the first term is that IEEE 802.11s mesh points or nodes are called stations, also known as **STA**s.  A self-contained set of mesh stations is known at as a **Mesh Basic Service Set** or by the abbreviation **MBSS**. Here are the main types of stations that often make up a small to medium-sized MBSS.
 +  * **Mesh Point (MP)**: Mesh Points form the backbone of the mesh network by relaying data and participating in path selection. A mesh point is a basic station in the mesh network that is capable of establishing wireless mesh links with other MPs. MPs can relay frames to other MPs and participate in the mesh path selection protocol, thereby helping to create and maintain the mesh network topology.
 +  * **Mesh Portal (MPP)**: A mesh portal is a specialized station that connects the mesh network to other types of networks, such as Ethernet or another 802.11 network. In OpenWrt, MPPs serve as gateways, allowing data to flow between the mesh network and external networks. This is crucial for providing Internet access or integrating the mesh network with other network infrastructures.
 +  * **Mesh Access Point (MAP)**: A mesh access point is similar to a **Mesh Point (MP)**  but combines both mesh networking capabilities and traditional access point services. It can connect regular Wi-Fi clients (stations) to the mesh network, effectively acting as a bridge between client devices and the mesh infrastructure. MAPs are useful for extending network coverage and integrating client devices into the mesh.
 +  - 
 +^ {{:media:ieee-80211s-terms-a-mesh-portal-mpp-connects-to-the-wired-internet-a-mesh-point-mp.png?direct&700|}} ^
 +| https://www.researchgate.net/publication/3200401_The_IEEE_80211s_Extended_Service_Set_Mesh_Networking_Standard |
 ==== Caveats ===== ==== Caveats =====
-  * If you are looking for solution to enable your user devices to only [[docs:guide-user:network:wifi:roaming|seamlessly roam from one access point to another in your home, you need 802.11r (roaming) support]], not 802.11s+  * This page provides basic information on the learning, installation and setup of an IEEE 802.11s mesh on OpenWrt without additional mesh utilities.  The Mesh11sd package is not required to effectively setup basic IEEE 802.11s mesh.  This is not meant as a criticism of Mesh11sd; only to remedy incorrect information that is out there stating it is a requirement. 
-  * Unless explicitly stated, commercially available mesh stations do not comply with IEEE 802.11s features.  You cannot expect that an OpenWrt IEEE 802.11s mesh station will have all of the features of a commercial mesh station or vice-versa.  You also should not expect to mix OpenWrt OpenWrt IEEE 802.11s stations with commercially available stations+  * The Mesh11sd package is a shell script daemon that's meant to be a quicker and easier way to set up and maintain an IEEE 802.11s mesh in OpenWrt. For full details of the Mesh11sd package and ways to rapidly install your mesh, see: [[:docs:guide-user:network:wifi:mesh:mesh11sd]] and [[docs:guide-user:network:wifi:mesh:rapiddeployment|802.11s Rapid Deployment]]. **Do not install Mesh11sd if you are planning upon using B.A.T.M.A.N., B.A.T.M.A.N.-Advanced, or OLSR.** 
- +  * If you are looking for a solution to enable your user devices to only seamlessly roam from one access point to another in your home, you need to [[docs:guide-user:network:wifi:roaming|enable 802.11r Fast Transition]] to your Access Point channels
-This page provides information on installing and setting up an IEEE 802.11s mesh on OpenWrt without any additional add-on mesh programs+  * Unless explicitly stated, commercially available mesh stations do not comply with IEEE 802.11s features.  You cannot expect that an OpenWrt IEEE 802.11s mesh station will have all of the features of a commercial mesh station or vice-versa.  You also should not expect to mix OpenWrt IEEE 802.11s stations with commercially available stations. 
 + 
 ====== IEEE 802.11s Mesh on OpenWrt ====== ====== IEEE 802.11s Mesh on OpenWrt ======
  
Line 21: Line 57:
 The Standard for mesh networks used by OpenWrt is IEEE 802.11-2016.  The current standards are: US: IEEE-802.11-2020, International: ISO IEC IEEE 08802-11-2022, and of course, the UK: BS ISO IEC IEEE 08802-11-2022. The Standard for mesh networks used by OpenWrt is IEEE 802.11-2016.  The current standards are: US: IEEE-802.11-2020, International: ISO IEC IEEE 08802-11-2022, and of course, the UK: BS ISO IEC IEEE 08802-11-2022.
  
-==== IEEE 802.11s Mesh11sd ==== +
-The Mesh11sd package is a shell script that can be installed claims to be more rapid deployment method for IEEE 802.11s in OpenWrt than what is described in this page.  For full details of the Mesh11sd package see: [[:docs:guide-user:network:wifi:mesh:mesh11sd]] and [[docs:guide-user:network:wifi:mesh:rapiddeployment|802.11s Rapid Deployment]].  Do not install Mesh11sd if you are planning upon using B.A.T.M.A.N. or OLSR.+
  
 ===== Verifying IEEE 802.11s Support on a Router ===== ===== Verifying IEEE 802.11s Support on a Router =====
Line 67: Line 102:
 ===== Installation & Configuration ===== ===== Installation & Configuration =====
  
-If you want to run an encrypted mesh, you must install a version of ''wpad'' that supports mesh encryption. +If you want to run an encrypted mesh, you must install a version of ''wpad'' that supports mesh encryption.  Either the full or mesh-capable version of ''wpad'' is required.
- +
-At the time of writing, either the full or mesh-capable version of ''wpad'' is required.+
  
 Examples: Examples:
-  * ''wpad-mesh-openssl'' # The basic version + mesh support. +  * ''wpad-mesh-mbedtls'' # The basic version + mesh support. 
-  * ''wpad-openssl'' # The full large version.+  * ''wpad-mbedtls'' # The full large version.
   * ''wpad-mesh-wolfssl''   * ''wpad-mesh-wolfssl''
   * ''wpad-wolfssl''   * ''wpad-wolfssl''
-  * ''wpad-mesh-mbedtls'' +  * ''wpad-mesh-openssl'' 
-  * ''wpad-mbedtls''+  * ''wpad-openssl''
  
 **Installing support for Mesh Encryption:** **Installing support for Mesh Encryption:**
Line 171: Line 204:
 Every device you want to participate in the mesh must be configured in the same way ie same mesh_id, same channel, same key. Every device you want to participate in the mesh must be configured in the same way ie same mesh_id, same channel, same key.
  
-This wireless UCI configuration may be sufficient for a "mesh" of two or possibly three meshnodes that are fairly close together. +This wireless UCI configuration may be sufficient for a "mesh" of two or possibly three mesh stations as it uses reactive routing as there's no central entity that proactively maintains routes  To make your MBSS more responsive to larger number of nodes, a root station needs to be defined.  Usually the root station is the one providing access to the outside internet.  Defining a root station allows for proactive routing, where a central entity proactively maintains routes between stations and is done by defining the **`mesh_hwmp_rootmode`** option.  The different modes above define the mechanisms used in reactive and proactive routing.
-But an organic, autonomously self managing mesh network of many meshnodes requires additional configuration.+
  
 +The **`mesh_hwmp_rootmode`** setting is not available in LUCI but can be set in the `/etc/config/wireless file` .  The setting is an integer with possible values of 0 (default), 2, 3, or 4.   The following is a brief definition of the **`mesh_hwmp_rootmode`** possible settings:
 +
 +  * **Mode `0`** (not Root): This is default mode OpenWrt and ensures that the mesh point does not engage in any root-specific activities.  Mode `0` stations respond to root stations PREQs (Path Requests) with PREPs, (Path Responses).  A Mode `0`  station will store paths derived from PREQ it has received and PREPs from PREQs it has sent out
 +  * **Mode `2`** (Root with PREQ announcements only): This mode informs other mesh points of its presence as a root station managing paths.  It does this by sending out PREQs (Path Requests) but does not respond to PREQs with PREPs from other stations.
 +  * **Mode `3`** (Root with PREQ announcements and responds to other PREQs with PREPs): This mode periodically sending PREQ messages, to determine mesh station paths.  It will also respond to PREQs from other stations with PREPs.
 +  * **Mode `4`** (Root Proactive RANN announcements in addition to PREQ announcements PREP responses): A RANN message includes information such as the root station's address, a sequence number (to prevent routing loops and ensure the freshness of the information), and other metrics that can help in routing decisions.
 +Either Mode 3 or Mode 4 would be acceptable.
 +<code>
 +        ...
 +        option mesh_hwmp_rootmode '4'
 +        ...
 +</code>
 +The next important change you should make to this same portal and root station is **`mesh_gate_announcements`** which is used to enable or disable the announcement of a mesh gateways. This setting is important for informing other mesh stations about the presence of gateways that can provide access to external networks, such as the Internet. Only mesh stations that provide connectivity to external networks should have `mesh_gate_announcements` set to '1' so that regular mesh stations discover and maintain routes to the gateways, ensuring that traffic destined for external networks is efficiently routed.  The default is `0`.  The **Mesh Portal (MPP)** needs `mesh_gate_announcements` set to `1`.
 +<code>
 +        ...
 +        option mesh_gate_announcements '1'
 +        ...
 +</code>
 +Your pertinent section of your file should no look something like this:
 +<code>
 +config wifi-iface 'mesh'
 +        option device 'radio0'
 +        option disabled '0'
 +        option mode 'mesh'
 +        option ifname 'mesh0'
 +        option network 'lan'
 +        option mesh_id 'my-mesh-id'
 +        option encryption 'sae' # or 'none' if you do not want encryption
 +        option key 'your-secret-password'
 +        option mesh_hwmp_rootmode '3'
 +        option mesh_gate_announcements '1'
 +</code>       
 +Other options that can manually be set in the /etc/config/wireless file for your mesh are below.
  
 +**Note:** As time permits, the definitions of these options will be added.
 +  *     **''mesh_fwding''**: controls whether the mesh station will forward packets not destined for it. Setting mesh_fwding to 0 disables this behaviour, meaning that the station will only handle its own traffic and will not forward packets from other stations. This should only be set to 0 for some specific reason and only if any of the other mesh access points don't need to hop through this router to get to the mesh portal. For example, a low bandwidth router set up as a NAS (Network Attached Storage) device can use this setting to insure other traffic doesn't burden this device.
 +  *     **''mesh_rssi_threshold''**: is used to define the minimum signal strength (RSSI, Received Signal Strength Indicator) that a mesh station requires to establish and maintain a link with another mesh station. If the signal strength of a potential link falls.
 +  *     ifname
 +  *     macaddr
 +  *     dtim_period
 +  *     wpa_group_rekey
 +  *     max_inactivity
 +  *     max_listen_interval
 +  *     disassoc_low_ack
 +  *     network
 +  *     mesh_hwmp_rootmode
 +  *     **''mesh_ttl''**: is the mesh Time-To-Live value controlling the number of hops a mesh packet can traverse in the network. TTL settings (this one and the next) are used to limit the number of hops a packet can take before being discarded, preventing packets from circulating indefinitely and potentially causing network congestion.  With small personal mesh systems of less than 10 stations, this can be a small value, something no larger than 3 to 5 unless you have your mesh stations all in a single line requiring more hops.
 +  *     **''mesh_element_ttl''**: is the parameter that determines the mesh management frames Time-To-Live (TTL) hops.  Management frames are used for mesh routing and control purposes within the mesh network.  Again, for  small personal mesh systems of less than 10 stations, this can be a small value, something no larger than 3 to 5 unless you have an unusual arrangement of your mesh stations.  **''mesh_element_ttl''** applies to management frames used for network control and routing information dissemination, while **''mesh_ttl''** applies to data frames carrying actual user data.
 +  *     mesh_retry_timeout
 +  *     mesh_confirm_timeout
 +  *     mesh_holding_timeout
 +  *     mesh_sync_offset_max_neighor
 +  *     mesh_max_peer_links
 +  *     mesh_hwmp_active_path_timeout
 +  *     mesh_gate_announcements
 +  *     mesh_max_retries
 +  *     **''mesh_hwmp_max_preq_retries''** specifies the maximum number of times a mesh point (MP) will retry sending a Path Request (PREQ) message when trying to establish or update a route to another mesh point. For small to medium sized networks (up to 20 stations), 1 to 2 retries should to be sufficient.
 +  * **''mesh_max_peer_links''**: determines the maximum number of peer links (connections between mesh stations) that a single mesh station can establish. This parameter's role is in managing the connectivity and performance of the mesh network, especially as the network size and complexity increases.  For a small to medium sized network (up to 20 stations), a setting of 3 to 5 peer links per station should be sufficient.  A moderate number of peer links ensures reliable connectivity without overloading more distant individual stations.
 +  *     mesh_path_refresh_time
 +  *     mesh_hwmp_active_path_timeout
 +  *     mesh_hwmp_confirmation_interval
 +  *     mesh_gate_announcements
 +  *     mesh_hwmp_rann_interval
 +  *     mesh_hwmp_root_interval
 +  *     mesh_hwmp_active_path_to_root_timeout
  
 ===== Verify the Mesh Network is Working ===== ===== Verify the Mesh Network is Working =====
-These are some commands that are useful for debugging and monitoring the status and performance of your mesh network.  For <devname>, use the 'Interface Name' of your mesh channel.  An example is %%phy1-mesh0%%+These are some commands that are useful for debugging and monitoring the status and performance of your mesh network.  For <devname>, use the 'Interface Name' of your mesh channel.  An example is ''%%phy1-mesh0%%''
 <code> <code>
 iw dev <devname> station dump iw dev <devname> station dump
Line 209: Line 305:
 </code> </code>
  
-===== iw dev <devname> mpath dump =====+===== iw dev <IFACE> mpath dump =====
  
  
-This displays information about the all the active mesh paths to which the originating station is connected. Each line represents a route within the mesh network to reach a specific destination. This is a brief explanation of the fields:+This displays information about the all the active mesh paths to which the originating station is connected. Each line represents a route within the mesh network to reach a specific destination. ''%%IFACE%%'' is the Interface Name of your mesh channel.  This is a brief explanation of the fields:
  
   * **''%%Destination MAC Address%%'':** For each mesh path, it shows the MAC address of the destination station within the mesh network.   * **''%%Destination MAC Address%%'':** For each mesh path, it shows the MAC address of the destination station within the mesh network.
Line 236: Line 332:
  
  
-==== iw dev <devname> station dump ====+==== iw dev <IFACE> station dump ====
  
-This command provides information about the stations that are currently connected to the the specified wireless interface ''%%<dev_name>%%'' of the station from which you ran the command.+This command provides information about the stations that are currently connected to the the specified wireless interface ''%%<IFACE>%%'' of the station from which you ran the command.  ''%%<IFACE>%%'' is the Interface Name of your mesh channel.
  
   * **Station**: The first line of the groups of output is the MAC address of each connected station (station).   * **Station**: The first line of the groups of output is the MAC address of each connected station (station).
Line 289: Line 385:
   * [[http://www.cwnp.com/wp-content/uploads/pdf/802.11s_mesh_networking_v1.0.pdf|Old but useful historic information:]] from CWNP   * [[http://www.cwnp.com/wp-content/uploads/pdf/802.11s_mesh_networking_v1.0.pdf|Old but useful historic information:]] from CWNP
   * [[https://wireless.wiki.kernel.org/en/developers/Documentation/ieee80211/802.11s|Old but useful introduction to the 802.11s standard:]] from kernel.org   * [[https://wireless.wiki.kernel.org/en/developers/Documentation/ieee80211/802.11s|Old but useful introduction to the 802.11s standard:]] from kernel.org
-  * [[https://www.youtube.com/watch?v=vVoZppb_FR0 | A very outdated and somewhat misleading video that nevertheless serves as a basic introduction to 802.11s mesh networking: ]] on Youtube+  * [[https://www.youtube.com/watch?v=vVoZppb_FR0 | A basic but outdated introduction to setting up a IEEE 802.11s mesh with OpenWrt: ]] on Youtube 
 +  * [[https://openwisp.io/docs/dev/tutorials/mesh.html|Tutorial for setting up, managing and monitoring an 802.11s mesh network with OpenWISP]], a centralized controller for OpenWrt
  • Last modified: 2024/09/23 17:13
  • by taylorkline