Hi,
Little update for those among us trying to get Mesh to work on tri-band devices like EA8300 and MR8300 using a dedicated backhaul, Before using @NoTengoBattery build, I was unable to ping from node02 to node01 on the lan addreses. So 192.168.1.2 and 192.168.1.1 , Unless I attached a cable between the lan ports. (duh) . But after using those builds and setting it up like below I could unplug the cable and everything kept working, having node02 only connected via bat0 backhaul bridged it worked.
But I was always able to use batctl p
and batctl n
to show that the mesh seemed to work. This is a really huge step forward . while I was messing about in the settings with the bridges and so on, there seemed to be nothing wrong with the configuration of network/wifi at all.
Some noteworthy need-to-knows for this to work:
- set
gw_mode
to the proper modes, server
and client
- using @NoTengoBattery 's build, it actually shows the interfaces with their vlan id. So before I used the openwrt generic build, those did not show up, instead I got eth0 , eth1 and not their vlan counterparts
- use the full
wpad-wolfssl
and not just wpad-mesh-wolfssl
. It made a big difference
- at some point, when uninstalling
wpad-*
packages, I had it happen on both routers that unload
dns resolver seems to crash/stop working and then opgk install will fail to work (and confuse you). On the EA8300 it restarted itself and I didn't at first understand what happened, I thought it was the ssl package I just de-installed preventing opgk update
to work. on the MR8300 it also stopped at exactly the same stage, but did't restart , also a restart of the router didn't seem to work, I guess it crashed because the wolfssl wasn't present and it probably needs it. But restarting later , and/or manually assigning a dns server like 8.8.8.8 in resolv.conf did the trick, then you install wpad-wolfssl
immediately and the problem is gone.
- I never manually assigned a MAC address, best way to avoid duplicate macs, I was able to export a backup tar.gz , extracted it locally, modded the settings, ip's and then upload it to the other node and it worked right of the bat(man). changed the ip's/dns
- I had some issues trying to sysupgrade between both partitions, when they still had their stock firmware on 1. It failed a few times. I now have openwrt generic on the 'other' partition and @NoTengoBattery 's build on the other. using
-n
on sysupgrade from generic openwrt made me able to login properly using a cable in the lan port when it booted the alternative partition. when I didn't use -n
the switch layout gets all screwed up and I got a few pings through while they booted but then they got all closed off, but booted fine so they didn't fall back to the other boot partition
- for those 2 routers to manually make them switch boot partition, just boot 3 times, unplug the cable the second you see the WAN port go live with repeated flashing (after the lan ports do their little progress-bar-like flashing), and it will work. I had a little catch-22 there but having openwrt on both partitions was the solution, so I got rid of the stock firmware entirely.
Feel free to comment on these, in case I missed something or use bad practices etc. It's the first time I messing with mesh-capable devices. I only use the 2.4Ghz here to get proof-of-concept to work and the 3rd 5GHz band is disabled here.
You need these packages:
opkg install batctl-full kmod-batman-adv wpad-wolfssl
But de-install the conflicting ones first.
Finally, a few remarks on the @NoTengoBattery build, there are little gems in there, like the (b)ash history that is kept even when disconnecting, there are little things in there that are so handy to have around. I did notice that the memory use is a lot higher due to some additional setup differences, like the added swap, that isn't in the stock openwrt build. I doesn't seem to be a problem, but the EA8300 does have only half the memory of the MR8300. I never used those memory things, but in luci they can be modified.
I tried building those packages from the source and was able to successfully install them on my router, but it seems the kernel version is not the same as the @NoTengoBattery images that he so kindly made, which have a slighly higher kernel version. I haven't dug into that yet to see why as I'm using a clone of the github repo, but in any case.. the build ran fine , after installing it I did have to do a hard reset of the modem and launch the firstboot
script to kinda clean it up and after a reboot it loaded all the modules fine and set the cli prompt to dallas
like the prebuilt images. I did not use the -ct drivers as mentioned in many blogs, the patched drivers here perform excellent.
the configs
MR8300 - router 1 - WAN gateway
root@router1:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdb2:74b3:833d::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
list ports 'bat0'
list ports 'eth0.1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.1.1'
list dns '192.168.1.1'
list dns '192.168.1.2'
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
option dns '127.0.0.1'
option peerdns '0'
config interface 'bat0'
option proto 'batadv'
option routing_algo 'BATMAN_IV'
option aggregated_ogms '1'
option ap_isolation '0'
option bonding '0'
option bridge_loop_avoidance '1'
option distributed_arp_table '1'
option fragmentation '1'
option gw_mode 'server'
option hop_penalty '30'
option isolation_mark '0x00000000/0x00000000'
option log_level '0'
option multicast_mode '1'
option multicast_fanout '16'
option network_coding '0'
option orig_interval '1000'
config interface 'mesh'
option proto 'batadv_hardif'
option master 'bat0'
option mtu '1536'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 0t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '5 0t'
root@router1:~# cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '153'
option hwmode '11a'
option path 'soc/40000000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
option htmode 'VHT80'
option disabled '0'
option country 'BE'
option cell_density '0'
config wifi-device 'radio1'
option type 'mac80211'
option channel '6'
option hwmode '11g'
option path 'platform/soc/a000000.wifi'
option country 'BE'
option cell_density '0'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option encryption 'psk2'
option key '2Hot4u3hardy'
option ssid 'dd-wrtg'
config wifi-device 'radio2'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'platform/soc/a800000.wifi'
option htmode 'VHT80'
option disabled '1'
option country 'BE'
option cell_density '0'
config wifi-iface 'wmesh'
option device 'radio0'
option network 'mesh'
option mode 'mesh'
option mesh_id 'MeshCloud'
option encryption 'sae'
option key 'MeshPassword123'
option mesh_fwding '0'
option mesh_ttl '1'
option mcast_rate '24000'
option disabled '0'
EA8300 - router2 - mesh client
root@router2:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdb2:74b3:833d::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
list ports 'bat0'
list ports 'eth0.1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.1.2'
option gateway '192.168.1.1'
list dns '192.168.1.1'
list dns '192.168.1.2'
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
option dns '127.0.0.1'
option peerdns '0'
config interface 'bat0'
option proto 'batadv'
option routing_algo 'BATMAN_IV'
option aggregated_ogms '1'
option ap_isolation '0'
option bonding '0'
option bridge_loop_avoidance '1'
option distributed_arp_table '1'
option fragmentation '1'
option gw_mode 'client'
option hop_penalty '30'
option isolation_mark '0x00000000/0x00000000'
option log_level '0'
option multicast_mode '1'
option multicast_fanout '16'
option network_coding '0'
option orig_interval '1000'
config interface 'mesh'
option proto 'batadv_hardif'
option master 'bat0'
option mtu '1536'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 0t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '5 0t'
root@router2:~# cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '153'
option hwmode '11a'
option path 'soc/40000000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
option htmode 'VHT80'
option disabled '0'
option country 'BE'
option cell_density '0'
config wifi-device 'radio1'
option type 'mac80211'
option channel '6'
option hwmode '11g'
option path 'platform/soc/a000000.wifi'
option country 'BE'
option cell_density '0'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option encryption 'psk2'
option key '2Hot4u3hardy'
option ssid 'dd-wrtg'
config wifi-device 'radio2'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'platform/soc/a800000.wifi'
option htmode 'VHT80'
option disabled '1'
option country 'BE'
option cell_density '0'
config wifi-iface 'wmesh'
option device 'radio0'
option network 'mesh'
option mode 'mesh'
option mesh_id 'MeshCloud'
option encryption 'sae'
option key 'MeshPassword123'
option mesh_fwding '0'
option mesh_ttl '1'
option mcast_rate '24000'
option disabled '0'
Hope this helps someone trying to do this on a router