Recipe for Mesh Networking

Folks
I am looking to build a mesh network for home using openwrt routers. My requirements are simple and not a lot of throughput is needed but for my IOT experiments, I need all the devices to collect IP addresses from the same gateway router. Earlier, I was using a client to take the wifi signal to farflung portion of the house but I am never able to successfully use luci-proto-relay to get IP address across.
I think mesh may solve this problem of whole house and only one DHCP.

Is there a recipe out there? If not I would be happy to write one if I can get some guidance.

Thanks
Anil Garg

I ran from CLI an iw phy command can got a output that suggest that the radio and drivers will support it:

iw phy


<..>
	valid interface combinations:
		 * #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
		   total <= 2048, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz }


<..>
	valid interface combinations:
		 * #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
		   total <= 2048, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz }


<..>
	valid interface combinations:
		 * #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
		   total <= 2048, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz }


<..>
	valid interface combinations:
		 * #{ AP, mesh point } <= 8, #{ managed } <= 1,
		   total <= 8, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }

Install wpad-mesh, configure 802.11s, give the 802.11s interfaces IP addresses.

https://openwrt.org/docs/guide-user/network/wifi/mesh/80211s

(Note that 802.11s is self-sufficient between the nodes, but requires routing for off-mesh nodes, such as clients connected to the AP or over Ethernet)

More advanced (and handles the "single network" requirement), disable the 802.11s routing, install batman-adv and configure.

https://openwrt.org/docs/guide-user/network/wifi/mesh/batman

1 Like

At least if you're not dealing with more than 3 APs - and as long as all of your 'extenders' are in range of the central router (AP), WDS/ 4addr would be a simpler solution. Mesh only becomes interesting when you have a swarm of devices (APs), with multiple possible signal paths.

1 Like

Thanks Jeff. I will try to study and see if I understand fully. I think what I think you are saying is that 802.11s link will ensure that the gateway and the two other devices are sending data back and forth.
However if on each of those machines I connect using either an ethernet or WIFI access point, I need the second link to be implemented so that the path is complete. The 802.11s by itself is not full solution.

My use case is simple where I have one gateway wan port hardwired into AT&T box. Then I want this to have WIFI Access points for the laptop to connect. I also have garage opener Sonoff devices that dont get the signal and I want that device to get IP address from the Gateway relayed through the wifi devices so that my MQTT & Home Assistant can control these.

My option is to get Google Mesh or other wifi solution from Amazon but it steals the adventure!!!
Please advise if I am correct in my understanding.

Anil

I could not understand how WDS will help but I am attaching the picture of my use case. Now wiring between the gateway and relay wifi devices are allowed for domestic harmony!

As long as you’ve got only couple VLANs, WDS will take care of that link. WDS works by adding additional information about the “original” destination so the wireless driver can sort out if a wireless packet is for the router or for a wired or wireless client of that router.

If just a single VLAN, it “just works”. If you’ve got multiples, you can bridge each to its own backhaul SSID over WDS.

With three APs, you may do better with batman-adv over 802.11s, but I’d try WDS for simplicity, to start, if you’ve only got one or two VLANs. I’d rig it so the two remotes connect to your master, but not to each other.

1 Like

I have only one VLAN on the switch. Its just LAN and WAN
So I suspect that I should look for WDS implementations with two spokes both connecting to the gateway. I have never done any WDS.

Also will all the devices belong to the same sub-net such as 192.168.100.1/24

Anil

1 Like

In other words, you have only two repeaters - both roughly in the same distance to the gateway (meaning creating a mesh link between both repeaters won't improve their reception). This is a rather classic situation for WDS/ 4addr, using a mesh would be overkill (this might change if you had a third repeater in the garage, as a repeater located there would profit from a second level hop, by connecting to the top repeater instead of directly to the gateway).

So the situation is simple, enable WDS(-AP) on the gateway, use WDS(-client) on each of your repeaters individually to the gateway - now you can also create additional AP interface(s) on your repeaters, to actually wirelessly repeat the signal.

1 Like

WOW, you make it sound too simple. I am going to test this ASAP and then write my experience up to have others profit from it. Many thanks.

PS: And although there is no plan to put a router in garage, I doubt, it will be doing something so mission critical to profit from a second path. Many thanks.

Jeff & Slh:
Thank you so much. A couple years ago, I read someplace that WDS reduces the bandwidth and so I tried DD-WRT (Repeater) / Tomato (Wireless Ethernet) / OpenWRT (Luci-app-proto) and yet, I just wanted one place to manage my own IP lease using mac address table.... And I struggled and struggled in my own naivete. My internet connection is about 50 mbps and so this WDS even if it halves it does no harm as the router to router connection are routinely at twice the speed of my intenet gateway. And I rarely need this fast a speed for average home use.

This solution of AP(WDS) and Client (WDS) is working like a charm (and I hope I am speaking ahead as it hasn't yet been tested overtime).

I do have one question. What is the difference between AP mode and AP (WDS) mode. What may be a loss in making AP (WDS) as the only option in LUCI interface. I'd love to read up just out of curiosity.

Thanks again.

PS: I will write my experience/recipe. And I do plan to modify the switch at Gateway to create a DMZ VLAN. But my VLAN requirement for home use was not pervasive.

2 Likes

WDS-AP enables 4addr mode (which basically means adding a STA interface on top, to deal with the problem that AP mode (as specified by WiFi-Alliance) has no concept of transporting 4 MAC addresses (as necessary for repeated traffic) rather than just 3).

Enabling WDS-AP has no impact on your throughput (and 99.8% of all your potential client devices shouldn't object either), the process of sharing a single radio to both act as uplink and downlink (vulgo, to repeat) does - regardless of the implementation details behind it (same story with commercial implementations and/or dd-wrt, they will suffer from repeater effect just the same). The wireless spectrum is a shared medium, if you run a repeater, it shares the same channel as your original AP - this means, it will have to wait for receiving from the gateway, before it can take its turn and re-transmit the message to your clients far beyond - meaning the same amount of data (plus overhead) has to be transmitted twice over the same channel. The repeater can't talk while the gateway (or the other repeater at the other end of the house!) is transmitting - the gateway can't talk as long as either of its associated repeaters are using the very same resource it's going to use and has to wait for its turn. Repeater effect is two-fold, it always halves your available bandwidth and it naturally increases the lag (as the repeater can only start sending, once it has completely received the transmission), this is a physical fact of half-duplex communication over a limited, shared resource (the ether) - and can't be avoided by clever software tricks.

The only way to avoid the repeater effect (but not the increased lag), is using different (a third-) radio interfaces for uplink and downlink, which allows using different channels for uplink and downlink - to make uplink and downlink (and additional repeaters/ mesh stations) not compete over the same shared resource/ channel. Here tri-radio devices start to shine, as they use dedicated (usually better than for the downlinks, e.g. 3-stream vs 2-stream) radio for the uplink. This device category is slowly starting to appear on the market (more expensive than your off-the-mill dual-radio devices) and often touted as 'mesh systems' (although WDS/ 4addr will work just as well and profit from the third radio just as well as mesh, as long as you don't need multiple data paths (so in your situation, WDS/ 4addr would still be the winner - just profiting from a third radio)).

2 Likes

Thanks. You are an ocean of knowledge. Besides solving my problem, I learned as well. Thanks again.

1 Like

Is it equally well-supported/functioning between ath9k, ath10k and mvebu? Any (other) chipsets it's known not to work on?

Technically WDS/ 4addr 'should' work on all mac80211 based drivers (driver/ card need to support at least one AP- and one STA- interface concurrently), personally I am using it on ath10k and ath9k, I didn't have any personal exposure to mwlwifi or mt76 so far.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.