I am thinking of extending my wifi (privat and guest network) with a second OpenWRT router. Currently I am thinking of using a wired connection over power line to connect the two. The second one would be a pretty dump dhcp client. Furthermore I would like to use batman-adv to later expand on it and use all the batman goodies.
I have already set up a batman mesh cloud over wifi before. There are a lot of guides out there describing how it is done with a wifi-iface but how would I go about it when using a wired connection? I know it is a bit of a silly question but the usage of batadv_hardif and bat0 interface did not really click with me yet...
It is pretty evident that I still need a bat0 interface with the batman configuration and I still need to bridge it with the respective lan interface covering the switches of the routers
This is the config I tried on my primary router:
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1 bat0'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '64'
list dns '1.1.1.1'
option ipaddr 'x.x.x.x'
config device 'lan_eth0_1_dev'
option name 'eth0.1'
option macaddr 'x:x:x:x:x:x'
config interface 'bat0'
option proto 'batadv'
option routing_algo 'BATMAN_IV'
option aggregated_ogms '1'
option gw_mode 'off'
If I do this batctl n gives
Error received: No such file or directory
BATMAN mesh bat0 disabled
sorry, completely forgot...
Primary router is a Fritz 3370 with internet access via pppoe. Second one would be an Archer C50 v1.
Both with wifi. They both shall be access points for clients like smartphones. And thy are running a self build OpenWRT 19.07.3.
Kernel version: 4.14.180
batman version: openwrt-2019.2-7
batctl version: openwrt-2019.2-4
I did the same steps on both devices. The good news batctl n doesn't throw errors any more. The bad news:
root@owrt:~# batctl n
[B.A.T.M.A.N. adv openwrt-2019.2-7, MainIF/MAC: eth0/x:x:x:x:x:x (bat0/x:x:x:x:x:x BATMAN_IV)]
IF Neighbor last-seen
And to let you know: currently both devices are connected via lan cable and the archer c50 is requesting an ip address on its lan interface from the fritz 3370.
Just set ip on each node and see if they can ping each other
NodeA: ip link set up dev bat0
NodeA: ip addr add 192.168.0.1/24 dev bat0
NodeB: ip link set up dev bat0
NodeB: ip addr add 192.168.0.2/24 dev bat0
NodeB: ping 192.168.0.1
Sure can do that one as well. But finished a wifi setup right now. unfortunately still not working. I used the uci config files because I am more familiar with them. Here is what I have done:
That I really did not expect. Would have thought I did something wrong.
I mean in any case batman "just" uses some layer 1 interface to do its layer 2 thing on top of it. So I feel like there must be a way of accomplishing this via lan port similar to the wifi interface.
@markbirss do you know someone else in the forum who may have a deeper understanding? Otherwise I would reach out to the batman guys via issue report.
And how ever this may turns out... Thanks a lot for your time and your help !
edit:
While digging around a second time to collect the essence of what we have done I stumbled across this one:
The network configuration in '/etc/config/network' allows to specify batman-adv as protocol and the batman-adv interface name. It is also possible to add other interfaces (like eth0) to the same mesh interface:
config interface 'bat0_hardif_wlan'
option mtu '1532'
option proto 'batadv'
option mesh 'bat0'
config interface 'bat0_hardif_eth0'
option mtu '1532'
option proto 'batadv'
option mesh 'bat0'
option ifname 'eth0'
That looks much more like something I would have expected. Would like to try this one first. Unfortunately I am not with my routers for two days so it will take a bit.