FreeBSD 802.11: | WiFi Main Page |

802.11s Wireless Mesh Networking


A wireless mesh network, sometimes called WMN, is a typical wireless network but using a mesh topology instead. These networks are often seen as special ad-hoc networks since there's no central node that will break connectivity (in contrast with common wireless networks that you have at home/office, where there's a central Access Point). 802.11s is an amendment to the 802.11-2007 wireless standard that describes how a mesh network should operate on top of the existing 802.11 MAC. If you want to know more, check the resources section. You may already know about the Wireless Distribution System, WDS for short, and if you do, just think of 802.11s as the standard that will expand and unite WDS. Note that 802.11s is much more complex than WDS (for example, 802.11s includes a routing protocol, an airtime link metric protocol and a congestion control signaling protocol, just to name a few).

This project aims to implement the upcoming 802.11s wireless mesh standard (not yet ratified) on the FreeBSD operating system (of course :-) )

Development is occurring at the FreeBSD HEAD branch and an experimental support is present on FreeBSD 8.0.

This work was sponsored by The FreeBSD Foundation.

Useful resources

Compatibility with Linux implementation

Given that the Linux 802.11s implementation (in wireless-testing) was based on an early draft, we can't talk with Linux mesh nodes.

Drivers status

How to setup a mesh network

On every mesh node, type:

# ifconfig wlan0 create wlandev ath0 wlanmode mesh channel 36 meshid freebsd-mesh

Don't forget to setup different IP addresses on every mesh node:

# ifconfig wlan0 10.0.0.x/yy

You should have something like this:

wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:0b:6b:2d:dc:d8
        inet netmask 0xffffff00 broadcast
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11a <mesh>
        status: running
        meshid mymesh channel 36 (5180 Mhz 11a) bssid 00:0b:6b:2d:dc:d8
        regdomain ETSI country PT ecm authmode OPEN privacy OFF txpower 17
        mcastrate 6 mgmtrate 6 scanvalid 60 wme burst bintval 1000 meshttl 31
        meshpeering meshforward meshmetric AIRTIME meshpath HWMP
        hwmprootmode DISABLED hwmpmaxhops 31

If everything goes well, you'll see the neighbor mesh stations with ifconfig wlan0 list sta.

$ ifconfig wlan0 list sta
00:0b:6b:2d:dc:d8   36     0     0    IDLE   0M 18.5   15      1    192
00:0b:6b:2d:db:ac   36  9827  a5b3   ESTAB   6M 14.0    0      2  28752 WME MESHCONF
00:0b:6b:2d:dd:17   36  afdb  ab30   ESTAB   6M 19.0    0      5  25024 WME MESHCONF
00:0b:6b:87:1c:f0   36  1904  825c   ESTAB   6M  6.0    0     30    192 WME MESHCONF

The first line is your own interface and you can ignore it. STATE is the most important column. In order for a mesh station be reachable, it must establish a peering instance with another mesh station, so if STATE shows anything else but ESTAB, peering hasn't occurred or it was not successful. Don't worry about the tx rate for now. 6M is the rate for management packets and that's basically what we have exchanged for now. When you start sending packets, the rate will change.

After trying to exchange packets with neighbors and non-neighbors the routing table will get filled. In this example, I'm using a star network topology, all packets go through a central node. ifconfig wlan0 list mesh will show the routing table:

$ ifconfig wlan0 list mesh
00:0b:6b:2d:dd:17 00:0b:6b:2d:dc:d8    1   2842     5000      0    V
00:0b:6b:2d:dc:d8 00:0b:6b:2d:dc:d8    0      0     5000      0    V
00:0b:6b:2d:db:ac 00:0b:6b:2d:dc:d8    1    347     5000      0    V

Note a meshid must be specified and the channel must be fixed; eventually you'll be able to scan for mesh networks and join using a wildcard meshid. Also, understand a meshid is different from the SSID you may be familiar with. In a mesh network beacon frames will always have an empty SSID string.

Testing different mesh network topologies

If you have 3 or more systems and would like to try playing with a different mesh topology, you can use ifconfig MAC ACL commands to do it. This requires that each system be configured to include device wlan_acl in the kernel configuration (or the module loaded with kldload). For example, imagine you have three mesh points (mesh nodes) MESH1, MESH2 and MESH3 and you want to create the following network topology:

MESH1 <-> MESH2 <-> MESH3

This means that MESH2 will route packets between MESH1 and MESH3. On MESH1 and MESH3 you type:

ifconfig wlan0 mac:allow mac:add mesh2_mac_address

And on MESH2 you type:

ifconfig wlan0 mac:allow mac:add mesh1_mac_address mac:add mesh3_mac_address

Notice the mac:allow command. This means that you only allow some nodes to peer.

Check tools/tools/net80211/scripts/mesh for example scripts that can help you setup different topologies.

Mesh parameters

HWMP parameters

Bridging mesh with wired or wireless

There's experimental support for bridging a mesh interface to another interface, either wired or wireless. The bridge(4) man page has several examples on how to setup bridging.

Current Status

The current status and further work are in the process of being identified. Some initial testing steps and things to look at, noted by AdrianChadd... this list will grow:

Work Item





Basic Setup (11n disabled)





Basic Setup (11n enabled)





ieee80211_mesh_forward_to_gates() -> mesh_transmit_to_gate() -> ieee80211_vap_pkt_send_dest()




Adrian notes that this path will do a complete re-encapsulation of the packet including mesh bits, which is more than likely wrong.

WiFi/Mesh (last edited 2018-08-28 01:09:57 by KyleEvans)